fix Noti แจ้งเตือนผิด #2417
This commit is contained in:
parent
15ac8d0514
commit
eda3b9c757
4 changed files with 9 additions and 4 deletions
|
|
@ -369,7 +369,8 @@ export class DevelopmentRequestController extends Controller {
|
||||||
posLevelName: profile.posLevel.posLevelName,
|
posLevelName: profile.posLevel.posLevelName,
|
||||||
posTypeName: profile.posType.posTypeName,
|
posTypeName: profile.posType.posTypeName,
|
||||||
fullName: `${profile.prefix}${profile.firstName} ${profile.lastName}`,
|
fullName: `${profile.prefix}${profile.firstName} ${profile.lastName}`,
|
||||||
isDeputy: orgRoot?.isDeputy ?? false
|
isDeputy: orgRoot?.isDeputy ?? false,
|
||||||
|
orgRootId: orgRoot?.id ?? null
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Error calling API:", error);
|
console.error("Error calling API:", error);
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,8 @@ export class ProfileEditController extends Controller {
|
||||||
posLevelName: profile.posLevel.posLevelName,
|
posLevelName: profile.posLevel.posLevelName,
|
||||||
posTypeName: profile.posType.posTypeName,
|
posTypeName: profile.posType.posTypeName,
|
||||||
fullName: `${profile.prefix}${profile.firstName} ${profile.lastName}`,
|
fullName: `${profile.prefix}${profile.firstName} ${profile.lastName}`,
|
||||||
isDeputy: orgRoot?.isDeputy ?? false
|
isDeputy: orgRoot?.isDeputy ?? false,
|
||||||
|
orgRootId: orgRoot?.id ?? null
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Error calling API:", error);
|
console.error("Error calling API:", error);
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,8 @@ export class ProfileEditEmployeeController extends Controller {
|
||||||
posLevelName: "EMP",
|
posLevelName: "EMP",
|
||||||
posTypeName: "EMP",
|
posTypeName: "EMP",
|
||||||
fullName: `${profile.prefix}${profile.firstName} ${profile.lastName}`,
|
fullName: `${profile.prefix}${profile.firstName} ${profile.lastName}`,
|
||||||
isDeputy: orgRoot?.isDeputy ?? false
|
isDeputy: orgRoot?.isDeputy ?? false,
|
||||||
|
orgRootId: orgRoot?.id ?? null
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Error calling API:", error);
|
console.error("Error calling API:", error);
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ export class WorkflowController extends Controller {
|
||||||
posTypeName: string;
|
posTypeName: string;
|
||||||
fullName?: string | null;
|
fullName?: string | null;
|
||||||
isDeputy?: boolean | null;
|
isDeputy?: boolean | null;
|
||||||
|
orgRootId?: string | null;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
// ขั้นที่ 1: ทำการค้นหา profile และ metaWorkflow แบบ parallel
|
// ขั้นที่ 1: ทำการค้นหา profile และ metaWorkflow แบบ parallel
|
||||||
|
|
@ -203,9 +204,10 @@ export class WorkflowController extends Controller {
|
||||||
posMasterAssigns: { assignId: body.sysName },
|
posMasterAssigns: { assignId: body.sysName },
|
||||||
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true },
|
||||||
current_holderId: Not(IsNull()), // เพิ่มเงื่อนไขนี้เพื่อกรองเฉพาะที่มี current_holder
|
current_holderId: Not(IsNull()), // เพิ่มเงื่อนไขนี้เพื่อกรองเฉพาะที่มี current_holder
|
||||||
|
...(body.orgRootId && { orgRootId: body.orgRootId }), // กรองเฉพาะที่อยู่ในสำนักเดียวกัน (ถ้าส่งมา)
|
||||||
},
|
},
|
||||||
relations: ["orgChild1"],
|
relations: ["orgChild1"],
|
||||||
select: ["current_holderId", "orgChild1"], // เลือกเฉพาะ field ที่จำเป็น
|
// select: ["current_holderId", "orgChild1"], // เลือกเฉพาะ field ที่จำเป็น
|
||||||
});
|
});
|
||||||
|
|
||||||
// สร้าง StateOperatorUsers สำหรับ officers
|
// สร้าง StateOperatorUsers สำหรับ officers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue