แก้บัคระบบพัฒนา
This commit is contained in:
parent
c6668cbc27
commit
3163340215
3 changed files with 59 additions and 6 deletions
|
|
@ -2539,9 +2539,51 @@ export class DevelopmentController extends Controller {
|
|||
where: { developmentId: id, isDoneIDP: false },
|
||||
relations: ["development", "development.developmentProjectTechniqueActuals"],
|
||||
});
|
||||
|
||||
let isDevelopment70: boolean = false
|
||||
const dev70Lists = [
|
||||
"on_the_job_training",
|
||||
"job_project_assignment",
|
||||
"job_shadowing",
|
||||
"job_enlargement",
|
||||
"internal_trainer",
|
||||
"rotation",
|
||||
"activity",
|
||||
"site_visit",
|
||||
"benchmarking",
|
||||
"problem_solving",
|
||||
"team_working",
|
||||
"other1"
|
||||
];
|
||||
let isDevelopment20: boolean = false
|
||||
const dev20Lists = [
|
||||
"coaching",
|
||||
"mentoring",
|
||||
"team_meeting",
|
||||
"consulting",
|
||||
"feedback",
|
||||
"other2"
|
||||
];
|
||||
let isDevelopment10: boolean = false
|
||||
const dev10Lists = [
|
||||
"self_learning",
|
||||
"classroom_training",
|
||||
"in_house_training",
|
||||
"public_training",
|
||||
"e_training",
|
||||
"meeting",
|
||||
"seminar",
|
||||
"other3"
|
||||
];
|
||||
await Promise.all(
|
||||
getDevelopment.map(async (x) => {
|
||||
const _data = Object.assign(new DevelopmentHistory(), x);
|
||||
|
||||
const techniqueActuals = x.development?.developmentProjectTechniqueActuals.flatMap(x => x.name) || [];
|
||||
isDevelopment70 = techniqueActuals.length > 0 && dev70Lists.some(item => techniqueActuals.includes(item));
|
||||
isDevelopment20 = techniqueActuals.length > 0 && dev20Lists.some(item => techniqueActuals.includes(item));
|
||||
isDevelopment10 = techniqueActuals.length > 0 && dev10Lists.some(item => techniqueActuals.includes(item));
|
||||
|
||||
if (x.type == "OFFICER") {
|
||||
await new CallAPI()
|
||||
.PostData(request, "/org/profile/development", {
|
||||
|
|
@ -2555,9 +2597,9 @@ export class DevelopmentController extends Controller {
|
|||
reasonDevelopment70: x.development.reasonActual70,
|
||||
reasonDevelopment20: x.development.reasonActual20,
|
||||
reasonDevelopment10: x.development.reasonActual10,
|
||||
isDevelopment70: x.development.isReasonActual70,
|
||||
isDevelopment20: x.development.isReasonActual20,
|
||||
isDevelopment10: x.development.isReasonActual10,
|
||||
isDevelopment70: isDevelopment70,
|
||||
isDevelopment20: isDevelopment20,
|
||||
isDevelopment10: isDevelopment10,
|
||||
developmentTarget: null,
|
||||
developmentResults: null,
|
||||
developmentReport: null,
|
||||
|
|
@ -2584,9 +2626,9 @@ export class DevelopmentController extends Controller {
|
|||
reasonDevelopment70: x.development.reasonActual70,
|
||||
reasonDevelopment20: x.development.reasonActual20,
|
||||
reasonDevelopment10: x.development.reasonActual10,
|
||||
isDevelopment70: x.development.isReasonActual70,
|
||||
isDevelopment20: x.development.isReasonActual20,
|
||||
isDevelopment10: x.development.isReasonActual10,
|
||||
isDevelopment70: isDevelopment70,
|
||||
isDevelopment20: isDevelopment20,
|
||||
isDevelopment10: isDevelopment10,
|
||||
developmentTarget: null,
|
||||
developmentResults: null,
|
||||
developmentReport: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue