From ddf0309b0b05ee5f59b8551a84b329b4b7bcdcab Mon Sep 17 00:00:00 2001 From: harid Date: Wed, 20 May 2026 15:53:10 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=9A?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=88=E0=B8=B8=20=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=99=E0=B8=B3=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B9=84?= =?UTF-8?q?=E0=B8=A1=E0=B9=88=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=20#2506?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 7bac242a..59d75312 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -6594,8 +6594,8 @@ export class CommandController extends Controller { profile.amountSpecial = item.bodyProfile.amountSpecial ?? null; profile.isProbation = item.bodyProfile.isProbation; //เพิ่มใหม่จากรับโอน - profile.rank = item?.bodyProfile?.rank ?? null; - profile.prefix = item?.bodyProfile?.rank ?? item?.bodyProfile?.prefix ?? null; + profile.rank = item?.bodyProfile?.rank || null; + profile.prefix = item?.bodyProfile?.rank || item?.bodyProfile?.prefix || null; profile.prefixMain = item?.bodyProfile?.prefix ?? null; profile.firstName = item.bodyProfile.firstName ?? null; profile.lastName = item.bodyProfile.lastName ?? null; @@ -6658,8 +6658,8 @@ export class CommandController extends Controller { profile.amount = item.bodyProfile.amount ?? null; profile.amountSpecial = item.bodyProfile.amountSpecial ?? null; profile.isProbation = item.bodyProfile.isProbation; - profile.rank = item?.bodyProfile?.rank ?? null; - profile.prefix = item?.bodyProfile?.rank ?? item?.bodyProfile?.prefix ?? null; + profile.rank = item?.bodyProfile?.rank || null; + profile.prefix = item?.bodyProfile?.rank || item?.bodyProfile?.prefix || null; profile.prefixMain = item?.bodyProfile?.prefix ?? null; profile.firstName = item.bodyProfile.firstName ?? null; profile.lastName = item.bodyProfile.lastName ?? null; @@ -6717,8 +6717,8 @@ export class CommandController extends Controller { profile.lastUpdateFullName = req.user.name; profile.lastUpdatedAt = new Date(); //เพิ่มใหม่จากรับโอน - profile.rank = item?.bodyProfile?.rank ?? null; - profile.prefix = item?.bodyProfile?.rank ?? item?.bodyProfile?.prefix ?? null; + profile.rank = item?.bodyProfile?.rank || null; + profile.prefix = item?.bodyProfile?.rank || item?.bodyProfile?.prefix || null; profile.prefixMain = item?.bodyProfile?.prefix ?? null; profile.firstName = item.bodyProfile.firstName && item.bodyProfile.firstName != ""