From 65d6f06cfeba12361c57e9cad4bc87e9f15a6964 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung Date: Thu, 10 Mar 2022 14:31:15 -0500 Subject: [PATCH] Map to singular time unit --- apps/web/components/booking/pages/BookingPage.tsx | 1 - .../pages/eventtypes/AttendeeReminderTypeForm.tsx | 6 +++--- packages/prisma/schema.prisma | 14 +++++++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsx index 51db130937..fef6773541 100644 --- a/apps/web/components/booking/pages/BookingPage.tsx +++ b/apps/web/components/booking/pages/BookingPage.tsx @@ -215,7 +215,6 @@ const BookingPage = (props: BookingPageProps) => { }; const bookEvent = (booking: BookingFormValues) => { - console.log("🚀 ~ file: BookingPage.tsx ~ line 218 ~ bookEvent ~ booking", booking); telemetry.withJitsu((jitsu) => jitsu.track(telemetryEventTypes.bookingConfirmed, collectPageParameters()) ); diff --git a/apps/web/components/pages/eventtypes/AttendeeReminderTypeForm.tsx b/apps/web/components/pages/eventtypes/AttendeeReminderTypeForm.tsx index 4d4c59b304..822c2d360a 100644 --- a/apps/web/components/pages/eventtypes/AttendeeReminderTypeForm.tsx +++ b/apps/web/components/pages/eventtypes/AttendeeReminderTypeForm.tsx @@ -31,9 +31,9 @@ const AttendeeReminderTypeForm: FC = (props) => { { value: EventTypeAttendeeReminderMethod.SMS, label: t("SMS") }, ]; const timeUnitOptions: OptionTypeBase[] = [ - { value: EventTypeAttendeeReminderTimeUnit.MINUTES, label: t("minutes") }, - { value: EventTypeAttendeeReminderTimeUnit.HOURS, label: t("hours") }, - { value: EventTypeAttendeeReminderTimeUnit.DAYS, label: t("days") }, + { value: EventTypeAttendeeReminderTimeUnit.MINUTE, label: t("minutes") }, + { value: EventTypeAttendeeReminderTimeUnit.HOUR, label: t("hours") }, + { value: EventTypeAttendeeReminderTimeUnit.DAY, label: t("days") }, ]; const { selectedAttendeeReminder } = props; const defaultValues = selectedAttendeeReminder || { type: methodOptions[0].value }; diff --git a/packages/prisma/schema.prisma b/packages/prisma/schema.prisma index f3c8f0aa2e..f52d87aa87 100644 --- a/packages/prisma/schema.prisma +++ b/packages/prisma/schema.prisma @@ -312,9 +312,9 @@ enum EventTypeAttendeeReminderMethod { } enum EventTypeAttendeeReminderTimeUnit { - MINUTES @map("minutes") - HOURS @map("hours") - DAYS @map("days") + MINUTE @map("minute") + HOUR @map("hour") + DAY @map("day") } model EventTypeAttendeeReminder { @@ -328,12 +328,12 @@ model EventTypeAttendeeReminder { model AttendeeReminder { id Int @id @default(autoincrement()) - bookingId Int @unique - booking Booking @relation(fields: [bookingId], references: [id]) + bookingUid String @unique + booking Booking @relation(fields: [bookingUid], references: [uid]) method String - referenceId Int + referenceId String scheduledFor DateTime - sent Boolean + scheduled Boolean } model ResetPasswordRequest {