|
|
@@ -59,25 +59,35 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => { |
|
|
tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'require3Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), |
|
|
tel_countryCode: yup.string().min(3, displayErrorMsg(intl.formatMessage({id: 'require3Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireDialingCode'}))), |
|
|
phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'require8Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))), |
|
|
phoneNumber: yup.string().min(8, displayErrorMsg(intl.formatMessage({id: 'require8Number'}))).required(displayErrorMsg(intl.formatMessage({id: 'requireContactNumber'}))), |
|
|
}), |
|
|
}), |
|
|
onSubmit: (values) => { |
|
|
|
|
|
// console.log(values); |
|
|
|
|
|
HttpUtils.post({ |
|
|
|
|
|
url: UrlUtils.POST_PUB_ORG_USER, |
|
|
|
|
|
params: { |
|
|
|
|
|
contactTel: { |
|
|
|
|
|
countryCode: values.tel_countryCode, |
|
|
|
|
|
phoneNumber: values.phoneNumber |
|
|
|
|
|
|
|
|
onSubmit: (values, { setSubmitting }) => { |
|
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
|
HttpUtils.post({ |
|
|
|
|
|
url: UrlUtils.POST_PUB_ORG_USER, |
|
|
|
|
|
params: { |
|
|
|
|
|
contactTel: { |
|
|
|
|
|
countryCode: values.tel_countryCode, |
|
|
|
|
|
phoneNumber: values.phoneNumber |
|
|
|
|
|
}, |
|
|
|
|
|
faxNo: { |
|
|
|
|
|
countryCode: values.fax_countryCode, |
|
|
|
|
|
faxNumber: values.faxNumber |
|
|
|
|
|
}, |
|
|
|
|
|
preferLocale: values.preferLocale.type |
|
|
}, |
|
|
}, |
|
|
faxNo: { |
|
|
|
|
|
countryCode: values.fax_countryCode, |
|
|
|
|
|
faxNumber: values.faxNumber |
|
|
|
|
|
|
|
|
onSuccess: function () { |
|
|
|
|
|
resolve(); |
|
|
|
|
|
notifySaveSuccess(); |
|
|
|
|
|
loadDataFun(); |
|
|
}, |
|
|
}, |
|
|
preferLocale: values.preferLocale.type |
|
|
|
|
|
}, |
|
|
|
|
|
onSuccess: function () { |
|
|
|
|
|
notifySaveSuccess() |
|
|
|
|
|
loadDataFun(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
onFail: function () { |
|
|
|
|
|
setSubmitting(false); |
|
|
|
|
|
resolve(); |
|
|
|
|
|
}, |
|
|
|
|
|
onError: function () { |
|
|
|
|
|
setSubmitting(false); |
|
|
|
|
|
resolve(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -127,6 +137,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => { |
|
|
variant="contained" |
|
|
variant="contained" |
|
|
onClick={onResetBack} |
|
|
onClick={onResetBack} |
|
|
color="cancel" |
|
|
color="cancel" |
|
|
|
|
|
disabled={formik.isSubmitting} |
|
|
> |
|
|
> |
|
|
<FormattedMessage id="resetAndBack" /> |
|
|
<FormattedMessage id="resetAndBack" /> |
|
|
|
|
|
|
|
|
@@ -137,6 +148,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => { |
|
|
variant="contained" |
|
|
variant="contained" |
|
|
type="submit" |
|
|
type="submit" |
|
|
color="success" |
|
|
color="success" |
|
|
|
|
|
disabled={formik.isSubmitting} |
|
|
> |
|
|
> |
|
|
<FormattedMessage id="save" /> |
|
|
<FormattedMessage id="save" /> |
|
|
|
|
|
|
|
|
|