Commit deaf15f9 by Nakarin Luankla

การประเมินจัดการประสิทธิภาพ

รอบการประเมิน PMS
parent fd68d956
......@@ -183,7 +183,8 @@ export class EditDefineDocumentFormComponent {
this.empassessmentRoundList = response
this.empassessmentRoundListCheckbox = this.empassessmentRoundList.map(item => ({ checkbox: false, item }))
this.checkTopic();
this.searchEmpassessmentListFilterChange()
this.searchEmpassessmentListFilterChange();
this.getIndicators();
this.cdr.detectChanges();
},
error: err => {
......@@ -341,7 +342,7 @@ export class EditDefineDocumentFormComponent {
this.apsassessy = apsassessy
this.getApsassessy()
this.getApsassessyMini();
this.getIndicators();
}
......
......@@ -153,6 +153,8 @@ import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
import { DayTypeRegistryComponent } from '../company-components/day-type-registry/day-type-registry.component';
import { EventgrpService } from 'src/app/shared/services/eventgrp.service';
import { PmsEvaluationCycleService } from 'src/app/shared/services/pms-evaluation-cycle.service';
import { PmsEvaluationAssessmentService } from 'src/app/shared/services/pms-evaluation-assessment.service';
export const MY_DATE_FORMATS = {
parse: {
......@@ -336,6 +338,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
EvaluationAssessmentService,
AppraisalService,
EventgrpService,
PmsEvaluationCycleService,
PmsEvaluationAssessmentService,
{
provide: HTTP_INTERCEPTORS,
useClass: HttpRequestInterceptor,
......
......@@ -74,12 +74,12 @@
<tr
*ngFor="let item of assessmentListFilter() | slice:((currentPage-1) * this.pageSize) : (((currentPage-1) * this.pageSize) + this.pageSize);let i = index">
<td class="flex justify-center items-center">
{{item.masfromEvaluationRound.evaluationRoundId}}</td>
{{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="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>
<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"
class="ti-switch checked:bg-none checked:bg-green-600 checked:hover:bg-green-600 checked:focus:bg-green-600 focus:border-green-600 dark:checked:bg-green-600 checked:before:bg-green-200 dark:checked:before:bg-green-200 shrink-0 w-11 h-6 before:w-5 before:h-5">
</td>
......@@ -169,12 +169,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 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly value="{{selectEmp.masfromEvaluationRound.evaluationRoundId}}">
readonly value="{{selectEmp?.pmsMasfromEvaluationRound?.pmsEvaluationRoundId}}">
</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 rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly value="{{selectEmp.apsassessy.fname}} {{selectEmp.apsassessy.lname}}">
readonly value="{{selectEmp?.apsassessy?.fname}} {{selectEmp?.apsassessy?.lname}}">
</div>
</div>
</div>
......@@ -238,9 +238,9 @@
<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"
[class.!text-center]="f || l || item === 'ระดับความหวัง'">
[class.!text-center]="f || l || item === 'ประเภท'">
<span class="text-sm">{{ item }}</span>
</th>
</ng-container>
......@@ -267,14 +267,15 @@
<tr *ngFor="let item of empassessmentListFilter() | slice:((currentPageRound-1) * pageSizeRound) : (((currentPageRound-1) * pageSizeRound) + pageSizeRound);let i = index">
<td class="text-center">
<input type="checkbox" class="ti-form-checkbox cursor-pointer"
id="checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}" [(ngModel)]="item.checkbox" (change)="checkempassessmentRoundListCheckbox()">
id="checkbox-{{item.item.groupAssessment1.pmsTopic.pmsTopicId}}" [(ngModel)]="item.checkbox" (change)="checkempassessmentRoundListCheckbox()">
</td>
<td>
<label
for="checkbox-{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}">{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}</label>
for="checkbox-{{item.item.groupAssessment1.pmsTopic.pmsTopicId}}">{{item.item.groupAssessment1.pmsTopic.pmsTopicId}}</label>
</td>
<td >{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}</td>
<td class="!text-center">{{item.item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}</td>
<td >{{item.item.groupAssessment1.pmsTopic.tdesc}}</td>
<td class="!text-center">{{item.item.groupAssessment1.pmsTopic.pmsType.tdesc}}</td>
<td class="!text-center"><input type="text" class="form-control" oninput="this.value = this.value.replace(/[^0-9]/g, '')" [(ngModel)]="item.item.weight" style="width: 60px;"></td>
<td class="flex justify-center">
<i class="ti ti-trash cursor-pointer i-gray fs-l px-1" (click)="deleteFormOne(item.item);"></i>
</td>
......@@ -381,7 +382,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"
[class.!text-center]="f||l">
<span class="text-sm">{{ item }}</span>
......@@ -409,9 +410,9 @@
</thead>
<tbody>
<tr *ngFor="let item of filterIndicators() | slice:((currentPageIndicator-1) * pageSizeIndicator) : (((currentPageIndicator-1) * pageSizeIndicator) + pageSizeIndicator);let i = index">
<td>{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId}}</td>
<td >{{item.groupAssessment1.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.tdesc}}</td>
<td class="!text-center">{{item.groupAssessment1.competencyIndicatorsCourses1Mini.lineNo}}</td>
<td>{{item.groupAssessment1.pmsTopic.pmsTopicId}}</td>
<td >{{item.groupAssessment1.pmsTopic.tdesc}}</td>
<td class="!text-center">{{item.groupAssessment1.pmsTopic.pmsType.tdesc}}</td>
<td class="flex justify-center">
<div class="px-1">
<button type="button" (click)="addIndicators(item)"
......
......@@ -9,6 +9,7 @@ export interface PmsMasfromEvaluationModel {
apsPeriodStart: string
apsPeriodEnd: string
statusCode: StatusCodeModel
active: boolean
}
export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
......@@ -20,6 +21,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
apsPeriodStart: string
apsPeriodEnd: string
statusCode: StatusCodeModel
active: boolean
constructor(data?: Partial<PmsMasfromEvaluationModel>) {
this.pmsEvaluationRoundId = data?.pmsEvaluationRoundId || "";
this.companyId = data?.companyId || "";
......@@ -28,6 +30,7 @@ export class MyPmsMasfromEvaluationModel implements PmsMasfromEvaluationModel {
this.apsyear = data?.apsyear || "";
this.apsPeriodStart = data?.apsPeriodStart || "";
this.apsPeriodEnd = data?.apsPeriodEnd || "";
this.active = data?.active || false
this.statusCode = new MyStatusCodeModel(data?.statusCode)
}
......
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 { EvaluationCycleModel } from '../model/evaluation-cycle.model';
import { AppraisalModel } from '../model/appraisal.model';
import { AppraisalRoundModel } from '../model/appraisal-aps.model';
import { EvaluationModal } from '../model/evaluation-form.modal';
import { PmsMasfromEvaluationModel } from '../model/pms-masfrom-evaluation.model';
import { MasfromEvaluationAssessment1lList, PmsMasfromEvaluationFullModel } from '../model/pms-masfrom-evaluation-list.model';
@Injectable({
providedIn: 'root'
})
export class PmsEvaluationAssessmentService {
api = "/pms-evaluation-assessment"
urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) {
}
getList(): Observable<EvaluationCycleModel[]> {
return this.http.get<EvaluationCycleModel[]>(this.urlApi + "/lists")
}
getById(evaluationRoundId: string): Observable<PmsMasfromEvaluationFullModel[]> {
return this.http.get<PmsMasfromEvaluationFullModel[]>(this.urlApi + "/" + evaluationRoundId)
}
getApsassessy(evaluationRoundId: string,apsassessy:string): Observable<EvaluationModal> {
return this.http.get<EvaluationModal>(this.urlApi + "/" + evaluationRoundId+"/"+apsassessy)
}
getApsassessyMini(evaluationRoundId: string,apsassessy:string): Observable<MasfromEvaluationAssessment1lList[]> {
return this.http.get<MasfromEvaluationAssessment1lList[]>(this.urlApi + "/mini/" + evaluationRoundId+"/"+apsassessy)
}
getIndicators(plId: string): Observable<MasfromEvaluationAssessment1lList[]> {
return this.http.get<MasfromEvaluationAssessment1lList[]>(this.urlApi + "/pms-topic/list/" + plId)
}
post(body: AppraisalModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body)
}
postList(body:any): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi+"/create-list", body)
}
delete(body: EvaluationCycleModel | EvaluationCycleModel[]): Observable<AlertModel> {
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
body: body
};
return this.http.delete<AlertModel>(this.urlApi, options)
}
deletemMini(body: AppraisalRoundModel[],apsassessy:string,evaluationRoundId:string): Observable<AlertModel> {
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
body: body
};
return this.http.delete<AlertModel>(this.urlApi+'/delete-mini'+"/"+apsassessy+"/"+evaluationRoundId, options)
}
}
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 { EvaluationCycleModel } from '../model/evaluation-cycle.model';
@Injectable({
providedIn: 'root'
})
export class PmsEvaluationCycleService {
api = "/pms-evaluation-round"
urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) {
}
getList(): Observable<EvaluationCycleModel[]> {
return this.http.get<EvaluationCycleModel[]>(this.urlApi + "/lists")
}
getById(evaluationRoundId: string): Observable<EvaluationCycleModel> {
return this.http.get<EvaluationCycleModel>(this.urlApi + "/" + evaluationRoundId)
}
getApsassessy(evaluationRoundId: string,apsassessy:string): Observable<EvaluationCycleModel> {
return this.http.get<EvaluationCycleModel>(this.urlApi + "/" + evaluationRoundId+"/"+apsassessy)
}
post(body: EvaluationCycleModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body)
}
delete(body: EvaluationCycleModel | EvaluationCycleModel[]): Observable<AlertModel> {
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
body: body
};
return this.http.delete<AlertModel>(this.urlApi, options)
}
}
......@@ -31,4 +31,18 @@ export class PmsMasfromEvaluationCycleService {
};
return this.http.delete<AlertModel>(this.urlApi, options)
}
getApsassessy(evaluationRoundId: string, apsassessy: string): Observable<any> {
return this.http.get<any>(this.urlApi + "/" + evaluationRoundId + "/" + apsassessy)
}
getApsassessyMini(evaluationRoundId: string, apsassessy: string): Observable<any[]> {
return this.http.get<any[]>(this.urlApi + "/mini/" + evaluationRoundId + "/" + apsassessy)
}
postList(body: any): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi + "/create-list", body)
}
getIndicators(plId: string): Observable<any[]> {
return this.http.get<any[]>(this.urlApi + "/indicators/list/" + plId)
}
}
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