63 Commits

Author SHA1 Message Date
lizerk
35a7250183 refactor(ui): polish chat, requests, and profile actions 2026-04-14 23:11:32 +03:00
lizerk
70d2c55348 refactor(ui): polish department feed and mobile nav placement 2026-04-14 19:11:17 +03:00
lizerk
beb4b8b86b refactor(departments): unify department feed and discussion flows 2026-04-14 16:14:52 +03:00
lizerk
858448512e fix(frontend): parse department api validation errors 2026-04-14 02:10:20 +03:00
lizerk
4e0f1c7889 fix(frontend): localize department member validation 2026-04-14 01:57:25 +03:00
lizerk
a4910421c3 refactor(frontend): use people picker in department modal 2026-04-14 00:28:06 +03:00
lizerk
ad4f5cc37f fix(frontend): load active department candidates correctly 2026-04-14 00:22:37 +03:00
lizerk
edc770dc83 fix(frontend): surface department employee loading errors 2026-04-14 00:14:55 +03:00
lizerk
d1a7eedcee refactor(frontend): extend department member modal 2026-04-14 00:10:15 +03:00
lizerk
852ac367c0 fix(frontend): stabilize department add-member modal 2026-04-13 23:57:55 +03:00
lizerk
37927b0ecf refactor(frontend): add department action menu 2026-04-13 23:20:20 +03:00
lizerk
fbdc49aa5b refactor(frontend): remove department member search 2026-04-13 22:58:18 +03:00
lizerk
54b7fc498e refactor(frontend): hide inactive department members 2026-04-13 22:31:21 +03:00
lizerk
3b855e2ef1 refactor(frontend): split department showcase and management 2026-04-13 22:25:30 +03:00
lizerk
28d61b842c refactor(frontend): build department management screen 2026-04-13 17:52:41 +03:00
lizerk
48e44d022f fix(frontend): avoid full reload on search input 2026-04-13 17:35:27 +03:00
lizerk
07ded50432 refactor(frontend): extract settings page controller 2026-04-13 14:44:38 +03:00
lizerk
fe040e2da9 refactor(frontend): align profile page controllers 2026-04-13 14:15:34 +03:00
lizerk
61db827ae2 refactor(frontend): tighten requests controls contract 2026-04-13 13:23:16 +03:00
lizerk
2cfa1099f3 refactor(frontend): normalize requests list shell 2026-04-13 13:17:34 +03:00
lizerk
8b150e270d refactor(frontend): extract requests screen orchestration 2026-04-13 13:11:58 +03:00
lizerk
331dc1433a refactor(frontend): decompose requests screen 2026-04-13 12:56:00 +03:00
lizerk
bac7c65062 feat(equipment): create categories inline in modal 2026-04-13 04:14:10 +03:00
lizerk
af423d8d0a feat(procurement): tighten approval flow and request actions 2026-04-13 02:55:26 +03:00
lizerk
44da9c46c1 feat(ui): unify action menus and procurement comments 2026-04-12 20:07:34 +03:00
lizerk
ae7e1daf89 refactor(frontend): align profile, notifications and procurement flows 2026-04-12 18:02:47 +03:00
lizerk
e3ba6ea925 refactor(ui): stabilize equipment deep links and qr flow 2026-04-12 16:09:38 +03:00
lizerk
1552bbe84b fix(requests): confirm destructive actions and align surfaces 2026-04-12 07:19:12 +03:00
lizerk
db05b4fcdb refactor(frontend): align calendar and list UI 2026-04-11 20:44:16 +03:00
lizerk
111ddb2bfd Refactor modals and add chat message search 2026-04-03 19:53:31 +03:00
lizerk
e80412918d Refactor chat frontend and optimize chat queries 2026-04-03 17:05:14 +03:00
lizerk
3d99226296 Fix chat list pagination in frontend 2026-04-03 14:25:41 +03:00
lizerk
c5f53cca15 Improve chat delivery states and read details 2026-04-03 11:10:14 +03:00
lizerk
d1aea28be9 Add websocket read receipts and AsyncAPI docs 2026-04-03 09:55:10 +03:00
lizerk
e3e195c89d Add user detail components and hook 2026-04-02 10:22:46 +03:00
lizerk
d1574dfd31 Refactor equipment page orchestration 2026-04-01 18:39:10 +03:00
lizerk
19f6f660b0 refactor: extract procurement page orchestration into hook
- add useProcurementPage hook for loading, filters, modal state and workflow actions
- keep procurement page focused on rendering and section layout
- preserve existing UI behavior while removing API/state orchestration from page component
- frontend checks: eslint clean, TypeScript typecheck clean
- backend checks: realtime websocket smoke, procurement and equipment suites green
2026-04-01 16:34:04 +03:00
lizerk
0a80eb86cf refactor: extract shared utils/components, split requests page data into hook
- Create frontend/src/lib/shared/ with formatters, userUtils, paginationUtils
  (formatDate, formatMoney, displayUserName, userProfileLink, extractNextPage, loadAllPages)
- Create frontend/src/components/shared/SearchableSelect.tsx
  (SearchableSelectSingle + SearchableSelectMulti, replaces 3 inline copies)
