refactor: add id

This commit is contained in:
Thanaphon Frappet 2024-11-21 09:48:46 +07:00
parent 3036ca1070
commit 1e15dcc856
3 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,6 @@
<script lang="ts" setup>
defineProps<{
prefixId?: string;
inactive?: boolean;
color?: 'none' | 'pers' | 'corp';
data: {
@ -52,6 +53,7 @@ defineProps<{
<div class="branch-card__action">
<q-btn
:id="`${prefixId}-btn-view-detail`"
icon="mdi-eye-outline"
size="sm"
dense

View file

@ -21,6 +21,7 @@ const prop = withDefaults(
fieldSelected?: string[];
inTable?: boolean;
addButton?: boolean;
prefixId?: string;
}>(),
{
gridView: false,
@ -74,7 +75,7 @@ defineEmits<{
</span>
<span v-if="col.label === '' && !!addButton">
<AddButton
id="btn-add-employee"
:id="`${prefixId || 'default'}-btn-add-employee`"
icon-only
@click.stop="() => $emit('add')"
/>