refactor: minor code cleanup
gitea/hedera-web/pipeline/pr-beta This commit looks good Details

This commit is contained in:
taro 2025-03-18 22:11:01 -03:00
parent 49d8165395
commit d012ca74fe
1 changed files with 5 additions and 9 deletions

View File

@ -17,7 +17,6 @@ import { storeToRefs } from 'pinia';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const jApi = inject('jApi');
const api = inject('api'); const api = inject('api');
const { notify } = useNotify(); const { notify } = useNotify();
const appStore = useAppStore(); const appStore = useAppStore();
@ -32,17 +31,17 @@ const tpv = tpvStore();
onMounted(async () => { onMounted(async () => {
await tpv.check(route); 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', schema: 'hedera',
params: '[null, null]', params: [null, null],
})); });
orders.value = myTickets.data; orders.value = myTickets.data;
}); });
const getDebt = async (userId) => { onUserId(async (userId) => {
const myClientDebt = await api.get(`clients/${userId}/getDebt`); const myClientDebt = await api.get(`clients/${userId}/getDebt`);
debt.value = -myClientDebt.data; debt.value = -myClientDebt.data;
} });
const onPayClick = async () => { const onPayClick = async () => {
showAmountToPayDialog.value = true; showAmountToPayDialog.value = true;
@ -62,9 +61,6 @@ const onConfirmPay = async () => {
amountToPay.value = parseFloat(amount); amountToPay.value = parseFloat(amount);
await tpv.pay(amountToPay.value); await tpv.pay(amountToPay.value);
}; };
onUserId(getDebt);
</script> </script>
<template> <template>