refactor: overwrite the default shared useRoles with a wrapped composable which injects currentSource from the component context

This commit is contained in:
Pranav C
2024-06-18 19:06:17 +00:00
parent 5d8b1fc55a
commit e82ea344bd
44 changed files with 89 additions and 86 deletions

View File

@@ -4,7 +4,7 @@ import { storeToRefs } from 'pinia'
import { toRef } from '@vue/reactivity'
import { resolveComponent } from '@vue/runtime-core'
import { ref } from 'vue'
import {useRolesWrapper} from "~/composables/useRoles";
const props = withDefaults(
defineProps<{
@@ -20,7 +20,7 @@ const emit = defineEmits<{
openTableCreateDialog: () => void
}>()
const { isUIAllowed } = useRolesWrapper()
const { isUIAllowed } = useRoles()
const base = toRef(props, 'base')