Merge branch 'develop' of github.com:Frappet/bma-ehr-kpi into develop

This commit is contained in:
Kittapath 2024-04-19 17:36:02 +07:00
commit e29c7c127f
5 changed files with 312 additions and 171 deletions

View file

@ -193,6 +193,7 @@ export class kpiRoleController extends Controller {
@Query("nodeId") nodeId?: string | null,
@Query("node") node?: number | null,
@Query("keyword") keyword?: string,
@Query("position") position?: string,
) {
const [kpiRole, total] = await AppDataSource.getRepository(KpiRole)
.createQueryBuilder("kpiRole")
@ -218,8 +219,8 @@ export class kpiRoleController extends Controller {
round: `${round?.trim().toUpperCase()}`,
},
)
.andWhere(keyword != undefined ? "kpiRole.projectName LIKE :keyword" : "1=1", {
keyword: `%${keyword}%`,
.andWhere(position != undefined ? "kpiRole.position LIKE :position" : "1=1", {
position: `%${position}%`,
})
.select([
"kpiRole.id",