Adds resource-based calendar view mode

Introduces new ResourceColumnDataSource and ResourceHeaderRenderer to support column rendering by resources instead of dates

Enables dynamic calendar mode switching between date and resource views
Updates core managers and services to support async column retrieval
Refactors data source interfaces to use Promise-based methods

Improves calendar flexibility and resource management capabilities
This commit is contained in:
Janus C. H. Knudsen 2025-11-22 19:42:12 +01:00
parent a7d365b186
commit eeaeddeef8
19 changed files with 765 additions and 991 deletions

View file

@ -11,7 +11,7 @@ import { EntityType } from '../types/CalendarTypes';
export class MockAuditRepository implements IApiRepository<IAuditEntry> {
readonly entityType: EntityType = 'Audit';
async sendCreate(entity: IAuditEntry): Promise<void> {
async sendCreate(entity: IAuditEntry): Promise<IAuditEntry> {
// Simulate API call delay
await new Promise(resolve => setTimeout(resolve, 100));
@ -22,9 +22,11 @@ export class MockAuditRepository implements IApiRepository<IAuditEntry> {
operation: entity.operation,
timestamp: new Date(entity.timestamp).toISOString()
});
return entity;
}
async sendUpdate(_id: string, _entity: IAuditEntry): Promise<void> {
async sendUpdate(_id: string, entity: IAuditEntry): Promise<IAuditEntry> {
// Audit entries are immutable - updates should not happen
throw new Error('Audit entries cannot be updated');
}