feat(notifications): bell alerts for assigned leads and web sign-ups

InvitationWiringTest registers StaffNotifier and asserts it is wired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-12-02 19:54:57 +08:00
1 parent 66e2e488d9
commit e3f08bc6cf
12 files changed
+495 -8

No files matched your search

@@ -302,6 +302,16 @@ class AdminEventLeadServiceTest {
.containsEntry("eventUuid", String.valueOf(EV)).containsEntry("leadType", "NEW").containsEntry("mobile", "+60123456789");
}
@Test
void captureAndUpdateSendTheActingUsersIdSoSelfAssignmentIsSilent() {
// add-lead-notifications: the counter skips the bell when the actor is the new salesperson.
service.capture(String.valueOf(EV), capture(null, "Aisyah", "+60 12-345 6789", null));
assertThat(sent(CAPTURE)).containsEntry("doneByUserId", 21L);
stubStored(EV, 23L, List.of());
service.update(String.valueOf(EV), String.valueOf(EL), new AdminEventLeadUpdateRequest(23L, null, "CONTACTED", List.of(), null, null));
assertThat(sent(UPDATE)).containsEntry("doneByUserId", 21L);
}
@Test
void neitherMobileNorEmailIsRefusedNamingBoth() {
assertThatThrownBy(() -> service.capture(String.valueOf(EV), capture(null, "Aisyah", "", " ")))