Implements FilterTemplate system for event matching
Introduces flexible key-based filtering for calendar events across different view configurations Adds new FilterTemplate class to: - Define event matching rules based on view configuration - Support multi-level grouping (team/resource/date) - Handle dynamic key generation for columns and events Enhances view configuration with explicit id properties and derived fields
This commit is contained in:
parent
c2f7564f8e
commit
dd647acab8
8 changed files with 331 additions and 41 deletions
|
|
@ -37,6 +37,9 @@ export class DemoApp {
|
|||
) {}
|
||||
|
||||
async init(): Promise<void> {
|
||||
// Set base date to match mock data (8. december 2025 = mandag)
|
||||
this.dateService.setBaseDate(new Date('2025-12-08'));
|
||||
|
||||
// Initialize IndexedDB
|
||||
await this.indexedDBContext.initialize();
|
||||
console.log('[DemoApp] IndexedDB initialized');
|
||||
|
|
@ -95,8 +98,8 @@ export class DemoApp {
|
|||
return {
|
||||
templateId: 'day',
|
||||
groupings: [
|
||||
{ type: 'resource', values: ['EMP001', 'EMP002'] },
|
||||
{ type: 'date', values: today }
|
||||
{ type: 'resource', values: ['EMP001', 'EMP002'], idProperty: 'resourceId' },
|
||||
{ type: 'date', values: today, idProperty: 'date', derivedFrom: 'start' }
|
||||
]
|
||||
};
|
||||
|
||||
|
|
@ -104,7 +107,7 @@ export class DemoApp {
|
|||
return {
|
||||
templateId: 'simple',
|
||||
groupings: [
|
||||
{ type: 'date', values: dates }
|
||||
{ type: 'date', values: dates, idProperty: 'date', derivedFrom: 'start' }
|
||||
]
|
||||
};
|
||||
|
||||
|
|
@ -112,8 +115,8 @@ export class DemoApp {
|
|||
return {
|
||||
templateId: 'resource',
|
||||
groupings: [
|
||||
{ type: 'resource', values: ['EMP001', 'EMP002'] },
|
||||
{ type: 'date', values: dates }
|
||||
{ type: 'resource', values: ['EMP001', 'EMP002'], idProperty: 'resourceId' },
|
||||
{ type: 'date', values: dates, idProperty: 'date', derivedFrom: 'start' }
|
||||
]
|
||||
};
|
||||
|
||||
|
|
@ -121,9 +124,9 @@ export class DemoApp {
|
|||
return {
|
||||
templateId: 'team',
|
||||
groupings: [
|
||||
{ type: 'team', values: ['team1', 'team2'] },
|
||||
{ type: 'resource', values: ['res1', 'res2', 'res3'] },
|
||||
{ type: 'date', values: dates }
|
||||
{ type: 'team', values: ['team1', 'team2'], idProperty: 'teamId' },
|
||||
{ type: 'resource', values: ['res1', 'res2', 'res3'], idProperty: 'resourceId' },
|
||||
{ type: 'date', values: dates, idProperty: 'date', derivedFrom: 'start' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue