คำนวนวันเกษียณอายุราชการ
This commit is contained in:
parent
db479c4ab6
commit
73e07dfed6
3 changed files with 54 additions and 1236 deletions
|
|
@ -25,7 +25,7 @@ import { OrgRevision } from "../entities/OrgRevision";
|
|||
import { PosMaster } from "../entities/PosMaster";
|
||||
import { PosLevel } from "../entities/PosLevel";
|
||||
import { PosType } from "../entities/PosType";
|
||||
import { calculateRetireDate, calculateRetireYear } from "../interfaces/utils";
|
||||
import { calculateAge, calculateRetireDate, calculateRetireYear } from "../interfaces/utils";
|
||||
import { RequestWithUser } from "../middlewares/user";
|
||||
|
||||
@Route("api/v1/org/profile")
|
||||
|
|
@ -80,6 +80,19 @@ export class ProfileController extends Controller {
|
|||
return new HttpSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* API คำนวนวันเกษียณ
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Post("cal/retire")
|
||||
async calDateRetire(@Body() birthDate: Date) {
|
||||
const retireDate = await calculateRetireDate(birthDate);
|
||||
const age = calculateAge(birthDate);
|
||||
|
||||
return new HttpSuccess({ retireDate, age });
|
||||
}
|
||||
|
||||
/**
|
||||
* API แก้ไขทะเบียนประวัติ
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue