Merge branch 'nice_dev' into develop
This commit is contained in:
commit
0a6f0e20e0
2 changed files with 14 additions and 8 deletions
|
|
@ -57,7 +57,11 @@ const fecthlistRound = async () => {
|
||||||
if (optionRound.value.length !== 0) {
|
if (optionRound.value.length !== 0) {
|
||||||
DataStore.optionRound = optionRound.value;
|
DataStore.optionRound = optionRound.value;
|
||||||
const lastValue = optionRound.value[0];
|
const lastValue = optionRound.value[0];
|
||||||
round.value = lastValue.id.toString();
|
if (DataStore.roundId) {
|
||||||
|
round.value = DataStore.roundId;
|
||||||
|
} else {
|
||||||
|
round.value = lastValue.id.toString();
|
||||||
|
}
|
||||||
DataStore.roundId = round.value;
|
DataStore.roundId = round.value;
|
||||||
roundName.value = lastValue.name;
|
roundName.value = lastValue.name;
|
||||||
await fecthStat(round.value);
|
await fecthStat(round.value);
|
||||||
|
|
|
||||||
|
|
@ -85,14 +85,16 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
||||||
}
|
}
|
||||||
} else typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }];
|
} else typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }];
|
||||||
};
|
};
|
||||||
const searchDataTable = async (type: string, employeeClass: string) => {
|
const searchDataTable = async (type: string, employeeClasstype: string) => {
|
||||||
if (type !== 'all' && employeeClass !== 'all') {
|
typeinsignia.value = type
|
||||||
rows.value = listinsignia.value.filter((e: any) => e.insigniaSend === type && e.employeeType === profileType(employeeClass))
|
employeeClass.value = employeeClasstype
|
||||||
} else if (type !== 'all' && employeeClass === 'all') {
|
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)
|
rows.value = listinsignia.value.filter((e: any) => e.insigniaSend === type)
|
||||||
} else if (type === 'all' && employeeClass !== 'all') {
|
} else if (type === 'all' && employeeClasstype !== 'all') {
|
||||||
rows.value = listinsignia.value.filter((e: any) => e.employeeType === profileType(employeeClass))
|
rows.value = listinsignia.value.filter((e: any) => e.employeeType === profileType(employeeClasstype))
|
||||||
} else if (type === 'all' && employeeClass === 'all') {
|
} else if (type === 'all' && employeeClasstype === 'all') {
|
||||||
rows.value = listinsignia.value
|
rows.value = listinsignia.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue