วินัย เรียงลำดับการแสดงรายการคำสั่งในหน้าสรุปผล

This commit is contained in:
setthawutttty 2025-03-17 10:35:44 +07:00
parent b5ce6fe867
commit c38990f6ed

View file

@ -167,16 +167,20 @@ watch(
rowsMain.value = rows.value;
const data = await storeCommand.getCommandTypes();
listCommand.value = data.filter(
(v: any) =>
v.code == "C-PM-19" ||
v.code == "C-PM-20" ||
v.code == "C-PM-27" ||
v.code == "C-PM-28" ||
v.code == "C-PM-29" ||
v.code == "C-PM-30" ||
v.code == "C-PM-31"
);
const order = [
"C-PM-20",
"C-PM-19",
"C-PM-29",
"C-PM-28",
"C-PM-27",
"C-PM-30",
"C-PM-31",
];
listCommand.value = data
.filter((v: any) => order.includes(v.code))
.sort(
(a: any, b: any) => order.indexOf(a.code) - order.indexOf(b.code)
);
}
}
);