This commit is contained in:
AdisakKanthawilang 2025-06-17 18:17:49 +07:00
parent f5fd33f7f7
commit 3b067ef714
2 changed files with 52 additions and 28 deletions

View file

@ -1618,7 +1618,7 @@ export class SalaryPeriodController extends Controller {
.orWhere("profile.position LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.posType LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.posLevel LIKE :keyword", { keyword: `%${body.keyword}%` })
// .orWhere("profile.posExecutive LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.posExecutive LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.amount LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.amountSpecial LIKE :keyword", { keyword: `%${body.keyword}%` })
.orWhere("profile.amountUse LIKE :keyword", { keyword: `%${body.keyword}%` })
@ -1694,7 +1694,15 @@ export class SalaryPeriodController extends Controller {
.take(body.pageSize)
.getManyAndCount();
return new HttpSuccess({ data: salaryProfile, total });
const result = salaryProfile.map((profile) => ({
...profile,
posExecutive:
profile.positionExecutiveField
? `${profile.posExecutive} (${profile.positionExecutiveField})`
: profile.posExecutive ?? null,
}));
return new HttpSuccess({ data: result, total });
}
/**