From 13129d6da89538c2e9a1c563a3298023f6ba7a48 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 27 Aug 2024 11:58:45 +0700 Subject: [PATCH] refactor: nationality value --- src/components/02_personnel-management/FormPerson.vue | 2 +- src/components/03_customer-management/TableEmpoloyee.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/02_personnel-management/FormPerson.vue b/src/components/02_personnel-management/FormPerson.vue index 4d2d020c..e258ffcd 100644 --- a/src/components/02_personnel-management/FormPerson.vue +++ b/src/components/02_personnel-management/FormPerson.vue @@ -386,7 +386,7 @@ watch( hide-bottom-space input-debounce="0" option-label="label" - option-value="label" + option-value="value" v-model="nationality" lazy-rules="ondemand" class="col-2" diff --git a/src/components/03_customer-management/TableEmpoloyee.vue b/src/components/03_customer-management/TableEmpoloyee.vue index 710256f3..fa3cc7f0 100644 --- a/src/components/03_customer-management/TableEmpoloyee.vue +++ b/src/components/03_customer-management/TableEmpoloyee.vue @@ -3,7 +3,9 @@ import { calculateAge, dateFormat } from 'src/utils/datetime'; import PersonCard from 'components/shared/PersonCard.vue'; import KebabAction from '../shared/KebabAction.vue'; +import useOptionStore from 'stores/options'; +const optionStore = useOptionStore(); const pageSize = defineModel('pageSize', { default: 30 }); const currentPage = defineModel('currentPage', { default: 1 }); @@ -179,7 +181,7 @@ defineEmits<{ - {{ props.row.nationality || '-' }} + {{ optionStore.mapOption(props.row.nationality || '-') }}