diff --git a/backend/static/js/components/calendarEventDragDrop.js b/backend/static/js/components/calendarEventDragDrop.js index 81f6130e..4107e699 100644 --- a/backend/static/js/components/calendarEventDragDrop.js +++ b/backend/static/js/components/calendarEventDragDrop.js @@ -1 +1,19 @@ -// Файл будет создан в следующем шаге +/** + * @fileoverview Calendar Event Drag & Drop functionality + * @module components/calendarEventDragDrop + */ + +/** + * Инициализация drag & drop для событий календаря + * @param {Object} options - Опции инициализации + * @returns {Object} API для управления drag & drop + */ +export function initCalendarEventDragDrop(options = {}) { + console.log('[CalendarEventDragDrop] Initialized (stub)'); + + return { + destroy: () => { + console.log('[CalendarEventDragDrop] Destroyed'); + } + }; +} diff --git a/backend/static/vendor/emoji-picker/index.js b/backend/static/vendor/emoji-picker/index.js index aa23cc4b..957ec974 100644 --- a/backend/static/vendor/emoji-picker/index.js +++ b/backend/static/vendor/emoji-picker/index.js @@ -1,3 +1,6 @@ import Picker from './picker.js' -import Database from './database.js' -export { Picker, Database } +// Database не используется, закомментировано чтобы избежать 404 +// import Database from './database.js' +export { Picker } +// export { Picker, Database } + diff --git a/backend/tests/test_calendar_permissions.py b/backend/tests/test_calendar_permissions.py index 12c24c6c..fc71953e 100644 --- a/backend/tests/test_calendar_permissions.py +++ b/backend/tests/test_calendar_permissions.py @@ -8,11 +8,7 @@ from datetime import date import pytest -from calendar_app.models import ( - Calendar, - CalendarSubscription, - CalendarVisibility, -) +from calendar_app.models import Calendar, CalendarSubscription, CalendarVisibility from django.contrib.auth import get_user_model from rest_framework import status from rest_framework.test import APIClient diff --git a/docs/completed/CALENDAR_PERMISSIONS_FIX.md b/docs/completed/CALENDAR_PERMISSIONS_FIX.md index 99c58fbb..d567331a 100644 --- a/docs/completed/CALENDAR_PERMISSIONS_FIX.md +++ b/docs/completed/CALENDAR_PERMISSIONS_FIX.md @@ -1,6 +1,6 @@ # Исправление прав доступа для глобальных календарей -**Дата:** 23 февраля 2026 г. +**Дата:** 23 февраля 2026 г. **Статус:** ✅ Выполнено ## Проблема @@ -16,7 +16,7 @@ def get_permissions(self): emp = self._employee_id(required=False) dep = self._dept_id(required=False) - + # Календарь компании — только администраторы if dep is None: # ❌ Срабатывало для глобальных календарей! return [IsAdminUser()] @@ -50,11 +50,11 @@ class CalendarEditPermission(BasePermission): # 1. Теле запроса (create) # 2. Query параметрах # 3. Объекте события (update/delete) - + if calendar_id is not None: calendar = Calendar.objects.get(id=int(calendar_id)) return calendar.can_user_edit(request.user) - + return None # Переход к legacy логике ``` @@ -179,5 +179,5 @@ POST /api/v1/calendar/events/ --- -**Автор:** GitHub Copilot +**Автор:** GitHub Copilot **Проверено:** Требуется тестирование