fix create update Provider
- set default value agent to null
This commit is contained in:
@ -68,7 +68,7 @@ const AddDialog = () => {
|
|||||||
type: string;
|
type: string;
|
||||||
status: string;
|
status: string;
|
||||||
transaction_type: string;
|
transaction_type: string;
|
||||||
agent: string;
|
agent: string | null;
|
||||||
created_by: string;
|
created_by: string;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
} = {
|
} = {
|
||||||
@ -77,7 +77,7 @@ const AddDialog = () => {
|
|||||||
type: '',
|
type: '',
|
||||||
status: '',
|
status: '',
|
||||||
transaction_type: '',
|
transaction_type: '',
|
||||||
agent: '',
|
agent: null,
|
||||||
created_by: '',
|
created_by: '',
|
||||||
created_at: ''
|
created_at: ''
|
||||||
};
|
};
|
||||||
|
|||||||
@ -58,7 +58,7 @@ const EditDialog = () => {
|
|||||||
type: string;
|
type: string;
|
||||||
status: string;
|
status: string;
|
||||||
transaction_type: string;
|
transaction_type: string;
|
||||||
agent: string;
|
agent: string | null;
|
||||||
updated_by: string;
|
updated_by: string;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
} = {
|
} = {
|
||||||
@ -67,7 +67,7 @@ const EditDialog = () => {
|
|||||||
type: '',
|
type: '',
|
||||||
status: '',
|
status: '',
|
||||||
transaction_type: '',
|
transaction_type: '',
|
||||||
agent: '',
|
agent: null,
|
||||||
updated_by: '',
|
updated_by: '',
|
||||||
updated_at: ''
|
updated_at: ''
|
||||||
};
|
};
|
||||||
@ -169,8 +169,7 @@ const EditDialog = () => {
|
|||||||
formField.description.trim() === '' ||
|
formField.description.trim() === '' ||
|
||||||
formField.type.trim() === '' ||
|
formField.type.trim() === '' ||
|
||||||
formField.status.trim() === '' ||
|
formField.status.trim() === '' ||
|
||||||
formField.transaction_type.trim() === '' ||
|
formField.transaction_type.trim() === ''
|
||||||
formField.agent.trim() === ''
|
|
||||||
) {
|
) {
|
||||||
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user