From d012ca74fea7273ff2fc337b100cf666182ec5b3 Mon Sep 17 00:00:00 2001 From: taro Date: Tue, 18 Mar 2025 22:11:01 -0300 Subject: [PATCH] refactor: minor code cleanup --- src/pages/Ecomerce/OrdersView.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/pages/Ecomerce/OrdersView.vue b/src/pages/Ecomerce/OrdersView.vue index 0c1ff6a5..a5d6d9d9 100644 --- a/src/pages/Ecomerce/OrdersView.vue +++ b/src/pages/Ecomerce/OrdersView.vue @@ -17,7 +17,6 @@ import { storeToRefs } from 'pinia'; const { t } = useI18n(); const route = useRoute(); -const jApi = inject('jApi'); const api = inject('api'); const { notify } = useNotify(); const appStore = useAppStore(); @@ -32,17 +31,17 @@ const tpv = tpvStore(); onMounted(async () => { await tpv.check(route); - const myTickets = await api.post('applications/myTicket_list/execute-proc', new URLSearchParams({ + const myTickets = await api.post('applications/myTicket_list/execute-proc', { schema: 'hedera', - params: '[null, null]', - })); + params: [null, null], + }); orders.value = myTickets.data; }); -const getDebt = async (userId) => { +onUserId(async (userId) => { const myClientDebt = await api.get(`clients/${userId}/getDebt`); debt.value = -myClientDebt.data; -} +}); const onPayClick = async () => { showAmountToPayDialog.value = true; @@ -62,9 +61,6 @@ const onConfirmPay = async () => { amountToPay.value = parseFloat(amount); await tpv.pay(amountToPay.value); }; - -onUserId(getDebt); -