#2066 Bearbeiten Button disabled Logik angepasst

This commit is contained in:
Andreas Schickinger
2021-08-10 12:18:03 +02:00
parent 1a2960cbde
commit 7bf85060c5

View File

@@ -45,7 +45,12 @@ export class TaskModalComponent {
);
editDisabled$ = this.info$.pipe(
map((info) => this.dateAdapter.isGreaterThan(new Date(), this.domainTaskCalendarService.getDisplayInfoDate(info)))
map((info) => {
if (info.publicationDate && !info.taskDate && !info.taskOverdueDate) {
return this.dateAdapter.isGreaterThan(this.dateAdapter.today(), new Date(info.publicationDate));
}
return this.dateAdapter.isGreaterThan(this.dateAdapter.today(), new Date(info.taskDate));
})
);
indicatorColor$ = this.info$.pipe(map((info) => this.domainTaskCalendarService.getProcessingStatusColorCode(info)));