Skip to content

Commit ee581e6

Browse files
committed
Fixing broken merge.
1 parent 13511fa commit ee581e6

File tree

2 files changed

+3
-36
lines changed

2 files changed

+3
-36
lines changed

eform-client/cypress/e2e/plugins/time-planning-pn/b/dashboard-edit-b.spec.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ const secondUpdatePlanTexts = [
113113
];
114114

115115
const secondUpdateActualTexts = [
116-
{ date: nextWeekDates[0], start1StartedAt: '07:30', stop1StoppedAt: '15:30', pause1Id: '00:25', start2StartedAt: '00:00', stop2StoppedAt: '00:00', pause2Id: '00:00', plannedHours: '8:00', flexBalanceToDate: 'swap_vert97.03', flexToDate: '97.45', flexIncludingToday: '97.03', nettoHours: '7.58', todaysFlex: '-0.42', paidOutFlex: 0, calculatedHours: '8' },
117-
{ date: nextWeekDates[1], start1StartedAt: '07:50', stop1StoppedAt: '16:00', pause1Id: '01:00', start2StartedAt: '00:00', stop2StoppedAt: '00:00', pause2Id: '00:00', plannedHours: '8:00', flexBalanceToDate: 'swap_vert97.03', flexToDate: '97.03', flexIncludingToday: '97.03', nettoHours: '7.17', todaysFlex: '0.00', paidOutFlex: 0, calculatedHours: '7.166666666666667' },
116+
{ date: nextWeekDates[0], start1StartedAt: '07:30', stop1StoppedAt: '15:30', pause1Id: '00:25', start2StartedAt: '', stop2StoppedAt: '', pause2Id: '', plannedHours: '8:00', flexBalanceToDate: 'swap_vert97.03', flexToDate: '97.45', flexIncludingToday: '97.03', nettoHours: '7.58', todaysFlex: '-0.42', paidOutFlex: 0, calculatedHours: '8' },
117+
{ date: nextWeekDates[1], start1StartedAt: '07:50', stop1StoppedAt: '16:00', pause1Id: '01:00', start2StartedAt: '', stop2StoppedAt: '', pause2Id: '', plannedHours: '8:00', flexBalanceToDate: 'swap_vert97.03', flexToDate: '97.03', flexIncludingToday: '97.03', nettoHours: '7.17', todaysFlex: '0.00', paidOutFlex: 0, calculatedHours: '7.166666666666667' },
118118
{ date: nextWeekDates[2], start1StartedAt: '07:15', stop1StoppedAt: '16:00', pause1Id: '01:00', start2StartedAt: '17:00', stop2StoppedAt: '20:00', pause2Id: '00:30', plannedHours: '8:00', flexBalanceToDate: 'swap_vert97.03', flexToDate: '97.03', flexIncludingToday: '97.03', nettoHours: '10.25', todaysFlex: '0.00', paidOutFlex: 0, calculatedHours: '10.25' },
119119
{ date: nextWeekDates[3], start1StartedAt: '06:00', stop1StoppedAt: '12:00', pause1Id: '00:30', start2StartedAt: '18:00', stop2StoppedAt: '20:00', pause2Id: '00:30', plannedHours: '8:00', flexBalanceToDate: 'swap_vert97.03', flexToDate: '97.03', flexIncludingToday: '97.03', nettoHours: '7.00', todaysFlex: '0.00', paidOutFlex: 0, calculatedHours: '7' },
120120
{ date: nextWeekDates[4], start1StartedAt: '06:00', stop1StoppedAt: '12:00' , pause1Id: '01:50' , start2StartedAt: '18:00' , stop2StoppedAt: '20:00' , pause2Id: '01:50' , plannedHours: '8.0' , flexBalanceToDate: 'swap_vert94.70' , flexToDate: '97.03' , flexIncludingToday: '94.70' , nettoHours: '4.33' , todaysFlex: '-2.33' , paidOutFlex : 0, calculatedHours : 6.666666666666667 },

eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/workday-entity/workday-entity-dialog.component.ts

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,39 +1185,6 @@ export class WorkdayEntityDialogComponent implements OnInit {
11851185
}
11861186
}
11871187

1188-
private getPlannedShiftMinutes(
1189-
start: number | null,
1190-
end: number | null,
1191-
breakMinutes: number | null
1192-
): number {
1193-
if (start === null || end === null || start === end) {
1194-
return 0;
1195-
}
1196-
1197-
let duration = end - start;
1198-
1199-
if (end <= start) {
1200-
duration = (1440 - start) + end;
1201-
}
1202-
1203-
if (breakMinutes) {
1204-
duration -= breakMinutes;
1205-
}
1206-
1207-
return Math.max(0, duration);
1208-
}
1209-
1210-
markAllAsTouched(control: AbstractControl) {
1211-
if (control instanceof FormControl) {
1212-
control.markAsTouched({ onlySelf: true });
1213-
} else if (control instanceof FormGroup) {
1214-
Object.values(control.controls).forEach((c) => this.markAllAsTouched(c));
1215-
control.markAsTouched({ onlySelf: true });
1216-
} else if (control instanceof FormArray) {
1217-
control.controls.forEach((c) => this.markAllAsTouched(c));
1218-
}
1219-
}
1220-
12211188
// ===== Genberegn plan/actual/todaysFlex og sumFlexEnd (samme logik som før, men baseret på form) =====
12221189
calculatePlanHours() {
12231190
this.markAllAsTouched(this.workdayForm);
@@ -1401,4 +1368,4 @@ export class WorkdayEntityDialogComponent implements OnInit {
14011368

14021369
onCancel() {
14031370
}
1404-
}
1371+
}

0 commit comments

Comments
 (0)