Migration add fields isDeleted #210

This commit is contained in:
harid 2026-02-12 11:47:53 +07:00
parent 3c9e3a1bb6
commit 65e3740cc2
82 changed files with 499 additions and 180 deletions

View file

@ -289,8 +289,8 @@ export class ProfileEmployeeTempController extends Controller {
},
];
const educations = await this.profileEducationRepo.find({
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"],
where: { profileEmployeeId: id },
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute", "isDeleted"],
where: { profileEmployeeId: id, isDeleted: false },
order: { level: "ASC" },
});
const Education =
@ -547,8 +547,8 @@ export class ProfileEmployeeTempController extends Controller {
let _child4 = child4?.orgChild4Name;
const cert_raw = await this.certificateRepository.find({
where: { profileEmployeeId: id },
select: ["certificateType", "issuer", "certificateNo", "issueDate"],
select: ["certificateType", "issuer", "certificateNo", "issueDate", "isDeleted"],
where: { profileEmployeeId: id, isDeleted: false },
order: { createdAt: "ASC" },
});
const certs =
@ -627,8 +627,8 @@ export class ProfileEmployeeTempController extends Controller {
];
const education_raw = await this.profileEducationRepo.find({
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute"],
where: { profileEmployeeId: id },
select: ["startDate", "endDate", "educationLevel", "degree", "field", "institute", "isDeleted"],
where: { profileEmployeeId: id, isDeleted: false },
// order: { lastUpdatedAt: "DESC" },
order: { level: "ASC" },
});
@ -734,7 +734,7 @@ export class ProfileEmployeeTempController extends Controller {
insigniaType: true,
},
},
where: { profileEmployeeId: id },
where: { profileEmployeeId: id, isDeleted: false },
order: { receiveDate: "ASC" },
});
const insignias =
@ -774,7 +774,7 @@ export class ProfileEmployeeTempController extends Controller {
const leave_raw = await this.profileLeaveRepository.find({
relations: { leaveType: true },
where: { profileEmployeeId: id },
where: { profileEmployeeId: id, isDeleted: false },
order: { dateLeaveStart: "ASC" },
});
const leaves =
@ -2370,7 +2370,7 @@ export class ProfileEmployeeTempController extends Controller {
)?.posMasterNo;
const latestProfileEducation = await this.profileEducationRepo.findOne({
where: { profileEmployeeId: item.id },
where: { profileEmployeeId: item.id, isDeleted: false },
order: { level: "ASC" },
});
@ -4043,7 +4043,7 @@ export class ProfileEmployeeTempController extends Controller {
)?.posMasterNo;
const latestProfileEducation = await this.profileEducationRepo.findOne({
where: { profileEmployeeId: item.id },
where: { profileEmployeeId: item.id, isDeleted: false },
order: { level: "ASC" },
});