feat: add create permission handling in TreeComponent and MainPage
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s

This commit is contained in:
puriphatt 2025-07-09 10:13:56 +07:00
parent 5e155cfb0c
commit 4a195494d6
3 changed files with 26 additions and 19 deletions

View file

@ -16,6 +16,7 @@ withDefaults(
labelKey?: string;
childrenKey: string;
action?: boolean;
hideCreate?: boolean;
}>(),
{
color: 'transparent',
@ -119,7 +120,7 @@ defineEmits<{
/>
<q-btn
v-if="node.isHeadOffice && typeTree === 'branch'"
v-if="node.isHeadOffice && typeTree === 'branch' && !hideCreate"
:id="`create-sub-branch-btn-${node.name}`"
@click.stop="$emit('create', node)"
icon="mdi-file-plus-outline"