diff --git a/src/pages/master/provider/blocks/AddDialog.tsx b/src/pages/master/provider/blocks/AddDialog.tsx index 89b6655..e57ddef 100644 --- a/src/pages/master/provider/blocks/AddDialog.tsx +++ b/src/pages/master/provider/blocks/AddDialog.tsx @@ -292,7 +292,7 @@ const AddDialog = () => { @@ -313,7 +313,7 @@ const AddDialog = () => { setOpen(false); }} > - {customer.fullname} + {customer.username} ))} diff --git a/src/pages/master/provider/blocks/EditDialog.tsx b/src/pages/master/provider/blocks/EditDialog.tsx index 574b827..d60d4c2 100644 --- a/src/pages/master/provider/blocks/EditDialog.tsx +++ b/src/pages/master/provider/blocks/EditDialog.tsx @@ -55,7 +55,7 @@ const EditDialog = () => { description: '', type: '', status: '', - transactionTypeId: '', + transaction_type: '', agent: '', updated_by: '', updated_at: '' @@ -128,7 +128,7 @@ const EditDialog = () => { const doFetchData = useCallback(async (id: string) => { const response = await GetData(`${API_URL_MASTERDATA}/provider/getdata/${id}`, { id }); - // console.log(response); + console.log(response); if (response?.status) { setFormField((prev) => ({ ...prev, @@ -136,8 +136,8 @@ const EditDialog = () => { description: response?.data.description, type: response?.data.type, status: response?.data.status, - transactionTypeId: response?.data.transaction_type.id, - agent: response?.data.agent + transaction_type: response?.data.transaction_type.id, + agent: response?.data.agent.id })); } }, []); @@ -150,7 +150,7 @@ const EditDialog = () => { formField.description.trim() === '' || formField.type.trim() === '' || formField.status.trim() === '' || - formField.transactionTypeId.trim() === '' || + formField.transaction_type.trim() === '' || formField.agent.trim() === '' ) { setAlert({ show: true, message: 'Please fill in all required fields.' }); @@ -188,7 +188,7 @@ const EditDialog = () => { getCustomerList([{ id: 'id', desc: false }]); getTransactionTypeList([{ id: 'name', desc: false }]); }, []); - + // console.log(selectedProvider); return ( handleEditDialog(open, null)}> @@ -282,9 +282,9 @@ const EditDialog = () => { Transaction Type Id*