diff --git a/client/src/components/job-at-change/schedule-event.color.component.jsx b/client/src/components/job-at-change/schedule-event.color.component.jsx index ec5fa9892..2895e7b27 100644 --- a/client/src/components/job-at-change/schedule-event.color.component.jsx +++ b/client/src/components/job-at-change/schedule-event.color.component.jsx @@ -21,7 +21,10 @@ export function ScheduleEventColor({ bodyshop, event }) { const onClick = async ({ key }) => { const result = await updateAppointment({ - variables: { appid: event.id, app: { color: key } }, + variables: { + appid: event.id, + app: { color: key === "null" ? null : key }, + }, }); if (!!!result.errors) { @@ -34,6 +37,13 @@ export function ScheduleEventColor({ bodyshop, event }) { }); } }; + + const selectedColor = + event.color && + bodyshop.appt_colors && + bodyshop.appt_colors.filter((color) => color.color.hex === event.color)[0] + ?.label; + const menu = (
); + console.log(`event`, event); return (