role เมนู ลูกจ้างชั่วคราว

This commit is contained in:
AdisakKanthawilang 2024-08-26 15:57:09 +07:00
parent 6f053d2c70
commit 877a70ef3d
22 changed files with 109 additions and 63 deletions

View file

@ -49,7 +49,8 @@ export class ProfileLeaveEmployeeTempController extends Controller {
}
@Get("{profileId}")
public async getLeave(@Path() profileId: string) {
public async getLeave(@Path() profileId: string, @Request() req: RequestWithUser) {
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
const record = await this.leaveRepo.find({
relations: { leaveType: true },
where: { profileEmployeeId: profileId },
@ -58,7 +59,8 @@ export class ProfileLeaveEmployeeTempController extends Controller {
}
@Get("history/{leaveId}")
public async leaveHistory(@Path() leaveId: string) {
public async leaveHistory(@Path() leaveId: string, @Request() req: RequestWithUser) {
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
const record = await this.leaveHistoryRepo.find({
relations: { leaveType: true },
where: { profileLeaveId: leaveId },