mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into fix-admin-edit-contribution
This commit is contained in:
commit
5fb70341c2
@ -35,12 +35,17 @@ export const creationFactory = async (
|
|||||||
if (creation.confirmed) {
|
if (creation.confirmed) {
|
||||||
await mutate({ mutation: confirmContribution, variables: { id: pendingCreation.id } })
|
await mutate({ mutation: confirmContribution, variables: { id: pendingCreation.id } })
|
||||||
|
|
||||||
|
const confirmedCreation = await Contribution.findOneOrFail({ id: pendingCreation.id })
|
||||||
|
|
||||||
if (creation.moveCreationDate) {
|
if (creation.moveCreationDate) {
|
||||||
const transaction = await Transaction.findOneOrFail({
|
const transaction = await Transaction.findOneOrFail({
|
||||||
where: { userId: user.id, creationDate: new Date(creation.creationDate) },
|
where: { userId: user.id, creationDate: new Date(creation.creationDate) },
|
||||||
order: { balanceDate: 'DESC' },
|
order: { balanceDate: 'DESC' },
|
||||||
})
|
})
|
||||||
if (transaction.decay.equals(0) && transaction.creationDate) {
|
if (transaction.decay.equals(0) && transaction.creationDate) {
|
||||||
|
confirmedCreation.contributionDate = new Date(
|
||||||
|
nMonthsBefore(transaction.creationDate, creation.moveCreationDate),
|
||||||
|
)
|
||||||
transaction.creationDate = new Date(
|
transaction.creationDate = new Date(
|
||||||
nMonthsBefore(transaction.creationDate, creation.moveCreationDate),
|
nMonthsBefore(transaction.creationDate, creation.moveCreationDate),
|
||||||
)
|
)
|
||||||
@ -48,6 +53,7 @@ export const creationFactory = async (
|
|||||||
nMonthsBefore(transaction.balanceDate, creation.moveCreationDate),
|
nMonthsBefore(transaction.balanceDate, creation.moveCreationDate),
|
||||||
)
|
)
|
||||||
await transaction.save()
|
await transaction.save()
|
||||||
|
await confirmedCreation.save()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -94,9 +94,7 @@ services:
|
|||||||
#########################################################
|
#########################################################
|
||||||
## NGINX ################################################
|
## NGINX ################################################
|
||||||
#########################################################
|
#########################################################
|
||||||
nginx:
|
# nginx:
|
||||||
volumes:
|
|
||||||
- ./logs/nginx:/var/log/nginx
|
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
## PHPMYADMIN ###########################################
|
## PHPMYADMIN ###########################################
|
||||||
|
|||||||
@ -107,6 +107,9 @@ services:
|
|||||||
# Application only envs
|
# Application only envs
|
||||||
#env_file:
|
#env_file:
|
||||||
# - ./frontend/.env
|
# - ./frontend/.env
|
||||||
|
volumes:
|
||||||
|
# <host_machine_directy>:<container_directory> – mirror bidirectional path in local context with path in Docker container
|
||||||
|
- ./logs/backend:/logs/backend
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# DATABASE #############################################
|
# DATABASE #############################################
|
||||||
@ -149,6 +152,8 @@ services:
|
|||||||
- admin
|
- admin
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
|
volumes:
|
||||||
|
- ./logs/nginx:/var/log/nginx
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
external-net:
|
external-net:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user