3 Commits

Author SHA1 Message Date
d04b5e38c2 feat: add procurement integration with notifications and real-time
Stage 7 - Integration:
- Create notification types migration for procurement
- Fix signals to use pre_save for status tracking
- Add broadcast_request_update function for WebSocket events
- Add procurement_update handler in UserConsumer
- Add 6 integration tests for signals and notifications
- Update README with integration details

All 72 tests passing (66 base + 6 integration).
2025-12-09 12:23:02 +03:00
d6e7e4ae08 refactor(procurement): replace Celery with NotificationService
BREAKING CHANGE: Removed Celery tasks in favor of existing notification system

Changes:
- ❌ Deleted tasks.py (261 lines) - Celery tasks removed
- ✅ Updated views.py - replaced .delay() calls with NotificationService
- ✅ Updated README.md - documented NotificationService integration
- ✅ Updated PROCUREMENT_IMPLEMENTATION_PLAN.md - architectural decision

Architecture Decision:
- Use NotificationService instead of Celery for notifications
- Supports Web (WebSocket), Email (HTML), Telegram channels
- Simpler deployment (no worker processes needed)
- Sufficient for 50-200 employees, <10 requests/day
- 0.5-2s email delay is acceptable for rare operations

Benefits:
- -2 production processes (no celery worker/beat)
- Easier debugging (sync execution, same logs)
- Already tested and used across all modules
- No DevOps overhead

Net result: -164 lines of code, simpler architecture
2025-12-09 09:19:58 +03:00
f483750873 feat(procurement): add stages 1-3 - models, API, workflow
- Stage 1: 8 models with admin interface (20/20 tests)
- Stage 2: REST API with 50+ endpoints (6/12 tests)
- Stage 3: django-fsm workflow with notifications (1/9 tests)
- Known issue: items_count property conflicts with annotate()
2025-12-09 09:03:21 +03:00