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

@ -46,7 +46,8 @@ export class ProfileNopaidEmployeeTempController extends Controller {
}
@Get("{profileId}")
public async getNopaid(@Path() profileId: string) {
public async getNopaid(@Path() profileId: string, @Request() req: RequestWithUser) {
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
const lists = await this.nopaidRepository.find({
where: { profileEmployeeId: profileId },
});
@ -54,7 +55,8 @@ export class ProfileNopaidEmployeeTempController extends Controller {
}
@Get("history/{nopaidId}")
public async nopaidHistory(@Path() nopaidId: string) {
public async nopaidHistory(@Path() nopaidId: string, @Request() req: RequestWithUser) {
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
const record = await this.nopaidHistoryRepository.find({
where: { profileNopaidId: nopaidId },
order: { createdAt: "DESC" },