Unused function
This commit is contained in:
parent
34cf4fbfca
commit
1fa7aa26e5
1 changed files with 13 additions and 20 deletions
|
|
@ -27,7 +27,7 @@ export class GridManager {
|
||||||
this.dateService = dateService;
|
this.dateService = dateService;
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
private init(): void {
|
private init(): void {
|
||||||
this.findElements();
|
this.findElements();
|
||||||
this.subscribeToEvents();
|
this.subscribeToEvents();
|
||||||
|
|
@ -48,11 +48,11 @@ export class GridManager {
|
||||||
const weekBounds = this.dateService.getWeekBounds(date);
|
const weekBounds = this.dateService.getWeekBounds(date);
|
||||||
return this.dateService.endOfDay(weekBounds.end);
|
return this.dateService.endOfDay(weekBounds.end);
|
||||||
}
|
}
|
||||||
|
|
||||||
private findElements(): void {
|
private findElements(): void {
|
||||||
this.container = document.querySelector('swp-calendar-container');
|
this.container = document.querySelector('swp-calendar-container');
|
||||||
}
|
}
|
||||||
|
|
||||||
private subscribeToEvents(): void {
|
private subscribeToEvents(): void {
|
||||||
// Listen for view changes
|
// Listen for view changes
|
||||||
eventBus.on(CoreEvents.VIEW_CHANGED, (e: Event) => {
|
eventBus.on(CoreEvents.VIEW_CHANGED, (e: Event) => {
|
||||||
|
|
@ -70,14 +70,7 @@ export class GridManager {
|
||||||
this.render();
|
this.render();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Switch to a different view
|
|
||||||
*/
|
|
||||||
public switchView(view: CalendarView): void {
|
|
||||||
this.currentView = view;
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main render method - delegates to GridRenderer
|
* Main render method - delegates to GridRenderer
|
||||||
|
|
@ -93,13 +86,13 @@ export class GridManager {
|
||||||
this.container,
|
this.container,
|
||||||
this.currentDate
|
this.currentDate
|
||||||
);
|
);
|
||||||
|
|
||||||
// Calculate period range
|
// Calculate period range
|
||||||
const periodRange = this.getPeriodRange();
|
const periodRange = this.getPeriodRange();
|
||||||
|
|
||||||
// Get layout config based on current view
|
// Get layout config based on current view
|
||||||
const layoutConfig = this.getLayoutConfig();
|
const layoutConfig = this.getLayoutConfig();
|
||||||
|
|
||||||
// Emit grid rendered event
|
// Emit grid rendered event
|
||||||
eventBus.emit(CoreEvents.GRID_RENDERED, {
|
eventBus.emit(CoreEvents.GRID_RENDERED, {
|
||||||
container: this.container,
|
container: this.container,
|
||||||
|
|
@ -110,8 +103,8 @@ export class GridManager {
|
||||||
columnCount: layoutConfig.columnCount
|
columnCount: layoutConfig.columnCount
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current period label
|
* Get current period label
|
||||||
*/
|
*/
|
||||||
|
|
@ -130,7 +123,7 @@ export class GridManager {
|
||||||
return this.dateService.formatDateRange(defaultWeekStart, defaultWeekEnd);
|
return this.dateService.formatDateRange(defaultWeekStart, defaultWeekEnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigate to next period
|
* Navigate to next period
|
||||||
*/
|
*/
|
||||||
|
|
@ -192,7 +185,7 @@ export class GridManager {
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current view's display dates
|
* Get current view's display dates
|
||||||
*/
|
*/
|
||||||
|
|
@ -210,7 +203,7 @@ export class GridManager {
|
||||||
return this.dateService.getFullWeekDates(defaultWeekStart);
|
return this.dateService.getFullWeekDates(defaultWeekStart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get period range for current view
|
* Get period range for current view
|
||||||
*/
|
*/
|
||||||
|
|
@ -242,7 +235,7 @@ export class GridManager {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get layout config for current view
|
* Get layout config for current view
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue