fix: แก้ i18n หา key ไม่เจอ

This commit is contained in:
Net 2024-06-11 15:31:00 +07:00
parent 406180947f
commit d38c2a09fc

View file

@ -235,12 +235,12 @@ const listEmployee = ref();
const itemCard = [
{
icon: 'mdi:office-building',
text: 'CORP',
text: 'customerLegalEntity',
color: 'var(--purple-8)',
},
{
icon: 'heroicons:user-solid',
text: 'PERS',
text: 'customerNaturalPerson',
color: 'var(--green-9)',
},
];
@ -278,7 +278,11 @@ const employeeTab = [
},
];
const fieldCustomer = ref(['all', 'CORP', 'PERS']);
const fieldCustomer = ref([
'all',
'customerLegalEntity',
'customerNaturalPerson',
]);
const dialogCustomerType = ref<boolean>(false);
const dialogInputForm = ref<boolean>(false);
@ -649,15 +653,17 @@ watch(currentPageCustomer, async () => {
watch(fieldSelectedCustomer, async () => {
let resultList;
console.log(fieldSelectedCustomer.value.value);
if (fieldSelectedCustomer.value.value === 'all') {
resultList = await fetchList({ includeBranch: true });
}
if (fieldSelectedCustomer.value.value === 'CORP') {
if (fieldSelectedCustomer.value.value === 'customerLegalEntity') {
resultList = await fetchList({ includeBranch: true, customerType: 'CORP' });
}
if (fieldSelectedCustomer.value.value === 'PERS') {
if (fieldSelectedCustomer.value.value === 'customerNaturalPerson') {
resultList = await fetchList({ includeBranch: true, customerType: 'PERS' });
}
@ -806,22 +812,7 @@ watch(fieldSelectedCustomer, async () => {
style="min-height: 250px"
>
<UsersDetailCardComponent
v-for="i in inputSearch
? resultSearch
: listCustomer.filter((v) => {
if (fieldSelectedCustomer.value === 'all') return true;
if (
fieldSelectedCustomer.value === 'CORP' &&
v.customerType === 'CORP'
)
return true;
if (
fieldSelectedCustomer.value === 'PERS' &&
v.customerType === 'PERS'
)
return true;
})"
v-for="i in inputSearch ? resultSearch : listCustomer"
:key="i.id"
class="hover-card"
:color="i.customerType === 'CORP' ? 'purple' : 'green'"