permisstion ทะเบียนประวัติ(ที่ระบบอื่นๆ)

This commit is contained in:
Bright 2024-08-28 17:04:39 +07:00
parent ff8917195f
commit 4bee31e74e
18 changed files with 496 additions and 5 deletions

View file

@ -58,6 +58,16 @@ export class ProfileLeaveEmployeeController extends Controller {
return new HttpSuccess(record);
}
@Get("admin/{profileId}")
public async getLeaveAdmin(@Path() profileId: string, @Request() req: RequestWithUser) {
await new permission().PermissionGet(req, "SYS_WAGE");
const record = await this.leaveRepo.find({
relations: { leaveType: true },
where: { profileEmployeeId: profileId },
});
return new HttpSuccess(record);
}
@Get("history/{leaveId}")
public async leaveHistory(@Path() leaveId: string, @Request() req: RequestWithUser) {
const _record = await this.leaveRepo.findOneBy({ id: leaveId });