Pull request #281: TV-811 Because it's workdays and not calendar days we temporarily set this to much more.
Merge in TEA/mina-sidor-fa-web from feature/TV-811-increase-dates-since-its-workdays-and-not-calendar-days to next Squashed commit of the following: commit cdafaee42c71d8d4e0bf0d87ffc6e542a02e9e82 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Fri Nov 26 10:11:14 2021 +0100 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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user