Commit 75bd6ae0 by Nattana Chaiyamat

การประเมินจัดการประสิทธิภาพ > ทะเบียนกำหนดชื่อ > หัวข้อการประเมิน

parent 56cf33d3
......@@ -150,6 +150,7 @@ import { PmsGradeRegistrationComponent } from '../performance-management-evaluat
import { PmsGradeManagementComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-grade-management.component';
import { PmsSubGradeRegistrationComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-sub-grade-registration/pms-sub-grade-registration.component';
import { PmsGroupGradeComponent } from '../performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-group-grade/pms-group-grade.component';
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
export const MY_DATE_FORMATS = {
parse: {
......@@ -330,6 +331,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsMasfromEvaluationCycleService,
PmsGroupGradeService,
PmsSettingAssessmentService,
AppraisalService,
{
provide: HTTP_INTERCEPTORS,
useClass: HttpRequestInterceptor,
......
......@@ -35,30 +35,30 @@
<div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div>
<div class="col-span-1 text-secondary">รหัสพนักงาน</div>
<div class="col-span-2">20220064</div>
<div class="col-span-2">{{employee.data.employeeId}}</div>
<div class="col-span-1 text-secondary">ตำเเหน่ง</div>
<div class="col-span-6">Customer Service Officer - Chain Store</div>
<div class="col-span-6">{{employee.data.position.tdesc}}</div>
</div>
<div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div>
<div class="col-span-1 text-secondary">ชื่อ - สกุล</div>
<div class="col-span-2">อนันท์ ว่อง</div>
<div class="col-span-2">{{employee.data.thFullName}}</div>
<div class="col-span-1 text-secondary">ฝ่าย</div>
<div class="col-span-6">ฝ่ายปฏิบัติการ</div>
<div class="col-span-6">{{employee.data.bu1.tdesc}}</div>
</div>
<div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div>
<div class="col-span-1 text-secondary">แผนก</div>
<div class="col-span-2">แผนกบริการลูกค้า</div>
<div class="col-span-2">{{employee.data.bu2.tdesc}}</div>
<div class="col-span-1 text-secondary">ส่วน</div>
<div class="col-span-6">ส่วนงานบริการลูกค้า-Chain Store</div>
<div class="col-span-6">{{employee.data.bu3.tdesc}}</div>
</div>
<div class="p-2 grid grid-cols-12">
<div class="col-span-2"></div>
<div class="col-span-1 text-secondary">ส่วนย่อย</div>
<div class="col-span-2">-</div>
<div class="col-span-2">{{employee.data.bu4.tdesc}}</div>
<div class="col-span-1 text-secondary">ส่วนย่อย 1 </div>
<div class="col-span-6">-</div>
<div class="col-span-6">{{employee.data.bu5.tdesc}}</div>
</div>
</div>
<div class="pb-2">
......@@ -83,29 +83,29 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="!dataListFilter().length">
<tbody *ngIf="!appraisalCompentencyFilter().length">
<tr>
<td class="text-center" colspan="100%">
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody *ngIf="dataListFilter().length">
<tr *ngFor="let item of dataListFilter();let i = index">
<tbody *ngIf="appraisalCompentencyFilter().length">
<tr *ngFor="let item of appraisalCompentencyFilter();let i = index">
<td class="flex justify-center items-center">
{{item.code}}
{{item.data.masfromEvaluationRoundModel.evaluationRoundId}}
</td>
<td>
{{item.name}}
{{item.data.masfromEvaluationRoundModel.tdesc}}
</td>
<td>
{{item.startDate}}
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodStart)}}
</td>
<td>
{{item.endDate}}
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodEnd)}}
</td>
<td>
{{item.status}}
{{item.data.masfromStatusType.tdesc}}
</td>
<td class="flex justify-center items-center">
<span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer"
......@@ -140,29 +140,29 @@
</ng-container>
</tr>
</thead>
<tbody *ngIf="!dataList2Filter().length">
<tbody *ngIf="!appraisalPmsFilter().length">
<tr>
<td class="text-center" colspan="100%">
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody *ngIf="dataList2Filter().length">
<tr *ngFor="let item of dataList2Filter();let i = index">
<tbody *ngIf="appraisalPmsFilter().length">
<tr *ngFor="let item of appraisalPmsFilter();let i = index">
<td class="flex justify-center items-center">
{{item.code}}
{{item.data.masfromEvaluationRoundModel.evaluationRoundId}}
</td>
<td>
{{item.name}}
{{item.data.masfromEvaluationRoundModel.tdesc}}
</td>
<td>
{{item.startDate}}
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodStart)}}
</td>
<td>
{{item.endDate}}
{{convertDate(item.data.masfromEvaluationRoundModel.apsPeriodEnd)}}
</td>
<td>
{{item.status}}
{{item.data.masfromStatusType.tdesc}}
</td>
<td class="flex justify-center items-center">
<span class="rounded-md bg-success text-white px-3 py-1 cursor-pointer">
......
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { ChangeDetectorRef, Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { AppraisalModel, MyAppraisalModel } from 'src/app/shared/model/appraisal.model';
import { EmployeeModel, MyEmployeeModel } from 'src/app/shared/model/employee.model';
import { AppraisalService } from 'src/app/shared/services/appraisal.service';
import { EmployeeService } from 'src/app/shared/services/employee.service';
import Swal from 'sweetalert2';
export interface DataModel {
code: string,
name: string,
startDate: string,
endDate: string,
status: string
}
export interface Data2Model {
code: string,
name: string,
......@@ -29,39 +25,6 @@ export class SelfEvaluationComponent implements OnInit {
pathTitle = ['การประเมินผล', 'ประเมินตนเอง']
dataList: DataModel[] = [
{
code: "CC",
name: "การประเมินผลการปฏิบัติงาน (performance-evaluation)",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
},
{
code: "MC",
name: "การประเมินศักยภาพ (Potential Evaluation)",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
},
{
code: "PC",
name: "การประเมินประสิทธิภาพขององค์กร (Organizational Effectiveness Evaluation)",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
}
]
dataList2: DataModel[] = [
{
code: "KPI",
name: "Performance Management System",
startDate: "1 ตุลาคม 2567",
endDate: "30 ตุลาคม 2567",
status: "ยังไม่ประเมิน"
}
]
hoveredCode: string | null = null;
dataList3: Data2Model[] = [
{
......@@ -128,14 +91,65 @@ export class SelfEvaluationComponent implements OnInit {
@ViewChild('selfEvaluation1_2', { static: true }) selfEvaluation1_2!: TemplateRef<any>;
@ViewChild('selfEvaluation1_2Edit', { static: true }) selfEvaluation1_2Edit!: TemplateRef<any>;
currentTemplate: TemplateRef<any> = this.selfEvaluation1_2
appraisalCompentency: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
appraisalPms: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
employee: { loading: boolean, data: EmployeeModel } = { loading: false, data: new MyEmployeeModel() }
appraisalCompentencyForm: { loading: boolean, select: AppraisalModel, dataList: { check: boolean, data: AppraisalModel }[] } = { loading: false, select: new MyAppraisalModel(), dataList: [] }
constructor(private appraisalService: AppraisalService,
private employeeService: EmployeeService,
private cdr: ChangeDetectorRef
) {
}
ngOnInit(): void {
this.currentTemplate = this.selfEvaluation1_2
this.getProfile()
this.getAppraisalCompentencyList()
}
dataListFilter() {
return this.dataList
getProfile() {
this.employee.loading = true
this.employeeService.getProfile().subscribe({
next: response => {
this.employee.data = new MyEmployeeModel(response)
this.employee.loading = false
this.cdr.detectChanges()
}, error: error => {
this.employee.loading = false
this.cdr.detectChanges()
}
})
}
getAppraisalCompentencyList() {
this.appraisalCompentency.loading = true
this.appraisalService.getList().subscribe({
next: response => {
this.appraisalCompentency.dataList = response.map(x => ({ check: false, data: new MyAppraisalModel(x) }))
this.appraisalCompentency.loading = false
this.cdr.detectChanges()
}, error: error => {
this.appraisalCompentency.loading = false
this.cdr.detectChanges()
}
})
}
dataList2Filter() {
return this.dataList2
appraisalCompentencyFilter() {
return this.appraisalCompentency.dataList
}
getAppraisalCompentencyFrom() {
this.appraisalCompentency.loading = true
this.appraisalService.getList().subscribe({
next: response => {
this.appraisalCompentency.dataList = response.map(x => ({ check: false, data: new MyAppraisalModel(x) }))
this.appraisalCompentency.loading = false
this.cdr.detectChanges()
}, error: error => {
this.appraisalCompentency.loading = false
this.cdr.detectChanges()
}
})
}
appraisalPmsFilter() {
return this.appraisalPms.dataList
}
dataList3Filter() {
return this.dataList3
......@@ -196,4 +210,10 @@ export class SelfEvaluationComponent implements OnInit {
}
});
}
convertDate(dateString: string): string {
const date = new Date(dateString);
return date.toLocaleDateString('th-TH', { day: 'numeric', month: 'long', year: 'numeric' });
}
}
......@@ -158,7 +158,11 @@ export class AssigningApproversComponent {
this.page = Array.from({ length: Math.ceil(this.groupapprove_listFilter().length / 10) }, (_, i) => i + 1);
}
groupapprove_listFilter() {
return this.groupapprove_list.filter(x => x.apsapprove1.employeeId || x.apsapprove2.employeeId || x.apsapprove3.employeeId || x.apsapprove4.employeeId || x.apsapprove5.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
return this.groupapprove_list.filter(x => x.apsapprove1.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove4.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove5.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove1.fname || x.apsapprove1.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.fname || x.apsapprove2.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.fname || x.apsapprove3.lname.toLowerCase().includes(this.search.toLowerCase()) ||
......
......@@ -228,6 +228,27 @@
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.indicatorsDetail">
<label class="ti-form-label mt-2rem">เป้าหมายผลงาน</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.performanceGoalsDetail">
<label class="ti-form-label mt-2rem">ค่าเป้าหมาย</label>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">A (5 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetAdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">B (4 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetBdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">C (3 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetCdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">D (2 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetDdetail">
</div>
<div class="grid grid-cols-12 gap-x-2 mt-2rem">
<label class="ti-form-label col-span-3 align-center m-0">F (1 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetFdetail">
</div>
<div class="flex justify-end mt-2rem mb-1rem">
<button type="button"
class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
......
import { EmployeeModel, MyEmployeeModel } from "./employee.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model"
import { MasfromEvaluationAssessment1Model, MyMasfromEvaluationAssessment1Model } from "./masfrom-evaluation-assessment1.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface AppraisalFromModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1Model[]
}
export class MyAppraisalFromModel implements AppraisalFromModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1Model[]
constructor(data?: Partial<AppraisalFromModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.masfromEvaluationRoundModel = new MyEvaluationCycleModel(data?.masfromEvaluationRoundModel)
this.companyId = data?.companyId || ""
this.fromDetail = data?.fromDetail || ""
this.apsassessy = new MyEmployeeModel(data?.apsassessy)
this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1)
this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2)
this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3)
this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4)
this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5)
this.apsassessyStatus = data?.apsassessyStatus || ""
this.apsapprove1Status = data?.apsapprove1Status || ""
this.apsapprove2Status = data?.apsapprove2Status || ""
this.apsapprove3Status = data?.apsapprove3Status || ""
this.apsapprove4Status = data?.apsapprove4Status || ""
this.apsapprove5Status = data?.apsapprove5Status || ""
this.targetScore1 = data?.targetScore1 ?? 0
this.targetScore2 = data?.targetScore2 ?? 0
this.targetScore3 = data?.targetScore3 ?? 0
this.targetScore4 = data?.targetScore4 ?? 0
this.targetScore5 = data?.targetScore5 ?? 0
this.weightedTotal = data?.weightedTotal ?? 0
this.averageScore = data?.averageScore ?? 0
this.apsapprove1Comment = data?.apsapprove1Comment || ""
this.apsapprove2Comment = data?.apsapprove2Comment || ""
this.apsapprove3Comment = data?.apsapprove3Comment || ""
this.apsapprove4Comment = data?.apsapprove4Comment || ""
this.apsapprove5Comment = data?.apsapprove5Comment || ""
this.evaluationResults = data?.evaluationResults || ""
this.sumEvaluationResults = data?.sumEvaluationResults || ""
this.masfromEvaluationAssessment1lList = data?.masfromEvaluationAssessment1lList?.map(x => new MyMasfromEvaluationAssessment1Model(x)) || []
}
}
import { EmployeeModel, MyEmployeeModel } from "./employee.model"
import { EvaluationCycleModel, MyEvaluationCycleModel } from "./evaluation-cycle.model"
import { MyPLModel, PLModel } from "./pl.model"
import { MyStatusCodeModel, StatusCodeModel } from "./status-code.model"
export interface AppraisalModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
masfromStatusType: StatusCodeModel
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
}
export class MyAppraisalModel implements AppraisalModel {
personalLevel: PLModel
masfromEvaluationRoundModel: EvaluationCycleModel
companyId: string
masfromStatusType: StatusCodeModel
fromDetail: string
apsassessy: EmployeeModel
apsapprove1: EmployeeModel
apsapprove2: EmployeeModel
apsapprove3: EmployeeModel
apsapprove4: EmployeeModel
apsapprove5: EmployeeModel
apsassessyStatus: string
apsapprove1Status: string
apsapprove2Status: string
apsapprove3Status: string
apsapprove4Status: string
apsapprove5Status: string
targetScore1: number
targetScore2: number
targetScore3: number
targetScore4: number
targetScore5: number
weightedTotal: number
averageScore: number
apsapprove1Comment: string
apsapprove2Comment: string
apsapprove3Comment: string
apsapprove4Comment: string
apsapprove5Comment: string
evaluationResults: string
sumEvaluationResults: string
constructor(data?: Partial<AppraisalModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.masfromEvaluationRoundModel = new MyEvaluationCycleModel(data?.masfromEvaluationRoundModel)
this.companyId = data?.companyId || ""
this.masfromStatusType = new MyStatusCodeModel(data?.masfromStatusType)
this.fromDetail = data?.fromDetail || ""
this.apsassessy = new MyEmployeeModel(data?.apsassessy)
this.apsapprove1 = new MyEmployeeModel(data?.apsapprove1)
this.apsapprove2 = new MyEmployeeModel(data?.apsapprove2)
this.apsapprove3 = new MyEmployeeModel(data?.apsapprove3)
this.apsapprove4 = new MyEmployeeModel(data?.apsapprove4)
this.apsapprove5 = new MyEmployeeModel(data?.apsapprove5)
this.apsassessyStatus = data?.apsassessyStatus || ""
this.apsapprove1Status = data?.apsapprove1Status || ""
this.apsapprove2Status = data?.apsapprove2Status || ""
this.apsapprove3Status = data?.apsapprove3Status || ""
this.apsapprove4Status = data?.apsapprove4Status || ""
this.apsapprove5Status = data?.apsapprove5Status || ""
this.targetScore1 = data?.targetScore1 ?? 0
this.targetScore2 = data?.targetScore2 ?? 0
this.targetScore3 = data?.targetScore3 ?? 0
this.targetScore4 = data?.targetScore4 ?? 0
this.targetScore5 = data?.targetScore5 ?? 0
this.weightedTotal = data?.weightedTotal ?? 0
this.averageScore = data?.averageScore ?? 0
this.apsapprove1Comment = data?.apsapprove1Comment || ""
this.apsapprove2Comment = data?.apsapprove2Comment || ""
this.apsapprove3Comment = data?.apsapprove3Comment || ""
this.apsapprove4Comment = data?.apsapprove4Comment || ""
this.apsapprove5Comment = data?.apsapprove5Comment || ""
this.evaluationResults = data?.evaluationResults || ""
this.sumEvaluationResults = data?.sumEvaluationResults || ""
}
}
export interface CompetencyBehavioralModel {
scoreTopicExpectation: number
companyId: string
}
export class MyCompetencyBehavioralModel implements CompetencyBehavioralModel {
scoreTopicExpectation: number
companyId: string
constructor(data?: Partial<CompetencyBehavioralModel>) {
this.scoreTopicExpectation = data?.scoreTopicExpectation ?? 0
this.companyId = data?.companyId || ""
}
}
import { CompetencyCourseModel, MyCompetencyCourseModel } from "./competency-course.model"
import { CompetencyIndicatorsCourses0Model, MyCompetencyIndicatorsCourses0Model } from "./competency-indicators-courses0.model"
import { CompetencyIndicatorsCourses2ListModel, MyCompetencyIndicatorsCourses2ListModel } from "./competency-indicators-courses2-list.model"
export interface CompetencyIndicatorsCourses1MiniModel {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses0Model
......@@ -7,6 +8,7 @@ export interface CompetencyIndicatorsCourses1MiniModel {
companyId: string
competencyCourseId: string
competencyCourse: CompetencyCourseModel[]
behavioralIndicatorsList: CompetencyIndicatorsCourses2ListModel[]
}
export class MyCompetencyIndicatorsCourses1MiniModel implements CompetencyIndicatorsCourses1MiniModel {
competencyIndicatorsCourses0: CompetencyIndicatorsCourses0Model
......@@ -14,12 +16,14 @@ export class MyCompetencyIndicatorsCourses1MiniModel implements CompetencyIndica
companyId: string
competencyCourseId: string
competencyCourse: CompetencyCourseModel[]
behavioralIndicatorsList: CompetencyIndicatorsCourses2ListModel[]
constructor(data?: Partial<CompetencyIndicatorsCourses1MiniModel>) {
this.competencyIndicatorsCourses0 = new MyCompetencyIndicatorsCourses0Model(data?.competencyIndicatorsCourses0 || {})
this.lineNo = data?.lineNo ?? 0
this.companyId = data?.companyId || ""
this.competencyCourseId = data?.competencyCourseId || ""
this.competencyCourse = data?.competencyCourse?.map(x => new MyCompetencyCourseModel(x)) || []
this.behavioralIndicatorsList = data?.behavioralIndicatorsList?.map(x => new MyCompetencyIndicatorsCourses2ListModel(x)) || []
}
}
import { CompetencyAssessmentModel, MyCompetencyAssessmentModel } from "./competency-assessment.model"
import { CompetencyBehavioralModel, MyCompetencyBehavioralModel } from "./competency-behavioral.model"
export interface CompetencyIndicatorsCourses2ListModel {
runNo: number
......@@ -6,6 +7,7 @@ export interface CompetencyIndicatorsCourses2ListModel {
assessmentId: string
behavioralIndicators: string
competencyAssessment: CompetencyAssessmentModel[]
competencyBehavioral: CompetencyBehavioralModel
}
export class MyCompetencyIndicatorsCourses2ListModel implements CompetencyIndicatorsCourses2ListModel {
runNo: number
......@@ -13,12 +15,14 @@ export class MyCompetencyIndicatorsCourses2ListModel implements CompetencyIndica
assessmentId: string
behavioralIndicators: string
competencyAssessment: CompetencyAssessmentModel[]
constructor(data: Partial<CompetencyIndicatorsCourses2ListModel>) {
this.runNo = data.runNo ?? 0
this.companyId = data.companyId || ""
this.assessmentId = data.assessmentId || ""
this.behavioralIndicators = data.behavioralIndicators || ""
this.competencyAssessment = data.competencyAssessment?.map(x => new MyCompetencyAssessmentModel(x)) || []
competencyBehavioral: CompetencyBehavioralModel
constructor(data?: Partial<CompetencyIndicatorsCourses2ListModel>) {
this.runNo = data?.runNo ?? 0
this.companyId = data?.companyId || ""
this.assessmentId = data?.assessmentId || ""
this.behavioralIndicators = data?.behavioralIndicators || ""
this.competencyAssessment = data?.competencyAssessment?.map(x => new MyCompetencyAssessmentModel(x)) || []
this.competencyBehavioral = new MyCompetencyBehavioralModel(data?.competencyBehavioral)
}
}
......@@ -19,14 +19,14 @@ export class MyEvaluationCycleModel implements EvaluationCycleModel {
apsPeriodEnd: string;
statusCode: StatusCodeModel;
constructor(data: Partial<EvaluationCycleModel>) {
this.evaluationRoundId = data.evaluationRoundId || "";
this.tdesc = data.tdesc || "";
this.edesc = data.edesc || "";
this.apsyear = data.apsyear || "";
this.apsPeriodStart = data.apsPeriodStart || "";
this.apsPeriodEnd = data.apsPeriodEnd || "";
this.statusCode =new MyStatusCodeModel(data.statusCode || {})
constructor(data?: Partial<EvaluationCycleModel>) {
this.evaluationRoundId = data?.evaluationRoundId || "";
this.tdesc = data?.tdesc || "";
this.edesc = data?.edesc || "";
this.apsyear = data?.apsyear || "";
this.apsPeriodStart = data?.apsPeriodStart || "";
this.apsPeriodEnd = data?.apsPeriodEnd || "";
this.statusCode =new MyStatusCodeModel(data?.statusCode || {})
}
}
import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1MiniModel } from "./competency-indicators-courses1-mini.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface GroupAssessmentMiniModel {
personalLevel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
edesc: string
tdesc: string
}
export class MyGroupAssessmentMiniModel implements GroupAssessmentMiniModel {
personalLevel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel
companyId: string
edesc: string
tdesc: string
constructor(data?: Partial<GroupAssessmentMiniModel>) {
this.personalLevel = new MyPLModel(data?.personalLevel)
this.competencyIndicatorsCourses1Mini = new MyCompetencyIndicatorsCourses1MiniModel(data?.competencyIndicatorsCourses1Mini)
this.companyId = data?.companyId || ""
this.edesc = data?.edesc || ""
this.tdesc = data?.tdesc || ""
}
}
import { CompetencyIndicatorsCourses1MiniModel, MyCompetencyIndicatorsCourses1MiniModel } from "./competency-indicators-courses1-mini.model"
import { GroupAssessmentMiniModel, MyGroupAssessmentMiniModel } from "./group-assessment-mini.model"
import { MyPLModel, PLModel } from "./pl.model"
export interface GroupAssessment1Model {
personalLevelModel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel[]
companyId: string
groupAssessmentMini: GroupAssessmentMiniModel
}
export class MyGroupAssessment1Model implements GroupAssessment1Model {
personalLevelModel: PLModel
competencyIndicatorsCourses1Mini: CompetencyIndicatorsCourses1MiniModel[]
companyId: string
groupAssessmentMini: GroupAssessmentMiniModel
constructor(data?: Partial<GroupAssessment1Model>) {
this.personalLevelModel = new MyPLModel(data?.personalLevelModel)
this.competencyIndicatorsCourses1Mini = data?.competencyIndicatorsCourses1Mini?.map(x => new MyCompetencyIndicatorsCourses1MiniModel(x)) || []
this.companyId = data?.companyId || ""
this.groupAssessmentMini = new MyGroupAssessmentMiniModel(data?.groupAssessmentMini)
}
}
import { GroupAssessment1Model, MyGroupAssessment1Model } from "./group-assessment1.model"
export interface MasfromEvaluationAssessment1Model {
companyId: string
lineNo: number
groupAssessment1: GroupAssessment1Model
}
export class MyMasfromEvaluationAssessment1Model implements MasfromEvaluationAssessment1Model {
companyId: string
lineNo: number
groupAssessment1: GroupAssessment1Model
constructor(data?: Partial<MasfromEvaluationAssessment1Model>) {
this.companyId = data?.companyId || ""
this.lineNo = data?.lineNo ?? 0
this.groupAssessment1 = new MyGroupAssessment1Model(data?.groupAssessment1)
}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { PLModel } from '../model/pl.model';
import { AlertModel } from '../model/alert.model';
import { AppraisalModel } from '../model/appraisal.model';
import { AppraisalFromModel } from '../model/appraisal-form.model';
@Injectable({
providedIn: 'root'
})
export class AppraisalService {
api = "/appraisal"
urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) {
}
getFormById(evaluationRoundId: string, apsassessy: string): Observable<AppraisalFromModel> {
return this.http.get<AppraisalFromModel>(this.urlApi + "/" + evaluationRoundId + "/" + apsassessy)
}
getList(): Observable<AppraisalModel[]> {
return this.http.get<AppraisalModel[]>(this.urlApi + "/competency/emp")
}
post(body: AppraisalModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body)
}
}
\ No newline at end of file
......@@ -34,6 +34,9 @@ export class EmployeeService {
getById(employeeId: string): Observable<EmployeeModel> {
return this.http.get<EmployeeModel>(this.urlApi + "/profile?employeeId=" + employeeId)
}
getProfile(): Observable<EmployeeModel> {
return this.http.get<EmployeeModel>(this.urlApi + "/profile")
}
add(body: EmployeeModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi + '/profile-create', body)
}
......
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