Where a notification opens
Where a Hub bell click goes for each notification type, and who receives each notice.
Channels per type are on Channels. This page covers where a bell click goes and who receives each notice. Read in the code; no notification was sent.
A bell click gets a route only from notificationLink in the Hub; any stored URL is ignored. When a branch needs an id it doesn't have, or the type has no branch, the function returns null: the row still shows in the bell but clicking it goes nowhere.
Destinations
| Types | Opens | Missing data |
|---|---|---|
SCHEME_GROUP_INVITE | Staff schemes of work for campusId, label View invitation | No campus id |
CLASS_TEACHER_ASSIGNED | That class, label Open class | No campus id or no class id |
RECORD_OF_WORK_APPROVED, RECORD_OF_WORK_RETURNED | That record, label Open record | No campus id or no record id |
PAYMENT_AWAITING_APPROVAL | That bursary account, label Review payment | No campus id or no account user id |
SCHOOL_PAY_UNMATCHED | That campus SchoolPay inbox, label Open inbox | No campus id |
TIMETABLE_RELEASED, TIMETABLE_CHANGED | That campus timetable, label Open timetable | No campus id |
TERM_REPORTS_RELEASED | /guardian/hub, label View grades | Never null. Students are sent there too |
YEAR_ENROLMENT_OPENED, GUARDIAN_WELCOME | /guardian/hub | Unused: these types aren't sent in-app, so no bell row exists |
| Five library types | Students: /student/library. Staff: the campus library. Label Collect your book (hold ready) or Open library | A guardian, or staff with no campus id |
NOTICE_BOARD_PUBLISHED | Students: /student/notice-board. Everyone else, staff included: /guardian/notice-board. Both open ?notice={noticeId}. Label Read notice | No notice id |
Every other type returns null: scheme and lesson-plan approval, both academic-report types, SCHOOL_REPORT_READY (despite carrying campusId), admissions, enquiry replies, and the fee and payment types other than the two bursary rows above.
Who is told
In every case below a failed notice is logged and does not undo the write that triggered it, unless noted.
| Feature | Recipients | Skipped when | Code |
|---|---|---|---|
| Record of work returned or approved | The submitter (forceApprove: the open revision's submitter, else the creator). The return carries reason | No school, no user id, or the recipient is the person acting | record-of-work-approval.service.ts |
| Ledger notices: charges raised, payment reversed, charge adjusted, due and overdue reminders | The account holder; for a student, their verified guardians if any | A single charge with a resourceId sends no CHARGES_RAISED. Admission-fee reminders go to the account user only | ledger-notice.notifier.ts |
| Payment failed, rejected or awaiting verification | The payer | ledger-notice.notifier.ts | |
| Payment awaiting approval | The payer, plus staff who can approve or manage the ledger on that campus | The recorder is left out; no campus means no staff notice | ledger-notice.notifier.ts |
| Unmatched SchoolPay payment | Staff who can create or manage the ledger | No such staff | ledger-notice.notifier.ts |
| Payment received | The payer | PaymentReceivedNotifier | |
| Library hold ready or lapsed, renewal, due soon, overdue | The borrower | A reservation that is not promoted. The sweep uses commit, which throws so it retries | library-notifier.service.ts |
| Scheme group invite | Teachers of the subject on each invited stream, one notice per stream | No school or no user id, per stream | scheme-group.service.ts |
| Scheme returned | The submitter | The submitter is the returner | scheme-approval.service.ts |
| Scheme approved | The approver and, if different, the submitter (forceApprove: the creator) | forceApprove marks an open revision returned (Superseded by administrative approval) but sends no returned notice | scheme-approval.service.ts |
| Lesson plan approved | The approver and, if different, the author | lesson-plan.service.ts | |
| Class teacher assigned | The assigned staff user | ClassTeacherService | |
| Enquiry reply | enquiry.userId | WhatsApp is skipped when someone is already watching | EnquiryService |
Admission letters (received, approved, offer, rejected, enrolled) and ADMISSION_STARTED | application.userId | notify: false, or no school. Email links go to /guardian/letters for a guardian, else /guest/letters | admission-letter.service.ts, admission-application.service.ts |
| Guardian welcome | guardian.userId | GuestService | |
| Notice board published | Active students and verified guardians of active students matching the notice's roles, campus and level, class or stream targets (none means the whole campus, or school) | An expired notice, or no recipients (count stored as zero). A failure clears the claim so the next run retries | publish-notices.sweep.ts, notice-audience.service.ts |
| Academic report approved | The approver and, if different, report.submittedBy | report-card.service.ts | |
| Academic report released | Guardians of the students | report-card.service.ts | |
| Year enrolment opened | Verified guardians of students with an active or pending enrolment in the campus's current year | Only the run that opens the year; a manual open only while the year is open and unlocked | open-year-enrolment.sweep.ts |
| School report ready | Active users who can list or manage school_report (or all). School-wide holders get one notice; campus holders one per campus document | Already covered by the school-wide notice; no holders | school-report-notifier.service.ts |