# HRMS Notifications

Categories are defined in `config/hrms_notifications.php`. Users toggle email delivery per category on **Settings → Profile**.

## Categories

| Key | Events |
|-----|--------|
| `leave` | Submitted, approved, rejected; low balance (scheduled) |
| `expense` | Submitted, reviewed |
| `resignation` | Submitted, status changed |
| `offboarding` | Checklist assigned, clearance complete, LWD deactivation digest, **assets not returned** |
| `fnf` | Pending approval, approved, paid |
| `income_tax` | Declaration submitted/reviewed |
| `payroll` | Generation complete, import complete |
| `attendance` | Regularization requested/reviewed |
| `hr_recognition` | Appreciation received |
| `forms` | Form submitted, submission reviewed |
| `announcements` | New active announcement |
| `complaints` | Submitted, status changed |
| `subscription` | Offline request approved/rejected |
| `performance` | Review due (scheduled) |

## Delivery

- **In-app:** Always stored in `notifications` table (bell icon).
- **Email / FCM:** Respects user preferences; sent **after the HTTP response** via `defer()` / `AfterResponse` (same process — **no queue workers**).

## Commands

```bash
php artisan hrms:send-proactive-alerts
php artisan leads:send-due-followup-reminders
```
