¶ In-App Inbox
The Notifications screen. The database writes a row to notifications_inbox, and the app shows it straight away through a live connection. It works even if push is turned off.
Staff are told about approvals, rejections, reminders, and required updates through three channels: the in-app inbox, push notifications on the phone, and WhatsApp.
The Notifications screen. The database writes a row to notifications_inbox, and the app shows it straight away through a live connection. It works even if push is turned off.
A banner on the phone. The app registers the phone's push token when the staff member signs in, and removes it when they sign out.
Sent through the ReplyBox queue. Used for reminders that must reach staff who are not opening the app.
expo_push_tokens. Signing out deletes every token for that user, so a shared phone stops receiving their notifications.
Push is not registered on simulators or emulators. Test push on a real phone.
On Android, notifications need a notification channel, which the app creates. Without it, Android 8 and later drops every notification.
On iOS, notifications that arrive while the app is open still show as a banner.
Notification settings has a button to open the phone's system settings, and a test notification.
Tapping a notification opens the matching screen in the app.
/manager-workspace/overtime-approvals/<id>. The app translates these into the matching mobile screen.
If no screen matches the address, the app uses words in the title such as "leave", "overtime", "claim", or "advance salary" to pick a screen.
It works when the app is already open, and when the app was closed and is started by tapping the notification.
WhatsApp messages do not contain tappable links. They tell staff to open the app.
| Reminder | When | Channels | Rule |
|---|---|---|---|
| Missed clock-out | Every day at 07:00 Malaysia time | Inbox and WhatsApp | Repeats daily until the staff member submits a correction. Sent at most once a day. Push for this reminder is built but not switched on yet. |
| Early arrival (Post OT) | When a Post OT employee clocks in 60 minutes or more before their roster | Manager's inbox and WhatsApp | For information only. See Overtime. |
| Required update | When a new version is made required | Push | See Mobile Build & Release. |
| Code | Purpose |
|---|---|
src/features/notifications/providers/NotificationsInboxProvider.tsx | Loads the inbox and keeps it live. |
src/shared/lib/notifications/registerExpoPushToken.ts | Saves and removes push tokens. |
src/shared/lib/notifications/expoNotifications.ts | Push setup, the Android channel, and tap handling. |
src/shared/lib/notifications/resolveNotificationRoute.ts | Turns a notification address into a mobile screen. |
queue_missed_clock_out_reminders_v1 | The 07:00 reminder job. |
docs/missed-clock-out-reminder.md | Full design notes for the reminder, in the mobile repository. |