แก้ไข filter ประกาศเกษียณอายุราชการ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-10-03 11:58:37 +07:00
parent f773550bfd
commit e0caef0908
3 changed files with 14 additions and 4 deletions

View file

@ -235,7 +235,7 @@ const closeModalTree = async () => {
//
const nextPage = (id: string) => {
router.push({
path: `appoint-promote/detail/${id}`,
path: `appoint-employee/detail/${id}`,
});
};
// input

View file

@ -68,6 +68,7 @@ const AppointEmployeeDetail = () => import("@/modules/05_placement/components/Ap
const OtherMain = () => import("@/modules/05_placement/components/Other/Main.vue")
const OthertDetail = () => import("@/modules/05_placement/components/Other/Detail.vue");
export default [
{
path: "/placement",

View file

@ -114,8 +114,18 @@ const fetchRetirement = async (type: string, year: any) => {
});
});
yearOptions.value = [{ id: 0, year: "ทั้งหมด" }];
yearOptions.value.push(...option);
// yearOptions.value.push(...option);
if (option.length !== 0) {
const double_name = [...new Set(option.map((item: any) => item.id))];
for (let i = 1; i <= double_name.length; i++) {
const type = double_name[i - 1];
const listtype = {
id: type,
year: (Number(type) + 543).toString(),
};
yearOptions.value.push(listtype);
}
}
yearOptionsFilter.value = yearOptions.value;
if (yearOptionsFilter.value.length == 1) {
fiscalyear.value = yearOptionsFilter.value[0].id;
@ -159,7 +169,6 @@ const pagination = ref({
page: 1,
rowsPerPage: 10,
});
const filterSelector = (val: any, update: Function) => {
update(() => {
yearOptions.value = yearOptionsFilter.value.filter(