Some ignored filles was missing
This commit is contained in:
parent
7db22245e2
commit
fd5ab6bc0d
268 changed files with 31970 additions and 4 deletions
57
wwwroot/js/strategies/WeekViewStrategy.js
Normal file
57
wwwroot/js/strategies/WeekViewStrategy.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* WeekViewStrategy - Strategy for week/day view rendering
|
||||
* Extracts the time-based grid logic from GridManager
|
||||
*/
|
||||
import { DateCalculator } from '../utils/DateCalculator';
|
||||
import { calendarConfig } from '../core/CalendarConfig';
|
||||
import { GridRenderer } from '../renderers/GridRenderer';
|
||||
import { GridStyleManager } from '../renderers/GridStyleManager';
|
||||
export class WeekViewStrategy {
|
||||
constructor() {
|
||||
DateCalculator.initialize(calendarConfig);
|
||||
this.dateCalculator = new DateCalculator();
|
||||
this.gridRenderer = new GridRenderer();
|
||||
this.styleManager = new GridStyleManager();
|
||||
}
|
||||
getLayoutConfig() {
|
||||
return {
|
||||
needsTimeAxis: true,
|
||||
columnCount: calendarConfig.getWorkWeekSettings().totalDays,
|
||||
scrollable: true,
|
||||
eventPositioning: 'time-based'
|
||||
};
|
||||
}
|
||||
renderGrid(context) {
|
||||
// Update grid styles
|
||||
this.styleManager.updateGridStyles(context.resourceData);
|
||||
// Render the grid structure (time axis + day columns)
|
||||
this.gridRenderer.renderGrid(context.container, context.currentDate, context.resourceData);
|
||||
}
|
||||
getNextPeriod(currentDate) {
|
||||
return DateCalculator.addWeeks(currentDate, 1);
|
||||
}
|
||||
getPreviousPeriod(currentDate) {
|
||||
return DateCalculator.addWeeks(currentDate, -1);
|
||||
}
|
||||
getPeriodLabel(date) {
|
||||
const weekStart = DateCalculator.getISOWeekStart(date);
|
||||
const weekEnd = DateCalculator.addDays(weekStart, 6);
|
||||
const weekNumber = DateCalculator.getWeekNumber(date);
|
||||
return `Week ${weekNumber}: ${DateCalculator.formatDateRange(weekStart, weekEnd)}`;
|
||||
}
|
||||
getDisplayDates(baseDate) {
|
||||
return DateCalculator.getWorkWeekDates(baseDate);
|
||||
}
|
||||
getPeriodRange(baseDate) {
|
||||
const weekStart = DateCalculator.getISOWeekStart(baseDate);
|
||||
const weekEnd = DateCalculator.addDays(weekStart, 6);
|
||||
return {
|
||||
startDate: weekStart,
|
||||
endDate: weekEnd
|
||||
};
|
||||
}
|
||||
destroy() {
|
||||
// Clean up any week-specific resources
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=WeekViewStrategy.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue