feat: Assign colors to events (#15298)

* feat: Assign colors to events

* update

* final update

* update

* fix requested changes error

* Update EventAdvancedTab.tsx

* add contrast check

* update

* fix contrsterror message visibility

* fix type error

* fix

* update test

---------

Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-08-14 15:10:40 +02:00
1 parent 95e2ad3007
commit 528a4fbb97
23 files changed
+289 -120

No files matched your search

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "EventType" ADD COLUMN "eventTypeColor" JSONB;
+2
View File
@@ -137,6 +137,8 @@ model EventType {
assignAllTeamMembers Boolean @default(false)
useEventTypeDestinationCalendarEmail Boolean @default(false)
aiPhoneCallConfig AIPhoneCallConfiguration?
/// @zod.custom(imports.eventTypeColor)
eventTypeColor Json?
rescheduleWithSameRoundRobinHost Boolean @default(false)
secondaryEmailId Int?
+8
View File
@@ -187,6 +187,13 @@ export const iso8601 = z.string().transform((val, ctx) => {
return d;
});
export const eventTypeColor = z
.object({
lightEventTypeColor: z.string(),
darkEventTypeColor: z.string(),
})
.nullable();
export const intervalLimitsType = z
.object({
PER_DAY: z.number().optional(),
@@ -663,6 +670,7 @@ export const allManagedEventTypeProps: { [k in keyof Omit<Prisma.EventTypeSelect
lockTimeZoneToggleOnBookingPage: true,
requiresBookerEmailVerification: true,
assignAllTeamMembers: true,
eventTypeColor: true,
rescheduleWithSameRoundRobinHost: true,
};