/** * GuideScheduleManager - Компонент для планирования рабочих смен гидов */ class GuideScheduleManager { constructor(options = {}) { this.container = options.container || document.body; this.onScheduleChange = options.onScheduleChange || null; this.allowMultiSelect = options.allowMultiSelect !== false; this.currentDate = new Date(); this.currentDate.setDate(1); // Установить на первый день месяца this.selectedGuides = new Set(); this.workingDays = new Map(); // guideId -> Set of dates this.guides = []; this.init(); } async init() { this.render(); await this.loadGuides(); this.bindEvents(); this.renderCalendar(); } render() { this.container.innerHTML = `
| Пн | Вт | Ср | Чт | Пт | Сб | Вс |
|---|---|---|---|---|---|---|