feat: Implement routines feature with CRUD operations and child assignment
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m0s

- Add backend routines management with add, get, update, delete, and list functionalities.
- Create models for Routine, RoutineItem, RoutineSchedule, and RoutineExtension.
- Develop event types for routine confirmation and modification.
- Implement frontend components for routine assignment, confirmation dialog, and routine management views.
- Add unit tests for routine API and integration tests for routine CRUD flow.
- Create end-to-end test plan for routines feature covering parent and child interactions.
This commit is contained in:
2026-05-05 09:08:19 -04:00
parent 082097b4f9
commit eb775ba7d8
41 changed files with 2847 additions and 29 deletions

View File

@@ -0,0 +1,15 @@
from events.types.payload import Payload
class ChildRoutineConfirmation(Payload):
OPERATION_PENDING = "PENDING"
OPERATION_APPROVED = "APPROVED"
OPERATION_REJECTED = "REJECTED"
OPERATION_RESET = "RESET"
def __init__(self, child_id: str, routine_id: str, operation: str):
super().__init__({
'child_id': child_id,
'routine_id': routine_id,
'operation': operation
})

View File

@@ -0,0 +1,9 @@
from events.types.payload import Payload
class ChildRoutinesSet(Payload):
def __init__(self, child_id: str, routine_ids: list[str]):
super().__init__({
'child_id': child_id,
'routine_ids': routine_ids
})

View File

@@ -28,4 +28,10 @@ class EventType(Enum):
CHORE_TIME_EXTENDED = "chore_time_extended"
CHILD_CHORE_CONFIRMATION = "child_chore_confirmation"
ROUTINE_MODIFIED = "routine_modified"
CHILD_ROUTINES_SET = "child_routines_set"
ROUTINE_SCHEDULE_MODIFIED = "routine_schedule_modified"
ROUTINE_TIME_EXTENDED = "routine_time_extended"
CHILD_ROUTINE_CONFIRMATION = "child_routine_confirmation"
FORCE_LOGOUT = "force_logout"

View File

@@ -0,0 +1,13 @@
from events.types.payload import Payload
class RoutineModified(Payload):
OPERATION_ADD = "ADD"
OPERATION_EDIT = "EDIT"
OPERATION_DELETE = "DELETE"
def __init__(self, routine_id: str, operation: str):
super().__init__({
'routine_id': routine_id,
'operation': operation
})

View File

@@ -0,0 +1,13 @@
from events.types.payload import Payload
class RoutineScheduleModified(Payload):
OPERATION_SET = 'SET'
OPERATION_DELETED = 'DELETED'
def __init__(self, child_id: str, routine_id: str, operation: str):
super().__init__({
'child_id': child_id,
'routine_id': routine_id,
'operation': operation,
})

View File

@@ -0,0 +1,9 @@
from events.types.payload import Payload
class RoutineTimeExtended(Payload):
def __init__(self, child_id: str, routine_id: str):
super().__init__({
'child_id': child_id,
'routine_id': routine_id,
})