Commit 1de53efd by Nattana Chaiyamat

translate กับส่ง gap

parent 264eccfb
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " <input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder="Search by No. or Name" [(ngModel)]="search"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search">
<div <div
class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4"> class="absolute inset-y-0 ltr:left-0 rtl:right-0 flex items-center pointer-events-none z-20 ltr:pl-4 rtl:pr-4">
<i class="ri-search-line text-gray"></i> <i class="ri-search-line text-gray"></i>
...@@ -16,21 +16,21 @@ ...@@ -16,21 +16,21 @@
data-hs-overlay="#company-registration-page-upload-modal" data-hs-overlay="#company-registration-page-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'"> (click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i> <i class="ti ti-file-plus"></i>
import {{'Import' | translate}}
</button> </button>
</div> </div>
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
(click)="currentModal='add';setData()" (click)="openDialog()"> (click)="currentModal='add';setData()" (click)="openDialog()">
<i class="ri-add-line"></i> <i class="ri-add-line"></i>
Add {{'Add' | translate}}
</button> </button>
</div> </div>
<div class="px-1"> <div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
(click)="currentModal='delete';setData();deleteCompany()"> (click)="currentModal='delete';setData();deleteCompany()">
<i class="ri-delete-bin-6-line"></i> <i class="ri-delete-bin-6-line"></i>
Delete {{'Delete' | translate}}
</button> </button>
</div> </div>
</div> </div>
......
...@@ -36,18 +36,18 @@ export class CompanyRegistrationPageComponent { ...@@ -36,18 +36,18 @@ export class CompanyRegistrationPageComponent {
}; };
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "code", field: "code",
headerText: "รหัสบริษัท", headerText: "CompanyCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "รายละเอียดบริษัท (ไทย)", headerText: "CompanyDescThai",
type: "string" type: "string"
}, },
{ {
field: "edesc", field: "edesc",
headerText: "รายละเอียดบริษัท (อังกฤษ)", headerText: "CompanyDescEng",
type: "string" type: "string"
}] }]
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem"> <div class="font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem">
ทะเบียนบริษัท {{'menu.Company' | translate}}
</div> </div>
<div class="page pt-0.75rem"> <div class="page pt-0.75rem">
<div class="border-b border-gray-200 dark:border-white/10 px-2rem"> <div class="border-b border-gray-200 dark:border-white/10 px-2rem">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1" href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1" aria-controls="underline-1"
(click)="pathTitle = ['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท','ทะเบียนบริษัท'];currentPath=1"> (click)="pathTitle = ['การจัดการข้อมูลองค์กร', 'ทะเบียนบริษัท','ทะเบียนบริษัท'];currentPath=1">
ทะเบียนบริษัท {{'menu.Company' | translate}}
</a> </a>
<a class="font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary" <a class="font-size-16px font-weight-500 hs-tab-active:font-weight-700 hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 px-1 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary"
href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2" href="javascript:void(0);" id="underline-item-2" data-hs-tab="#underline-2"
......
...@@ -208,6 +208,7 @@ import { JobDescriptionEssComponent } from '../job-description-ess/job-descripti ...@@ -208,6 +208,7 @@ import { JobDescriptionEssComponent } from '../job-description-ess/job-descripti
import { MoneyInputDirective } from 'src/app/shared/directive/money-input/money-input.directive'; import { MoneyInputDirective } from 'src/app/shared/directive/money-input/money-input.directive';
import { CompetencyEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component'; import { CompetencyEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-evaluation-factors.component';
import { CompetencyDefineEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component'; import { CompetencyDefineEvaluationFactorsComponent } from '../competency-assessment/competency-evaluation-factors/competency-define-evaluation-factors/competency-define-evaluation-factors.component';
import { TranslateModule } from '@ngx-translate/core';
export const MY_DATE_FORMATS = { export const MY_DATE_FORMATS = {
parse: { parse: {
...@@ -357,7 +358,9 @@ export class CustomDateAdapter extends NativeDateAdapter { ...@@ -357,7 +358,9 @@ export class CustomDateAdapter extends NativeDateAdapter {
SettingIndividualKpiSupervisorComponent, SettingIndividualKpiSupervisorComponent,
JobDescriptionEssComponent, JobDescriptionEssComponent,
MoneyInputDirective MoneyInputDirective
], imports: [CommonModule, ], imports: [
TranslateModule,
CommonModule,
DashboardRoutingModule, DashboardRoutingModule,
NgChartsModule, NgChartsModule,
NgApexchartsModule, NgApexchartsModule,
......
<ejs-grid #grid id='Grid' [dataSource]="dataSourceSearch" [allowFiltering]="allowFiltering" <ejs-grid #grid id='Grid' [locale]="locale" [dataSource]="dataSourceSearch" [allowFiltering]="allowFiltering"
[filterSettings]="filterSettings" (actionComplete)="actionComplete($event)" [searchSettings]="searchSettings" [filterSettings]="filterSettings" (actionComplete)="actionComplete($event)" [searchSettings]="searchSettings"
[groupSettings]="groupSettings" [toolbar]='toolbarOptions' [editSettings]="editSettings" allowPaging='true' [groupSettings]="groupSettings" [toolbar]='toolbarOptions' [editSettings]="editSettings" allowPaging='true'
allowGrouping='true' allowSorting='true' [showColumnMenu]="true" (columnMenuClick)="onColumnMenuClick($event)" allowGrouping='true' allowSorting='true' [showColumnMenu]="true" (columnMenuClick)="onColumnMenuClick($event)"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<input type="checkbox" [id]="'checkbox-all'" class="ti-form-checkbox cursor-pointer" <input type="checkbox" [id]="'checkbox-all'" class="ti-form-checkbox cursor-pointer"
[checked]="selectedItemsAll" (click)="toggleSelectionAll()"> [checked]="selectedItemsAll" (click)="toggleSelectionAll()">
<label [for]="'checkbox-all'" class="font-size-12px font-weight-700 text-primary"> <label [for]="'checkbox-all'" class="font-size-12px font-weight-700 text-primary">
&nbsp;{{selectedItems.count}} Selected</label> &nbsp;{{selectedItems.count}} {{'Selected' | translate}}</label>
</ng-template> </ng-template>
<ng-template #template let-data *ngIf="checkBoxSetting"> <ng-template #template let-data *ngIf="checkBoxSetting">
<input type="checkbox" class="ti-form-checkbox cursor-pointer" <input type="checkbox" class="ti-form-checkbox cursor-pointer"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
[validationRules]="col.validationRules" [allowEditing]="false" [allowSorting]="'true'" [allowFiltering]="true" [validationRules]="col.validationRules" [allowEditing]="false" [allowSorting]="'true'" [allowFiltering]="true"
[visible]="col.visible" [type]="col.type"> [visible]="col.visible" [type]="col.type">
<ng-template #headerTemplate let-data> <ng-template #headerTemplate let-data>
<span class="font-size-12px font-weight-700 text-primary">{{ col.headerText }}</span> <span class="font-size-12px font-weight-700 text-primary">{{ col.headerText | translate}}</span>
</ng-template> </ng-template>
<ng-template #template let-data *ngIf="col.field == 'statusCode.tdesc'"> <ng-template #template let-data *ngIf="col.field == 'statusCode.tdesc'">
<div class="flex justify-center items-center w-full h-full"> <div class="flex justify-center items-center w-full h-full">
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<e-column headerText='action' width='205' textAlign='Center' *ngIf="actionSetting"> <e-column headerText='action' width='205' textAlign='Center' *ngIf="actionSetting">
<ng-template #headerTemplate let-data *ngIf="actionSetting"> <ng-template #headerTemplate let-data *ngIf="actionSetting">
<span class="font-size-12px font-weight-700 text-primary">การจัดการ</span> <span class="font-size-12px font-weight-700 text-primary">{{'Action' | translate}}</span>
</ng-template> </ng-template>
<ng-template #template let-data *ngIf="actionSetting"> <ng-template #template let-data *ngIf="actionSetting">
<i class="ti ti-eye cursor-pointer i-gray fs-l px-1" (click)="onNextPageView(data)" *ngIf="childView"></i> <i class="ti ti-eye cursor-pointer i-gray fs-l px-1" (click)="onNextPageView(data)" *ngIf="childView"></i>
......
...@@ -39,13 +39,17 @@ import { DataManager, Query } from '@syncfusion/ej2-data'; ...@@ -39,13 +39,17 @@ import { DataManager, Query } from '@syncfusion/ej2-data';
import { L10n, setCulture } from '@syncfusion/ej2-base'; import { L10n, setCulture } from '@syncfusion/ej2-base';
import { Status } from '../../shared/model/evaluation-form.modal'; import { Status } from '../../shared/model/evaluation-form.modal';
import { FileService } from 'src/app/shared/services/file.service'; import { FileService } from 'src/app/shared/services/file.service';
setCulture('th-TH'); import { TranslateService } from '@ngx-translate/core';
L10n.load({ L10n.load({
'en-US': { 'en-US': {
'pager': { 'pager': {
'currentPageInfo': '', 'currentPageInfo': '',
'totalItemsInfo': '{1} to {2} of {0}', 'totalItemsInfo': '{1} to {2} of {0}',
},
'grid': {
'pagerInfo': 'Total {0} items',
'pageCountMsg': 'Total {0} items'
} }
}, },
'th-TH': { 'th-TH': {
...@@ -92,8 +96,7 @@ export class DatagridSyncfutionComponent implements OnInit { ...@@ -92,8 +96,7 @@ export class DatagridSyncfutionComponent implements OnInit {
dataSourceFilter: any[] = []; dataSourceFilter: any[] = [];
@Output() sendSelectData = new EventEmitter<any>(); @Output() sendSelectData = new EventEmitter<any>();
@Input() columns: ColumnModel[] = []; @Input() columns: ColumnModel[] = [];
// @Input() toolbarOptions?: ToolbarItems[] @Input() toolbarOptions?: any[] = ['Print', 'ExcelExport', 'CsvExport'];
@Input() toolbarOptions?: ToolbarItems[] = ['Print', 'ExcelExport', 'CsvExport'];
@Input() searchSettings: any = { @Input() searchSettings: any = {
fields: [], fields: [],
operator: 'contains', operator: 'contains',
...@@ -168,8 +171,11 @@ export class DatagridSyncfutionComponent implements OnInit { ...@@ -168,8 +171,11 @@ export class DatagridSyncfutionComponent implements OnInit {
@Input() sendLayout = false @Input() sendLayout = false
@Input() gridLayout = '' @Input() gridLayout = ''
@Output() layout = new EventEmitter<any>(); @Output() layout = new EventEmitter<any>();
locale = 'th-TH'
constructor(private cdr: ChangeDetectorRef, constructor(private cdr: ChangeDetectorRef,
private fileService: FileService private fileService: FileService,
private translateService: TranslateService,
) { ) {
} }
ngOnInit(): void { ngOnInit(): void {
...@@ -177,6 +183,28 @@ export class DatagridSyncfutionComponent implements OnInit { ...@@ -177,6 +183,28 @@ export class DatagridSyncfutionComponent implements OnInit {
this.loadingIndicator = { indicatorType: 'Shimmer' }; this.loadingIndicator = { indicatorType: 'Shimmer' };
// ถ้ามี logic ของ child เอง เช่นตั้งค่าเริ่มต้น // ถ้ามี logic ของ child เอง เช่นตั้งค่าเริ่มต้น
// ให้เขียนตรงนี้ได้ // ให้เขียนตรงนี้ได้
this.toolbarOptions = [
{ text: this.translateService.instant('Print'), prefixIcon: 'e-print', id: 'Print' },
{ text: this.translateService.instant('ExcelExport'), prefixIcon: 'e-excelexport', id: 'ExcelExport' },
{ text: this.translateService.instant('CsvExport'), prefixIcon: 'e-csvexport', id: 'CsvExport' }
];
// setCulture('en-US');
// setCulture('th-TH');
this.translateService.onLangChange.subscribe((event) => {
if (event.lang === 'th') {
setCulture('th-TH');
this.locale = 'th-TH'
} else if (event.lang === 'en') {
setCulture('en-US');
this.locale = 'en-US'
}
this.toolbarOptions = [
{ text: this.translateService.instant('Print'), prefixIcon: 'e-print', id: 'Print' },
{ text: this.translateService.instant('ExcelExport'), prefixIcon: 'e-excelexport', id: 'ExcelExport' },
{ text: this.translateService.instant('CsvExport'), prefixIcon: 'e-csvexport', id: 'CsvExport' }
];
});
} }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
...@@ -253,7 +281,7 @@ export class DatagridSyncfutionComponent implements OnInit { ...@@ -253,7 +281,7 @@ export class DatagridSyncfutionComponent implements OnInit {
} }
} }
} }
filterData(text: string, fields: string[]): any[] { filterData(text: string, fields: string[]): any[] {
return this.dataSource.filter(item => { return this.dataSource.filter(item => {
return fields.some(field => { return fields.some(field => {
......
...@@ -220,19 +220,19 @@ ...@@ -220,19 +220,19 @@
<div class="col-span-8">รวมจำนวนเครื่องหมายแต่ละช่อง (1)</div> <div class="col-span-8">รวมจำนวนเครื่องหมายแต่ละช่อง (1)</div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-1 text-center"> <div class="col-span-1 text-center">
{{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5Boss}} {{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck5Boss}}
</div> </div>
<div class="col-span-1 text-center"> <div class="col-span-1 text-center">
{{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4Boss}} {{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck4Boss}}
</div> </div>
<div class="col-span-1 text-center"> <div class="col-span-1 text-center">
{{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3Boss}} {{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck3Boss}}
</div> </div>
<div class="col-span-1 text-center"> <div class="col-span-1 text-center">
{{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2Boss}} {{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck2Boss}}
</div> </div>
<div class="col-span-1 text-center"> <div class="col-span-1 text-center">
{{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1Boss}} {{appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck1Boss}}
</div> </div>
</div> </div>
</div> </div>
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</div> </div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-5 text-center text-indigo-600 font-semibold"> <div class="col-span-5 text-center text-indigo-600 font-semibold">
{{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalBoss)}} {{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotalBoss)}}
</div> </div>
</div> </div>
</div> </div>
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
</div> </div>
<div class="col-span-3 grid grid-cols-5"> <div class="col-span-3 grid grid-cols-5">
<div class="col-span-5 text-center text-indigo-600 font-semibold"> <div class="col-span-5 text-center text-indigo-600 font-semibold">
{{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss)}} {{showNumber(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss)}}
</div> </div>
</div> </div>
</div> </div>
...@@ -306,10 +306,10 @@ ...@@ -306,10 +306,10 @@
</div> </div>
</td> </td>
<td class="align-start text-center text-indigo-600 font-semibold"> <td class="align-start text-center text-indigo-600 font-semibold">
{{calAverage(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss)}} {{calAverage(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss)}}
</td> </td>
<td class="align-start text-center text-indigo-600 font-semibold"> <td class="align-start text-center text-indigo-600 font-semibold">
{{calGap(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss)}} {{calGap(appraisalCompentencyList[appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss)}}
</td> </td>
</tr> </tr>
<tr (mouseenter)="hoveredCode2 = 'true'" (mouseleave)="hoveredCode2 = null" <tr (mouseenter)="hoveredCode2 = 'true'" (mouseleave)="hoveredCode2 = null"
......
...@@ -143,27 +143,27 @@ export class PmsCompetencyComponent { ...@@ -143,27 +143,27 @@ export class PmsCompetencyComponent {
this.cdr.detectChanges() this.cdr.detectChanges()
switch (this.currentStep) { switch (this.currentStep) {
case ("0"): { case ("0"): {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].apsassessyDate = this.dateIso this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].apsassessyDate = this.dateIso
break break
} }
case ("1"): { case ("1"): {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].apsapprove1Date = this.dateIso this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].apsapprove1Date = this.dateIso
break break
} }
case ("2"): { case ("2"): {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].apsapprove2Date = this.dateIso this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].apsapprove2Date = this.dateIso
break break
} }
case ("3"): { case ("3"): {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].apsapprove3Date = this.dateIso this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].apsapprove3Date = this.dateIso
break break
} }
case ("4"): { case ("4"): {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].apsapprove4Date = this.dateIso this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].apsapprove4Date = this.dateIso
break break
} }
case ("5"): { case ("5"): {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].apsapprove5Date = this.dateIso this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].apsapprove5Date = this.dateIso
break break
} }
default: { return } default: { return }
...@@ -173,46 +173,46 @@ export class PmsCompetencyComponent { ...@@ -173,46 +173,46 @@ export class PmsCompetencyComponent {
} }
} }
appraisalCompentencyFilter() { appraisalCompentencyFilter() {
return this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List || [] return this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List || []
} }
calnumberCheck() { calnumberCheck() {
if (this.evaluaterId != this.evaluateeId || this.currentStep != '0') { if (this.evaluaterId != this.evaluateeId || this.currentStep != '0') {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 1).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck1 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 1).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 2).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck2 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 2).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 3).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck3 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 3).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 4).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck4 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 4).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 5).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck5 = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectation == 5).length).reduce((acc: any, num: any) => acc + num, 0)
} }
} }
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 1).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck1Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 1).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 2).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck2Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 2).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 3).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck3Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 3).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 4).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck4Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 4).length).reduce((acc: any, num: any) => acc + num, 0)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 5).length).reduce((acc: any, num: any) => acc + num, 0) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck5Boss = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.filter((y: any) => y.competencyBehavioral.scoreTopicExpectationBoss == 5).length).reduce((acc: any, num: any) => acc + num, 0)
this.calWeightTotal() this.calWeightTotal()
} }
this.cdr.detectChanges() this.cdr.detectChanges()
} }
calWeightScoreBoss(numberCheck: number) { calWeightScoreBoss(numberCheck: number) {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]) {
switch (numberCheck) { switch (numberCheck) {
case (1): { case (1): {
return this.showNumber((this.setting.data.settingScore1) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1Boss) return this.showNumber((this.setting.data.settingScore1) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck1Boss)
} }
case (2): { case (2): {
return this.showNumber((this.setting.data.settingScore2) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2Boss) return this.showNumber((this.setting.data.settingScore2) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck2Boss)
} }
case (3): { case (3): {
return this.showNumber((this.setting.data.settingScore3) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3Boss) return this.showNumber((this.setting.data.settingScore3) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck3Boss)
} }
case (4): { case (4): {
return this.showNumber((this.setting.data.settingScore4) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4Boss) return this.showNumber((this.setting.data.settingScore4) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck4Boss)
} }
case (5): { case (5): {
return this.showNumber((this.setting.data.settingScore5) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5Boss) return this.showNumber((this.setting.data.settingScore5) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck5Boss)
} }
default: { return } default: { return }
} }
...@@ -220,22 +220,22 @@ export class PmsCompetencyComponent { ...@@ -220,22 +220,22 @@ export class PmsCompetencyComponent {
return return
} }
calWeightScore(numberCheck: number) { calWeightScore(numberCheck: number) {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]) {
switch (numberCheck) { switch (numberCheck) {
case (1): { case (1): {
return this.showNumber((this.setting.data.settingScore1) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck1) return this.showNumber((this.setting.data.settingScore1) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck1)
} }
case (2): { case (2): {
return this.showNumber((this.setting.data.settingScore2) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck2) return this.showNumber((this.setting.data.settingScore2) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck2)
} }
case (3): { case (3): {
return this.showNumber((this.setting.data.settingScore3) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck3) return this.showNumber((this.setting.data.settingScore3) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck3)
} }
case (4): { case (4): {
return this.showNumber((this.setting.data.settingScore4) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck4) return this.showNumber((this.setting.data.settingScore4) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck4)
} }
case (5): { case (5): {
return this.showNumber((this.setting.data.settingScore5) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].numberCheck5) return this.showNumber((this.setting.data.settingScore5) * this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].numberCheck5)
} }
default: { return } default: { return }
} }
...@@ -243,18 +243,18 @@ export class PmsCompetencyComponent { ...@@ -243,18 +243,18 @@ export class PmsCompetencyComponent {
return return
} }
calWeightTotal() { calWeightTotal() {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalBoss = 0 this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotalBoss = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalBoss = +(((this.calWeightScoreBoss(1) ?? 0) + (this.calWeightScoreBoss(2) ?? 0) + (this.calWeightScoreBoss(3) ?? 0) + (this.calWeightScoreBoss(4) ?? 0) + (this.calWeightScoreBoss(5) ?? 0)).toFixed(2)) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotalBoss = +(((this.calWeightScoreBoss(1) ?? 0) + (this.calWeightScoreBoss(2) ?? 0) + (this.calWeightScoreBoss(3) ?? 0) + (this.calWeightScoreBoss(4) ?? 0) + (this.calWeightScoreBoss(5) ?? 0)).toFixed(2))
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal = 0 this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotal = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal = +(((this.calWeightScore(1) ?? 0) + (this.calWeightScore(2) ?? 0) + (this.calWeightScore(3) ?? 0) + (this.calWeightScore(4) ?? 0) + (this.calWeightScore(5) ?? 0)).toFixed(2)) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotal = +(((this.calWeightScore(1) ?? 0) + (this.calWeightScore(2) ?? 0) + (this.calWeightScore(3) ?? 0) + (this.calWeightScore(4) ?? 0) + (this.calWeightScore(5) ?? 0)).toFixed(2))
this.cdr.detectChanges() this.cdr.detectChanges()
this.calAverageScore() this.calAverageScore()
} }
} }
calAverageScore() { calAverageScore() {
if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { if (this.appraisalCompentencyList[this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]) {
const length = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.length).reduce((acc: any, num: any) => acc + num, 0) const length = this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map((x: any) => x.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList.length).reduce((acc: any, num: any) => acc + num, 0)
const max = Math.max(...[+(this.setting.data.settingScore5), const max = Math.max(...[+(this.setting.data.settingScore5),
+(this.setting.data.settingScore4), +(this.setting.data.settingScore4),
+(this.setting.data.settingScore3), +(this.setting.data.settingScore3),
...@@ -262,10 +262,10 @@ export class PmsCompetencyComponent { ...@@ -262,10 +262,10 @@ export class PmsCompetencyComponent {
+(this.setting.data.settingScore1)]) +(this.setting.data.settingScore1)])
const total = length * max const total = length * max
if (total) { if (total) {
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss = 0 this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss = this.showNumber((this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotalBoss * 100) / total) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss = this.showNumber((this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotalBoss * 100) / total)
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore = 0 this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScore = 0
this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore = this.showNumber((this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].weightedTotal * 100) / total) this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScore = this.showNumber((this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].weightedTotal * 100) / total)
this.cdr.detectChanges() this.cdr.detectChanges()
} }
} }
...@@ -285,24 +285,61 @@ export class PmsCompetencyComponent { ...@@ -285,24 +285,61 @@ export class PmsCompetencyComponent {
} }
} }
calGap(score: number | string, index?: string) { calGap(score: number | string, index?: string) {
if (this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0]) { const compentency = this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1List[0]
let scoreGab = ''
if (compentency) {
const roundedScore = this.showNumber(score) % 1 <= 0.5 ? Math.floor(this.showNumber(score)) : Math.round(this.showNumber(score)); const roundedScore = this.showNumber(score) % 1 <= 0.5 ? Math.floor(this.showNumber(score)) : Math.round(this.showNumber(score));
if (roundedScore >= 90 && roundedScore <= 100) { if (roundedScore >= 90 && roundedScore <= 100) {
if (this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].numberCheck1Boss || this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].numberCheck2Boss || this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].numberCheck3Boss) { if (compentency.numberCheck1Boss || compentency.numberCheck2Boss || compentency.numberCheck3Boss) {
return "-1"; scoreGab = '-1'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
}
compentency.scoreGabBoss = scoreGab
return scoreGab;
}
scoreGab = '+1'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
} }
return "+1"; compentency.scoreGabBoss = scoreGab
return scoreGab;
} else if (roundedScore >= 80 && roundedScore <= 89) { } else if (roundedScore >= 80 && roundedScore <= 89) {
if (this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].numberCheck1Boss || this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].numberCheck2Boss || this.appraisalCompentencyList[index ? +(index) : this.appraisalCompentencyIndex]?.masfromEvaluationAssessment1lList[0].numberCheck3Boss) { if (compentency.numberCheck1Boss || compentency.numberCheck2Boss || compentency.numberCheck3Boss) {
return "-1"; scoreGab = '-1'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
}
compentency.scoreGabBoss = scoreGab
return scoreGab;
}
scoreGab = '0'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
} }
return "0"; compentency.scoreGabBoss = scoreGab
return scoreGab;
} else if (roundedScore >= 60 && roundedScore <= 79) { } else if (roundedScore >= 60 && roundedScore <= 79) {
return "-1"; scoreGab = '-1'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
}
compentency.scoreGabBoss = scoreGab
return scoreGab;
} else if (roundedScore >= 40 && roundedScore <= 59) { } else if (roundedScore >= 40 && roundedScore <= 59) {
return "-2"; scoreGab = '-2'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
}
compentency.scoreGabBoss = scoreGab
return scoreGab;
} else { } else {
return "-3"; scoreGab = '-3'
if (this.evaluateeId == this.evaluaterId) {
compentency.scoreGab = scoreGab
}
compentency.scoreGabBoss = scoreGab
return scoreGab;
} }
} }
return return
...@@ -334,7 +371,7 @@ export class PmsCompetencyComponent { ...@@ -334,7 +371,7 @@ export class PmsCompetencyComponent {
return remain return remain
} }
formRemain(index: number) { formRemain(index: number) {
const remain = this.appraisalCompentencyList[index]?.masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map(data => const remain = this.appraisalCompentencyList[index]?.masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map(data =>
this.inFormRemain(data) this.inFormRemain(data)
).filter(data => data != 0).length ).filter(data => data != 0).length
this.allFormRemain() this.allFormRemain()
...@@ -343,27 +380,27 @@ export class PmsCompetencyComponent { ...@@ -343,27 +380,27 @@ export class PmsCompetencyComponent {
} }
allFormRemain() { allFormRemain() {
const remain = this.appraisalCompentencyList.map((_, i) => const remain = this.appraisalCompentencyList.map((_, i) =>
this.appraisalCompentencyList[i]?.masfromEvaluationAssessment1lList[0].masfromEvaluationAssessment2List.map(data => this.appraisalCompentencyList[i]?.masfromEvaluationAssessment1List[0].masfromEvaluationAssessment2List.map(data =>
this.inFormRemain(data) this.inFormRemain(data)
).filter(data => data != 0).length ).filter(data => data != 0).length
).filter(data => data != 0).length ).filter(data => data != 0).length
const score = [1, 2, 3, 4, 5] const score = [1, 2, 3, 4, 5]
this.compentencyScoreBoss.emit(score.map(x => this.calWeightScoreBoss(x))) this.compentencyScoreBoss.emit(score.map(x => this.calWeightScoreBoss(x)))
this.compentencyWeightScoreBoss.emit(this.showNumber(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss)) this.compentencyWeightScoreBoss.emit(this.showNumber(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss))
this.compentencyGapBoss.emit(this.calGap(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScoreBoss)) this.compentencyGapBoss.emit(this.calGap(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScoreBoss))
this.compentencyForm.emit(this.appraisalCompentencyList) this.compentencyForm.emit(this.appraisalCompentencyList)
this.compentencyFormRemain.emit(remain) this.compentencyFormRemain.emit(remain)
this.compentencyScore.emit(score.map(x => this.calWeightScore(x))) this.compentencyScore.emit(score.map(x => this.calWeightScore(x)))
this.compentencyWeightScore.emit(this.showNumber(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)) this.compentencyWeightScore.emit(this.showNumber(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScore))
this.compentencyGap.emit(this.calGap(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1lList[0].averageScore)) this.compentencyGap.emit(this.calGap(this.appraisalCompentencyList[this.appraisalCompentencyIndex].masfromEvaluationAssessment1List[0].averageScore))
} }
allWeightGap() { allWeightGap() {
this.appraisalCompentencyList.forEach((x, i) => { this.appraisalCompentencyList.forEach((x, i) => {
this.inforWeightBoss.set(x.comType, x.masfromEvaluationAssessment1lList[0].averageScoreBoss + '') this.inforWeightBoss.set(x.comType, x.masfromEvaluationAssessment1List[0].averageScoreBoss + '')
this.inforGapBoss.set(x.comType, this.calGap(x.masfromEvaluationAssessment1lList[0].averageScoreBoss, (i + '')) ?? '') this.inforGapBoss.set(x.comType, this.calGap(x.masfromEvaluationAssessment1List[0].averageScoreBoss, (i + '')) ?? '')
this.inforWeight.set(x.comType, x.masfromEvaluationAssessment1lList[0].averageScore + '') this.inforWeight.set(x.comType, x.masfromEvaluationAssessment1List[0].averageScore + '')
this.inforGap.set(x.comType, this.calGap(x.masfromEvaluationAssessment1lList[0].averageScore, (i + '')) ?? '') this.inforGap.set(x.comType, this.calGap(x.masfromEvaluationAssessment1List[0].averageScore, (i + '')) ?? '')
}) })
this.sendInforWeightBoss.emit(this.inforWeightBoss) this.sendInforWeightBoss.emit(this.inforWeightBoss)
this.sendInforGapBoss.emit(this.inforGapBoss) this.sendInforGapBoss.emit(this.inforGapBoss)
......
...@@ -595,19 +595,19 @@ export class PmsFormEmployeeComponent { ...@@ -595,19 +595,19 @@ export class PmsFormEmployeeComponent {
'!competency[].apsapprove3', '!competency[].apsapprove3',
'!competency[].apsapprove4', '!competency[].apsapprove4',
'!competency[].apsapprove5', '!competency[].apsapprove5',
'!competency[].masfromEvaluationAssessment1lList[].apsassessyDate', '!competency[].masfromEvaluationAssessment1List[].apsassessyDate',
'!competency[].masfromEvaluationAssessment1lList[].apsapprove1Date', '!competency[].masfromEvaluationAssessment1List[].apsapprove1Date',
'!competency[].masfromEvaluationAssessment1lList[].apsapprove2Date', '!competency[].masfromEvaluationAssessment1List[].apsapprove2Date',
'!competency[].masfromEvaluationAssessment1lList[].apsapprove3Date', '!competency[].masfromEvaluationAssessment1List[].apsapprove3Date',
'!competency[].masfromEvaluationAssessment1lList[].apsapprove4Date', '!competency[].masfromEvaluationAssessment1List[].apsapprove4Date',
'!competency[].masfromEvaluationAssessment1lList[].apsapprove5Date', '!competency[].masfromEvaluationAssessment1List[].apsapprove5Date',
'!competency[].masfromEvaluationAssessment1lList[].numberCheck1', '!competency[].masfromEvaluationAssessment1List[].numberCheck1',
'!competency[].masfromEvaluationAssessment1lList[].numberCheck2', '!competency[].masfromEvaluationAssessment1List[].numberCheck2',
'!competency[].masfromEvaluationAssessment1lList[].numberCheck3', '!competency[].masfromEvaluationAssessment1List[].numberCheck3',
'!competency[].masfromEvaluationAssessment1lList[].numberCheck4', '!competency[].masfromEvaluationAssessment1List[].numberCheck4',
'!competency[].masfromEvaluationAssessment1lList[].numberCheck5', '!competency[].masfromEvaluationAssessment1List[].numberCheck5',
'!competency[].masfromEvaluationAssessment1lList[].weightedTotal', '!competency[].masfromEvaluationAssessment1List[].weightedTotal',
'!competency[].masfromEvaluationAssessment1lList[].averageScore', '!competency[].masfromEvaluationAssessment1List[].averageScore',
'pms', 'pms',
'!pms.gradeScore', '!pms.gradeScore',
'!pms.apsassessyDate', '!pms.apsassessyDate',
......
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
<tbody> <tbody>
<ng-container *ngFor="let item of appraisalCompentencyList; let i=index"> <ng-container *ngFor="let item of appraisalCompentencyList; let i=index">
<tr class="border-b border-gray-200" <tr class="border-b border-gray-200"
(mouseenter)="tableHover.set(item.masfromEvaluationAssessment1lList[0].competencyType.tdesc,true)" (mouseenter)="tableHover.set(item.masfromEvaluationAssessment1List[0].competencyType.tdesc,true)"
(mouseleave)="tableHover.clear()" (mouseleave)="tableHover.clear()"
[ngStyle]="{'background':tableHover.get(item.masfromEvaluationAssessment1lList[0].competencyType.tdesc)?'#f1f5f9':'#ffffff'}"> [ngStyle]="{'background':tableHover.get(item.masfromEvaluationAssessment1List[0].competencyType.tdesc)?'#f1f5f9':'#ffffff'}">
<td class="py-2" style="vertical-align: top"> <td class="py-2" style="vertical-align: top">
{{item.masfromEvaluationAssessment1lList[0].competencyType.tdesc}} {{item.masfromEvaluationAssessment1List[0].competencyType.tdesc}}
</td> </td>
<td class="py-2 text-center" style="vertical-align: top"> <td class="py-2 text-center" style="vertical-align: top">
{{formatThaiDate(item.masfromEvaluationRound.apsPeriodStart)}} {{formatThaiDate(item.masfromEvaluationRound.apsPeriodStart)}}
......
...@@ -4,7 +4,7 @@ import { AppraisalRoundModel, MyAppraisalRoundModel } from 'src/app/shared/model ...@@ -4,7 +4,7 @@ import { AppraisalRoundModel, MyAppraisalRoundModel } from 'src/app/shared/model
import { AppraisalModel, MyAppraisalModel } from 'src/app/shared/model/appraisal.model'; import { AppraisalModel, MyAppraisalModel } from 'src/app/shared/model/appraisal.model';
import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/model/evaluation-cycle.model'; import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/model/evaluation-cycle.model';
import { EvaluationModal } from 'src/app/shared/model/evaluation-form.modal'; import { EvaluationModal } from 'src/app/shared/model/evaluation-form.modal';
import { MasfromEvaluationAssessment1lList, PmsMasfromEvaluationFullModel } from 'src/app/shared/model/pms-masfrom-evaluation-list.model'; import { masfromEvaluationAssessment1List, PmsMasfromEvaluationFullModel } from 'src/app/shared/model/pms-masfrom-evaluation-list.model';
import { MyPmsMasfromEvaluationModel, PmsMasfromEvaluationModel } from 'src/app/shared/model/pms-masfrom-evaluation.model'; import { MyPmsMasfromEvaluationModel, PmsMasfromEvaluationModel } from 'src/app/shared/model/pms-masfrom-evaluation.model';
import { PmsEvaluationAssessmentService } from 'src/app/shared/services/pms-evaluation-assessment.service'; import { PmsEvaluationAssessmentService } from 'src/app/shared/services/pms-evaluation-assessment.service';
import { PmsMasfromEvaluationCycleService } from 'src/app/shared/services/pms-masfrom-evaluation.service'; import { PmsMasfromEvaluationCycleService } from 'src/app/shared/services/pms-masfrom-evaluation.service';
...@@ -38,8 +38,8 @@ export class EditEvaluationFormComponent { ...@@ -38,8 +38,8 @@ export class EditEvaluationFormComponent {
empassessmentList?: EvaluationModal empassessmentList?: EvaluationModal
searchEmp = "" searchEmp = ""
empassessmentRoundList: MasfromEvaluationAssessment1lList[] = [] empassessmentRoundList: masfromEvaluationAssessment1List[] = []
empassessmentRoundListCheckbox: { checkbox: boolean, item: MasfromEvaluationAssessment1lList }[] = [] empassessmentRoundListCheckbox: { checkbox: boolean, item: masfromEvaluationAssessment1List }[] = []
currentPageRound = 1 currentPageRound = 1
pageRound = Array.from({ length: 1 }, (_, i) => i + 1); pageRound = Array.from({ length: 1 }, (_, i) => i + 1);
pageSizeRound = 10 pageSizeRound = 10
...@@ -50,12 +50,12 @@ export class EditEvaluationFormComponent { ...@@ -50,12 +50,12 @@ export class EditEvaluationFormComponent {
msg = "" msg = ""
typeForm = "" typeForm = ""
selectData?: MasfromEvaluationAssessment1lList selectData?: masfromEvaluationAssessment1List
loading = false loading = false
indicatorsList: MasfromEvaluationAssessment1lList[] = [] indicatorsList: masfromEvaluationAssessment1List[] = []
indicatorsListShow: MasfromEvaluationAssessment1lList[] = [] indicatorsListShow: masfromEvaluationAssessment1List[] = []
searchIndicator = "" searchIndicator = ""
currentPageIndicator = 1 currentPageIndicator = 1
pageIndicator = Array.from({ length: 1 }, (_, i) => i + 1); pageIndicator = Array.from({ length: 1 }, (_, i) => i + 1);
...@@ -162,7 +162,7 @@ export class EditEvaluationFormComponent { ...@@ -162,7 +162,7 @@ export class EditEvaluationFormComponent {
saveIndicators() { saveIndicators() {
if (this.empassessmentRoundListCheckbox.map(x => x.item).length > 0) { if (this.empassessmentRoundListCheckbox.map(x => x.item).length > 0) {
if (this.empassessmentList) { if (this.empassessmentList) {
this.empassessmentList.masfromEvaluationAssessment1lList = this.empassessmentRoundListCheckbox.map(x => { this.empassessmentList.masfromEvaluationAssessment1List = this.empassessmentRoundListCheckbox.map(x => {
x.item.weight = Number(x.item.weight); x.item.weight = Number(x.item.weight);
return x.item as any; return x.item as any;
}); });
...@@ -241,7 +241,7 @@ export class EditEvaluationFormComponent { ...@@ -241,7 +241,7 @@ export class EditEvaluationFormComponent {
this.numDataListChecked = this.empassessmentRoundListCheckbox.filter(x => x.checkbox).length this.numDataListChecked = this.empassessmentRoundListCheckbox.filter(x => x.checkbox).length
this.isChecked = this.numDataListChecked ? true : false this.isChecked = this.numDataListChecked ? true : false
} }
deleteFormOne(item: MasfromEvaluationAssessment1lList) { deleteFormOne(item: masfromEvaluationAssessment1List) {
this.selectData = item; this.selectData = item;
this.empassessmentRoundListCheckbox = this.empassessmentRoundListCheckbox.filter(i => i.item !== item); this.empassessmentRoundListCheckbox = this.empassessmentRoundListCheckbox.filter(i => i.item !== item);
this.checkTopic(); this.checkTopic();
...@@ -298,7 +298,7 @@ export class EditEvaluationFormComponent { ...@@ -298,7 +298,7 @@ export class EditEvaluationFormComponent {
const filteredData = this.filterIndicators(); const filteredData = this.filterIndicators();
this.pageIndicator = Array.from({ length: Math.ceil(filteredData.length / this.pageSizeIndicator) }, (_, i) => i + 1); this.pageIndicator = Array.from({ length: Math.ceil(filteredData.length / this.pageSizeIndicator) }, (_, i) => i + 1);
} }
addIndicators(item: MasfromEvaluationAssessment1lList) { addIndicators(item: masfromEvaluationAssessment1List) {
this.empassessmentRoundListCheckbox.push({ checkbox: false, item }) this.empassessmentRoundListCheckbox.push({ checkbox: false, item })
this.competencyTopicIds.push(item.groupAssessment1?.pmsTopic?.pmsTopicId) this.competencyTopicIds.push(item.groupAssessment1?.pmsTopic?.pmsTopicId)
this.indicatorChange(); this.indicatorChange();
......
...@@ -34,31 +34,34 @@ ...@@ -34,31 +34,34 @@
'open': menuItem.active, 'open': menuItem.active,
'active': menuItem.selected,}"> 'active': menuItem.selected,}">
<!-- head title --> <!-- head title -->
<span *ngIf="menuItem.headTitle" class="category-name">{{menuItem.headTitle}}</span> <span *ngIf="menuItem.headTitle" class="category-name">{{menuItem.headTitle| translate}}</span>
<!-- has-Link --> <!-- has-Link -->
<a class="side-menu__item" [routerLink]="!menuItem.type ? null : [menuItem.path]" <a class="side-menu__item" [routerLink]="!menuItem.type ? null : [menuItem.path]"
routerLinkActive="active" *ngIf="menuItem.type === 'link'" (click)="setNavActive(menuItem)"> routerLinkActive="active" *ngIf="menuItem.type === 'link'" (click)="setNavActive(menuItem)">
<img *ngIf="menuItem.icon" [src]="menuItem.icon" class="side-menu__icon" width="20" height="20" alt="icon" /> <img *ngIf="menuItem.icon" [src]="menuItem.icon" class="side-menu__icon" width="20" height="20"
alt="icon" />
<span class="side-menu__label">{{menuItem.title}}</span> <span class="side-menu__label">{{menuItem.title | translate}}</span>
</a> </a>
<!-- has-empty --> <!-- has-empty -->
<a class="side-menu__item" href="javascript:;" *ngIf="menuItem.type === 'empty'" <a class="side-menu__item" href="javascript:;" *ngIf="menuItem.type === 'empty'"
(click)="setNavActive(menuItem)"> (click)="setNavActive(menuItem)">
<img *ngIf="menuItem.icon" [src]="menuItem.icon" class="side-menu__icon" width="20" height="20" alt="icon" /> <img *ngIf="menuItem.icon" [src]="menuItem.icon" class="side-menu__icon" width="20" height="20"
alt="icon" />
<span class="side-menu__label">{{menuItem.title}}</span> <span class="side-menu__label">{{menuItem.title | translate}}</span>
</a> </a>
<!-- has-Sub --> <!-- has-Sub -->
<a class="side-menu__item with-sub cursor-pointer" [routerLink]="menuItem.type ? null: [menuItem.path]" <a class="side-menu__item with-sub cursor-pointer" [routerLink]="menuItem.type ? null: [menuItem.path]"
[ngClass]="{active: menuItem.selected}" *ngIf="menuItem.type === 'sub'" [ngClass]="{active: menuItem.selected}" *ngIf="menuItem.type === 'sub'"
(click)="toggleNavActive(menuItem)"> (click)="toggleNavActive(menuItem)">
<img *ngIf="menuItem.icon" [src]="menuItem.icon" class="side-menu__icon" width="20" height="20" alt="icon" /> <img *ngIf="menuItem.icon" [src]="menuItem.icon" class="side-menu__icon" width="20" height="20"
alt="icon" />
<span class="side-menu__label">{{menuItem.title}}</span> <span class="side-menu__label">{{menuItem.title | translate}}</span>
<span class="badge {{menuItem.badgeClass}} side-badge" <span class="badge {{menuItem.badgeClass}} side-badge"
*ngIf="menuItem.badgeClass && menuItem.badgeValue"> *ngIf="menuItem.badgeClass && menuItem.badgeValue">
{{menuItem.badgeValue}} {{menuItem.badgeValue| translate}}
</span> </span>
<i class="ri ri-arrow-right-s-line side-menu__angle"></i> <i class="ri ri-arrow-right-s-line side-menu__angle"></i>
</a> </a>
...@@ -66,7 +69,7 @@ ...@@ -66,7 +69,7 @@
<!-- 2nd Level menu --> <!-- 2nd Level menu -->
<ul class="slide-menu child1" *ngIf="menuItem.children" <ul class="slide-menu child1" *ngIf="menuItem.children"
[ngStyle]="{ display: menuItem.active ? 'block' : 'none' }"> [ngStyle]="{ display: menuItem.active ? 'block' : 'none' }">
<li class="slide side-menu__label1"><a href="javascript:void(0)">{{menuItem.title}}</a></li> <li class="slide side-menu__label1"><a href="javascript:void(0)">{{menuItem.title | translate}}</a></li>
<ng-container *ngFor="let childrenItem of menuItem.children"> <ng-container *ngFor="let childrenItem of menuItem.children">
<li *ngIf="childrenItem.show" class="slide" activeMenuItems <li *ngIf="childrenItem.show" class="slide" activeMenuItems
[ngClass]="{'is-expanded': childrenItem.active, active: childrenItem.active, 'sub-slide': childrenItem.type === 'sub'}"> [ngClass]="{'is-expanded': childrenItem.active, active: childrenItem.active, 'sub-slide': childrenItem.type === 'sub'}">
...@@ -75,18 +78,18 @@ ...@@ -75,18 +78,18 @@
[routerLink]="!childrenItem.type ? null : [childrenItem.path] " routerLinkActive="active" [routerLink]="!childrenItem.type ? null : [childrenItem.path] " routerLinkActive="active"
[routerLinkActiveOptions]="{exact: true}" *ngIf="childrenItem.type === 'link'" [routerLinkActiveOptions]="{exact: true}" *ngIf="childrenItem.type === 'link'"
(click)="setNavActive(childrenItem)"> (click)="setNavActive(childrenItem)">
{{childrenItem.title}} {{childrenItem.title | translate}}
</a> </a>
<!-- empty --> <!-- empty -->
<a class="side-menu__item !white-space-normal" href="javascript:;" <a class="side-menu__item !white-space-normal" href="javascript:;"
*ngIf="childrenItem.type === 'empty' " (click)="setNavActive(childrenItem)"> *ngIf="childrenItem.type === 'empty' " (click)="setNavActive(childrenItem)">
{{childrenItem.title }} {{childrenItem.title | translate}}
</a> </a>
<!-- sub --> <!-- sub -->
<a class="side-menu__item !white-space-normal" [ngClass]="{active: childrenItem.selected}" <a class="side-menu__item !white-space-normal" [ngClass]="{active: childrenItem.selected}"
[routerLink]="childrenItem.type ? null : [childrenItem.path]" *ngIf="childrenItem.type === 'sub'" [routerLink]="childrenItem.type ? null : [childrenItem.path]" *ngIf="childrenItem.type === 'sub'"
(click)="toggleNavActive(childrenItem)"> (click)="toggleNavActive(childrenItem)">
<span class="">{{childrenItem.title}}</span> <span class="">{{childrenItem.title | translate}}</span>
<i class="ri ri-arrow-right-s-line side-menu__angle"></i> <i class="ri ri-arrow-right-s-line side-menu__angle"></i>
</a> </a>
<!-- 3rd Level menu --> <!-- 3rd Level menu -->
...@@ -101,11 +104,11 @@ ...@@ -101,11 +104,11 @@
<a class="side-menu__item" routerLinkActive="active" <a class="side-menu__item" routerLinkActive="active"
[routerLink]="!childrenSubItem.type ? null : [childrenSubItem.path]" [routerLink]="!childrenSubItem.type ? null : [childrenSubItem.path]"
*ngIf="childrenSubItem.type === 'link'" [routerLinkActiveOptions]="{exact : true}"> *ngIf="childrenSubItem.type === 'link'" [routerLinkActiveOptions]="{exact : true}">
{{childrenSubItem.title}} {{localdata['synto-dir']}} {{childrenSubItem.title| translate}} {{localdata['synto-dir']}}
</a> </a>
<!-- empty --> <!-- empty -->
<a class="side-menu__item" href="javascript:;" *ngIf="childrenSubItem.type === 'empty'"> <a class="side-menu__item" href="javascript:;" *ngIf="childrenSubItem.type === 'empty'">
{{childrenSubItem.title}} {{childrenSubItem.title| translate}}
</a> </a>
</li> </li>
</ng-container> </ng-container>
...@@ -128,4 +131,4 @@ ...@@ -128,4 +131,4 @@
<!-- End::main-sidebar --> <!-- End::main-sidebar -->
</aside> </aside>
<!-- End::app-sidebar --> <!-- End::app-sidebar -->
\ No newline at end of file
...@@ -738,7 +738,7 @@ export interface AppraisalCompentencyModel2 { ...@@ -738,7 +738,7 @@ export interface AppraisalCompentencyModel2 {
apsapprove3: Apsapprove3 apsapprove3: Apsapprove3
apsapprove4: Apsapprove4 apsapprove4: Apsapprove4
apsapprove5: Apsapprove5 apsapprove5: Apsapprove5
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1lList[] masfromEvaluationAssessment1List: masfromEvaluationAssessment1List[]
currentStep: string currentStep: string
lastStep: string lastStep: string
checkStep: string checkStep: string
...@@ -1411,7 +1411,7 @@ export interface Time06 { ...@@ -1411,7 +1411,7 @@ export interface Time06 {
hourD: number hourD: number
} }
export interface MasfromEvaluationAssessment1lList { export interface masfromEvaluationAssessment1List {
plId: string plId: string
companyId: string companyId: string
lineNo: number lineNo: number
......
...@@ -46,7 +46,7 @@ export interface Competency { ...@@ -46,7 +46,7 @@ export interface Competency {
comType: string comType: string
currentStep: string currentStep: string
lastStep: string lastStep: string
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1lList[] masfromEvaluationAssessment1List: masfromEvaluationAssessment1List[]
masfromEvaluationRound: MasfromEvaluationRound masfromEvaluationRound: MasfromEvaluationRound
masfromStatusType: MasfromStatusType masfromStatusType: MasfromStatusType
personalLevel: PersonalLevel2 personalLevel: PersonalLevel2
...@@ -694,7 +694,7 @@ export interface Time06 { ...@@ -694,7 +694,7 @@ export interface Time06 {
time0id: string time0id: string
} }
export interface MasfromEvaluationAssessment1lList { export interface masfromEvaluationAssessment1List {
apsapprove1Comment: string apsapprove1Comment: string
apsapprove1Date: string apsapprove1Date: string
apsapprove1Status: string apsapprove1Status: string
...@@ -734,6 +734,8 @@ export interface MasfromEvaluationAssessment1lList { ...@@ -734,6 +734,8 @@ export interface MasfromEvaluationAssessment1lList {
weightedTotalBoss: number weightedTotalBoss: number
weightedTotal: number weightedTotal: number
masfromEvaluationAssessment2List: MasfromEvaluationAssessment2List[] masfromEvaluationAssessment2List: MasfromEvaluationAssessment2List[]
scoreGab: string
scoreGabBoss: string
} }
export interface MasfromEvaluationAssessment2List { export interface MasfromEvaluationAssessment2List {
......
import { MasfromEvaluationAssessment1lList } from "./pms-masfrom-evaluation-list.model" import { masfromEvaluationAssessment1List } from "./pms-masfrom-evaluation-list.model"
export interface EvaluationModal { export interface EvaluationModal {
personalLevel: PersonalLevel personalLevel: PersonalLevel
...@@ -13,7 +13,7 @@ import { MasfromEvaluationAssessment1lList } from "./pms-masfrom-evaluation-list ...@@ -13,7 +13,7 @@ import { MasfromEvaluationAssessment1lList } from "./pms-masfrom-evaluation-list
apsapprove5: Apsapprove5 apsapprove5: Apsapprove5
masfromTypeList: MasfromTypeList[] masfromTypeList: MasfromTypeList[]
masfromTopic: MasfromTopic[] masfromTopic: MasfromTopic[]
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1lList[] masfromEvaluationAssessment1List: masfromEvaluationAssessment1List[]
} }
export interface PersonalLevel { export interface PersonalLevel {
......
...@@ -26,7 +26,7 @@ export interface PmsMasfromEvaluationFullModel { ...@@ -26,7 +26,7 @@ export interface PmsMasfromEvaluationFullModel {
apsapprove3Score: any apsapprove3Score: any
apsapprove4Score: any apsapprove4Score: any
apsapprove5Score: any apsapprove5Score: any
masfromEvaluationAssessment1lList: MasfromEvaluationAssessment1lList[] masfromEvaluationAssessment1List: masfromEvaluationAssessment1List[]
} }
export interface PersonalLevel { export interface PersonalLevel {
...@@ -671,7 +671,7 @@ export interface PmsMasfromEvaluationFullModel { ...@@ -671,7 +671,7 @@ export interface PmsMasfromEvaluationFullModel {
hourD: number hourD: number
} }
export interface MasfromEvaluationAssessment1lList { export interface masfromEvaluationAssessment1List {
companyId?: string companyId?: string
weight?: number weight?: number
scoreTopicExpectation: any scoreTopicExpectation: any
......
...@@ -148,7 +148,7 @@ export class NavService implements OnDestroy { ...@@ -148,7 +148,7 @@ export class NavService implements OnDestroy {
getAdminMenu() { getAdminMenu() {
return [ return [
{ {
title: 'Dashboard', title: 'menu.Dashboard',
type: 'link', type: 'link',
selected: true, selected: true,
active: true, active: true,
...@@ -171,7 +171,7 @@ export class NavService implements OnDestroy { ...@@ -171,7 +171,7 @@ export class NavService implements OnDestroy {
// ], // ],
// }, // },
{ {
title: 'จัดการข้อมูลองค์กร', title: 'menu.Organization',
type: 'sub', type: 'sub',
selected: false, selected: false,
active: false, active: false,
...@@ -180,12 +180,12 @@ export class NavService implements OnDestroy { ...@@ -180,12 +180,12 @@ export class NavService implements OnDestroy {
show: true, show: true,
icon: 'assets/img/icons-menu/enterprise-data-management.png', icon: 'assets/img/icons-menu/enterprise-data-management.png',
children: [ children: [
{ id: 'm21', path: 'admin/company-registration', title: 'ทะเบียนบริษัท', type: 'link', show: true }, { id: 'm21', path: 'admin/company-registration', title: 'menu.Company', type: 'link', show: true },
{ id: 'm22', path: 'admin/job-description', title: 'ข้อมูลลักษณะงาน', type: 'link', show: true }, { id: 'm22', path: 'admin/job-description', title: 'menu.JobDescription', type: 'link', show: true },
{ id: 'm23', path: 'admin/employee-registration', title: 'ทะเบียนพนักงาน', type: 'link', show: true }, { id: 'm23', path: 'admin/employee-registration', title: 'menu.Employee', type: 'link', show: true },
{ id: 'm24', path: 'admin/day-type-registry', title: 'ทะเบียนประเภทวัน', type: 'link', show: true }, { id: 'm24', path: 'admin/day-type-registry', title: 'menu.LeaveType', type: 'link', show: true },
{ id: 'm25', path: 'admin/account-settings', title: 'ตั้งค่าชื่อผู้ใช้', type: 'link', show: true }, { id: 'm25', path: 'admin/account-settings', title: 'menu.UserSetting', type: 'link', show: true },
{ id: 'm26', path: 'admin/role-permission-config', title: 'กำหนดสิทธิการเข้าใช้งาน', type: 'link', show: true }, { id: 'm26', path: 'admin/role-permission-config', title: 'menu.AccessPermissions', type: 'link', show: true },
], ],
}, },
{ {
......
...@@ -8,7 +8,7 @@ import { AppraisalModel } from '../model/appraisal.model'; ...@@ -8,7 +8,7 @@ import { AppraisalModel } from '../model/appraisal.model';
import { AppraisalRoundModel } from '../model/appraisal-aps.model'; import { AppraisalRoundModel } from '../model/appraisal-aps.model';
import { EvaluationModal } from '../model/evaluation-form.modal'; import { EvaluationModal } from '../model/evaluation-form.modal';
import { PmsMasfromEvaluationModel } from '../model/pms-masfrom-evaluation.model'; import { PmsMasfromEvaluationModel } from '../model/pms-masfrom-evaluation.model';
import { MasfromEvaluationAssessment1lList, PmsMasfromEvaluationFullModel } from '../model/pms-masfrom-evaluation-list.model'; import { masfromEvaluationAssessment1List, PmsMasfromEvaluationFullModel } from '../model/pms-masfrom-evaluation-list.model';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -27,11 +27,11 @@ export class PmsEvaluationAssessmentService { ...@@ -27,11 +27,11 @@ export class PmsEvaluationAssessmentService {
getApsassessy(evaluationRoundId: string, apsassessy: string, apsyear: string): Observable<EvaluationModal> { getApsassessy(evaluationRoundId: string, apsassessy: string, apsyear: string): Observable<EvaluationModal> {
return this.http.get<EvaluationModal>(this.urlApi + "/" + evaluationRoundId + "/" + apsassessy + "/" + apsyear) return this.http.get<EvaluationModal>(this.urlApi + "/" + evaluationRoundId + "/" + apsassessy + "/" + apsyear)
} }
getApsassessyMini(evaluationRoundId: string, apsassessy: string, apsyear: string): Observable<MasfromEvaluationAssessment1lList[]> { getApsassessyMini(evaluationRoundId: string, apsassessy: string, apsyear: string): Observable<masfromEvaluationAssessment1List[]> {
return this.http.get<MasfromEvaluationAssessment1lList[]>(this.urlApi + "/mini/" + evaluationRoundId + "/" + apsassessy + "/" + apsyear) return this.http.get<masfromEvaluationAssessment1List[]>(this.urlApi + "/mini/" + evaluationRoundId + "/" + apsassessy + "/" + apsyear)
} }
getIndicators(jobCodeId: string): Observable<MasfromEvaluationAssessment1lList[]> { getIndicators(jobCodeId: string): Observable<masfromEvaluationAssessment1List[]> {
return this.http.get<MasfromEvaluationAssessment1lList[]>(this.urlApi + "/pms-topic/list/" + jobCodeId) return this.http.get<masfromEvaluationAssessment1List[]>(this.urlApi + "/pms-topic/list/" + jobCodeId)
} }
post(body: PmsMasfromEvaluationFullModel): Observable<AlertModel> { post(body: PmsMasfromEvaluationFullModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body) return this.http.post<AlertModel>(this.urlApi, body)
......
...@@ -20,8 +20,7 @@ import { HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http'; ...@@ -20,8 +20,7 @@ import { HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
import { ConfigPermissionService } from './services/config-permission.service'; import { ConfigPermissionService } from './services/config-permission.service';
import { HttpRequestInterceptor } from './services/http-request.interceptor'; import { HttpRequestInterceptor } from './services/http-request.interceptor';
import { FileService } from './services/file.service'; import { FileService } from './services/file.service';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { TranslateJsonLoader } from '../translate-json.loader';
@NgModule({ @NgModule({
...@@ -44,13 +43,7 @@ import { TranslateJsonLoader } from '../translate-json.loader'; ...@@ -44,13 +43,7 @@ import { TranslateJsonLoader } from '../translate-json.loader';
SimplebarAngularModule, SimplebarAngularModule,
ColorPickerModule, ColorPickerModule,
FormsModule, FormsModule,
TranslateModule.forRoot({ TranslateModule
loader: {
provide: TranslateLoader,
useClass: TranslateJsonLoader,
deps: [HttpClient]
}
})
], ],
exports: [ exports: [
......
{ {
"Thai (TH)": "ไทย (TH)", "Thai (TH)": "ไทย (TH)",
"English (US)": "อังกฤษ (US)" "English (US)": "อังกฤษ (US)",
"menu": {
"Dashboard": "Dashboard",
"Organization": "Organization",
"Company": "Company",
"JobDescription": "JobDescription",
"Employee": "Employee",
"LeaveType": "LeaveType",
"UserSetting": "UserSetting",
"AccessPermissions": "AccessPermissions"
},
"SearchByNoOrName": "Search by No. or Name",
"Import": "Import",
"Add": "Add",
"Delete": "Delete",
"Print": "Print",
"ExcelExport": "Excel Export",
"CsvExport": "CSV Export",
"Selected": "Selected",
"CompanyCode": "Company Code",
"CompanyDescThai": "Company Desc. (Thai)",
"CompanyDescEng": "Company Desc. (Eng)",
"Action": "Action",
"Item": "Item"
} }
\ No newline at end of file
{ {
"Thai (TH)": "ไทย (TH)", "Thai (TH)": "ไทย (TH)",
"English (US)": "อังกฤษ (US)" "English (US)": "อังกฤษ (US)",
"menu": {
"Dashboard": "แดชบอร์ด",
"Organization": "จัดการข้อมูลองค์กร",
"Company": "ทะเบียนบริษัท",
"JobDescription": "ข้อมูลลักษณะงาน",
"Employee": "ทะเบียนพนักงาน",
"LeaveType": "ทะเบียนประเภทวัน",
"UserSetting": "ตั้งค่าผู้ใช้งาน",
"AccessPermissions": "กำหนดสิทธิการเข้าใช้งาน"
},
"SearchByNoOrName": "ค้นหาตามรหัสหรือชื่อ",
"Import": "นำเข้า",
"Add": "เพิ่ม",
"Delete": "ลบ",
"Print": "พิมพ์",
"ExcelExport": "ส่งออก Excel",
"CsvExport": "ส่งออก CSV",
"Selected": "เลือก",
"CompanyCode": "รหัสบริษัท",
"CompanyDescThai": "รายละเอียดบริษัท (ไทย)",
"CompanyDescEng": "รายละเอียดบริษัท (อังกฤษ)",
"Action": "การจัดการ",
"Item": "รายการ"
} }
\ 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