role เมนู ลูกจ้างชั่วคราว
This commit is contained in:
parent
6f053d2c70
commit
877a70ef3d
22 changed files with 109 additions and 63 deletions
|
|
@ -69,7 +69,8 @@ export class ProfileAddressEmployeeTempController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("{profileEmployeeId}")
|
||||
public async detailProfileAddress(@Path() profileEmployeeId: string) {
|
||||
public async detailProfileAddress(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const getProfileAddress = await this.profileEmployeeRepo.findOne({
|
||||
where: { id: profileEmployeeId },
|
||||
select: [
|
||||
|
|
@ -99,6 +100,7 @@ export class ProfileAddressEmployeeTempController extends Controller {
|
|||
*/
|
||||
@Get("history/user")
|
||||
public async getProfileAddressHistoryUser(@Request() request: RequestWithUser) {
|
||||
// await new permission().PermissionGet(request, "SYS_REGISTRY_TEMP");//ตสTEMP
|
||||
const profile = await this.profileEmployeeRepo.findOneBy({ keycloak: request.user.sub });
|
||||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
|
|
@ -140,7 +142,8 @@ export class ProfileAddressEmployeeTempController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("history/{profileId}")
|
||||
public async getProfileAddressHistory(@Path() profileId: string) {
|
||||
public async getProfileAddressHistory(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
||||
const record = await this.profileAddressHistoryRepo.find({
|
||||
where: { profileEmployeeId: profileId },
|
||||
relations: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue