{{ item.description }} @@ -169,13 +162,13 @@ const isAdministrative = computed(() => {
{{ barcode.code }}
diff --git a/src/pages/Supplier/Card/SupplierSummary.vue b/src/pages/Supplier/Card/SupplierSummary.vue
index 822586b47..04f763c15 100644
--- a/src/pages/Supplier/Card/SupplierSummary.vue
+++ b/src/pages/Supplier/Card/SupplierSummary.vue
@@ -4,13 +4,12 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue';
-import { useRole } from 'src/composables/useRole';
+import { useAcl } from 'src/composables/useAcl';
import { dashIfEmpty } from 'src/filters';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
const route = useRoute();
-const roleState = useRole();
const { t } = useI18n();
const $props = defineProps({
@@ -32,13 +31,11 @@ async function setData(data) {
}
}
-const isAdministrative = computed(() => {
- return roleState.hasAny(['administrative']);
-});
-function getUrl(section) {
- return isAdministrative.value && `#/supplier/${entityId.value}/${section}`;
-}
+
+const getUrl = (section) =>
+ useAcl().hasAny('Supplier','*','WRITE') ? `#/supplier/${entityId.value}/${section}`:'';
+
diff --git a/src/pages/Travel/Card/TravelDescriptorMenuItems.vue b/src/pages/Travel/Card/TravelDescriptorMenuItems.vue
index bd2561211..47b6f0aa6 100644
--- a/src/pages/Travel/Card/TravelDescriptorMenuItems.vue
+++ b/src/pages/Travel/Card/TravelDescriptorMenuItems.vue
@@ -8,7 +8,7 @@ import VnConfirm from 'components/ui/VnConfirm.vue';
import axios from 'axios';
import useNotify from 'src/composables/useNotify.js';
-import { useRole } from 'src/composables/useRole';
+import { useAcl } from 'src/composables/useAcl';
const $props = defineProps({
travel: {
@@ -21,7 +21,6 @@ const { t } = useI18n();
const router = useRouter();
const quasar = useQuasar();
const { notify } = useNotify();
-const role = useRole();
const redirectToCreateView = (queryParams) => {
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
@@ -42,9 +41,7 @@ const cloneTravelWithEntries = async () => {
}
};
-const isBuyer = computed(() => {
- return role.hasAny(['buyer']);
-});
+const canDelete = computed(() => useAcl().hasAny('Travel','*','WRITE'));
const openDeleteEntryDialog = (id) => {
quasar
@@ -81,7 +78,7 @@ const deleteTravel = async (id) => {