- Added departments ManyToMany field to Document model
- Implemented department selection in document create/edit modals
- Added automatic notification creation for all department employees
- Fixed document filtering to include uploaded documents in 'My Documents'
- Fixed acknowledgements API to include department recipients
- Added bulk notification support with configurable threshold
- Removed acknowledge button, added visual highlighting for unread documents
- Implemented server-side acknowledgment flow with redirect to file
- Fixed mobile responsive layout for document actions
- Removed temporary test files and documentation
- ApiClient теперь обрабатывает 401 и 403 ошибки для обновления токена
- Добавлен JWTRefreshMiddleware для проактивного обновления токенов за 5 минут до истечения
- Добавлена настройка JWT_REFRESH_THRESHOLD_MINUTES (по умолчанию 5)
- Исправлена проблема с периодическими 403 ошибками после истечения access token
- Добавлены явные поля в EmployeeChangeForm для дат с виджетами datetime-local
- Переопределен метод save_model для обхода auto_now/auto_now_add
- Используется прямое обновление через queryset для изменения неизменяемых полей
- Только superuser может редактировать эти поля
- Superuser теперь может редактировать created_at и updated_at
- Обычные администраторы видят эти поля как readonly
- Добавлен метод get_readonly_fields для динамического контроля прав
- Добавлен фильтр created_at__gte в EmployeeViewSet API
- Исправлен параметр is_active -> active в запросе к API
- Добавлено центрирование карусели новых сотрудников (justify-content: center)
- Обновлена документация API endpoints
- Create modal_create_department.html component with simple form (name, description)
- Create createDepartmentModal.js handler for form submission via API
- Update department_list.html to use modal instead of link
- Modal integrates with API v1/departments/ endpoint
- Includes validation, error handling, and success notifications
- Now both employees and departments use consistent modal creation pattern
- Add 'border-0 bg-transparent' classes to create_url link
- Now both create_modal (button) and create_url (link) have identical styling
- Fixes visual inconsistency between employees list (modal) and departments list (link)
- Fix incorrect nesting of {% with %} and {% if %} blocks
- Move {% include %} inside both if/else branches
- Directly pass 'docCreateModal' or empty string without intermediate variable
- Fix incorrect nesting of {% with %} and {% if %} blocks
- Move {% include %} inside both if/else branches to properly close with blocks
- Each branch now has its own include with appropriate create_url value
- Fix department_list.html: use variable for create_url instead of inline yesno with url tag
- Fix feed_list.html: properly handle conditional create_url with with blocks
- Fix document_list.html: use variable for create_modal instead of inline yesno
- Fix request_list_full.html: simplify scope toggle by placing it separately after header
Django templates don't allow nested template tags in include parameters,
so we now prepare variables beforehand using if/with blocks.
- Fix bug in page_header.html: add # to data-bs-target for card create button
- Integrate page_header in department_list.html with search and create card
- Integrate page_header in feed_list.html (no search, staff-only create button)
- Integrate page_header in document_list.html with Mine/All scope toggle
- Integrate page_header in request_list_full.html with filters and scope toggle
- Integrate page_header in chat_list.html with search
- Create _filters.html template for requests_app
- Add page-header.css to all integrated templates for consistent styling
- Removed README_EUSRR.md (replaced by PHASE6_SUMMARY.md)
- Removed REFACTORING_COMPLETE.md (replaced by static/css/README.md)
All information migrated to new, more organized documentation structure.
- Documented common.css (245 lines of shared classes)
- Explained dependency hierarchy: variables → common → feed-cards → components
- Added import order guidelines (critical for correct rendering)
- Documented naming conventions: BEM-like with prefixes
- Listed all eliminated duplication (.btn-icon, .badge-status, .chip, etc.)
- Added maintenance checklists and troubleshooting
- Preserved old README as README_OLD.md
Architecture now clear for all developers:
- Check common.css first before creating new classes
- Use variables.css for all sizing/colors
- Follow import order: variables → common → components
- 0% duplication, 100% maintainability
- Created static/css/components/base-app.css (280 lines)
* Layout system (sidebar, navbar, rightbar)
* Base typography and form controls
* Notification bell, mobile FAB
* Feed elements and ghost buttons
* Alpha headers and action buttons
- Created static/css/components/ios-components.css (440 lines)
* iOS-style cards, lists, and cells
* Avatars, badges, chips
* Collapse triggers and accordions
* Department inline editor
* Skills UI, activity block
* Icon button variants
- Removed 380 lines of inline styles from base.html
- All tests passing (17 OK)
- Replaced esc() and norm() in _department_controls.html with imports
- Replaced norm() in invite_to_department.html with import
- All inline utility duplicates now eliminated across templates
- Total: ~20 lines of duplicate code removed
- All 17 tests passing
- Created static/js/components/teamWheel.js (329 lines)
- Replaced 207-line inline script in department_scripts.html with ES6 module import
- Features: auto-scroll, manual control (mouse/touch/wheel), member focus, fallback
- All 12 tests passing
- Created static/css/components/feed-cards.css (280 lines):
* Comprehensive styles for feed/news cards
* Classes: .feed-header, .feed-stream, .feed-card, .feed-hd, .feed-ava
* Includes variants: compact, borderless, highlighted
* Responsive design with mobile breakpoints
* Replaces duplicated styles found in 6+ templates
- Created static/css/components/ios-search.css (160 lines):
* iOS-style search component
* Classes: .ios-search, .ios-search-input, .ios-search-clear
* Size variants: sm, lg
* Auto-showing clear button
* Replaces duplicated styles found in 4+ templates
- Updated static/css/components/index.css:
* Added imports for feed-cards.css and ios-search.css
* Added import for variables.css
* Provides single entry point for all CSS components
Benefits:
- Eliminates ~150 lines of duplicated CSS across templates
- Centralized styling for consistent UI
- Easy to maintain and update
- Uses CSS custom properties from variables.css
- Ready for use in new features
Next: Replace inline styles in templates with component imports
Tests: All 12 static file tests passing ✅
- Replaced custom applyFilter() function in employees_list.html with ListFilter component
- Reduced code from 16 lines to 11 lines (more declarative)
- Benefits:
* Uses shared, tested ListFilter component
* Automatic debouncing (300ms)
* Cleaner, more maintainable code
* Consistent filtering behavior across app
Analysis of other applyFilter() usage:
- department_scripts.html (2 instances): Complex logic with item selection, form interaction - kept as-is
- search/results.html: Multi-section filtering with radio buttons - kept as-is
- document_list.html: Array filtering, not DOM filtering - kept as-is
ListFilter component is ready for use in new features and templates.
Tests: All 17 tests passing ✅
- Created static/js/components/listFilter.js:
* Universal list filtering component with search support
* Replaces duplicated applyFilter() functions found in 7 templates
* Features:
- Configurable match functions (default or custom)
- Debounced search input for performance
- Support for data-attribute matching
- Support for selector-based matching
- Optional empty state message
- Optional clear button
- Flexible hiding methods (display/class)
- Updated static/js/components/index.js:
* Exports ListFilter and helper functions
* Added createDataAttrMatcher() helper
* Added createSelectorMatcher() helper
Component ready for use in templates to replace inline applyFilter() implementations.
Tests: All 12 static file tests passing ✅
Next: Replace applyFilter() usage in templates with ListFilter component
Date: Mon, 22 Sep 2025 10:30:00 +0300
Subject: [requests] Drawer «Рассмотреть», корректный чекбокс «Черновик», дружелюбные даты,
robust-обработка ошибок reject, и глобальный бейдж непрочитанных чатов
- Список заявлений:
- вместо россыпи кнопок добавлен аккуратный выезжающий блок действий (collapse drawer)
по клику «Рассмотреть»; компактные нейтральные стили, мягкая анимация.
- в модале «Изменить» добавлена галочка «Сохранить как черновик» с правильной
семантикой: hidden `_save_as=submit` по умолчанию + checkbox `_save_as=draft`.
Теперь снятие галочки действительно снимает draft.
- улучшены стили и структура разметки.
- Даты:
- на фронт-обёртке нормализуем datetime-поля (created_at/updated_at/decided_at)
в человекочитаемый вид, чтобы не светить сырые ISO 8601.
- Обработка ошибок:
- фикс падения при попытке отклонить уже одобренную заявку: ответ 400 у DRF
может приходить списком ошибок; теперь сообщение извлекается безопасно.
- Чаты:
- синхронизировали название ключа контекста с проектом (`chat_unread_total`);
- бейдж «Чаты» обновляется глобальным событием `chats:unread-total`, даже если
список чатов не открыт (fallback — суммирование счётчиков на странице).
Примечание: пути к шаблонам могут отличаться в вашем проекте — ниже даны
типовые варианты (`backend/requests_app/templates/...`). Если у вас другой
layout, внесите изменения в соответствующие файлы шаблонов.
- сервис integrations/ldap_writeback.py
- фича-флаг и маппинг в settings (LDAP_WRITE_*)
- (рекоменд.) поля в Employee: ldap_dn, ldap_guid, last_ldap_modify_ts, last_ldap_sync_at
- write-back в PATCH /employees/{id} и /employees/me/ (409/503 на конфликты/ошибки)
- оптимизация queryset (prefetch actions только для detail/me)
- мелкие правки add/remove_skill и валидаций