Commit e59735fa by Nattana Chaiyamat

เปลี่ยนการจัดกลุ่มหัวข้อประเมิน จาก JL เป็น JD

parent 66a890c0
......@@ -12,7 +12,7 @@
</div>
</div>
</div>
<div *ngIf="pl" class="py-2 border-b-2 border-collapse ">
<div *ngIf="jobCode" class="py-2 border-b-2 border-collapse ">
<div class="grid grid-cols-3 gap-6">
<div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">รหัส</label>
......@@ -22,7 +22,7 @@
<div class="col-span-1">
<input type="text" id="input-label"
class="py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-2/3 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly [(ngModel)]="pl.plId">
readonly [(ngModel)]="jobCode.jobCodeId">
</div>
</div>
<div class="grid grid-cols-3 gap-6 mt-5">
......@@ -37,12 +37,12 @@
<div class="col-span-1">
<input type="text" id="input-label"
class="py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-2/3 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly [(ngModel)]="pl.tdesc">
readonly [(ngModel)]="jobCode.tdesc">
</div>
<div class="col-span-1">
<input type="text" id="input-label"
class="py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-2/3 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly [(ngModel)]="pl.edesc">
readonly [(ngModel)]="jobCode.edesc">
</div>
</div>
</div>
......
......@@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angu
import { ToastrService } from 'ngx-toastr';
import { GroupAssessmentModel, MyGroupAssessmentModel } from 'src/app/shared/model/group-assessment.model';
import { GroupAssessment1ListModel, MyGroupAssessment1ListModel } from 'src/app/shared/model/group-assessment1-list.model';
import { MyPLModel, PLModel } from 'src/app/shared/model/pl.model';
import { MyJobcodeModel, JobcodeModel } from 'src/app/shared/model/jobcode.model';
import { GroupAssessmentService } from 'src/app/shared/services/group-assessment.service';
import { IndicatorsCoursesService } from 'src/app/shared/services/indicators-courses.service';
import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1MiniModel } from 'src/app/shared/model/competency-indicators-courses1-mini.model';
......@@ -13,7 +13,7 @@ import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1Mi
styleUrls: ['./edit-group-competencies.component.scss']
})
export class EditGroupCompetenciesComponent {
@Input() pl: PLModel = new MyPLModel()
@Input() jobCode: JobcodeModel = new MyJobcodeModel()
@Output() sendEdit: EventEmitter<boolean> = new EventEmitter<boolean>();
groupCompetencies: GroupAssessmentModel = new MyGroupAssessmentModel()
dataSelectList: GroupAssessment1ListModel[] = [];
......@@ -53,9 +53,9 @@ export class EditGroupCompetenciesComponent {
getGroupAssessmentById() {
this.dataLoading = true;
this.groupAssessmentService.getById(this.pl.plId).subscribe({
next: response => {
this.groupCompetencies = new MyGroupAssessmentModel({ ...response, personalLevel: new MyPLModel(this.pl) })
this.groupAssessmentService.getById(this.jobCode.jobCodeId).subscribe({
next: response => {[[]]
this.groupCompetencies = new MyGroupAssessmentModel({ ...response, jd: new MyJobcodeModel(this.jobCode) })
this.dataList = new MyGroupAssessmentModel(response).groupAssessment1List.map(x => ({ check: false, data: new MyGroupAssessment1ListModel(x) }))
this.dataList.sort((a, b) => {
const topicA = a.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId.toLowerCase();
......
......@@ -33,7 +33,7 @@
</ng-container>
<ng-container *ngIf="editTab">
<app-edit-group-competencies [pl]="groupCompetencies"
<app-edit-group-competencies [jobCode]="groupCompetencies"
(sendEdit)="editTab=$event;pathTitleChange()"></app-edit-group-competencies>
</ng-container>
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
import { ColumnModel } from '@syncfusion/ej2-grids';
import { ToastrService } from 'ngx-toastr';
import { MyPLModel, PLModel } from 'src/app/shared/model/pl.model';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
import { FileService } from 'src/app/shared/services/file.service';
import { PLService } from 'src/app/shared/services/pl.service';
import { JobcodeService } from 'src/app/shared/services/jobcode.service';
@Component({
selector: 'app-group-competencies',
......@@ -16,15 +16,15 @@ export class GroupCompetenciesComponent {
currentPage = 1
page = Array.from({ length: 1 }, (_, i) => i + 1);
groupCompetenciesList: PLModel[] = []
groupCompetencies: PLModel = new MyPLModel({})
groupCompetenciesList: JobcodeModel[] = []
groupCompetencies: JobcodeModel = new MyJobcodeModel({})
dataLoading = false
selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์';
columns: ColumnModel[] = [{
field: "plId",
field: "jobCodeId",
headerText: "รหัส",
type: "string",
isPrimaryKey: true,
......@@ -45,7 +45,7 @@ export class GroupCompetenciesComponent {
constructor(private toastr: ToastrService,
private cdr: ChangeDetectorRef,
private fileService: FileService,
private pLService: PLService,
private jobcodeService: JobcodeService,
) {
this.pathTitleChange()
}
......@@ -106,11 +106,11 @@ export class GroupCompetenciesComponent {
getGroupCompetenciesList() {
this.dataLoading = true
this.selectedItems.data.clear()
this.pLService.getList().subscribe({
this.jobcodeService.getGroupAssessmentList().subscribe({
next: response => {
this.groupCompetenciesList = response.map(x => {
this.selectedItems.data.set(x.plId, false)
return new MyPLModel(x)
this.selectedItems.data.set(x.jobCodeId, false)
return new MyJobcodeModel(x)
})
this.groupCompetenciesList = response
this.dataLoading = false
......@@ -122,9 +122,9 @@ export class GroupCompetenciesComponent {
})
}
selectGroupCompetencies(data: PLModel) {
const groupCompetencies = this.groupCompetenciesList.find(x => x.plId == data.plId)
this.groupCompetencies = new MyPLModel(groupCompetencies)
selectGroupCompetencies(data: JobcodeModel) {
const groupCompetencies = this.groupCompetenciesList.find(x => x.jobCodeId == data.jobCodeId)
this.groupCompetencies = new MyJobcodeModel(groupCompetencies)
}
pathTitleChange() {
......@@ -140,7 +140,7 @@ export class GroupCompetenciesComponent {
}
checkPrimary() {
return this.groupCompetenciesList.find(x => x.plId == this.groupCompetencies.plId)
return this.groupCompetenciesList.find(x => x.jobCodeId == this.groupCompetencies.jobCodeId)
}
}
......@@ -47,7 +47,7 @@
<thead>
<tr>
<ng-container
*ngFor="let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ระดับพนักงาน','การจัดการ']; let f = first; let l = last; let i = index">
*ngFor="let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ลักษณะงาน','การจัดการ']; let f = first; let l = last; let i = index">
<th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700">{{ item }}</span>
......@@ -82,7 +82,7 @@
{{item.masfromEvaluationRound.evaluationRoundId}}</td>
<td>{{item.apsassessy.fname}} {{item.apsassessy.lname}}</td>
<td class="text-center">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center">{{item.personalLevel.tdesc}}</td>
<td class="text-center">{{item.jd.tdesc}}</td>
<td class="flex justify-center items-center space-x-2">
<i class="ti ti-edit cursor-pointer i-gray fs-xl px-1" *ngIf="item.active" (click)="openAddRoundModel(item.masfromEvaluationRound.evaluationRoundId,item.apsassessy.employeeId,item,'form-pm-emp')" ></i>
<input type="checkbox" id="hs-small-switch{{i+1}}" [(ngModel)]="item.active" (ngModelChange)="saveAssessmentOne(item)"
......
......@@ -102,14 +102,14 @@
<input type="date" id="input-label" class="ti-form-input w-1/2" [(ngModel)]="evaluation_cycle.apsPeriodEnd"
[ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [readonly]="modalStatus == 'edit'">
<label for="input-label" class="ti-form-label mt-2rem">ระดับพนักงาน (JL)</label>
<div *ngFor="let item of evaluation_cycle.personalLevel;let i = index;let f=first;let l = last"
<label for="input-label" class="ti-form-label mt-2rem">ลักษณะงาน (JD)</label>
<div *ngFor="let item of evaluation_cycle.jd;let i = index;let f=first;let l = last"
class="grid grid-cols-2">
<div class="col-span-1">
<div class="flex relative">
<input type="text" class="ti-form-input pointer-events-none" readonly
[ngClass]="{'input-list-f1': f&&!l, 'input-list-c1': !f&&!l, 'input-list-l1': !f&&l, 'input-list-fl1': f&&l,'!bg-input-readonly':modalStatus == 'edit'}"
[(ngModel)]="item.plId">
[(ngModel)]="item.jobCodeId">
<div
[ngClass]="{'input-list-line-f': f&&!l, 'input-list-line-c': !f&&!l, 'input-list-line-l': !f&&l, 'input-list-line-fl': f&&l}">
<div class="input-list-line"></div>
......@@ -118,7 +118,7 @@
[ngClass]="{'input-list-f2': f&&!l, 'input-list-c2': !f&&!l, 'input-list-l2': !f&&l, 'input-list-fl2': f&&l,'!bg-input-readonly':modalStatus == 'edit'}"
[(ngModel)]="item.tdesc">
<div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<button *ngIf="item.plId && modalStatus !== 'edit'" type="button" class="flex items-center text-red-500"
<button *ngIf="item.jobCodeId && modalStatus !== 'edit'" type="button" class="flex items-center text-red-500"
(click)="pl.selectIndex=i;selectPl()">
<i class="ti ti-circle-x cursor-pointer"></i>
</button>
......@@ -129,7 +129,7 @@
<ng-component *ngTemplateOutlet="plSearchButton"></ng-component>
</div>
</div>
<div class="grid grid-cols-2" *ngIf="!evaluation_cycle.personalLevel.length">
<div class="grid grid-cols-2" *ngIf="!evaluation_cycle.jd.length">
<div class="col-span-1">
<div class="flex relative">
<input type="text" class="ti-form-input input-list-fl1 pointer-events-none" readonly>
......@@ -150,7 +150,7 @@
<i class="ri-search-line cursor-pointer text-gray"></i>
</button>
</ng-template>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JL ระบบจะทำการเลือกทั้งหมด</span>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด</span>
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close]
......@@ -186,7 +186,7 @@
<ng-template #PLModal let-modal>
<h3 mat-dialog-title>
ข้อมูลระดับพนักงาน (JL)
ข้อมูลลักษณะงาน (JD)
</h3>
<mat-dialog-content>
<div class="flex justify-end pb-1rem">
......@@ -207,7 +207,7 @@
<thead>
<tr>
<ng-container
*ngFor="let item of ['ลำดับ','รหัสระดับพนักงาน (JL)','รายละเอียดฝ่าย (ไทย)','รายละเอียดฝ่าย (อังกฤษ)']; let f = first; let l = last">
*ngFor="let item of ['ลำดับ','รหัสลักษณะงาน (JD)','รายละเอียดฝ่าย (ไทย)','รายละเอียดฝ่าย (อังกฤษ)']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" [class.!text-center]="f">
<span class="text-sm">{{ item }}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
......@@ -231,7 +231,7 @@
<td class="flex justify-center">
{{((PLsearchmodal.currentPage-1) * PLsearchmodal.pageSize)+(i+1)}}
</td>
<td>{{item.plId}}</td>
<td>{{item.jobCodeId}}</td>
<td>{{item.tdesc}}</td>
<td>{{item.edesc}}</td>
</tr>
......@@ -481,7 +481,7 @@
<input type="date" id="input-label" class="ti-form-input w-1/2" [(ngModel)]="evaluation_cycle.apsPeriodEnd"
[ngClass]="{'bg-input-readonly':!modalStatusEdit}" [readonly]="!modalStatusEdit">
<label for="input-label" class="ti-form-label mt-2rem">ระดับพนักงาน (JL)</label>
<label for="input-label" class="ti-form-label mt-2rem">ลักษณะงาน (JD)</label>
<div *ngFor="let item of evaluation_cycle.personalLevel;let i = index;let f=first;let l = last"
class="grid grid-cols-2">
<div class="col-span-1">
......@@ -531,7 +531,7 @@
<i class="ri-search-line cursor-pointer text-gray"></i>
</button>
</ng-template>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JL ระบบจะทำการเลือกทั้งหมด</span>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด</span>
<div class="flex justify-end mt-2rem mb-1rem">
<button type="button"
......@@ -663,7 +663,7 @@
<div class="max-h-full overflow-hidden ti-modal-content">
<div class="ti-modal-header">
<h3 class="text-xxl font-bold text-primary">
ข้อมูลระดับพนักงาน (JL)
ข้อมูลลักษณะงาน (JD)
</h3>
<div class="flex justify-end">
<button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger"
......@@ -692,7 +692,7 @@
<thead>
<tr>
<ng-container
*ngFor="let item of ['ลำดับ','รหัสระดับพนักงาน (JL)','รายละเอียด(ไทย)','รายละเอียด(อังกฤษ)']; let f = first; let l = last">
*ngFor="let item of ['ลำดับ','รหัสลักษณะงาน (JD)','รายละเอียด(ไทย)','รายละเอียด(อังกฤษ)']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f">
<span class="text-sm">{{ item }}</span>
......
......@@ -2,11 +2,12 @@ import { ChangeDetectorRef, Component, EventEmitter, Output, Renderer2, ViewChil
import { ToastrService } from 'ngx-toastr';
import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/model/evaluation-cycle.model';
import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle.service';
import { PLService } from 'src/app/shared/services/pl.service';
import { PLModel, MyPLModel } from 'src/app/shared/model/pl.model';
import { MatDialog } from '@angular/material/dialog';
import { ColumnModel } from '@syncfusion/ej2-grids';
import Swal from 'sweetalert2';
import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
export interface DataModal {
search: string,
currentPage: number,
......@@ -34,7 +35,7 @@ export class EvaluationCycleComponent {
currentPage = 1
page = Array.from({ length: 1 }, (_, i) => i + 1);
modalStatus : 'createForm' | 'add' | 'edit' | 'delete' | 'deleteGroup' = 'add'
modalStatus: 'createForm' | 'add' | 'edit' | 'delete' | 'deleteGroup' = 'add'
evaluation_cyclelist: EvaluationCycleModel[] = []
evaluation_cycle: EvaluationCycleModel = new MyEvaluationCycleModel({})
dataLoading = false
......@@ -57,7 +58,7 @@ export class EvaluationCycleComponent {
search: "",
pageSize: 10
}
pl: { loading: boolean, selectIndex: number, dataList: PLModel[] } = { loading: false, selectIndex: -1, dataList: [] }
pl: { loading: boolean, selectIndex: number, dataList: JobcodeModel[] } = { loading: false, selectIndex: -1, dataList: [] }
currentDate = new Date()
yearList = [
(this.currentDate.getFullYear() - 1) + "",
......@@ -110,7 +111,7 @@ export class EvaluationCycleComponent {
private toastr: ToastrService,
private cdr: ChangeDetectorRef,
private renderer: Renderer2,
private pLService: PLService,
private jobcodeService: JobcodeService,
private dialog: MatDialog
) { }
......@@ -132,9 +133,9 @@ export class EvaluationCycleComponent {
getPlList() {
this.pl.loading = false
this.pLService.getList().subscribe({
this.jobcodeService.getGroupAssessmentList().subscribe({
next: response => {
this.pl.dataList = response.map((x: any) => new MyPLModel(x))
this.pl.dataList = response.map((x: any) => new MyJobcodeModel(x))
this.pl.loading = false
this.searchChange()
this.cdr.detectChanges()
......@@ -146,22 +147,22 @@ export class EvaluationCycleComponent {
}
plListFilter() {
return this.pl.dataList.filter(x =>
(x.plId.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase()) ||
(x.jobCodeId.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase()) ||
x.tdesc.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase())) &&
!this.evaluation_cycle.personalLevel.some(y => y.plId == x.plId)
!this.evaluation_cycle.jd.some(y => y.jobCodeId == x.jobCodeId)
);
}
onPLModalSearchChange() {
this.PLsearchmodal.currentPage = 1
this.PLsearchmodal.page = Array.from({ length: Math.ceil(this.plListFilter().length / 10) }, (_, i) => i + 1);
}
selectPl(data?: PLModel) {
selectPl(data?: JobcodeModel) {
if (!data) {
this.evaluation_cycle.personalLevel.splice(this.pl.selectIndex, 1);
this.evaluation_cycle.jd.splice(this.pl.selectIndex, 1);
return;
}
this.evaluation_cycle.personalLevel.push(new MyPLModel(data))
this.evaluation_cycle.jd.push(new MyJobcodeModel(data))
}
getEvaluationCycleList() {
......@@ -220,9 +221,6 @@ export class EvaluationCycleComponent {
} else if (this.modalStatus == 'add') {
this.evaluation_cycle = new MyEvaluationCycleModel();
this.evaluationRoundId = '';
} else if (this.modalStatus == 'edit') {
this.evaluation_cycle = new MyEvaluationCycleModel({ evaluationRoundId: this.evaluation_cycle.evaluationRoundId });
this.evaluationRoundId = this.evaluation_cycle.evaluationRoundId;
}
}
......@@ -452,7 +450,7 @@ export class EvaluationCycleComponent {
});
}
});
}
}
checkPrimary() {
......
......@@ -109,7 +109,6 @@ import { SettingPerformanceEvalutionComponent } from '../performance-management-
import { AssessmentSystemConfigurationComponent } from '../performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component';
import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluation/self-evaluation.component';
import { CompanyRegistrationPageComponent } from '../company-components/company-registration/company-registration-page/company-registration-page.component';
import { PmsEvalutionComponent } from '../performance-evaluation/pms-evaluation/pms-evalution.component';
import { CompanyService } from 'src/app/shared/services/company.service';
import { CompetencytypeService } from 'src/app/shared/services/competencytype.service';
import { CompetencytopicService } from 'src/app/shared/services/competencytopic.service';
......@@ -324,7 +323,6 @@ export class CustomDateAdapter extends NativeDateAdapter {
AssessmentSystemConfigurationComponent,
SelfEvaluationComponent,
CompanyRegistrationPageComponent,
PmsEvalutionComponent,
ManageUserComponent,
PmsGradeRegistrationComponent,
PmsGradeManagementComponent,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -150,10 +150,10 @@
style="border-radius:10px"
(mouseenter)="biScore.set(bi.behavioralIndicators+bi.assessmentId,item)"
(mouseleave)="biScore.clear()"
(click)="bi.competencyBehavioral.scoreTopicExpectation=item;calnumberCheck()" [ngClass]="{
'!border-secondary': bi.competencyBehavioral.scoreTopicExpectation>=item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>=item ,
'!text-indigo-600':bi.competencyBehavioral.scoreTopicExpectation>item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>item,
'!text-white !bg-secondary': bi.competencyBehavioral.scoreTopicExpectation==item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)==item ,
(click)="bi.competencyBehavioral.scoreTopicExpectationBoss=item;calnumberCheck()" [ngClass]="{
'!border-secondary': bi.competencyBehavioral.scoreTopicExpectationBoss>=item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>=item ,
'!text-indigo-600':bi.competencyBehavioral.scoreTopicExpectationBoss>item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>item,
'!text-white !bg-secondary': bi.competencyBehavioral.scoreTopicExpectationBoss==item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)==item ,
'pointer-events-none':!canEdit}">
{{item}}
</button>
......@@ -164,11 +164,11 @@
style="border-radius:10px"
(mouseenter)="biScore.set(bi.behavioralIndicators+bi.assessmentId,item)"
(mouseleave)="biScore.clear()"
(click)="bi.competencyBehavioral.scoreTopicExpectationEmp=item;bi.competencyBehavioral.scoreTopicExpectation=item;calnumberCheck()"
(click)="bi.competencyBehavioral.scoreTopicExpectationBoss=item;bi.competencyBehavioral.scoreTopicExpectationBoss=item;calnumberCheck()"
[ngClass]="{
'!border-secondary': bi.competencyBehavioral.scoreTopicExpectation>=item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>=item ,
'!text-indigo-600':bi.competencyBehavioral.scoreTopicExpectation>item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>item,
'!text-white !bg-secondary': bi.competencyBehavioral.scoreTopicExpectation==item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)==item ,
'!border-secondary': bi.competencyBehavioral.scoreTopicExpectationBoss>=item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>=item ,
'!text-indigo-600':bi.competencyBehavioral.scoreTopicExpectationBoss>item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)>item,
'!text-white !bg-secondary': bi.competencyBehavioral.scoreTopicExpectationBoss==item||(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)==item ,
'pointer-events-none':!canEdit}">
{{item}}
</button>
......@@ -180,13 +180,13 @@
{{scoreDescriptions[(biScore.get(bi.behavioralIndicators+bi.assessmentId) ?? 0)] }}
</span>
<span *ngIf="!biScore.get(bi.behavioralIndicators+bi.assessmentId)" class="text-indigo-600">
{{scoreDescriptions[bi.competencyBehavioral.scoreTopicExpectation] }}
{{scoreDescriptions[bi.competencyBehavioral.scoreTopicExpectationBoss] }}
</span>
</div>
</td>
<ng-container *ngIf="evaluaterId!=evaluateeId&&!complete">
<td class="py-2 text-center text-indigo-600 font-semibold" style="vertical-align: top">
{{bi.competencyBehavioral.scoreTopicExpectationEmp}}
{{bi.competencyBehavioral.scoreTopicExpectationBoss}}
</td>
</ng-container>
</tr>
......
......@@ -322,7 +322,7 @@ export class PmsFormEmployeeComponent {
selectDataList(data: CompetencyModel) {
this.compentency.originalData = this.deepClone(data)
this.compentency.data = this.deepClone(data)
this.complete = this.compentency.data?.statusAll == 'complete'
this.complete = this.compentency.data?.statusType == 'complete'
this.cdr.detectChanges()
if (this.compentency.data) {
this.currentTap = this.firstCurrentTap || "ข้อมูลการประเมิน"
......
......@@ -19,7 +19,7 @@
</div>
</div>
<div class="grid grid-cols-6">
<input type="text" class="ti-form-input !bg-input-readonly" readonly [(ngModel)]="pl.plId">
<input type="text" class="ti-form-input !bg-input-readonly" readonly [(ngModel)]="pl.jobCodeId">
</div>
<div class="grid grid-cols-3 gap-6 mt-5">
<div class="col-span-1">
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { MyPLModel, PLModel } from 'src/app/shared/model/pl.model';
import { MyJobcodeModel, JobcodeModel } from 'src/app/shared/model/jobcode.model';
import { MyPLModel } from 'src/app/shared/model/pl.model';
import { MyPmsGroupAssessmentModel } from 'src/app/shared/model/pms-group-assessment.model';
import { MyPmsGroupAssessment1Model, PmsGroupAssessment1Model } from 'src/app/shared/model/pms-group-assessment1.model';
import { MyPmstopicModel, PmstopicModel } from 'src/app/shared/model/pmstopic.model';
......@@ -18,7 +19,7 @@ export interface DataModal {
})
export class EditEvaluationGroupingComponent {
@Output() sendOnEdit: EventEmitter<boolean> = new EventEmitter<boolean>();
@Input() pl: PLModel = new MyPLModel()
@Input() pl: JobcodeModel = new MyJobcodeModel()
currentPage = 1
page = Array.from({ length: 1 }, (_, i) => i + 1);
search = ""
......@@ -83,7 +84,7 @@ export class EditEvaluationGroupingComponent {
getPmsGroupAssessmentBy_plId() {
this.pmsGroupAssessment.loading = true
this.pmsGroupAssessmentService.getBy_plId(this.pl.plId).subscribe({
this.pmsGroupAssessmentService.getBy_plId(this.pl.jobCodeId).subscribe({
next: response => {
this.pmsGroupAssessment.dataList = response.pmsGroupAssessment1List.map(x => ({ check: false, data: new MyPmsGroupAssessment1Model(x) }))
this.pmsGroupAssessment.dataList.sort((a, b) => a.data.pmsTopic.pmsTopicId.localeCompare(b.data.pmsTopic.pmsTopicId))
......@@ -137,7 +138,8 @@ export class EditEvaluationGroupingComponent {
savePmsGroupAssessment() {
const body = {
personalLevel: new MyPLModel(this.pl),
personalLevel: new MyPLModel(),
jd: new MyJobcodeModel(this.pl),
companyId: "",
pmsGroupAssessment1List: this.pmsGroupAssessment.dataList.map(x => new MyPmsGroupAssessment1Model(x.data))
}
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { PLModel, MyPLModel } from 'src/app/shared/model/pl.model';
import { FileService } from 'src/app/shared/services/file.service';
import { PLService } from 'src/app/shared/services/pl.service';
import { ColumnModel } from '@syncfusion/ej2-grids';
import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
@Component({
selector: 'app-evaluation-grouping',
......@@ -24,14 +25,14 @@ export class EvaluationGroupingComponent {
selectedFileName: string = 'กรุณาเลือกไฟล์';
columns: ColumnModel[] = [{
field: "plId",
field: "jobCodeId",
headerText: "รหัส",
type: "string",
isPrimaryKey: true,
},
{
field: "tdesc",
headerText: "ชื่อระดับพนักงาน (ไทย)",
headerText: "ชื่อลักษณะงาน (ไทย)",
type: "string"
}]
searchSettings = {
......@@ -41,8 +42,8 @@ export class EvaluationGroupingComponent {
};
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
pl: { loading: boolean, select: PLModel, dataList: PLModel [] } = { loading: false, select: new MyPLModel(), dataList: [] }
constructor(private toastr: ToastrService, private plService: PLService, private cdr: ChangeDetectorRef, private fileService: FileService) { }
pl: { loading: boolean, select: JobcodeModel, dataList: JobcodeModel [] } = { loading: false, select: new MyJobcodeModel(), dataList: [] }
constructor(private toastr: ToastrService, private jobcodeService: JobcodeService, private cdr: ChangeDetectorRef, private fileService: FileService) { }
ngOnInit(): void {
this.onSendPathTitle()
this.getPLList()
......@@ -97,10 +98,10 @@ export class EvaluationGroupingComponent {
}
getPLList() {
this.pl.loading = true
this.plService.getList().subscribe({
this.jobcodeService.getGroupAssessmentList().subscribe({
next: response => {
this.pl.dataList = response.map(x => {
return new MyPLModel(x)
return new MyJobcodeModel(x)
})
this.pl.loading = false
this.cdr.detectChanges();
......@@ -114,17 +115,17 @@ export class EvaluationGroupingComponent {
plListFilter() {
return this.pl.dataList.filter(x => {
const data = x
const match = data.plId.toLowerCase().includes(this.search.toLowerCase()) || data.tdesc.toLowerCase().includes(this.search.toLowerCase())
const match = data.jobCodeId.toLowerCase().includes(this.search.toLowerCase()) || data.tdesc.toLowerCase().includes(this.search.toLowerCase())
return match;
});
}
selectPl(data?: PLModel) {
selectPl(data?: JobcodeModel) {
if (data) {
this.pl.select = new MyPLModel(data)
this.pl.select = new MyJobcodeModel(data)
} else if (this.currentModal == 'add') {
this.pl.select = new MyPLModel()
this.pl.select = new MyJobcodeModel()
} else if (this.currentModal == 'edit') {
this.pl.select = new MyPLModel({ plId: this.pl.select.plId })
this.pl.select = new MyJobcodeModel({ jobCodeId: this.pl.select.jobCodeId })
}
}
searchChange() {
......
......@@ -59,7 +59,7 @@
<thead>
<tr>
<ng-container
*ngFor="let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ระดับพนักงาน','การจัดการ']; let f = first; let l = last; let i = index">
*ngFor="let item of ['รหัสแบบฟอร์ม','ชื่อพนักงาน','ตำแหน่ง','ลักษณะงาน','การจัดการ']; let f = first; let l = last; let i = index">
<th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700">{{ item }}</span>
......@@ -77,7 +77,7 @@
{{item.pmsMasfromEvaluationRound.pmsEvaluationRoundId}}</td>
<td>{{item.apsassessy.fname}} {{item.apsassessy.lname}}</td>
<td class="text-center">{{item.apsassessy.position.tdesc}}</td>
<td class="text-center">{{item.personalLevel.tdesc}}</td>
<td class="text-center">{{item.jd.tdesc}}</td>
<td class="flex justify-center items-center space-x-2">
<i class="ti ti-edit cursor-pointer i-gray fs-xl px-1" *ngIf="item.active" (click)="openAddRoundModel(item.pmsMasfromEvaluationRound.pmsEvaluationRoundId,item.apsassessy.employeeId,item,'form-pm-emp')" ></i>
<input type="checkbox" id="hs-small-switch{{i+1}}" [(ngModel)]="item.active" (ngModelChange)="saveAssessmentOne(item)"
......
......@@ -115,9 +115,10 @@ export class EditEvaluationFormComponent {
x.apsassessy.efname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.elname.toLowerCase().includes(this.search.toLowerCase()) ||
x.pmsMasfromEvaluationRound.pmsEvaluationRoundId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase())||
x.apsassessy.position.tdesc.toLowerCase().includes(this.search.toLowerCase())||
x.personalLevel.tdesc.toLowerCase().includes(this.search.toLowerCase())
x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.position.tdesc.toLowerCase().includes(this.search.toLowerCase()) ||
x.personalLevel.tdesc.toLowerCase().includes(this.search.toLowerCase()) ||
x.jd.tdesc.toLowerCase().includes(this.search.toLowerCase())
)
}
searchChange() {
......@@ -126,7 +127,7 @@ export class EditEvaluationFormComponent {
this.page = Array.from({ length: Math.ceil(filteredData.length / this.pageSize) }, (_, i) => i + 1);
}
saveAssessmentOne(item:PmsMasfromEvaluationFullModel) {
saveAssessmentOne(item: PmsMasfromEvaluationFullModel) {
this.pmsEvaluationAssessmentService.post(item).subscribe({
next: response => {
if (response.success) {
......@@ -135,7 +136,7 @@ export class EditEvaluationFormComponent {
}
}
})
}
}
saveAssessmentList() {
let body = this.assessmentList.filter(x => x.active == true)
if (body.length > 0) {
......@@ -177,7 +178,7 @@ export class EditEvaluationFormComponent {
console.error('Error fetching evaluation cycles:', err);
}
})
}else {
} else {
this.showAlert('กรุณาเลือกรายการ', 'error');
}
}
......
......@@ -122,14 +122,14 @@
[(ngModel)]="pmsMasfromEvaluation.select.apsPeriodEnd" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}"
[readonly]="modalStatus =='edit'">
<label for="input-label" class="ti-form-label mt-2rem">ระดับพนักงาน (JL)</label>
<div *ngFor="let item of pmsMasfromEvaluation.select.personalLevel;let i = index;let f=first;let l = last"
<label for="input-label" class="ti-form-label mt-2rem">ลักษณะงาน (JD)</label>
<div *ngFor="let item of pmsMasfromEvaluation.select.jd;let i = index;let f=first;let l = last"
class="grid grid-cols-2">
<div class="col-span-1">
<div class="flex relative">
<input type="text" class="ti-form-input pointer-events-none" readonly
[ngClass]="{'input-list-f1': f&&!l, 'input-list-c1': !f&&!l, 'input-list-l1': !f&&l, 'input-list-fl1': f&&l,'!bg-input-readonly':modalStatus == 'edit'}"
[(ngModel)]="item.plId">
[(ngModel)]="item.jobCodeId">
<div
[ngClass]="{'input-list-line-f': f&&!l, 'input-list-line-c': !f&&!l, 'input-list-line-l': !f&&l, 'input-list-line-fl': f&&l}">
<div class="input-list-line"></div>
......@@ -138,7 +138,7 @@
[ngClass]="{'input-list-f2': f&&!l, 'input-list-c2': !f&&!l, 'input-list-l2': !f&&l, 'input-list-fl2': f&&l,'!bg-input-readonly':modalStatus == 'edit'}"
[(ngModel)]="item.tdesc">
<div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<button *ngIf="item.plId && modalStatus !== 'edit'" type="button" class="flex items-center text-red-500"
<button *ngIf="item.jobCodeId && modalStatus !== 'edit'" type="button" class="flex items-center text-red-500"
(click)="pl.selectIndex=i;selectPl();">
<i class="ti ti-circle-x cursor-pointer"></i>
</button>
......@@ -149,7 +149,7 @@
<ng-component *ngTemplateOutlet="plSearchButton"></ng-component>
</div>
</div>
<div class="grid grid-cols-2" *ngIf="!pmsMasfromEvaluation.select.personalLevel.length">
<div class="grid grid-cols-2" *ngIf="!pmsMasfromEvaluation.select.jd.length">
<div class="col-span-1">
<div class="flex relative">
<input type="text" class="ti-form-input input-list-fl1 pointer-events-none" readonly>
......@@ -170,7 +170,7 @@
<i class="ri-search-line cursor-pointer text-gray"></i>
</button>
</ng-template>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JL ระบบจะทำการเลือกทั้งหมด</span>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด</span>
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close]
......@@ -207,7 +207,7 @@
<ng-template #PLModal let-modal>
<h3 mat-dialog-title>
ข้อมูลระดับพนักงาน (JL)
ข้อมูลลักษณะงาน (JD)
</h3>
<mat-dialog-content>
<div class="flex justify-end pb-1rem">
......@@ -228,7 +228,7 @@
<thead>
<tr>
<ng-container
*ngFor="let item of ['ลำดับ','รหัสระดับพนักงาน (JL)','รายละเอียดฝ่าย (ไทย)','รายละเอียดฝ่าย (อังกฤษ)']; let f = first; let l = last">
*ngFor="let item of ['ลำดับ','รหัสลักษณะงาน (JD)','รายละเอียดฝ่าย (ไทย)','รายละเอียดฝ่าย (อังกฤษ)']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" [class.!text-center]="f">
<span class="text-sm">{{ item }}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
......@@ -252,7 +252,7 @@
<td class="flex justify-center">
{{((PLsearchmodal.currentPage-1) * PLsearchmodal.pageSize)+(i+1)}}
</td>
<td>{{item.plId}}</td>
<td>{{item.jobCodeId}}</td>
<td>{{item.tdesc}}</td>
<td>{{item.edesc}}</td>
</tr>
......@@ -487,7 +487,7 @@
<label for="input-label" class="ti-form-label mt-2rem">สิ้นสุดวันที่<span class="text-danger">*</span></label>
<input type="date" id="input-label" class="ti-form-input w-1/2" [(ngModel)]="pmsMasfromEvaluation.apsPeriodEnd" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [readonly]="modalStatus =='edit'">
<label for="input-label" class="ti-form-label mt-2rem">ระดับพนักงาน (JL)</label>
<label for="input-label" class="ti-form-label mt-2rem">ลักษณะงาน (JD)</label>
<div *ngFor="let item of pmsMasfromEvaluation.personalLevel;let i = index;let f=first;let l = last"
class="grid grid-cols-2">
<div class="col-span-1">
......@@ -536,7 +536,7 @@
<i class="ri-search-line cursor-pointer text-gray"></i>
</button>
</ng-template>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JL ระบบจะทำการเลือกทั้งหมด</span>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด</span>
<div class="flex justify-end mt-2rem mb-1rem">
<button type="button"
......@@ -643,7 +643,7 @@
<div class="max-h-full overflow-hidden ti-modal-content">
<div class="ti-modal-header">
<h3 class="text-xxl font-bold text-primary">
ข้อมูลระดับพนักงาน (JL)
ข้อมูลลักษณะงาน (JD)
</h3>
<div class="flex justify-end">
<button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger"
......@@ -672,7 +672,7 @@
<thead>
<tr>
<ng-container
*ngFor="let item of ['ลำดับ','รหัสระดับพนักงาน (JL)','รายละเอียดฝ่าย(ไทย)','รายละเอียดฝ่าย(อังกฤษ)']; let f = first; let l = last">
*ngFor="let item of ['ลำดับ','รหัสลักษณะงาน (JD)','รายละเอียดฝ่าย(ไทย)','รายละเอียดฝ่าย(อังกฤษ)']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f">
<span class="text-sm">{{ item }}</span>
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output, Renderer2, ViewChild } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { PLModel, MyPLModel } from 'src/app/shared/model/pl.model';
import { MyPmsMasfromEvaluationModel, PmsMasfromEvaluationModel } from 'src/app/shared/model/pms-masfrom-evaluation.model';
import { PLService } from 'src/app/shared/services/pl.service';
import { PmsMasfromEvaluationCycleService } from 'src/app/shared/services/pms-masfrom-evaluation.service';
import { ColumnModel } from '@syncfusion/ej2-grids';
import { MatDialog } from '@angular/material/dialog';
import Swal from 'sweetalert2';
import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
export interface DataModal {
search: string,
......@@ -58,7 +58,7 @@ export class ManagementCycleComponent {
search: "",
pageSize: 10
}
pl: { loading: boolean, selectIndex: number, dataList: PLModel[] } = { loading: false, selectIndex: -1, dataList: [] }
pl: { loading: boolean, selectIndex: number, dataList: JobcodeModel[] } = { loading: false, selectIndex: -1, dataList: [] }
currentDate = new Date()
yearList = [
......@@ -117,7 +117,7 @@ export class ManagementCycleComponent {
private dialog: MatDialog,
private cdr: ChangeDetectorRef,
private renderer: Renderer2,
private pLService: PLService
private jobcodeService: JobcodeService
) { }
ngOnInit(): void {
......@@ -137,9 +137,9 @@ export class ManagementCycleComponent {
getPlList() {
this.pl.loading = false
this.pLService.getList().subscribe({
this.jobcodeService.getGroupAssessmentList().subscribe({
next: response => {
this.pl.dataList = response.map((x: any) => new MyPLModel(x))
this.pl.dataList = response.map((x: any) => new MyJobcodeModel(x))
this.pl.loading = false
// this.searchChange()
this.cdr.detectChanges()
......@@ -151,10 +151,10 @@ export class ManagementCycleComponent {
}
plListFilter() {
return this.pl.dataList.filter(x =>
(x.plId.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase()) ||
(x.jobCodeId.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase()) ||
x.tdesc.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.PLsearchmodal.search.toLowerCase())) &&
!this.pmsMasfromEvaluation.select.personalLevel.some(y => y.plId == x.plId)
!this.pmsMasfromEvaluation.select.jd.some(y => y.jobCodeId == x.jobCodeId)
);
}
......@@ -162,12 +162,12 @@ export class ManagementCycleComponent {
this.PLsearchmodal.currentPage = 1
this.PLsearchmodal.page = Array.from({ length: Math.ceil(this.plListFilter().length / 10) }, (_, i) => i + 1);
}
selectPl(data?: PLModel) {
selectPl(data?: JobcodeModel) {
if (!data) {
this.pmsMasfromEvaluation.select.personalLevel.splice(this.pl.selectIndex, 1);
this.pmsMasfromEvaluation.select.jd.splice(this.pl.selectIndex, 1);
return;
}
this.pmsMasfromEvaluation.select.personalLevel.push(new MyPLModel(data))
this.pmsMasfromEvaluation.select.jd.push(new MyJobcodeModel(data))
}
......@@ -198,7 +198,7 @@ export class ManagementCycleComponent {
} else if (this.modalStatus == 'add') {
this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel()
} else if (this.modalStatus == 'edit') {
this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel({ pmsEvaluationRoundId: this.pmsMasfromEvaluation.select.pmsEvaluationRoundId })
this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel(this.pmsMasfromEvaluation.select)
}
}
......@@ -217,7 +217,7 @@ export class ManagementCycleComponent {
reverseButtons: true,
}).then((result) => {
if (result.isConfirmed) {
if (this.pmsMasfromEvaluation.select.personalLevel.length === 0) {
if (this.pmsMasfromEvaluation.select.jd.length === 0) {
this.plListFilter().forEach(x => this.selectPl(x));
}
const body = new MyPmsMasfromEvaluationModel(this.pmsMasfromEvaluation.select);
......@@ -299,7 +299,7 @@ export class ManagementCycleComponent {
if (this.modalStatus == 'add') {
this.setData()
} else if (this.modalStatus == 'edit') {
this.setData(new MyPmsMasfromEvaluationModel({ pmsEvaluationRoundId: this.pmsMasfromEvaluation.select.pmsEvaluationRoundId }))
this.setData(new MyPmsMasfromEvaluationModel(this.pmsMasfromEvaluation.select))
}
}
......
import { AppraisalFormModel, MyAppraisalFormModel } from "./appraisal-form.model"
import { EmployeeModel, MyEmployeeModel } from "./employee.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model"
import { JobcodeModel, MyJobcodeModel } from "./jobcode.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface AppraisalModel {
personalLevel: PLModel
jd: JobcodeModel
masfromEvaluationRound: EvaluationCycleModel
companyId: string
active: boolean
......@@ -19,6 +21,7 @@ export interface AppraisalModel {
}
export class MyAppraisalModel implements AppraisalModel {
personalLevel: PLModel
jd: JobcodeModel
masfromEvaluationRound: EvaluationCycleModel
companyId: string
active: boolean
......@@ -32,6 +35,7 @@ export class MyAppraisalModel implements AppraisalModel {
masfromEvaluationAssessment1: AppraisalFormModel[]
constructor(data?: Partial<AppraisalModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.jd = new MyJobcodeModel(data?.jd)
this.masfromEvaluationRound = new MyEvaluationCycleModel(data?.masfromEvaluationRound)
this.companyId = data?.companyId || ""
this.active = data?.active ?? false
......
......@@ -2,7 +2,6 @@ export interface CompetencyModel {
competency: Competency[]
idp: Idp
pms: Pms
statusAll: string
evaluationRoundId: string
tdesc: string
edesc: string
......@@ -875,8 +874,8 @@ export interface BehavioralIndicatorsList {
}
export interface CompetencyBehavioral {
scoreTopicExpectationBoss: number
scoreTopicExpectation: number
scoreTopicExpectationEmp: number
companyId: string
}
......
import { JobcodeModel, MyJobcodeModel } from "./jobcode.model";
import { MyPLModel, PLModel } from "./pl.model";
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model";
import { MyStatusFromModel, StatusFromModel } from "./status-from.model";
......@@ -13,6 +15,7 @@ export interface EvaluationCycleModel {
statusCode: StatusCodeModel
statusFrom: StatusFromModel
personalLevel: PLModel[]
jd: JobcodeModel[]
jlId: string
active: number
}
......@@ -28,6 +31,7 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel {
statusCode: StatusCodeModel
statusFrom: StatusFromModel
personalLevel: PLModel[]
jd: JobcodeModel[]
jlId: string
active: number
constructor(data?: Partial<EvaluationCycleModel>) {
......@@ -43,6 +47,7 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel {
this.statusCode = new MyStatusCodeModel(data?.statusCode || {})
this.statusFrom = new MyStatusFromModel(data?.statusFrom || {})
this.personalLevel = data?.personalLevel?.map(x => new MyPLModel(x)) || []
this.jd = data?.jd?.map(x => new MyJobcodeModel(x)) || []
}
}
import { EmployeeModel, MyEmployeeModel } from "./employee.model";
import { JobcodeModel, MyJobcodeModel } from "./jobcode.model";
import { MyPLModel, PLModel } from "./pl.model";
export interface GroupApproveModel {
personalLevel: PLModel;
jd: JobcodeModel;
apsassessy: EmployeeModel;
companyId: string;
apsapprove1: EmployeeModel;
......@@ -16,6 +18,7 @@ export interface GroupApproveModel {
export class MyGroupApproveModel implements GroupApproveModel {
personalLevel: PLModel;
jd: JobcodeModel;
apsassessy: EmployeeModel
companyId: string;
apsapprove1: EmployeeModel;
......@@ -25,6 +28,7 @@ export class MyGroupApproveModel implements GroupApproveModel {
apsapprove5: EmployeeModel;
constructor(data: Partial<GroupApproveModel> = {}) {
this.personalLevel = new MyPLModel(data.personalLevel || {});
this.jd = new MyJobcodeModel(data.jd || {});
this.apsassessy = new MyEmployeeModel(data.apsassessy || {})
this.companyId = data.companyId || '';
this.apsapprove1 = new MyEmployeeModel(data.apsapprove1 || {});
......
import { GroupAssessment1ListModel, MyGroupAssessment1ListModel } from "./group-assessment1-list.model"
import { JobcodeModel, MyJobcodeModel } from "./jobcode.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface GroupAssessmentModel {
personalLevel: PLModel
jd: JobcodeModel
companyId: string
groupAssessment1List: GroupAssessment1ListModel[]
}
......@@ -10,10 +12,12 @@ export interface GroupAssessmentModel {
export class MyGroupAssessmentModel implements GroupAssessmentModel {
personalLevel: PLModel
jd: JobcodeModel
companyId: string
groupAssessment1List: GroupAssessment1ListModel[]
constructor(data?: Partial<GroupAssessmentModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel || {})
this.jd = new MyJobcodeModel(data?.jd || {})
this.companyId = data?.companyId || ""
this.groupAssessment1List = data?.groupAssessment1List?.map(x => new MyGroupAssessment1ListModel(x)) || []
}
......
......@@ -3,12 +3,15 @@ import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1Mi
export interface GroupAssessment1ListModel {
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
jlId: string
}
export class MyGroupAssessment1ListModel implements GroupAssessment1ListModel {
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
jlId: string
constructor(data?: Partial<GroupAssessment1ListModel>) {
this.competencyIndicatorsCourses1Mini = new MyCompetencyIndicatorsCourses1MiniModel(data?.competencyIndicatorsCourses1Mini || {})
this.companyId = data?.companyId || ""
this.jlId = data?.jlId || ""
}
}
export interface JobcodeModel {
jobCodeId: string
tdesc: string
edesc: string
companyId: string
statusCom: boolean
statusPms: boolean
}
export class MyJobcodeModel implements JobcodeModel {
jobCodeId: string
tdesc: string
edesc: string
companyId: string
statusCom: boolean
statusPms: boolean
constructor(data?: Partial<JobcodeModel>) {
this.jobCodeId = data?.jobCodeId || ""
this.tdesc = data?.tdesc || ""
this.edesc = data?.edesc || ""
this.companyId = data?.companyId || ""
this.statusCom = data?.statusCom ?? false
this.statusPms = data?.statusPms ?? false
}
}
import { JobcodeModel, MyJobcodeModel } from "./jobcode.model"
import { MyPLModel, PLModel } from "./pl.model"
import { MyPmsGroupAssessment1Model, PmsGroupAssessment1Model } from "./pms-group-assessment1.model"
export interface PmsGroupAssessmentModel {
personalLevel: PLModel
jd: JobcodeModel
companyId: string
pmsGroupAssessment1List: PmsGroupAssessment1Model[]
}
......@@ -10,10 +12,12 @@ export interface PmsGroupAssessmentModel {
export class MyPmsGroupAssessmentModel implements PmsGroupAssessmentModel {
personalLevel: PLModel
jd: JobcodeModel
companyId: string
pmsGroupAssessment1List: PmsGroupAssessment1Model[]
constructor(data?: Partial<PmsGroupAssessmentModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.jd = new MyJobcodeModel(data?.jd)
this.companyId = data?.companyId || ""
this.pmsGroupAssessment1List = data?.pmsGroupAssessment1List?.map(x => new MyPmsGroupAssessment1Model(x)) || []
}
......
import { JobcodeModel } from "./jobcode.model"
export interface PmsMasfromEvaluationFullModel {
personalLevel: PersonalLevel
jd: JobcodeModel
pmsMasfromEvaluationRound: PmsMasfromEvaluationRoundModel
companyId?: string
active?: boolean
......
import { JobcodeModel, MyJobcodeModel } from "./jobcode.model";
import { PLModel, MyPLModel } from "./pl.model";
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model";
import { MyStatusFromModel, StatusFromModel } from "./status-from.model";
......@@ -14,6 +15,7 @@ export interface PmsMasfromEvaluationModel {
statusFrom: StatusFromModel
active: number
personalLevel: PLModel[]
jd: JobcodeModel[]
}
export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
......@@ -28,6 +30,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
statusFrom: StatusFromModel
active: number
personalLevel: PLModel[]
jd: JobcodeModel[]
constructor(data?: Partial<PmsMasfromEvaluationModel>) {
this.pmsEvaluationRoundId = data?.pmsEvaluationRoundId || "";
this.companyId = data?.companyId || "";
......@@ -40,6 +43,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
this.statusCode = new MyStatusCodeModel(data?.statusCode)
this.statusFrom = new MyStatusFromModel(data?.statusFrom || {})
this.personalLevel = data?.personalLevel?.map(x => new MyPLModel(x)) || []
this.jd = data?.jd?.map(x => new MyJobcodeModel(x)) || []
}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { AlertModel } from '../model/alert.model';
import { JobcodeModel } from '../model/jobcode.model';
@Injectable({
providedIn: 'root'
})
export class JobcodeService {
api = "/jobcode"
urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) {
}
getById(plId: string): Observable<JobcodeModel> {
return this.http.get<JobcodeModel>(this.urlApi + "/" + plId)
}
getList(): Observable<JobcodeModel[]> {
return this.http.get<JobcodeModel[]>(this.urlApi + "/lists")
}
getGroupAssessmentList(): Observable<JobcodeModel[]> {
return this.http.get<JobcodeModel[]>(this.urlApi + "/group-assessment/lists")
}
post(body: JobcodeModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body)
}
delete(body: JobcodeModel | JobcodeModel[]): Observable<AlertModel> {
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
body: body
};
return this.http.delete<AlertModel>(this.urlApi, options)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment