Refactors grid date handling and event rendering
Replaces getPeriodRange with getDisplayDates approach Simplifies event rendering by using flexible date array Updates event rendering to work with dynamic date lists Improves code modularity and reduces complexity
This commit is contained in:
parent
5075b71eb2
commit
f0cc9bb6ce
3 changed files with 9 additions and 38 deletions
|
|
@ -91,12 +91,16 @@ export class EventRenderingService {
|
|||
* Handle GRID_RENDERED event - render events in the current grid
|
||||
*/
|
||||
private handleGridRendered(event: CustomEvent): void {
|
||||
const { container, startDate, endDate } = event.detail;
|
||||
const { container, dates } = event.detail;
|
||||
|
||||
if (!container || !startDate || !endDate) {
|
||||
if (!container || !dates || dates.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate startDate and endDate from dates array
|
||||
const startDate = dates[0];
|
||||
const endDate = dates[dates.length - 1];
|
||||
|
||||
this.renderEvents({
|
||||
container,
|
||||
startDate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue