tab จัดการคำขอ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-15 16:49:26 +07:00
parent 67d62541f6
commit e8abe74e45
2 changed files with 14 additions and 8 deletions

View file

@ -85,14 +85,16 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
}
} else typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }];
};
const searchDataTable = async (type: string, employeeClass: string) => {
if (type !== 'all' && employeeClass !== 'all') {
rows.value = listinsignia.value.filter((e: any) => e.insigniaSend === type && e.employeeType === profileType(employeeClass))
} else if (type !== 'all' && employeeClass === 'all') {
const searchDataTable = async (type: string, employeeClasstype: string) => {
typeinsignia.value = type
employeeClass.value = employeeClasstype
if (type !== 'all' && employeeClasstype !== 'all') {
rows.value = listinsignia.value.filter((e: any) => e.insigniaSend === type && e.employeeType === profileType(employeeClasstype))
} else if (type !== 'all' && employeeClasstype === 'all') {
rows.value = listinsignia.value.filter((e: any) => e.insigniaSend === type)
} else if (type === 'all' && employeeClass !== 'all') {
rows.value = listinsignia.value.filter((e: any) => e.employeeType === profileType(employeeClass))
} else if (type === 'all' && employeeClass === 'all') {
} else if (type === 'all' && employeeClasstype !== 'all') {
rows.value = listinsignia.value.filter((e: any) => e.employeeType === profileType(employeeClasstype))
} else if (type === 'all' && employeeClasstype === 'all') {
rows.value = listinsignia.value
}