24 Commits

Author SHA1 Message Date
lizerk
e3ba6ea925 refactor(ui): stabilize equipment deep links and qr flow 2026-04-12 16:09:38 +03:00
lizerk
601f0d58d8 chore(frontend): checkpoint current theme polish state 2026-04-11 19:30:22 +03:00
lizerk
26f1dd550d фикс фронта 2026-04-03 21:12:20 +03:00
lizerk
9b23f480c2 Refine search routing and deep links 2026-04-03 20:30:29 +03:00
lizerk
decbadf47b Унификация сортировки и визуального стиля карточек: добавлены селекторы сортировки и убраны лишние тени в разделах заявлений, закупок и оборудования 2026-03-27 18:11:14 +03:00
lizerk
f2bff36f3c feat(documents): рефакторинг модального окна с предпросмотром
Доработан DocumentDetailModal:
- Добавлен встроенный предпросмотр PDF и изображений
- Добавлен полноэкранный режим для предпросмотра (desktop)
- Добавлены вкладки: Предпросмотр, Информация, Активность, Ознакомления, Комментарии, Связанные
- Добавлены пропсы: onEditMetadata, onViewReport, onNavigateToRelated
- Интегрированы DocumentComments и DocumentRelated
- Улучшена шапка с полной информацией о документе на мобильных

Desktop layout:
- Split-view: предпросмотр слева (60%), вкладки справа
- Кнопка полноэкранного режима

Mobile layout:
- Вкладочная навигация
- Все метаданные видны в шапке (имя файла, размер, дата, автор)

Оптимизация page.tsx:
- Заменен встроенный модал (270 строк) на компонент DocumentDetailModal
- Удалены ненужные импорты DocumentAcknowledgement, DocumentComments, DocumentRelated
- Уменьшен размер с 1199 до 952 строк (-247 строк, -21%)
2026-03-06 12:09:23 +03:00
41e4238a84 feat: add document related, comments, tags, versions components and notifications integration 2026-03-02 12:37:55 +03:00
243fffc126 refactor: Restructure document card layout for better visual hierarchy
PROBLEM:
- Document cards had unstructured layout with all elements mixed together
- No clear visual separation between sections
- Poor readability and cluttered appearance
- Actions scattered without logical grouping

SOLUTION:
Completely restructured document cards into 3 distinct sections:

1. HEADER (with light background and border-bottom)
   - Checkbox + Title (h3 with semibold)
   - Status badges (primary + acknowledgement)
   - Quick action buttons (Preview/PDF + Details) on the right
   - Improved: Buttons now have solid backgrounds (bg-sky-100, bg-gray-100) for better visibility

2. BODY (main content area)
   - Description (only if exists, with better line-height)
   - Metadata grid (3 columns on large screens):
     • Folder location (sky background with FolderOpen icon)
     • Author (gray background with User icon)
     • Created date (gray background with Calendar icon)
   - Workflow actions (only for draft/review/approved/rejected states)
   - Better spacing and visual hierarchy

3. FOOTER (conditional, only when needed)
   - Shows only if document has acknowledgement requirement OR is published/archived
   - Acknowledgement actions (Ознакомиться + Ведомость buttons)
   - Workflow for published/archived states (aligned right)
   - Light background matching header

IMPROVEMENTS:
- Clear visual sections with borders and backgrounds
- Metadata in colored pill-shaped cards instead of plain text
- Icons for all metadata fields (folder, user, calendar)
- Removed redundant 'Updated' field (not essential)
- Removed empty description text ('Описание не заполнено')
- Better button hierarchy: primary actions in header, secondary in footer
- Larger, more clickable buttons (px-3 py-1.5 instead of px-2.5 py-1)
- Consistent rounded-lg instead of mix of rounded-full/rounded-lg
- Better hover states (bg-sky-200 instead of bg-sky-100)
- Conditional rendering: footer only appears when necessary

VISUAL DESIGN:
- Header: bg-gray-50/50 with border-bottom
- Body: white background, clean content area
- Footer: bg-gray-50/50 with border-top
- Metadata cards: colored backgrounds (sky-50 for folder, gray-50 for others)
- Better border colors: border-gray-200 instead of border-gray-100

This matches the structure of modern DMS systems like Notion, Confluence, and Google Drive where cards have clear header/body/footer separation.
2026-02-28 14:15:28 +03:00
5b040f663c fix: Replace nested button with span in folder filter
Fixed React hydration error caused by button nested inside button.

ISSUE:
- Console error: 'In HTML, <button> cannot be a descendant of <button>'
- Folder dropdown button contained a reset filter button inside it
- This is invalid HTML and causes hydration mismatch

SOLUTION:
- Changed inner button to span element
- Added cursor-pointer for visual feedback
- Added role="button" for accessibility
- Added tabIndex={0} for keyboard navigation
- Added onKeyDown handler for Enter/Space key support
- Maintains full functionality and accessibility

LOCATION:
- frontend/src/app/documents/page.tsx:255-267
- Folder filter reset button

The fix ensures proper HTML structure while preserving all interactive functionality and accessibility features.
2026-02-28 14:00:03 +03:00
8ab14d79a1 feat: Make thumbnail conditional on fullscreen mode
- Changed Modal component to support render prop pattern (children as function)
- Modal children can now receive isFullscreen state as parameter
- Changed modal size from 'xl' to 'lg' for compact default view
- Thumbnail now only shows when modal is in fullscreen mode
- In normal mode: single column with metadata and 'Open file' button
- In fullscreen mode: two columns with metadata (left) and thumbnail (right)
- Provides progressive disclosure: compact view first, expanded view on demand
2026-02-28 13:41:21 +03:00
640584be30 feat: Add two-column layout to document details modal
- Left column: metadata and information (2/3 width)
- Right column: document thumbnail preview (1/3 width)
- Thumbnail supports: images (direct display), PDFs (iframe), other files (icon placeholder)
- Added 'Open in full size' button in thumbnail section
- Removed separate file open button from main content
- Sticky positioning for thumbnail on scroll
- Responsive: single column on mobile, two columns on large screens
- Changed modal size from 'lg' to 'xl' for better layout
2026-02-28 13:37:38 +03:00
cea3db4203 feat: Enhance document details modal with comprehensive metadata
- Added metadata grid with author, creation date, file info, and file size
- Added folder location section with FolderOpen icon
- Enhanced recipients section with departments and individual recipients
- Added visual indicators with colored icon badges
- Improved layout with better spacing and visual hierarchy
- File open button now full-width for better visibility
- Shows up to 10 individual recipients with overflow indicator
2026-02-28 13:36:25 +03:00
a92a7dcdcd feat: Improve modal functionality with advanced UX features
New features:
- Create reusable Modal component with animations
- Add useModal hook for common modal behaviors
- Add useClickOutside hook for backdrop clicks
- Implement ESC key handling for all modals
- Add focus trap to prevent focus escaping modals
- Add body scroll locking when modals are open
- Add fullscreen toggle option for modals
- Add fade-in/scale animations for smooth transitions

Modal improvements:
- Upload modal: converted to use new Modal component
- Document details modal: converted to use new Modal component
- Create folder modal: converted to use new Modal component
- Acknowledgements report: enhanced with modal hooks

Technical details:
- Modal sizes: sm, md, lg, xl, full
- Configurable close behavior (ESC, click outside, close button)
- Automatic scrollbar width compensation
- Focus restoration after modal close
- Accessible with ARIA attributes and keyboard navigation
2026-02-28 13:22:42 +03:00
6def6d2d43 feat: Improve folders UI with breadcrumbs and document counts
Backend improvements:
- Add document_count annotation to FolderViewSet queryset
- Add document_count field to FolderSerializer

Frontend improvements:
- Add folder_path display in document cards with folder icon
- Add document count badges in folder tree
- Add breadcrumbs navigation showing current folder path
- Improve folder selector button to show selected folder name
- Add clear filter button (X) to folder selector
- Add highlighted style for selected folder in selector
- Update Document interface to include folder and folder_path fields

UI enhancements:
- Folder path shown in sky-blue color with FolderOpen icon in cards
- Document count displayed in gray badge next to folder names
- Breadcrumbs allow quick navigation back to root
- Selected folder highlighted with sky-blue background
- Visual feedback for folder selection state
2026-02-28 13:15:06 +03:00
f4b5b75c01 feat: Implement folder-document integration and acknowledgements UI
Backend changes:
- Add acknowledgement_required field to Document model (migration 0009)
- Add FolderViewSet with CRUD endpoints for folder management
- Add folder_id filtering support in DocumentViewSet.get_queryset()
- Register folders endpoint in API router

Frontend changes:
- Add DocumentAcknowledgementsReport component for viewing acknowledgement status
- Add folder_id parameter to getDocuments API method
- Add currentFolderId prop to DocumentUploadForm
- Update document creation to save to selected folder
- Add folder filtering in documents list view
- Fix PDF worker loading (use local worker instead of CDN)
- Lock pdfjs-dist version to 5.4.296 to prevent conflicts
- Add postinstall script to copy PDF worker to public/

Features:
- Hierarchical folder structure with parent-child relationships
- Filter documents by selected folder
- Upload documents to specific folders
- View acknowledgement statistics with search and export
- Local PDF worker for reliable document preview
2026-02-28 13:06:41 +03:00
8e872b3593 feat(documents): Full integration - Folder Tree + All Phase 4 components
MAJOR UPDATE: Complete documents page overhaul with all advanced features!

Frontend Integration:
- Created FolderTree component (hierarchical folder navigation)
- Added sidebar with folders and quick navigation
- Integrated Dashboard view (toggle between Documents/Dashboard)
- Added Advanced Search toggle (simple/advanced modes)
- Integrated BulkActionsToolbar with multi-select checkboxes
- Added EnhancedPDFViewer for PDF files
- Select All checkbox for bulk operations
- Folder filtering support

New Components:
- FolderTree: Expandable tree with CRUD actions
- Sidebar: Folders + Quick navigation menu
- View Modes: Documents | Dashboard tabs

Updated documents/page.tsx:
- 2-column layout: Sidebar + Main content
- Bulk selection with useDocumentSelection hook
- Enhanced PDF preview for .pdf files
- Regular preview for other files
- Folder-based filtering
- Toggle sidebar visibility
- All Phase 4 components integrated

Features Now Available:
✅ Hierarchical folder navigation
✅ Bulk operations (select all, multi-select)
✅ Enhanced PDF viewer with zoom/rotate/search
✅ Advanced search with filters
✅ Dashboard with analytics
✅ Document acknowledgements (already present)
✅ Workflow buttons
✅ Status filtering

What Users Can Now See:
1. Folder tree in sidebar
2. Documents with checkboxes
3. Bulk actions toolbar when items selected
4. Advanced search option
5. Dashboard tab
6. Enhanced PDF viewer for PDFs
7. Select all functionality

Branch: feature/django-filer-documents
2026-02-28 09:51:37 +03:00
856e08db4a fix(documents): Исправлена кнопка открытия файла и удален document_type
- Добавлена закрывающая скобка } в onClick handler
- Добавлено содержимое кнопки с иконкой Eye
- Удален блок отображения document_type (поле не существует в модели)
2026-02-28 08:48:39 +03:00
15e1367042 fix(documents): Исправлена синтаксическая ошибка в page.tsx
- Добавлен пропущенный символ < в открывающем теге div
- Удалена проверка на несуществующее поле doc.tags
2026-02-28 08:47:48 +03:00
1a86e61341 fix(documents): Упрощение формы загрузки - удалены document_type и tags
- Убраны поля document_type и tags из DocumentUploadForm
- Обновлен API клиент: createDocument и updateDocument без этих полей
- Обновлены TypeScript типы в api.ts
- Убраны document_type и tags из отображения в documents/page.tsx
- Форма теперь принимает только: title, description, file
2026-02-28 08:45:47 +03:00
12f3b7b81b feat(frontend): Полная интеграция документов с django-filer и django-fsm
- Установлены библиотеки: react-dropzone, react-pdf, pdfjs-dist, react-file-icon, @tanstack/react-table
- Обновлены TypeScript типы для Document + FSM статусы
- Обновлен API клиент: CRUD операции, FSM переходы, подтверждение прочтения
- Создан DocumentUploadForm: drag&drop загрузка файлов
- Создан DocumentStatusBadge: цветные статусы (draft/in_review/approved/published/archived/rejected)
- Создан DocumentWorkflowButtons: динамические кнопки FSM переходов
- Создан DocumentPreview: встроенный просмотр PDF с навигацией
- Создан DocumentAcknowledgement: подтверждение прочтения с комментариями
- Обновлена страница documents: фильтры, модальные окна, workflow UI
- Добавлена документация в DOCUMENTS_IMPLEMENTATION.md
2026-02-28 08:30:11 +03:00
3651554d9e Альфа версия 2026-02-24 13:11:32 +03:00
2d16c526f5 feat: update messaging UI and online status indicators 2026-02-20 13:22:40 +03:00
ce78f7481f feat: Улучшенный UI с компонентом AppShell
- Добавлен компонент AppShell с Header, Sidebar, Calendar
- Установлен lucide-react для современных иконок
- Обновлены все страницы: главная, login, employees, documents, etc
- Единый дизайн с PageHeader и переиспользуемыми элементами
- Улучшенная навигация с активными ссылками
- Responsive design с sticky элементами
- Градиентный фон и современные shadow/ring эффекты
2026-02-19 14:17:20 +03:00
d19bb560ea feat: Полная интеграция Next.js frontend с Docker orchestration
- Создан Next.js 16 frontend приложение с TypeScript и Tailwind
- Настроена Docker инфраструктура (docker-compose с 7 сервисами)
- Добавлен nginx reverse proxy для маршрутизации frontend/backend
- Реализован полный API client с JWT авторизацией
- Интегрированы страницы: login, register, feed, employees
- Переименована папка corp.front → frontend
- Исправлены проблемы с trailing slash в Django APPEND_SLASH
- Добавлена документация: DOCKER_ORCHESTRATION.md, INTEGRATION_GUIDE.md

Архитектура:
- nginx:80 → frontend:3000 (Next.js) + web:8000 (Django API)
- PostgreSQL 16 + Redis 7 для backend
- Celery worker + beat для фоновых задач
- JWT authentication через SimpleJWT
2026-02-19 13:51:19 +03:00