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:
@@ -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,
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user