hotfix(master): service change eq like search

This commit is contained in:
avicenan
2026-05-26 18:11:07 +09:00
parent 6c737d97a1
commit 8b1cef245d

View File

@ -18,7 +18,7 @@ export class ServiceModel {
const filterResult = CommonHelper.handleFilter({ const filterResult = CommonHelper.handleFilter({
filter: JSON.stringify({ any: filterAny }), filter: JSON.stringify({ any: filterAny }),
col_any_eq: [], col_any_eq: [],
col_any_like: ["name", "service_type.name"], col_any_like: ["Service.name", "serviceType.name"],
}); });
if (filterResult.whereAttr && filterResult.whereAttr !== "") { if (filterResult.whereAttr && filterResult.whereAttr !== "") {
@ -29,7 +29,7 @@ export class ServiceModel {
var query = repo var query = repo
.createQueryBuilder("Service") .createQueryBuilder("Service")
.leftJoinAndSelect("Service.serviceType", "service_type") .leftJoinAndSelect("Service.serviceType", "serviceType")
if (whereAttr.length != 0) { if (whereAttr.length != 0) {
query = query.where(whereAttr.join(" and "), whereVal); query = query.where(whereAttr.join(" and "), whereVal);