diff --git a/backend/src/seeds/factory/creation.ts b/backend/src/seeds/factory/creation.ts index 75a765fae..d3f0f78ca 100644 --- a/backend/src/seeds/factory/creation.ts +++ b/backend/src/seeds/factory/creation.ts @@ -35,12 +35,17 @@ export const creationFactory = async ( if (creation.confirmed) { await mutate({ mutation: confirmContribution, variables: { id: pendingCreation.id } }) + const confirmedCreation = await Contribution.findOneOrFail({ id: pendingCreation.id }) + if (creation.moveCreationDate) { const transaction = await Transaction.findOneOrFail({ where: { userId: user.id, creationDate: new Date(creation.creationDate) }, order: { balanceDate: 'DESC' }, }) if (transaction.decay.equals(0) && transaction.creationDate) { + confirmedCreation.contributionDate = new Date( + nMonthsBefore(transaction.creationDate, creation.moveCreationDate), + ) transaction.creationDate = new Date( nMonthsBefore(transaction.creationDate, creation.moveCreationDate), ) @@ -48,6 +53,7 @@ export const creationFactory = async ( nMonthsBefore(transaction.balanceDate, creation.moveCreationDate), ) await transaction.save() + await confirmedCreation.save() } } } else { diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 9d3e0b8d4..2af3c41ee 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -94,9 +94,7 @@ services: ######################################################### ## NGINX ################################################ ######################################################### - nginx: - volumes: - - ./logs/nginx:/var/log/nginx + # nginx: ######################################################### ## PHPMYADMIN ########################################### diff --git a/docker-compose.yml b/docker-compose.yml index 6c0dffe15..5f0ab4dde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -107,6 +107,9 @@ services: # Application only envs #env_file: # - ./frontend/.env + volumes: + # : – mirror bidirectional path in local context with path in Docker container + - ./logs/backend:/logs/backend ######################################################## # DATABASE ############################################# @@ -149,6 +152,8 @@ services: - admin ports: - 80:80 + volumes: + - ./logs/nginx:/var/log/nginx networks: external-net: