feat: enhance user input component with new styling and functionality
- Added informational styling to warning cards in user input component. - Improved remaining days details and history display with new computed properties. - Updated user input service to manage planning outcomes and traces more effectively. - Enhanced leave planner service to classify remaining balances with detailed reasons. - Expanded translation service to support new balance reasoning and suggestions. - Updated translations for multiple languages to reflect new features and terminology.
This commit is contained in:
1 parent
9851edf906
commit
3dc601982a
15 files changed
+677
-139
No files matched your search
@@ -178,3 +178,6 @@ A valid deterministic plan produced after completing the planning objective orde
|
||||
|
||||
**Remaining balance**:
|
||||
Any quantity left unspent by the optimization result, reported as unavoidable expiry, an unplaced at-risk balance, or a deferred balance.
|
||||
|
||||
**Non-placement reason**:
|
||||
A concrete explanation of why a quantity of a leave balance remains unspent in the displayed plan, distinguishing a blocking condition from a decision to preserve leave for later. It includes the relevant dates, is distinct from the balance's expiry-based classification, and can be supported by recorded candidate evaluations.
|
||||
@@ -395,7 +395,11 @@
|
||||
@if (selected.remainingBalance; as remaining) {
|
||||
·
|
||||
{{
|
||||
tr().planning.details.remainingReasons[remaining.classification]
|
||||
translationService.getRemainingBalanceReason(
|
||||
remaining,
|
||||
displayedPlan(),
|
||||
planningOutcome()?.kind === 'PlanningIncomplete'
|
||||
)
|
||||
}}
|
||||
}
|
||||
</p>
|
||||
@@ -482,9 +486,11 @@
|
||||
@if (selected.remainingBalance; as remaining) {
|
||||
<p>
|
||||
{{
|
||||
tr().planning.details.remainingReasons[
|
||||
remaining.classification
|
||||
]
|
||||
translationService.getRemainingBalanceReason(
|
||||
remaining,
|
||||
displayedPlan(),
|
||||
planningOutcome()?.kind === 'PlanningIncomplete'
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
}
|
||||
|
||||
@@ -105,12 +105,12 @@ export class CalendarYear {
|
||||
protected readonly isCancelling = signal(false);
|
||||
private readonly resultsTitle = viewChild<ElementRef<HTMLElement>>('resultsTitle');
|
||||
protected readonly loadingProgress = signal(0);
|
||||
protected readonly planningOutcome = signal<PlanningOutcome | null>(null);
|
||||
protected readonly planningOutcome = this.userInput.planningOutcomeSignal;
|
||||
protected readonly planningExplanation = signal<PlanningExplanation | null>(null);
|
||||
protected readonly explanationError = signal<PlanningReason | null>(null);
|
||||
protected readonly planningTrace = signal<PlanningTrace | null>(null);
|
||||
protected readonly planningTrace = this.userInput.planningTraceSignal;
|
||||
protected readonly traceLoading = signal(false);
|
||||
protected readonly traceResolved = signal(false);
|
||||
protected readonly traceResolved = this.userInput.traceResolvedSignal;
|
||||
protected readonly selectedPlacementIndex = signal(0);
|
||||
protected readonly planDetailsOpen = signal(false);
|
||||
protected readonly traceOpen = signal(false);
|
||||
@@ -188,14 +188,7 @@ export class CalendarYear {
|
||||
return this.translationService.tr;
|
||||
}
|
||||
|
||||
protected readonly displayedPlan = computed(() => {
|
||||
const outcome = this.planningOutcome();
|
||||
return outcome?.kind === 'Plan'
|
||||
? outcome
|
||||
: outcome?.kind === 'PlanningIncomplete'
|
||||
? outcome.incumbent
|
||||
: undefined;
|
||||
});
|
||||
protected readonly displayedPlan = this.userInput.displayedPlanSignal;
|
||||
|
||||
protected readonly planExplanation = computed(() => {
|
||||
const explanation = this.planningExplanation();
|
||||
@@ -567,6 +560,7 @@ export class CalendarYear {
|
||||
if (version !== this.calculationVersion) return;
|
||||
this.resetCalculationState(horizon);
|
||||
this.activeCalculation = calculation;
|
||||
this.userInput.planningSnapshotSignal.set(calculation.snapshot);
|
||||
this.planningHorizon.set(horizon);
|
||||
this.applyOutcome(outcome);
|
||||
this.loadArtifacts(calculation);
|
||||
@@ -576,6 +570,7 @@ export class CalendarYear {
|
||||
if (version !== this.calculationVersion) return;
|
||||
this.resetCalculationState(horizon);
|
||||
this.activeCalculation = calculation;
|
||||
this.userInput.planningSnapshotSignal.set(calculation.snapshot);
|
||||
this.planningHorizon.set(horizon);
|
||||
this.applyOutcome({
|
||||
kind: 'PlanningIncomplete',
|
||||
@@ -636,6 +631,7 @@ export class CalendarYear {
|
||||
|
||||
private resetCalculationState(horizon: { start: string; end: string }): void {
|
||||
this.activeCalculation = null;
|
||||
this.userInput.planningSnapshotSignal.set(null);
|
||||
this.planningOutcome.set(null);
|
||||
this.planningExplanation.set(null);
|
||||
this.explanationError.set(null);
|
||||
|
||||
@@ -93,11 +93,13 @@
|
||||
}
|
||||
|
||||
@if (hasRemainingDays()) {
|
||||
<mat-card class="warning-card">
|
||||
<mat-card class="warning-card" [class.is-informational]="!hasAtRiskDays()">
|
||||
<mat-card-content class="warning-content">
|
||||
<mat-icon color="warn" aria-hidden="true">warning</mat-icon>
|
||||
<mat-icon [color]="hasAtRiskDays() ? 'warn' : undefined" aria-hidden="true">{{
|
||||
hasAtRiskDays() ? 'warning' : 'info'
|
||||
}}</mat-icon>
|
||||
<div class="warning">
|
||||
<span>
|
||||
<p role="status">
|
||||
{{
|
||||
tr()
|
||||
.userInput.remainingDaysWarning.replace(
|
||||
@@ -107,11 +109,129 @@
|
||||
.split('{plural}')
|
||||
.join(remainingDays() > 1 ? 's' : '')
|
||||
}}
|
||||
</span>
|
||||
@for (day of remainingDaysDetails(); track $index) {
|
||||
<span class="remaining-day-detail">- {{ day }}</span>
|
||||
</p>
|
||||
<ul class="remaining-balances">
|
||||
@for (day of remainingDaysDetails(); track day.id) {
|
||||
<li class="remaining-day-detail">
|
||||
<strong>{{ day.title }}</strong>
|
||||
@if (day.earnedFrom) {
|
||||
<p>{{ day.earnedFrom }}</p>
|
||||
}
|
||||
<span> {{ tr().userInput.remainingDaysManualPlace }} </span>
|
||||
<p>{{ day.reason }}</p>
|
||||
<p>{{ day.validity }}</p>
|
||||
@if (day.suggestion) {
|
||||
<p>{{ day.suggestion }}</p>
|
||||
}
|
||||
<details
|
||||
name="remaining-balances"
|
||||
[open]="historyBalanceId() === day.id"
|
||||
(toggle)="toggleRemainingHistory(day.id, $event)"
|
||||
>
|
||||
<summary
|
||||
[attr.aria-label]="
|
||||
tr().userInput.remainingWhy +
|
||||
' : ' +
|
||||
day.title +
|
||||
'. ' +
|
||||
day.validity
|
||||
"
|
||||
>
|
||||
{{ tr().userInput.remainingWhy }}
|
||||
</summary>
|
||||
<p>{{ day.horizon }}</p>
|
||||
@if (historyBalanceId() === day.id) {
|
||||
@if (!traceResolved()) {
|
||||
<p role="status">{{ tr().loading }}</p>
|
||||
} @else {
|
||||
@if (!trace() || trace()?.status === 'failed') {
|
||||
<p>{{ tr().planning.traceUnavailable }}</p>
|
||||
}
|
||||
@if (remainingHistory().length) {
|
||||
<p>{{ tr().userInput.remainingHistoryHelp }}</p>
|
||||
<ol
|
||||
class="remaining-history"
|
||||
[attr.start]="historyPage() * 20 + 1"
|
||||
>
|
||||
@for (
|
||||
attempt of visibleHistory();
|
||||
track $index
|
||||
) {
|
||||
<li>
|
||||
<strong>{{ attempt.date }}</strong> ·
|
||||
{{ attempt.status }}
|
||||
@if (attempt.phase) {
|
||||
<p>{{ attempt.phase }}</p>
|
||||
}
|
||||
@if (attempt.reason) {
|
||||
<p>{{ attempt.reason }}</p>
|
||||
}
|
||||
@for (
|
||||
criterion of attempt.criteria;
|
||||
track $index
|
||||
) {
|
||||
<p
|
||||
[class.decisive]="
|
||||
criterion.decisive
|
||||
"
|
||||
>
|
||||
@if (criterion.decisive) {
|
||||
{{
|
||||
tr().planning.details
|
||||
.firstDifference
|
||||
}}
|
||||
:
|
||||
}
|
||||
{{ criterion.text }}
|
||||
</p>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
@if (historyPageCount() > 1) {
|
||||
<nav
|
||||
class="history-pagination"
|
||||
[attr.aria-label]="tr().planning.candidates"
|
||||
>
|
||||
<button
|
||||
mat-button
|
||||
type="button"
|
||||
[disabled]="historyPage() === 0"
|
||||
(click)="
|
||||
historyPage.set(historyPage() - 1)
|
||||
"
|
||||
>
|
||||
{{ tr().planning.previousCandidates }}
|
||||
</button>
|
||||
<span
|
||||
>{{ tr().planning.page }}
|
||||
{{ historyPage() + 1 }}
|
||||
{{ tr().planning.of }}
|
||||
{{ historyPageCount() }}</span
|
||||
>
|
||||
<button
|
||||
mat-button
|
||||
type="button"
|
||||
[disabled]="
|
||||
historyPage() + 1 >=
|
||||
historyPageCount()
|
||||
"
|
||||
(click)="
|
||||
historyPage.set(historyPage() + 1)
|
||||
"
|
||||
>
|
||||
{{ tr().planning.nextCandidates }}
|
||||
</button>
|
||||
</nav>
|
||||
}
|
||||
} @else if (trace() && trace()?.status !== 'failed') {
|
||||
<p>{{ tr().userInput.remainingNoEvaluations }}</p>
|
||||
}
|
||||
}
|
||||
}
|
||||
</details>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
@@ -174,6 +174,11 @@ form {
|
||||
.warning-card {
|
||||
background: var(--ui-warning-bg, #fff4d6);
|
||||
color: var(--ui-warning-text, #4f3800);
|
||||
|
||||
&.is-informational {
|
||||
background: var(--ui-panel-bg);
|
||||
color: var(--mat-sys-on-surface);
|
||||
}
|
||||
}
|
||||
|
||||
.warning-content {
|
||||
@@ -192,6 +197,38 @@ form {
|
||||
gap: 0.25rem;
|
||||
min-width: 0;
|
||||
overflow-wrap: break-word;
|
||||
line-height: 1.5;
|
||||
|
||||
p {
|
||||
margin: 0.25rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
.remaining-balances,
|
||||
.remaining-history {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
margin: 0.5rem 0;
|
||||
padding-inline-start: 1.25rem;
|
||||
}
|
||||
|
||||
.remaining-day-detail summary {
|
||||
min-height: 2.75rem;
|
||||
align-content: center;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 0.25em;
|
||||
}
|
||||
|
||||
.decisive {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.history-pagination {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
:host {
|
||||
|
||||
@@ -11,6 +11,8 @@ import { UserInput } from './user-input';
|
||||
import { UserInputService } from '../../services/user-input-service';
|
||||
import { UserSettings } from '../user-settings/user-settings';
|
||||
import { CalendarSettingsService } from '../../services/calendar-settings-service';
|
||||
import { createPlanningCalculation, PlanningRequest } from '../../services/leave-planner.service';
|
||||
import { TranslationService } from '../../services/translation-service';
|
||||
|
||||
describe('UserInput', () => {
|
||||
let component: UserInput;
|
||||
@@ -83,6 +85,107 @@ describe('UserInput', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
async function calculate(request: PlanningRequest): Promise<void> {
|
||||
const browserWindow = globalThis.window;
|
||||
let calculation: ReturnType<typeof createPlanningCalculation>;
|
||||
try {
|
||||
vi.stubGlobal('window', undefined);
|
||||
calculation = createPlanningCalculation(request);
|
||||
} finally {
|
||||
vi.stubGlobal('window', browserWindow);
|
||||
}
|
||||
const [outcome, trace] = await Promise.all([calculation.outcome, calculation.trace]);
|
||||
userInputService.planningSnapshotSignal.set(calculation.snapshot);
|
||||
userInputService.planningOutcomeSignal.set(outcome);
|
||||
userInputService.planningTraceSignal.set(trace ?? null);
|
||||
userInputService.traceResolvedSignal.set(true);
|
||||
fixture.detectChanges();
|
||||
}
|
||||
|
||||
it('explains availability using the calculated inclusive last date, independently of unsubmitted edits', async () => {
|
||||
TestBed.inject(TranslationService).setLanguage('fr');
|
||||
await calculate({
|
||||
horizon: { start: '2027-05-01', end: '2027-05-10' },
|
||||
balances: [
|
||||
{
|
||||
id: 'other',
|
||||
type: 'other',
|
||||
quantity: 1,
|
||||
availableFrom: '2027-05-10',
|
||||
expiryDate: '2028-05-10',
|
||||
},
|
||||
],
|
||||
rules: [],
|
||||
});
|
||||
const root = fixture.nativeElement as HTMLElement;
|
||||
const card = root.querySelector<HTMLElement>('.warning-card')!;
|
||||
expect(card.textContent).toContain('Disponible seulement à partir du 10 mai 2027');
|
||||
expect(card.textContent).toContain('la dernière date du planning, le 9 mai 2027');
|
||||
expect(card.textContent).toContain('prolonger la période planifiée');
|
||||
expect(card.textContent).not.toContain('manuellement');
|
||||
const explanation = card.textContent;
|
||||
TestBed.inject(CalendarSettingsService).setPlanningDates('2027-01-01', '2028-12-31');
|
||||
component.updateDay(0, { ...userInputService.vacationNumberSignal()[0], numberOfDays: 0 });
|
||||
fixture.detectChanges();
|
||||
expect(card.textContent).toBe(explanation);
|
||||
});
|
||||
|
||||
it('shows genuine recorded attempts on demand for usable leave kept for later', async () => {
|
||||
TestBed.inject(TranslationService).setLanguage('fr');
|
||||
await calculate({
|
||||
horizon: { start: '2024-06-04', end: '2024-06-13' },
|
||||
balances: [
|
||||
{
|
||||
id: 'other',
|
||||
type: 'other',
|
||||
quantity: 1,
|
||||
availableFrom: '2024-06-04',
|
||||
expiryDate: '2025-05-10',
|
||||
},
|
||||
],
|
||||
declaredDays: [{ date: '2024-06-07', type: 'cp' }],
|
||||
rules: [],
|
||||
});
|
||||
const root = fixture.nativeElement as HTMLElement;
|
||||
const card = root.querySelector<HTMLElement>('.warning-card')!;
|
||||
expect(card.classList.contains('is-informational')).toBe(true);
|
||||
expect(card.textContent).toContain('Conservé pour plus tard');
|
||||
expect(card.textContent).toContain('Aucune action nécessaire');
|
||||
expect(card.textContent).not.toContain('Disponible seulement');
|
||||
expect(root.querySelector('.remaining-history')).toBeNull();
|
||||
const outcome = JSON.stringify(userInputService.planningOutcomeSignal());
|
||||
const trace = JSON.stringify(userInputService.planningTraceSignal());
|
||||
const details = root.querySelector<HTMLDetailsElement>('.remaining-day-detail details')!;
|
||||
details.open = true;
|
||||
details.dispatchEvent(new Event('toggle'));
|
||||
fixture.detectChanges();
|
||||
expect(root.querySelectorAll('.remaining-history > li').length).toBeGreaterThan(0);
|
||||
expect(details.textContent).toContain('Ces dates ont réellement été examinées');
|
||||
expect(details.textContent).toContain('Maximum de jours travaillés entre congés');
|
||||
expect(details.textContent).toContain('Évalué et rejeté');
|
||||
expect(JSON.stringify(userInputService.planningOutcomeSignal())).toBe(outcome);
|
||||
expect(JSON.stringify(userInputService.planningTraceSignal())).toBe(trace);
|
||||
|
||||
const plan = userInputService.displayedPlanSignal()!;
|
||||
userInputService.planningOutcomeSignal.set({
|
||||
kind: 'PlanningIncomplete',
|
||||
incumbent: plan,
|
||||
completedStages: [],
|
||||
reasons: [{ code: 'user-cancelled', message: 'Cancelled' }],
|
||||
});
|
||||
userInputService.planningTraceSignal.set(null);
|
||||
fixture.detectChanges();
|
||||
expect(card.textContent).toContain('Sa non-utilisation n’est pas une décision définitive');
|
||||
expect(card.textContent).not.toContain('Conservé pour plus tard');
|
||||
expect(root.querySelector('.remaining-history')).toBeNull();
|
||||
details.open = true;
|
||||
details.dispatchEvent(new Event('toggle'));
|
||||
fixture.detectChanges();
|
||||
expect(details.textContent).toContain(
|
||||
TestBed.inject(TranslationService).tr().planning.traceUnavailable,
|
||||
);
|
||||
});
|
||||
|
||||
it('describes Calculate with an indicative range that follows unsubmitted edits', () => {
|
||||
const root = fixture.nativeElement as HTMLElement;
|
||||
const calculate = root.querySelector<HTMLButtonElement>('.calculate-button')!;
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import { Component, computed, inject, ChangeDetectionStrategy } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
computed,
|
||||
effect,
|
||||
inject,
|
||||
signal,
|
||||
ChangeDetectionStrategy,
|
||||
} from '@angular/core';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { UserInputService } from '../../services/user-input-service';
|
||||
import { RulesPanel } from '../rules-panel/rules-panel';
|
||||
@@ -11,6 +18,7 @@ import type { LeaveType } from '../../services/leave-planner.service';
|
||||
import { TranslationService } from '../../services/translation-service';
|
||||
import { CalendarSettingsService } from '../../services/calendar-settings-service';
|
||||
import { PlanningDurationService } from '../../services/planning-duration.service';
|
||||
import { addPlanningDays } from '../../services/planning-date';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-input',
|
||||
@@ -50,47 +58,151 @@ export class UserInput {
|
||||
return this.translationService.tr;
|
||||
}
|
||||
|
||||
protected remainingDays = computed(() => {
|
||||
const remaining = this.userInputService.remainingVacationDaysSignal();
|
||||
return remaining.reduce((acc, day) => acc + day.numberOfDays, 0);
|
||||
});
|
||||
protected readonly trace = this.userInputService.planningTraceSignal;
|
||||
protected readonly traceResolved = this.userInputService.traceResolvedSignal;
|
||||
protected readonly historyBalanceId = signal<string | null>(null);
|
||||
protected readonly historyPage = signal(0);
|
||||
protected readonly remainingDays = computed(() =>
|
||||
(this.userInputService.displayedPlanSignal()?.remainingBalances ?? []).reduce(
|
||||
(total, balance) => total + balance.quantity,
|
||||
0,
|
||||
),
|
||||
);
|
||||
protected readonly hasAtRiskDays = computed(() =>
|
||||
this.userInputService
|
||||
.displayedPlanSignal()
|
||||
?.remainingBalances.some((balance) => balance.classification !== 'deferred'),
|
||||
);
|
||||
|
||||
protected remainingDaysDetails = computed(() => {
|
||||
const remaining = this.userInputService.remainingVacationDaysSignal();
|
||||
return remaining
|
||||
.filter((day) => day.numberOfDays > 0)
|
||||
.map((day) => {
|
||||
const typeName = this.translationService.getDayTypeLabel(day.type);
|
||||
const expiryDate = day.expiryDate.toLocaleDateString(
|
||||
this.translationService.locale(),
|
||||
{
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
year: 'numeric',
|
||||
},
|
||||
);
|
||||
const expiresLabel = this.tr().userInput.expires;
|
||||
const classification = day.classification
|
||||
? this.getClassificationLabel(day.classification)
|
||||
: '';
|
||||
const reason = day.classification ? this.getReasonLabel(day.classification) : '';
|
||||
const explanation = classification ? `${classification}: ${reason}; ` : '';
|
||||
return `${day.numberOfDays} ${typeName} (${explanation}${expiresLabel} ${expiryDate})`;
|
||||
const plan = this.userInputService.displayedPlanSignal();
|
||||
if (!plan) return [];
|
||||
const incomplete =
|
||||
this.userInputService.planningOutcomeSignal()?.kind === 'PlanningIncomplete';
|
||||
const copy = this.tr().userInput;
|
||||
return plan.remainingBalances.map((balance) => {
|
||||
const code =
|
||||
incomplete && ['preserved', 'not-established'].includes(balance.reason.code)
|
||||
? 'calculation-incomplete'
|
||||
: balance.reason.code;
|
||||
return {
|
||||
id: balance.id,
|
||||
title: `${balance.quantity} ${balance.quantity > 1 ? copy.daysSuffix : copy.daySuffix} ${this.translationService.getDayTypeLabel(balance.type)}`,
|
||||
reason: this.translationService.getRemainingBalanceReason(
|
||||
balance,
|
||||
plan,
|
||||
incomplete,
|
||||
),
|
||||
validity: copy.remainingValidity
|
||||
.replace(
|
||||
'{available}',
|
||||
this.translationService.formatPlanningDate(balance.availableFrom),
|
||||
)
|
||||
.replace(
|
||||
'{expiry}',
|
||||
this.translationService.formatPlanningDate(balance.expiryDate),
|
||||
),
|
||||
horizon: copy.remainingHorizon
|
||||
.replace(
|
||||
'{start}',
|
||||
this.translationService.formatPlanningDate(plan.horizon.start),
|
||||
)
|
||||
.replace(
|
||||
'{end}',
|
||||
this.translationService.formatPlanningDate(
|
||||
addPlanningDays(plan.horizon.end, -1),
|
||||
),
|
||||
),
|
||||
earnedFrom: balance.sourceRuleId
|
||||
? copy.remainingEarnedFrom.replace(
|
||||
'{rule}',
|
||||
this.ruleName(balance.sourceRuleId),
|
||||
)
|
||||
: '',
|
||||
suggestion: copy.remainingSuggestions[code],
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
private getClassificationLabel(classification: NonNullable<VacDay['classification']>): string {
|
||||
const labels = this.tr().userInput.remainingClassification;
|
||||
if (classification === 'unavoidable-expiry') return labels.unavoidableExpiry;
|
||||
if (classification === 'at-risk') return labels.atRisk;
|
||||
return labels.deferred;
|
||||
protected readonly remainingHistory = computed(() => {
|
||||
const id = this.historyBalanceId();
|
||||
if (!id) return [];
|
||||
return (
|
||||
this.trace()?.phases.flatMap((phase) =>
|
||||
phase.decisions.flatMap((decision) =>
|
||||
decision.candidates
|
||||
.filter((candidate) => candidate.placement?.balanceId === id)
|
||||
.map((candidate) => ({ candidate, phase: phase.name })),
|
||||
),
|
||||
) ?? []
|
||||
);
|
||||
});
|
||||
protected readonly historyPageCount = computed(() =>
|
||||
Math.ceil(this.remainingHistory().length / 20),
|
||||
);
|
||||
protected readonly visibleHistory = computed(() =>
|
||||
this.remainingHistory()
|
||||
.slice(this.historyPage() * 20, (this.historyPage() + 1) * 20)
|
||||
.map(({ candidate, phase }) => ({
|
||||
date: (candidate.dates ?? (candidate.date ? [candidate.date] : []))
|
||||
.map((date) => this.translationService.formatPlanningDate(date))
|
||||
.join(', '),
|
||||
phase: this.tr().planning.explanation.stages[phase] ?? this.criterionLabel(phase),
|
||||
status: this.tr().planning.traceStatuses[candidate.status],
|
||||
reason: candidate.reason
|
||||
? (this.tr().userInput.remainingCandidateReasons[candidate.reason.code] ??
|
||||
this.tr().planning.explanation.unavailable[candidate.reason.code] ??
|
||||
this.tr().userInput.remainingCandidateReasons['unknown'])
|
||||
: '',
|
||||
criteria: (candidate.technicalComparison ?? []).flatMap((value) => {
|
||||
const label = this.criterionLabel(value.name);
|
||||
return label
|
||||
? [
|
||||
{
|
||||
text: `${label} : ${value.before} → ${value.after}`,
|
||||
decisive: value.name === candidate.firstDecisiveComparator,
|
||||
},
|
||||
]
|
||||
: [];
|
||||
}),
|
||||
})),
|
||||
);
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
this.userInputService.planningOutcomeSignal();
|
||||
this.historyBalanceId.set(null);
|
||||
this.historyPage.set(0);
|
||||
});
|
||||
}
|
||||
|
||||
private getReasonLabel(classification: NonNullable<VacDay['classification']>): string {
|
||||
const labels = this.tr().userInput.remainingReason;
|
||||
if (classification === 'unavoidable-expiry') return labels.unavoidableExpiry;
|
||||
if (classification === 'at-risk') return labels.atRisk;
|
||||
return labels.deferred;
|
||||
private ruleName(id: string): string {
|
||||
return (
|
||||
this.userInputService.planningSnapshotSignal()?.rules.find((rule) => rule.id === id)
|
||||
?.name ?? id
|
||||
);
|
||||
}
|
||||
|
||||
private criterionLabel(name: string): string | undefined {
|
||||
const id = name.replace(/^protected:/, '');
|
||||
const key =
|
||||
id === 'obligations'
|
||||
? 'obligation-validity'
|
||||
: id.startsWith('preference:')
|
||||
? 'preference'
|
||||
: id;
|
||||
return this.tr().planning.explanation.objectives[key]?.label.replace(
|
||||
'{rule}',
|
||||
this.ruleName(id.slice('preference:'.length)),
|
||||
);
|
||||
}
|
||||
|
||||
protected toggleRemainingHistory(id: string, event: Event): void {
|
||||
const open = (event.currentTarget as HTMLDetailsElement).open;
|
||||
if (open && id !== this.historyBalanceId()) {
|
||||
this.historyPage.set(0);
|
||||
this.historyBalanceId.set(id);
|
||||
} else if (!open && id === this.historyBalanceId()) this.historyBalanceId.set(null);
|
||||
}
|
||||
|
||||
protected hasRemainingDays = computed(() => this.remainingDays() > 0);
|
||||
|
||||
@@ -5044,7 +5044,53 @@ function qualityMetrics(
|
||||
};
|
||||
}
|
||||
|
||||
function remainingBalances(state: State, context: SearchContext): RemainingBalance[] {
|
||||
function nonPlacementReason(
|
||||
balance: NormalizedBalance,
|
||||
state: State,
|
||||
context: SearchContext,
|
||||
completed: boolean,
|
||||
): PlanningReason {
|
||||
if (balance.expiryDate < context.horizon.start)
|
||||
return reason('unavoidable-expiry', 'This balance expired before the planning horizon.');
|
||||
if (balance.availableFrom >= context.horizon.end)
|
||||
return reason(
|
||||
'available-after-horizon',
|
||||
'This balance becomes available after the last planning date.',
|
||||
);
|
||||
const dates = context.workingDays.filter(
|
||||
(date) => date >= balance.availableFrom && date <= balance.expiryDate,
|
||||
);
|
||||
if (!dates.length)
|
||||
return reason(
|
||||
'no-working-date',
|
||||
'There is no working date within both the horizon and this balance’s validity period.',
|
||||
);
|
||||
if (dates.every((date) => context.declaredDates.has(date) || state.placements.has(date)))
|
||||
return reason(
|
||||
'all-dates-occupied',
|
||||
'Every working date within this balance’s validity period is already occupied in the displayed plan.',
|
||||
);
|
||||
if (!completed)
|
||||
return reason(
|
||||
'calculation-incomplete',
|
||||
'The calculation stopped before completing its planning priorities.',
|
||||
);
|
||||
if (balance.expiryDate > context.horizon.end)
|
||||
return reason(
|
||||
'preserved',
|
||||
'This balance expires after the horizon; the planner retained no additional placement under its planning priorities.',
|
||||
);
|
||||
return reason(
|
||||
'not-established',
|
||||
'The calculation did not establish a precise reason for leaving this balance unspent.',
|
||||
);
|
||||
}
|
||||
|
||||
function remainingBalances(
|
||||
state: State,
|
||||
context: SearchContext,
|
||||
completed: boolean,
|
||||
): RemainingBalance[] {
|
||||
return state.balances
|
||||
.filter((balance) => balance.remaining > 0)
|
||||
.map((balance) => {
|
||||
@@ -5054,8 +5100,6 @@ function remainingBalances(state: State, context: SearchContext): RemainingBalan
|
||||
: compareDate(balance.expiryDate, context.horizon.end) <= 0
|
||||
? 'at-risk'
|
||||
: 'deferred';
|
||||
const code =
|
||||
classification === 'unavoidable-expiry' ? 'unavoidable-expiry' : classification;
|
||||
return {
|
||||
id: balance.id,
|
||||
type: balance.type,
|
||||
@@ -5063,14 +5107,7 @@ function remainingBalances(state: State, context: SearchContext): RemainingBalan
|
||||
availableFrom: balance.availableFrom,
|
||||
expiryDate: balance.expiryDate,
|
||||
classification,
|
||||
reason: reason(
|
||||
code,
|
||||
classification === 'unavoidable-expiry'
|
||||
? 'This balance expired before the planning horizon.'
|
||||
: classification === 'at-risk'
|
||||
? 'This balance expires within the planning horizon.'
|
||||
: 'This balance remains available after the planning horizon.',
|
||||
),
|
||||
reason: nonPlacementReason(balance, state, context, completed),
|
||||
earned: balance.earned,
|
||||
sourceRuleId: balance.sourceRuleId,
|
||||
};
|
||||
@@ -5442,7 +5479,7 @@ function makePlan(
|
||||
ruleIds: [...placement.ruleIds].sort(),
|
||||
supporting: placement.supporting,
|
||||
}));
|
||||
const remaining = remainingBalances(state, context);
|
||||
const remaining = remainingBalances(state, context, stages.includes('dates'));
|
||||
const windowContributions = timeWindowContributions(state, context);
|
||||
const patternContributions = ifThenContributions(state, context);
|
||||
const plan: PlanOutcome = {
|
||||
|
||||
@@ -1672,12 +1672,12 @@ describe('planLeave', () => {
|
||||
});
|
||||
|
||||
it.each([
|
||||
['unavoidable-expiry', '2024-05-31', '2024-01-01'],
|
||||
['at-risk', '2024-06-10', '2024-06-10'],
|
||||
['deferred', '2024-07-01', '2024-06-11'],
|
||||
['unavoidable-expiry', '2024-05-31', '2024-01-01', 'unavoidable-expiry'],
|
||||
['at-risk', '2024-06-10', '2024-06-10', 'available-after-horizon'],
|
||||
['deferred', '2024-07-01', '2024-06-11', 'available-after-horizon'],
|
||||
] as const)(
|
||||
'classifies a remaining balance as %s',
|
||||
async (classification, expiryDate, availableFrom) => {
|
||||
async (classification, expiryDate, availableFrom, reasonCode) => {
|
||||
const result = isPlan(
|
||||
await runInNonBrowser({
|
||||
horizon: { start: '2024-06-01', end: '2024-06-10' },
|
||||
@@ -1694,7 +1694,36 @@ describe('planLeave', () => {
|
||||
}),
|
||||
);
|
||||
expect(result.remainingBalances[0].classification).toBe(classification);
|
||||
expect(result.remainingBalances[0].reason.code).toBe(classification);
|
||||
expect(result.remainingBalances[0].reason.code).toBe(reasonCode);
|
||||
},
|
||||
);
|
||||
|
||||
it.each([
|
||||
['no-working-date', '2024-06-08', '2024-06-10', []],
|
||||
['all-dates-occupied', '2024-06-03', '2024-06-04', [{ date: '2024-06-03', type: 'cp' }]],
|
||||
['preserved', '2024-06-04', '2024-06-13', [{ date: '2024-06-07', type: 'cp' }]],
|
||||
] as const)(
|
||||
'explains a remaining deferred balance as %s without treating it as unavailable',
|
||||
async (code, start, end, declaredDays) => {
|
||||
const result = isPlan(
|
||||
await runInNonBrowser({
|
||||
horizon: { start, end },
|
||||
balances: [
|
||||
{ ...balance('other', 'other', 1, '2025-05-10'), availableFrom: start },
|
||||
],
|
||||
declaredDays,
|
||||
rules: [],
|
||||
}),
|
||||
);
|
||||
expect(result.placements).toEqual([]);
|
||||
expect(result.remainingBalances).toMatchObject([
|
||||
{
|
||||
id: 'other',
|
||||
quantity: 1,
|
||||
classification: 'deferred',
|
||||
reason: { code },
|
||||
},
|
||||
]);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
import { Injectable, inject, Injector, computed } from '@angular/core';
|
||||
import { storedSignal } from '../shared/utils/stored-signal';
|
||||
import type { PlanOutcome, RemainingBalance } from './leave-planner.service';
|
||||
import { addPlanningDays } from './planning-date';
|
||||
|
||||
export interface AppTranslations {
|
||||
locale: string;
|
||||
@@ -27,7 +29,14 @@ export interface AppTranslations {
|
||||
durationEstimate: string;
|
||||
durationUnits: { seconds: string; minutes: string };
|
||||
remainingDaysWarning: string;
|
||||
remainingDaysManualPlace: string;
|
||||
remainingWhy: string;
|
||||
remainingValidity: string;
|
||||
remainingHorizon: string;
|
||||
remainingEarnedFrom: string;
|
||||
remainingHistoryHelp: string;
|
||||
remainingNoEvaluations: string;
|
||||
remainingSuggestions: Record<string, string>;
|
||||
remainingCandidateReasons: Record<string, string>;
|
||||
deleteEntry: string;
|
||||
chooseDate: string;
|
||||
availableDate: string;
|
||||
@@ -36,16 +45,6 @@ export interface AppTranslations {
|
||||
daySuffix: string;
|
||||
daysSuffix: string;
|
||||
expires: string;
|
||||
remainingClassification: {
|
||||
unavoidableExpiry: string;
|
||||
atRisk: string;
|
||||
deferred: string;
|
||||
};
|
||||
remainingReason: {
|
||||
unavoidableExpiry: string;
|
||||
atRisk: string;
|
||||
deferred: string;
|
||||
};
|
||||
};
|
||||
dayTypes: {
|
||||
weekend: string;
|
||||
@@ -389,6 +388,33 @@ export class TranslationService {
|
||||
return langCode.toUpperCase();
|
||||
}
|
||||
|
||||
public formatPlanningDate(date: string): string {
|
||||
return new Date(`${date}T00:00:00Z`).toLocaleDateString(this.locale(), {
|
||||
timeZone: 'UTC',
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
});
|
||||
}
|
||||
|
||||
public getRemainingBalanceReason(
|
||||
balance: RemainingBalance,
|
||||
plan: PlanOutcome | undefined,
|
||||
incomplete = false,
|
||||
): string {
|
||||
const reasons = this.tr().planning.details.remainingReasons;
|
||||
if (!plan) return reasons['not-established'];
|
||||
const code =
|
||||
incomplete && ['preserved', 'not-established'].includes(balance.reason.code)
|
||||
? 'calculation-incomplete'
|
||||
: balance.reason.code;
|
||||
return (reasons[code] ?? reasons['not-established'])
|
||||
.replace('{available}', this.formatPlanningDate(balance.availableFrom))
|
||||
.replace('{expiry}', this.formatPlanningDate(balance.expiryDate))
|
||||
.replace('{start}', this.formatPlanningDate(plan.horizon.start))
|
||||
.replace('{end}', this.formatPlanningDate(addPlanningDays(plan.horizon.end, -1)));
|
||||
}
|
||||
|
||||
public getDayTypeLabel(type: string): string {
|
||||
const tr = this.tr();
|
||||
if (!tr || !tr.dayTypes) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Injectable, signal } from '@angular/core';
|
||||
import { computed, Injectable, signal } from '@angular/core';
|
||||
import { SelectableDayType, VacDay } from './calendar-service';
|
||||
import dayjs from 'dayjs';
|
||||
import {
|
||||
@@ -6,7 +6,12 @@ import {
|
||||
isWorkingPlanningDate,
|
||||
parseDeclaredDays,
|
||||
} from './declared-non-working-days';
|
||||
import type { LeaveType } from './leave-planner.service';
|
||||
import type {
|
||||
LeaveType,
|
||||
PlanningOutcome,
|
||||
PlanningSnapshot,
|
||||
PlanningTrace,
|
||||
} from './leave-planner.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -162,6 +167,18 @@ export class UserInputService {
|
||||
this.getSavedValues() ?? this.getInitialValues(),
|
||||
);
|
||||
readonly remainingVacationDaysSignal = signal<VacDay[]>([]);
|
||||
readonly planningOutcomeSignal = signal<PlanningOutcome | null>(null);
|
||||
readonly planningSnapshotSignal = signal<PlanningSnapshot | null>(null);
|
||||
readonly planningTraceSignal = signal<PlanningTrace | null>(null);
|
||||
readonly traceResolvedSignal = signal(false);
|
||||
readonly displayedPlanSignal = computed(() => {
|
||||
const outcome = this.planningOutcomeSignal();
|
||||
return outcome?.kind === 'Plan'
|
||||
? outcome
|
||||
: outcome?.kind === 'PlanningIncomplete'
|
||||
? outcome.incumbent
|
||||
: undefined;
|
||||
});
|
||||
readonly computeTriggerSignal = signal(0);
|
||||
readonly computationRequestedAtMs = signal<number | null>(null);
|
||||
|
||||
|
||||
+26
-13
@@ -25,8 +25,7 @@
|
||||
"seconds": "s",
|
||||
"minutes": "min"
|
||||
},
|
||||
"remainingDaysWarning": "{count} nicht platziert:",
|
||||
"remainingDaysManualPlace": "Bitte manuell platzieren.",
|
||||
"remainingDaysWarning": "{count} verbleibende Urlaubstage:",
|
||||
"deleteEntry": "Eintrag löschen",
|
||||
"chooseDate": "Gültig bis",
|
||||
"availableDate": "Verfügbar ab",
|
||||
@@ -35,15 +34,25 @@
|
||||
"daySuffix": "Tag",
|
||||
"daysSuffix": "Tage",
|
||||
"expires": "abl.",
|
||||
"remainingClassification": {
|
||||
"unavoidableExpiry": "Unvermeidbarer Ablauf",
|
||||
"atRisk": "Gefährdet",
|
||||
"deferred": "Aufgeschoben"
|
||||
"remainingWhy": "Warum?",
|
||||
"remainingValidity": "Nutzbar vom {available} bis zum {expiry}.",
|
||||
"remainingHorizon": "Berechneter Plan vom {start} bis zum {end}.",
|
||||
"remainingEarnedFrom": "Durch die Regel „{rule}“ erworbener Urlaub.",
|
||||
"remainingHistoryHelp": "Diese Daten wurden während der Berechnung tatsächlich geprüft. Die Werte vergleichen jeden Versuch mit seinem Ausgangszustand; der endgültige Plan kann abweichen.",
|
||||
"remainingNoEvaluations": "Für dieses Urlaubskonto wurde kein zuordenbarer Versuch aufgezeichnet. Die Ablaufkategorie allein erklärt nicht, warum es ungenutzt bleibt.",
|
||||
"remainingSuggestions": {
|
||||
"available-after-horizon": "Sie können den Planungszeitraum über das Verfügbarkeitsdatum hinaus verlängern und neu berechnen.",
|
||||
"no-working-date": "Prüfen Sie den Planungszeitraum und die Gültigkeitsdaten dieses Urlaubskontos.",
|
||||
"all-dates-occupied": "Sie können den Zeitraum bei entsprechender Gültigkeit verlängern oder Ihre bereits gebuchten Tage und Regeln anpassen und neu berechnen.",
|
||||
"preserved": "Keine Aktion nötig. Um die Nutzung anzufordern, fügen Sie eine Regel innerhalb der Gültigkeit hinzu und berechnen Sie neu.",
|
||||
"calculation-incomplete": "Starten Sie die Berechnung erneut, wenn Sie die Planung abschließen möchten."
|
||||
},
|
||||
"remainingReason": {
|
||||
"unavoidableExpiry": "vor dem Planungshorizont abgelaufen",
|
||||
"atRisk": "läuft im Planungshorizont ab",
|
||||
"deferred": "nach dem Planungshorizont verfügbar"
|
||||
"remainingCandidateReasons": {
|
||||
"quality-no-improvement": "Diese Möglichkeit wurde in dieser Berechnungsphase nicht ausgewählt.",
|
||||
"quality-protected-objective": "Diese Möglichkeit würde eine zu erhaltende Priorität verschlechtern.",
|
||||
"quality-outperformed": "Die Berechnung fand später eine besser bewertete Möglichkeit.",
|
||||
"earned-entitlement-order": "Diese Möglichkeit hält die Verfügbarkeitsdaten des erworbenen Urlaubs nicht ein.",
|
||||
"unknown": "Der genaue Grund für diesen Versuch ist nicht verfügbar."
|
||||
}
|
||||
},
|
||||
"dayTypes": {
|
||||
@@ -343,9 +352,13 @@
|
||||
"auditHelp": "Ursprüngliche Werte, Kennungen und Beiträge aus dieser Berechnung.",
|
||||
"supporting": "Dieser Tag nutzt Urlaub, der über den Planungszeitraum hinaus aufgespart werden könnte, um Ihre Auszeiten zu verbessern.",
|
||||
"remainingReasons": {
|
||||
"at-risk": "Diese ungenutzten Tage verfallen im Planungszeitraum.",
|
||||
"deferred": "Diese ungenutzten Tage können über den Planungszeitraum hinaus aufgespart werden.",
|
||||
"unavoidable-expiry": "Diese Tage sind vor Beginn des Planungszeitraums verfallen."
|
||||
"unavoidable-expiry": "Am {expiry} abgelaufen, vor dem Planungsbeginn am {start}. In diesem Zeitraum nicht nutzbar.",
|
||||
"available-after-horizon": "Erst ab dem {available} verfügbar, nach dem letzten Planungstag am {end}.",
|
||||
"no-working-date": "Kein Arbeitstag liegt sowohl im Planungszeitraum als auch zwischen Verfügbarkeits- und Ablaufdatum.",
|
||||
"all-dates-occupied": "Alle Arbeitstage, an denen dieses Urlaubskonto nutzbar ist, sind bereits durch geplanten Urlaub oder gebuchte Tage belegt.",
|
||||
"preserved": "Für später aufbewahrt: Das Urlaubskonto läuft nach dem Planungszeitraum ab und die Berechnung hat gemäß Ihren Prioritäten keine zusätzliche Platzierung ausgewählt.",
|
||||
"calculation-incomplete": "Die Berechnung wurde vor Abschluss der Planung unterbrochen. Die Nichtnutzung ist keine endgültige Entscheidung.",
|
||||
"not-established": "Diese Berechnung hat keinen genauen Grund für die Nichtnutzung ermittelt."
|
||||
}
|
||||
},
|
||||
"comparison": {
|
||||
|
||||
+26
-13
@@ -25,8 +25,7 @@
|
||||
"seconds": "s",
|
||||
"minutes": "min"
|
||||
},
|
||||
"remainingDaysWarning": "{count} vacation day{plural} not placed:",
|
||||
"remainingDaysManualPlace": "Please place them manually.",
|
||||
"remainingDaysWarning": "{count} leave day{plural} remaining:",
|
||||
"deleteEntry": "Delete entry",
|
||||
"chooseDate": "Expires on",
|
||||
"availableDate": "Available from",
|
||||
@@ -35,15 +34,25 @@
|
||||
"daySuffix": "day",
|
||||
"daysSuffix": "days",
|
||||
"expires": "exp.",
|
||||
"remainingClassification": {
|
||||
"unavoidableExpiry": "Unavoidable expiry",
|
||||
"atRisk": "At risk",
|
||||
"deferred": "Deferred"
|
||||
"remainingWhy": "See why",
|
||||
"remainingValidity": "Usable from {available} through {expiry}.",
|
||||
"remainingHorizon": "Calculated plan from {start} through {end}.",
|
||||
"remainingEarnedFrom": "Leave earned through the rule “{rule}”.",
|
||||
"remainingHistoryHelp": "These dates were actually examined during the calculation. The values compare each attempt with its starting state; the final plan may differ.",
|
||||
"remainingNoEvaluations": "No attempt attributable to this balance was recorded. Its expiry category alone does not explain why it remains unused.",
|
||||
"remainingSuggestions": {
|
||||
"available-after-horizon": "You can extend the planning period beyond its availability date, then recalculate.",
|
||||
"no-working-date": "Check the planning period and this balance’s validity dates.",
|
||||
"all-dates-occupied": "You can extend the period if validity allows, or adjust your already booked days and rules, then recalculate.",
|
||||
"preserved": "No action needed. To request its use, add a rule within its validity period, then recalculate.",
|
||||
"calculation-incomplete": "Run the calculation again if you want it to finish planning."
|
||||
},
|
||||
"remainingReason": {
|
||||
"unavoidableExpiry": "expired before the horizon",
|
||||
"atRisk": "expires within the horizon",
|
||||
"deferred": "available after the horizon"
|
||||
"remainingCandidateReasons": {
|
||||
"quality-no-improvement": "This option was not retained at this stage of the calculation.",
|
||||
"quality-protected-objective": "This option would worsen a priority that must be preserved.",
|
||||
"quality-outperformed": "The calculation later found a better-ranked option.",
|
||||
"earned-entitlement-order": "This option does not respect the availability dates of earned leave.",
|
||||
"unknown": "The precise reason for this attempt is unavailable."
|
||||
}
|
||||
},
|
||||
"dayTypes": {
|
||||
@@ -343,9 +352,13 @@
|
||||
"auditHelp": "Original values, identifiers and contributions from this calculation.",
|
||||
"supporting": "This day uses leave that could be saved beyond the planning period to improve your breaks.",
|
||||
"remainingReasons": {
|
||||
"at-risk": "These unused days expire during the planning period.",
|
||||
"deferred": "These unused days can be saved beyond the planning period.",
|
||||
"unavoidable-expiry": "These days expired before the planning period began."
|
||||
"unavoidable-expiry": "Expired on {expiry}, before the plan starts on {start}. It cannot be placed in this period.",
|
||||
"available-after-horizon": "Available only from {available}, after the last planning date, {end}.",
|
||||
"no-working-date": "No working day falls within both the planning period and its availability and expiry dates.",
|
||||
"all-dates-occupied": "All working days on which this balance can be used are already occupied by planned leave or already booked days.",
|
||||
"preserved": "Kept for later: it expires after the planning period and the calculation retained no additional placement under your priorities.",
|
||||
"calculation-incomplete": "The calculation was interrupted before planning finished. Leaving it unused is not a final decision.",
|
||||
"not-established": "This calculation did not establish a precise reason for leaving it unused."
|
||||
}
|
||||
},
|
||||
"comparison": {
|
||||
|
||||
+26
-13
@@ -25,8 +25,7 @@
|
||||
"seconds": "s",
|
||||
"minutes": "min"
|
||||
},
|
||||
"remainingDaysWarning": "{count} día{plural} de vacaciones no colocado{plural}:",
|
||||
"remainingDaysManualPlace": "Por favor, colóquelos manualmente.",
|
||||
"remainingDaysWarning": "{count} día{plural} de permiso restante{plural}:",
|
||||
"deleteEntry": "Eliminar entrada",
|
||||
"chooseDate": "Caduca el",
|
||||
"availableDate": "Disponible desde",
|
||||
@@ -35,15 +34,25 @@
|
||||
"daySuffix": "día",
|
||||
"daysSuffix": "días",
|
||||
"expires": "exp.",
|
||||
"remainingClassification": {
|
||||
"unavoidableExpiry": "Vencimiento inevitable",
|
||||
"atRisk": "En riesgo",
|
||||
"deferred": "Aplazado"
|
||||
"remainingWhy": "Ver por qué",
|
||||
"remainingValidity": "Utilizable del {available} al {expiry}.",
|
||||
"remainingHorizon": "Plan calculado del {start} al {end}.",
|
||||
"remainingEarnedFrom": "Permiso obtenido gracias a la regla «{rule}».",
|
||||
"remainingHistoryHelp": "Estas fechas se examinaron realmente durante el cálculo. Los valores comparan cada intento con su estado inicial; el plan final puede ser diferente.",
|
||||
"remainingNoEvaluations": "No se registró ningún intento atribuible a este saldo. Su categoría de caducidad por sí sola no explica por qué sigue sin utilizarse.",
|
||||
"remainingSuggestions": {
|
||||
"available-after-horizon": "Puedes ampliar el período planificado más allá de su fecha de disponibilidad y volver a calcular.",
|
||||
"no-working-date": "Comprueba el período planificado y las fechas de validez de este saldo.",
|
||||
"all-dates-occupied": "Puedes ampliar el período si la validez lo permite, o ajustar los días ya reservados y tus reglas, y volver a calcular.",
|
||||
"preserved": "No es necesario hacer nada. Para solicitar su uso, añade una regla dentro de su período de validez y vuelve a calcular.",
|
||||
"calculation-incomplete": "Repite el cálculo si quieres que termine la planificación."
|
||||
},
|
||||
"remainingReason": {
|
||||
"unavoidableExpiry": "caducó antes del horizonte",
|
||||
"atRisk": "caduca dentro del horizonte",
|
||||
"deferred": "disponible después del horizonte"
|
||||
"remainingCandidateReasons": {
|
||||
"quality-no-improvement": "Esta opción no se seleccionó en esta fase del cálculo.",
|
||||
"quality-protected-objective": "Esta opción empeoraría una prioridad que debe conservarse.",
|
||||
"quality-outperformed": "El cálculo encontró después una opción mejor clasificada.",
|
||||
"earned-entitlement-order": "Esta opción no respeta las fechas de disponibilidad de los permisos obtenidos.",
|
||||
"unknown": "El motivo preciso de este intento no está disponible."
|
||||
}
|
||||
},
|
||||
"dayTypes": {
|
||||
@@ -343,9 +352,13 @@
|
||||
"auditHelp": "Valores, identificadores y contribuciones originales de este cálculo.",
|
||||
"supporting": "Este día usa permisos que podrían guardarse más allá del período planificado para mejorar tus descansos.",
|
||||
"remainingReasons": {
|
||||
"at-risk": "Estos días sin usar vencen durante el período planificado.",
|
||||
"deferred": "Estos días sin usar pueden guardarse más allá del período planificado.",
|
||||
"unavoidable-expiry": "Estos días vencieron antes del inicio del período planificado."
|
||||
"unavoidable-expiry": "Caducó el {expiry}, antes del inicio del plan el {start}. No puede colocarse en este período.",
|
||||
"available-after-horizon": "Disponible solo a partir del {available}, después de la última fecha del plan, el {end}.",
|
||||
"no-working-date": "Ningún día laborable está dentro del período planificado y entre sus fechas de disponibilidad y caducidad.",
|
||||
"all-dates-occupied": "Todos los días laborables en los que puede utilizarse este saldo ya están ocupados por permisos planificados o días ya reservados.",
|
||||
"preserved": "Guardado para más adelante: caduca después del período planificado y el cálculo no seleccionó ninguna colocación adicional según tus prioridades.",
|
||||
"calculation-incomplete": "El cálculo se interrumpió antes de terminar la planificación. Su falta de uso no es una decisión definitiva.",
|
||||
"not-established": "Este cálculo no determinó un motivo preciso para dejarlo sin utilizar."
|
||||
}
|
||||
},
|
||||
"comparison": {
|
||||
|
||||
+26
-13
@@ -25,8 +25,7 @@
|
||||
"seconds": "s",
|
||||
"minutes": "min"
|
||||
},
|
||||
"remainingDaysWarning": "{count} jour{plural} de vacances non placé{plural}:",
|
||||
"remainingDaysManualPlace": "Veuillez les placer manuellement.",
|
||||
"remainingDaysWarning": "{count} jour{plural} de congé restant{plural} :",
|
||||
"deleteEntry": "Supprimer l’entrée",
|
||||
"chooseDate": "Expire le",
|
||||
"availableDate": "Disponible à partir du",
|
||||
@@ -35,15 +34,25 @@
|
||||
"daySuffix": "jour",
|
||||
"daysSuffix": "jours",
|
||||
"expires": "exp.",
|
||||
"remainingClassification": {
|
||||
"unavoidableExpiry": "Expiration inévitable",
|
||||
"atRisk": "À risque",
|
||||
"deferred": "Différé"
|
||||
"remainingWhy": "Voir pourquoi",
|
||||
"remainingValidity": "Utilisable du {available} au {expiry}.",
|
||||
"remainingHorizon": "Planning calculé du {start} au {end}.",
|
||||
"remainingEarnedFrom": "Congés gagnés grâce à la règle « {rule} ».",
|
||||
"remainingHistoryHelp": "Ces dates ont réellement été examinées pendant le calcul. Les valeurs comparent chaque essai à son état de départ ; le planning final peut être différent.",
|
||||
"remainingNoEvaluations": "Aucun essai attribuable à ce solde n’a été enregistré. La catégorie d’expiration ne suffit pas à expliquer pourquoi il reste inutilisé.",
|
||||
"remainingSuggestions": {
|
||||
"available-after-horizon": "Vous pouvez prolonger la période planifiée au-delà de sa date de disponibilité, puis recalculer.",
|
||||
"no-working-date": "Vérifiez la période planifiée et les dates de validité de ce solde.",
|
||||
"all-dates-occupied": "Vous pouvez élargir la période si la validité le permet, ou ajuster vos jours déjà posés et vos règles, puis recalculer.",
|
||||
"preserved": "Aucune action nécessaire. Pour demander son utilisation, ajoutez une règle sur une période où il est utilisable, puis recalculez.",
|
||||
"calculation-incomplete": "Relancez le calcul si vous souhaitez qu’il termine la planification."
|
||||
},
|
||||
"remainingReason": {
|
||||
"unavoidableExpiry": "expiré avant l’horizon",
|
||||
"atRisk": "expire pendant l’horizon",
|
||||
"deferred": "disponible après l’horizon"
|
||||
"remainingCandidateReasons": {
|
||||
"quality-no-improvement": "Cette possibilité n’a pas été retenue à cette étape du calcul.",
|
||||
"quality-protected-objective": "Cette possibilité dégraderait une priorité à préserver.",
|
||||
"quality-outperformed": "Le calcul a ensuite trouvé une possibilité mieux classée.",
|
||||
"earned-entitlement-order": "Cette possibilité ne respecte pas les dates de disponibilité des congés gagnés.",
|
||||
"unknown": "La raison précise de cet essai n’est pas disponible."
|
||||
}
|
||||
},
|
||||
"dayTypes": {
|
||||
@@ -343,9 +352,13 @@
|
||||
"auditHelp": "Valeurs, identifiants et contributions d’origine de ce calcul.",
|
||||
"supporting": "Ce jour utilise des congés qui pourraient être conservés au-delà de la période planifiée pour améliorer vos pauses.",
|
||||
"remainingReasons": {
|
||||
"at-risk": "Ces jours non utilisés expirent pendant la période planifiée.",
|
||||
"deferred": "Ces jours non utilisés peuvent être conservés au-delà de la période planifiée.",
|
||||
"unavoidable-expiry": "Ces jours ont expiré avant le début de la période planifiée."
|
||||
"unavoidable-expiry": "Expiré le {expiry}, avant le début du planning le {start}. Il ne peut pas être posé dans cette période.",
|
||||
"available-after-horizon": "Disponible seulement à partir du {available}, après la dernière date du planning, le {end}.",
|
||||
"no-working-date": "Aucun jour ouvré ne se trouve à la fois dans la période planifiée et entre ses dates de disponibilité et d’expiration.",
|
||||
"all-dates-occupied": "Tous les jours ouvrés où ce solde est utilisable sont déjà occupés par des congés calculés ou des jours déjà posés.",
|
||||
"preserved": "Conservé pour plus tard : il expire après la période planifiée et le calcul n’a pas retenu de pose supplémentaire selon vos priorités.",
|
||||
"calculation-incomplete": "Le calcul a été interrompu avant de terminer la planification. Sa non-utilisation n’est pas une décision définitive.",
|
||||
"not-established": "La raison précise de sa non-utilisation n’a pas été établie par ce calcul."
|
||||
}
|
||||
},
|
||||
"comparison": {
|
||||
|
||||
Reference in new issue
Block a user