description not as required input
parent
b6fc2a87f5
commit
c958e0cb2f
|
@ -220,18 +220,21 @@ export function MyFormInput({
|
|||
ruleMessageValueMinLengthRequired,
|
||||
inputPlaceholder,
|
||||
inputType,
|
||||
inputNotRequired,
|
||||
}) {
|
||||
const commonProps = {
|
||||
...propsInput,
|
||||
placeholder: inputPlaceholder,
|
||||
};
|
||||
|
||||
const myFormItemRules = [
|
||||
{
|
||||
const myFormItemRules = [];
|
||||
|
||||
if (!inputNotRequired) {
|
||||
myFormItemRules.push({
|
||||
required: true,
|
||||
message: ruleMessageValueRequired,
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
if (formItemRules) {
|
||||
myFormItemRules.push(...formItemRules);
|
||||
|
|
|
@ -811,13 +811,8 @@ function ModalAddEditServiceActivity({
|
|||
body.name = formServiceActivityName;
|
||||
}
|
||||
|
||||
if (
|
||||
formServiceActivityDescription !==
|
||||
addEditServiceActivityModalOptions.activity.description
|
||||
) {
|
||||
validateFields.push("serviceActivityDescription");
|
||||
body.description = formServiceActivityDescription;
|
||||
}
|
||||
// description is not required
|
||||
body.description = formServiceActivityDescription;
|
||||
|
||||
if (
|
||||
formServiceActivityPrice !==
|
||||
|
@ -980,11 +975,9 @@ function ServiceActivityDescriptionFormInput({
|
|||
showCount: true,
|
||||
}}
|
||||
inputType="textarea"
|
||||
inputNotRequired
|
||||
formItemName={formItemName}
|
||||
setIsInputValid={setIsInputValid}
|
||||
minLength={
|
||||
Constants.GLOBALS.MIN_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH
|
||||
}
|
||||
maxLength={
|
||||
Constants.GLOBALS.MAX_STORE_SERVICE_ACTIVITY_DESCRIPTION_LENGTH
|
||||
}
|
||||
|
|
|
@ -59,7 +59,6 @@ export const Constants = {
|
|||
MAX_STORE_SERVICE_NAME_LENGTH: 64,
|
||||
MIN_STORE_SERVICE_ACTIVITY_NAME_LENGTH: 3,
|
||||
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,
|
||||
MAX_STORE_SERVICE_ACTIVITY_PRICE: 10000000,
|
||||
|
|
Loading…
Reference in New Issue