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
|
|
@ -38,6 +38,9 @@ import { DepartmentService } from './storage/departments/DepartmentService';
|
|||
import { SettingsStore } from './storage/settings/SettingsStore';
|
||||
import { SettingsService } from './storage/settings/SettingsService';
|
||||
import { ITenantSettings } from './types/SettingsTypes';
|
||||
import { ViewConfigStore } from './storage/viewconfigs/ViewConfigStore';
|
||||
import { ViewConfigService } from './storage/viewconfigs/ViewConfigService';
|
||||
import { ViewConfig } from './core/ViewConfig';
|
||||
|
||||
// Audit
|
||||
import { AuditStore } from './storage/audit/AuditStore';
|
||||
|
|
@ -54,6 +57,7 @@ import { MockAuditRepository } from './repositories/MockAuditRepository';
|
|||
import { MockTeamRepository } from './repositories/MockTeamRepository';
|
||||
import { MockDepartmentRepository } from './repositories/MockDepartmentRepository';
|
||||
import { MockSettingsRepository } from './repositories/MockSettingsRepository';
|
||||
import { MockViewConfigRepository } from './repositories/MockViewConfigRepository';
|
||||
|
||||
// Workers
|
||||
import { DataSeeder } from './workers/DataSeeder';
|
||||
|
|
@ -118,6 +122,7 @@ export function createV2Container(): Container {
|
|||
builder.registerType(ScheduleOverrideStore).as<IStore>();
|
||||
builder.registerType(AuditStore).as<IStore>();
|
||||
builder.registerType(SettingsStore).as<IStore>();
|
||||
builder.registerType(ViewConfigStore).as<IStore>();
|
||||
|
||||
// Entity services (for DataSeeder polymorphic array)
|
||||
builder.registerType(EventService).as<IEntityService<ICalendarEvent>>();
|
||||
|
|
@ -148,6 +153,10 @@ export function createV2Container(): Container {
|
|||
builder.registerType(SettingsService).as<IEntityService<ISync>>();
|
||||
builder.registerType(SettingsService).as<SettingsService>();
|
||||
|
||||
builder.registerType(ViewConfigService).as<IEntityService<ViewConfig>>();
|
||||
builder.registerType(ViewConfigService).as<IEntityService<ISync>>();
|
||||
builder.registerType(ViewConfigService).as<ViewConfigService>();
|
||||
|
||||
// Repositories (for DataSeeder polymorphic array)
|
||||
builder.registerType(MockEventRepository).as<IApiRepository<ICalendarEvent>>();
|
||||
builder.registerType(MockEventRepository).as<IApiRepository<ISync>>();
|
||||
|
|
@ -173,6 +182,9 @@ export function createV2Container(): Container {
|
|||
builder.registerType(MockSettingsRepository).as<IApiRepository<ITenantSettings>>();
|
||||
builder.registerType(MockSettingsRepository).as<IApiRepository<ISync>>();
|
||||
|
||||
builder.registerType(MockViewConfigRepository).as<IApiRepository<ViewConfig>>();
|
||||
builder.registerType(MockViewConfigRepository).as<IApiRepository<ISync>>();
|
||||
|
||||
// Audit service (listens to ENTITY_SAVED/DELETED events automatically)
|
||||
builder.registerType(AuditService).as<AuditService>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue