ปิดสิทธิ์ history ทะเบียนประวัตื (ชน USER)
This commit is contained in:
parent
6d36c9b05f
commit
61176e0595
6 changed files with 30 additions and 30 deletions
|
|
@ -123,12 +123,12 @@ export class ProfileAbilityController extends Controller {
|
||||||
@Path() abilityId: string,
|
@Path() abilityId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
const _record = await this.profileAbilityRepo.findOne({
|
// const _record = await this.profileAbilityRepo.findOne({
|
||||||
where: { id: abilityId },
|
// where: { id: abilityId },
|
||||||
});
|
// });
|
||||||
if (_record) {
|
// if (_record) {
|
||||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||||
}
|
// }
|
||||||
const record = await this.profileAbilityHistoryRepo.find({
|
const record = await this.profileAbilityHistoryRepo.find({
|
||||||
relations: ["histories"],
|
relations: ["histories"],
|
||||||
where: { profileAbilityId: abilityId },
|
where: { profileAbilityId: abilityId },
|
||||||
|
|
|
||||||
|
|
@ -144,14 +144,14 @@ export class ProfileAssessmentsController extends Controller {
|
||||||
if (!record) {
|
if (!record) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
}
|
}
|
||||||
const _record = await this.profileAssessmentsRepository.findOne({
|
// const _record = await this.profileAssessmentsRepository.findOne({
|
||||||
where: {
|
// where: {
|
||||||
id: assessmentId,
|
// id: assessmentId,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
if (_record) {
|
// if (_record) {
|
||||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||||
}
|
// }
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,10 +111,10 @@ export class ProfileCertificateController 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().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||||
}
|
// }
|
||||||
const record = await this.certificateHistoryRepo.findBy({
|
const record = await this.certificateHistoryRepo.findBy({
|
||||||
profileCertificateId: certificateId,
|
profileCertificateId: certificateId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -168,10 +168,10 @@ export class ProfileEducationsController 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().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||||
}
|
// }
|
||||||
const record = await this.profileEducationHistoryRepo.findBy({
|
const record = await this.profileEducationHistoryRepo.findBy({
|
||||||
profileEducationId: educationId,
|
profileEducationId: educationId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,10 @@ export class ProfileOtherController 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().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||||
}
|
// }
|
||||||
const record = await this.otherHistoryRepository.find({
|
const record = await this.otherHistoryRepository.find({
|
||||||
where: { profileOtherId: otherId },
|
where: { profileOtherId: otherId },
|
||||||
order: { createdAt: "DESC" },
|
order: { createdAt: "DESC" },
|
||||||
|
|
|
||||||
|
|
@ -143,10 +143,10 @@ export class ProfileSalaryController 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().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||||
}
|
// }
|
||||||
const record = await this.salaryHistoryRepo.findBy({
|
const record = await this.salaryHistoryRepo.findBy({
|
||||||
profileSalaryId: salaryId,
|
profileSalaryId: salaryId,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue