+ )}
{!props.user.hideBranding && (
Create your own booking link with Calendso
@@ -237,7 +253,7 @@ export async function getServerSideProps(context) {
{
id: parseInt(context.query.type),
},
- ["id", "title", "description", "length", "eventName"]
+ ["id", "title", "description", "length", "eventName", "requiresConfirmation"]
);
return {
diff --git a/prisma/migrations/20210717120159_booking_confirmation/migration.sql b/prisma/migrations/20210717120159_booking_confirmation/migration.sql
new file mode 100644
index 00000000..8c96e1ad
--- /dev/null
+++ b/prisma/migrations/20210717120159_booking_confirmation/migration.sql
@@ -0,0 +1,6 @@
+-- AlterTable
+ALTER TABLE "Booking" ADD COLUMN "confirmed" BOOLEAN NOT NULL DEFAULT true,
+ADD COLUMN "rejected" BOOLEAN NOT NULL DEFAULT false;
+
+-- AlterTable
+ALTER TABLE "EventType" ADD COLUMN "requiresConfirmation" BOOLEAN NOT NULL DEFAULT false;
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 7ea3cafe..5cc676d1 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -30,6 +30,7 @@ model EventType {
periodEndDate DateTime?
periodDays Int?
periodCountCalendarDays Boolean?
+ requiresConfirmation Boolean @default(false)
}
model Credential {
@@ -134,6 +135,8 @@ model Booking {
createdAt DateTime @default(now())
updatedAt DateTime?
+ confirmed Boolean @default(true)
+ rejected Boolean @default(false)
}
model Availability {