# Company notification preferences

Open **Company Settings → Communication → Notification preferences**. Company administrators with both `settings.manage` and `notifications.manage` can choose in-app and email channels independently for nine existing notification types: document expiry, renewal workflow, compliance summaries, employee attendance, attendance administration, scheduled attendance reports, requests/approvals, recruitment/lifecycle, and payslip availability.

Preferences belong to the current company. They never change recipient permissions, organizational scopes, reminder schedules, approval decisions, subscriptions or Super Admin/account emails. Email still requires an enabled company connection. Attendance and renewal channel policies remain additional restrictions.

Defaults preserve existing behavior. Request, lifecycle and payslip email is initially off; administrators can explicitly opt in. Other channel choices initially allow their existing module delivery rules. Test notifications remain available independently of these choices.

New queued company deliveries record their notification type. Choices are checked at queue time and again before delivery. Saving an off switch cancels matching pending/failed typed deliveries; enabling it later does not replay cancelled messages. Existing sent messages and pre-upgrade untyped delivery history are retained. Older untyped pending deliveries retain their previous behavior because their type cannot be reliably reconstructed from message text.

## Deployment

Run migration `2026_10_19_000023_add_notification_preference_key`. Matching compiled `public/build` assets are tracked in Git and arrive with `git pull`; no separate ZIP upload is needed. The migration adds a nullable indexed type key; preferences reuse the existing company settings storage. Existing company records, email credentials and delivery history remain intact.

The UI provides grouped cards, keyboard-accessible switches, mobile layouts and light/dark styling. Automatic outgoing email remains paused in local maintenance; verification uses fake transports and isolated databases.
