Skip to content

Commit 0ab22ac

Browse files
committed
Adding changes to not set plan hours if a message is set, then it's up to the user to set plan hours.
1 parent eb3b3f8 commit 0ab22ac

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@
363363
name="planHours"
364364
[disabled]="isInTheFuture || data.message === null"
365365
[(ngModel)]="data.planHours"
366+
(change)="calculatePlanHours()"
366367
>
367368
</mat-form-field>
368369
<br>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export class WorkdayEntityDialogComponent implements OnInit {
183183
}
184184
else {
185185
this.data.message = null;
186+
this.calculatePlanHours();
186187
}
187188
}
188189

@@ -357,7 +358,9 @@ export class WorkdayEntityDialogComponent implements OnInit {
357358
let timeInMinutes2NdShift = this.data.plannedEndOfShift2 - this.data.plannedStartOfShift2 - this.data.plannedBreakOfShift2;
358359
plannedTimeInMinutes += timeInMinutes2NdShift;
359360
}
360-
this.data.planHours = plannedTimeInMinutes / 60;
361+
if (this.data.message === null) {
362+
this.data.planHours = plannedTimeInMinutes / 60;
363+
}
361364

362365
this.data.start1Id = this.convertTimeToMinutes(this.start1StartedAt, true);
363366
this.data.pause1Id = this.convertTimeToMinutes(this.pause1Id, true) === 0 ? null : this.convertTimeToMinutes(this.pause1Id, true);

0 commit comments

Comments
 (0)