This commit is contained in:
2024-11-19 11:54:09 +01:00
parent 5e75b53d11
commit 2372d8bd56
@@ -40,9 +40,11 @@ export default defineComponent({
const retrieveTransaction = async transactionId => { const retrieveTransaction = async transactionId => {
try { try {
if (dictUserAccounts.value.length == 0) {
const res2 = await userAccountService().retrieve(); const res2 = await userAccountService().retrieve();
console.log('got accounts' + res2); console.log('got accounts' + res2);
dictUserAccounts.value = res2.data; dictUserAccounts.value = res2.data;
}
const res = await transactionService().find(transactionId); const res = await transactionService().find(transactionId);
transaction.value = res; transaction.value = res;
// console.log('len'+transaction.value.transactionItems?.length); // console.log('len'+transaction.value.transactionItems?.length);
@@ -59,17 +61,19 @@ export default defineComponent({
} }
}; };
// const retrieveUserAccounts = async () => { const retrieveUserAccounts = async () => {
// try { if (dictUserAccounts.value.length == 0) {
// const res = await userAccountService().retrieve(); try {
// console.log('got accounts'+ res); const res = await userAccountService().retrieve();
// dictUserAccounts.value = res.data; console.log('got accounts' + res);
// } catch (error) { dictUserAccounts.value = res.data;
// alertService.showHttpError(error.response); } catch (error) {
// } alertService.showHttpError(error.response);
// }; }
// }
// retrieveUserAccounts(); };
retrieveUserAccounts();
if (route.params?.transactionId) { if (route.params?.transactionId) {
retrieveTransaction(route.params.transactionId); retrieveTransaction(route.params.transactionId);