From 83a5d96548a907067eb6220829aebae2e61548f3 Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Tue, 29 Jul 2025 23:06:20 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=88=E0=B8=87=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index e7428fa5..e0b3240b 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -6636,11 +6636,12 @@ export class CommandController extends Controller { ].find(Boolean) ?? ""; // 6. หา position ที่ถูกเลือกแบบปลอดภัย - const selectedPosition = item.posMaster?.positions?.find( - (x) => x.positionIsSelected === true, - ); + const selectedPosition = item.posMaster?.positions; const positionName = - selectedPosition?.positionName ?? item.posMaster?.current_holder?.position ?? "-"; + selectedPosition + ?.map((pos) => pos.positionName) + .filter(Boolean) + .join(", ") ?? "-"; // 7. สร้าง metaAct แบบปลอดภัย const metaAct = {