added notification
parent
719a956ad4
commit
b6fc2a87f5
|
@ -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 (
|
||||
<MyFormInput
|
||||
formItemName={formItemName}
|
||||
propsInput={{
|
||||
showCount: true,
|
||||
}}
|
||||
minLength={Constants.GLOBALS.MIN_STORE_SERVICE_NAME_LENGTH}
|
||||
maxLength={Constants.GLOBALS.MAX_STORE_SERVICE_NAME_LENGTH}
|
||||
label={t("storeServices.serviceName")}
|
||||
|
@ -909,6 +948,9 @@ function ServiceActivityNameFormInput({ formItemName }) {
|
|||
return (
|
||||
<MyFormInput
|
||||
formItemName={formItemName}
|
||||
propsInput={{
|
||||
showCount: true,
|
||||
}}
|
||||
minLength={Constants.GLOBALS.MIN_STORE_SERVICE_ACTIVITY_NAME_LENGTH}
|
||||
maxLength={Constants.GLOBALS.MAX_STORE_SERVICE_ACTIVITY_NAME_LENGTH}
|
||||
label={t("storeServices.serviceActivityName")}
|
||||
|
|
|
@ -56,9 +56,9 @@ export const Constants = {
|
|||
MIN_PASSWORD_LENGTH: 8,
|
||||
MAX_PASSWORD_LENGTH: 64,
|
||||
MIN_STORE_SERVICE_NAME_LENGTH: 3,
|
||||
MAX_STORE_SERVICE_NAME_LENGTH: 32,
|
||||
MAX_STORE_SERVICE_NAME_LENGTH: 64,
|
||||
MIN_STORE_SERVICE_ACTIVITY_NAME_LENGTH: 3,
|
||||
MAX_STORE_SERVICE_ACTIVITY_NAME_LENGTH: 32,
|
||||
MAX_STORE_SERVICE_ACTIVITY_NAME_LENGTH: 64,
|
||||
MIN_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH: 3,
|
||||
MAX_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH: 1024,
|
||||
MIN_STORE_SERVICE_ACTIVITY_PRICE: 0,
|
||||
|
|
Loading…
Reference in New Issue