fixed #2436 add link in noti request idp

This commit is contained in:
Warunee Tamkoo 2026-04-28 14:57:51 +07:00
parent 2417c90dc2
commit 3833901bea

View file

@ -238,12 +238,15 @@ export class WorkflowController extends Controller {
);
// add link sysName = REGISTRY_PROFILE or REGISTRY_PROFILE_EMP
let notiLink = '';
if (body.sysName === 'REGISTRY_PROFILE') {
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') {
} else if (body.sysName === "REGISTRY_PROFILE_EMP") {
notiLink = `${process.env.VITE_URL_MGT}/registry-employee/request-edit/personal/${body.refId}`;
} else if (body.sysName === "REGISTRY_IDP") {
notiLink = `${process.env.VITE_URL_MGT}/registry-officer/request-edit-page/${body.refId}`;
}
const notificationReceivers = stateOperatorUsersToCreate
.filter((user) => firstStateOperators.some((op) => op.operator === user.operator))
.map((user) => ({
@ -911,14 +914,14 @@ export class WorkflowController extends Controller {
const roodIds = [posMasterUser.orgRootId];
const orgRoot = await this.orgRootRepo.findOne({
select: { id: true, isDeputy: true },
where: {
where: {
id: Not(posMasterUser.orgRootId),
isDeputy: true,
orgRevision: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false },
},
});
if (orgRoot && orgRoot.isDeputy) {
roodIds.push(orgRoot.id)
roodIds.push(orgRoot.id);
}
// 2. Pre-calculate conditions - ย้ายออกมาข้างนอก