WIP - more progress with permissions
This commit is contained in:
@@ -22,6 +22,7 @@ interface Props {
|
||||
loading?: boolean
|
||||
selectable?: boolean
|
||||
baseUrl?: string
|
||||
canCreate?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -29,6 +30,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
loading: false,
|
||||
selectable: false,
|
||||
baseUrl: '/runtime/objects',
|
||||
canCreate: true,
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -145,7 +147,7 @@ const handleAction = (actionId: string) => {
|
||||
</Button>
|
||||
|
||||
<!-- Create -->
|
||||
<Button size="sm" @click="emit('create')">
|
||||
<Button v-if="props.canCreate" size="sm" @click="emit('create')">
|
||||
<Plus class="h-4 w-4 mr-2" />
|
||||
New
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user