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 => {
try {
if (dictUserAccounts.value.length == 0) {
const res2 = await userAccountService().retrieve();
console.log('got accounts' + res2);
dictUserAccounts.value = res2.data;
}
const res = await transactionService().find(transactionId);
transaction.value = res;
// console.log('len'+transaction.value.transactionItems?.length);
@@ -59,17 +61,19 @@ export default defineComponent({
}
};
// const retrieveUserAccounts = async () => {
// try {
// const res = await userAccountService().retrieve();
// console.log('got accounts'+ res);
// dictUserAccounts.value = res.data;
// } catch (error) {
// alertService.showHttpError(error.response);
// }
// };
//
// retrieveUserAccounts();
const retrieveUserAccounts = async () => {
if (dictUserAccounts.value.length == 0) {
try {
const res = await userAccountService().retrieve();
console.log('got accounts' + res);
dictUserAccounts.value = res.data;
} catch (error) {
alertService.showHttpError(error.response);
}
}
};
retrieveUserAccounts();
if (route.params?.transactionId) {
retrieveTransaction(route.params.transactionId);