15 Commits

Author SHA1 Message Date
4f6244ab1f Fix CORP runtime errors and harden deployment and media access
Some checks failed
Deploy production / deploy (push) Failing after 2s
2026-09-10 16:40:08 +03:00
lizerk
dac0234007 Enforce repository-wide code quality 2026-09-07 19:43:48 +03:00
lizerk
cd64ee4ef7 Add project analytics and improve commerce integrations 2026-09-07 12:23:15 +03:00
lizerk
f3d2d2fe44 Hide excluded employees from UI-facing APIs and payroll workflows 2026-08-25 10:55:38 +03:00
lizerk
63ed6f6e38 Add search pagination and improve avatar and document overlays 2026-08-19 16:24:18 +03:00
lizerk
9462788220 Expand search indexing and visibility metadata 2026-08-19 15:23:05 +03:00
lizerk
cca52d70d6 Refactor project structure and remove obsolete code 2026-08-15 11:16:50 +03:00
lizerk
9b23f480c2 Refine search routing and deep links 2026-04-03 20:30:29 +03:00
lizerk
6ee32111db chore: configure vscode flake8 and commit lint cleanup 2026-03-31 19:17:56 +03:00
lizerk
2815efe069 chore: finalize backend lint cleanup 2026-03-31 17:53:29 +03:00
lizerk
3f59f8ebb9 Add backend OpenAPI docs and clean test suite 2026-03-31 17:05:31 +03:00
lizerk
2688df46ef Fix: Wrap all unsafe int() conversions with try/except
Fixed ValueError-prone int() calls in:
- communications/api/viewsets.py (4 places: limit, before_limit, after_limit)
- notifications/api/views.py (2 places: page, page_size)
- api/v1/search/views.py (1 place: limit)
- api/v1/procurement/views.py (1 place: quantity)
Also updated audit script to exclude .venv/
2026-03-20 09:10:33 +03:00
lizerk
95926151b0 фикс бага с поиском 2026-03-10 12:57:48 +03:00
1bd470c6a8 feat: расширен поиск - добавлены модели procurement, documents, notifications, schedule
- Добавлены 5 новых моделей в watson search:
  * ProcurementRequest (заявки на закупку)
  * Equipment (оборудование)
  * Document (документы)
  * Notification (уведомления)
  * Event из django-scheduler (расписание)

- Backend API: форматтеры для новых типов моделей
- Frontend: добавлены иконки и названия для новых типов
- Тесты: исправлены фикстуры, все 13 тестов проходят
- Индексы: 3895 записей проиндексировано

Итого: 12 моделей доступны для полнотекстового поиска
2026-02-27 19:02:15 +03:00
735babbd46 feat: Add frontend integration for watson search API
Backend:
- Created REST API endpoint /api/v1/search/
- Added SearchResultSerializer and SearchResponseSerializer
- Implemented search_api_view with model formatters (employee, department, post, request, chat, message, event)
- Registered search endpoint in api/v1/urls.py
- Added permission check for requests (HR can see all, users only their own)

Frontend:
- Added SearchResponse, SearchResult, SearchModelType types
- Added apiClient.search() method in lib/api.ts
- Completely rewrote search/page.tsx:
  * Single API call instead of 6 parallel requests
  * Cleaner UI with icons for each result type
  * Real-time search with loading states
  * Meta information display (email, phone, status, etc.)
  * Better performance and UX

Benefits:
- Frontend: 220 lines → 178 lines (19% reduction)
- 1 API request instead of 6 (83% less network calls)
- Server-side full-text search via watson (better relevance)
- Unified search results with metadata

Testing:
- API endpoint verified at /api/v1/search/?q=test
- Returns JSON with query, results, counts, total
- Requires authentication (IsAuthenticated decorator)
2026-02-27 18:27:36 +03:00