- Extract requests page data/state/actions into useRequestsPage hook
  (requests/page.tsx: 1580 → ~280 lines of pure JSX)
- Replace duplicated helpers in equipment/page.tsx with shared imports
  (~80 lines removed: formatDate, formatMoney, displayUserName, extractNextPage,
   loadAllPages, inline SearchableSelectSingle)
- Replace duplicated helpers in procurement/page.tsx with shared imports
  (~90 lines removed: fmt, money, displayUserName, extractNextPage,
   inline departments loader, inline SearchableSelectSingle)
- 609 backend tests pass, TypeScript typecheck clean, ESLint clean
2026-04-01 16:21:02 +03:00
lizerk
3ca4d108b6 refactor: split monolithic api.ts into domain modules, extract AppShell calendar/mobile concerns
- Split frontend/src/lib/api.ts (2042 lines) into 12 focused domain modules:
  client.ts (base HTTP/auth), calendar.ts, documents.ts, employees.ts,
  equipment.ts, feed.ts, messages.ts, notifications.ts, procurement.ts,
  requests.ts, utils.ts, and index.ts barrel that preserves all existing imports
- Extract calendar modal state from AppShell into useCalendarModals hook
- Extract CalendarModals and MobileDrawers into components/layout/
- AppShell: 745 → 460 lines, focused on layout concerns only
- Fix setState-in-effect lint error with startTransition pattern
- Stabilize notifications memo to prevent unnecessary re-renders
- Fix flaky WS test: handle CancelledError in channels-testing cleanup
- All 609 backend tests pass, TypeScript typecheck clean, ESLint clean
2026-04-01 15:56:10 +03:00
lizerk
a8ec339565 Refactor chat settings and tighten frontend types 2026-04-01 15:31:19 +03:00
lizerk
613248905e Refactor realtime sync and message UI 2026-04-01 15:20:27 +03:00
lizerk
e414358e76 фикс веб пуш 2026-03-13 12:52:40 +03:00
lizerk
9462f08825 оптимизация веб сокет 2026-03-12 00:42:10 +03:00
lizerk
6fe7eeb222 feat: добавлены realtime бэйджи с уведомлениями в боковую панель
- Исправлена логика подсчёта уведомлений по категориям (n.verb вместо n.category)
- Добавлена синхронизация между компонентами через CustomEvent API
- Реализована автоматическая отметка категории уведомлений при переходе в раздел
- Backend: универсальный endpoint /category/read/ принимающий список verbs
- Frontend: функция getVerbsByCategory() для маппинга категорий
- Счётчики обновляются в реальном времени через WebSocket
- Синхронизация работает между всеми вкладками браузера

Модуль уведомлений остался переиспользуемым - категории управляются на фронте
2026-03-11 08:48:26 +03:00
lizerk
8838b09737 feat: оптимизация загрузки уведомлений и счетчиков чатов
Frontend изменения:
- Оптимизирована загрузка уведомлений: только 50 unread для badges
- Упрощены проверки is_read в AppShell и NotificationCenter
- Разделены useNotifications (для badges) и notifications page (для списка)
- Добавлены визуальные индикаторы в список чатов (badges, pin, notifications)
- Улучшена сортировка: закрепленные чаты показываются первыми

Связано с backend оптимизацией denormalized unread_count
2026-03-10 18:09:43 +03:00
lizerk
a5f61b48c9 фикс фронта 2026-03-10 08:15:13 +03:00
lizerk
ed636081dc refactor: complete notifications v2 system with frontend translation
- Remove hard-coded Russian translations from backend API
- Backend now returns raw verb values (language-agnostic)
- Implement frontend translation functions for notification titles and categories
- Add category badge system with filters on notifications page
- Create translation utilities in frontend (verbTranslations.ts)
- Add notification settings page structure
- Update API endpoints to return simplified notification data
- Refactor notification signals across all apps
- Remove deprecated code and tests
- Add comprehensive documentation for v2 migration

Backend changes:
- notifications/api/views.py: Remove translation logic, simplify responses
- All notification_signals.py: Update to use consistent patterns
- Remove deprecated Telegram bot command
- Update Celery tasks for new notification structure

Frontend changes:
- app/notifications/page.tsx: Add translation functions and category badges
- hooks/useNotificationWebSocket.ts: New WebSocket hook for real-time updates
- lib/verbTranslations.ts: Centralized translation mappings
- components/NotificationCenter.tsx: Update to use new API format

This makes the notifications module fully reusable and project-independent.
2026-03-09 21:35:36 +03:00
lizerk
1972f89bea fix: исправлено получение уведомлений из бэкенда
- Фронтенд: добавлена обработка поля 'notifications' (бэкенд возвращает { notifications: [...] })
- Фронтенд: исправлены URL endpoints для отметки прочитанным (/read/ вместо /mark_read/)
- Бэкенд: добавлено поле 'short_message' в ответ API для корректного отображения превью
2026-03-09 09:51:00 +03:00
lizerk
ebe42a4d40 Merge branch 'frontend/Kostya' into develop
# Conflicts:
#	frontend/src/app/page.tsx
#	frontend/src/app/requests/page.tsx
#	frontend/src/lib/api.ts
2026-03-06 13:37:23 +03:00
95a0ad8293 + 2026-03-05 16:47:08 +03:00