Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop
This commit is contained in:
commit
f4ef62e0e0
1 changed files with 13 additions and 1 deletions
|
|
@ -2468,6 +2468,7 @@ export class CommandController extends Controller {
|
||||||
date: item.date,
|
date: item.date,
|
||||||
refCommandNo: item.refCommandNo,
|
refCommandNo: item.refCommandNo,
|
||||||
templateDoc: item.salaryRef,
|
templateDoc: item.salaryRef,
|
||||||
|
commandId: item.commandId,
|
||||||
position: profile.profileSalary.length > 0 ? profile.profileSalary[0].position : null,
|
position: profile.profileSalary.length > 0 ? profile.profileSalary[0].position : null,
|
||||||
positionType:
|
positionType:
|
||||||
profile.profileSalary.length > 0 ? profile.profileSalary[0].positionType : null,
|
profile.profileSalary.length > 0 ? profile.profileSalary[0].positionType : null,
|
||||||
|
|
@ -2506,7 +2507,18 @@ export class CommandController extends Controller {
|
||||||
await this.salaryHistoryRepo.save(history);
|
await this.salaryHistoryRepo.save(history);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
const checkCommandType = await this.commandRepository.findOne({
|
||||||
|
where: { id: (body.data.length > 0 ? body.data[0].commandId?.toString() : "") },
|
||||||
|
relations: ["commandType"]
|
||||||
|
});
|
||||||
|
if(checkCommandType?.commandType.code == "C-PM-11") {
|
||||||
|
const profile = await this.profileRepository.find({ where: { id: In(body.data.map(x => x.profileId)) } });
|
||||||
|
const data = profile.map((x) => ({
|
||||||
|
...x,
|
||||||
|
isProbation: false,
|
||||||
|
}));
|
||||||
|
await this.profileRepository.save(data);
|
||||||
|
}
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue