Refactors calendar view configuration management

Decouples view configuration from DemoApp logic by:
- Introducing ViewConfigService and MockViewConfigRepository
- Moving view configuration to centralized JSON data
- Simplifying DemoApp rendering process

Improves separation of concerns and makes view configurations more maintainable
This commit is contained in:
Janus C. H. Knudsen 2025-12-16 17:13:27 +01:00
parent 6a56396721
commit 7f9d0129bf
9 changed files with 217 additions and 708 deletions

View file

@ -0,0 +1,45 @@
[
{
"id": "day",
"groupings": [
{ "type": "resource", "values": ["EMP001", "EMP002"], "idProperty": "resourceId" },
{ "type": "date", "values": [], "idProperty": "date", "derivedFrom": "start", "hideHeader": true }
]
},
{
"id": "simple",
"groupings": [
{ "type": "date", "values": [], "idProperty": "date", "derivedFrom": "start" }
]
},
{
"id": "resource",
"groupings": [
{ "type": "resource", "values": ["EMP001", "EMP002"], "idProperty": "resourceId" },
{ "type": "date", "values": [], "idProperty": "date", "derivedFrom": "start" }
]
},
{
"id": "team",
"groupings": [
{ "type": "team", "values": ["team1", "team2"] },
{ "type": "resource", "values": ["EMP001", "EMP002", "EMP003", "EMP004"], "idProperty": "resourceId", "belongsTo": "team.resourceIds" },
{ "type": "date", "values": [], "idProperty": "date", "derivedFrom": "start" }
]
},
{
"id": "department",
"groupings": [
{ "type": "department", "values": ["dept-styling", "dept-training"] },
{ "type": "resource", "values": ["EMP001", "EMP002", "EMP003", "EMP004", "STUDENT001", "STUDENT002"], "idProperty": "resourceId", "belongsTo": "department.resourceIds" },
{ "type": "date", "values": [], "idProperty": "date", "derivedFrom": "start" }
]
},
{
"id": "picker",
"groupings": [
{ "type": "resource", "values": ["EMP001", "EMP002", "EMP003", "EMP004"], "idProperty": "resourceId" },
{ "type": "date", "values": [], "idProperty": "date", "derivedFrom": "start" }
]
}
]