aa
This commit is contained in:
@@ -3,6 +3,7 @@ import { type Ref, defineComponent, inject, onMounted, ref } from 'vue';
|
||||
import TransactionService from './transaction.service';
|
||||
import { type ITransaction } from '@/shared/model/transaction.model';
|
||||
import { useAlertService } from '@/shared/alert/alert.service';
|
||||
import type AccountService from '@/account/account.service';
|
||||
|
||||
export default defineComponent({
|
||||
compatConfig: { MODE: 3 },
|
||||
@@ -19,6 +20,8 @@ export default defineComponent({
|
||||
const alertService = inject('alertService', () => useAlertService(), true);
|
||||
|
||||
const transactions: Ref<ITransaction[]> = ref([]);
|
||||
const hasAnyAuthorityValues: Ref<any> = ref({});
|
||||
const accountService = inject<AccountService>('accountService');
|
||||
|
||||
const isFetching = ref(false);
|
||||
|
||||
@@ -75,10 +78,22 @@ export default defineComponent({
|
||||
retrieveTransactions,
|
||||
clear,
|
||||
removeId,
|
||||
accountService,
|
||||
hasAnyAuthorityValues,
|
||||
removeEntity,
|
||||
prepareRemove,
|
||||
closeDialog,
|
||||
removeTransaction,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
hasAnyAuthority(authorities: any): boolean {
|
||||
this.accountService.hasAnyAuthorityAndCheckAuth(authorities).then(value => {
|
||||
if (this.hasAnyAuthorityValues[authorities] !== value) {
|
||||
this.hasAnyAuthorityValues = { ...this.hasAnyAuthorityValues, [authorities]: value };
|
||||
}
|
||||
});
|
||||
return this.hasAnyAuthorityValues[authorities] ?? false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user