fix create provider
This commit is contained in:
@ -87,7 +87,7 @@ const AddDialog = () => {
|
||||
const response = await PostData(`${API_URL_MASTERDATA}/provider/create`, formField);
|
||||
|
||||
if (response?.status) {
|
||||
// resetForm();
|
||||
resetForm();
|
||||
handleAddDialog(false);
|
||||
toast.success('Success Create Provider');
|
||||
reload();
|
||||
@ -101,7 +101,7 @@ const AddDialog = () => {
|
||||
e.preventDefault();
|
||||
|
||||
if (
|
||||
formField.name.trim() === '' ||
|
||||
formField.name === '' ||
|
||||
formField.description.trim() === '' ||
|
||||
formField.type.trim() === '' ||
|
||||
formField.status.trim() === '' ||
|
||||
@ -112,8 +112,8 @@ const AddDialog = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
doCreateProvider(e);
|
||||
console.log(formField);
|
||||
doCreateProvider(e);
|
||||
setAlert({ show: false, message: '' });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user