diff --git a/src/pages/master/provider/blocks/AddDialog.tsx b/src/pages/master/provider/blocks/AddDialog.tsx index c49d056..875b6b7 100644 --- a/src/pages/master/provider/blocks/AddDialog.tsx +++ b/src/pages/master/provider/blocks/AddDialog.tsx @@ -68,7 +68,7 @@ const AddDialog = () => { type: string; status: string; transaction_type: string; - agent: string; + agent: string | null; created_by: string; created_at: string; } = { @@ -77,7 +77,7 @@ const AddDialog = () => { type: '', status: '', transaction_type: '', - agent: '', + agent: null, created_by: '', created_at: '' }; diff --git a/src/pages/master/provider/blocks/EditDialog.tsx b/src/pages/master/provider/blocks/EditDialog.tsx index 31af42b..f1ce287 100644 --- a/src/pages/master/provider/blocks/EditDialog.tsx +++ b/src/pages/master/provider/blocks/EditDialog.tsx @@ -58,7 +58,7 @@ const EditDialog = () => { type: string; status: string; transaction_type: string; - agent: string; + agent: string | null; updated_by: string; updated_at: string; } = { @@ -67,7 +67,7 @@ const EditDialog = () => { type: '', status: '', transaction_type: '', - agent: '', + agent: null, updated_by: '', updated_at: '' }; @@ -169,8 +169,7 @@ const EditDialog = () => { formField.description.trim() === '' || formField.type.trim() === '' || formField.status.trim() === '' || - formField.transaction_type.trim() === '' || - formField.agent.trim() === '' + formField.transaction_type.trim() === '' ) { setAlert({ show: true, message: 'Please fill in all required fields.' }); return;