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
+679
-141
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user