From b042f3174b5ee14f738317c0295e3a331c35dd8a Mon Sep 17 00:00:00 2001 From: bagusajisaputroo Date: Thu, 10 Apr 2025 16:33:19 +0700 Subject: [PATCH] fixing AddDialog + Managetransfertype on transactiontype --- .../transfertype/blocks/AddDialog.tsx | 114 +++--------------- .../hooks/ManageTransferTypeContext.tsx | 20 --- 2 files changed, 17 insertions(+), 117 deletions(-) diff --git a/src/pages/transfer/transfertype/blocks/AddDialog.tsx b/src/pages/transfer/transfertype/blocks/AddDialog.tsx index 5a3bfbf..ed5576f 100644 --- a/src/pages/transfer/transfertype/blocks/AddDialog.tsx +++ b/src/pages/transfer/transfertype/blocks/AddDialog.tsx @@ -41,8 +41,8 @@ import { } from '@/components/ui/command'; interface WalletProps { - Wallet_id: string; - Wallet_name: string; + id: string; + name: string; } interface CustomerProps { @@ -74,8 +74,8 @@ const AddDialog = () => { description: '', wallet_origin: '', wallet_destination: '', - wallet_fee_destination: '', - customer_fee_destination: '', + + minimum_amount: 0, maximum_amount: 0, max_transaction_per_day: 0, @@ -102,8 +102,6 @@ const AddDialog = () => { 'description', 'wallet_origin', 'wallet_destination', - 'wallet_fee_destination', - 'customer_fee_destination', 'status', 'status_approval' ]; @@ -216,13 +214,11 @@ const AddDialog = () => { limit: 100, page: 1, with_deleted: false, - order_field: 'name', + order_field: 'wallets.name', order_direction: 'ASC', - filter: JSON.stringify({ - status: 'Y' - }) }; const response = await GetData(`${API_URL_MASTERDATA}/wallet/list`, params); + console.log(response) if (response?.status && response?.data) { setWallets(response.data.list); } else { @@ -262,9 +258,11 @@ const AddDialog = () => {
{alert.show && ( - -

{alert.message}

-
+
+ +

{alert.message}

+
+
)}
@@ -396,8 +394,8 @@ const AddDialog = () => { {wallets.map((wallet, idx) => ( - - {wallet.Wallet_name} + + {wallet.name} ))} @@ -424,8 +422,8 @@ const AddDialog = () => { {wallets.map((wallet, idx) => ( - - {wallet.Wallet_name} + + {wallet.name} ))} @@ -433,86 +431,8 @@ const AddDialog = () => {
-
-
- -
- -
-
-
-
-
- -
- - - - - - - - { - e.currentTarget.scrollTop += e.deltaY; - }} - > - No Customer found. - - {customers.map((customer) => ( - { - setFormField({ - ...formField, - customer_fee_destination: customer.id - }); - setOpen(false); - }} - > - {customer.username} - - ))} - - - - - -
-
-
+ +