diff --git a/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/gemensam-planering-form/gemensam-planering-form.component.ts b/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/gemensam-planering-form/gemensam-planering-form.component.ts index a426c63..900eaa8 100644 --- a/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/gemensam-planering-form/gemensam-planering-form.component.ts +++ b/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/gemensam-planering-form/gemensam-planering-form.component.ts @@ -154,9 +154,9 @@ export class GemensamPlaneringFormComponent { return new Date() > startDate; } private _isBeforeLastPossibleReportDay(endDate: Date): boolean { - // Reporting is allowed at latest 5 days past avrop end date. + // Reporting is allowed at latest 60 working days past avrop end date. To calculate calendar days we remove weekends like this 60*7/5=84 // Because it's workdays and not calendar days we temporarily set this to much more. This date should be fetched from API in the future - const lastPossibleReportDay = addDays(endDate, 15); + const lastPossibleReportDay = addDays(endDate, 84); return lastPossibleReportDay > new Date(); } diff --git a/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/slutredovisning-form/slutredovisning-form.component.ts b/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/slutredovisning-form/slutredovisning-form.component.ts index 2489eb3..31174bb 100644 --- a/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/slutredovisning-form/slutredovisning-form.component.ts +++ b/apps/mina-sidor-fa/src/app/pages/deltagare/pages/deltagare-details/pages/report-forms/slutredovisning-form/slutredovisning-form.component.ts @@ -64,9 +64,9 @@ export class SlutredovisningFormComponent { } private _isBeforeLastPossibleReportDay(date: Date): boolean { - // Reporting is allowed at latest 60 days past avrop end date. + // Reporting is allowed at latest 60 working days past avrop end date. To calculate calendar days we remove weekends like this 60*7/5=84 // Because it's workdays and not calendar days we temporarily set this to much more. This date should be fetched from API in the future - const lastPossibleReportDay = addDays(date, 100); + const lastPossibleReportDay = addDays(date, 84); return lastPossibleReportDay > new Date(); }