fix
This commit is contained in:
parent
8c30dc56f4
commit
9029baffab
3 changed files with 10 additions and 3 deletions
|
|
@ -7304,6 +7304,7 @@ export class ProfileController extends Controller {
|
|||
profile && profile.profileEducations.length > 0
|
||||
? `${profile.profileEducations[0].degree ?? ""} ${profile.profileEducations[0].field ?? ""}`
|
||||
: "-",
|
||||
statusCheckEdit: profile.statusCheckEdit,
|
||||
};
|
||||
|
||||
if (_profile.child4Id != null) {
|
||||
|
|
|
|||
|
|
@ -4830,6 +4830,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
profile && profile.profileEducations.length > 0
|
||||
? `${profile.profileEducations[0].degree ?? ""} ${profile.profileEducations[0].field ?? ""}`
|
||||
: "-",
|
||||
statusCheckEdit: profile.statusCheckEdit,
|
||||
};
|
||||
|
||||
if (_profile.child4Id != null) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import HttpSuccess from "../interfaces/http-success";
|
|||
import HttpStatus from "../interfaces/http-status";
|
||||
import HttpError from "../interfaces/http-error";
|
||||
import { RequestWithUser } from "../middlewares/user";
|
||||
import { Brackets, LessThan, MoreThan } from "typeorm";
|
||||
import { Brackets, IsNull, LessThan, MoreThan, Not } from "typeorm";
|
||||
import { setLogDataDiff } from "../interfaces/utils";
|
||||
import {
|
||||
CreateProfileSalaryTemp,
|
||||
|
|
@ -309,7 +309,7 @@ export class ProfileSalaryTempController extends Controller {
|
|||
orgRevisionId: findRevision.id,
|
||||
})
|
||||
.andWhere(
|
||||
statusCheckEdit != undefined && statusCheckEdit != null
|
||||
statusCheckEdit != undefined && statusCheckEdit != null && statusCheckEdit.toUpperCase() != "ALL"
|
||||
? "profile.statusCheckEdit = :statusCheckEdit"
|
||||
: "1=1",
|
||||
{
|
||||
|
|
@ -640,9 +640,12 @@ export class ProfileSalaryTempController extends Controller {
|
|||
) {
|
||||
if (type.toLocaleUpperCase() == "OFFICER") {
|
||||
const salary = await this.salaryRepo.find({
|
||||
where: { profileId: profileId },
|
||||
where: {
|
||||
profileId: profileId,
|
||||
},
|
||||
order: { order: "ASC" }
|
||||
});
|
||||
|
||||
if (salary.length <= 0) {
|
||||
let salaryOld = await this.salaryOldRepo.find({
|
||||
where: { profileId: profileId },
|
||||
|
|
@ -725,6 +728,7 @@ export class ProfileSalaryTempController extends Controller {
|
|||
if (type.toLocaleUpperCase() == "OFFICER") {
|
||||
const salary = await this.salaryRepo.find({
|
||||
where: { profileId: profileId, isDelete: false },
|
||||
order: { order: "ASC" }
|
||||
});
|
||||
if (!salary) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
|
|
@ -738,6 +742,7 @@ export class ProfileSalaryTempController extends Controller {
|
|||
} else {
|
||||
const salary = await this.salaryRepo.find({
|
||||
where: { profileEmployeeId: profileId, isDelete: false },
|
||||
order: { order: "ASC" }
|
||||
});
|
||||
if (!salary) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue