role เมนู ลูกจ้างชั่วคราว
This commit is contained in:
parent
6f053d2c70
commit
877a70ef3d
22 changed files with 109 additions and 63 deletions
|
|
@ -77,7 +77,8 @@ export class ProfileFamilyCoupleEmployeeTempController extends Controller {
|
|||
profileEmployeeId: "1526d9d3-d8b1-43ab-81b5-a84dfbe99201",
|
||||
},
|
||||
})
|
||||
public async getFamilyCouple(@Path() profileEmployeeId: string) {
|
||||
public async getFamilyCouple(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const profile = await this.profileRepo.findOne({
|
||||
where: { id: profileEmployeeId },
|
||||
});
|
||||
|
|
@ -112,6 +113,7 @@ export class ProfileFamilyCoupleEmployeeTempController extends Controller {
|
|||
*/
|
||||
@Get("history/user")
|
||||
public async familyCoupleHistoryUser(@Request() request: RequestWithUser) {
|
||||
await new permission().PermissionGet(request, "SYS_REGISTRY_TEMP");
|
||||
const profile = await this.profileRepo.findOneBy({ keycloak: request.user.sub });
|
||||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
|
|
@ -176,7 +178,8 @@ export class ProfileFamilyCoupleEmployeeTempController extends Controller {
|
|||
},
|
||||
],
|
||||
})
|
||||
public async familyCoupleHistory(@Path() profileEmployeeId: string) {
|
||||
public async familyCoupleHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const profile = await this.profileRepo.findOne({
|
||||
where: { id: profileEmployeeId },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue