feat: orgs trigger alert when loading a calendar and no availability is (#14796)
* Install upstash redis again - base of noficationSender * Setup email handler etc and use tasker * Remove logs * Sending emails and correct format and spacing in emails * Update email styles * Update email styles * add switch to enable feature * fix: reset tasker types - will fix in new PR * WIP: test suite * WIP: test suite * Add redis service and add WIP mock test * Add tests for redis service and fix lpush * More working tests * More working tests * fix: type error + typo * update export to match i18n next mock * (debug) push for debug * Fix: fixed hosting in mocks * Add common.json i18n * add better test descriptions * reset mocks after each test to allow concurancy * Remove redundant RedisService.test.ts * Rename and remove redundant isAdmin check * Rename to .d.ts * Add key versioning to constructRedisKey * Update packages/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots.ts Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * Update packages/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots.ts Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * Add try/catch * fix breaking when option === undefined * Add missing await to Promise.all * Rename data stored in redis to save space * Include thrown error in logs --------- Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
This commit is contained in:
19 files changed
+508
-10
No files matched your search
@@ -65,6 +65,7 @@
|
||||
"@tremor/react": "^2.0.0",
|
||||
"@types/turndown": "^5.0.1",
|
||||
"@unkey/ratelimit": "^0.1.1",
|
||||
"@upstash/redis": "^1.21.0",
|
||||
"@vercel/edge-config": "^0.1.1",
|
||||
"@vercel/edge-functions-ui": "^0.2.1",
|
||||
"@vercel/og": "^0.5.0",
|
||||
|
||||
@@ -2333,6 +2333,13 @@
|
||||
"date": "Date",
|
||||
"overlaps_with_existing_schedule": "This overlaps with an existing schedule. Please select a different date.",
|
||||
|
||||
"org_admin_no_slots|subject": "No availability found for {{name}}",
|
||||
"org_admin_no_slots|heading": "No availability found for {{name}}",
|
||||
"org_admin_no_slots|content": "Hello Organization Admins,<br /><br />Please note: It has been brought to our attention that {{username}} has not had any availability when a user has visited {{username}}/{{slug}}<br /><br />There’s a few reasons why this could be happening<br />The user does not have any calendars connected<br />Their schedules attached to this event are not enabled<br /> <br />We recommend checking their availability to resolve this.",
|
||||
"org_admin_no_slots|cta": "Open users availability",
|
||||
"organization_no_slots_notification_switch_title": "Get notifications when your team has no availability",
|
||||
"organization_no_slots_notification_switch_description": "Admins will get email notifications when a user tries to book a team member and is faced with 'No availability'. We trigger this email after two occurrences and remind you every 7 days per user. ",
|
||||
|
||||
"email_team_invite|subject|added_to_org": "{{user}} added you to the organization {{team}} on {{appName}}",
|
||||
"email_team_invite|subject|invited_to_org": "{{user}} invited you to join the organization {{team}} on {{appName}}",
|
||||
"email_team_invite|subject|added_to_subteam": "{{user}} added you to the team {{team}} of organization {{parentTeamName}} on {{appName}}",
|
||||
|
||||
Reference in new issue
Block a user