Merge branch 'next' into develop

This commit is contained in:
Daniel Appelgren
2021-11-26 10:25:15 +01:00
3 changed files with 9 additions and 3 deletions

View File

@@ -139,7 +139,9 @@ export class AvvikelseReportFormComponent implements OnInit, OnDestroy {
return new Date() > startDate;
}
private _isBeforeLastPossibleReportDay(endDate: Date): boolean {
const lastPossibleReportDay = addDays(endDate, 5); // Reporting is allowed at latest 5 days past avrop end date.
// Reporting is allowed at latest 5 days past avrop end date.
// 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);
return lastPossibleReportDay > new Date();
}

View File

@@ -154,7 +154,9 @@ export class GemensamPlaneringFormComponent {
return new Date() > startDate;
}
private _isBeforeLastPossibleReportDay(endDate: Date): boolean {
const lastPossibleReportDay = addDays(endDate, 5); // Reporting is allowed at latest 5 days past avrop end date.
// Reporting is allowed at latest 5 days past avrop end date.
// 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);
return lastPossibleReportDay > new Date();
}

View File

@@ -64,7 +64,9 @@ export class SlutredovisningFormComponent {
}
private _isBeforeLastPossibleReportDay(date: Date): boolean {
const lastPossibleReportDay = addDays(date, 60); // Reporting is allowed at latest 60 days past avrop end date.
// Reporting is allowed at latest 60 days past avrop end date.
// 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);
return lastPossibleReportDay > new Date();
}