recheck เมนู ลูกจ้างชั่วคราว (list to get)
This commit is contained in:
parent
271e6964b3
commit
51eaf6b976
19 changed files with 37 additions and 38 deletions
|
|
@ -74,7 +74,7 @@ export class ProfileAbilityEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileAbility(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async detailProfileAbility(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
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 ProfileAbilityEmployeeTempController 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().PermissionDelete(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
}
|
}
|
||||||
|
|
||||||
const record = await this.profileAbilityHistoryRepo.findBy({
|
const record = await this.profileAbilityHistoryRepo.findBy({
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ export class ProfileAddressEmployeeTempController extends Controller {
|
||||||
@Path() profileId: string,
|
@Path() profileId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
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 ProfileAssessmentsEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileAssessments(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async detailProfileAssessments(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const getProfileAssessments = await this.profileAssessmentsRepository.findBy({
|
const getProfileAssessments = await this.profileAssessmentsRepository.findBy({
|
||||||
profileEmployeeId,
|
profileEmployeeId,
|
||||||
});
|
});
|
||||||
|
|
@ -133,7 +133,7 @@ export class ProfileAssessmentsEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getProfileAssessmentsHistory(@Path() assessmentId: string, @Request() req: RequestWithUser) {
|
public async getProfileAssessmentsHistory(@Path() assessmentId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.profileAssessmentsHistoryRepository.findBy({
|
const record = await this.profileAssessmentsHistoryRepository.findBy({
|
||||||
profileAssessmentId: assessmentId,
|
profileAssessmentId: assessmentId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
||||||
@Path() profileEmployeeId: string,
|
@Path() profileEmployeeId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.avatarRepository.find({
|
const lists = await this.avatarRepository.find({
|
||||||
where: { profileEmployeeId },
|
where: { profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
@ -28,7 +28,7 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("profileEmployeeId/{id}")
|
@Get("profileEmployeeId/{id}")
|
||||||
async getProfile(@Path() id: string, @Request() req: RequestWithUser) {
|
async getProfile(@Path() id: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_TEMP", id);
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const profile = await this.profileRepository.findOne({
|
const profile = await this.profileRepository.findOne({
|
||||||
select: ["id", "avatar", "avatarName"],
|
select: ["id", "avatar", "avatarName"],
|
||||||
where: { id },
|
where: { id },
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ export class ProfileCertificateEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getCertificate(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async getCertificate(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.certificateRepo.findBy({ profileEmployeeId });
|
const record = await this.certificateRepo.findBy({ profileEmployeeId });
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +111,7 @@ export class ProfileCertificateEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.certificateHistoryRepo.findBy({
|
const record = await this.certificateHistoryRepo.findBy({
|
||||||
profileCertificateId: certificateId,
|
profileCertificateId: certificateId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getChangeName(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async getChangeName(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
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"],
|
||||||
|
|
@ -100,7 +100,7 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async changeNameHistory(@Path() changeNameId: string, @Request() req: RequestWithUser) {
|
public async changeNameHistory(@Path() changeNameId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.changeNameHistoryRepository.find({
|
const record = await this.changeNameHistoryRepository.find({
|
||||||
where: { profileChangeNameId: changeNameId },
|
where: { profileChangeNameId: changeNameId },
|
||||||
select: [
|
select: [
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export class ProfileChildrenEmployeeTempController 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().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.childrenRepository.find({
|
const lists = await this.childrenRepository.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
@ -59,7 +59,7 @@ export class ProfileChildrenEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{childrenId}")
|
@Get("history/{childrenId}")
|
||||||
public async childrenHistory(@Path() childrenId: string, @Request() req: RequestWithUser) {
|
public async childrenHistory(@Path() childrenId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.childrenHistoryRepository.find({
|
const record = await this.childrenHistoryRepository.find({
|
||||||
where: { profileChildrenId: childrenId },
|
where: { profileChildrenId: childrenId },
|
||||||
order: { createdAt: "DESC" },
|
order: { createdAt: "DESC" },
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ export class ProfileDisciplineEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getDiscipline(@Path() profileId: string, @Request() req: RequestWithUser) {
|
public async getDiscipline(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.disciplineRepository.find({
|
const lists = await this.disciplineRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
select: [
|
select: [
|
||||||
|
|
@ -113,7 +113,7 @@ export class ProfileDisciplineEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{disciplineId}")
|
@Get("history/{disciplineId}")
|
||||||
public async disciplineHistory(@Path() disciplineId: string, @Request() req: RequestWithUser) {
|
public async disciplineHistory(@Path() disciplineId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.disciplineHistoryRepository.find({
|
const record = await this.disciplineHistoryRepository.find({
|
||||||
where: { profileDisciplineId: disciplineId },
|
where: { profileDisciplineId: disciplineId },
|
||||||
select: [
|
select: [
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ export class ProfileDutyEmployeeTempController 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().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.dutyRepository.find({
|
const lists = await this.dutyRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
select: [
|
select: [
|
||||||
|
|
@ -70,7 +70,7 @@ export class ProfileDutyEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{dutyId}")
|
@Get("history/{dutyId}")
|
||||||
public async dutyHistory(@Path() dutyId: string, @Request() req: RequestWithUser) {
|
public async dutyHistory(@Path() dutyId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.dutyHistoryRepository.find({
|
const record = await this.dutyHistoryRepository.find({
|
||||||
where: { profileDutyId: dutyId },
|
where: { profileDutyId: dutyId },
|
||||||
select: [
|
select: [
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ export class ProfileEducationsEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileEducation(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async detailProfileEducation(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const getProfileEducation = await this.profileEducationRepo.find({
|
const getProfileEducation = await this.profileEducationRepo.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
});
|
});
|
||||||
|
|
@ -170,7 +170,7 @@ export class ProfileEducationsEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getProfileEducationHistory(@Path() educationId: string, @Request() req: RequestWithUser) {
|
public async getProfileEducationHistory(@Path() educationId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.profileEducationHistoryRepo.findBy({
|
const record = await this.profileEducationHistoryRepo.findBy({
|
||||||
profileEducationId: educationId,
|
profileEducationId: educationId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -578,7 +578,7 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Post()
|
@Post()
|
||||||
async createProfile(@Body() body: CreateProfileEmployee, @Request() request: RequestWithUser) {
|
async createProfile(@Body() body: CreateProfileEmployee, @Request() request: RequestWithUser) {
|
||||||
await new permission().PermissionCreate(request, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionUpdate(request, "SYS_REGISTRY_TEMP");
|
||||||
if (await this.profileRepo.findOneBy({ citizenId: body.citizenId })) {
|
if (await this.profileRepo.findOneBy({ citizenId: body.citizenId })) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
|
|
@ -1325,7 +1325,7 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{id}")
|
@Get("history/{id}")
|
||||||
async getProfileHistory(@Path() id: string, @Request() req: RequestWithUser) {
|
async getProfileHistory(@Path() id: string, @Request() req: RequestWithUser) {
|
||||||
// await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");//ไม่แน่ใจTEMPปิดไว้ก่อน
|
// await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");//ไม่แน่ใจTEMPปิดไว้ก่อน
|
||||||
const profile = await this.profileHistoryRepo.find({
|
const profile = await this.profileHistoryRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
posLevel: true,
|
posLevel: true,
|
||||||
|
|
@ -2672,7 +2672,7 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Get("profileid/retire/{year}")
|
@Get("profileid/retire/{year}")
|
||||||
async getProfileByRetireYear(@Path() year: number, @Request() req: RequestWithUser) {
|
async getProfileByRetireYear(@Path() year: number, @Request() req: RequestWithUser) {
|
||||||
// await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");//ไม่แน่ใจTEMPปิดไว้ก่อน
|
// await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");//ไม่แน่ใจTEMPปิดไว้ก่อน
|
||||||
const profiles = await this.profileRepo
|
const profiles = await this.profileRepo
|
||||||
.createQueryBuilder("profileEmployee")
|
.createQueryBuilder("profileEmployee")
|
||||||
.leftJoinAndSelect("profileEmployee.posLevel", "posLevel")
|
.leftJoinAndSelect("profileEmployee.posLevel", "posLevel")
|
||||||
|
|
@ -2966,7 +2966,7 @@ export class ProfileEmployeeTempController 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().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const profileInformation = await this.profileRepo.find({
|
const profileInformation = await this.profileRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
information_histories: true,
|
information_histories: true,
|
||||||
|
|
@ -3011,7 +3011,7 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
@Path() profileEmployeeId: string,
|
@Path() profileEmployeeId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const employment = await this.employmentRepository.find({
|
const employment = await this.employmentRepository.find({
|
||||||
where: { profileEmployeeId: profileEmployeeId },
|
where: { profileEmployeeId: profileEmployeeId },
|
||||||
order: { createdAt: "ASC" },
|
order: { createdAt: "ASC" },
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ export class ProfileGovernmentEmployeeTempController 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().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
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 ProfileHonorEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getHonor(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async getHonor(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.honorRepo.findBy({ profileEmployeeId });
|
const record = await this.honorRepo.findBy({ profileEmployeeId });
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,6 @@ export class ProfileHonorEmployeeTempController extends Controller {
|
||||||
*/
|
*/
|
||||||
@Get("history/user")
|
@Get("history/user")
|
||||||
public async honorHistoryUser(@Request() request: RequestWithUser) {
|
public async honorHistoryUser(@Request() request: RequestWithUser) {
|
||||||
await new permission().PermissionGet(request, "SYS_REGISTRY_TEMP");
|
|
||||||
const profile = await this.profileEmployeeRepo.findOneBy({ keycloak: request.user.sub });
|
const profile = await this.profileEmployeeRepo.findOneBy({ keycloak: request.user.sub });
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||||
|
|
@ -136,7 +135,7 @@ export class ProfileHonorEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.honorHistoryRepo.findBy({
|
const record = await this.honorHistoryRepo.findBy({
|
||||||
profileHonorId: honorId,
|
profileHonorId: honorId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ export class ProfileInsigniaEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getInsignia(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async getInsignia(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.insigniaRepo.find({
|
const record = await this.insigniaRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
insignia: {
|
insignia: {
|
||||||
|
|
@ -152,7 +152,7 @@ export class ProfileInsigniaEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getInsigniaHistory(@Path() InsigniaId: string, @Request() req: RequestWithUser) {
|
public async getInsigniaHistory(@Path() InsigniaId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.insigniaHistoryRepo.find({
|
const record = await this.insigniaHistoryRepo.find({
|
||||||
relations: {
|
relations: {
|
||||||
insignia: {
|
insignia: {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export class ProfileLeaveEmployeeTempController 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().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.leaveRepo.find({
|
const record = await this.leaveRepo.find({
|
||||||
relations: { leaveType: true },
|
relations: { leaveType: true },
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export class ProfileNopaidEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("{profileId}")
|
@Get("{profileId}")
|
||||||
public async getNopaid(@Path() profileId: string, @Request() req: RequestWithUser) {
|
public async getNopaid(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.nopaidRepository.find({
|
const lists = await this.nopaidRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
});
|
});
|
||||||
|
|
@ -56,7 +56,7 @@ export class ProfileNopaidEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{nopaidId}")
|
@Get("history/{nopaidId}")
|
||||||
public async nopaidHistory(@Path() nopaidId: string, @Request() req: RequestWithUser) {
|
public async nopaidHistory(@Path() nopaidId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.nopaidHistoryRepository.find({
|
const record = await this.nopaidHistoryRepository.find({
|
||||||
where: { profileNopaidId: nopaidId },
|
where: { profileNopaidId: nopaidId },
|
||||||
order: { createdAt: "DESC" },
|
order: { createdAt: "DESC" },
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export class ProfileOtherEmployeeTempController 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().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const lists = await this.otherRepository.find({
|
const lists = await this.otherRepository.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId },
|
||||||
});
|
});
|
||||||
|
|
@ -56,7 +56,7 @@ export class ProfileOtherEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{otherId}")
|
@Get("history/{otherId}")
|
||||||
public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.otherHistoryRepository.find({
|
const record = await this.otherHistoryRepository.find({
|
||||||
where: { profileOtherId: otherId },
|
where: { profileOtherId: otherId },
|
||||||
order: { createdAt: "DESC" },
|
order: { createdAt: "DESC" },
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export class ProfileSalaryEmployeeTempController extends Controller {
|
||||||
|
|
||||||
@Get("history/{salaryId}")
|
@Get("history/{salaryId}")
|
||||||
public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.salaryHistoryRepo.findBy({
|
const record = await this.salaryHistoryRepo.findBy({
|
||||||
profileSalaryId: salaryId,
|
profileSalaryId: salaryId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export class ProfileTrainingEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getTraining(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
public async getTraining(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.trainingRepo.findBy({ profileEmployeeId });
|
const record = await this.trainingRepo.findBy({ profileEmployeeId });
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
@ -132,7 +132,7 @@ export class ProfileTrainingEmployeeTempController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async trainingHistory(@Path() trainingId: string, @Request() req: RequestWithUser) {
|
public async trainingHistory(@Path() trainingId: string, @Request() req: RequestWithUser) {
|
||||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||||
const record = await this.trainingHistoryRepo.findBy({
|
const record = await this.trainingHistoryRepo.findBy({
|
||||||
profileTrainingId: trainingId,
|
profileTrainingId: trainingId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue