Skip to content

Scheduling infrastructure for absolutely everyone.

fix: TS error related to non-existant ReasonEnum

Alex van Andel8e26882b2d02
diff --git a/apps/web/components/dialog/ReassignDialog.tsx b/apps/web/components/dialog/ReassignDialog.tsx
index 6445b7b6690..0b005c873e3 100644
--- a/apps/web/components/dialog/ReassignDialog.tsx
+++ b/apps/web/components/dialog/ReassignDialog.tsx
@@ -188,7 +188,8 @@ export const ReassignDialog = ({
<Form form={form} handleSubmit={handleSubmit} ref={animationParentRef}>
<RadioArea.Group
onValueChange={(val) => {
- form.setValue("reassignType", val as ReasonEnum);
+ const reassignType: ReassignType = z.nativeEnum(ReassignType).parse(val);
+ form.setValue("reassignType", reassignType);
}}
defaultValue={bookingFromRoutingForm ? ReassignType.TEAM_MEMBER : ReassignType.ROUND_ROBIN}
className="mt-1 flex flex-col gap-4">