fix
This commit is contained in:
@@ -40,9 +40,11 @@ export default defineComponent({
|
||||
|
||||
const retrieveTransaction = async transactionId => {
|
||||
try {
|
||||
const res2 = await userAccountService().retrieve();
|
||||
console.log('got accounts' + res2);
|
||||
dictUserAccounts.value = res2.data;
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user