Track preschool planning days, partner invites and real vacation forfeiture
Three strands of work that grew together across the same settings screen and
API client, so they land as one change.
Per-year preschool planning days ("studiedagar"): new table, repository
(SQLite + Postgres), service, router and migration 007, plus the hooks and
Settings UI to plan and record them per child and year. Allocation now
reserves the recorded figure for a year where one exists and only falls back
to the child-level estimate otherwise, marking that fallback as assumed.
Partner invitations: workspaces issue and list invitations, registration
accepts an invite token to join the inviter's workspace instead of creating a
personal one, and a /join/:token page plus the settings invite panel drive it.
Vacation forfeiture: tips and the dashboard now distinguish days a parent
genuinely loses from days that merely age, so the warning stops firing on
balances that were never at risk.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Abstract repository interface for PreschoolPlanningDays.
|
||||
|
||||
Adds entity-specific queries on top of the generic CRUD contract. Concrete
|
||||
implementations live in app/repositories_impl/<backend>/.
|
||||
"""
|
||||
|
||||
from abc import abstractmethod
|
||||
from uuid import UUID
|
||||
|
||||
from app.entities.preschool_planning_days import PreschoolPlanningDays
|
||||
from app.repositories.base import Repository
|
||||
|
||||
|
||||
class PreschoolPlanningDaysRepository(Repository[PreschoolPlanningDays]):
|
||||
@abstractmethod
|
||||
async def get_by_child_year(self, child_id: UUID, year: int) -> PreschoolPlanningDays | None:
|
||||
"""Return the entry for a given (child, year) (UNIQUE), or None."""
|
||||
Reference in New Issue
Block a user