no message

This commit is contained in:
Kittapath 2024-03-07 15:51:45 +07:00
parent e8abc29fdc
commit 69df428a4a
2 changed files with 91 additions and 1 deletions

View file

@ -887,6 +887,26 @@ export class SalaryPeriodController extends Controller {
return new HttpSuccess(salaryProfile.id);
}
/**
* API
*
* @summary SLR_032 - #31
*
* @param {string} id Guid, *Id
*/
@Get("close/{id}")
async closeSalaryPeriod_ById(@Path() id: string) {
const salaryPeriod = await this.salaryPeriodRepository.findOne({
where: { id: id },
});
if (!salaryPeriod) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลรอบผังเงินเดือนนี้");
}
salaryPeriod.isClose = !salaryPeriod.isClose;
await this.salaryPeriodRepository.save(salaryPeriod);
return new HttpSuccess();
}
/**
* API
*
@ -1017,7 +1037,7 @@ export class SalaryPeriodController extends Controller {
"period",
"isActive",
"effectiveDate",
"isActive",
"isClose",
"status",
"year",
"revisionId",
@ -1051,6 +1071,7 @@ export class SalaryPeriodController extends Controller {
"salaryPeriod.id",
"salaryPeriod.period",
"salaryPeriod.isActive",
"salaryPeriod.isClose",
"salaryPeriod.effectiveDate",
"salaryPeriod.status",
"salaryPeriod.year",