fix: แก้ i18n หา key ไม่เจอ
This commit is contained in:
parent
406180947f
commit
d38c2a09fc
1 changed files with 12 additions and 21 deletions
|
|
@ -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'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue