diff --git a/src/pages/master/wallet/blocks/EditDialog.tsx b/src/pages/master/wallet/blocks/EditDialog.tsx index 14a3574..d8ff501 100644 --- a/src/pages/master/wallet/blocks/EditDialog.tsx +++ b/src/pages/master/wallet/blocks/EditDialog.tsx @@ -76,7 +76,7 @@ const EditDialog = () => { // e.preventDefault(); const response = await PutData( - `${API_URL_MASTER_DATA}/wallet/update/${selectedWallet?.Wallet_id}`, + `${API_URL_MASTER_DATA}/wallet/update/${selectedWallet?.id}`, payload ); @@ -87,7 +87,7 @@ const EditDialog = () => { const createActivity = { module: 'Manage Wallet', - description: `Edit Wallet => ${selectedWallet?.Wallet_id} - ${selectedWallet?.Wallet_name}`, + description: `Edit Wallet => ${selectedWallet?.id} - ${selectedWallet?.name}`, action: 'U' }; @@ -188,7 +188,7 @@ const EditDialog = () => { // currency_id: selectedWallet?.Wallet_currency_id, // group: selectedWallet?.Wallet_group // })); - doFetchData(selectedWallet?.Wallet_id); + doFetchData(selectedWallet?.id); } }, [selectedWallet]); diff --git a/src/pages/master/wallet/hooks/ManageWalletContext.tsx b/src/pages/master/wallet/hooks/ManageWalletContext.tsx index e6592d3..28a5a96 100644 --- a/src/pages/master/wallet/hooks/ManageWalletContext.tsx +++ b/src/pages/master/wallet/hooks/ManageWalletContext.tsx @@ -7,12 +7,12 @@ import { Toaster } from 'sonner'; import ListToolbar from '../blocks/ListToolbar'; interface WalletProps { - Wallet_id: string; - Wallet_name: string; - Wallet_status: string; - Wallet_description: string; - Wallet_group: string[]; - Wallet_currency_id: string; + id: string; + name: string; + status: string; + description: string; + group: string[]; + currency_id: string; } interface ContextProps { @@ -155,7 +155,7 @@ const ManageWalletContextProvider = ({ children }: { children: React.ReactNode } order_direction: sorting[0].desc == false ? 'ASC' : 'DESC', filter: JSON.stringify(filter) }); - console.log(response?.data); + // console.log(response?.data); setWallets(response?.data.list); return { data: response?.data.list, totalCount: response?.data.total_count }; } catch (error) {