diff --git a/src/pages/master/provider/blocks/AddDialog.tsx b/src/pages/master/provider/blocks/AddDialog.tsx
index 39a3260..9b7f533 100644
--- a/src/pages/master/provider/blocks/AddDialog.tsx
+++ b/src/pages/master/provider/blocks/AddDialog.tsx
@@ -68,6 +68,7 @@ const AddDialog = () => {
if (
formField.name === '' ||
formField.description === '' ||
+ formField.type === '' ||
formField.status === '' ||
formField.transactionTypeId === '' ||
formField.agentId === ''
@@ -138,7 +139,9 @@ const AddDialog = () => {
-
+
{
status: '',
transactionTypeId: '',
agentId: '',
- created_by: '',
- created_at: ''
+ updated_by: '',
+ updated_at: ''
};
const [formField, setFormField] = useState(initialState);
@@ -79,16 +79,26 @@ const EditDialog = () => {
return;
}
- // doUpdateProvider(e);
+ doUpdateProvider(e);
console.log(formField);
setAlert({ show: false, message: '' });
};
+ useEffect(() => {
+ if (showEditDialog) {
+ setFormField({
+ ...formField,
+ updated_by: parsedUser.username,
+ updated_at: formattedTime
+ });
+ }
+ }, [formattedTime]);
+
return (