Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-04-18 14:51:24 +07:00
commit afc42b743e
2 changed files with 12 additions and 4 deletions

View file

@ -238,7 +238,12 @@ export class DevelopmentEmployeeHistoryController extends Controller {
: "1=1",
{ year: body.year },
)
.andWhere(body.root != null ? "developmentHistory.root = :root" : "1=1", { root: body.root })
.andWhere(
body.root != null && body.root != undefined ? "developmentHistory.rootId = :root" : "1=1",
{
root: body.root,
},
)
.andWhere("developmentHistory.type = :type", { type: type })
.andWhere(
new Brackets((qb) => {

View file

@ -230,9 +230,12 @@ export class DevelopmentOfficerHistoryController extends Controller {
: "1=1",
{ year: body.year },
)
.andWhere(body.root != null && body.root != undefined ? "development.root = :root" : "1=1", {
root: body.root,
})
.andWhere(
body.root != null && body.root != undefined ? "development.rootId = :root" : "1=1",
{
root: body.root,
},
)
.andWhere(body.root != null ? "developmentHistory.root = :root" : "1=1", { root: body.root })
.andWhere("developmentHistory.type = :type", { type: type })
.andWhere(