update service fare
This commit is contained in:
@ -82,15 +82,15 @@ export class ServiceFareController {
|
|||||||
)
|
)
|
||||||
.addSelect('COALESCE(sfa.min, 0)', "min_fare")
|
.addSelect('COALESCE(sfa.min, 0)', "min_fare")
|
||||||
.addSelect('COALESCE(sfa.max, 0)', "max_fare")
|
.addSelect('COALESCE(sfa.max, 0)', "max_fare")
|
||||||
.addSelect('sfa.service_type_name', "service_type_name")
|
.addSelect("st.name", "service_type_name")
|
||||||
.orderBy("Service." + param.order_field, param.order_direction)
|
.orderBy("Service." + param.order_field, param.order_direction)
|
||||||
.skip(offset)
|
.skip(offset)
|
||||||
.take(limit);
|
.take(limit);
|
||||||
|
|
||||||
if (filterAny !== "") {
|
if (filterAny !== "") {
|
||||||
const anyVal = filterAny.includes("%") ? filterAny : `%${filterAny}%`;
|
const anyVal = filterAny.includes("%") ? filterAny : `%${filterAny}%`;
|
||||||
res_list.andWhere("(Service.name ILIKE :any OR sfa.service_type_name ILIKE :any)", { any: anyVal });
|
res_list.andWhere("(Service.name ILIKE :any OR st.service_type_name ILIKE :any)", { any: anyVal });
|
||||||
res_count.andWhere("(Service.name ILIKE :any OR sfa.service_type_name ILIKE :any)", { any: anyVal });
|
res_count.andWhere("(Service.name ILIKE :any OR st.service_type_name ILIKE :any)", { any: anyVal });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (param.with_deleted) {
|
if (param.with_deleted) {
|
||||||
|
|||||||
Reference in New Issue
Block a user