เพิ่ม remark

This commit is contained in:
Kittapath 2024-07-08 11:05:57 +07:00
parent 9e2f87e7b3
commit 229c1a8e4d
2 changed files with 6 additions and 1 deletions

View file

@ -795,7 +795,9 @@ export class SalaryPeriodController extends Controller {
* @param {string} type NONE-> HAFT-> FULL->1 FULLHAFT->1.5
*/
@Post("change/type")
async changeType(@Body() body: { profileId: string; type: string; isReserve: boolean }) {
async changeType(
@Body() body: { profileId: string; type: string; isReserve: boolean; remark?: string | null },
) {
const salaryProfile = await this.salaryProfileRepository.findOne({
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
where: { id: body.profileId },
@ -867,6 +869,8 @@ export class SalaryPeriodController extends Controller {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง");
}
salaryProfile.type = body.type;
let _null: any = null;
salaryProfile.remark = body.remark == null ? _null : body.remark;
let type = salaryProfile.type;
//SalaryRank
let salaryRanks: any = null;

View file

@ -1535,6 +1535,7 @@ export class SalaryPeriodEmployeeController extends Controller {
isRetired: item.isRetired,
isReserve: item.isReserve,
isNext: item.isNext,
remark: item.remark,
}));
return new HttpSuccess({ data: mapSalaryProfile, total });
}