From 99bd789702449ec249ddafc78582c1ee2533dda2 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 17 Apr 2026 14:00:00 +0700 Subject: [PATCH] =?UTF-8?q?fixed#230=20noti=20=E0=B9=80=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=E0=B8=A5=E0=B8=B4=E0=B9=89=E0=B8=87=E0=B8=84?= =?UTF-8?q?=E0=B9=8C=E0=B9=84=E0=B8=9B=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=A5=E0=B8=B0=E0=B9=80=E0=B8=AD?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=94=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=20"=E0=B8=82=E0=B8=AD=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95?= =?UTF-8?q?=E0=B8=B4"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/WorkflowController.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/WorkflowController.ts b/src/controllers/WorkflowController.ts index 0609c932..bc1d37c4 100644 --- a/src/controllers/WorkflowController.ts +++ b/src/controllers/WorkflowController.ts @@ -237,11 +237,18 @@ export class WorkflowController extends Controller { savedStates.find((state) => state.id === so.stateId && state.order === 1), ); + // add link sysName = REGISTRY_PROFILE or REGISTRY_PROFILE_EMP + let notiLink = ''; + if (body.sysName === 'REGISTRY_PROFILE') { + notiLink = `${process.env.VITE_URL_MGT}/registry-officer/request-edit/personal/${body.refId}`; + } else if (body.sysName === 'REGISTRY_PROFILE_EMP') { + notiLink = `${process.env.VITE_URL_MGT}/registry-employee/request-edit/personal/${body.refId}`; + } const notificationReceivers = stateOperatorUsersToCreate .filter((user) => firstStateOperators.some((op) => op.operator === user.operator)) .map((user) => ({ receiverUserId: user.profileType === "OFFICER" ? user.profileId : user.profileEmployeeId, - notiLink: "", + notiLink: notiLink, })); // ส่ง notification แบบ fire-and-forget