feat: add PlanningDurationService for estimating planning duration
- Implemented PlanningDurationService to provide an indicative wait time before calculation based on user input and calendar settings. - Introduced duration estimation logic that considers horizon dates, balances, and rules without triggering a calculation. - Enhanced user input component to display estimated duration using the new service. - Updated translation files to include new duration estimate strings in multiple languages. - Added tests for PlanningDurationService to ensure accurate duration estimation and calibration. - Refactored leave planner service to remove hardcoded deadlines and improve worker responsiveness.
This commit is contained in:
1 parent
2edf2004f5
commit
bc8570d8ca
29 files changed
+1064
-123
No files matched your search
@@ -25,6 +25,9 @@
|
||||
|
||||
<app-rules-panel></app-rules-panel>
|
||||
|
||||
@if (duration.estimate()) {
|
||||
<p id="planning-duration-estimate" class="duration-estimate">{{ durationLabel() }}</p>
|
||||
}
|
||||
<button
|
||||
mat-flat-button
|
||||
class="calculate-button"
|
||||
@@ -32,7 +35,9 @@
|
||||
type="button"
|
||||
[disabled]="!!calendarSettings.planningHorizonError()"
|
||||
[attr.aria-describedby]="
|
||||
calendarSettings.planningHorizonError() ? 'invalid-planning-horizon' : null
|
||||
calendarSettings.planningHorizonError()
|
||||
? 'invalid-planning-horizon'
|
||||
: 'planning-duration-estimate'
|
||||
"
|
||||
(click)="triggerComputation()"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user