refactor: add conditional delete button visibility in agencies management
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
f286f6a16e
commit
d4cab27aaf
2 changed files with 6 additions and 4 deletions
|
|
@ -63,6 +63,7 @@ const props = withDefaults(
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
isEdit?: boolean;
|
isEdit?: boolean;
|
||||||
hideAction?: boolean;
|
hideAction?: boolean;
|
||||||
|
hideDelete?: boolean;
|
||||||
|
|
||||||
dataId?: string;
|
dataId?: string;
|
||||||
}>(),
|
}>(),
|
||||||
|
|
@ -486,7 +487,7 @@ watch(
|
||||||
type="button"
|
type="button"
|
||||||
/>
|
/>
|
||||||
<DeleteButton
|
<DeleteButton
|
||||||
v-if="!isEdit"
|
v-if="!isEdit && !hideDelete"
|
||||||
id="btn-info-basic-delete"
|
id="btn-info-basic-delete"
|
||||||
icon-only
|
icon-only
|
||||||
@click="
|
@click="
|
||||||
|
|
|
||||||
|
|
@ -366,6 +366,7 @@ watch(
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FloatingActionButton
|
<FloatingActionButton
|
||||||
|
v-if="canAccess('agencies', 'edit')"
|
||||||
style="z-index: 999"
|
style="z-index: 999"
|
||||||
hide-icon
|
hide-icon
|
||||||
@click="triggerDialog('add')"
|
@click="triggerDialog('add')"
|
||||||
|
|
@ -750,7 +751,7 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<KebabAction
|
<KebabAction
|
||||||
v-if="canAccess('agencies', 'edit')"
|
:hide-delete="!canAccess('agencies', 'edit')"
|
||||||
:id-name="props.row.name"
|
:id-name="props.row.name"
|
||||||
:status="props.row.status"
|
:status="props.row.status"
|
||||||
@view="
|
@view="
|
||||||
|
|
@ -834,7 +835,7 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<KebabAction
|
<KebabAction
|
||||||
v-if="canAccess('agencies', 'edit')"
|
:hide-delete="!canAccess('agencies', 'edit')"
|
||||||
:id-name="props.row.id"
|
:id-name="props.row.id"
|
||||||
:status="props.row.status"
|
:status="props.row.status"
|
||||||
@view="
|
@view="
|
||||||
|
|
@ -975,7 +976,7 @@ watch(
|
||||||
@change-status="triggerChangeStatus"
|
@change-status="triggerChangeStatus"
|
||||||
:readonly="!pageState.isDrawerEdit"
|
:readonly="!pageState.isDrawerEdit"
|
||||||
:isEdit="pageState.isDrawerEdit"
|
:isEdit="pageState.isDrawerEdit"
|
||||||
:hide-action="!canAccess('agencies', 'edit')"
|
:hide-delete="!canAccess('agencies', 'edit')"
|
||||||
v-model="pageState.addModal"
|
v-model="pageState.addModal"
|
||||||
v-model:drawer-model="pageState.viewDrawer"
|
v-model:drawer-model="pageState.viewDrawer"
|
||||||
v-model:data="formData"
|
v-model:data="formData"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue