Complete NextSteps roadmap: planning engine UI, calendar cluster, flexible wishes
Works through every numbered item in NextSteps260913.md section 3, plus the three known verification issues in section 4.1. Surface what the backend already computed: - 3.1 render surplus_advice in PlanResults, mirroring the shortfall remedies - 3.2 surface VacationBalance.is_assumed so assumed statutory years are visible - 3.3 age-4 expiry given the proposed plan, via a new Age4Projection reusing the existing _age4_projections arithmetic (Dashboard stat verified, not rebuilt) Calendar cluster (one pass over the holiday data): - new GET /api/calendar/days exposing roda dagar, klamdagar and day overrides, paginated four years at a time - 3.4 shade roda dagar/klamdagar, with R/K badges so colour is not the only signal - 3.6 click-to-override behind an explicit mode toggle, leaving drag multi-select intact - 3.7 click month/year to advance - 3.8 per-year red-days list in Settings, statutory days plus overrides i18n: - 3.5 five backend-generated Swedish surfaces converted to message_key + data, following the tips_service pattern; old string fields replaced, not kept Flexible wishes (3.9): - PLANNING_ENGINE_SPEC section 10: window_mode, candidate search, cost function, deterministic tie-break, two-pass ordering, test matrix rows 15-24 - backend: entity, migration 006, _FULL_SCHEMA sync, repository, allocator - frontend: season-preset toggle in WishEditor, unplaced outcome rendering Fixes (4.1): - pin typecheck to the local tsc rather than npx resolving a newer TypeScript - ignore generated coverage/ and dist/ in the ESLint flat config - fix the flaky usePlanApply test properly, with waitFor rather than a retry Tests: backend 361 -> 404, frontend 540 -> 704. Coverage 89.47% -> 96.52% lines. Not yet verified in a browser. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXMhc9nT6sNz1SL4j8dznL
This commit is contained in:
@@ -144,6 +144,12 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.parental-leave-breakdown__reserved-note {
|
||||
margin: 0;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--c-text-muted);
|
||||
}
|
||||
|
||||
.parental-leave-breakdown__provenance {
|
||||
padding-top: var(--sp-3);
|
||||
border-top: 1px solid var(--c-border);
|
||||
@@ -305,6 +311,104 @@ button.ghost:hover:not(:disabled) {
|
||||
border-left: 4px solid var(--c-danger);
|
||||
}
|
||||
|
||||
.settings-page__help {
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--c-text-muted);
|
||||
margin: 0 0 var(--sp-4) 0;
|
||||
max-width: 60ch;
|
||||
}
|
||||
|
||||
.settings-page__field {
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
|
||||
.settings-page__checkbox-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-2);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.settings-page__partner-row {
|
||||
display: flex;
|
||||
gap: var(--sp-3);
|
||||
}
|
||||
|
||||
.settings-page__partner-input {
|
||||
flex: 1;
|
||||
padding: var(--sp-3) var(--sp-3);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
/* Vacation Days Table (multi-year) */
|
||||
.vacation-days-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 var(--sp-4) 0;
|
||||
}
|
||||
|
||||
.vacation-days-table th {
|
||||
padding: var(--sp-3) var(--sp-4);
|
||||
background-color: var(--c-bg);
|
||||
border-bottom: 2px solid var(--c-border);
|
||||
font-weight: 600;
|
||||
color: var(--c-text-muted);
|
||||
text-align: left;
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
|
||||
.vacation-days-table td {
|
||||
padding: var(--sp-3) var(--sp-4);
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
font-size: var(--fs-base);
|
||||
}
|
||||
|
||||
.vacation-days-table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.vacation-days-table__year {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.vacation-days-table__assumed-badge {
|
||||
display: inline-block;
|
||||
margin-left: var(--sp-2);
|
||||
padding: var(--sp-1) var(--sp-2);
|
||||
border-radius: 999px;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 400;
|
||||
background-color: #fef8e7;
|
||||
color: var(--c-warning);
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.vacation-days-table__input {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.vacation-days-table__save {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.vacation-days-table__empty {
|
||||
color: var(--c-text-muted);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
|
||||
/* Planning Mode Selector */
|
||||
.planning-mode-selector__option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-2);
|
||||
margin-bottom: var(--sp-2);
|
||||
}
|
||||
|
||||
.planning-mode-selector__option:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Fieldsets */
|
||||
fieldset {
|
||||
border: 1px solid var(--c-border);
|
||||
@@ -323,7 +427,6 @@ legend {
|
||||
/* Input Components */
|
||||
.vacation-days-input,
|
||||
.planning-goal-selector,
|
||||
.break-periods-input,
|
||||
.parent-profile-input,
|
||||
.child-birthday-input {
|
||||
margin-bottom: var(--sp-5);
|
||||
@@ -331,7 +434,6 @@ legend {
|
||||
|
||||
.vacation-days-input__label,
|
||||
.planning-goal-selector__label,
|
||||
.break-periods-input__label,
|
||||
.parent-profile-input__label,
|
||||
.child-birthday-input__label {
|
||||
display: block;
|
||||
@@ -343,7 +445,6 @@ legend {
|
||||
|
||||
.vacation-days-input__field,
|
||||
.planning-goal-selector__select,
|
||||
.break-periods-input__field,
|
||||
.parent-profile-input__field,
|
||||
.child-birthday-input__field {
|
||||
width: 100%;
|
||||
@@ -351,7 +452,6 @@ legend {
|
||||
}
|
||||
|
||||
.vacation-days-input__range,
|
||||
.break-periods-input__help,
|
||||
.parent-profile-input__help,
|
||||
.child-birthday-input__help {
|
||||
font-size: var(--fs-sm);
|
||||
@@ -359,6 +459,289 @@ legend {
|
||||
margin-top: var(--sp-2);
|
||||
}
|
||||
|
||||
/* Day Overrides Input */
|
||||
.day-overrides-input {
|
||||
margin-bottom: var(--sp-5);
|
||||
}
|
||||
|
||||
.day-overrides-input__empty {
|
||||
padding: var(--sp-5);
|
||||
background-color: var(--c-bg);
|
||||
border-radius: var(--radius);
|
||||
border: 1px solid var(--c-border);
|
||||
color: var(--c-text-muted);
|
||||
text-align: center;
|
||||
margin-bottom: var(--sp-5);
|
||||
}
|
||||
|
||||
.day-overrides-input__empty p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.day-overrides-input__list {
|
||||
margin-bottom: var(--sp-5);
|
||||
}
|
||||
|
||||
.day-overrides-input__items {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-3);
|
||||
}
|
||||
|
||||
.day-overrides-input__item {
|
||||
padding: var(--sp-4);
|
||||
background-color: var(--c-bg);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.day-overrides-input__item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: var(--sp-3);
|
||||
margin-bottom: var(--sp-3);
|
||||
}
|
||||
|
||||
.day-overrides-input__item-date {
|
||||
flex: 0 0 auto;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.day-overrides-input__item-date strong {
|
||||
color: var(--c-text);
|
||||
}
|
||||
|
||||
.day-overrides-input__item-status {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.day-overrides-input__status {
|
||||
display: inline-block;
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
border-radius: var(--radius);
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.day-overrides-input__status--working {
|
||||
background-color: #fef3c7;
|
||||
color: #92400e;
|
||||
}
|
||||
|
||||
.day-overrides-input__status--off {
|
||||
background-color: #dbeafe;
|
||||
color: #1e40af;
|
||||
}
|
||||
|
||||
.day-overrides-input__item-note {
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--c-text-muted);
|
||||
margin-bottom: var(--sp-3);
|
||||
}
|
||||
|
||||
.day-overrides-input__remove-button {
|
||||
width: 100%;
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
font-size: var(--fs-sm);
|
||||
background-color: var(--c-danger-weak);
|
||||
color: var(--c-danger);
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.day-overrides-input__remove-button:hover:not(:disabled) {
|
||||
background-color: var(--c-danger);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.day-overrides-input__remove-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.day-overrides-input__form {
|
||||
padding: var(--sp-4);
|
||||
background-color: var(--c-bg);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.day-overrides-input__form h3 {
|
||||
margin: 0 0 var(--sp-4) 0;
|
||||
font-size: var(--fs-lg);
|
||||
color: var(--c-text);
|
||||
}
|
||||
|
||||
.day-overrides-input__form-group {
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
|
||||
.day-overrides-input__form-group label {
|
||||
display: block;
|
||||
margin-bottom: var(--sp-2);
|
||||
font-weight: 500;
|
||||
color: var(--c-text);
|
||||
font-size: var(--fs-base);
|
||||
}
|
||||
|
||||
.day-overrides-input__form-input {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: var(--radius);
|
||||
font-size: var(--fs-base);
|
||||
}
|
||||
|
||||
.day-overrides-input__radio-group {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.day-overrides-input__radio-group legend {
|
||||
padding: 0;
|
||||
margin: 0 0 var(--sp-2) 0;
|
||||
}
|
||||
|
||||
.day-overrides-input__radio-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-2);
|
||||
margin-bottom: var(--sp-2);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.day-overrides-input__radio-label:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.day-overrides-input__radio-label input[type='radio'] {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.day-overrides-input__char-count {
|
||||
display: block;
|
||||
margin-top: var(--sp-1);
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--c-text-muted);
|
||||
}
|
||||
|
||||
.day-overrides-input__submit-button {
|
||||
width: 100%;
|
||||
padding: var(--sp-3) var(--sp-4);
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.day-overrides-input__submit-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Red Days List (§3.8 — statutory red days + workspace overrides, per year) */
|
||||
.red-days-list__pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-3);
|
||||
margin-bottom: var(--sp-4);
|
||||
}
|
||||
|
||||
.red-days-list__nav-button {
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: var(--radius);
|
||||
background-color: var(--c-surface);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.red-days-list__nav-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.red-days-list__range {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.red-days-list__year {
|
||||
margin-bottom: var(--sp-5);
|
||||
}
|
||||
|
||||
.red-days-list__year-title {
|
||||
font-size: var(--fs-lg);
|
||||
margin: 0 0 var(--sp-2) 0;
|
||||
}
|
||||
|
||||
.red-days-list__empty {
|
||||
color: var(--c-text-muted);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
|
||||
.red-days-list__items {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.red-days-list__item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--sp-3);
|
||||
padding: var(--sp-2) 0;
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
|
||||
.red-days-list__date {
|
||||
font-weight: 600;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.red-days-list__name {
|
||||
color: var(--c-text);
|
||||
}
|
||||
|
||||
.red-days-list__override-badge {
|
||||
padding: var(--sp-1) var(--sp-2);
|
||||
border-radius: 999px;
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
|
||||
.red-days-list__override-badge--working {
|
||||
background-color: var(--c-danger-weak);
|
||||
color: var(--c-danger);
|
||||
}
|
||||
|
||||
.red-days-list__override-badge--free {
|
||||
background-color: var(--c-success-weak);
|
||||
color: var(--c-success);
|
||||
}
|
||||
|
||||
.red-days-list__effective {
|
||||
margin-left: auto;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--c-text-muted);
|
||||
}
|
||||
|
||||
.red-days-list__loading,
|
||||
.red-days-list__error {
|
||||
color: var(--c-text-muted);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 640px) {
|
||||
[data-testid='metrics-list'] {
|
||||
@@ -370,7 +753,6 @@ legend {
|
||||
.form-group textarea,
|
||||
.vacation-days-input__field,
|
||||
.planning-goal-selector__select,
|
||||
.break-periods-input__field,
|
||||
.parent-profile-input__field,
|
||||
.child-birthday-input__field {
|
||||
max-width: none;
|
||||
|
||||
Reference in New Issue
Block a user