Renaming part 1
This commit is contained in:
parent
36ac8d18ab
commit
29811fd4b5
20 changed files with 1424 additions and 582 deletions
166
resource-calendar-structure.md
Normal file
166
resource-calendar-structure.md
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
# Resource Calendar JSON Structure (Opdateret)
|
||||
|
||||
Her er den opdaterede JSON struktur med resources som array og detaljerede resource informationer:
|
||||
|
||||
```json
|
||||
{
|
||||
"date": "2025-08-05",
|
||||
"resources": [
|
||||
{
|
||||
"name": "karina.knudsen",
|
||||
"displayName": "Karina Knudsen",
|
||||
"avatarUrl": "/avatars/karina.jpg",
|
||||
"employeeId": "EMP001",
|
||||
"events": [
|
||||
{
|
||||
"id": "1",
|
||||
"title": "Balayage langt hår",
|
||||
"start": "2025-08-05T10:00:00",
|
||||
"end": "2025-08-05T11:00:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 60, "color": "#9c27b0" }
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"title": "Klipning og styling",
|
||||
"start": "2025-08-05T14:00:00",
|
||||
"end": "2025-08-05T15:30:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 90, "color": "#e91e63" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "maria.hansen",
|
||||
"displayName": "Maria Hansen",
|
||||
"avatarUrl": "/avatars/maria.jpg",
|
||||
"employeeId": "EMP002",
|
||||
"events": [
|
||||
{
|
||||
"id": "3",
|
||||
"title": "Permanent",
|
||||
"start": "2025-08-05T09:00:00",
|
||||
"end": "2025-08-05T11:00:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 120, "color": "#3f51b5" }
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"title": "Farve behandling",
|
||||
"start": "2025-08-05T13:00:00",
|
||||
"end": "2025-08-05T15:00:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 120, "color": "#ff9800" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lars.nielsen",
|
||||
"displayName": "Lars Nielsen",
|
||||
"avatarUrl": "/avatars/lars.jpg",
|
||||
"employeeId": "EMP003",
|
||||
"events": [
|
||||
{
|
||||
"id": "5",
|
||||
"title": "Herreklipning",
|
||||
"start": "2025-08-05T11:00:00",
|
||||
"end": "2025-08-05T11:30:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 30, "color": "#795548" }
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"title": "Skæg trimning",
|
||||
"start": "2025-08-05T16:00:00",
|
||||
"end": "2025-08-05T16:30:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 30, "color": "#607d8b" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "anna.petersen",
|
||||
"displayName": "Anna Petersen",
|
||||
"avatarUrl": "/avatars/anna.jpg",
|
||||
"employeeId": "EMP004",
|
||||
"events": [
|
||||
{
|
||||
"id": "7",
|
||||
"title": "Bryllupsfrisure",
|
||||
"start": "2025-08-05T08:00:00",
|
||||
"end": "2025-08-05T10:00:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 120, "color": "#009688" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "thomas.olsen",
|
||||
"displayName": "Thomas Olsen",
|
||||
"avatarUrl": "/avatars/thomas.jpg",
|
||||
"employeeId": "EMP005",
|
||||
"events": [
|
||||
{
|
||||
"id": "8",
|
||||
"title": "Highlights",
|
||||
"start": "2025-08-05T12:00:00",
|
||||
"end": "2025-08-05T14:00:00",
|
||||
"type": "work",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 120, "color": "#8bc34a" }
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"title": "Styling konsultation",
|
||||
"start": "2025-08-05T15:00:00",
|
||||
"end": "2025-08-05T15:30:00",
|
||||
"type": "meeting",
|
||||
"allDay": false,
|
||||
"syncStatus": "synced",
|
||||
"metadata": { "duration": 30, "color": "#cddc39" }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Struktur Forklaring
|
||||
|
||||
- **date**: Den specifikke dato for resource calendar visningen
|
||||
- **resources**: Array af resource objekter
|
||||
- **Resource objekt**:
|
||||
- **name**: Unikt navn/ID (kebab-case)
|
||||
- **displayName**: Navn til visning i UI
|
||||
- **avatarUrl**: URL til profilbillede
|
||||
- **employeeId**: Medarbejder ID
|
||||
- **events**: Array af events for denne resource
|
||||
|
||||
## Fordele ved denne struktur:
|
||||
|
||||
1. **Fleksibel**: Nemt at tilføje flere resource felter
|
||||
2. **Skalerbar**: Kan håndtere mange resources
|
||||
3. **UI-venlig**: DisplayName og avatar til visning
|
||||
4. **Struktureret**: Klar separation mellem resource info og events
|
||||
5. **Søgbar**: Name og employeeId til filtrering/søgning
|
||||
|
||||
Denne struktur gør det nemt at:
|
||||
- Vise resource info i headers (displayName, avatar)
|
||||
- Filtrere events per resource
|
||||
- Håndtere kun én dato ad gangen i resource mode
|
||||
- Udvide med flere resource felter senere
|
||||
Loading…
Add table
Add a link
Reference in a new issue