fix
This commit is contained in:
parent
6e5f20ed18
commit
055173a038
4 changed files with 57 additions and 3 deletions
|
|
@ -24,6 +24,8 @@ import {
|
|||
ProfileChangeName,
|
||||
UpdateProfileChangeName,
|
||||
} from "../entities/ProfileChangeName";
|
||||
import CallAPI from "../interfaces/call-api";
|
||||
import { updateName } from "../keycloak";
|
||||
|
||||
@Route("api/v1/org/profile/changeName")
|
||||
@Tags("ProfileChangeName")
|
||||
|
|
@ -145,6 +147,16 @@ export class ProfileChangeNameController extends Controller {
|
|||
profile.prefix = body.prefix ?? profile.prefix;
|
||||
await this.profileRepository.save(profile);
|
||||
|
||||
// if (profile != null) {
|
||||
// const result = await updateName(profile.id, profile.firstName, profile.lastName,req);
|
||||
|
||||
// const _mapData = {
|
||||
// data: mappedData,
|
||||
// total: total,
|
||||
// };
|
||||
|
||||
// }
|
||||
|
||||
return new HttpSuccess(data.id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3150,6 +3150,7 @@ export class ProfileController extends Controller {
|
|||
case "citizenId":
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: {
|
||||
keycloak: IsNull(),
|
||||
citizenId: Like(`%${body.keyword}%`),
|
||||
},
|
||||
relations: ["posType", "posLevel", "current_holders", "profileSalary"],
|
||||
|
|
@ -3289,6 +3290,6 @@ export class ProfileController extends Controller {
|
|||
}),
|
||||
);
|
||||
|
||||
return new HttpSuccess({data: mapDataProfile , total});
|
||||
return new HttpSuccess({ data: mapDataProfile, total });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2931,7 +2931,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
const skip = (page - 1) * pageSize;
|
||||
const take = pageSize;
|
||||
switch (body.fieldName) {
|
||||
case "idcard":
|
||||
case "citizenId":
|
||||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: {
|
||||
keycloak: IsNull(),
|
||||
|
|
@ -3049,7 +3049,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
idcard: item.citizenId,
|
||||
citizenId: item.citizenId,
|
||||
email: item.email,
|
||||
phone: item.phone,
|
||||
name: fullName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue