Adds resource scheduling and unavailability tracking

Introduces comprehensive schedule management for resources:
- Adds DateService with advanced time and date utilities
- Implements ResourceScheduleService for managing work hours
- Creates ScheduleRenderer to visualize unavailable time zones
- Extends resource model to support default weekly schedules

Enables granular tracking of resource availability and working hours
This commit is contained in:
Janus C. H. Knudsen 2025-12-10 00:27:19 +01:00
parent 400de8c9d5
commit a2b95515fd
17 changed files with 563 additions and 36 deletions

View file

@ -7,6 +7,15 @@
"avatarUrl": "/avatars/camilla.jpg",
"color": "#9c27b0",
"isActive": true,
"defaultSchedule": {
"1": { "start": "09:00", "end": "17:00" },
"2": { "start": "09:00", "end": "17:00" },
"3": { "start": "09:00", "end": "15:00" },
"4": { "start": "09:00", "end": "17:00" },
"5": { "start": "09:00", "end": "14:00" },
"6": null,
"7": null
},
"metadata": {
"role": "master stylist",
"specialties": ["balayage", "color", "bridal"]
@ -20,6 +29,15 @@
"avatarUrl": "/avatars/isabella.jpg",
"color": "#e91e63",
"isActive": true,
"defaultSchedule": {
"1": { "start": "10:00", "end": "18:00" },
"2": { "start": "10:00", "end": "18:00" },
"3": { "start": "10:00", "end": "18:00" },
"4": { "start": "10:00", "end": "18:00" },
"5": { "start": "10:00", "end": "16:00" },
"6": null,
"7": null
},
"metadata": {
"role": "master stylist",
"specialties": ["highlights", "ombre", "styling"]
@ -33,6 +51,15 @@
"avatarUrl": "/avatars/alexander.jpg",
"color": "#3f51b5",
"isActive": true,
"defaultSchedule": {
"1": { "start": "08:00", "end": "16:00" },
"2": { "start": "08:00", "end": "16:00" },
"3": { "start": "08:00", "end": "16:00" },
"4": { "start": "08:00", "end": "16:00" },
"5": { "start": "08:00", "end": "14:00" },
"6": null,
"7": null
},
"metadata": {
"role": "master stylist",
"specialties": ["men's cuts", "beard", "fade"]
@ -46,6 +73,15 @@
"avatarUrl": "/avatars/viktor.jpg",
"color": "#009688",
"isActive": true,
"defaultSchedule": {
"1": { "start": "09:00", "end": "17:00" },
"2": null,
"3": { "start": "09:00", "end": "17:00" },
"4": { "start": "09:00", "end": "17:00" },
"5": { "start": "09:00", "end": "17:00" },
"6": { "start": "10:00", "end": "14:00" },
"7": null
},
"metadata": {
"role": "stylist",
"specialties": ["cuts", "styling", "perms"]
@ -59,6 +95,15 @@
"avatarUrl": "/avatars/line.jpg",
"color": "#8bc34a",
"isActive": true,
"defaultSchedule": {
"1": { "start": "09:00", "end": "15:00" },
"2": { "start": "09:00", "end": "15:00" },
"3": { "start": "09:00", "end": "15:00" },
"4": null,
"5": { "start": "09:00", "end": "15:00" },
"6": null,
"7": null
},
"metadata": {
"role": "student",
"specialties": ["wash", "blow-dry", "basic cuts"]
@ -72,6 +117,15 @@
"avatarUrl": "/avatars/mads.jpg",
"color": "#ff9800",
"isActive": true,
"defaultSchedule": {
"1": null,
"2": { "start": "10:00", "end": "16:00" },
"3": { "start": "10:00", "end": "16:00" },
"4": { "start": "10:00", "end": "16:00" },
"5": null,
"6": null,
"7": null
},
"metadata": {
"role": "student",
"specialties": ["wash", "styling assistance"]