From 7e3200a993b1e77e9843eb0d46362774ae6973aa Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 23 Feb 2021 15:43:08 -0800 Subject: [PATCH] Resolve validation issue on paint split IO-698 --- client/src/components/shop-info/shop-info.component.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx index e3921c6d2..27ba83dc3 100644 --- a/client/src/components/shop-info/shop-info.component.jsx +++ b/client/src/components/shop-info/shop-info.component.jsx @@ -773,6 +773,9 @@ export default function ShopInfoComponent({ form, saveLoading }) { rules={[ ({ getFieldValue }) => ({ validator(rule, value) { + if (!value && !getFieldValue(["md_hour_split", "paint"])) { + return Promise.resolve(); + } if ( value + getFieldValue(["md_hour_split", "paint"]) === 1 @@ -793,6 +796,9 @@ export default function ShopInfoComponent({ form, saveLoading }) { rules={[ ({ getFieldValue }) => ({ validator(rule, value) { + if (!value && !getFieldValue(["md_hour_split", "paint"])) { + return Promise.resolve(); + } if ( value + getFieldValue(["md_hour_split", "prep"]) === 1