fix create update Provider

- set default value agent to null
This commit is contained in:
Wikzyy
2025-04-10 21:40:50 +07:00
parent 1bfe3d47ff
commit 8b39949603
2 changed files with 5 additions and 6 deletions

View File

@ -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;