From c38990f6ed46cadc634f3faca32fc5424923ab6b Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 17 Mar 2025 10:35:44 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= =?UTF-8?q?=20=E0=B9=80=E0=B8=A3=E0=B8=B5=E0=B8=A2=E0=B8=87=E0=B8=A5?= =?UTF-8?q?=E0=B8=B3=E0=B8=94=E0=B8=B1=E0=B8=9A=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B9=83=E0=B8=99=E0=B8=AB=E0=B8=99=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=AA=E0=B8=A3=E0=B8=B8=E0=B8=9B=E0=B8=9C=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../4_Result/DialogSendToCommand.vue | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue index 64c6b73f2..7a39dfc26 100644 --- a/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue +++ b/src/modules/11_discipline/components/4_Result/DialogSendToCommand.vue @@ -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) + ); } } );