เพิ่ม remark
This commit is contained in:
parent
9e2f87e7b3
commit
229c1a8e4d
2 changed files with 6 additions and 1 deletions
|
|
@ -795,7 +795,9 @@ export class SalaryPeriodController extends Controller {
|
||||||
* @param {string} type ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น
|
* @param {string} type ประเภทการเลื่อน NONE->ไม่ได้เลื่อน HAFT->ครึ่งขั้น FULL->1ขั้น FULLHAFT->1.5ขั้น
|
||||||
*/
|
*/
|
||||||
@Post("change/type")
|
@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({
|
const salaryProfile = await this.salaryProfileRepository.findOne({
|
||||||
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
relations: ["salaryOrg", "salaryOrg.salaryPeriod"],
|
||||||
where: { id: body.profileId },
|
where: { id: body.profileId },
|
||||||
|
|
@ -867,6 +869,8 @@ export class SalaryPeriodController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบระดับตำแหน่ง");
|
||||||
}
|
}
|
||||||
salaryProfile.type = body.type;
|
salaryProfile.type = body.type;
|
||||||
|
let _null: any = null;
|
||||||
|
salaryProfile.remark = body.remark == null ? _null : body.remark;
|
||||||
let type = salaryProfile.type;
|
let type = salaryProfile.type;
|
||||||
//SalaryRank
|
//SalaryRank
|
||||||
let salaryRanks: any = null;
|
let salaryRanks: any = null;
|
||||||
|
|
|
||||||
|
|
@ -1535,6 +1535,7 @@ export class SalaryPeriodEmployeeController extends Controller {
|
||||||
isRetired: item.isRetired,
|
isRetired: item.isRetired,
|
||||||
isReserve: item.isReserve,
|
isReserve: item.isReserve,
|
||||||
isNext: item.isNext,
|
isNext: item.isNext,
|
||||||
|
remark: item.remark,
|
||||||
}));
|
}));
|
||||||
return new HttpSuccess({ data: mapSalaryProfile, total });
|
return new HttpSuccess({ data: mapSalaryProfile, total });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue