no message
This commit is contained in:
parent
729f322bf1
commit
de8944dbc9
3 changed files with 10 additions and 12 deletions
|
|
@ -2166,7 +2166,6 @@ export class CommandController extends Controller {
|
||||||
firstName: profile.firstName,
|
firstName: profile.firstName,
|
||||||
lastName: profile.lastName,
|
lastName: profile.lastName,
|
||||||
email: profile.email,
|
email: profile.email,
|
||||||
requiredActions: ["UPDATE_PASSWORD"],
|
|
||||||
});
|
});
|
||||||
if (typeof userKeycloakId !== "string") {
|
if (typeof userKeycloakId !== "string") {
|
||||||
throw new Error(userKeycloakId.errorMessage);
|
throw new Error(userKeycloakId.errorMessage);
|
||||||
|
|
@ -2188,9 +2187,9 @@ export class CommandController extends Controller {
|
||||||
await this.profileRepository.save(profile);
|
await this.profileRepository.save(profile);
|
||||||
setLogDataDiff(req, { before, after: profile });
|
setLogDataDiff(req, { before, after: profile });
|
||||||
}
|
}
|
||||||
if(profile && profile.id) {
|
if (profile && profile.id) {
|
||||||
//Educations
|
//Educations
|
||||||
if(item.bodyEducations && item.bodyEducations.length > 0) {
|
if (item.bodyEducations && item.bodyEducations.length > 0) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
item.bodyEducations.map(async (education) => {
|
item.bodyEducations.map(async (education) => {
|
||||||
const profileEdu = new ProfileEducation();
|
const profileEdu = new ProfileEducation();
|
||||||
|
|
@ -2207,7 +2206,7 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Certificates
|
//Certificates
|
||||||
if(item.bodyCertificates && item.bodyCertificates.length > 0) {
|
if (item.bodyCertificates && item.bodyCertificates.length > 0) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
item.bodyCertificates.map(async (cer) => {
|
item.bodyCertificates.map(async (cer) => {
|
||||||
const profileCer = new ProfileCertificate();
|
const profileCer = new ProfileCertificate();
|
||||||
|
|
@ -2223,7 +2222,7 @@ export class CommandController extends Controller {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
//Salary
|
//Salary
|
||||||
if(item.bodySalarys && item.bodySalarys != null) {
|
if (item.bodySalarys && item.bodySalarys != null) {
|
||||||
const dest_item = await this.salaryRepo.findOne({
|
const dest_item = await this.salaryRepo.findOne({
|
||||||
where: { profileId: profile.id },
|
where: { profileId: profile.id },
|
||||||
order: { order: "DESC" },
|
order: { order: "DESC" },
|
||||||
|
|
@ -2232,7 +2231,7 @@ export class CommandController extends Controller {
|
||||||
Object.assign(profileSal, { ...item.bodySalarys, ...meta });
|
Object.assign(profileSal, { ...item.bodySalarys, ...meta });
|
||||||
const salaryHistory = new ProfileSalaryHistory();
|
const salaryHistory = new ProfileSalaryHistory();
|
||||||
Object.assign(salaryHistory, { ...profileSal, id: undefined });
|
Object.assign(salaryHistory, { ...profileSal, id: undefined });
|
||||||
profileSal.order = dest_item == null ? 1 : dest_item.order + 1
|
profileSal.order = dest_item == null ? 1 : dest_item.order + 1;
|
||||||
profileSal.profileId = profile.id;
|
profileSal.profileId = profile.id;
|
||||||
await this.salaryRepo.save(profileSal, { data: req });
|
await this.salaryRepo.save(profileSal, { data: req });
|
||||||
setLogDataDiff(req, { before, after: profileSal });
|
setLogDataDiff(req, { before, after: profileSal });
|
||||||
|
|
@ -2240,7 +2239,7 @@ export class CommandController extends Controller {
|
||||||
await this.salaryHistoryRepo.save(salaryHistory, { data: req });
|
await this.salaryHistoryRepo.save(salaryHistory, { data: req });
|
||||||
}
|
}
|
||||||
//Position
|
//Position
|
||||||
if(item.bodyPosition && item.bodyPosition != null) {
|
if (item.bodyPosition && item.bodyPosition != null) {
|
||||||
const posMaster = await this.posMasterRepository.findOne({
|
const posMaster = await this.posMasterRepository.findOne({
|
||||||
where: { id: item.bodyPosition.posmasterId },
|
where: { id: item.bodyPosition.posmasterId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ export class KeycloakController extends Controller {
|
||||||
firstName: body.firstName,
|
firstName: body.firstName,
|
||||||
lastName: body.lastName,
|
lastName: body.lastName,
|
||||||
email: body.email,
|
email: body.email,
|
||||||
requiredActions: ["UPDATE_PASSWORD"],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (typeof userId !== "string") {
|
if (typeof userId !== "string") {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export async function createUser(username: string, password: string, opts?: Reco
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
enabled: true,
|
enabled: true,
|
||||||
credentials: [{ type: "password", value: password }],
|
credentials: [{ type: "password", value: password ,temporary: false,}],
|
||||||
username,
|
username,
|
||||||
...opts,
|
...opts,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue