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;
|
||||
isEdit?: boolean;
|
||||
hideAction?: boolean;
|
||||
hideDelete?: boolean;
|
||||
|
||||
dataId?: string;
|
||||
}>(),
|
||||
|
|
@ -486,7 +487,7 @@ watch(
|
|||
type="button"
|
||||
/>
|
||||
<DeleteButton
|
||||
v-if="!isEdit"
|
||||
v-if="!isEdit && !hideDelete"
|
||||
id="btn-info-basic-delete"
|
||||
icon-only
|
||||
@click="
|
||||
|
|
|
|||
|
|
@ -366,6 +366,7 @@ watch(
|
|||
</script>
|
||||
<template>
|
||||
<FloatingActionButton
|
||||
v-if="canAccess('agencies', 'edit')"
|
||||
style="z-index: 999"
|
||||
hide-icon
|
||||
@click="triggerDialog('add')"
|
||||
|
|
@ -750,7 +751,7 @@ watch(
|
|||
"
|
||||
/>
|
||||
<KebabAction
|
||||
v-if="canAccess('agencies', 'edit')"
|
||||
:hide-delete="!canAccess('agencies', 'edit')"
|
||||
:id-name="props.row.name"
|
||||
:status="props.row.status"
|
||||
@view="
|
||||
|
|
@ -834,7 +835,7 @@ watch(
|
|||
"
|
||||
/>
|
||||
<KebabAction
|
||||
v-if="canAccess('agencies', 'edit')"
|
||||
:hide-delete="!canAccess('agencies', 'edit')"
|
||||
:id-name="props.row.id"
|
||||
:status="props.row.status"
|
||||
@view="
|
||||
|
|
@ -975,7 +976,7 @@ watch(
|
|||
@change-status="triggerChangeStatus"
|
||||
:readonly="!pageState.isDrawerEdit"
|
||||
:isEdit="pageState.isDrawerEdit"
|
||||
:hide-action="!canAccess('agencies', 'edit')"
|
||||
:hide-delete="!canAccess('agencies', 'edit')"
|
||||
v-model="pageState.addModal"
|
||||
v-model:drawer-model="pageState.viewDrawer"
|
||||
v-model:data="formData"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue