fix search

This commit is contained in:
AdisakKanthawilang 2024-10-03 15:14:12 +07:00
parent a5b57f287d
commit c0f387bda5

View file

@ -326,6 +326,14 @@ export class DevelopmentOfficerHistoryController extends Controller {
{
keyword: `%${body.keyword}%`,
},
)
.orWhere(
body.keyword != null && body.keyword != ""
? "developmentHistory.citizenId LIKE :keyword"
: "1=1",
{
keyword: `%${body.keyword}%`,
},
);
}),
)