recheck เมนู ลูกจ้างประจำ กทม และเปลี่ยนจาก list เป็น get
This commit is contained in:
parent
2eb79a14b5
commit
057bda967f
21 changed files with 38 additions and 38 deletions
|
|
@ -74,7 +74,7 @@ export class ProfileAbilityEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileAbility(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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 });
|
const getProfileAbilityId = await this.profileAbilityRepo.findBy({ profileEmployeeId });
|
||||||
if (!getProfileAbilityId) {
|
if (!getProfileAbilityId) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
|
|
@ -124,7 +124,7 @@ export class ProfileAbilityEmployeeController extends Controller {
|
||||||
public async getProfileAbilityHistory(@Path() abilityId: string, @Request() req: RequestWithUser) {
|
public async getProfileAbilityHistory(@Path() abilityId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.profileAbilityRepo.findOneBy({ id: abilityId });
|
const _record = await this.profileAbilityRepo.findOneBy({ id: abilityId });
|
||||||
if (_record) {
|
if (_record) {
|
||||||
await new permission().PermissionOrgUserList(
|
await new permission().PermissionOrgUserGet(
|
||||||
req,
|
req,
|
||||||
"SYS_REGISTRY_EMP",
|
"SYS_REGISTRY_EMP",
|
||||||
_record.profileEmployeeId,
|
_record.profileEmployeeId,
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export class ProfileAddressEmployeeController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Get("history/{profileId}")
|
@Get("history/{profileId}")
|
||||||
public async getProfileAddressHistory(@Path() profileId: string, @Request() req: RequestWithUser) {
|
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({
|
const record = await this.profileAddressHistoryRepo.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
relations: {
|
relations: {
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ export class ProfileAssessmentsEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileAssessments(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const getProfileAssessments = await this.profileAssessmentsRepository.findBy({
|
||||||
profileEmployeeId,
|
profileEmployeeId,
|
||||||
});
|
});
|
||||||
|
|
@ -135,7 +135,7 @@ export class ProfileAssessmentsEmployeeController extends Controller {
|
||||||
public async getProfileAssessmentsHistory(@Path() assessmentId: string, @Request() req: RequestWithUser) {
|
public async getProfileAssessmentsHistory(@Path() assessmentId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.profileAssessmentsRepository.findOneBy({ id: assessmentId });
|
const _record = await this.profileAssessmentsRepository.findOneBy({ id: assessmentId });
|
||||||
if (_record) {
|
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({
|
const record = await this.profileAssessmentsHistoryRepository.findBy({
|
||||||
profileAssessmentId: assessmentId,
|
profileAssessmentId: assessmentId,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export class ProfileAvatarEmployeeController extends Controller {
|
||||||
@Path() profileEmployeeId: string,
|
@Path() profileEmployeeId: string,
|
||||||
@Request() req: RequestWithUser,
|
@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({
|
const lists = await this.avatarRepository.find({
|
||||||
where: { profileEmployeeId },
|
where: { profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ export class ProfileCertificateEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getCertificate(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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 });
|
const record = await this.certificateRepo.findBy({ profileEmployeeId });
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
@ -113,7 +113,7 @@ export class ProfileCertificateEmployeeController extends Controller {
|
||||||
public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.certificateRepo.findOneBy({ id: certificateId });
|
const _record = await this.certificateRepo.findOneBy({ id: certificateId });
|
||||||
if (_record) {
|
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({
|
const record = await this.certificateHistoryRepo.findBy({
|
||||||
profileCertificateId: certificateId,
|
profileCertificateId: certificateId,
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getChangeName(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const lists = await this.changeNameRepository.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
select: ["id", "prefix", "firstName", "lastName", "status"],
|
select: ["id", "prefix", "firstName", "lastName", "status"],
|
||||||
|
|
@ -102,7 +102,7 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
||||||
public async changeNameHistory(@Path() changeNameId: string, @Request() req: RequestWithUser) {
|
public async changeNameHistory(@Path() changeNameId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.changeNameRepository.findOneBy({ id: changeNameId });
|
const _record = await this.changeNameRepository.findOneBy({ id: changeNameId });
|
||||||
if (_record) {
|
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({
|
const record = await this.changeNameHistoryRepository.find({
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export class ProfileChildrenEmployeeController extends Controller {
|
||||||
|
|
||||||
@Get("{profileEmployeeId}")
|
@Get("{profileEmployeeId}")
|
||||||
public async getChildren(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const lists = await this.childrenRepository.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
@ -61,7 +61,7 @@ export class ProfileChildrenEmployeeController extends Controller {
|
||||||
public async childrenHistory(@Path() childrenId: string, @Request() req: RequestWithUser) {
|
public async childrenHistory(@Path() childrenId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.childrenRepository.findOneBy({ id: childrenId });
|
const _record = await this.childrenRepository.findOneBy({ id: childrenId });
|
||||||
if (_record) {
|
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({
|
const record = await this.childrenHistoryRepository.find({
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export class ProfileDevelopmentEmployeeController extends Controller {
|
||||||
|
|
||||||
@Get("{profileId}")
|
@Get("{profileId}")
|
||||||
public async getDevelopment(@Path() profileId: string, @Request() req: RequestWithUser) {
|
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({
|
const lists = await this.developmentRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
});
|
});
|
||||||
|
|
@ -58,7 +58,7 @@ export class ProfileDevelopmentEmployeeController extends Controller {
|
||||||
public async developmentHistory(@Path() developmentId: string, @Request() req: RequestWithUser) {
|
public async developmentHistory(@Path() developmentId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.developmentRepository.findOneBy({ id: developmentId });
|
const _record = await this.developmentRepository.findOneBy({ id: developmentId });
|
||||||
if (_record) {
|
if (_record) {
|
||||||
await new permission().PermissionOrgUserList(
|
await new permission().PermissionOrgUserGet(
|
||||||
req,
|
req,
|
||||||
"SYS_REGISTRY_EMP",
|
"SYS_REGISTRY_EMP",
|
||||||
_record.profileEmployeeId,
|
_record.profileEmployeeId,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ export class ProfileDisciplineEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getDiscipline(@Path() profileId: string, @Request() req: RequestWithUser) {
|
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({
|
const lists = await this.disciplineRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
select: [
|
select: [
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ export class ProfileDutyEmployeeController extends Controller {
|
||||||
|
|
||||||
@Get("{profileId}")
|
@Get("{profileId}")
|
||||||
public async getDuty(@Path() profileId: string, @Request() req: RequestWithUser) {
|
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({
|
const lists = await this.dutyRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
select: [
|
select: [
|
||||||
|
|
@ -72,7 +72,7 @@ export class ProfileDutyEmployeeController extends Controller {
|
||||||
public async dutyHistory(@Path() dutyId: string, @Request() req: RequestWithUser) {
|
public async dutyHistory(@Path() dutyId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.dutyRepository.findOneBy({ id: dutyId });
|
const _record = await this.dutyRepository.findOneBy({ id: dutyId });
|
||||||
if (_record) {
|
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({
|
const record = await this.dutyHistoryRepository.find({
|
||||||
where: { profileDutyId: dutyId },
|
where: { profileDutyId: dutyId },
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ export class ProfileEducationsEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileEducation(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const getProfileEducation = await this.profileEducationRepo.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
@ -172,7 +172,7 @@ export class ProfileEducationsEmployeeController extends Controller {
|
||||||
public async getProfileEducationHistory(@Path() educationId: string, @Request() req: RequestWithUser) {
|
public async getProfileEducationHistory(@Path() educationId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.profileEducationRepo.findOneBy({ id: educationId });
|
const _record = await this.profileEducationRepo.findOneBy({ id: educationId });
|
||||||
if (_record) {
|
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({
|
const record = await this.profileEducationHistoryRepo.findBy({
|
||||||
|
|
|
||||||
|
|
@ -2968,7 +2968,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Get("information/history/{profileEmployeeId}")
|
@Get("information/history/{profileEmployeeId}")
|
||||||
async getInformationHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const profileInformation = await this.profileRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
information_histories: true,
|
information_histories: true,
|
||||||
|
|
@ -3013,7 +3013,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
@Path() profileEmployeeId: string,
|
@Path() profileEmployeeId: string,
|
||||||
@Request() req: RequestWithUser,
|
@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({
|
const employment = await this.employmentRepository.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
|
|
@ -3061,7 +3061,7 @@ export class ProfileEmployeeController extends Controller {
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
});
|
});
|
||||||
if (employment) {
|
if (employment) {
|
||||||
await new permission().PermissionOrgUserList(
|
await new permission().PermissionOrgUserGet(
|
||||||
req,
|
req,
|
||||||
"SYS_REGISTRY_EMP",
|
"SYS_REGISTRY_EMP",
|
||||||
employment.profileEmployeeId,
|
employment.profileEmployeeId,
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ export class ProfileFamilyCoupleEmployeeController extends Controller {
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ 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({
|
const familyCouple = await this.ProfileFamilyCouple.find({
|
||||||
relations: ["histories"],
|
relations: ["histories"],
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ export class ProfileFamilyMotherEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async familyMotherHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const profile = await this.profileRepo.findOne({
|
||||||
where: { id: profileEmployeeId },
|
where: { id: profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ export class ProfileGovernmentEmployeeController extends Controller {
|
||||||
@Get("history/{profileEmployeeId}")
|
@Get("history/{profileEmployeeId}")
|
||||||
@Example({})
|
@Example({})
|
||||||
public async govHistory(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const record = await this.govRepo.find({
|
||||||
order: { lastUpdatedAt: "DESC" },
|
order: { lastUpdatedAt: "DESC" },
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export class ProfileHonorEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getHonor(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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 });
|
const record = await this.honorRepo.findBy({ profileEmployeeId });
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
@ -137,7 +137,7 @@ export class ProfileHonorEmployeeController extends Controller {
|
||||||
public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.honorRepo.findOneBy({ id: honorId });
|
const _record = await this.honorRepo.findOneBy({ id: honorId });
|
||||||
if (_record) {
|
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({
|
const record = await this.honorHistoryRepo.findBy({
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ export class ProfileInsigniaEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getInsignia(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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({
|
const record = await this.insigniaRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
insignia: {
|
insignia: {
|
||||||
|
|
@ -154,7 +154,7 @@ export class ProfileInsigniaEmployeeController extends Controller {
|
||||||
public async getInsigniaHistory(@Path() InsigniaId: string, @Request() req: RequestWithUser) {
|
public async getInsigniaHistory(@Path() InsigniaId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.insigniaRepo.findOneBy({ id: InsigniaId });
|
const _record = await this.insigniaRepo.findOneBy({ id: InsigniaId });
|
||||||
if (_record) {
|
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({
|
const record = await this.insigniaHistoryRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export class ProfileLeaveEmployeeController extends Controller {
|
||||||
|
|
||||||
@Get("{profileId}")
|
@Get("{profileId}")
|
||||||
public async getLeave(@Path() profileId: string, @Request() req: RequestWithUser) {
|
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({
|
const record = await this.leaveRepo.find({
|
||||||
relations: { leaveType: true },
|
relations: { leaveType: true },
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
|
|
@ -72,7 +72,7 @@ export class ProfileLeaveEmployeeController extends Controller {
|
||||||
public async leaveHistory(@Path() leaveId: string, @Request() req: RequestWithUser) {
|
public async leaveHistory(@Path() leaveId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.leaveRepo.findOneBy({ id: leaveId });
|
const _record = await this.leaveRepo.findOneBy({ id: leaveId });
|
||||||
if (_record) {
|
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({
|
const record = await this.leaveHistoryRepo.find({
|
||||||
relations: { leaveType: true },
|
relations: { leaveType: true },
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export class ProfileOtherEmployeeController extends Controller {
|
||||||
|
|
||||||
@Get("{profileId}")
|
@Get("{profileId}")
|
||||||
public async getOther(@Path() profileId: string, @Request() req: RequestWithUser) {
|
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({
|
const lists = await this.otherRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
});
|
});
|
||||||
|
|
@ -58,7 +58,7 @@ export class ProfileOtherEmployeeController extends Controller {
|
||||||
public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.otherRepository.findOneBy({ id: otherId });
|
const _record = await this.otherRepository.findOneBy({ id: otherId });
|
||||||
if (_record) {
|
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({
|
const record = await this.otherHistoryRepository.find({
|
||||||
where: { profileOtherId: otherId },
|
where: { profileOtherId: otherId },
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
public async getSalaryEmployee(@Path() profileId: string, @Request() req: RequestWithUser) {
|
public async getSalaryEmployee(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||||
// const _record = await this.salaryRepo.findOneBy({ id: profileId });
|
// const _record = await this.salaryRepo.findOneBy({ id: profileId });
|
||||||
// if (_record) {
|
// 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({
|
const record = await this.salaryRepo.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
|
|
@ -65,7 +65,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
await new permission().PermissionGet(req, "SYS_WAGE");
|
await new permission().PermissionGet(req, "SYS_WAGE");
|
||||||
// const _record = await this.salaryRepo.findOneBy({ id: profileId });
|
// const _record = await this.salaryRepo.findOneBy({ id: profileId });
|
||||||
// if (_record) {
|
// 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({
|
const record = await this.salaryRepo.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
|
|
@ -78,7 +78,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.salaryRepo.findOneBy({ id: salaryId });
|
const _record = await this.salaryRepo.findOneBy({ id: salaryId });
|
||||||
if (_record) {
|
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({
|
const record = await this.salaryHistoryRepo.findBy({
|
||||||
profileSalaryId: salaryId,
|
profileSalaryId: salaryId,
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export class ProfileTrainingEmployeeController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getTraining(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
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 });
|
const record = await this.trainingRepo.findBy({ profileEmployeeId });
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
@ -134,7 +134,7 @@ export class ProfileTrainingEmployeeController extends Controller {
|
||||||
public async trainingHistory(@Path() trainingId: string, @Request() req: RequestWithUser) {
|
public async trainingHistory(@Path() trainingId: string, @Request() req: RequestWithUser) {
|
||||||
const _record = await this.trainingRepo.findOneBy({ id: trainingId });
|
const _record = await this.trainingRepo.findOneBy({ id: trainingId });
|
||||||
if (_record) {
|
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({
|
const record = await this.trainingHistoryRepo.findBy({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue