no message
This commit is contained in:
parent
71cfc78c6e
commit
7297f2bbc3
3 changed files with 318 additions and 235 deletions
|
|
@ -1204,7 +1204,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
@Get("{id}")
|
||||
async detailProfile(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", id);
|
||||
const profile = await this.profileRepo.findOne({
|
||||
const profile: any = await this.profileRepo.findOne({
|
||||
relations: {
|
||||
posLevel: true,
|
||||
posType: true,
|
||||
|
|
@ -1216,6 +1216,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
});
|
||||
|
||||
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
profile.profileType = "EMPLOYEE";
|
||||
|
||||
return new HttpSuccess(profile);
|
||||
}
|
||||
|
|
@ -1795,7 +1796,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
|
||||
}
|
||||
|
||||
const orgRevisionPublish = await this.orgRevisionRepo
|
||||
let orgRevisionPublish = await this.orgRevisionRepo
|
||||
.createQueryBuilder("orgRevision")
|
||||
.where("orgRevision.orgRevisionIsDraft = false")
|
||||
.andWhere("orgRevision.orgRevisionIsCurrent = true")
|
||||
|
|
@ -1805,7 +1806,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
if (revisionId) {
|
||||
const orgRevisionPublish = await this.orgRevisionRepo
|
||||
orgRevisionPublish = await this.orgRevisionRepo
|
||||
.createQueryBuilder("orgRevision")
|
||||
.where("orgRevision.id = :revisionId", { revisionId })
|
||||
// .andWhere("orgRevision.orgRevisionIsDraft = false")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue