fix filter

This commit is contained in:
AdisakKanthawilang 2024-05-21 15:40:03 +07:00
parent bd9b8b4183
commit d310c3384e
2 changed files with 5 additions and 9 deletions

View file

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