MED-82: add patient notification emails (#74)

* MED-82: add patient notification emails

* remove console.log

* clean up

* remove extra paragraph from email
This commit is contained in:
Helena
2025-09-09 10:37:22 +03:00
committed by GitHub
parent d00449da29
commit ca13e9e30a
37 changed files with 718 additions and 179 deletions

View File

@@ -126,7 +126,7 @@ export const giveFeedbackAction = doctorAction(
if (isCompleted) {
await createNotificationLog({
action: NotificationAction.DOCTOR_FEEDBACK_RECEIVED,
action: NotificationAction.PATIENT_DOCTOR_FEEDBACK_RECEIVED,
status: 'SUCCESS',
relatedRecordId: analysisOrderId,
});
@@ -136,7 +136,7 @@ export const giveFeedbackAction = doctorAction(
} catch (e: any) {
if (isCompleted) {
await createNotificationLog({
action: NotificationAction.DOCTOR_FEEDBACK_RECEIVED,
action: NotificationAction.PATIENT_DOCTOR_FEEDBACK_RECEIVED,
status: 'FAIL',
comment: e?.message,
relatedRecordId: analysisOrderId,

View File

@@ -1,9 +1,9 @@
import z from 'zod/v3';
import { Database } from '@kit/supabase/database';
import z from 'zod';
export const doctorJobSelectSchema = z.object({
userId: z.string().uuid(),
userId: z.uuid(),
analysisOrderId: z.number(),
});
export type DoctorJobSelect = z.infer<typeof doctorJobSelectSchema>;