fixed#230 noti เพิ่มลิ้งค์ไปหน้ารายละเอียดแก้ไขข้อมูล "ขอแก้ไขทะเบียนประวัติ"
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m37s

This commit is contained in:
Warunee Tamkoo 2026-04-17 14:00:00 +07:00
parent e7a973b764
commit 99bd789702

View file

@ -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