This commit is contained in:
AdisakKanthawilang 2024-04-05 10:27:01 +07:00
parent 14f5a082ca
commit 3de8591ce0

View file

@ -151,12 +151,18 @@ export class DevelopmentScholarshipController extends Controller {
.leftJoinAndSelect("developmentScholarship.posLevel", "posLevel")
.leftJoinAndSelect("developmentScholarship.posType", "posType")
.andWhere(
year != 0 && year != null && year != undefined
year !== 0 && year != null && year != undefined
? "developmentScholarship.scholarshipYear = :scholarshipYear"
: "1=1",
{ scholarshipYear: year },
)
.andWhere("developmentScholarship.scholarshipType = :scholarshipType", { scholarshipType: scholarshipType })
.andWhere(
scholarshipType != null && scholarshipType != undefined
?
"developmentScholarship.scholarshipType = :scholarshipType"
: "1=1",
{ scholarshipType: scholarshipType }
)
.andWhere(
new Brackets((qb) => {
qb.where(