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 = [
|
const itemCard = [
|
||||||
{
|
{
|
||||||
icon: 'mdi:office-building',
|
icon: 'mdi:office-building',
|
||||||
text: 'CORP',
|
text: 'customerLegalEntity',
|
||||||
color: 'var(--purple-8)',
|
color: 'var(--purple-8)',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'heroicons:user-solid',
|
icon: 'heroicons:user-solid',
|
||||||
text: 'PERS',
|
text: 'customerNaturalPerson',
|
||||||
color: 'var(--green-9)',
|
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 dialogCustomerType = ref<boolean>(false);
|
||||||
const dialogInputForm = ref<boolean>(false);
|
const dialogInputForm = ref<boolean>(false);
|
||||||
|
|
@ -649,15 +653,17 @@ watch(currentPageCustomer, async () => {
|
||||||
watch(fieldSelectedCustomer, async () => {
|
watch(fieldSelectedCustomer, async () => {
|
||||||
let resultList;
|
let resultList;
|
||||||
|
|
||||||
|
console.log(fieldSelectedCustomer.value.value);
|
||||||
|
|
||||||
if (fieldSelectedCustomer.value.value === 'all') {
|
if (fieldSelectedCustomer.value.value === 'all') {
|
||||||
resultList = await fetchList({ includeBranch: true });
|
resultList = await fetchList({ includeBranch: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fieldSelectedCustomer.value.value === 'CORP') {
|
if (fieldSelectedCustomer.value.value === 'customerLegalEntity') {
|
||||||
resultList = await fetchList({ includeBranch: true, customerType: 'CORP' });
|
resultList = await fetchList({ includeBranch: true, customerType: 'CORP' });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fieldSelectedCustomer.value.value === 'PERS') {
|
if (fieldSelectedCustomer.value.value === 'customerNaturalPerson') {
|
||||||
resultList = await fetchList({ includeBranch: true, customerType: 'PERS' });
|
resultList = await fetchList({ includeBranch: true, customerType: 'PERS' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -806,22 +812,7 @@ watch(fieldSelectedCustomer, async () => {
|
||||||
style="min-height: 250px"
|
style="min-height: 250px"
|
||||||
>
|
>
|
||||||
<UsersDetailCardComponent
|
<UsersDetailCardComponent
|
||||||
v-for="i in inputSearch
|
v-for="i in inputSearch ? resultSearch : listCustomer"
|
||||||
? 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;
|
|
||||||
})"
|
|
||||||
:key="i.id"
|
:key="i.id"
|
||||||
class="hover-card"
|
class="hover-card"
|
||||||
:color="i.customerType === 'CORP' ? 'purple' : 'green'"
|
:color="i.customerType === 'CORP' ? 'purple' : 'green'"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue