fix(Gemensam planering): Ändrat datum då det tillåts att skicka in gemensam planering och slutredovisning från 15 resp 100 till 84 (dvs 60*7/5)

This commit is contained in:
Daniel Appelgren
2022-01-25 12:20:59 +01:00
parent 79f5ef34a5
commit 33149f2fcb
2 changed files with 4 additions and 4 deletions

View File

@@ -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();
}

View File

@@ -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();
}