From 057bda967f452e4758ec98a0909810e6903e38a3 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Wed, 28 Aug 2024 18:10:58 +0700 Subject: [PATCH] =?UTF-8?q?recheck=20=E0=B9=80=E0=B8=A1=E0=B8=99=E0=B8=B9?= =?UTF-8?q?=20=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=87=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88=E0=B8=B3=20?= =?UTF-8?q?=E0=B8=81=E0=B8=97=E0=B8=A1=20=E0=B9=81=E0=B8=A5=E0=B8=B0?= =?UTF-8?q?=E0=B9=80=E0=B8=9B=E0=B8=A5=E0=B8=B5=E0=B9=88=E0=B8=A2=E0=B8=99?= =?UTF-8?q?=E0=B8=88=E0=B8=B2=E0=B8=81=20list=20=E0=B9=80=E0=B8=9B?= =?UTF-8?q?=E0=B9=87=E0=B8=99=20get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileAbilityEmployeeController.ts | 4 ++-- src/controllers/ProfileAddressEmployeeController.ts | 2 +- src/controllers/ProfileAssessmentsEmployeeController.ts | 4 ++-- src/controllers/ProfileAvatarEmployeeController.ts | 2 +- src/controllers/ProfileCertificateEmployeeController.ts | 4 ++-- src/controllers/ProfileChangeNameEmployeeController.ts | 4 ++-- src/controllers/ProfileChildrenEmployeeController.ts | 4 ++-- src/controllers/ProfileDevelopmentEmployeeController.ts | 4 ++-- src/controllers/ProfileDisciplineEmployeeController.ts | 2 +- src/controllers/ProfileDutyEmployeeController.ts | 4 ++-- src/controllers/ProfileEducationsEmployeeController.ts | 4 ++-- src/controllers/ProfileEmployeeController.ts | 6 +++--- src/controllers/ProfileFamilyCoupleEmployeeController.ts | 2 +- src/controllers/ProfileFamilyMotherEmployeeController.ts | 2 +- src/controllers/ProfileGovernmentEmployeeController.ts | 2 +- src/controllers/ProfileHonorEmployeeController.ts | 4 ++-- src/controllers/ProfileInsigniaEmployeeController.ts | 4 ++-- src/controllers/ProfileLeaveEmployeeController.ts | 4 ++-- src/controllers/ProfileOtherEmployeeController.ts | 4 ++-- src/controllers/ProfileSalaryEmployeeController.ts | 6 +++--- src/controllers/ProfileTrainingEmployeeController.ts | 4 ++-- 21 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/controllers/ProfileAbilityEmployeeController.ts b/src/controllers/ProfileAbilityEmployeeController.ts index daec855b..9c049869 100644 --- a/src/controllers/ProfileAbilityEmployeeController.ts +++ b/src/controllers/ProfileAbilityEmployeeController.ts @@ -74,7 +74,7 @@ export class ProfileAbilityEmployeeController extends Controller { ], }) public async detailProfileAbility(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const getProfileAbilityId = await this.profileAbilityRepo.findBy({ profileEmployeeId }); if (!getProfileAbilityId) { throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); @@ -124,7 +124,7 @@ export class ProfileAbilityEmployeeController extends Controller { public async getProfileAbilityHistory(@Path() abilityId: string, @Request() req: RequestWithUser) { const _record = await this.profileAbilityRepo.findOneBy({ id: abilityId }); if (_record) { - await new permission().PermissionOrgUserList( + await new permission().PermissionOrgUserGet( req, "SYS_REGISTRY_EMP", _record.profileEmployeeId, diff --git a/src/controllers/ProfileAddressEmployeeController.ts b/src/controllers/ProfileAddressEmployeeController.ts index c3da8f5d..5804c7d3 100644 --- a/src/controllers/ProfileAddressEmployeeController.ts +++ b/src/controllers/ProfileAddressEmployeeController.ts @@ -142,7 +142,7 @@ export class ProfileAddressEmployeeController extends Controller { */ @Get("history/{profileId}") public async getProfileAddressHistory(@Path() profileId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); const record = await this.profileAddressHistoryRepo.find({ where: { profileEmployeeId: profileId }, relations: { diff --git a/src/controllers/ProfileAssessmentsEmployeeController.ts b/src/controllers/ProfileAssessmentsEmployeeController.ts index 8d9499aa..6b8ba0e9 100644 --- a/src/controllers/ProfileAssessmentsEmployeeController.ts +++ b/src/controllers/ProfileAssessmentsEmployeeController.ts @@ -79,7 +79,7 @@ export class ProfileAssessmentsEmployeeController extends Controller { ], }) public async detailProfileAssessments(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const getProfileAssessments = await this.profileAssessmentsRepository.findBy({ profileEmployeeId, }); @@ -135,7 +135,7 @@ export class ProfileAssessmentsEmployeeController extends Controller { public async getProfileAssessmentsHistory(@Path() assessmentId: string, @Request() req: RequestWithUser) { const _record = await this.profileAssessmentsRepository.findOneBy({ id: assessmentId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileId); } const record = await this.profileAssessmentsHistoryRepository.findBy({ profileAssessmentId: assessmentId, diff --git a/src/controllers/ProfileAvatarEmployeeController.ts b/src/controllers/ProfileAvatarEmployeeController.ts index 0cf55d70..e05e1d41 100644 --- a/src/controllers/ProfileAvatarEmployeeController.ts +++ b/src/controllers/ProfileAvatarEmployeeController.ts @@ -19,7 +19,7 @@ export class ProfileAvatarEmployeeController extends Controller { @Path() profileEmployeeId: string, @Request() req: RequestWithUser, ) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const lists = await this.avatarRepository.find({ where: { profileEmployeeId }, }); diff --git a/src/controllers/ProfileCertificateEmployeeController.ts b/src/controllers/ProfileCertificateEmployeeController.ts index 6e9fbe26..374b11ee 100644 --- a/src/controllers/ProfileCertificateEmployeeController.ts +++ b/src/controllers/ProfileCertificateEmployeeController.ts @@ -68,7 +68,7 @@ export class ProfileCertificateEmployeeController extends Controller { ], }) public async getCertificate(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const record = await this.certificateRepo.findBy({ profileEmployeeId }); return new HttpSuccess(record); } @@ -113,7 +113,7 @@ export class ProfileCertificateEmployeeController extends Controller { public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) { const _record = await this.certificateRepo.findOneBy({ id: certificateId }); if (_record) { - await new permission().PermissionOrgUserDelete(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.certificateHistoryRepo.findBy({ profileCertificateId: certificateId, diff --git a/src/controllers/ProfileChangeNameEmployeeController.ts b/src/controllers/ProfileChangeNameEmployeeController.ts index d4f0225f..6f7511bb 100644 --- a/src/controllers/ProfileChangeNameEmployeeController.ts +++ b/src/controllers/ProfileChangeNameEmployeeController.ts @@ -65,7 +65,7 @@ export class ProfileChangeNameEmployeeController extends Controller { ], }) public async getChangeName(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const lists = await this.changeNameRepository.find({ where: { profileEmployeeId: profileEmployeeId }, select: ["id", "prefix", "firstName", "lastName", "status"], @@ -102,7 +102,7 @@ export class ProfileChangeNameEmployeeController extends Controller { public async changeNameHistory(@Path() changeNameId: string, @Request() req: RequestWithUser) { const _record = await this.changeNameRepository.findOneBy({ id: changeNameId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId, + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId, ); } const record = await this.changeNameHistoryRepository.find({ diff --git a/src/controllers/ProfileChildrenEmployeeController.ts b/src/controllers/ProfileChildrenEmployeeController.ts index e1756145..7844fcdd 100644 --- a/src/controllers/ProfileChildrenEmployeeController.ts +++ b/src/controllers/ProfileChildrenEmployeeController.ts @@ -50,7 +50,7 @@ export class ProfileChildrenEmployeeController extends Controller { @Get("{profileEmployeeId}") public async getChildren(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const lists = await this.childrenRepository.find({ where: { profileEmployeeId: profileEmployeeId }, }); @@ -61,7 +61,7 @@ export class ProfileChildrenEmployeeController extends Controller { public async childrenHistory(@Path() childrenId: string, @Request() req: RequestWithUser) { const _record = await this.childrenRepository.findOneBy({ id: childrenId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId, + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId, ); } const record = await this.childrenHistoryRepository.find({ diff --git a/src/controllers/ProfileDevelopmentEmployeeController.ts b/src/controllers/ProfileDevelopmentEmployeeController.ts index 0f328a13..dc6e3c8e 100644 --- a/src/controllers/ProfileDevelopmentEmployeeController.ts +++ b/src/controllers/ProfileDevelopmentEmployeeController.ts @@ -47,7 +47,7 @@ export class ProfileDevelopmentEmployeeController extends Controller { @Get("{profileId}") public async getDevelopment(@Path() profileId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); const lists = await this.developmentRepository.find({ where: { profileEmployeeId: profileId }, }); @@ -58,7 +58,7 @@ export class ProfileDevelopmentEmployeeController extends Controller { public async developmentHistory(@Path() developmentId: string, @Request() req: RequestWithUser) { const _record = await this.developmentRepository.findOneBy({ id: developmentId }); if (_record) { - await new permission().PermissionOrgUserList( + await new permission().PermissionOrgUserGet( req, "SYS_REGISTRY_EMP", _record.profileEmployeeId, diff --git a/src/controllers/ProfileDisciplineEmployeeController.ts b/src/controllers/ProfileDisciplineEmployeeController.ts index 9c05aee5..f09ca2b9 100644 --- a/src/controllers/ProfileDisciplineEmployeeController.ts +++ b/src/controllers/ProfileDisciplineEmployeeController.ts @@ -73,7 +73,7 @@ export class ProfileDisciplineEmployeeController extends Controller { ], }) public async getDiscipline(@Path() profileId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserCreate(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); const lists = await this.disciplineRepository.find({ where: { profileEmployeeId: profileId }, select: [ diff --git a/src/controllers/ProfileDutyEmployeeController.ts b/src/controllers/ProfileDutyEmployeeController.ts index 620d3130..4381969f 100644 --- a/src/controllers/ProfileDutyEmployeeController.ts +++ b/src/controllers/ProfileDutyEmployeeController.ts @@ -52,7 +52,7 @@ export class ProfileDutyEmployeeController extends Controller { @Get("{profileId}") public async getDuty(@Path() profileId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); const lists = await this.dutyRepository.find({ where: { profileEmployeeId: profileId }, select: [ @@ -72,7 +72,7 @@ export class ProfileDutyEmployeeController extends Controller { public async dutyHistory(@Path() dutyId: string, @Request() req: RequestWithUser) { const _record = await this.dutyRepository.findOneBy({ id: dutyId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.dutyHistoryRepository.find({ where: { profileDutyId: dutyId }, diff --git a/src/controllers/ProfileEducationsEmployeeController.ts b/src/controllers/ProfileEducationsEmployeeController.ts index 5d70827c..0a5cc824 100644 --- a/src/controllers/ProfileEducationsEmployeeController.ts +++ b/src/controllers/ProfileEducationsEmployeeController.ts @@ -92,7 +92,7 @@ export class ProfileEducationsEmployeeController extends Controller { ], }) public async detailProfileEducation(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const getProfileEducation = await this.profileEducationRepo.find({ where: { profileEmployeeId: profileEmployeeId }, }); @@ -172,7 +172,7 @@ export class ProfileEducationsEmployeeController extends Controller { public async getProfileEducationHistory(@Path() educationId: string, @Request() req: RequestWithUser) { const _record = await this.profileEducationRepo.findOneBy({ id: educationId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.profileEducationHistoryRepo.findBy({ diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index d6dcc71c..c2aeb925 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2968,7 +2968,7 @@ export class ProfileEmployeeController extends Controller { */ @Get("information/history/{profileEmployeeId}") async getInformationHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const profileInformation = await this.profileRepo.find({ relations: { information_histories: true, @@ -3013,7 +3013,7 @@ export class ProfileEmployeeController extends Controller { @Path() profileEmployeeId: string, @Request() req: RequestWithUser, ) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const employment = await this.employmentRepository.find({ where: { profileEmployeeId: profileEmployeeId }, order: { createdAt: "ASC" }, @@ -3061,7 +3061,7 @@ export class ProfileEmployeeController extends Controller { where: { id: id }, }); if (employment) { - await new permission().PermissionOrgUserList( + await new permission().PermissionOrgUserGet( req, "SYS_REGISTRY_EMP", employment.profileEmployeeId, diff --git a/src/controllers/ProfileFamilyCoupleEmployeeController.ts b/src/controllers/ProfileFamilyCoupleEmployeeController.ts index dcd472c7..0549c7ca 100644 --- a/src/controllers/ProfileFamilyCoupleEmployeeController.ts +++ b/src/controllers/ProfileFamilyCoupleEmployeeController.ts @@ -184,7 +184,7 @@ export class ProfileFamilyCoupleEmployeeController extends Controller { if (!profile) { throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว"); } - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profile.id); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profile.id); const familyCouple = await this.ProfileFamilyCouple.find({ relations: ["histories"], diff --git a/src/controllers/ProfileFamilyMotherEmployeeController.ts b/src/controllers/ProfileFamilyMotherEmployeeController.ts index b4391dbd..dfb98517 100644 --- a/src/controllers/ProfileFamilyMotherEmployeeController.ts +++ b/src/controllers/ProfileFamilyMotherEmployeeController.ts @@ -166,7 +166,7 @@ export class ProfileFamilyMotherEmployeeController extends Controller { ], }) public async familyMotherHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const profile = await this.profileRepo.findOne({ where: { id: profileEmployeeId }, }); diff --git a/src/controllers/ProfileGovernmentEmployeeController.ts b/src/controllers/ProfileGovernmentEmployeeController.ts index 9b2f62f2..a43e2401 100644 --- a/src/controllers/ProfileGovernmentEmployeeController.ts +++ b/src/controllers/ProfileGovernmentEmployeeController.ts @@ -343,7 +343,7 @@ export class ProfileGovernmentEmployeeController extends Controller { @Get("history/{profileEmployeeId}") @Example({}) public async govHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId) + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId) const record = await this.govRepo.find({ order: { lastUpdatedAt: "DESC" }, where: { profileEmployeeId: profileEmployeeId }, diff --git a/src/controllers/ProfileHonorEmployeeController.ts b/src/controllers/ProfileHonorEmployeeController.ts index c36bc441..426e3152 100644 --- a/src/controllers/ProfileHonorEmployeeController.ts +++ b/src/controllers/ProfileHonorEmployeeController.ts @@ -69,7 +69,7 @@ export class ProfileHonorEmployeeController extends Controller { ], }) public async getHonor(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const record = await this.honorRepo.findBy({ profileEmployeeId }); return new HttpSuccess(record); } @@ -137,7 +137,7 @@ export class ProfileHonorEmployeeController extends Controller { public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) { const _record = await this.honorRepo.findOneBy({ id: honorId }); if (_record) { - await new permission().PermissionOrgUserDelete(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.honorHistoryRepo.findBy({ diff --git a/src/controllers/ProfileInsigniaEmployeeController.ts b/src/controllers/ProfileInsigniaEmployeeController.ts index b128eb06..f30c7361 100644 --- a/src/controllers/ProfileInsigniaEmployeeController.ts +++ b/src/controllers/ProfileInsigniaEmployeeController.ts @@ -84,7 +84,7 @@ export class ProfileInsigniaEmployeeController extends Controller { ], }) public async getInsignia(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const record = await this.insigniaRepo.find({ relations: { insignia: { @@ -154,7 +154,7 @@ export class ProfileInsigniaEmployeeController extends Controller { public async getInsigniaHistory(@Path() InsigniaId: string, @Request() req: RequestWithUser) { const _record = await this.insigniaRepo.findOneBy({ id: InsigniaId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.insigniaHistoryRepo.find({ relations: { diff --git a/src/controllers/ProfileLeaveEmployeeController.ts b/src/controllers/ProfileLeaveEmployeeController.ts index e06f85ca..0a464062 100644 --- a/src/controllers/ProfileLeaveEmployeeController.ts +++ b/src/controllers/ProfileLeaveEmployeeController.ts @@ -50,7 +50,7 @@ export class ProfileLeaveEmployeeController extends Controller { @Get("{profileId}") public async getLeave(@Path() profileId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); const record = await this.leaveRepo.find({ relations: { leaveType: true }, where: { profileEmployeeId: profileId }, @@ -72,7 +72,7 @@ export class ProfileLeaveEmployeeController extends Controller { public async leaveHistory(@Path() leaveId: string, @Request() req: RequestWithUser) { const _record = await this.leaveRepo.findOneBy({ id: leaveId }); if (_record) { - await new permission().PermissionOrgUserDelete(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.leaveHistoryRepo.find({ relations: { leaveType: true }, diff --git a/src/controllers/ProfileOtherEmployeeController.ts b/src/controllers/ProfileOtherEmployeeController.ts index 9af3e2f0..47f81440 100644 --- a/src/controllers/ProfileOtherEmployeeController.ts +++ b/src/controllers/ProfileOtherEmployeeController.ts @@ -47,7 +47,7 @@ export class ProfileOtherEmployeeController extends Controller { @Get("{profileId}") public async getOther(@Path() profileId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); const lists = await this.otherRepository.find({ where: { profileEmployeeId: profileId }, }); @@ -58,7 +58,7 @@ export class ProfileOtherEmployeeController extends Controller { public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) { const _record = await this.otherRepository.findOneBy({ id: otherId }); if (_record) { - await new permission().PermissionOrgUserDelete(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.otherHistoryRepository.find({ where: { profileOtherId: otherId }, diff --git a/src/controllers/ProfileSalaryEmployeeController.ts b/src/controllers/ProfileSalaryEmployeeController.ts index b86d5563..4ecbf5df 100644 --- a/src/controllers/ProfileSalaryEmployeeController.ts +++ b/src/controllers/ProfileSalaryEmployeeController.ts @@ -51,7 +51,7 @@ export class ProfileSalaryEmployeeController extends Controller { public async getSalaryEmployee(@Path() profileId: string, @Request() req: RequestWithUser) { // const _record = await this.salaryRepo.findOneBy({ id: profileId }); // if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); // } const record = await this.salaryRepo.find({ where: { profileEmployeeId: profileId }, @@ -65,7 +65,7 @@ export class ProfileSalaryEmployeeController extends Controller { await new permission().PermissionGet(req, "SYS_WAGE"); // const _record = await this.salaryRepo.findOneBy({ id: profileId }); // if (_record) { - // await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileId); + // await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId); // } const record = await this.salaryRepo.find({ where: { profileEmployeeId: profileId }, @@ -78,7 +78,7 @@ export class ProfileSalaryEmployeeController extends Controller { public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) { const _record = await this.salaryRepo.findOneBy({ id: salaryId }); if (_record) { - await new permission().PermissionOrgUserDelete(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.salaryHistoryRepo.findBy({ profileSalaryId: salaryId, diff --git a/src/controllers/ProfileTrainingEmployeeController.ts b/src/controllers/ProfileTrainingEmployeeController.ts index e844b3ce..19f22cb8 100644 --- a/src/controllers/ProfileTrainingEmployeeController.ts +++ b/src/controllers/ProfileTrainingEmployeeController.ts @@ -75,7 +75,7 @@ export class ProfileTrainingEmployeeController extends Controller { ], }) public async getTraining(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileEmployeeId); const record = await this.trainingRepo.findBy({ profileEmployeeId }); return new HttpSuccess(record); } @@ -134,7 +134,7 @@ export class ProfileTrainingEmployeeController extends Controller { public async trainingHistory(@Path() trainingId: string, @Request() req: RequestWithUser) { const _record = await this.trainingRepo.findOneBy({ id: trainingId }); if (_record) { - await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); + await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", _record.profileEmployeeId); } const record = await this.trainingHistoryRepo.findBy({