diff --git a/src/Pages/Store/Services/index.js b/src/Pages/Store/Services/index.js index 801b3d6..1ee93a4 100644 --- a/src/Pages/Store/Services/index.js +++ b/src/Pages/Store/Services/index.js @@ -545,7 +545,16 @@ function ModalAddEditService({ fetchServices(); }) .catch((errStatus) => { - console.log(errStatus); + setIsRequesting(false); + + if (errStatus === 400) { + notificationApi["error"]({ + message: t("common.request.inputsInvalid.title"), + description: t( + "common.request.inputsInvalid.description" + ), + }); + } }); }) .catch(() => @@ -590,7 +599,16 @@ function ModalAddEditService({ fetchServices(); }) .catch((errStatus) => { - console.log(errStatus); + setIsRequesting(false); + + if (errStatus === 400) { + notificationApi["error"]({ + message: t("common.request.inputsInvalid.title"), + description: t( + "common.request.inputsInvalid.description" + ), + }); + } }); }) .catch(() => @@ -725,7 +743,16 @@ function ModalAddEditServiceActivity({ fetchServices(); }) .catch((errStatus) => { - console.log(errStatus); + setIsRequesting(false); + + if (errStatus === 400) { + notificationApi["error"]({ + message: t("common.request.inputsInvalid.title"), + description: t( + "common.request.inputsInvalid.description" + ), + }); + } }); }) .catch(() => @@ -831,7 +858,16 @@ function ModalAddEditServiceActivity({ fetchServices(); }) .catch((errStatus) => { - console.log(errStatus); + setIsRequesting(false); + + if (errStatus === 400) { + notificationApi["error"]({ + message: t("common.request.inputsInvalid.title"), + description: t( + "common.request.inputsInvalid.description" + ), + }); + } }); }) .catch(() => @@ -886,6 +922,9 @@ function ServiceNameFormInput({ formItemName }) { return (