added notification
parent
719a956ad4
commit
b6fc2a87f5
|
@ -545,7 +545,16 @@ function ModalAddEditService({
|
||||||
fetchServices();
|
fetchServices();
|
||||||
})
|
})
|
||||||
.catch((errStatus) => {
|
.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(() =>
|
.catch(() =>
|
||||||
|
@ -590,7 +599,16 @@ function ModalAddEditService({
|
||||||
fetchServices();
|
fetchServices();
|
||||||
})
|
})
|
||||||
.catch((errStatus) => {
|
.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(() =>
|
.catch(() =>
|
||||||
|
@ -725,7 +743,16 @@ function ModalAddEditServiceActivity({
|
||||||
fetchServices();
|
fetchServices();
|
||||||
})
|
})
|
||||||
.catch((errStatus) => {
|
.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(() =>
|
.catch(() =>
|
||||||
|
@ -831,7 +858,16 @@ function ModalAddEditServiceActivity({
|
||||||
fetchServices();
|
fetchServices();
|
||||||
})
|
})
|
||||||
.catch((errStatus) => {
|
.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(() =>
|
.catch(() =>
|
||||||
|
@ -886,6 +922,9 @@ function ServiceNameFormInput({ formItemName }) {
|
||||||
return (
|
return (
|
||||||
<MyFormInput
|
<MyFormInput
|
||||||
formItemName={formItemName}
|
formItemName={formItemName}
|
||||||
|
propsInput={{
|
||||||
|
showCount: true,
|
||||||
|
}}
|
||||||
minLength={Constants.GLOBALS.MIN_STORE_SERVICE_NAME_LENGTH}
|
minLength={Constants.GLOBALS.MIN_STORE_SERVICE_NAME_LENGTH}
|
||||||
maxLength={Constants.GLOBALS.MAX_STORE_SERVICE_NAME_LENGTH}
|
maxLength={Constants.GLOBALS.MAX_STORE_SERVICE_NAME_LENGTH}
|
||||||
label={t("storeServices.serviceName")}
|
label={t("storeServices.serviceName")}
|
||||||
|
@ -909,6 +948,9 @@ function ServiceActivityNameFormInput({ formItemName }) {
|
||||||
return (
|
return (
|
||||||
<MyFormInput
|
<MyFormInput
|
||||||
formItemName={formItemName}
|
formItemName={formItemName}
|
||||||
|
propsInput={{
|
||||||
|
showCount: true,
|
||||||
|
}}
|
||||||
minLength={Constants.GLOBALS.MIN_STORE_SERVICE_ACTIVITY_NAME_LENGTH}
|
minLength={Constants.GLOBALS.MIN_STORE_SERVICE_ACTIVITY_NAME_LENGTH}
|
||||||
maxLength={Constants.GLOBALS.MAX_STORE_SERVICE_ACTIVITY_NAME_LENGTH}
|
maxLength={Constants.GLOBALS.MAX_STORE_SERVICE_ACTIVITY_NAME_LENGTH}
|
||||||
label={t("storeServices.serviceActivityName")}
|
label={t("storeServices.serviceActivityName")}
|
||||||
|
|
|
@ -56,9 +56,9 @@ export const Constants = {
|
||||||
MIN_PASSWORD_LENGTH: 8,
|
MIN_PASSWORD_LENGTH: 8,
|
||||||
MAX_PASSWORD_LENGTH: 64,
|
MAX_PASSWORD_LENGTH: 64,
|
||||||
MIN_STORE_SERVICE_NAME_LENGTH: 3,
|
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,
|
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,
|
MIN_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH: 3,
|
||||||
MAX_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH: 1024,
|
MAX_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH: 1024,
|
||||||
MIN_STORE_SERVICE_ACTIVITY_PRICE: 0,
|
MIN_STORE_SERVICE_ACTIVITY_PRICE: 0,
|
||||||
|
|
Loading…
Reference in New Issue