Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop
This commit is contained in:
commit
970ae04afd
6 changed files with 30 additions and 27 deletions
|
|
@ -66,12 +66,12 @@ export class ProfileAbilityController extends Controller {
|
|||
@Path() abilityId: string,
|
||||
@Request() req: RequestWithUser,
|
||||
) {
|
||||
const _record = await this.profileAbilityRepo.findOne({
|
||||
where: { id: abilityId },
|
||||
});
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
// const _record = await this.profileAbilityRepo.findOne({
|
||||
// where: { id: abilityId },
|
||||
// });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
const record = await this.profileAbilityHistoryRepo.find({
|
||||
where: { profileAbilityId: abilityId },
|
||||
order: { createdAt: "DESC" },
|
||||
|
|
|
|||
|
|
@ -70,11 +70,6 @@ export class ProfileAssessmentsController extends Controller {
|
|||
@Path() assessmentId: string,
|
||||
@Request() req: RequestWithUser,
|
||||
) {
|
||||
const _record = await this.profileAssessmentsRepository.findOneBy({
|
||||
id: assessmentId,
|
||||
});
|
||||
if (_record)
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
const record = await this.profileAssessmentsHistoryRepository.find({
|
||||
where: {
|
||||
profileAssessmentId: assessmentId,
|
||||
|
|
@ -85,6 +80,14 @@ export class ProfileAssessmentsController extends Controller {
|
|||
if (!record) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
}
|
||||
// const _record = await this.profileAssessmentsRepository.findOne({
|
||||
// where: {
|
||||
// id: assessmentId,
|
||||
// },
|
||||
// });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ export class ProfileCertificateController extends Controller {
|
|||
|
||||
@Get("history/{certificateId}")
|
||||
public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.certificateRepo.findOneBy({ id: certificateId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
// const _record = await this.certificateRepo.findOneBy({ id: certificateId });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
const record = await this.certificateHistoryRepo.find({
|
||||
where: {
|
||||
profileCertificateId: certificateId,
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ export class ProfileEducationsController extends Controller {
|
|||
@Path() educationId: string,
|
||||
@Request() req: RequestWithUser,
|
||||
) {
|
||||
const _record = await this.profileEducationRepo.findOneBy({ id: educationId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
// const _record = await this.profileEducationRepo.findOneBy({ id: educationId });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
const record = await this.profileEducationHistoryRepo.find({
|
||||
where: {
|
||||
profileEducationId: educationId,
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ export class ProfileOtherController extends Controller {
|
|||
|
||||
@Get("history/{otherId}")
|
||||
public async otherHistory(@Path() otherId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.otherRepository.findOneBy({ id: otherId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
// const _record = await this.otherRepository.findOneBy({ id: otherId });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
const record = await this.otherHistoryRepository.find({
|
||||
where: { profileOtherId: otherId },
|
||||
order: { createdAt: "DESC" },
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ export class ProfileSalaryController extends Controller {
|
|||
|
||||
@Get("history/{salaryId}")
|
||||
public async salaryHistory(@Path() salaryId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.salaryRepo.findOneBy({ id: salaryId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
// const _record = await this.salaryRepo.findOneBy({ id: salaryId });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
const record = await this.salaryHistoryRepo.find({
|
||||
where: {
|
||||
profileSalaryId: salaryId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue