mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
put back restriction for date editing in backend, because frontend currently not support it
This commit is contained in:
parent
140349a6e0
commit
68be43212c
@ -25,6 +25,11 @@ export abstract class UnconfirmedContributionRole {
|
||||
protected abstract checkAuthorization(user: User, role: Role): void
|
||||
// second, check if contribution is still valid after update
|
||||
protected async validate(clientTimezoneOffset: number): Promise<void> {
|
||||
// TODO: refactor frontend and remove this restriction
|
||||
if (this.self.contributionDate.getMonth() !== this.updatedCreationDate.getMonth()) {
|
||||
throw new LogError('Month of contribution can not be changed')
|
||||
}
|
||||
|
||||
const contributionLogic = new ContributionLogic(this.self)
|
||||
this.availableCreationSums = await contributionLogic.getAvailableCreationSums(
|
||||
clientTimezoneOffset,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user