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:
parent
6a56396721
commit
7f9d0129bf
9 changed files with 217 additions and 708 deletions
45
wwwroot/data/viewconfigs.json
Normal file
45
wwwroot/data/viewconfigs.json
Normal 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" }
|
||||
]
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue