From 2a119b8beed68689fb45042dc0f1d3ac001a07e0 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 24 Dec 2024 10:20:04 +0700 Subject: [PATCH 1/2] =?UTF-8?q?fix=20=E0=B8=84=E0=B9=89=E0=B8=99=E0=B8=AB?= =?UTF-8?q?=E0=B8=B2=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=9E=E0=B9=89=E0=B8=99?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3=20#871?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileController.ts | 9 ++++++++- src/controllers/ProfileEmployeeController.ts | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index be236f11..058c872f 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -4136,7 +4136,14 @@ export class ProfileController extends Controller { .leftJoinAndSelect("current_holders.orgChild2", "orgChild2") .leftJoinAndSelect("current_holders.orgChild3", "orgChild3") .leftJoinAndSelect("current_holders.orgChild4", "orgChild4") - .where("current_holders.orgRevisionId = :orgRevisionId", { orgRevisionId: findRevision.id }) + .where( + node && nodeId + ? "current_holders.orgRevisionId = :orgRevisionId" + : "1=1", + { + orgRevisionId: node && nodeId ? findRevision.id : undefined, + } + ) .andWhere( _data.root != undefined && _data.root != null ? _data.root[0] != null diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index dff5fe59..760c0c1f 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -1454,7 +1454,14 @@ export class ProfileEmployeeController extends Controller { .leftJoinAndSelect("current_holders.orgChild2", "orgChild2") .leftJoinAndSelect("current_holders.orgChild3", "orgChild3") .leftJoinAndSelect("current_holders.orgChild4", "orgChild4") - .where("current_holders.orgRevisionId = :orgRevisionId", { orgRevisionId: findRevision.id }) + .where( + node && nodeId + ? "current_holders.orgRevisionId = :orgRevisionId" + : "1=1", + { + orgRevisionId: node && nodeId ? findRevision.id : undefined, + } + ) .andWhere( _data.root != undefined && _data.root != null ? _data.root[0] != null From b50014e43f42c874f08957139e2733b13810049f Mon Sep 17 00:00:00 2001 From: kittapath Date: Tue, 24 Dec 2024 10:59:31 +0700 Subject: [PATCH 2/2] no message --- src/controllers/ProfileController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index be236f11..c846859a 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -1967,7 +1967,7 @@ export class ProfileController extends Controller { process.env.AUTH_ACCOUNT_SECRET, { expiresIn: "15m" }, ); - const link = process.env.URL + "/verifyemail?upn=" + token; + const link = process.env.VITE_URL_USER + "/verifyemail?upn=" + token; await new CallAPI() .PostData(req, "/placement/noti/send-mail", { @@ -4863,7 +4863,7 @@ export class ProfileController extends Controller { node: null, nodeId: null, salary: profile ? profile.amount : null, - amountSpecial: profile ? profile.amountSpecial : null + amountSpecial: profile ? profile.amountSpecial : null, }; if (_profile.child4Id != null) {