New Backend changes
This commit is contained in:
@@ -4,6 +4,9 @@ import FloatingActionButton from "~/components/mobile/FloatingActionButton.vue";
|
||||
import EntityTable from "~/components/EntityTable.vue";
|
||||
import EntityListMobile from "~/components/EntityListMobile.vue";
|
||||
|
||||
const { has } = usePermission()
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
required: true,
|
||||
@@ -83,23 +86,6 @@ const filteredRows = computed(() => {
|
||||
})
|
||||
}
|
||||
|
||||
if(!useRole().generalAvailableRights.value[type].showToAllUsers) {
|
||||
if(useRole().checkRight(`${type}-viewAll`)){
|
||||
console.log("Right to Show All")
|
||||
} else if(useRole().checkRight(type)){
|
||||
console.log("Only Righty to show Own")
|
||||
console.log(tempItems)
|
||||
tempItems = tempItems.filter(item => item.profiles.includes(profileStore.activeProfile.id))
|
||||
} else {
|
||||
console.log("No Right to Show")
|
||||
tempItems = []
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return useSearch(searchString.value, tempItems)
|
||||
})
|
||||
</script>
|
||||
@@ -139,7 +125,7 @@ const filteredRows = computed(() => {
|
||||
/>
|
||||
|
||||
<UButton
|
||||
v-if="platform !== 'mobile' && useRole().checkRight(`${type}-create`)"
|
||||
v-if="platform !== 'mobile' && has(`${type}-create`)/*&& useRole().checkRight(`${type}-create`)*/"
|
||||
@click="router.push(`/standardEntity/${type}/create`)"
|
||||
class="ml-3"
|
||||
>+ {{dataType.labelSingle}}</UButton>
|
||||
|
||||
Reference in New Issue
Block a user