refactor: add hideDelete prop to various components and update delete button visibility logic
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-07-07 10:40:35 +07:00
parent f646b3c9ba
commit a5791a1b54
7 changed files with 40 additions and 57 deletions

View file

@ -23,6 +23,7 @@ const prop = withDefaults(
addButton?: boolean;
prefixId?: string;
hideAction?: boolean;
hideDelete?: boolean;
}>(),
{
gridView: false,
@ -269,6 +270,7 @@ defineEmits<{
v-if="!inTable && !hideAction"
:id-name="props.row.firstName"
:status="props.row.status"
:hide-delete="hideDelete"
@view="$emit('view', props.row)"
@edit="$emit('edit', props.row)"
@delete="$emit('delete', props.row)"
@ -282,6 +284,7 @@ defineEmits<{
<div class="col-12 col-md-3 col-sm-6">
<PersonCard
history
:hide-delete="hideDelete"
:hide-action="hideAction"
:id="`card-${props.row.firstNameEN}`"
:field-selected="fieldSelected"