Skip to content

Commit cff766f

Browse files
committed
Adding back the editing of planhours and fix for sumFlexEnd being -0.00, which should be shown as 0.00
1 parent d39c200 commit cff766f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,8 @@
924924
matInput
925925
type="number"
926926
id="planHours"
927-
formControlName="planHours"/>
927+
formControlName="planHours"
928+
(change)="calculatePlanHours()"/>
928929
<mat-error data-testid="planHours-Error" *ngIf="workdayForm.hasError('tooManyHours')">
929930
Total planned hours cannot exceed 24
930931
</mat-error>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,11 @@ export class WorkdayEntityDialogComponent implements OnInit {
14591459
- this.data.planningPrDayModels.planHours;
14601460
}
14611461
}
1462+
1463+
if (this.data.planningPrDayModels.sumFlexEnd.toFixed(2) === '-0.00') {
1464+
this.data.planningPrDayModels.sumFlexEnd = 0.00;
1465+
this.workdayForm.get('sumFlexEnd')?.setValue(0.00, {emitEvent: false});
1466+
}
14621467
}
14631468

14641469
// Kør ALLE validators og vis fejl i UI

0 commit comments

Comments
 (0)