feat: add filtering option for items based on time group presence

pull/157/head
shancheas 2025-06-10 16:33:36 +07:00
parent 399ca0bdda
commit baeb72fe7d
1 changed files with 10 additions and 0 deletions

View File

@ -121,6 +121,16 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
queryBuilder.andWhere(`${this.tableName}.show_to_booking = true`); queryBuilder.andWhere(`${this.tableName}.show_to_booking = true`);
} }
if (this.filterParam.without_time_group != null) {
const withoutTimeGroup = this.filterParam.without_time_group
? 'Is Null'
: 'Is Not Null';
queryBuilder.andWhere(
`${this.tableName}.time_group_id ${withoutTimeGroup}`,
);
}
return queryBuilder; return queryBuilder;
} }
} }