- Introduced calculationDate in various service interfaces and snapshots to track the date of planning calculations. - Added futureEntitlement and includedEntitlement fields to the translation service and respective language files for better user feedback. - Updated leave-planner.worker to handle calculationDate and declaredDays in requests. - Enhanced tests to ensure proper handling of calculation dates and artifact retention during planning processes. - Improved snapshot and explanation outputs to include calculation date for clarity in planning results.
This commit is contained in:
1 parent
036a8c0e1e
commit
9851edf906
18 files changed
+3347
-229
No files matched your search
@@ -146,6 +146,87 @@
|
||||
<dd>{{ plan.metrics.longestWorkSequence }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
@for (contribution of plan.timeWindowContributions ?? []; track contribution.ruleId) {
|
||||
<section class="outcome-explanation declared-rule">
|
||||
<h3>{{ contribution.label }}</h3>
|
||||
<p>
|
||||
{{ contribution.declaredDays.length }} {{ tr().bookedDays.booked }} +
|
||||
{{ contribution.placementDates.length }}
|
||||
{{ tr().planning.explanation.leaveDays }} =
|
||||
<strong
|
||||
>{{
|
||||
contribution.declaredDays.length + contribution.placementDates.length
|
||||
}}
|
||||
/ {{ contribution.requested }}</strong
|
||||
>
|
||||
</p>
|
||||
<p>
|
||||
@for (day of contribution.declaredDays; track day.date) {
|
||||
<span>{{ displayDate(day.date) }} · {{ tr().dayTypes[day.type] }} </span>
|
||||
}
|
||||
</p>
|
||||
<p>{{ tr().bookedDays.fixed }}</p>
|
||||
</section>
|
||||
}
|
||||
@if (plan.calculationDate) {
|
||||
<p>{{ tr().planning.calculationDate }} : {{ displayDate(plan.calculationDate) }}</p>
|
||||
}
|
||||
@for (
|
||||
contribution of plan.ifThenContributions ?? [];
|
||||
track contribution.ruleId + contribution.occurrence
|
||||
) {
|
||||
<section class="outcome-explanation declared-rule">
|
||||
<h3>{{ contribution.label }} · {{ displayDate(contribution.occurrence) }}</h3>
|
||||
<p>
|
||||
{{ contribution.declaredDays.length }} {{ tr().bookedDays.booked }} +
|
||||
{{ contribution.placementDates.length }}
|
||||
{{ tr().planning.explanation.leaveDays }} =
|
||||
<strong>{{ contribution.requested }} / {{ contribution.requested }}</strong>
|
||||
</p>
|
||||
@for (day of contribution.declaredDays; track day.date) {
|
||||
<span>{{ displayDate(day.date) }} · {{ tr().dayTypes[day.type] }} </span>
|
||||
}
|
||||
@if (contribution.declaredDays.length) {
|
||||
<p>{{ tr().bookedDays.fixed }}</p>
|
||||
}
|
||||
@if (contribution.earnedEntitlement; as earned) {
|
||||
<p>
|
||||
{{
|
||||
earned.added
|
||||
? tr().planning.futureEntitlement
|
||||
: tr().planning.includedEntitlement
|
||||
}}
|
||||
: {{ earned.quantity }} {{ tr().dayTypes[earned.type] }}
|
||||
</p>
|
||||
<p>
|
||||
{{ tr().planning.details.available }}
|
||||
{{ displayDate(earned.availableFrom) }} ·
|
||||
{{ tr().planning.details.expires }} {{ displayDate(earned.expiryDate) }}
|
||||
</p>
|
||||
}
|
||||
</section>
|
||||
}
|
||||
@for (period of plan.timeOffPeriods; track period.start) {
|
||||
@if (period.declaredDates?.length) {
|
||||
<section class="outcome-explanation declared-period">
|
||||
<h3>
|
||||
{{ tr().planning.explanation.breakTitle }} ·
|
||||
{{ displayDate(period.start) }} – {{ displayDate(period.end) }}
|
||||
</h3>
|
||||
<p>
|
||||
{{ period.declaredDates!.length }} {{ tr().bookedDays.booked }} +
|
||||
{{ period.placementDates.length }}
|
||||
{{ tr().planning.explanation.leaveDays }} +
|
||||
{{ period.nonWorkingDates.length }}
|
||||
{{ tr().planning.explanation.freeDays }} =
|
||||
<strong
|
||||
>{{ period.duration }} {{ tr().planning.explanation.daysOff }}</strong
|
||||
>
|
||||
</p>
|
||||
<p>{{ tr().bookedDays.fixed }}</p>
|
||||
</section>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<div class="plan-insights">
|
||||
@@ -257,6 +338,13 @@
|
||||
{{ displayDate(period.start) }} – {{ displayDate(period.end) }}
|
||||
</h4>
|
||||
<div class="break-equation">
|
||||
@if (period.declaredDates?.length) {
|
||||
<span
|
||||
><strong>{{ period.declaredDates!.length }}</strong
|
||||
>{{ tr().bookedDays.booked }}</span
|
||||
>
|
||||
<span>+</span>
|
||||
}
|
||||
<span
|
||||
><strong>{{ period.placementDates.length }}</strong
|
||||
>{{ tr().planning.explanation.leaveDays }}</span
|
||||
|
||||
Reference in new issue
Block a user