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:
@@ -154,9 +154,9 @@ export class GemensamPlaneringFormComponent {
|
|||||||
return new Date() > startDate;
|
return new Date() > startDate;
|
||||||
}
|
}
|
||||||
private _isBeforeLastPossibleReportDay(endDate: Date): boolean {
|
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
|
// 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();
|
return lastPossibleReportDay > new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ export class SlutredovisningFormComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _isBeforeLastPossibleReportDay(date: Date): boolean {
|
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
|
// 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();
|
return lastPossibleReportDay > new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user