diff --git a/client/src/components/parts-shop-info/parts-shop-info.container.jsx b/client/src/components/parts-shop-info/parts-shop-info.container.jsx index 27a7e3dd8..a7828a75c 100644 --- a/client/src/components/parts-shop-info/parts-shop-info.container.jsx +++ b/client/src/components/parts-shop-info/parts-shop-info.container.jsx @@ -27,7 +27,7 @@ export default function PartsShopInfoContainer() { logImEXEvent("parts_shop_update"); updateBodyshop({ - variables: { id: data.bodyshops[0].id, shop: values } + variables: { id: data?.bodyshops?.[0]?.id, shop: values } }) .then(() => { notification.success({ title: t("bodyshop.successes.save") }); @@ -38,6 +38,7 @@ export default function PartsShopInfoContainer() { title: t("bodyshop.errors.saving", { message: error }) }); }); + setSaveLoading(false); }; @@ -55,7 +56,7 @@ export default function PartsShopInfoContainer() { autoComplete="new-password" onFinish={handleFinish} initialValues={ - data + data?.bodyshops?.[0] ? { ...data.bodyshops[0], schedule_start_time: dayjs(data.bodyshops[0].schedule_start_time),