Refactor event rendering with column-based event management
Improves event rendering by integrating event filtering directly into column data sources Key changes: - Moves event filtering responsibility to IColumnDataSource - Simplifies event rendering pipeline by pre-filtering events per column - Supports both date and resource-based calendar modes - Enhances drag and drop event update mechanism Optimizes calendar rendering performance and flexibility
This commit is contained in:
parent
eeaeddeef8
commit
17909696ed
9 changed files with 179 additions and 250 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import { IResource } from './ResourceTypes';
|
||||
import { CalendarView } from './CalendarTypes';
|
||||
import { CalendarView, ICalendarEvent } from './CalendarTypes';
|
||||
|
||||
/**
|
||||
* Column information container
|
||||
* Contains both identifier and actual data for a column
|
||||
*/
|
||||
export interface IColumnInfo {
|
||||
identifier: string; // "2024-11-13" (date mode) or "person-1" (resource mode)
|
||||
data: Date | IResource; // Date for date-mode, IResource for resource-mode
|
||||
identifier: string; // "2024-11-13" (date mode) or "person-1" (resource mode)
|
||||
data: Date | IResource; // Date for date-mode, IResource for resource-mode
|
||||
events: ICalendarEvent[]; // Events for this column (pre-filtered by datasource)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -28,6 +29,11 @@ export interface IColumnDataSource {
|
|||
*/
|
||||
getType(): 'date' | 'resource';
|
||||
|
||||
/**
|
||||
* Check if this datasource is in resource mode
|
||||
*/
|
||||
isResource(): boolean;
|
||||
|
||||
/**
|
||||
* Update the current date for column calculations
|
||||
* @param date - The new current date
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue