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

@ -91,6 +91,26 @@ export class ProfileDisciplineEmployeeController extends Controller {
return new HttpSuccess(lists);
}
@Get("admin/{profileId}")
public async getDisciplineAdmin(@Path() profileId: string, @Request() req: RequestWithUser) {
await new permission().PermissionGet(req, "SYS_WAGE");
const lists = await this.disciplineRepository.find({
where: { profileEmployeeId: profileId },
select: [
"id",
"date",
"level",
"detail",
"unStigma",
"refCommandNo",
"refCommandDate",
"lastUpdateFullName",
"lastUpdatedAt",
],
});
return new HttpSuccess(lists);
}
@Get("history/{disciplineId}")
public async disciplineHistory(@Path() disciplineId: string, @Request() req: RequestWithUser) {
const _record = await this.disciplineRepository.findOneBy({ id: disciplineId });