auto format

This commit is contained in:
mamoss 2025-09-14 22:34:53 +07:00
parent 3cad6dbf25
commit b3347c84ad

View file

@ -690,7 +690,7 @@ export class ReportController extends Controller {
"posMasters.positions.posExecutive",
],
});
const orgName = orgRootData[0].orgRootName??"";
const orgName = orgRootData[0].orgRootName ?? "";
const orgRootIds = orgRootData.map((orgRoot) => orgRoot.id) || null;
const orgChild1Data = await this.child1Repository.find({
where: {
@ -1288,8 +1288,12 @@ export class ReportController extends Controller {
}
}
}
return new HttpSuccess({ template: "report1", reportName: "report1", data: { org: orgName,data } });
return new HttpSuccess({
template: "report1",
reportName: "report1",
data: { org: orgName, data },
});
}
/**
@ -1341,7 +1345,7 @@ export class ReportController extends Controller {
"posMasters.positions.posExecutive",
],
});
const orgName = orgRootData[0].orgRootName??"";
const orgName = orgRootData[0].orgRootName ?? "";
const orgRootIds = orgRootData.map((orgRoot) => orgRoot.id) || null;
const orgChild1Data = await this.child1Repository.find({
where: {
@ -3462,7 +3466,11 @@ export class ReportController extends Controller {
// sendWebSocket(metaData);
// })();
return new HttpSuccess({ template: "report2", reportName: "report2", data: { org: orgName ,data } });
return new HttpSuccess({
template: "report2",
reportName: "report2",
data: { org: orgName, data },
});
}
/**
@ -3733,20 +3741,18 @@ export class ReportController extends Controller {
posMaster.current_holder.profileEducations.length > 0
) {
let _education: any = posMaster.current_holder.profileEducations
.filter(x => x.isEducation == true || x.isUse == true)
.sort(
(a, b) => {
// (b.finishDate == null ? 0 : b.finishDate.getTime()) -
// (a.finishDate == null ? 0 : a.finishDate.getTime()),
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1
}
return b.level - a.level
.filter((x) => x.isEducation == true || x.isUse == true)
.sort((a, b) => {
// (b.finishDate == null ? 0 : b.finishDate.getTime()) -
// (a.finishDate == null ? 0 : a.finishDate.getTime()),
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1;
}
);
return b.level - a.level;
});
if (_education.length > 0) {
// education = _education[0];
education = _education.map((e:any) => e.degree).join(", ")
education = _education.map((e: any) => e.degree).join(", ");
}
}
let salary: any = "";
@ -4115,17 +4121,15 @@ export class ReportController extends Controller {
posMaster.current_holder.profileEducations.length > 0
) {
let _education: any = posMaster.current_holder.profileEducations
.filter(x => x.isEducation == true || x.isUse == true)
.sort(
(a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1
}
return b.level - a.level
.filter((x) => x.isEducation == true || x.isUse == true)
.sort((a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1;
}
);
return b.level - a.level;
});
if (_education.length > 0) {
education = _education.map((e:any) => e.degree).join(", ")
education = _education.map((e: any) => e.degree).join(", ");
}
}
let salary: any = "";
@ -4502,17 +4506,15 @@ export class ReportController extends Controller {
posMaster.current_holder.profileEducations.length > 0
) {
let _education: any = posMaster.current_holder.profileEducations
.filter(x => x.isEducation == true || x.isUse == true)
.sort(
(a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1
}
return b.level - a.level
.filter((x) => x.isEducation == true || x.isUse == true)
.sort((a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1;
}
);
return b.level - a.level;
});
if (_education.length > 0) {
education = _education.map((e:any) => e.degree).join(", ")
education = _education.map((e: any) => e.degree).join(", ");
}
}
let salary: any = "";
@ -4905,17 +4907,15 @@ export class ReportController extends Controller {
posMaster.current_holder.profileEducations.length > 0
) {
let _education: any = posMaster.current_holder.profileEducations
.filter(x => x.isEducation == true || x.isUse == true)
.sort(
(a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1
}
return b.level - a.level
.filter((x) => x.isEducation == true || x.isUse == true)
.sort((a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1;
}
);
return b.level - a.level;
});
if (_education.length > 0) {
education = _education.map((e:any) => e.degree).join(", ")
education = _education.map((e: any) => e.degree).join(", ");
}
}
let salary: any = "";
@ -5312,17 +5312,15 @@ export class ReportController extends Controller {
posMaster.current_holder.profileEducations.length > 0
) {
let _education: any = posMaster.current_holder.profileEducations
.filter(x => x.isEducation == true || x.isUse == true)
.sort(
(a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1
}
return b.level - a.level
.filter((x) => x.isEducation == true || x.isUse == true)
.sort((a, b) => {
if (a.isEducation !== b.isEducation) {
return a.isEducation ? -1 : 1;
}
);
return b.level - a.level;
});
if (_education.length > 0) {
education = _education.map((e:any) => e.degree).join(", ")
education = _education.map((e: any) => e.degree).join(", ");
}
}
let salary: any = "";
@ -5700,7 +5698,7 @@ export class ReportController extends Controller {
"posMasters.positions.posExecutive",
],
});
const orgName = orgRootData[0].orgRootName??"";
const orgName = orgRootData[0].orgRootName ?? "";
const orgRootIds = orgRootData.map((orgRoot) => orgRoot.id) || null;
const orgChild1Data = await this.child1Repository.find({
where: {
@ -6891,7 +6889,11 @@ export class ReportController extends Controller {
}
}
}
return new HttpSuccess({ template: "report3", reportName: "report3", data: { org: orgName,data } });
return new HttpSuccess({
template: "report3",
reportName: "report3",
data: { org: orgName, data },
});
}
@Get("report4/{rootId}")