Link planned days to their wish, fix the age-4 cap, drop the planning goal
Three changes that together unblock treating a calendar period as one editable object. Migration 008 adds `planned_leave_day.wish_id` (nullable, ON DELETE SET NULL) so a persisted day knows which `leave_wish` produced it, `is_pinned` to mark a day the user hand-edited, and `leave_wish.target_days` so a period drawn on a calendar need not be a whole number of weeks. Apply-time identity still keys on day_type/is_dubbeldag only, so a wish_id-only difference is a metadata update rather than a collision. The age-4 savable ceiling was applying the per-child figure of 96 to each parent's pool, modelling a two-parent family as able to save 192 days past the child's fourth birthday. `resolve_age4_savable_cap` is now the single place that decides 48 (couple with two parents) versus 96 (everyone else), and both AnalyticsService and the allocator read it. Migration 009 drops `workspace.planning_goal` and `leave_wish.goal_override`. The allocator's tier-3 policy collapses to one rule; `salary_type` still branches, since that reflects what a vacation day actually costs a parent rather than a user preference.
This commit is contained in:
@@ -104,13 +104,6 @@ export const plan = {
|
||||
'planResults.wished': 'wished',
|
||||
'planResults.yearHeader': 'Year',
|
||||
'planResults.yearOverviewTitle': 'Overview by year',
|
||||
'planningGoalSelector.balanced': 'Balanced',
|
||||
'planningGoalSelector.balancedHelp': 'A trade-off between time at home and income.',
|
||||
'planningGoalSelector.legend': 'Planning goal',
|
||||
'planningGoalSelector.maxMoney': 'Most money',
|
||||
'planningGoalSelector.maxMoneyHelp': 'Protect your income, e.g. by placing vacation around weekends and public holidays.',
|
||||
'planningGoalSelector.maxTime': 'Most time at home',
|
||||
'planningGoalSelector.maxTimeHelp': 'Save days and extend your total leave time, with lower income now.',
|
||||
'planningModeSelector.couple': 'Me and my partner',
|
||||
'planningModeSelector.legend': 'Are you planning alone or together with a partner?',
|
||||
'planningModeSelector.solo': 'Just me',
|
||||
|
||||
@@ -13,8 +13,6 @@ export const tips = {
|
||||
'tip.reserveForPreschoolPlanningDays.title': 'Reserve days for preschool planning days',
|
||||
'tip.sgiMinimumAfterAge1.body': '{parent_name} is planning fewer than {min_days_per_week} parental-benefit days a week over the coming month, which can affect SGI protection.',
|
||||
'tip.sgiMinimumAfterAge1.title': 'Risk to SGI protection',
|
||||
'tip.skipFpFirst12Months.body': '{parent_name} has parental-benefit leave planned before the child turns 1. With the "most time at home" goal it can pay off to save those days for later.',
|
||||
'tip.skipFpFirst12Months.title': 'Save parental benefit for later',
|
||||
'tip.stretchTimeAtHome.body': '{parent_name} is planning {weekly_intensity} days a week over the coming month, leaving {projected_left} days at age 4.',
|
||||
'tip.stretchTimeAtHome.title': 'Stretch out your time at home',
|
||||
'tip.useDubbeldagarStrategically.body': 'You both have parental-benefit leave planned on {date} but it isn\'t marked as a double day (dubbeldag).',
|
||||
|
||||
@@ -104,13 +104,6 @@ export const plan = {
|
||||
'planResults.wished': 'önskade',
|
||||
'planResults.yearHeader': 'År',
|
||||
'planResults.yearOverviewTitle': 'Översikt över åren',
|
||||
'planningGoalSelector.balanced': 'Balanserad',
|
||||
'planningGoalSelector.balancedHelp': 'En avvägning mellan tid hemma och inkomst.',
|
||||
'planningGoalSelector.legend': 'Planeringsmål',
|
||||
'planningGoalSelector.maxMoney': 'Mest pengar',
|
||||
'planningGoalSelector.maxMoneyHelp': 'Skydda din inkomst, t.ex. genom att lägga semester runt helger och röda dagar.',
|
||||
'planningGoalSelector.maxTime': 'Mest tid hemma',
|
||||
'planningGoalSelector.maxTimeHelp': 'Spara dagar och förläng din totala lediga tid, med lägre inkomst nu.',
|
||||
'planningModeSelector.couple': 'Jag och min partner',
|
||||
'planningModeSelector.legend': 'Planerar du själv eller tillsammans med en partner?',
|
||||
'planningModeSelector.solo': 'Bara jag',
|
||||
|
||||
@@ -13,8 +13,6 @@ export const tips = {
|
||||
'tip.reserveForPreschoolPlanningDays.title': 'Reservera dagar för förskolans planeringsdagar',
|
||||
'tip.sgiMinimumAfterAge1.body': '{parent_name} planerar färre än {min_days_per_week} föräldrapenningdagar per vecka den kommande månaden, vilket kan påverka SGI-skyddet.',
|
||||
'tip.sgiMinimumAfterAge1.title': 'Risk för SGI-skydd',
|
||||
'tip.skipFpFirst12Months.body': '{parent_name} har föräldrapenning planerad innan barnet fyller 1 år. Med målet "mest tid hemma" kan det löna sig att spara dagarna till senare.',
|
||||
'tip.skipFpFirst12Months.title': 'Spara föräldrapenning första året',
|
||||
'tip.stretchTimeAtHome.body': '{parent_name} planerar {weekly_intensity} dagar per vecka den kommande månaden, vilket lämnar {projected_left} dagar kvar vid 4 års ålder.',
|
||||
'tip.stretchTimeAtHome.title': 'Sträck ut tiden hemma',
|
||||
'tip.useDubbeldagarStrategically.body': 'Ni har båda föräldrapenning planerad {date} men den är inte markerad som dubbeldag.',
|
||||
|
||||
Reference in New Issue
Block a user