Wire all cross-module integrations: events, enforcement, dashboard, scheduled jobs
Money flows:
- Payslip paid → double-entry financial transaction (debit salary expense / credit cash)
- POS sale → inventory movements for tracked products
- Enrollment → auto-invoice via PricingService
- Invoice overdue detection enhanced with balance guard
Operational events (previously empty → now wired):
- AssignmentCreated → generate trainer attendance expectations
- AssignmentEnded → remove future trainer attendance
- FacilityStatusChanged → cancel reservations on maintenance
- PurchaseOrderReceived → create receiving inventory movements
- StockCountCompleted → process count adjustments
- KitAssembled → deduct component stock
- InventoryMovementCreated → check low stock threshold
Business rule enforcement:
- Medical certificate enforcement at attendance time (configurable)
- Group capacity check + auto-waitlist on enrollment
- Participant status blocking (frozen/suspended can't enroll)
- Attendance threshold from settings (not hardcoded)
Dashboard rebuilt with actionable data:
- Today's sessions, trainers present, payments, active participants
- Needs-attention cards (overdue invoices, pending approvals, expired docs)
- Today's schedule with take-attendance buttons
- Recent payments feed + quick action buttons
Scheduled jobs:
- attendance:auto-absent (hourly)
- documents:expire (daily 06:00)
- payments:detect-defaults (daily 08:00)
- attendance:send-alerts (daily 20:00)
Co-Authored-By:
Claude Opus 4.6 <noreply@anthropic.com>
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment