Fixed issues relating to custom-inputs

* Don't duplicate custom input when editing before db persist
* Remove correct custom input during delete pre db persist (id undefined)
* Moved typings to prisma, keeping backwards compatibility with @map
* Updated all usages of the enum
This commit is contained in:
Alex van Andel committed 2021-08-14 17:03:50 +00:00
1 parent 3a5e7dd61c
commit 252a329f09
4 files changed
+30 -45

No files matched your search

+8 -1
View File
@@ -162,12 +162,19 @@ model SelectedCalendar {
@@id([userId,integration,externalId])
}
enum EventTypeCustomInputType {
TEXT @map("text")
TEXTLONG @map("textLong")
NUMBER @map("number")
BOOL @map("bool")
}
model EventTypeCustomInput {
id Int @id @default(autoincrement())
eventTypeId Int
eventType EventType @relation(fields: [eventTypeId], references: [id])
label String
type String
type EventTypeCustomInputType
required Boolean
}