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:
23 files changed
+289
-120
No files matched your search
@@ -66,12 +66,11 @@ const BrandColorsForm = ({
|
||||
defaultValue={brandColor || DEFAULT_LIGHT_BRAND_COLOR}
|
||||
resetDefaultValue={DEFAULT_LIGHT_BRAND_COLOR}
|
||||
onChange={(value) => {
|
||||
try {
|
||||
checkWCAGContrastColor("#ffffff", value);
|
||||
if (checkWCAGContrastColor("#ffffff", value)) {
|
||||
setLightModeError(false);
|
||||
brandColorsFormMethods.setValue("brandColor", value, { shouldDirty: true });
|
||||
} catch (err) {
|
||||
setLightModeError(false);
|
||||
} else {
|
||||
setLightModeError(true);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
@@ -95,11 +94,10 @@ const BrandColorsForm = ({
|
||||
defaultValue={darkBrandColor || DEFAULT_DARK_BRAND_COLOR}
|
||||
resetDefaultValue={DEFAULT_DARK_BRAND_COLOR}
|
||||
onChange={(value) => {
|
||||
try {
|
||||
checkWCAGContrastColor("#101010", value);
|
||||
if (checkWCAGContrastColor("#101010", value)) {
|
||||
setDarkModeError(false);
|
||||
brandColorsFormMethods.setValue("darkBrandColor", value, { shouldDirty: true });
|
||||
} catch (err) {
|
||||
} else {
|
||||
setDarkModeError(true);
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -185,6 +185,7 @@ export default async function handleChildrenEventTypes({
|
||||
metadata: (managedEventTypeValues.metadata as Prisma.InputJsonValue) ?? undefined,
|
||||
bookingFields: (managedEventTypeValues.bookingFields as Prisma.InputJsonValue) ?? undefined,
|
||||
durationLimits: (managedEventTypeValues.durationLimits as Prisma.InputJsonValue) ?? undefined,
|
||||
eventTypeColor: (managedEventTypeValues.eventTypeColor as Prisma.InputJsonValue) ?? undefined,
|
||||
onlyShowFirstAvailableSlot: managedEventTypeValues.onlyShowFirstAvailableSlot ?? false,
|
||||
userId,
|
||||
users: {
|
||||
|
||||
Reference in new issue
Block a user