no message
This commit is contained in:
parent
3161ccce3d
commit
8de7931d4f
1 changed files with 199 additions and 108 deletions
|
|
@ -1869,7 +1869,8 @@ export class ReportController extends Controller {
|
||||||
fullnameCommanderHigh:
|
fullnameCommanderHigh:
|
||||||
`${kpiUserEvaluation.prefixCommanderHigh}${kpiUserEvaluation.firstNameCommanderHigh} ${kpiUserEvaluation.lastNameCommanderHigh}`,
|
`${kpiUserEvaluation.prefixCommanderHigh}${kpiUserEvaluation.firstNameCommanderHigh} ${kpiUserEvaluation.lastNameCommanderHigh}`,
|
||||||
positionCommanderHigh: kpiUserEvaluation.positionCommanderHigh ? kpiUserEvaluation.positionCommanderHigh : "-",
|
positionCommanderHigh: kpiUserEvaluation.positionCommanderHigh ? kpiUserEvaluation.positionCommanderHigh : "-",
|
||||||
planneds: kpiUserEvaluation.kpiUserPlanneds
|
planneds: kpiUserEvaluation.kpiUserPlanneds.length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserPlanneds
|
||||||
.map(
|
.map(
|
||||||
x => ({
|
x => ({
|
||||||
name: Plan.find(y => y.id === x.kpiPlanId)?.includingName || "-",
|
name: Plan.find(y => y.id === x.kpiPlanId)?.includingName || "-",
|
||||||
|
|
@ -1883,8 +1884,21 @@ export class ReportController extends Controller {
|
||||||
achievement: Extension.ToThaiNumber(`ระดับ ${x.point}`),
|
achievement: Extension.ToThaiNumber(`ระดับ ${x.point}`),
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
roles: kpiUserEvaluation.kpiUserRoles
|
: [{
|
||||||
|
name: "-",
|
||||||
|
target: "-",
|
||||||
|
point1: "-",
|
||||||
|
point2: "-",
|
||||||
|
point3: "-",
|
||||||
|
point4: "-",
|
||||||
|
point5: "-",
|
||||||
|
weight: "-",
|
||||||
|
achievement: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
|
roles: kpiUserEvaluation.kpiUserRoles.length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserRoles
|
||||||
.map(
|
.map(
|
||||||
x => ({
|
x => ({
|
||||||
name: Role.find(y => y.id === x.kpiRoleId)?.includingName || "-",
|
name: Role.find(y => y.id === x.kpiRoleId)?.includingName || "-",
|
||||||
|
|
@ -1898,8 +1912,21 @@ export class ReportController extends Controller {
|
||||||
achievement: Extension.ToThaiNumber(`ระดับ ${x.point}`),
|
achievement: Extension.ToThaiNumber(`ระดับ ${x.point}`),
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
specials: kpiUserEvaluation.kpiUserSpecials
|
: [{
|
||||||
|
name: "-",
|
||||||
|
target: "-",
|
||||||
|
point1: "-",
|
||||||
|
point2: "-",
|
||||||
|
point3: "-",
|
||||||
|
point4: "-",
|
||||||
|
point5: "-",
|
||||||
|
weight: "-",
|
||||||
|
achievement: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
|
specials: kpiUserEvaluation.kpiUserSpecials.length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserSpecials
|
||||||
.map(
|
.map(
|
||||||
x => ({
|
x => ({
|
||||||
name: x.includingName ?? "-",
|
name: x.includingName ?? "-",
|
||||||
|
|
@ -1913,8 +1940,21 @@ export class ReportController extends Controller {
|
||||||
achievement: Extension.ToThaiNumber(`ระดับ ${x.point}`),
|
achievement: Extension.ToThaiNumber(`ระดับ ${x.point}`),
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
develops: kpiUserEvaluation.kpiUserDevelopments
|
: [{
|
||||||
|
name: "-",
|
||||||
|
target: "-",
|
||||||
|
point1: "-",
|
||||||
|
point2: "-",
|
||||||
|
point3: "-",
|
||||||
|
point4: "-",
|
||||||
|
point5: "-",
|
||||||
|
weight: "-",
|
||||||
|
achievement: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
|
develops: kpiUserEvaluation.kpiUserDevelopments.length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserDevelopments
|
||||||
.map(
|
.map(
|
||||||
x => ({
|
x => ({
|
||||||
name: x.name ?? "-",
|
name: x.name ?? "-",
|
||||||
|
|
@ -1928,8 +1968,22 @@ export class ReportController extends Controller {
|
||||||
point: x.point ? Extension.ToThaiNumber(x.point.toLocaleString()) : "-",
|
point: x.point ? Extension.ToThaiNumber(x.point.toLocaleString()) : "-",
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
headCaps: kpiUserEvaluation.kpiUserCapacitys
|
: [{
|
||||||
|
name: "-",
|
||||||
|
target: "-",
|
||||||
|
achievement10: "-",
|
||||||
|
// achievement5: "-",
|
||||||
|
// achievement0: "-",
|
||||||
|
isDevelopment70: "-",
|
||||||
|
// isDevelopment20: "-",
|
||||||
|
// isDevelopment10: "-",
|
||||||
|
point: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
|
headCaps: kpiUserEvaluation.kpiUserCapacitys.length != 0
|
||||||
|
//&& Capacitys.filter(cap => cap.type === "HEAD" && cap.id == kpiUserEvaluation.kpiUserCapacitys[0].kpiCapacityId).length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserCapacitys
|
||||||
.filter(
|
.filter(
|
||||||
x => Capacitys.some(y => y.id === x.kpiCapacityId && y.type === "HEAD")
|
x => Capacitys.some(y => y.id === x.kpiCapacityId && y.type === "HEAD")
|
||||||
).map(
|
).map(
|
||||||
|
|
@ -1944,8 +1998,21 @@ export class ReportController extends Controller {
|
||||||
point5: x.point == 5 ? "✔" : "-",
|
point5: x.point == 5 ? "✔" : "-",
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
executiveCaps: kpiUserEvaluation.kpiUserCapacitys
|
: [{
|
||||||
|
name: "-",
|
||||||
|
level: "-",
|
||||||
|
weight: "-",
|
||||||
|
point1: "-",
|
||||||
|
point2: "-",
|
||||||
|
point3: "-",
|
||||||
|
point4: "-",
|
||||||
|
point5: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
|
executiveCaps: kpiUserEvaluation.kpiUserCapacitys.length != 0
|
||||||
|
//&& Capacitys.filter(cap => cap.type === "EXECUTIVE" && cap.id == kpiUserEvaluation.kpiUserCapacitys[0].kpiCapacityId).length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserCapacitys
|
||||||
.filter(
|
.filter(
|
||||||
x => Capacitys.some(y => y.id === x.kpiCapacityId && y.type === "EXECUTIVE")
|
x => Capacitys.some(y => y.id === x.kpiCapacityId && y.type === "EXECUTIVE")
|
||||||
).map(
|
).map(
|
||||||
|
|
@ -1960,8 +2027,21 @@ export class ReportController extends Controller {
|
||||||
point5: x.point == 5 ? "✔" : "-",
|
point5: x.point == 5 ? "✔" : "-",
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
groupCaps: kpiUserEvaluation.kpiUserCapacitys
|
: [{
|
||||||
|
name: "-",
|
||||||
|
level: "-",
|
||||||
|
weight: "-",
|
||||||
|
point1: "-",
|
||||||
|
point2: "-",
|
||||||
|
point3: "-",
|
||||||
|
point4: "-",
|
||||||
|
point5: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
|
groupCaps: kpiUserEvaluation.kpiUserCapacitys.length != 0
|
||||||
|
//&& Capacitys.filter(cap => cap.type === "GROUP" && cap.id == kpiUserEvaluation.kpiUserCapacitys[0].kpiCapacityId).length != 0
|
||||||
|
? kpiUserEvaluation.kpiUserCapacitys
|
||||||
.filter(
|
.filter(
|
||||||
x => Capacitys.some(y => y.id === x.kpiCapacityId && y.type === "GROUP")
|
x => Capacitys.some(y => y.id === x.kpiCapacityId && y.type === "GROUP")
|
||||||
).map(
|
).map(
|
||||||
|
|
@ -1976,7 +2056,18 @@ export class ReportController extends Controller {
|
||||||
point5: x.point == 5 ? "✔" : "-",
|
point5: x.point == 5 ? "✔" : "-",
|
||||||
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
summary: x.summary ? Extension.ToThaiNumber(x.summary.toLocaleString()) : "-",
|
||||||
})
|
})
|
||||||
),
|
)
|
||||||
|
: [{
|
||||||
|
name: "-",
|
||||||
|
level: "-",
|
||||||
|
weight: "-",
|
||||||
|
point1: "-",
|
||||||
|
point2: "-",
|
||||||
|
point3: "-",
|
||||||
|
point4: "-",
|
||||||
|
point5: "-",
|
||||||
|
summary: "-",
|
||||||
|
}],
|
||||||
};
|
};
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue