fix
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user