fixed#230 noti เพิ่มลิ้งค์ไปหน้ารายละเอียดแก้ไขข้อมูล "ขอแก้ไขทะเบียนประวัติ"
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m37s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m37s
This commit is contained in:
parent
e7a973b764
commit
99bd789702
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue