61e5487078
Free days (Sat/Sun/red days, subject to DayOverride) can never be vacation, and can only be parental leave when the workspace opts in via take_pl_on_red_days. The allocator already honoured this; the hand-pin path bypassed it entirely. - PlanningService gains optional workspace_repo/day_override_repo deps and _reject_illegal_free_day, enforced in add_planned_day and update. Reuses allocation_service.is_free_day rather than re-deriving it, and no-ops when the deps are unset so existing callers are unaffected. - update_planned_day had no ValidationError handler at all, so a validation failure there 500'd instead of 422'ing. Fixed. - Calendar filters the pin write loop by the day's isFree; the modal explains free days stay off, and that pinning opts a day out of automatic re-planning. Vacation days at risk of forfeiture were computed and sent over the wire but never rendered: an at-risk column with the age-out/over-cap split, and a dashboard key figure. PlanProposal.warnings was likewise parsed but rendered nowhere, for all three kinds. Adds PlanWarningCard in a Risks section above the tips, with parent names resolved and dates formatted. POST /api/plan/sync now fires from the workspace layer on every plan-input change rather than only from Calendar, so a Settings edit or a pinned-day save re-plans day types instead of merely refetching. Overlapping bumps coalesce into one trailing run; a rejection cannot wedge the in-flight guard. eviction_preview was silently dropped by the frontend despite always being on the wire, and is now surfaced through context. Verified: backend 890 passed (91.49% coverage), frontend 1297 passed, ruff/eslint/tsc clean. Browser-checked in Swedish and English. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JVQx4NUvPbJhn6UcvRd2QY
131 lines
8.4 KiB
TypeScript
131 lines
8.4 KiB
TypeScript
export const settings = {
|
|
'childBirthdayInput.birthDateLabel': 'Date of birth',
|
|
'childBirthdayInput.defaultLabel': 'Child\'s birth date',
|
|
'childBirthdayInput.preschoolStartLabel': 'Preschool start (optional)',
|
|
'dayOverridesInput.addButton': 'Add exception',
|
|
'dayOverridesInput.addSectionTitle': 'Add exception',
|
|
'dayOverridesInput.addingButton': 'Adding...',
|
|
'dayOverridesInput.charCount': '{count}/280',
|
|
'dayOverridesInput.dateLabel': 'Date',
|
|
'dayOverridesInput.noteFieldLabel': 'Note (optional)',
|
|
'dayOverridesInput.noteLabel': 'Note: {note}',
|
|
'dayOverridesInput.notePlaceholder': 'E.g. Worked on Christmas Day',
|
|
'dayOverridesInput.offStatus': 'I\'m off this day',
|
|
'dayOverridesInput.statusLegend': 'Status',
|
|
'dayOverridesInput.workingStatus': 'I\'m working this day',
|
|
'parentBalance.advancedToggle': 'Advanced',
|
|
'parentBalance.cancelButton': 'Cancel',
|
|
'parentBalance.closeAria': 'Close',
|
|
'parentBalance.description': 'The figures are on Mina sidor at Försäkringskassan, under Föräldrapenning.',
|
|
'parentBalance.dubbeldagarHelper': 'Shared by both parents together, during the first 15 months.',
|
|
'parentBalance.dubbeldagarLeftLabel': 'Dubbeldagar left (0-60)',
|
|
'parentBalance.invalid': 'The total (sjukpenningnivå + lägstanivå) can\'t exceed {total} days.',
|
|
'parentBalance.lagstaLeftLabel': 'Lägstanivå (minimum-rate tier) left (0-90)',
|
|
'parentBalance.presetButton': 'No days taken yet',
|
|
'parentBalance.rangeError': 'Enter a number between {min} and {max}.',
|
|
'parentBalance.reservedExceedsError': 'Reserved days can\'t exceed the sjukpenningnivå + lägstanivå days left.',
|
|
'parentBalance.reservedLeftHelper': 'Leave empty and we\'ll calculate it.',
|
|
'parentBalance.reservedLeftLabel': 'Reserved days left (0-90)',
|
|
'parentBalance.saveButton': 'Save',
|
|
'parentBalance.saveError': 'Failed to save the remaining days',
|
|
'parentBalance.savingButton': 'Saving…',
|
|
'parentBalance.sjukpenningLeftLabel': 'Sjukpenningnivå (income-based tier) left (0-390)',
|
|
'parentBalance.summary': '= {left} of {total} days left',
|
|
'parentBalance.summaryDubbeldagar': '{count} dubbeldagar left',
|
|
'parentBalance.title': '{name}\'s days left',
|
|
'parentBalance.titleSelf': 'Your days left',
|
|
'parentProfileInput.employed': 'Employed',
|
|
'parentProfileInput.employmentStatusLabel': 'Employment status',
|
|
'parentProfileInput.hourly': 'Hourly wage',
|
|
'parentProfileInput.jobseeking': 'Job seeking',
|
|
'parentProfileInput.monthly': 'Monthly salary',
|
|
'parentProfileInput.none': 'None',
|
|
'parentProfileInput.salaryTypeLabel': 'Salary type',
|
|
'parentProfileInput.selectEmploymentStatus': 'Select employment status',
|
|
'parentProfileInput.selectSalaryType': 'Select salary type',
|
|
'qrModal.authenticating': 'Authenticating…',
|
|
'qrModal.cancelButton': 'Cancel',
|
|
'qrModal.cancelled': 'The session was cancelled.',
|
|
'qrModal.closeAria': 'Close modal',
|
|
'qrModal.closeButton': 'Close',
|
|
'qrModal.errorLabel': 'Error:',
|
|
'qrModal.fetching': 'Fetching data from FK…',
|
|
'qrModal.qrAlt': 'BankID QR code',
|
|
'qrModal.qrInstruction': 'Open the BankID app and scan the QR code:',
|
|
'qrModal.statusLabel': 'Status:',
|
|
'qrModal.success': 'Done! Data fetched from Försäkringskassan.',
|
|
'qrModal.title': 'Fetch from Försäkringskassan',
|
|
'settings.addPartnerButton': 'Add partner',
|
|
'settings.addPartnerError': 'Could not add partner',
|
|
'settings.addPartnerSuccess': 'Partner added!',
|
|
'settings.addingPartner': 'Adding...',
|
|
'settings.balanceSectionTitle': 'Balances',
|
|
'settings.calendarLanguageSectionTitle': 'Calendar & language',
|
|
'settings.cancelButton': 'Cancel',
|
|
'settings.childBirthDateLabel': 'Child\'s birth date',
|
|
'settings.dayOverridesHelp': 'The planner is based on the Swedish calendar (public holidays, bridge days, Christmas Eve, Midsummer Eve and Whitsun Eve are normally days off). Here you can enter exceptions for your workplace — if you have to work on Christmas Day, or are off on days that are otherwise working days.',
|
|
'settings.exceptionsSectionTitle': 'Exceptions & red days',
|
|
'settings.familySectionTitle': 'Child & family',
|
|
'settings.languageAutoOption': 'Automatic (browser language)',
|
|
'settings.languageEnglishOption': 'English',
|
|
'settings.languageLabel': 'Välj språk / Select language',
|
|
'settings.languageSwedishOption': 'Svenska',
|
|
'settings.membersLoading': 'Loading members…',
|
|
'settings.noChildSelected': 'No child selected yet.',
|
|
'settings.partnerActionErrorNotFound': 'Could not find the partner. Reload the page and try again.',
|
|
'settings.partnerIntro': 'Add a partner to plan parental leave together.',
|
|
'settings.partnerLinkedIntro': 'Your partner is linked to this workspace.',
|
|
'settings.partnerNameInvalid': 'The partner\'s name is invalid.',
|
|
'settings.partnerNamePlaceholder': 'Partner\'s name',
|
|
'settings.partnerNameRequired': 'Enter a name for the partner',
|
|
'settings.partnerSectionTitle': 'Partner',
|
|
'settings.preschoolHelp': 'Preschools usually close for about 6 days a year for planning. Enter how many days your preschool has, so they are reserved in the plan.',
|
|
'settings.preschoolPlanningDaysLabel': 'Preschool planning days per year',
|
|
'settings.profileHelp': 'Your salary type and employment status are used to estimate your SGI and plan your leave.',
|
|
'settings.profileSectionTitle': 'Your profile',
|
|
'settings.redDaysHelp': 'A list of public holidays under the Swedish calendar, together with your own exceptions — four years at a time.',
|
|
'settings.removeBlockerLeaveWishes': 'leave wishes',
|
|
'settings.removeBlockerParentalLeave': 'recorded parental leave',
|
|
'settings.removeBlockerPlannedLeave': 'planned leave days',
|
|
'settings.removeBlockerVacationDays': 'recorded vacation days',
|
|
'settings.removeConfirmButton': 'Yes, remove',
|
|
'settings.removeConfirmPrompt': 'Remove {name} from the workspace?',
|
|
'settings.removePartnerButton': 'Remove',
|
|
'settings.removePartnerError': 'Could not remove the partner',
|
|
'settings.removePartnerErrorHasDependentData': 'Can\'t remove — there is recorded: {blockers}. Remove or move this first.',
|
|
'settings.removePartnerErrorHasLogin': 'Can\'t remove — this person has their own account and login.',
|
|
'settings.removePartnerErrorSelf': 'You can\'t remove yourself from the workspace.',
|
|
'settings.renameButton': 'Rename',
|
|
'settings.renamePartnerError': 'Could not rename',
|
|
'settings.saveFamilyButton': 'Save',
|
|
'settings.saveFamilyError': 'Could not save the details',
|
|
'settings.saveFamilySuccess': 'Details saved!',
|
|
'settings.saveRenameButton': 'Save name',
|
|
'settings.saveVacationError': 'Could not save vacation days',
|
|
'settings.saveVacationSuccess': 'Vacation days for {year} saved!',
|
|
'settings.selectedChildLabel': 'Selected child:',
|
|
'settings.showWeekNumbers': 'Show week numbers',
|
|
'settings.takePlOnRedDays': 'Take parental leave on red days',
|
|
'settings.takePlOnRedDaysError': 'Could not save the setting',
|
|
'settings.takePlOnRedDaysHelp': 'You get paid for Saturdays, Sundays and red days in the plan — but you spend days you would otherwise have kept, since vacation cannot be taken on these days.',
|
|
'settings.title': 'Settings',
|
|
'settings.vacationHelp': 'Enter vacation days per year. In the first year you are usually home more and have fewer days to spend on vacation, while later years have your full annual allotment. This controls how much time the planner has to work with.',
|
|
'settings.youBadge': '(You)',
|
|
'vacationDaysTable.assumedBadge': 'Assumed',
|
|
'vacationDaysTable.assumedPrompt': 'No value is recorded for this year — the statutory 25 days has been assumed. Confirm or edit below.',
|
|
'vacationDaysTable.atRiskAgeDetail': '{days} days have passed the 5-year limit for saving vacation',
|
|
'vacationDaysTable.atRiskHeader': 'At risk',
|
|
'vacationDaysTable.atRiskOverCapDetail': '{days} days exceed how much may be saved for next year',
|
|
'vacationDaysTable.empty': 'No years to show yet.',
|
|
'vacationDaysTable.savedDaysHeader': 'Saved days carried in',
|
|
'vacationDaysTable.savedStatus': 'Saved',
|
|
'vacationDaysTable.saveErrorStatus': 'Could not save',
|
|
'vacationDaysTable.savingStatus': 'Saving…',
|
|
'vacationDaysTable.vacationDaysHeader': 'Vacation days',
|
|
'settings.preschoolPerYearHelp': 'Enter how many planning days were actually taken in a given year — it can differ from the estimate above.',
|
|
'settings.preschoolPerYearTitle': 'Planning days per year',
|
|
'settings.preschoolPlannedLabel': 'Planned days',
|
|
'settings.preschoolTakenLabel': 'Days taken',
|
|
'settings.preschoolTakenPlaceholder': 'Not recorded',
|
|
} as const
|