Commit d5958642 by Nattana Chaiyamat

แปลภาษา part1

parent 815eabb2
...@@ -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.CompetencyManage' | 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-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,20 +11,20 @@ ...@@ -11,20 +11,20 @@
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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)="currentPath = 1;pathTitle = ['การประเมินสมรรถนะ','การจัดการสมรรถนะ','ตัวชี้วัดเเละหลักสูตร']"> (click)="currentPath = 1;pathTitle = ['CompetencySystem', 'menu.CompetencyManage','BIsAndCDR']">
ตัวชี้วัดเเละหลักสูตร {{'BIsAndCDR' | 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 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 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"
aria-controls="underline-2" aria-controls="underline-2"
(click)="currentPath = 2;pathTitle = ['การประเมินสมรรถนะ','การจัดการสมรรถนะ','จัดกลุ่มสมรรถนะ']"> (click)="currentPath = 2;pathTitle = ['CompetencySystem', 'menu.CompetencyManage','CompetencyMapping']">
จัดกลุ่มสมรรถนะ {{'CompetencyMapping' | 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 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 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-3" data-hs-tab="#underline-3" href="javascript:void(0);" id="underline-item-3" data-hs-tab="#underline-3"
aria-controls="underline-3" aria-controls="underline-3"
(click)="currentPath = 3;pathTitle = ['การประเมินสมรรถนะ','การจัดการสมรรถนะ','กำหนดผู้ประเมิน']"> (click)="currentPath = 3;pathTitle = ['CompetencySystem', 'menu.CompetencyManage','AssignApprover']">
กำหนดผู้ประเมิน {{'AssignApprover' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,6 +6,6 @@ import { Component } from '@angular/core'; ...@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./competency-management.component.scss'] styleUrls: ['./competency-management.component.scss']
}) })
export class CompetencyManagementComponent { export class CompetencyManagementComponent {
pathTitle = ['การประเมินสมรรถนะ', 'การจัดการสมรรถนะ','ตัวชี้วัดและหลักสูตร'] pathTitle = ['CompetencySystem', 'menu.CompetencyManage','BIsAndCDR']
currentPath = 1 currentPath = 1
} }
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500" <button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
(click)="onEdit()"> (click)="onEdit()">
<i class="ti ti-chevron-left"></i> <i class="ti ti-chevron-left"></i>
ย้อนกลับ {{'Back' | translate}}
</button> </button>
<div class="font-size-18px font-weight-700 align-center font-bold py-2 text-primary px-4"> <div class="font-size-18px font-weight-700 align-center font-bold py-2 text-primary px-4">
แก้ไขกลุ่มสมรรถนะ {{'EditCompetencyMapping' | translate}}
</div> </div>
</div> </div>
</div> </div>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div *ngIf="jobCode" class="py-2 border-b-2 border-collapse "> <div *ngIf="jobCode" class="py-2 border-b-2 border-collapse ">
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
<div class="col-span-1"> <div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">รหัส</label> <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">{{'JDCode' | translate}}</label>
</div> </div>
</div> </div>
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
...@@ -27,10 +27,12 @@ ...@@ -27,10 +27,12 @@
</div> </div>
<div class="grid grid-cols-3 gap-6 mt-5"> <div class="grid grid-cols-3 gap-6 mt-5">
<div class="col-span-1"> <div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">ชื่อลักษณะงาน (ไทย)</label> <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">{{'JobDescriptionThai'|
translate}}</label>
</div> </div>
<div class="col-span-1"> <div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">ชื่อลักษณะงาน (อังกฤษ)</label> <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">{{'JobDescriptionEng'|
translate}}</label>
</div> </div>
</div> </div>
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
...@@ -56,7 +58,7 @@ ...@@ -56,7 +58,7 @@
<input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox" <input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox"
[(ngModel)]="isDataListChecked"> [(ngModel)]="isDataListChecked">
<label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none"> <label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none">
{{numDataListChecked}} Selected</label> {{numDataListChecked}} {{'Selected'| translate}}</label>
</div> </div>
<div class="mx-1 flex items-center"> <div class="mx-1 flex items-center">
<button (click)="isDataListCheckedAll = !isDataListCheckedAll;dataListCheckAll()" <button (click)="isDataListCheckedAll = !isDataListCheckedAll;dataListCheckAll()"
...@@ -64,7 +66,7 @@ ...@@ -64,7 +66,7 @@
<i class="fs-l transition-all duration-200" <i class="fs-l transition-all duration-200"
[ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i> [ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i>
</button> </button>
<label class="text-sm text-gray-500 ml-2">Select All</label> <label class="text-sm text-gray-500 ml-2">{{'SelectAll' | translate}}</label>
</div> </div>
</div> </div>
</div> </div>
...@@ -73,8 +75,9 @@ ...@@ -73,8 +75,9 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
style="height: 40px;" [(ngModel)]="search" (ngModelChange)="searchChange()"> [placeholder]="'SearchByNoOrName' | translate" style="height: 40px;" [(ngModel)]="search"
(ngModelChange)="searchChange()">
<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>
...@@ -85,21 +88,21 @@ ...@@ -85,21 +88,21 @@
<button type="button" class="ti-btn ti-btn-soft-success h-20px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-success h-20px m-0 shadow-md"
data-hs-overlay="#edit-group-competencies-alert-add-modal"> data-hs-overlay="#edit-group-competencies-alert-add-modal">
<i class="ri-save-3-line"></i> <i class="ri-save-3-line"></i>
Save {{'Save' | translate}}
</button> </button>
</div> </div>
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
(click)="searchModalChange()" data-hs-overlay="#edit-group-competencies-table-modal-select"> (click)="searchModalChange()" data-hs-overlay="#edit-group-competencies-table-modal-select">
<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-20px m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
data-hs-overlay="#edit-group-competencies-alert-delete-modal" (click)="groupAssessmentIndex=-1"> data-hs-overlay="#edit-group-competencies-alert-delete-modal" (click)="groupAssessmentIndex=-1">
<i class="ri-delete-bin-6-line"></i> <i class="ri-delete-bin-6-line"></i>
Delete {{'Delete' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -121,10 +124,10 @@ ...@@ -121,10 +124,10 @@
<thead> <thead>
<tr> <tr>
<ng-container <ng-container
*ngFor="let item of ['รหัสสมรรถนะ','ชื่อสมรรถนะ','ระดับความหวัง']; let f = first; let l = last; let i = index"> *ngFor="let item of ['CompetencyCode','CompetencyName','ProficiencyLevel']; let f = first; let l = last; let i = index">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f || l || item === 'ระดับความหวัง'"> [class.!text-center]="f || l || item === 'ProficiencyLevel'">
<span class="text-sm">{{ item }}</span> <span class="text-sm">{{ item | translate}}</span>
</th> </th>
</ng-container> </ng-container>
</tr> </tr>
...@@ -142,7 +145,7 @@ ...@@ -142,7 +145,7 @@
<tbody *ngIf="!dataLoading&&!dataListFilter().length"> <tbody *ngIf="!dataLoading&&!dataListFilter().length">
<tr> <tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล {{'NoInformation' | translate}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -223,7 +226,7 @@ ...@@ -223,7 +226,7 @@
<div class="max-h-full overflow-hidden ti-modal-content"> <div class="max-h-full overflow-hidden ti-modal-content">
<div class="ti-modal-header"> <div class="ti-modal-header">
<h3 class="text-xxl font-bold text-primary"> <h3 class="text-xxl font-bold text-primary">
รายการสมรรถนะ {{'CompetencyTopics_list' | translate}}
</h3> </h3>
<div class="flex justify-end"> <div class="flex justify-end">
<button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger" <button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger"
...@@ -260,10 +263,10 @@ ...@@ -260,10 +263,10 @@
<thead> <thead>
<tr> <tr>
<ng-container <ng-container
*ngFor="let item of ['รหัส','ชื่อสมรรถนะ','ระดับความคาดหวัง','การจัดการ']; let f = first; let l = last; let i = index"> *ngFor="let item of ['Competency_Code','CompetencyName','ProficiencyLevel','Action']; let f = first; let l = last; let i = index">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f||l"> [class.!text-center]="f||l">
<span class="text-sm">{{ item }}</span> <span class="text-sm">{{ item | translate}}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" <div class="absolute top-1/2 transform -translate-y-1/2 right-0"
*ngIf="!f && i==1"> *ngIf="!f && i==1">
<svg class="head-table-icon" xmlns="http://www.w3.org/2000/svg" <svg class="head-table-icon" xmlns="http://www.w3.org/2000/svg"
...@@ -299,7 +302,7 @@ ...@@ -299,7 +302,7 @@
<tbody *ngIf="!dataLoading&&!dataListModalFilter().length"> <tbody *ngIf="!dataLoading&&!dataListModalFilter().length">
<tr> <tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล {{'NoInformation' | translate}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -321,7 +324,7 @@ ...@@ -321,7 +324,7 @@
(click)="selectIndicatorsCourses(item.data)" (click)="selectIndicatorsCourses(item.data)"
data-hs-overlay="#edit-group-competencies-table-modal-select"> data-hs-overlay="#edit-group-competencies-table-modal-select">
<i class="ri-add-line"></i> <i class="ri-add-line"></i>
Select {{'Select' | translate}}
</button> </button>
</div> </div>
</td> </td>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(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>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
data-hs-overlay="#group-competencies-upload-modal" data-hs-overlay="#group-competencies-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> </div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="page px-rem"> <div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search"
[dataSource]="groupCompetenciesList" [checkBoxSetting]="false" [columns]="columns" [dataSource]="syncfutionDataList" [checkBoxSetting]="false" [columns]="columns"
(sendSelectData)="selectGroupCompetencies($event); editTab = true"> (sendSelectData)="selectGroupCompetencies($event); editTab = true">
</app-datagrid-syncfution> </app-datagrid-syncfution>
</div> </div>
......
import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { ColumnModel } from '@syncfusion/ej2-grids'; import { ColumnModel } from '@syncfusion/ej2-grids';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model'; import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
...@@ -22,20 +23,20 @@ export class GroupCompetenciesComponent { ...@@ -22,20 +23,20 @@ export class GroupCompetenciesComponent {
selectedFile: File | null = null; selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์'; selectedFileName: string = 'กรุณาเลือกไฟล์';
syncfutionDataList: any[] = []
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "jobCodeId", field: "jobCodeId",
headerText: "รหัส", headerText: "JDCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "name",
headerText: "ชื่อหัวข้อ", headerText: "JobDescription",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
fields: ['competencyTopicId', 'tdesc'], fields: ['jobCodeId', 'name'],
operator: 'contains', operator: 'contains',
ignoreCase: false ignoreCase: false
}; };
...@@ -46,8 +47,13 @@ export class GroupCompetenciesComponent { ...@@ -46,8 +47,13 @@ export class GroupCompetenciesComponent {
private cdr: ChangeDetectorRef, private cdr: ChangeDetectorRef,
private fileService: FileService, private fileService: FileService,
private jobcodeService: JobcodeService, private jobcodeService: JobcodeService,
private translateService: TranslateService
) { ) {
this.pathTitleChange() this.pathTitleChange()
this.translateService.onLangChange.subscribe((event) => {
this.setSyncfutionDataList()
});
} }
ngOnInit(): void { ngOnInit(): void {
this.getGroupCompetenciesList() this.getGroupCompetenciesList()
...@@ -112,6 +118,7 @@ export class GroupCompetenciesComponent { ...@@ -112,6 +118,7 @@ export class GroupCompetenciesComponent {
this.selectedItems.data.set(x.jobCodeId, false) this.selectedItems.data.set(x.jobCodeId, false)
return new MyJobcodeModel(x) return new MyJobcodeModel(x)
}) })
this.setSyncfutionDataList()
this.groupCompetenciesList = response this.groupCompetenciesList = response
this.dataLoading = false this.dataLoading = false
this.cdr.detectChanges() this.cdr.detectChanges()
...@@ -121,8 +128,15 @@ export class GroupCompetenciesComponent { ...@@ -121,8 +128,15 @@ export class GroupCompetenciesComponent {
} }
}) })
} }
setSyncfutionDataList() {
selectGroupCompetencies(data: JobcodeModel) { if (this.groupCompetenciesList) {
this.syncfutionDataList = this.groupCompetenciesList.map(e => ({
jobCodeId: e.jobCodeId,
name: this.translateService.getCurrentLang() == 'th' ? e.tdesc : e.edesc,
}))
}
}
selectGroupCompetencies(data: any) {
const groupCompetencies = this.groupCompetenciesList.find(x => x.jobCodeId == data.jobCodeId) const groupCompetencies = this.groupCompetenciesList.find(x => x.jobCodeId == data.jobCodeId)
this.groupCompetencies = new MyJobcodeModel(groupCompetencies) this.groupCompetencies = new MyJobcodeModel(groupCompetencies)
} }
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500" <button type="button" class="ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
(click)="onEdit()"> (click)="onEdit()">
<i class="ti ti-chevron-left"></i> <i class="ti ti-chevron-left"></i>
ย้อนกลับ {{'Back' | translate}}
</button> </button>
<div class="font-size-18px font-weight-700 align-center text-primary pl-1rem"> <div class="font-size-18px font-weight-700 align-center text-primary pl-1rem">
การจัดการตัวชี้วัดเเละหลักสูตร {{'BIsAndCDRManage' | translate}}
</div> </div>
</div> </div>
<div class="flex justify-end"> <div class="flex justify-end">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<button type="button" class="ti-btn ti-btn-soft-success h-45px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-success h-45px m-0 shadow-md"
data-hs-overlay="#edit-group-indicators-alert-modal"> data-hs-overlay="#edit-group-indicators-alert-modal">
<i class="ri-save-3-line"></i> <i class="ri-save-3-line"></i>
Save {{'Save' | translate}}
</button> </button>
</div> </div>
<div class="px-1" *ngIf="!seeTab"> <div class="px-1" *ngIf="!seeTab">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<polyline points="48.97 24 48.97 15.03 56 15.03"></polyline> <polyline points="48.97 24 48.97 15.03 56 15.03"></polyline>
</g> </g>
</svg> </svg>
Clear {{'Clear' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -50,24 +50,24 @@ ...@@ -50,24 +50,24 @@
<div class="border-t border-gray-200 pt-10px grid grid-cols-1 space-y-6"> <div class="border-t border-gray-200 pt-10px grid grid-cols-1 space-y-6">
<div class="grid grid-cols-11"> <div class="grid grid-cols-11">
<div class="space-y-2 col-span-2"> <div class="space-y-2 col-span-2">
<label class="ti-form-label">รหัสสมรรถนะ</label> <label class="ti-form-label">{{'CompetencyCode' | translate}}</label>
<input type="text" class="ti-form-input bg-input-readonly" readonly <input type="text" class="ti-form-input bg-input-readonly" readonly
[(ngModel)]="indicatorsCourses.competencyTopic.competencyTopicId"> [(ngModel)]="indicatorsCourses.competencyTopic.competencyTopicId">
</div> </div>
<div class="col-span-1"></div> <div class="col-span-1"></div>
<div class="space-y-2 col-span-2"> <div class="space-y-2 col-span-2">
<label class="ti-form-label">ประเภท</label> <label class="ti-form-label">{{'CompetencyType_type' | translate }}</label>
<input type="text" class="ti-form-input bg-input-readonly" readonly <input type="text" class="ti-form-input bg-input-readonly" readonly
[(ngModel)]="indicatorsCourses.competencyTopic.competencyType.shortName"> [(ngModel)]="indicatorsCourses.competencyTopic.competencyType.shortName">
</div> </div>
</div> </div>
<div class="space-y-2"> <div class="space-y-2">
<label class="ti-form-label">ชื่อสมรรถนะ</label> <label class="ti-form-label">{{'CompetencyName' | translate }}</label>
<textarea type="text" rows="2" class="ti-form-input bg-input-readonly" readonly <textarea type="text" rows="2" class="ti-form-input bg-input-readonly" readonly
[(ngModel)]="indicatorsCourses.tdesc"> </textarea> [(ngModel)]="indicatorsCourses.tdesc"> </textarea>
</div> </div>
<div class="space-y-2"> <div class="space-y-2">
<label class="ti-form-label">นิยามสมรรถนะ</label> <label class="ti-form-label">{{'CompetencyDefinition' | translate }}</label>
<textarea type="text" rows="3" class="ti-form-input bg-input-readonly" readonly <textarea type="text" rows="3" class="ti-form-input bg-input-readonly" readonly
[(ngModel)]="indicatorsCourses.indicatorsCourseDetailTh"></textarea> [(ngModel)]="indicatorsCourses.indicatorsCourseDetailTh"></textarea>
</div> </div>
...@@ -81,10 +81,10 @@ ...@@ -81,10 +81,10 @@
<thead class="height-50px"> <thead class="height-50px">
<tr class="font-size-12px"> <tr class="font-size-12px">
<ng-container <ng-container
*ngFor="let item of ['ระดับความคาดหวัง','ตัวชี้วัดพฤติกรรม','เครื่องมือประเมิน','หลักสูตร']; let f = first; let l = last"> *ngFor="let item of ['ExpectationLevel','BehavioralIndicators','AssessmentTools','CDR']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f||l"> [class.!text-center]="f||l">
<span class="font-size-12px font-weight-700">{{ item }}</span> <span class="font-size-12px font-weight-700">{{ item | translate }}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l"> <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
<i class="ti ti-dots-vertical fs-l"></i> <i class="ti ti-dots-vertical fs-l"></i>
</div> </div>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
[ngClass]="{'ti-btn-disabled': !data.behaviorIndicators[data.behaviorIndicators.length-1]}" [ngClass]="{'ti-btn-disabled': !data.behaviorIndicators[data.behaviorIndicators.length-1]}"
[disabled]="!data.behaviorIndicators[data.behaviorIndicators.length-1]" [disabled]="!data.behaviorIndicators[data.behaviorIndicators.length-1]"
(click)="dataSelect=data;dataSelectIndex=i;addBehaviorIndicators()"> (click)="dataSelect=data;dataSelectIndex=i;addBehaviorIndicators()">
add {{'Add' | translate}}
</button> </button>
</div> </div>
</td> </td>
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div class="flex justify-end"> <div class="flex justify-end">
<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 " [placeholder]="'SearchByNoOrName' | translate" <input type="text" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(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>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
data-hs-overlay="#group-indicators-upload-modal" data-hs-overlay="#group-indicators-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> </div>
......
...@@ -28,18 +28,18 @@ export class IndicatorsAndCurriculumComponent { ...@@ -28,18 +28,18 @@ export class IndicatorsAndCurriculumComponent {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "competencyTopicId", field: "competencyTopicId",
headerText: "รหัส", headerText: "CompetencyCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "ชื่อหัวข้อ", headerText: "CompetencyName",
type: "string" type: "string"
}, },
{ {
field: "competencyType.tdesc", field: "competencyType.tdesc",
headerText: "ประเภท", headerText: "CompetencyType",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
...@@ -178,7 +178,7 @@ export class IndicatorsAndCurriculumComponent { ...@@ -178,7 +178,7 @@ export class IndicatorsAndCurriculumComponent {
this.editTab = false; this.editTab = false;
this.seeTab = true; this.seeTab = true;
} }
onEditClicked(item: any) { onEditClicked(item: any) {
this.selectIndicatorsCourses(item); this.selectIndicatorsCourses(item);
this.editTab = true; this.editTab = true;
...@@ -186,7 +186,7 @@ export class IndicatorsAndCurriculumComponent { ...@@ -186,7 +186,7 @@ export class IndicatorsAndCurriculumComponent {
} }
pathTitleChange() { pathTitleChange() {
this.sendPathTitle.emit(this.editTab ? ['การประเมินสมรรถนะ', 'การจัดการสมรรถนะ', 'ตัวชี้วัดเเละหลักสูตร', 'การจัดการตัวชี้วัดเเละหลักสูตร'] : ['การประเมินสมรรถนะ', 'การจัดการสมรรถนะ', 'ตัวชี้วัดเเละหลักสูตร']) this.sendPathTitle.emit(this.editTab ? ['CompetencySystem', 'CompetencyManage', 'BIsAndCDR', 'การจัดการตัวชี้วัดเเละหลักสูตร'] : ['CompetencySystem', 'CompetencyManage', 'BIsAndCDR'])
} }
checkPrimary() { checkPrimary() {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
data-hs-overlay="#set-approvers-upload-modal" data-hs-overlay="#set-approvers-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> </div>
...@@ -33,27 +33,26 @@ ...@@ -33,27 +33,26 @@
<ng-template #setApproversModal let-modal> <ng-template #setApproversModal let-modal>
<h3 mat-dialog-title> <h3 mat-dialog-title>
{{currentModal=='add'?'เพิ่มหัวข้อสมรรถนะ':'กำหนดผู้ประเมิน'}} {{currentModal=='add'?'เพิ่มหัวข้อสมรรถนะ':'AssignApprover' | translate}}
</h3> </h3>
<div class="w-full flex justify-end mb-1rem"> <div class="w-full flex justify-end mb-1rem">
<div class="absolute flex"> <div class="absolute flex">
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="clear()">
(click)="clear()">
<i class="ti ti-eraser text-base"></i> <i class="ti ti-eraser text-base"></i>
Clear {{'Clear' | translate}}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<mat-dialog-content> <mat-dialog-content>
<label for="input-label" class="ti-form-label">ชื่อพนักงาน<span class="text-danger">*</span></label> <label for="input-label" class="ti-form-label">{{'EmployeeName' | translate}}<span class="text-danger">*</span></label>
<input type="text" id="input-label" class="ti-form-input w-1/2 !bg-input-readonly" readonly <input type="text" id="input-label" class="ti-form-input w-1/2 !bg-input-readonly" readonly
[value]="groupapprove.apsassessy.thFullName"> [value]="groupapprove.apsassessy.thFullName">
<label for="input-label" class="ti-form-label mt-2rem">ระดับพนักงาน</label> <label for="input-label" class="ti-form-label mt-2rem">{{'JobLevelJL' | translate}}</label>
<input type="text" id="input-label" class="ti-form-input w-1/2 bg-input-readonly" readonly <input type="text" id="input-label" class="ti-form-input w-1/2 bg-input-readonly" readonly
[value]="groupapprove.personalLevel.tdesc"> [value]="groupapprove.personalLevel.tdesc">
<label class="ti-form-label mt-2rem">ผู้ประเมินลำดับที่ 1</label> <label class="ti-form-label mt-2rem">{{'Assessor1'| translate}}</label>
<div class="flex"> <div class="flex">
<div class="relative flex rounded-md w-2/3"> <div class="relative flex rounded-md w-2/3">
<input type="text" name="hs-leading-button-add-on-with-icon-and-button" <input type="text" name="hs-leading-button-add-on-with-icon-and-button"
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
</div> </div>
</div> </div>
<ng-container *ngIf="groupapprove.apsapprove1.employeeId"> <ng-container *ngIf="groupapprove.apsapprove1.employeeId">
<label class="ti-form-label mt-2rem">ผู้ประเมินลำดับที่ 2</label> <label class="ti-form-label mt-2rem">{{'Assessor2'| translate}}</label>
<div class="flex"> <div class="flex">
<div class="relative flex rounded-md w-2/3"> <div class="relative flex rounded-md w-2/3">
<input type="text" name="hs-leading-button-add-on-with-icon-and-button" <input type="text" name="hs-leading-button-add-on-with-icon-and-button"
...@@ -94,7 +93,7 @@ ...@@ -94,7 +93,7 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="groupapprove.apsapprove2.employeeId"> <ng-container *ngIf="groupapprove.apsapprove2.employeeId">
<label class="ti-form-label mt-2rem">ผู้ประเมินลำดับที่ 3</label> <label class="ti-form-label mt-2rem">{{'Assessor3'| translate}}</label>
<div class="flex"> <div class="flex">
<div class="relative flex rounded-md w-2/3"> <div class="relative flex rounded-md w-2/3">
<input type="text" name="hs-leading-button-add-on-with-icon-and-button" <input type="text" name="hs-leading-button-add-on-with-icon-and-button"
...@@ -115,7 +114,7 @@ ...@@ -115,7 +114,7 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="groupapprove.apsapprove3.employeeId"> <ng-container *ngIf="groupapprove.apsapprove3.employeeId">
<label class="ti-form-label mt-2rem">ผู้ประเมินลำดับที่ 4</label> <label class="ti-form-label mt-2rem">{{'Assessor4'| translate}}</label>
<div class="flex"> <div class="flex">
<div class="relative flex rounded-md w-2/3"> <div class="relative flex rounded-md w-2/3">
<input type="text" name="hs-leading-button-add-on-with-icon-and-button" <input type="text" name="hs-leading-button-add-on-with-icon-and-button"
...@@ -136,7 +135,7 @@ ...@@ -136,7 +135,7 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="groupapprove.apsapprove4.employeeId"> <ng-container *ngIf="groupapprove.apsapprove4.employeeId">
<label class="ti-form-label mt-2rem">ผู้ประเมินลำดับที่ 5</label> <label class="ti-form-label mt-2rem">{{'Assessor5'| translate}}</label>
<div class="flex"> <div class="flex">
<div class="relative flex rounded-md w-2/3"> <div class="relative flex rounded-md w-2/3">
<input type="text" name="hs-leading-button-add-on-with-icon-and-button" <input type="text" name="hs-leading-button-add-on-with-icon-and-button"
...@@ -160,12 +159,12 @@ ...@@ -160,12 +159,12 @@
<mat-dialog-actions align="end"> <mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close] <button type="button" mat-button [mat-dialog-close]
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"> 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">
ย้อนกลับ {{'Back' | translate}}
</button> </button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addgroupapprove()" <button type="button" class="ti-btn ti-btn-success" mat-button (click)="addgroupapprove()"
[class.ti-btn-disabled]="!groupapprove.apsapprove1.thFullName||(currentModal=='add')" [class.ti-btn-disabled]="!groupapprove.apsapprove1.thFullName||(currentModal=='add')"
[disabled]="!groupapprove.apsapprove1.thFullName||(currentModal=='add')"> [disabled]="!groupapprove.apsapprove1.thFullName||(currentModal=='add')">
บันทึกข้อมูล {{'SaveData' | translate}}
</button> </button>
</mat-dialog-actions> </mat-dialog-actions>
</ng-template> </ng-template>
...@@ -181,8 +180,9 @@ ...@@ -181,8 +180,9 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="search" (ngModelChange)="searchEMP()"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search"
(ngModelChange)="searchEMP()">
<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>
......
...@@ -19,7 +19,7 @@ interface table { ...@@ -19,7 +19,7 @@ interface table {
templateUrl: './set-approvers.component.html', templateUrl: './set-approvers.component.html',
styleUrls: ['./set-approvers.component.scss'] styleUrls: ['./set-approvers.component.scss']
}) })
export class SetApproversComponent implements OnInit{ export class SetApproversComponent implements OnInit {
currentPage = 1 currentPage = 1
page = Array.from({ length: 1 }, (_, i) => i + 1); page = Array.from({ length: 1 }, (_, i) => i + 1);
...@@ -41,44 +41,44 @@ export class SetApproversComponent implements OnInit{ ...@@ -41,44 +41,44 @@ export class SetApproversComponent implements OnInit{
empnumber = 0 empnumber = 0
currentModal: 'add' | 'edit' | 'delete' = "add" currentModal: 'add' | 'edit' | 'delete' = "add"
selectedFile: File | null = null; selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์'; selectedFileName: string = 'กรุณาเลือกไฟล์';
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "apsassessy.thFullName", field: "apsassessy.thFullName",
headerText: "ชื่อพนักงาน", headerText: "EmployeeName",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "apsapprove1.thFullName", field: "apsapprove1.thFullName",
headerText: "ลำดับที่ 1", headerText: "Approver1",
type: "string" type: "string"
}, },
{ {
field: "apsapprove2.thFullName", field: "apsapprove2.thFullName",
headerText: "ลำดับที่ 2", headerText: "Approver2",
type: "string" type: "string"
}, },
{ {
field: "apsapprove3.thFullName", field: "apsapprove3.thFullName",
headerText: "ลำดับที่ 3", headerText: "Approver3",
type: "string" type: "string"
}, },
{ {
field: "apsapprove4.thFullName", field: "apsapprove4.thFullName",
headerText: "ลำดับที่ 4", headerText: "Approver4",
type: "string" type: "string"
}, },
{ {
field: "apsapprove5.thFullName", field: "apsapprove5.thFullName",
headerText: "ลำดับที่ 5", headerText: "Approver5",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
fields: ['apsassessy.thFullName', 'apsapprove1.thFullName', 'apsapprove2.thFullName','apsapprove3.thFullName','apsapprove4.thFullName','apsapprove5.thFullName'], fields: ['apsassessy.thFullName', 'apsapprove1.thFullName', 'apsapprove2.thFullName', 'apsapprove3.thFullName', 'apsapprove4.thFullName', 'apsapprove5.thFullName'],
operator: 'contains', operator: 'contains',
ignoreCase: false ignoreCase: false
}; };
...@@ -166,7 +166,7 @@ export class SetApproversComponent implements OnInit{ ...@@ -166,7 +166,7 @@ export class SetApproversComponent implements OnInit{
}) })
} }
employee_listFilter() { employee_listFilter() {
return this.employee_list.filter(x => return this.employee_list.filter(x =>
x.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.thFullName.toLowerCase().includes(this.search.toLowerCase()) || x.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.position.edesc.toLowerCase().includes(this.search.toLowerCase())) x.position.edesc.toLowerCase().includes(this.search.toLowerCase()))
...@@ -220,26 +220,26 @@ export class SetApproversComponent implements OnInit{ ...@@ -220,26 +220,26 @@ export class SetApproversComponent implements OnInit{
} }
groupapprove_listFilter() { groupapprove_listFilter() {
return this.groupapprove_list.filter(x => return this.groupapprove_list.filter(x =>
(x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) || (x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase()) || x.apsassessy.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove1.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove1.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove1.thFullName.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove1.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove2.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove2.thFullName.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove2.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove3.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove3.thFullName.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove3.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove4.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove4.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove4.thFullName.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove4.thFullName.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove5.employeeId.toLowerCase().includes(this.search.toLowerCase()) || x.apsapprove5.employeeId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsapprove5.thFullName.toLowerCase().includes(this.search.toLowerCase())) x.apsapprove5.thFullName.toLowerCase().includes(this.search.toLowerCase()))
) )
} }
selectGroupapprove(groupapprove?: GroupApproveModel) { selectGroupapprove(groupapprove?: GroupApproveModel) {
this.groupapprove = new MyGroupApproveModel(groupapprove) this.groupapprove = new MyGroupApproveModel(groupapprove)
......
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
ทะเบียนหลักสูตร {{'menu.CDR' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
<nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse"> <nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse">
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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 = ['CompetencySystem','menu.CDR','menu.CDR']">
(click)="pathTitle = ['การประเมินสมรรถนะ','ทะเบียนหลักสูตร','หลักสูตรการพัฒนา']"> {{'menu.CDR' | translate}}
หลักสูตรการพัฒนา
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./course-registration.component.scss'] styleUrls: ['./course-registration.component.scss']
}) })
export class CourseRegistrationComponent { export class CourseRegistrationComponent {
pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนหลักสูตร','หลักสูตรการพัฒนา'] pathTitle = ['CompetencySystem', 'menu.CDR', 'menu.CDR']
} }
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="search" style="height: 40px;"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search" style="height: 40px;">
<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>
...@@ -22,21 +22,21 @@ ...@@ -22,21 +22,21 @@
data-hs-overlay="#development-course-upload-modal" data-hs-overlay="#development-course-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-10 m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(click)="currentModal='add';selectCompetencycourse();openDialog()"> (click)="currentModal='add';selectCompetencycourse();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-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
(click)="currentModal='delete';deleteDevelopmentCourse()"> (click)="currentModal='delete';deleteDevelopmentCourse()">
<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>
......
...@@ -27,13 +27,13 @@ export class DevelopmentCourseComponent { ...@@ -27,13 +27,13 @@ export class DevelopmentCourseComponent {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "competencyCourseId", field: "competencyCourseId",
headerText: "รหัส", headerText: "Code",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "ชื่อเครื่องมือประเมิน", headerText: "CDRName",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
......
...@@ -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.AssessmentPeriod' | 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">
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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)="activeTab='underline-1';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'รอบการประเมิน']"> (click)="activeTab='underline-1';pathTitle = ['CompetencySystem', 'menu.AssessmentPeriod', 'menu.AssessmentPeriod']">
รอบการประเมิน {{'menu.AssessmentPeriod' | 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"
aria-controls="underline-2" aria-controls="underline-2"
(click)="activeTab='underline-2';pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'กำหนดฟอร์มเอกสาร']"> (click)="activeTab='underline-2';pathTitle = ['การประเมินสมรรถนะ', 'รอบการประเมิน', 'กำหนดฟอร์มเอกสาร']">
กำหนดฟอร์มเอกสาร กำหนดฟอร์มเอกสาร
</a> --> </a> -->
</nav> </nav>
......
...@@ -7,7 +7,7 @@ import { StatusCodeModel } from 'src/app/shared/model/status-code.model'; ...@@ -7,7 +7,7 @@ import { StatusCodeModel } from 'src/app/shared/model/status-code.model';
}) })
export class EvaluationCycleManagerComponent { export class EvaluationCycleManagerComponent {
@Input() pathTitle = ['การประเมินสมรรถนะ', 'การจัดการรอบการประเมิน', 'รอบการประเมิน'] @Input() pathTitle = ['CompetencySystem', 'menu.AssessmentPeriod', 'menu.AssessmentPeriod']
activeTab: string = 'underline-1'; // Tab แรกแสดงเป็นค่าเริ่มต้น activeTab: string = 'underline-1'; // Tab แรกแสดงเป็นค่าเริ่มต้น
groupShow = '1' groupShow = '1'
} }
\ No newline at end of file
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
<button type="button" class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
(click)="modalStatus='add';modalStatusEdit=true;setData();openDialog()"> (click)="modalStatus='add';modalStatusEdit=true;setData();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-20px m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-20px m-0 shadow-md"
(click)="modalStatus='deleteGroup';setData();deleteevaluation_cycle()"> (click)="modalStatus='deleteGroup';setData();deleteevaluation_cycle()">
<i class="ti ti-trash fs-l"></i> <i class="ti ti-trash fs-l"></i>
Delete {{'Delete' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
[columns]="columns" [selectedItems]="selectedItems" [childForm]="true" (createFormEvent)="createForm($event)" [columns]="columns" [selectedItems]="selectedItems" [childForm]="true" (createFormEvent)="createForm($event)"
(sendNextPageForm)="selectEvaluationCycle($event); openDialogForm()" (sendNextPageForm)="selectEvaluationCycle($event); openDialogForm()"
(sendSelectData)="modalStatus='edit';selectEvaluationCycle($event);openDialog()" (sendSelectData)="modalStatus='edit';selectEvaluationCycle($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)"> (sendSelectedItems)="onSelectItemChange($event)" [actionWidth]="translateService.getCurrentLang()=='th'?220:0">
</app-datagrid-syncfution> </app-datagrid-syncfution>
</div> </div>
......
...@@ -8,6 +8,7 @@ import { ColumnModel } from '@syncfusion/ej2-grids'; ...@@ -8,6 +8,7 @@ import { ColumnModel } from '@syncfusion/ej2-grids';
import Swal from 'sweetalert2'; import Swal from 'sweetalert2';
import { JobcodeService } from 'src/app/shared/services/jobcode.service'; import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model'; import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
import { TranslateService } from '@ngx-translate/core';
export interface DataModal { export interface DataModal {
search: string, search: string,
currentPage: number, currentPage: number,
...@@ -70,33 +71,33 @@ export class EvaluationCycleComponent { ...@@ -70,33 +71,33 @@ export class EvaluationCycleComponent {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "evaluationRoundId", field: "evaluationRoundId",
headerText: "รหัส", headerText: "PeriodCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "รายละเอียด", headerText: "Description",
type: "string" type: "string"
}, },
{ {
field: "apsyear", field: "apsyear",
headerText: " รอบปีการประเมิน", headerText: "Year_round",
type: "string" type: "string"
}, },
{ {
field: "apsPeriodStart", field: "apsPeriodStart",
headerText: " วันที่เริ่มต้น", headerText: "StartDate",
type: "string" type: "string"
}, },
{ {
field: "apsPeriodEnd", field: "apsPeriodEnd",
headerText: "วันที่สิ้นสุด", headerText: "EndDate",
type: "string" type: "string"
}, },
{ {
field: "statusCode.tdesc", field: "statusCode.tdesc",
headerText: "สถานะ", headerText: "Status",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
...@@ -112,7 +113,8 @@ export class EvaluationCycleComponent { ...@@ -112,7 +113,8 @@ export class EvaluationCycleComponent {
private cdr: ChangeDetectorRef, private cdr: ChangeDetectorRef,
private renderer: Renderer2, private renderer: Renderer2,
private jobcodeService: JobcodeService, private jobcodeService: JobcodeService,
private dialog: MatDialog private dialog: MatDialog,
public translateService: TranslateService
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox" <input type="checkbox" class="ti-form-checkbox pointer-events-none" id="hs-default-checkbox"
[(ngModel)]="isDataListChecked"> [(ngModel)]="isDataListChecked">
<label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none"> <label for="hs-default-checkbox" class="text-sm text-gray-500 mx-2 pointer-events-none">
{{numDataListChecked}} Selected</label> {{numDataListChecked}} {{'Selected_ed' | translate}}</label>
</div> </div>
<div class="mx-1 flex items-center"> <div class="mx-1 flex items-center">
<button (click)="isDataListCheckedAll = !isDataListCheckedAll;dataListCheckAll()" id="checkbox" <button (click)="isDataListCheckedAll = !isDataListCheckedAll;dataListCheckAll()" id="checkbox"
...@@ -14,15 +14,16 @@ ...@@ -14,15 +14,16 @@
<i class="fs-l transition-all duration-200" <i class="fs-l transition-all duration-200"
[ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i> [ngClass]="{'ri-checkbox-multiple-line text-gray-500': !isDataListCheckedAll, 'ri-checkbox-multiple-fill text-primary': isDataListCheckedAll}"></i>
</button> </button>
<label class="text-sm text-gray-500 ml-2" for="checkbox">Select All</label> <label class="text-sm text-gray-500 ml-2" for="checkbox">{{'SelectAll'| translate}}</label>
</div> </div>
</div> </div>
<div class="flex justify-end"> <div class="flex justify-end">
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
style="height: 40px;" [(ngModel)]="search" (ngModelChange)="searchChange()"> [placeholder]="'SearchByNoOrName' | translate" style="height: 40px;" [(ngModel)]="search"
(ngModelChange)="searchChange()">
<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>
...@@ -33,14 +34,14 @@ ...@@ -33,14 +34,14 @@
<button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(click)="selectData();pathTitleChange('add')"> (click)="selectData();pathTitleChange('add')">
<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-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
data-hs-overlay="#grade-management-alert-delete-modal" (click)="selectData()"> data-hs-overlay="#grade-management-alert-delete-modal" (click)="selectData()">
<i class="ri-delete-bin-6-line"></i> <i class="ri-delete-bin-6-line"></i>
Delete {{'Delete' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -58,9 +59,10 @@ ...@@ -58,9 +59,10 @@
<thead class="height-50px"> <thead class="height-50px">
<tr class="font-size-12px"> <tr class="font-size-12px">
<ng-container <ng-container
*ngFor="let item of ['','รหัส','รายละเอียด (ไทย)','รายละเอียด (อังกฤษ)','การจัดการ']; let f = first; let l = last"> *ngFor="let item of ['','Code','DescriptionJobTypeThai','DescriptionJobTypeEng','Action']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary !text-center"> <th scope="col"
<span class="font-size-12px font-weight-700">{{ item }}</span> class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700">{{ item | translate}}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!f && !l"> <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!f && !l">
<i class="ti ti-dots-vertical fs-l"></i> <i class="ti ti-dots-vertical fs-l"></i>
</div> </div>
...@@ -164,7 +166,7 @@ ...@@ -164,7 +166,7 @@
</button> </button>
<a class="ti-btn ti-btn-danger" href="javascript:void(0);" <a class="ti-btn ti-btn-danger" href="javascript:void(0);"
data-hs-overlay="#grade-management-alert-delete-modal" data-hs-overlay="#grade-management-alert-delete-modal"
(click)="deleteCompetencyGroupGradeList();" *ngIf="numDataListChecked"> (click)="deleteCompetencyGroupGradeList();" *ngIf="numDataListChecked">
ลบข้อมูล ลบข้อมูล
</a> </a>
</div> </div>
......
...@@ -35,7 +35,7 @@ export class GradeManagementComponent { ...@@ -35,7 +35,7 @@ export class GradeManagementComponent {
constructor(private toastr: ToastrService, constructor(private toastr: ToastrService,
private competencyGroupGradeService: CompetencyGroupGradeService, private competencyGroupGradeService: CompetencyGroupGradeService,
private cdr: ChangeDetectorRef) { private cdr: ChangeDetectorRef) {
this.sendPathTitle.emit(['การประเมินสมรรถนะ', 'ทะเบียนเกรด', 'การจัดการเกรด']) this.sendPathTitle.emit(['CompetencySystem', 'menu.Grade', 'GradeManage'])
} }
ngOnInit(): void { ngOnInit(): void {
this.getCompetencyGroupGradeList() this.getCompetencyGroupGradeList()
...@@ -63,15 +63,15 @@ export class GradeManagementComponent { ...@@ -63,15 +63,15 @@ export class GradeManagementComponent {
this.typeTab = tap || '' this.typeTab = tap || ''
switch (this.typeTab) { switch (this.typeTab) {
case 'add': { case 'add': {
this.sendPathTitle.emit(['การประเมินสมรรถนะ', 'ทะเบียนเกรด', 'การจัดการเกรด', 'เพิ่มกลุ่มเกรด']) this.sendPathTitle.emit(['CompetencySystem', 'menu.Grade', 'GradeManage', 'เพิ่มกลุ่มเกรด'])
break; break;
} }
case 'edit': { case 'edit': {
this.sendPathTitle.emit(['การประเมินสมรรถนะ', 'ทะเบียนเกรด', 'การจัดการเกรด', 'แก้ไขกลุ่มเกรด']) this.sendPathTitle.emit(['CompetencySystem', 'menu.Grade', 'GradeManage', 'แก้ไขกลุ่มเกรด'])
break; break;
} }
default: { default: {
this.sendPathTitle.emit(['การประเมินสมรรถนะ', 'ทะเบียนเกรด', 'การจัดการเกรด']) this.sendPathTitle.emit(['CompetencySystem', 'menu.Grade', 'GradeManage'])
} }
} }
} }
......
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
</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.Grade' | 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-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
<nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse"> <nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse">
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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 = ['การประเมินสมรรถนะ','menu.Grade','GradeManage']">
(click)="pathTitle = ['การประเมินสมรรถนะ','ทะเบียนเกรด','การจัดการเกรด']"> {{'GradeManage' | translate}}
การจัดการเกรด
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./grade-registration.component.scss'] styleUrls: ['./grade-registration.component.scss']
}) })
export class GradeRegistrationComponent { export class GradeRegistrationComponent {
pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนเกรด', 'การจัดการเกรด'] pathTitle = ['CompetencySystem', 'menu.Grade', 'GradeManage']
} }
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
แผนพัฒนา IDP {{'menu.IDP' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
<nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse"> <nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse">
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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" (click)="pathTitle = ['การประเมินสมรรถนะ','แผนพัฒนา IDP','กำหนดแผนพัฒนา IDP']"> aria-controls="underline-1" (click)="pathTitle = ['CompetencySystem','menu.IDP','IDPConfig']">
กำหนดแผนพัฒนา IDP {{'IDPConfig' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./idp-development-plan.component.scss'] styleUrls: ['./idp-development-plan.component.scss']
}) })
export class IdpDevelopmentPlanComponent { export class IdpDevelopmentPlanComponent {
pathTitle = ['การประเมินสมรรถนะ', 'แผนพัฒนา IDP','กำหนดแผนพัฒนา IDP'] pathTitle = ['CompetencySystem', 'menu.IDP','IDPConfig']
} }
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-success h-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-success h-10 m-0 shadow-md"
data-hs-overlay="#set-idp-development-plan-alert-modal"> data-hs-overlay="#set-idp-development-plan-alert-modal">
<i class="ri-save-3-line"></i> <i class="ri-save-3-line"></i>
Save {{'Save' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -47,15 +47,17 @@ ...@@ -47,15 +47,17 @@
<div class="page px-rem"> <div class="page px-rem">
<p class="pb-2">ตั้งค่าคะแนนประเมินตัวชี้วัดที่ไม่ติด GAP</p> <p class="pb-2">{{'GAPConfig' | translate}}</p>
<div class="overflow-auto table-bordered rounded-t-none" style="max-width: 50%;"> <div class="overflow-auto table-bordered rounded-t-none" style="max-width: 50%;">
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1"> <div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto shadow-md"> <div class="overflow-auto shadow-md">
<table class="ti-custom-table-one ti-custom-table-head" style="border-collapse: collapse; width: 100%; table-layout: auto;"> <table class="ti-custom-table-one ti-custom-table-head"
style="border-collapse: collapse; width: 100%; table-layout: auto;">
<thead> <thead>
<tr> <tr>
<!-- กำหนดให้คอลัมน์ "คะแนน" กว้างกว่า --> <!-- กำหนดให้คอลัมน์ "คะแนน" กว้างกว่า -->
<th class="text-base font-bold" style=" width: 23%;height: 40px;">คะแนน</th> <th class="text-base font-bold" style=" width: 23%;height: 40px;">
{{'Score' | translate}}</th>
<th>5</th> <th>5</th>
<th>4</th> <th>4</th>
<th>3</th> <th>3</th>
...@@ -65,12 +67,19 @@ ...@@ -65,12 +67,19 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class="text-base font-bold" style="height: 70px;">ผ่าน<br>(ไม่ติดGAP)</td> <td class="text-base font-bold" style="height: 70px;">
<td><input type="radio" id="idp-radio5" name="score" [value]="5" [(ngModel)]="idpData.score"></td> {{'Pass' | translate}}<br>{{'NoGAP' | translate}}
<td><input type="radio" id="idp-radio4" name="score" [value]="4" [(ngModel)]="idpData.score"></td> </td>
<td><input type="radio" id="idp-radio3" name="score" [value]="3" [(ngModel)]="idpData.score"></td> <td><input type="radio" id="idp-radio5" name="score" [value]="5"
<td><input type="radio" id="idp-radio2" name="score" [value]="2" [(ngModel)]="idpData.score"></td> [(ngModel)]="idpData.score"></td>
<td><input type="radio" id="idp-radio1" name="score" [value]="1" [(ngModel)]="idpData.score"></td> <td><input type="radio" id="idp-radio4" name="score" [value]="4"
[(ngModel)]="idpData.score"></td>
<td><input type="radio" id="idp-radio3" name="score" [value]="3"
[(ngModel)]="idpData.score"></td>
<td><input type="radio" id="idp-radio2" name="score" [value]="2"
[(ngModel)]="idpData.score"></td>
<td><input type="radio" id="idp-radio1" name="score" [value]="1"
[(ngModel)]="idpData.score"></td>
</tr> </tr>
<!-- เพิ่มแถวเพิ่มเติมถ้าต้องการ --> <!-- เพิ่มแถวเพิ่มเติมถ้าต้องการ -->
</tbody> </tbody>
...@@ -81,15 +90,15 @@ ...@@ -81,15 +90,15 @@
</div> </div>
<div class="page px-rem my-5"> <div class="page px-rem my-5">
<p class="pb-2">ตารางกำหนดแผนพัฒนา</p> <p class="pb-2">{{'IDPConfig_table' | translate}}</p>
<div class="overflow-auto table-bordered rounded-t-md" style="max-width: 70%;"> <div class="overflow-auto table-bordered rounded-t-md" style="max-width: 70%;">
<div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1"> <div id="card-type-1" role="tabpanel" aria-labelledby="card-type-item-1">
<div class="overflow-auto shadow-md"> <div class="overflow-auto shadow-md">
<table class="ti-custom-table ti-custom-table-head"> <table class="ti-custom-table ti-custom-table-head">
<thead> <thead>
<tr> <tr>
<th rowspan="3">จำนวน BI ที่ติด GAP</th> <th rowspan="3">{{'NumberOfBI' | translate}}</th>
<th colspan="3" style="width: 70%;height: 40px;">เครื่องมือพัฒนา</th> <th colspan="3" style="width: 70%;height: 40px;">{{'DevelopmentTools' | translate}}</th>
</tr> </tr>
<tr> <tr>
<th style="width: 20%;height: 30px;">70</th> <th style="width: 20%;height: 30px;">70</th>
...@@ -97,22 +106,25 @@ ...@@ -97,22 +106,25 @@
<th style="width: 20%;height: 30px;">10</th> <th style="width: 20%;height: 30px;">10</th>
</tr> </tr>
<tr> <tr>
<th style="width: 20%;height: 60px;">OJT/Job <br>Assignment</th> <th style="width: 20%;height: 60px;">{{'OJTJobAssignment' | translate}}</th>
<th style="width: 20%;height: 60px;">Coach/Mentor</th> <th style="width: 20%;height: 60px;">{{'CoachMentor' | translate}}</th>
<th style="width: 20%;height: 60px;">Training</th> <th style="width: 20%;height: 60px;">{{'Training' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of idpData.developmentPlan; let i = index">
<td>{{item.planId}}</td>
<td><input type="checkbox" [id]="'idp-checkbox'+i+'ojtJobAssignment'"
[name]="'developmentPlan'+i" [(ngModel)]="item.ojtJobAssignment"></td>
<td><input type="checkbox" [id]="'idp-checkbox'+i+'coachMentor'"
[name]="'developmentPlan'+i" [(ngModel)]="item.coachMentor"></td>
<td><input type="checkbox" [id]="'idp-checkbox'+i+'training'" [name]="'developmentPlan'+i"
[(ngModel)]="item.training"></td>
</tr> </tr>
</thead> </tbody>
<tbody> </table>
<tr *ngFor="let item of idpData.developmentPlan; let i = index" > </div>
<td>{{item.planId}}</td> </div>
<td><input type="checkbox" [id]="'idp-checkbox'+i+'ojtJobAssignment'" [name]="'developmentPlan'+i" [(ngModel)]="item.ojtJobAssignment"></td>
<td><input type="checkbox" [id]="'idp-checkbox'+i+'coachMentor'" [name]="'developmentPlan'+i" [(ngModel)]="item.coachMentor"></td>
<td><input type="checkbox" [id]="'idp-checkbox'+i+'training'" [name]="'developmentPlan'+i" [(ngModel)]="item.training"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
...@@ -150,5 +162,4 @@ ...@@ -150,5 +162,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="search" style="height: 40px;"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search" style="height: 40px;">
<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>
...@@ -21,21 +21,21 @@ ...@@ -21,21 +21,21 @@
data-hs-overlay="#competency-topic-upload-modal" data-hs-overlay="#competency-topic-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-10 m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(click)="currentModal='add';examFile=null;examFileName = 'กรุณาเลือกไฟล์';openDialog();selectCompetencyTopic()"> (click)="currentModal='add';examFile=null;examFileName = 'กรุณาเลือกไฟล์';openDialog();selectCompetencyTopic()">
<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-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
(click)="currentModal='delete';deleteCompetency_topic()"> (click)="currentModal='delete';deleteCompetency_topic()">
<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>
...@@ -151,8 +151,9 @@ ...@@ -151,8 +151,9 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="typeModal.search" (ngModelChange)="searchCompetencytypeChange()"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="typeModal.search"
(ngModelChange)="searchCompetencytypeChange()">
<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>
......
...@@ -69,18 +69,18 @@ export class CompetencyTopic implements OnInit { ...@@ -69,18 +69,18 @@ export class CompetencyTopic implements OnInit {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "competencyTopicId", field: "competencyTopicId",
headerText: "รหัส", headerText: "CompetencyCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "ชื่อหัวข้อ", headerText: "CompetencyName",
type: "string" type: "string"
}, },
{ {
field: "competencyType.shortName", field: "competencyType.shortName",
headerText: "ประะภท", headerText: "CompetencyType",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
ทะเบียนกำหนดชื่อ {{'menu.DataBankCompetency' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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)=" currentPage = 1;pathTitle = ['การประเมินสมรรถนะ','ทะเบียนกำหนดชื่อ','ประเภทสมรรถนะ']"> (click)=" currentPage = 1;pathTitle = ['CompetencySystem','menu.DataBankCompetency','CompetencyTypes']">
ประเภทสมรรถนะ {{'CompetencyTypes' | translate}}
</a> </a>
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 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"
aria-controls="underline-2" aria-controls="underline-2"
(click)="currentPage = 2;pathTitle = ['การประเมินสมรรถนะ','ทะเบียนกำหนดชื่อ','หัวข้อสมรรถนะ']"> (click)="currentPage = 2;pathTitle = ['CompetencySystem','menu.DataBankCompetency','CompetencyTopics']">
หัวข้อสมรรถนะ {{'CompetencyTopics' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,6 +6,6 @@ import { Component } from '@angular/core'; ...@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./name-registration.component.scss'] styleUrls: ['./name-registration.component.scss']
}) })
export class NameRegistrationComponent { export class NameRegistrationComponent {
pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนกำหนดชื่อ','ประเภทสมรรถนะ'] pathTitle = ['CompetencySystem', 'menu.DataBankCompetency', 'CompetencyTypes']
currentPage = 1 currentPage = 1
} }
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="search" style="height: 40px;"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search" style="height: 40px;">
<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>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
data-hs-overlay="#type-registration-component-upload-modal" data-hs-overlay="#type-registration-component-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">
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
data-hs-overlay="#type-registration-component-page-modal" (click)="currentModal='add';edit()" data-hs-overlay="#type-registration-component-page-modal" (click)="currentModal='add';edit()"
(click)="openDialog()"> (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-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
(click)="currentModal='delete';deleteType_registration()"> (click)="currentModal='delete';deleteType_registration()">
<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>
...@@ -57,20 +57,22 @@ ...@@ -57,20 +57,22 @@
<ng-template #typeRegistrationModal let-modal> <ng-template #typeRegistrationModal let-modal>
<h3 mat-dialog-title> <h3 mat-dialog-title>
{{currentModal=='add'?'เพิ่มประเภทสมรรถนะ':'แก้ไขประเภทสมรรถนะ'}} {{currentModal=='add'?'เพิ่มประเภทสมรรถนะ':'EditCompetencyTypes' | translate}}
</h3> </h3>
<div class="w-full flex justify-end"> <div class="w-full flex justify-end">
<div class="absolute flex"> <div class="absolute flex">
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectCompetencyType()"> <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(click)="selectCompetencyType()">
<i class="ti ti-eraser text-base"></i> <i class="ti ti-eraser text-base"></i>
Clear {{'Clear' | translate}}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<mat-dialog-content> <mat-dialog-content>
<label for="input-label" class="ti-form-label mt-2rem">รหัส <label for="input-label" class="ti-form-label mt-2rem">
{{'Code' | translate}}
<span class="text-danger">* <span class="text-danger">*
<ng-container *ngIf="checkPrimary()&&currentModal=='add'"> <ng-container *ngIf="checkPrimary()&&currentModal=='add'">
รหัสซ้ำ รหัสซ้ำ
...@@ -80,17 +82,25 @@ ...@@ -80,17 +82,25 @@
<input type="text" id="input-label" class="ti-form-input w-1/2" <input type="text" id="input-label" class="ti-form-input w-1/2"
[ngClass]="{'!bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'" [ngClass]="{'!bg-input-readonly':currentModal=='edit'}" [readonly]="currentModal=='edit'"
[(ngModel)]="competoncy_type.competencyTypeId"> [(ngModel)]="competoncy_type.competencyTypeId">
<label for="detail_th" class="ti-form-label mt-1rem">ชื่อประเภท (ไทย)<span class="text-danger">*</span></label> <label for="detail_th" class="ti-form-label mt-1rem">
{{'TypesNameThai' | translate}}<span class="text-danger">*</span></label>
<input type="text" id="detail_th" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.tdesc"> <input type="text" id="detail_th" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.tdesc">
<label for="detail_eng" class="ti-form-label mt-1rem">ชื่อประเภท (อังกฤษ)</label> <label for="detail_eng" class="ti-form-label mt-1rem">
{{'TypesNameEng' | translate}}
</label>
<input type="text" id="detail_eng" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.edesc"> <input type="text" id="detail_eng" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.edesc">
<label for="detail_eng" class="ti-form-label mt-1rem">ชื่อย่อ<span class="text-danger">*</span></label> <label for="detail_eng" class="ti-form-label mt-1rem">
{{'Abbreviations' | translate}}
<span class="text-danger">*</span></label>
<input type="text" id="detail_eng" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.shortName"> <input type="text" id="detail_eng" class="ti-form-input w-2/3" [(ngModel)]="competoncy_type.shortName">
<label for="detail_eng" class="ti-form-label mt-1rem">ระดับความคาดหวัง <span <label for="detail_eng" class="ti-form-label mt-1rem">
class="text-danger">*</span></label> {{'ExpectationLevel' | translate}}
<span class="text-danger">*</span></label>
<input type="text" id="detail_eng" class="ti-form-input" style="width: 200px;" <input type="text" id="detail_eng" class="ti-form-input" style="width: 200px;"
oninput="this.value = this.value.replace(/\D/g, '')" [(ngModel)]="competoncy_type.expectationLevel"> oninput="this.value = this.value.replace(/\D/g, '')" [(ngModel)]="competoncy_type.expectationLevel">
<label for="detail_eng" class="ti-form-label mt-1rem">น้ำหนัก</label> <label for="detail_eng" class="ti-form-label mt-1rem">
{{'Weight' | translate}}
</label>
<input type="text" id="detail_eng" class="ti-form-input" style="width: 200px;" <input type="text" id="detail_eng" class="ti-form-input" style="width: 200px;"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
...@@ -99,12 +109,12 @@ ...@@ -99,12 +109,12 @@
<mat-dialog-actions align="end"> <mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close] <button type="button" mat-button [mat-dialog-close]
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"> 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">
ย้อนกลับ {{'Back' | translate}}
</button> </button>
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addType_registration()" <button type="button" class="ti-btn ti-btn-success" mat-button (click)="addType_registration()"
[class.ti-btn-disabled]="!competoncy_type.competencyTypeId||!competoncy_type.tdesc||!competoncy_type.shortName||(currentModal=='add'&&checkPrimary())" [class.ti-btn-disabled]="!competoncy_type.competencyTypeId||!competoncy_type.tdesc||!competoncy_type.shortName||(currentModal=='add'&&checkPrimary())"
[disabled]="!competoncy_type.competencyTypeId||!competoncy_type.tdesc||!competoncy_type.shortName||(currentModal=='add'&&checkPrimary())"> [disabled]="!competoncy_type.competencyTypeId||!competoncy_type.tdesc||!competoncy_type.shortName||(currentModal=='add'&&checkPrimary())">
บันทึกข้อมูล {{'SaveData' | translate}}
</button> </button>
</mat-dialog-actions> </mat-dialog-actions>
</ng-template> </ng-template>
......
...@@ -24,18 +24,18 @@ export class TypeRegistration { ...@@ -24,18 +24,18 @@ export class TypeRegistration {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "competencyTypeId", field: "competencyTypeId",
headerText: "รหัส", headerText: "Code",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "ชื่อประเภท", headerText: "TypeName",
type: "string" type: "string"
}, },
{ {
field: "shortName", field: "shortName",
headerText: "ชื่อย่อ", headerText: "Abbreviations",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
[class.ti-btn-disabled]="!setting.data.apsyear||checkEmpty(setting.data.expectationLevel)||!setting.data.settingGroupAssessment" [class.ti-btn-disabled]="!setting.data.apsyear||checkEmpty(setting.data.expectationLevel)||!setting.data.settingGroupAssessment"
[disabled]="!setting.data.apsyear||checkEmpty(setting.data.expectationLevel)||!setting.data.settingGroupAssessment"> [disabled]="!setting.data.apsyear||checkEmpty(setting.data.expectationLevel)||!setting.data.settingGroupAssessment">
<i class="ri-save-3-line"></i> <i class="ri-save-3-line"></i>
Save {{'Save' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<div class="page"> <div class="page">
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
<div class="col-span-1"> <div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">ปีการประเมิน <span <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">
class="text-danger">*</span></label> {{'Year' | translate}} <span class="text-danger">*</span></label>
</div> </div>
</div> </div>
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
</div> </div>
<div class="grid grid-cols-3 gap-6 mt-10"> <div class="grid grid-cols-3 gap-6 mt-10">
<div class="col-span-1"> <div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">ระดับความคาดหวัง <span <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">
class="text-danger">*</span></label> {{'ExpectationLevel' | translate}} <span class="text-danger">*</span></label>
</div> </div>
</div> </div>
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
...@@ -81,13 +81,15 @@ ...@@ -81,13 +81,15 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label mt-10">น้ำหนักปัจจัยการประเมิน</label> <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label mt-10">
{{'WeightOfEvaluationFactors' | translate}}
</label>
<div class="overflow-auto contenttable"> <div class="overflow-auto contenttable">
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover table-bordered" <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover table-bordered"
style="min-width: 75% !important;width: 75% !important"> style="min-width: 75% !important;width: 75% !important">
<thead> <thead>
<tr> <tr>
<th>คะเเนน</th> <th>{{'Score'| translate}}</th>
<th class="text-center">5</th> <th class="text-center">5</th>
<th class="text-center">4</th> <th class="text-center">4</th>
<th class="text-center">3</th> <th class="text-center">3</th>
...@@ -97,7 +99,7 @@ ...@@ -97,7 +99,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>น้ำหนัก</td> <td>{{'Weight' | translate}}</td>
<td> <input type="text" class="ti-form-input" <td> <input type="text" class="ti-form-input"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
การตั้งค่า {{'menu.Setting' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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 = ['การประเมินสมรรถนะ','การตั้งค่า','กำหนดค่าระบบประเมินสมรรถนะ']"> (click)="pathTitle = ['CompetencySystem','menu.Setting','CompetencyConfig']">
กำหนดค่าระบบประเมินสมรรถนะ {{'CompetencyConfig' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./setting-competency.component.scss'] styleUrls: ['./setting-competency.component.scss']
}) })
export class SettingCompetencyComponent { export class SettingCompetencyComponent {
pathTitle = ['การประเมินสมรรถนะ', 'การตั้งค่า','กำหนดค่าระบบประเมินสมรรถนะ'] pathTitle = ['CompetencySystem', 'menu.Setting', 'CompetencyConfig']
} }
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="search" style="height: 40px;"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search" style="height: 40px;">
<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>
...@@ -22,22 +22,21 @@ ...@@ -22,22 +22,21 @@
data-hs-overlay="#assessment-tool-upload-modal" data-hs-overlay="#assessment-tool-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-10 m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(click)="currentModal='add';selectAssessment();openDialog()"> (click)="currentModal='add';selectAssessment();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-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
data-hs-overlay="#assessment-tool-alert-modal" data-hs-overlay="#assessment-tool-alert-modal" (click)="currentModal='delete';deleteAssessment()">
(click)="currentModal='delete';deleteAssessment()">
<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>
...@@ -59,7 +58,8 @@ ...@@ -59,7 +58,8 @@
<div class="w-full flex justify-end"> <div class="w-full flex justify-end">
<div class="absolute flex"> <div class="absolute flex">
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectAssessment()"> <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(click)="selectAssessment()">
<i class="ti ti-eraser text-base"></i> <i class="ti ti-eraser text-base"></i>
Clear Clear
</button> </button>
...@@ -132,4 +132,4 @@ ...@@ -132,4 +132,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -29,18 +29,18 @@ export class AssessmentToolComponent { ...@@ -29,18 +29,18 @@ export class AssessmentToolComponent {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "assessmentId", field: "assessmentId",
headerText: "รหัส", headerText: "Code",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "ชื่อเครื่องมือประเมิน", headerText: "ToolsName",
type: "string" type: "string"
}, },
{ {
field: "shortName", field: "shortName",
headerText: "ชื่อที่เเสดง", headerText: "DisplayName",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
......
...@@ -3,15 +3,16 @@ ...@@ -3,15 +3,16 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
ทะเบียนเครื่องมือ {{'AssessmentTools' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
<nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse"> <nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse">
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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" (click)="pathTitle = ['การประเมินสมรรถนะ','ทะเบียนเครื่องมือ','เครื่องมือประเมิน']"> aria-controls="underline-1"
เครื่องมือประเมิน (click)="pathTitle = ['CompetencySystem','AssessmentTools','AssessmentTools']">
{{'AssessmentTools' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./tool-register.component.scss'] styleUrls: ['./tool-register.component.scss']
}) })
export class ToolRegisterComponent { export class ToolRegisterComponent {
pathTitle = ['การประเมินสมรรถนะ', 'ทะเบียนเครื่องมือ','เครื่องมือประเมิน'] pathTitle = ['CompetencySystem', 'AssessmentTools', 'AssessmentTools']
} }
...@@ -84,21 +84,21 @@ const routes: Routes = [ ...@@ -84,21 +84,21 @@ const routes: Routes = [
{ path: "ess/profile", component: EssProfileComponent }, { path: "ess/profile", component: EssProfileComponent },
{ path: "ess/self-evaluation", title: 'ประเมินตนเอง', component: SelfEvaluationComponent }, { path: "ess/self-evaluation", title: 'ประเมินตนเอง', component: SelfEvaluationComponent },
{ path: "ess/self-evaluation/:part", title: 'ประเมินตนเอง', component: SelfEvaluationComponent }, { path: "ess/self-evaluation/:part", title: 'ประเมินตนเอง', component: SelfEvaluationComponent },
{ path: "admin/day-type-registry", title: 'ประเมินตนเอง', component: DayTypeRegistryComponent }, { path: "admin/day-type-registry", title: 'ทะเบียนประเภทวัน', component: DayTypeRegistryComponent },
{ path: "admin/company-registration", title: 'ทะเบียนบริษัท', component: CompanyRegistrationComponent }, { path: "admin/company-registration", title: 'ทะเบียนบริษัท', component: CompanyRegistrationComponent },
{ path: "admin/job-description", title: 'ข้อมูลลักษณะงาน', component: JobDescriptionComponent }, { path: "admin/job-description", title: 'ข้อมูลลักษณะงาน', component: JobDescriptionComponent },
{ path: "admin/account-settings", title: 'ตั้งค่าผู้ใช้งาน', component: AccountSettingsComponent }, { path: "admin/account-settings", title: 'ตั้งค่าผู้ใช้งาน', component: AccountSettingsComponent },
{ path: "admin/name-registration", title: 'ทะเบียนกำหนดชื่อ', component: NameRegistrationComponent }, { path: "admin/name-registration", title: 'คลังข้อมูลสมรรถนะ', component: NameRegistrationComponent },
{ path: "admin/tool-register", title: 'ทะเบียนเครื่องมือ', component: ToolRegisterComponent }, { path: "admin/tool-register", title: 'เครื่องมือประเมิน', component: ToolRegisterComponent },
{ path: "admin/competency-management", title: 'การจัดการสมรรถนะ', component: CompetencyManagementComponent }, { path: "admin/competency-management", title: 'การจัดการสมรรถนะ', component: CompetencyManagementComponent },
{ path: "admin/job-detail-management", title: 'จัดการรายละเอียดงาน', component: JobDetailManagementComponent }, { path: "admin/job-detail-management", title: 'ข้อมูลทั่วไป', component: JobDetailManagementComponent },
{ path: "admin/course-registration", title: 'ทะเบียนหลักสูตร', component: CourseRegistrationComponent }, { path: "admin/course-registration", title: 'หลักสูตรการพัฒนา', component: CourseRegistrationComponent },
{ path: "admin/edit-group-competencies", title: 'แก้ไขกลุ่มสมรรถนะ', component: EditGroupCompetenciesComponent }, { path: "admin/edit-group-competencies", title: 'แก้ไขกลุ่มสมรรถนะ', component: EditGroupCompetenciesComponent },
{ path: "admin/evaluation-cycle-manager", title: 'การจัดการรอบการประเมิน', component: EvaluationCycleManagerComponent }, { path: "admin/evaluation-cycle-manager", title: 'รอบการประเมิน', component: EvaluationCycleManagerComponent },
{ path: "admin/setting-competency", title: 'การตั้งค่า', component: SettingCompetencyComponent }, { path: "admin/setting-competency", title: 'การตั้งค่า', component: SettingCompetencyComponent },
{ path: "admin/idp-development-plan", title: 'เเผนพัฒนา IDP', component: IdpDevelopmentPlanComponent }, { path: "admin/idp-development-plan", title: 'เเผนพัฒนา IDP', component: IdpDevelopmentPlanComponent },
{ path: "admin/job-competency", title: 'ความรู้ ทักษะ ความสามารถในตำเเหน่งงาน', component: JobCompetencyComponent }, { path: "admin/job-competency", title: 'ความสามารถในตำแหน่งงาน', component: JobCompetencyComponent },
{ path: "admin/job-qualifications", title: 'คุณสมบัติที่จำเป็นต่อการปฏิบัติหน้าที่', component: JobQualificationsComponent }, { path: "admin/job-qualifications", title: 'คุณสมบัติที่จำเป็น', component: JobQualificationsComponent },
{ path: "admin/job-detail", title: 'รายละเอียดของงาน', component: JobDetailComponent }, { path: "admin/job-detail", title: 'รายละเอียดของงาน', component: JobDetailComponent },
{ path: "admin/command-structure", title: 'โครงสร้างสายการบังคับบัญชา', component: CommandStructureComponent }, { path: "admin/command-structure", title: 'โครงสร้างสายการบังคับบัญชา', component: CommandStructureComponent },
{ path: "admin/assessment-management", title: 'การจัดการการประเมิน', component: AssessmentManagementComponent }, { path: "admin/assessment-management", title: 'การจัดการการประเมิน', component: AssessmentManagementComponent },
...@@ -107,11 +107,11 @@ const routes: Routes = [ ...@@ -107,11 +107,11 @@ const routes: Routes = [
{ path: "ess/supervisor-evaluation", title: 'ประเมินโดยหัวหน้า', component: SupervisorEvaluationComponent }, { path: "ess/supervisor-evaluation", title: 'ประเมินโดยหัวหน้า', component: SupervisorEvaluationComponent },
{ path: "ess/pms-evaluation", title: 'ประเมินผล PMS', component: PmsFormEmployeeComponent }, { path: "ess/pms-evaluation", title: 'ประเมินผล PMS', component: PmsFormEmployeeComponent },
{ path: "admin/employee-registration", title: 'ทะเบียนพนักงาน', component: EmployeeRegistrationComponent }, { path: "admin/employee-registration", title: 'ทะเบียนพนักงาน', component: EmployeeRegistrationComponent },
{ path: "admin/name-registration-perfomance", title: 'ทะเบียนกำหนดชื่อ', component: NameRegistrationPerfomanceComponent }, { path: "admin/name-registration-perfomance", title: 'คลังข้อมูลการบริหารผลงาน', component: NameRegistrationPerfomanceComponent },
{ path: "admin/competency-evaluation-factors", title: 'ปัจจัยการประเมินสมรรถนะ', component: CompetencyEvaluationFactorsComponent }, { path: "admin/competency-evaluation-factors", title: 'ปัจจัยการประเมินสมรรถนะ', component: CompetencyEvaluationFactorsComponent },
{ path: "admin/evaluation-factors", title: 'การประเมินจัดการประสิทธิภาพ', component: EvaluationFactorsComponent }, { path: "admin/evaluation-factors", title: 'ปัจจัยการประเมินผล', component: EvaluationFactorsComponent },
{ path: "admin/grade-registration", title: 'ทะเบียนเกรด', component: GradeRegistrationComponent }, { path: "admin/grade-registration", title: 'เกรด', component: GradeRegistrationComponent },
{ path: "admin/grade-registration-sub", title: 'ทะเบียนเกรด', component: PmsGradeRegistrationComponent }, { path: "admin/grade-registration-sub", title: 'เกรด', component: PmsGradeRegistrationComponent },
{ path: "admin/setting-performance-evalution", title: 'การตั้งค่า', component: SettingPerformanceEvalutionComponent }, { path: "admin/setting-performance-evalution", title: 'การตั้งค่า', component: SettingPerformanceEvalutionComponent },
{ path: "admin/time-attendance", title: 'ทะเบียนการประเมินเวลาทำงาน', component: TimeAttendanceComponent }, { path: "admin/time-attendance", title: 'ทะเบียนการประเมินเวลาทำงาน', component: TimeAttendanceComponent },
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</e-column> </e-column>
</ng-container> </ng-container>
<e-column headerText='action' width='205' textAlign='Center' *ngIf="actionSetting"> <e-column headerText='action' [width]='actionWidth?actionWidth: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">{{'Action' | translate}}</span> <span class="font-size-12px font-weight-700 text-primary">{{'Action' | translate}}</span>
</ng-template> </ng-template>
...@@ -84,15 +84,14 @@ ...@@ -84,15 +84,14 @@
[ngClass]="{'bg-secondary': true, 'text-white': true}"> [ngClass]="{'bg-secondary': true, 'text-white': true}">
สร้างแบบฟอร์ม สร้างแบบฟอร์ม
</span> </span>
<span class="badge text-white m-1" *ngIf="statusFrom.code == '1'" <span class="badge text-white m-1" *ngIf="statusFrom.code == '1'"
[ngClass]="{'bg-primary': true, 'text-white': true}"> [ngClass]="{'bg-primary': true, 'text-white': true}">
ปิดรอบประเมิน {{'EndPeriod' | translate}}
</span> </span>
<span class="badge text-white m-1" *ngIf="statusFrom.code == '2'" <span class="badge text-white m-1" *ngIf="statusFrom.code == '2'"
[ngClass]="{'bg-gray-400': true, 'text-white': true}"> [ngClass]="{'bg-gray-400': true, 'text-white': true}">
ปิดรอบประเมิน {{'EndPeriod' | translate}}
</span> </span>
</ng-container> </ng-container>
</ng-container> </ng-container>
......
...@@ -83,6 +83,9 @@ export class DatagridSyncfutionComponent implements OnInit { ...@@ -83,6 +83,9 @@ export class DatagridSyncfutionComponent implements OnInit {
@Input() childList = '' @Input() childList = ''
@Input() searchText = '' @Input() searchText = ''
@Input() actionWidth = 0
aggregatesSum: any[] = []; aggregatesSum: any[] = [];
aggregatesCount: any[] = []; aggregatesCount: any[] = [];
aggregatesAvg: any[] = []; aggregatesAvg: any[] = [];
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<thead> <thead>
<tr> <tr>
<ng-container <ng-container
*ngFor="let item of ['No.','JD Code','DescriptionJobTypeThai','DescriptionJobTypeEng','Action']; let f = first; let l = last"> *ngFor="let item of ['No.','JDCode','DescriptionJobTypeThai','DescriptionJobTypeEng','Action']; let f = first; let l = last">
<th scope="col" <th scope="col"
class="relative px-10px py-10px bg-soft-secondary text-primary !text-center"> class="relative px-10px py-10px bg-soft-secondary text-primary !text-center">
<span class="font-size-12px font-weight-700">{{ item | translate}}</span> <span class="font-size-12px font-weight-700">{{ item | translate}}</span>
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
</a> </a>
</ng-container> </ng-container>
<ng-container *ngIf="item !== '...'"> <ng-container *ngIf="item !== '...'">
<a class="page-link" href="javascript:void(0);" [class.active]="item === currentPage" (click)="changePage(item)"> <a class="page-link" href="javascript:void(0);" [class.active]="item === currentPage"
(click)="changePage(item)">
{{ item }} {{ item }}
</a> </a>
</ng-container> </ng-container>
...@@ -31,12 +32,13 @@ ...@@ -31,12 +32,13 @@
<!-- ตัวเลือกจำนวนรายการต่อหน้า --> <!-- ตัวเลือกจำนวนรายการต่อหน้า -->
<li> <li>
<select class="ti-form-select" [(ngModel)]="pageSize" (ngModelChange)="onPageSizeChange()"> <select class="ti-form-select" [(ngModel)]="pageSize" (ngModelChange)="onPageSizeChange()">
<option *ngFor="let size of pageSizes" [ngValue]="size">รายการต่อหน้า: {{ size }}</option> <option *ngFor="let size of pageSizes" [ngValue]="size">{{'ItemsPerPage' | translate}}: {{ size }}</option>
</select> </select>
</li> </li>
</ul> </ul>
<ul class="nav-tabs mt-3"> <ul class="nav-tabs mt-3">
<span >แสดง {{ (currentPage - 1) * pageSize + 1 }} ถึง {{ getEndIndex() }} จาก {{ totalItems }} รายการ</span> <span>{{'Show' | translate}} {{ (currentPage - 1) * pageSize + 1 }} {{'To'| translate }} {{ getEndIndex() }}
{{'From' | translate}} {{ totalItems }} {{'Items' | translate}}</span>
</ul> </ul>
</nav> </nav>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
การจัดการประเมิน {{'PMSManage' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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)="activeTab='underline-1';pathTitle = ['การประเมินจัดการประสิทธิภาพ','การจัดการประเมิน','จัดกลุ่มการประเมิน']"> (click)="activeTab='underline-1';pathTitle = ['menu.PerformanceManagementSystem','PMSManage','GroupingKPI']">
จัดกลุ่มการประเมิน {{'GroupingKPI' | translate}}
</a> </a>
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 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"
aria-controls="underline-2" aria-controls="underline-2"
(click)="activeTab='underline-2';pathTitle = ['การประเมินจัดการประสิทธิภาพ','การจัดการประเมิน','กำหนดผู้ประเมิน']"> (click)="activeTab='underline-2';pathTitle = ['menu.PerformanceManagementSystem','PMSManage','AssignApprover']">
กำหนดผู้ประเมิน {{'AssignApprover' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,6 +6,6 @@ import { Component } from '@angular/core'; ...@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./assessment-management.component.scss'] styleUrls: ['./assessment-management.component.scss']
}) })
export class AssessmentManagementComponent { export class AssessmentManagementComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'การจัดการประเมิน', 'จัดกลุ่มการประเมิน'] pathTitle = ['menu.PerformanceManagementSystem', 'PMSManage', 'GroupingKPI']
activeTab: string = 'underline-1' activeTab: string = 'underline-1'
} }
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(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>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
data-hs-overlay="#evaluation-grouping-upload-modal" data-hs-overlay="#evaluation-grouping-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">
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
</div> </div>
</div> </div>
<div class="page px-rem"> <div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="pl.dataList" <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search"
[checkBoxSetting]="false" [columns]="columns" (sendSelectData)="onEdit=true;selectPl($event)"> [dataSource]="syncfutionDataList" [checkBoxSetting]="false" [columns]="columns"
(sendSelectData)="onEdit=true;selectPl($event)">
</app-datagrid-syncfution> </app-datagrid-syncfution>
</div> </div>
<!-- <div class="page px-rem"> <!-- <div class="page px-rem">
......
...@@ -5,6 +5,7 @@ import { PLService } from 'src/app/shared/services/pl.service'; ...@@ -5,6 +5,7 @@ import { PLService } from 'src/app/shared/services/pl.service';
import { ColumnModel } from '@syncfusion/ej2-grids'; import { ColumnModel } from '@syncfusion/ej2-grids';
import { JobcodeService } from 'src/app/shared/services/jobcode.service'; import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model'; import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
import { TranslateService } from '@ngx-translate/core';
@Component({ @Component({
selector: 'app-evaluation-grouping', selector: 'app-evaluation-grouping',
...@@ -25,25 +26,40 @@ export class EvaluationGroupingComponent { ...@@ -25,25 +26,40 @@ export class EvaluationGroupingComponent {
selectedFileName: string = 'กรุณาเลือกไฟล์'; selectedFileName: string = 'กรุณาเลือกไฟล์';
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "jobCodeId", field: "jobCodeId",
headerText: "รหัส", headerText: "JDCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "name",
headerText: "ชื่อลักษณะงาน (ไทย)", headerText: "JobDescription",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
fields: ['pmsTypeId', 'tdesc'], fields: ['jobCodeId', 'name'],
operator: 'contains', operator: 'contains',
ignoreCase: false ignoreCase: false
}; };
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() }; syncfutionDataList: any[] = []
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
pl: { loading: boolean, select: JobcodeModel, dataList: JobcodeModel [] } = { loading: false, select: new MyJobcodeModel(), dataList: [] } pl: { loading: boolean, select: JobcodeModel, dataList: JobcodeModel[] } = { loading: false, select: new MyJobcodeModel(), dataList: [] }
constructor(private toastr: ToastrService, private jobcodeService: JobcodeService, private cdr: ChangeDetectorRef, private fileService: FileService) { } constructor(private toastr: ToastrService, private jobcodeService: JobcodeService, private cdr: ChangeDetectorRef, private fileService: FileService, private translateService: TranslateService
) {
this.translateService.onLangChange.subscribe((event) => {
this.setSyncfutionDataList()
});
}
setSyncfutionDataList() {
if (this.pl.dataList) {
this.syncfutionDataList = this.pl.dataList.map(e => ({
jobCodeId: e.jobCodeId,
name: this.translateService.getCurrentLang() == 'th' ? e.tdesc : e.edesc,
}))
}
}
ngOnInit(): void { ngOnInit(): void {
this.onSendPathTitle() this.onSendPathTitle()
this.getPLList() this.getPLList()
...@@ -101,10 +117,12 @@ export class EvaluationGroupingComponent { ...@@ -101,10 +117,12 @@ export class EvaluationGroupingComponent {
this.jobcodeService.getGroupAssessmentList().subscribe({ this.jobcodeService.getGroupAssessmentList().subscribe({
next: response => { next: response => {
this.pl.dataList = response.map(x => { this.pl.dataList = response.map(x => {
return new MyJobcodeModel(x) return new MyJobcodeModel(x)
}) })
this.pl.loading = false this.pl.loading = false
this.cdr.detectChanges(); this.cdr.detectChanges();
this.setSyncfutionDataList()
this.cdr.markForCheck()
}, error: error => { }, error: error => {
this.pl.loading = false this.pl.loading = false
console.error('Error fetching employee types:', error); console.error('Error fetching employee types:', error);
...@@ -119,15 +137,16 @@ export class EvaluationGroupingComponent { ...@@ -119,15 +137,16 @@ export class EvaluationGroupingComponent {
return match; return match;
}); });
} }
selectPl(data?: JobcodeModel) { selectPl(dataSelect?: any) {
if (data) { const data = this.pl.dataList.find(e => e.jobCodeId == dataSelect.jobCodeId)
this.pl.select = new MyJobcodeModel(data) if (data) {
} else if (this.currentModal == 'add') { this.pl.select = new MyJobcodeModel(data)
this.pl.select = new MyJobcodeModel() } else if (this.currentModal == 'add') {
} else if (this.currentModal == 'edit') { this.pl.select = new MyJobcodeModel()
this.pl.select = new MyJobcodeModel({ jobCodeId: this.pl.select.jobCodeId }) } else if (this.currentModal == 'edit') {
} this.pl.select = new MyJobcodeModel({ jobCodeId: this.pl.select.jobCodeId })
} }
}
searchChange() { searchChange() {
this.currentPage = 1 this.currentPage = 1
this.page = Array.from({ length: Math.ceil(this.plListFilter().length / 10) }, (_, i) => i + 1) this.page = Array.from({ length: Math.ceil(this.plListFilter().length / 10) }, (_, i) => i + 1)
...@@ -135,9 +154,9 @@ export class EvaluationGroupingComponent { ...@@ -135,9 +154,9 @@ export class EvaluationGroupingComponent {
} }
onSendPathTitle() { onSendPathTitle() {
if (this.onEdit) { if (this.onEdit) {
this.sendPathTitle.emit(['การประเมินจัดการประสิทธิภาพ', 'การจัดการประเมิน', 'จัดกลุ่มประเมิน', 'แก้ไขกลุ่มการประเมิน']); this.sendPathTitle.emit(['menu.PerformanceManagementSystem', 'PMSManage', 'GroupingKPI', 'แก้ไขกลุ่มการประเมิน']);
} else if (!this.onEdit) { } else if (!this.onEdit) {
this.sendPathTitle.emit(['การประเมินจัดการประสิทธิภาพ', 'การจัดการประเมิน', 'จัดกลุ่มประเมิน']); this.sendPathTitle.emit(['menu.PerformanceManagementSystem', 'PMSManage', 'GroupingKPI']);
} }
} }
......
...@@ -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.EvaluationPeriod' | 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">
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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)="activeTab='underline-1';pathTitle = ['การประเมินจัดการประสิทธิภาพ','รอบประเมิน','รอบการประเมิน']"> (click)="activeTab='underline-1';pathTitle = ['menu.PerformanceManagementSystem','menu.EvaluationPeriod','menu.EvaluationPeriod']">
รอบการประเมิน {{'menu.EvaluationPeriod' | 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"
......
...@@ -6,7 +6,7 @@ import { Component } from '@angular/core'; ...@@ -6,7 +6,7 @@ import { Component } from '@angular/core';
styleUrls: ['./evaluation-cycle-performance.component.scss'] styleUrls: ['./evaluation-cycle-performance.component.scss']
}) })
export class EvaluationCyclePerformanceComponent { export class EvaluationCyclePerformanceComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'รอบการประเมิน','รอบการประเมิน'] pathTitle = ['menu.PerformanceManagementSystem', 'menu.EvaluationPeriod','menu.EvaluationPeriod']
activeTab: string = 'underline-1'; activeTab: string = 'underline-1';
groupShow = '1' groupShow = '1'
} }
...@@ -50,23 +50,22 @@ ...@@ -50,23 +50,22 @@
<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)="modalStatus='add';modalStatusEdit=true;selectPl();selectPmsMasfromEvaluationCycle();openDialog();"> (click)="modalStatus='add';modalStatusEdit=true;selectPl();selectPmsMasfromEvaluationCycle();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)="modalStatus='delete';selectPmsMasfromEvaluationCycle();deletePmsMasfromEvaluation()"> (click)="modalStatus='delete';selectPmsMasfromEvaluationCycle();deletePmsMasfromEvaluation()">
<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>
</div> </div>
<div class="page px-rem"> <div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="syncfutionDataList"
[dataSource]="pmsMasfromEvaluation.dataList" [columns]="columns" [selectedItems]="selectedItems" [childForm]="true" [columns]="columns" [selectedItems]="selectedItems" [childForm]="true" (createFormEvent)="createForm($event)"
(createFormEvent)="createForm($event)"
(sendNextPageForm)="selectPmsMasfromEvaluationCycle($event); openDialogForm()" (sendNextPageForm)="selectPmsMasfromEvaluationCycle($event); openDialogForm()"
(sendSelectData)="modalStatus='edit';selectPmsMasfromEvaluationCycle($event);openDialog()" (sendSelectData)="modalStatus='edit';selectPmsMasfromEvaluationCycle($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)"> (sendSelectedItems)="onSelectItemChange($event)">
...@@ -75,7 +74,7 @@ ...@@ -75,7 +74,7 @@
<ng-template #managementEvaluationCycleModal let-modal> <ng-template #managementEvaluationCycleModal let-modal>
<h3 mat-dialog-title> <h3 mat-dialog-title>
{{modalStatus=='add'?'เพิ่มรอบการประเมิน':'เเก้ไขรอบการประเมิน'}} {{modalStatus=='add'?'เพิ่มรอบการประเมิน':'EvaluationPeriod' | translate}}
</h3> </h3>
<div class="w-full flex justify-end mb-1rem"> <div class="w-full flex justify-end mb-1rem">
<div class="absolute flex"> <div class="absolute flex">
...@@ -83,46 +82,50 @@ ...@@ -83,46 +82,50 @@
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(click)="selectPl();selectPmsMasfromEvaluationCycle()"> (click)="selectPl();selectPmsMasfromEvaluationCycle()">
<i class="ti ti-eraser text-base"></i> <i class="ti ti-eraser text-base"></i>
Clear {{'Clear' | translate}}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<mat-dialog-content> <mat-dialog-content>
<label for="input-label" class="ti-form-label mt-2rem">รหัสรอบการประเมิน<span class="text-danger">*<ng-container <label for="input-label" class="ti-form-label mt-2rem">{{'PeriodCode'| translate }}<span
*ngIf="modalStatus=='add'&&checkPrimary()"> class="text-danger">*<ng-container *ngIf="modalStatus=='add'&&checkPrimary()">
รหัสรอบการประเมินซ้ำ รหัสรอบการประเมินซ้ำ
</ng-container></span></label> </ng-container></span></label>
<input type="text" id="input-label" class="ti-form-input w-1/2" <input type="text" id="input-label" class="ti-form-input w-1/2"
[ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [readonly]="modalStatus =='edit'" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [readonly]="modalStatus =='edit'"
[(ngModel)]="pmsMasfromEvaluation.select.pmsEvaluationRoundId"> [(ngModel)]="pmsMasfromEvaluation.select.pmsEvaluationRoundId">
<label for="detail_th" class="ti-form-label mt-2rem">รายละเอียด (ไทย)<span class="text-danger">*</span></label> <label for="detail_th" class="ti-form-label mt-2rem">{{'DescriptionThai'| translate }}<span
class="text-danger">*</span></label>
<input type="text" id="detail_th" class="ti-form-input h-16" <input type="text" id="detail_th" class="ti-form-input h-16"
[ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [(ngModel)]="pmsMasfromEvaluation.select.tdesc" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [(ngModel)]="pmsMasfromEvaluation.select.tdesc"
[readonly]="modalStatus =='edit'"> [readonly]="modalStatus =='edit'">
<label for="detail_eng" class="ti-form-label mt-2rem">รายละเอียด (อังกฤษ)</label> <label for="detail_eng" class="ti-form-label mt-2rem">{{'DescriptionEng'| translate }}</label>
<input type="text" id="detail_eng" class="ti-form-input h-16" <input type="text" id="detail_eng" class="ti-form-input h-16"
[ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [(ngModel)]="pmsMasfromEvaluation.select.edesc" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [(ngModel)]="pmsMasfromEvaluation.select.edesc"
[readonly]="modalStatus =='edit'"> [readonly]="modalStatus =='edit'">
<label for="input-label" class="ti-form-label mt-2rem">ปีการประเมิน<span class="text-danger">*</span></label> <label for="input-label" class="ti-form-label mt-2rem">{{'Year_round'| translate }}<span
class="text-danger">*</span></label>
<select class="ti-form-select" [(ngModel)]="pmsMasfromEvaluation.select.apsyear" <select class="ti-form-select" [(ngModel)]="pmsMasfromEvaluation.select.apsyear"
[ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [disabled]="modalStatus == 'edit'"> [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [disabled]="modalStatus == 'edit'">
<option *ngFor="let item of yearList" [ngValue]="item">{{ item }}</option> <option *ngFor="let item of yearList" [ngValue]="item">{{ item }}</option>
</select> </select>
<label for="input-label" class="ti-form-label mt-2rem">เริ่มวันที่<span class="text-danger">*</span></label> <label for="input-label" class="ti-form-label mt-2rem">{{'StartDate'| translate }}<span
class="text-danger">*</span></label>
<input type="date" id="input-label" class="ti-form-input w-1/2" <input type="date" id="input-label" class="ti-form-input w-1/2"
[(ngModel)]="pmsMasfromEvaluation.select.apsPeriodStart" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [(ngModel)]="pmsMasfromEvaluation.select.apsPeriodStart" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}"
[readonly]="modalStatus =='edit'"> [readonly]="modalStatus =='edit'">
<label for="input-label" class="ti-form-label mt-2rem">สิ้นสุดวันที่<span class="text-danger">*</span></label> <label for="input-label" class="ti-form-label mt-2rem">{{'EndDate'| translate }}<span
class="text-danger">*</span></label>
<input type="date" id="input-label" class="ti-form-input w-1/2" <input type="date" id="input-label" class="ti-form-input w-1/2"
[(ngModel)]="pmsMasfromEvaluation.select.apsPeriodEnd" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}" [(ngModel)]="pmsMasfromEvaluation.select.apsPeriodEnd" [ngClass]="{'!bg-input-readonly': modalStatus == 'edit'}"
[readonly]="modalStatus =='edit'"> [readonly]="modalStatus =='edit'">
<label for="input-label" class="ti-form-label mt-2rem">ลักษณะงาน (JD)</label> <label for="input-label" class="ti-form-label mt-2rem">{{'ลักษณะงาน (JD)'| translate }}</label>
<div *ngFor="let item of pmsMasfromEvaluation.select.jd;let i = index;let f=first;let l = last" <div *ngFor="let item of pmsMasfromEvaluation.select.jd;let i = index;let f=first;let l = last"
class="grid grid-cols-2"> class="grid grid-cols-2">
<div class="col-span-1"> <div class="col-span-1">
...@@ -171,18 +174,18 @@ ...@@ -171,18 +174,18 @@
<i class="ri-search-line cursor-pointer text-gray"></i> <i class="ri-search-line cursor-pointer text-gray"></i>
</button> </button>
</ng-template> </ng-template>
<span class="text-danger mt-1">**หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด</span> <span class="text-danger mt-1">**{{'NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll' | translate}}</span>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions align="end"> <mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close] <button type="button" mat-button [mat-dialog-close]
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"> 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">
ย้อนกลับ {{'Back' | translate}}
</button> </button>
<button *ngIf="modalStatus == 'add'" type="button" class="ti-btn ti-btn-success" mat-button <button *ngIf="modalStatus == 'add'" type="button" class="ti-btn ti-btn-success" mat-button
[class.ti-btn-disabled]="!pmsMasfromEvaluation.select.pmsEvaluationRoundId||!pmsMasfromEvaluation.select.tdesc||(modalStatus=='add'&&checkPrimary())" [class.ti-btn-disabled]="!pmsMasfromEvaluation.select.pmsEvaluationRoundId||!pmsMasfromEvaluation.select.tdesc||(modalStatus=='add'&&checkPrimary())"
(click)="addPmsMasfromEvaluation()" (click)="addPmsMasfromEvaluation()"
[disabled]="!pmsMasfromEvaluation.select.pmsEvaluationRoundId||!pmsMasfromEvaluation.select.tdesc||(modalStatus=='add'&&checkPrimary())"> [disabled]="!pmsMasfromEvaluation.select.pmsEvaluationRoundId||!pmsMasfromEvaluation.select.tdesc||(modalStatus=='add'&&checkPrimary())">
บันทึกข้อมูล {{'SaveDAte' | translate}}
</button> </button>
</mat-dialog-actions> </mat-dialog-actions>
</ng-template> </ng-template>
......
...@@ -7,6 +7,7 @@ import { MatDialog } from '@angular/material/dialog'; ...@@ -7,6 +7,7 @@ import { MatDialog } from '@angular/material/dialog';
import Swal from 'sweetalert2'; import Swal from 'sweetalert2';
import { JobcodeService } from 'src/app/shared/services/jobcode.service'; import { JobcodeService } from 'src/app/shared/services/jobcode.service';
import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model'; import { JobcodeModel, MyJobcodeModel } from 'src/app/shared/model/jobcode.model';
import { TranslateService } from '@ngx-translate/core';
export interface DataModal { export interface DataModal {
search: string, search: string,
...@@ -69,40 +70,41 @@ export class ManagementCycleComponent { ...@@ -69,40 +70,41 @@ export class ManagementCycleComponent {
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "pmsEvaluationRoundId", field: "pmsEvaluationRoundId",
headerText: "รหัส", headerText: "PeriodCode",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "name",
headerText: "รายละเอียด", headerText: "Description",
type: "string" type: "string"
}, },
{ {
field: "apsyear", field: "apsyear",
headerText: "รอบปีการประเมิน", headerText: "Year_round",
type: "string" type: "string"
}, },
{ {
field: "apsPeriodStart", field: "apsPeriodStart",
headerText: "วันที่เริ่มต้น", headerText: "StartDate",
type: "string" type: "string"
}, },
{ {
field: "apsPeriodEnd", field: "apsPeriodEnd",
headerText: "วันที่สิ้นสุด", headerText: "EndDate",
type: "string" type: "string"
}, },
{ {
field: "statusCode.tdesc", field: "statusCode",
headerText: "สถานะ", headerText: "Status",
type: "string" type: "string"
},] },]
searchSettings = { searchSettings = {
fields: ['pmsEvaluationRoundId', 'tdesc', 'apsyear', 'apsPeriodStart', 'apsPeriodEnd', 'statusCode.tdesc'], fields: ['pmsEvaluationRoundId', 'tdesc', 'apsyear', 'apsPeriodStart', 'apsPeriodEnd', 'statusCode'],
operator: 'contains', operator: 'contains',
ignoreCase: false ignoreCase: false
}; };
syncfutionDataList: any[] = []
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() }; selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
@ViewChild("managementEvaluationCycleModal") managementEvaluationCycleModal: any; @ViewChild("managementEvaluationCycleModal") managementEvaluationCycleModal: any;
dialogRef: any dialogRef: any
...@@ -117,9 +119,26 @@ export class ManagementCycleComponent { ...@@ -117,9 +119,26 @@ export class ManagementCycleComponent {
private dialog: MatDialog, private dialog: MatDialog,
private cdr: ChangeDetectorRef, private cdr: ChangeDetectorRef,
private renderer: Renderer2, private renderer: Renderer2,
private jobcodeService: JobcodeService private jobcodeService: JobcodeService,
) { } private translateService: TranslateService
) {
this.translateService.onLangChange.subscribe((event) => {
this.setSyncfutionDataList()
});
}
setSyncfutionDataList() {
if (this.pmsMasfromEvaluation.dataList) {
this.syncfutionDataList = this.pmsMasfromEvaluation.dataList.map(e => ({
pmsEvaluationRoundId: e.pmsEvaluationRoundId,
name: this.translateService.getCurrentLang() == 'th' ? e.tdesc : e.edesc,
apsyear: e.apsyear,
apsPeriodStart: e.apsPeriodStart,
apsPeriodEnd: e.apsPeriodEnd,
statusCode: e.statusCode.tdesc
}))
}
}
ngOnInit(): void { ngOnInit(): void {
this.getPmsMasfromEvaluationCycleList() this.getPmsMasfromEvaluationCycleList()
this.unlisten = this.renderer.listen('document', 'keydown', (event) => { this.unlisten = this.renderer.listen('document', 'keydown', (event) => {
...@@ -184,6 +203,7 @@ export class ManagementCycleComponent { ...@@ -184,6 +203,7 @@ export class ManagementCycleComponent {
this.selectedItems.count = 0 this.selectedItems.count = 0
this.dataLoading = false this.dataLoading = false
this.isDataListCheckedAll = false this.isDataListCheckedAll = false
this.setSyncfutionDataList()
this.cdr.detectChanges(); this.cdr.detectChanges();
}, },
error: err => { error: err => {
...@@ -192,9 +212,10 @@ export class ManagementCycleComponent { ...@@ -192,9 +212,10 @@ export class ManagementCycleComponent {
} }
}); });
} }
selectPmsMasfromEvaluationCycle(pmsMasfromEvaluation?: PmsMasfromEvaluationModel) { selectPmsMasfromEvaluationCycle(dataSelect?: any) {
if (pmsMasfromEvaluation) { const data = dataSelect ? this.pmsMasfromEvaluation.dataList.find(e => e.pmsEvaluationRoundId == dataSelect.pmsEvaluationRoundId) : undefined
this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel(pmsMasfromEvaluation) if (data) {
this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel(data)
} else if (this.modalStatus == 'add') { } else if (this.modalStatus == 'add') {
this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel() this.pmsMasfromEvaluation.select = new MyPmsMasfromEvaluationModel()
} else if (this.modalStatus == 'edit') { } else if (this.modalStatus == 'edit') {
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[(ngModel)]="search" (ngModelChange)="searchChange()"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="search"
(ngModelChange)="searchChange()">
<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,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<button type="button" class="ti-btn ti-btn-soft-success h-45px m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-success h-45px m-0 shadow-md"
data-hs-overlay="#define-evaluation-factors-alert-modal"> data-hs-overlay="#define-evaluation-factors-alert-modal">
<i class="ri-save-3-line"></i> <i class="ri-save-3-line"></i>
Save {{'Save' | translate }}
</button> </button>
</div> </div>
<div class="px-1"> <div class="px-1">
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<polyline points="48.97 24 48.97 15.03 56 15.03"></polyline> <polyline points="48.97 24 48.97 15.03 56 15.03"></polyline>
</g> </g>
</svg> </svg>
Clear {{'Clear' | translate }}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
<ng-container *ngFor="let item of pmsEvaluationFactorsTableHeader; let f = first; let l = last"> <ng-container *ngFor="let item of pmsEvaluationFactorsTableHeader; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary"
[class.!text-center]="f||l"> [class.!text-center]="f||l">
<span class="font-size-12px font-weight-700">{{ item }}</span> <span class="font-size-12px font-weight-700">{{ item | translate}}</span>
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l"> <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
<i class="ti ti-dots-vertical fs-l"></i> <i class="ti ti-dots-vertical fs-l"></i>
</div> </div>
...@@ -75,7 +76,7 @@ ...@@ -75,7 +76,7 @@
<tbody *ngIf="!pmsEvaluationFactors.loading&&!dataListFilter().length"> <tbody *ngIf="!pmsEvaluationFactors.loading&&!dataListFilter().length">
<tr> <tr>
<td class="text-center" colspan="100%"> <td class="text-center" colspan="100%">
ไม่พบข้อมูล {{'NoInformation' | translate}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -129,9 +130,10 @@ ...@@ -129,9 +130,10 @@
</li> </li>
</ul> </ul>
<ul class="nav-tabs mt-3"> <ul class="nav-tabs mt-3">
<span>Show {{((currentPage-1) * 10)+1}} to {{dataListFilter().length<10 ?dataListFilter().length: <span>{{'Show' | translate}} {{((currentPage-1) * 10)+1}} {{'To' | translate}} {{dataListFilter().length<10
(currentPage==page.length ? ((currentPage * 10) - ((currentPage * 10) - dataListFilter().length) ) ?dataListFilter().length: (currentPage==page.length ? ((currentPage * 10) - ((currentPage * 10) -
:(currentPage * 10) ) }} of {{dataListFilter().length}} items</span> dataListFilter().length) ) :(currentPage * 10) ) }} {{'From' | translate}}
{{dataListFilter().length}} {{'Items' | translate}}</span>
</ul> </ul>
</nav> </nav>
</div> </div>
......
...@@ -15,7 +15,7 @@ export class DefineEvaluationFactorsComponent { ...@@ -15,7 +15,7 @@ export class DefineEvaluationFactorsComponent {
page = Array.from({ length: 1 }, (_, i) => i + 1); page = Array.from({ length: 1 }, (_, i) => i + 1);
search = "" search = ""
pmsEvaluationFactors: { loading: boolean, dataList: PmsEvaluationFactorsModel[] } = { loading: false, dataList: [] } pmsEvaluationFactors: { loading: boolean, dataList: PmsEvaluationFactorsModel[] } = { loading: false, dataList: [] }
pmsEvaluationFactorsTableHeader: string[] = ['ระดับพนักงาน'] pmsEvaluationFactorsTableHeader: string[] = ['JobLevelJL']
constructor(private pmsEvaluationFactorsService: PmsEvaluationFactorsService, constructor(private pmsEvaluationFactorsService: PmsEvaluationFactorsService,
private toastr: ToastrService, private toastr: ToastrService,
private cdr: ChangeDetectorRef private cdr: ChangeDetectorRef
...@@ -25,7 +25,7 @@ export class DefineEvaluationFactorsComponent { ...@@ -25,7 +25,7 @@ export class DefineEvaluationFactorsComponent {
} }
getPmsEvaluationFactorsList() { getPmsEvaluationFactorsList() {
this.pmsEvaluationFactors.loading = true this.pmsEvaluationFactors.loading = true
this.pmsEvaluationFactorsTableHeader = ['ระดับพนักงาน'] this.pmsEvaluationFactorsTableHeader = ['JobLevelJL']
this.pmsEvaluationFactorsService.getList().subscribe({ this.pmsEvaluationFactorsService.getList().subscribe({
next: response => { next: response => {
this.pmsEvaluationFactors.dataList = response.map(x => new MyPmsEvaluationFactorsModel(x)) this.pmsEvaluationFactors.dataList = response.map(x => new MyPmsEvaluationFactorsModel(x))
...@@ -35,7 +35,7 @@ export class DefineEvaluationFactorsComponent { ...@@ -35,7 +35,7 @@ export class DefineEvaluationFactorsComponent {
this.pmsEvaluationFactors.dataList[0] this.pmsEvaluationFactors.dataList[0]
); );
const pmsTypeIds = maxItem?.pmsEvaluationFactors1ModelList.map(x => x.pmsType.pmsTypeId) || []; const pmsTypeIds = maxItem?.pmsEvaluationFactors1ModelList.map(x => x.pmsType.pmsTypeId) || [];
this.pmsEvaluationFactorsTableHeader = this.pmsEvaluationFactorsTableHeader.concat(maxItem?.pmsEvaluationFactors1ModelList.map(x => x.pmsType.tdesc) || []).concat(['รวม']) this.pmsEvaluationFactorsTableHeader = this.pmsEvaluationFactorsTableHeader.concat(maxItem?.pmsEvaluationFactors1ModelList.map(x => x.pmsType.tdesc) || []).concat(['Total'])
this.pmsEvaluationFactors.dataList.forEach(x => { this.pmsEvaluationFactors.dataList.forEach(x => {
while (x.pmsEvaluationFactors1ModelList.length < 5) { while (x.pmsEvaluationFactors1ModelList.length < 5) {
const usedTypes = x.pmsEvaluationFactors1ModelList.map(y => y.pmsType.pmsTypeId); const usedTypes = x.pmsEvaluationFactors1ModelList.map(y => y.pmsType.pmsTypeId);
......
...@@ -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.PmsFactors' | 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">
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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">
กำหนดปัจจัยการประเมินผล {{'PMSFactorsSetting' | translate }}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./evaluation-factors.component.scss'] styleUrls: ['./evaluation-factors.component.scss']
}) })
export class EvaluationFactorsComponent { export class EvaluationFactorsComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'ปัจจัยการประเมินผล', 'กำหนดปัจจัยการประเมินผล'] pathTitle = ['menu.PerformanceManagementSystem', 'menu.PmsFactors', 'PMSFactorsSetting']
} }
...@@ -57,41 +57,41 @@ ...@@ -57,41 +57,41 @@
<div class="w-full min-height-50px mb-10px justify-between items-center"> <div class="w-full min-height-50px mb-10px justify-between items-center">
<div class="flex justify-end"> <div class="flex justify-end">
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
[(ngModel)]="search"> [(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>
</div> </div>
</div>
</div>
<div class="px-1">
<button type="button"
class=" h-45px ti-btn ti-btn bg-pink-500/10 text-pink-500 hover:text-white hover:bg-pink-500 ring-offset-white focus:ring-pink-500 dark:focus:ring-offset-white/10 h-10 m-0 shadow-md"
data-hs-overlay="#assessment-topics-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
import
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
(click)="modalStatus='add';selectPmstype();selectPmstopic();openDialog();">
<i class="ri-add-line"></i>
Add
</button>
</div>
<div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
(click)="modalStatus='delete';selectPmstopic();deletepmsTopics()" >
<i class="ri-delete-bin-6-line"></i>
Delete
</button>
</div> </div>
</div>
<div class="px-1">
<button type="button"
class=" h-45px ti-btn ti-btn bg-pink-500/10 text-pink-500 hover:text-white hover:bg-pink-500 ring-offset-white focus:ring-pink-500 dark:focus:ring-offset-white/10 h-10 m-0 shadow-md"
data-hs-overlay="#assessment-topics-upload-modal"
(click)="fileInput.value = '';selectedFile=null;selectedFileName = 'กรุณาเลือกไฟล์'">
<i class="ti ti-file-plus"></i>
{{'Import' | translate}}
</button>
</div>
<div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-secondary h-45px m-0 shadow-md"
(click)="modalStatus='add';selectPmstype();selectPmstopic();openDialog();">
<i class="ri-add-line"></i>
{{'Add' | translate}}
</button>
</div>
<div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
(click)="modalStatus='delete';selectPmstopic();deletepmsTopics()">
<i class="ri-delete-bin-6-line"></i>
{{'Delete' | translate}}
</button>
</div>
</div> </div>
</div> </div>
...@@ -186,9 +186,10 @@ ...@@ -186,9 +186,10 @@
</nav> </nav>
</div> --> </div> -->
<div class="page px-rem"> <div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="pmstopic.dataList" <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="syncfutionDataList"
[columns]="columns" [selectedItems]="selectedItems" [columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="modalStatus='edit';selectPmstopic($event);openDialog()" (sendSelectedItems)="onSelectItemChange($event)"> (sendSelectData)="modalStatus='edit';selectPmstopic($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution> </app-datagrid-syncfution>
</div> </div>
...@@ -196,89 +197,92 @@ ...@@ -196,89 +197,92 @@
<ng-template #assessmentTopicsModal let-modal> <ng-template #assessmentTopicsModal let-modal>
<h3 mat-dialog-title> <h3 mat-dialog-title>
{{modalStatus=='add'?'เพิ่มหัวข้อการประเมิน':'เเก้ไขหัวข้อการประเมิน'}} {{modalStatus=='add'?'เพิ่มหัวข้อการประเมิน':'เเก้ไขหัวข้อการประเมิน'}}
</h3> </h3>
<div class="w-full flex justify-end mb-1rem"> <div class="w-full flex justify-end mb-1rem">
<div class="absolute flex"> <div class="absolute flex">
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectPmstype();selectPmstopic()"> <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
<i class="ti ti-eraser text-base"></i> (click)="selectPmstype();selectPmstopic()">
Clear <i class="ti ti-eraser text-base"></i>
</button> Clear
</div> </button>
</div> </div>
</div>
</div> </div>
<mat-dialog-content> <mat-dialog-content>
<label class="ti-form-label mt-2rem">รหัส<span class="text-danger">*<ng-container <label class="ti-form-label mt-2rem">รหัส<span class="text-danger">*<ng-container
*ngIf="modalStatus=='add'&&checkPrimary()"> *ngIf="modalStatus=='add'&&checkPrimary()">
รหัสซ้ำ รหัสซ้ำ
</ng-container></span></label> </ng-container></span></label>
<input type="text" class="ti-form-input w-1/2" [class.!bg-input-readonly]="modalStatus=='edit'" <input type="text" class="ti-form-input w-1/2" [class.!bg-input-readonly]="modalStatus=='edit'"
[readonly]="modalStatus=='edit'" [(ngModel)]="pmstopic.select.pmsTopicId"> [readonly]="modalStatus=='edit'" [(ngModel)]="pmstopic.select.pmsTopicId">
<label class="ti-form-label mt-2rem">ประเภทการประเมินผล<span class="text-danger">*</span></label> <label class="ti-form-label mt-2rem">ประเภทการประเมินผล<span class="text-danger">*</span></label>
<div class="flex"> <div class="flex">
<div class="relative flex rounded-md"> <div class="relative flex rounded-md">
<input type="text" class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10" readonly <input type="text" class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10" readonly
style="padding-right: 3.5rem;" [(ngModel)]="pmstopic.select.pmsType.tdesc"> style="padding-right: 3.5rem;" [(ngModel)]="pmstopic.select.pmsType.tdesc">
<div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2"> <div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<button type="button" class="flex items-center text-red-500" (click)="selectPmstype()"> <button type="button" class="flex items-center text-red-500" (click)="selectPmstype()">
<i class="ti ti-circle-x cursor-pointer"></i> <i class="ti ti-circle-x cursor-pointer"></i>
</button> </button>
<button type="button" class="flex items-center text-gray-500 dark:text-white/70" <button type="button" class="flex items-center text-gray-500 dark:text-white/70"
(click)="openpmsTypeDialog()"> (click)="openpmsTypeDialog()">
<i class="ri-search-line cursor-pointer text-gray"></i> <i class="ri-search-line cursor-pointer text-gray"></i>
</button> </button>
</div>
</div>
</div> </div>
<label class="ti-form-label mt-2rem">ชื่อหัวข้อ<span class="text-danger">*</span></label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.tdesc">
<label class="ti-form-label mt-2rem">ชื่อหัวข้อ (อังกฤษ)</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.edesc">
<label class="ti-form-label mt-2rem">ตัวชี้วัดผลงานหลัก</label>
<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>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.detailUnit">
<label class="ti-form-label mt-2rem">กำหนดเวลาแล้วเสร็จ</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.completionDate">
<label class="ti-form-label mt-2rem">น้ำหนัก</label>
<input type="text" class="ti-form-input"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmstopic.select.weight">
<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">E (1 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetEdetail">
</div> </div>
</div>
<label class="ti-form-label mt-2rem">ชื่อหัวข้อ<span class="text-danger">*</span></label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.tdesc">
<label class="ti-form-label mt-2rem">ชื่อหัวข้อ (อังกฤษ)</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.edesc">
<label class="ti-form-label mt-2rem">ตัวชี้วัดผลงานหลัก</label>
<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>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.detailUnit">
<label class="ti-form-label mt-2rem">กำหนดเวลาแล้วเสร็จ</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmstopic.select.completionDate">
<label class="ti-form-label mt-2rem">น้ำหนัก</label>
<input type="text" class="ti-form-input"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmstopic.select.weight">
<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">E (1 คะแนน)</label>
<input type="text" class="ti-form-input col-span-9" [(ngModel)]="pmstopic.select.targetEdetail">
</div>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions align="end"> <mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close] <button type="button" mat-button [mat-dialog-close]
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"> 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">
ย้อนกลับ ย้อนกลับ
</button> </button>
<button type="button" class="ti-btn ti-btn-success" mat-button [class.ti-btn-disabled]="!pmstopic.select.pmsTopicId||!pmstopic.select.tdesc||(modalStatus=='add'&&checkPrimary())" (click)="addpmsTopics()" <button type="button" class="ti-btn ti-btn-success" mat-button
[class.ti-btn-disabled]="!pmstopic.select.pmsTopicId||!pmstopic.select.tdesc||(modalStatus=='add'&&checkPrimary())"
(click)="addpmsTopics()"
[disabled]="!pmstopic.select.pmsTopicId||!pmstopic.select.tdesc||(modalStatus=='add'&&checkPrimary())"> [disabled]="!pmstopic.select.pmsTopicId||!pmstopic.select.tdesc||(modalStatus=='add'&&checkPrimary())">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
</mat-dialog-actions> </mat-dialog-actions>
</ng-template> </ng-template>
...@@ -287,64 +291,63 @@ ...@@ -287,64 +291,63 @@
รายการประเภทการประเมิน รายการประเภทการประเมิน
</h3> </h3>
<mat-dialog-content> <mat-dialog-content>
<div class="flex justify-end pb-1rem"> <div class="flex justify-end pb-1rem">
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="pmstypemodal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())"> [(ngModel)]="pmstypemodal.search" (ngModelChange)="modalSearchChange(pmstypeListFilter())">
<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>
</div>
</div>
</div> </div>
</div>
</div> </div>
<div class="overflow-auto border"> </div>
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover"> <div class="overflow-auto border">
<thead> <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
<tr> <thead>
<ng-container <tr>
*ngFor="let item of ['ลำดับ','รหัส','ชื่อหัวข้อ','ชื่อประเภท']; let f = first; let l = last"> <ng-container *ngFor="let item of ['ลำดับ','รหัส','ชื่อหัวข้อ','ชื่อประเภท']; let f = first; let l = last">
<th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" <th scope="col" class="relative px-10px py-10px bg-soft-secondary text-primary" [class.!text-center]="f">
[class.!text-center]="f"> <span class="text-sm">{{ item }}</span>
<span class="text-sm">{{ item }}</span> <div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l">
<div class="absolute top-1/2 transform -translate-y-1/2 right-0" *ngIf="!l"> <i class="ti ti-dots-vertical fs-l"></i>
<i class="ti ti-dots-vertical fs-l"></i> </div>
</div> </th>
</th> </ng-container>
</ng-container> </tr>
</tr> </thead>
</thead> <tbody *ngIf="!pmstypeListFilter().length">
<tbody *ngIf="!pmstypeListFilter().length"> <tr>
<tr> <td class="text-center" colspan="100%">
<td class="text-center" colspan="100%"> ไม่พบข้อมูล
ไม่พบข้อมูล </td>
</td> </tr>
</tr> </tbody>
</tbody> <tbody *ngIf="pmstypeListFilter().length">
<tbody *ngIf="pmstypeListFilter().length"> <tr
<tr *ngFor="let item of pmstypeListFilter() | slice:((pmstypemodal.currentPage-1) * pmstypemodal.pageSize) : (((pmstypemodal.currentPage-1) * pmstypemodal.pageSize) + pmstypemodal.pageSize);let i = index" *ngFor="let item of pmstypeListFilter() | slice:((pmstypemodal.currentPage-1) * pmstypemodal.pageSize) : (((pmstypemodal.currentPage-1) * pmstypemodal.pageSize) + pmstypemodal.pageSize);let i = index"
class="cursor-pointer" (click)="selectPmstype(item.data);closepmsTypeDialog()" > class="cursor-pointer" (click)="selectPmstype(item.data);closepmsTypeDialog()">
<td class="flex justify-center"> <td class="flex justify-center">
{{((pmstypemodal.currentPage-1) * pmstypemodal.pageSize)+(i+1)}} {{((pmstypemodal.currentPage-1) * pmstypemodal.pageSize)+(i+1)}}
</td> </td>
<td>{{item.data.pmsTypeId}}</td> <td>{{item.data.pmsTypeId}}</td>
<td>{{item.data.tdesc}}</td> <td>{{item.data.tdesc}}</td>
<td>{{item.data.shortName}}</td> <td>{{item.data.shortName}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<app-pagination [totalItems]="pmstypeListFilter().length" [pageSize]="pmstypemodal.pageSize" <app-pagination [totalItems]="pmstypeListFilter().length" [pageSize]="pmstypemodal.pageSize"
(pageChange)="pmstypemodal.currentPage = $event" (pageChange)="pmstypemodal.currentPage = $event"
(pageSizeChange)="pmstypemodal.pageSize = $event;pmstypemodal.currentPage = 1"></app-pagination> (pageSizeChange)="pmstypemodal.pageSize = $event;pmstypemodal.currentPage = 1"></app-pagination>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions align="end"> <mat-dialog-actions align="end">
<button type="button" mat-button [mat-dialog-close] <button type="button" mat-button [mat-dialog-close]
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"> 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">
ย้อนกลับ ย้อนกลับ
</button> </button>
</mat-dialog-actions> </mat-dialog-actions>
</ng-template> </ng-template>
......
...@@ -8,6 +8,7 @@ import { PmstypeService } from 'src/app/shared/services/pmstype.service'; ...@@ -8,6 +8,7 @@ import { PmstypeService } from 'src/app/shared/services/pmstype.service';
import { ColumnModel } from '@syncfusion/ej2-grids'; import { ColumnModel } from '@syncfusion/ej2-grids';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import Swal from 'sweetalert2'; import Swal from 'sweetalert2';
import { TranslateService } from '@ngx-translate/core';
interface table { interface table {
currentPage: number, currentPage: number,
...@@ -26,9 +27,9 @@ export class AssessmentTopicsComponent { ...@@ -26,9 +27,9 @@ export class AssessmentTopicsComponent {
numDataListChecked = 0 numDataListChecked = 0
isDataListChecked = false isDataListChecked = false
isDataListCheckedAll = false isDataListCheckedAll = false
pmstopic: { loading: boolean, select: PmstopicModel, completionDateIso: string, dataList: PmstopicModel [] } = { loading: false, select: new MyPmstopicModel(), completionDateIso: "", dataList: [] } pmstopic: { loading: boolean, select: PmstopicModel, completionDateIso: string, dataList: PmstopicModel[] } = { loading: false, select: new MyPmstopicModel(), completionDateIso: "", dataList: [] }
pmstype: { loading: boolean, select: PmstypeModel, dataList: { check: boolean, data: PmstypeModel }[] } = { loading: false, select: new MyPmstypeModel(), dataList: [] } pmstype: { loading: boolean, select: PmstypeModel, dataList: { check: boolean, data: PmstypeModel }[] } = { loading: false, select: new MyPmstypeModel(), dataList: [] }
modal: table = { modal: table = {
currentPage: 1, currentPage: 1,
page: Array.from({ length: 1 }, (_, i) => i + 1), page: Array.from({ length: 1 }, (_, i) => i + 1),
...@@ -45,46 +46,61 @@ export class AssessmentTopicsComponent { ...@@ -45,46 +46,61 @@ export class AssessmentTopicsComponent {
modalStatus: "add" | "edit" | 'delete' = "add" modalStatus: "add" | "edit" | 'delete' = "add"
selectedFile: File | null = null; selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์'; selectedFileName: string = 'กรุณาเลือกไฟล์';
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "pmsTopicId", field: "pmsTopicId",
headerText: "รหัส", headerText: "Code",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "name",
headerText: "ชื่อหัวข้อ", headerText: "TopicName",
type: "string" type: "string"
}, },
{ {
field: "pmsType.tdesc", field: "pmsType",
headerText: "ชื่อประเภท", headerText: "PmsTypes",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
fields: ['pmsTopicId', 'tdesc', 'pmsType.tdesc'], fields: ['pmsTopicId', 'name', 'pmsType'],
operator: 'contains', operator: 'contains',
ignoreCase: false ignoreCase: false
}; };
search = ''
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() }; syncfutionDataList: any[] = []
search = ''
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
@ViewChild("assessmentTopicsModal") assessmentTopicsModal: any; @ViewChild("assessmentTopicsModal") assessmentTopicsModal: any;
@ViewChild("assessmentTopoicsTypeModal") assessmentTopoicsTypeModal: any; @ViewChild("assessmentTopoicsTypeModal") assessmentTopoicsTypeModal: any;
dialogRef: any dialogRef: any
dialogRefpmsType: any dialogRefpmsType: any
constructor(private cdr: ChangeDetectorRef, constructor(private cdr: ChangeDetectorRef,
private pmstopicService: PmstopicService, private pmstopicService: PmstopicService,
private dialog: MatDialog, private dialog: MatDialog,
private toastr: ToastrService, private toastr: ToastrService,
private fileService: FileService, private fileService: FileService,
private pmstypeService: PmstypeService private pmstypeService: PmstypeService,
private translateService: TranslateService
) { ) {
} this.translateService.onLangChange.subscribe((event) => {
this.setSyncfutionDataList()
});
}
setSyncfutionDataList() {
if (this.pmstopic.dataList) {
this.syncfutionDataList = this.pmstopic.dataList.map(e => ({
pmsTopicId: e.pmsTopicId,
name: this.translateService.getCurrentLang() == 'th' ? e.tdesc : e.edesc,
pmsType: e.pmsType.tdesc
}))
}
}
ngOnInit(): void { ngOnInit(): void {
this.getPmstopicList() this.getPmstopicList()
this.getPmstypeList() this.getPmstypeList()
...@@ -95,7 +111,8 @@ export class AssessmentTopicsComponent { ...@@ -95,7 +111,8 @@ export class AssessmentTopicsComponent {
next: response => { next: response => {
this.pmstype.dataList = response.map(x => ({ this.pmstype.dataList = response.map(x => ({
check: false, check: false,
data: new MyPmstypeModel(x) })) data: new MyPmstypeModel(x)
}))
this.pmstype.loading = false this.pmstype.loading = false
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
...@@ -125,13 +142,14 @@ export class AssessmentTopicsComponent { ...@@ -125,13 +142,14 @@ export class AssessmentTopicsComponent {
this.selectedItems.data.clear() this.selectedItems.data.clear()
this.pmstopicService.getList().subscribe({ this.pmstopicService.getList().subscribe({
next: response => { next: response => {
this.pmstopic.dataList = response.map(x => { this.pmstopic.dataList = response.map(x => {
this.selectedItems.data.set(x.pmsTopicId, false) this.selectedItems.data.set(x.pmsTopicId, false)
return new MyPmstopicModel(x) return new MyPmstopicModel(x)
}) })
this.selectedItems.key = 'pmsTopicId' this.selectedItems.key = 'pmsTopicId'
this.selectedItems.count = 0 this.selectedItems.count = 0
this.pmstopic.loading = false this.pmstopic.loading = false
this.setSyncfutionDataList()
this.cdr.detectChanges() this.cdr.detectChanges()
}, error: error => { }, error: error => {
this.pmstopic.loading = false this.pmstopic.loading = false
...@@ -140,83 +158,84 @@ export class AssessmentTopicsComponent { ...@@ -140,83 +158,84 @@ export class AssessmentTopicsComponent {
}) })
} }
selectPmstopic(pmstopic?: PmstopicModel) { selectPmstopic(dataSelect?: any) {
if (pmstopic) { const data = this.pmstopic.dataList.find(e => e.pmsTopicId == dataSelect.pmsTopicId)
this.pmstopic.select = new MyPmstopicModel(pmstopic) if (data) {
} else if (this.modalStatus == 'add') { this.pmstopic.select = new MyPmstopicModel(data)
this.pmstopic.select = new MyPmstopicModel() } else if (this.modalStatus == 'add') {
} else if (this.modalStatus == 'edit') { this.pmstopic.select = new MyPmstopicModel()
this.pmstopic.select = new MyPmstopicModel({ pmsTopicId: this.pmstopic.select.pmsTopicId }) } else if (this.modalStatus == 'edit') {
} this.pmstopic.select = new MyPmstopicModel({ pmsTopicId: this.pmstopic.select.pmsTopicId })
} }
}
addpmsTopics() { addpmsTopics() {
Swal.fire({ Swal.fire({
icon: 'question', icon: 'question',
title: 'แจ้งเตือน', title: 'แจ้งเตือน',
text: 'ยืนยันการบันทึกข้อมูลหรือไม่', text: 'ยืนยันการบันทึกข้อมูลหรือไม่',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'บันทึกข้อมูล', confirmButtonText: 'บันทึกข้อมูล',
cancelButtonText: 'ย้อนกลับ', cancelButtonText: 'ย้อนกลับ',
reverseButtons: true, reverseButtons: true,
}).then((result) => { }).then((result) => {
if (result.isConfirmed) { if (result.isConfirmed) {
this.pmstopic.loading = true this.pmstopic.loading = true
this.pmstopicService.post(this.pmstopic.select).subscribe({ this.pmstopicService.post(this.pmstopic.select).subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
this.getPmstopicList() this.getPmstopicList()
this.closeDialog() this.closeDialog()
} else { } else {
this.showAlert(response.message, 'error') this.showAlert(response.message, 'error')
this.pmstopic.loading = false
}
}, error: error => {
this.showAlert(error.message, 'error')
this.pmstopic.loading = false this.pmstopic.loading = false
} }
}) }, error: error => {
} this.showAlert(error.message, 'error')
}) this.pmstopic.loading = false
} }
deletepmsTopics() { })
if (!this.numSelectItem()) {
this.showAlert('กรุณาเลือกข้อมูลที่ต้องการลบ', 'error')
return
} }
Swal.fire({ })
icon: 'question', }
title: 'แจ้งเตือน', deletepmsTopics() {
text: 'ยืนยันการลบข้อมูลหรือไม่', if (!this.numSelectItem()) {
showCancelButton: true, this.showAlert('กรุณาเลือกข้อมูลที่ต้องการลบ', 'error')
confirmButtonText: 'ลบข้อมูล', return
cancelButtonText: 'ย้อนกลับ', }
reverseButtons: true, Swal.fire({
}).then((result) => { icon: 'question',
if (result.isConfirmed) { title: 'แจ้งเตือน',
this.pmstopic.loading = true text: 'ยืนยันการลบข้อมูลหรือไม่',
const selectedKeys = Array.from(this.selectedItems.data.keys()); showCancelButton: true,
const body = this.pmstopic.dataList.filter(x => selectedKeys.includes(x.pmsTopicId) && this.selectedItems.data.get(x.pmsTopicId)).map(x => new MyPmstopicModel(x)) confirmButtonText: 'ลบข้อมูล',
this.pmstopicService.delete(body).subscribe({ cancelButtonText: 'ย้อนกลับ',
next: response => { reverseButtons: true,
if (response.success) { }).then((result) => {
this.showAlert(response.message, 'success') if (result.isConfirmed) {
this.getPmstopicList() this.pmstopic.loading = true
this.closeDialog() const selectedKeys = Array.from(this.selectedItems.data.keys());
} else { const body = this.pmstopic.dataList.filter(x => selectedKeys.includes(x.pmsTopicId) && this.selectedItems.data.get(x.pmsTopicId)).map(x => new MyPmstopicModel(x))
this.showAlert(response.message, 'error') this.pmstopicService.delete(body).subscribe({
this.pmstopic.loading = false next: response => {
} if (response.success) {
}, error: error => { this.showAlert(response.message, 'success')
this.showAlert(error.message, 'error') this.getPmstopicList()
this.closeDialog()
} else {
this.showAlert(response.message, 'error')
this.pmstopic.loading = false this.pmstopic.loading = false
} }
}) }, error: error => {
} this.showAlert(error.message, 'error')
}); this.pmstopic.loading = false
} }
})
}
});
}
showAlert(text: string, type: 'success' | 'error') { showAlert(text: string, type: 'success' | 'error') {
this.toastr[type](text, 'แจ้งเตือน', { this.toastr[type](text, 'แจ้งเตือน', {
...@@ -347,5 +366,5 @@ export class AssessmentTopicsComponent { ...@@ -347,5 +366,5 @@ export class AssessmentTopicsComponent {
const num = this.pmstopic.dataList.filter(x => selectedKeys.includes(x.pmsTopicId) && this.selectedItems.data.get(x.pmsTopicId)).length const num = this.pmstopic.dataList.filter(x => selectedKeys.includes(x.pmsTopicId) && this.selectedItems.data.get(x.pmsTopicId)).length
return num return num
} }
} }
\ No newline at end of file
...@@ -18,18 +18,18 @@ export class AssessmentTypesComponent { ...@@ -18,18 +18,18 @@ export class AssessmentTypesComponent {
modalStatus: "add" | "edit" | 'delete' = "add" modalStatus: "add" | "edit" | 'delete' = "add"
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "pmsTypeId", field: "pmsTypeId",
headerText: "รหัส", headerText: "Code",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "ชื่อประเภท", headerText: "TypeName",
type: "string" type: "string"
}, },
{ {
field: "shortName", field: "shortName",
headerText: "ชื่อย่อ", headerText: "Abbreviations",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
......
...@@ -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.DataBankPms' | 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">
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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)="currentPath=1;pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'ทะเบียนกำหนดชื่อ','ประเภทการประเมิน']"> (click)="currentPath=1;pathTitle = ['menu.PerformanceManagementSystem', 'menu.DataBankPms','PmsTypes']">
ประเภทการประเมิน {{'PmsTypes' | 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"
aria-controls="underline-2" aria-controls="underline-2"
(click)="currentPath=2;pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'ทะเบียนกำหนดชื่อ','หัวข้อการประเมิน']"> (click)="currentPath=2;pathTitle = ['menu.PerformanceManagementSystem', 'menu.DataBankPms','PmsTopics']">
หัวข้อการประเมิน {{'PmsTopics' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,6 +6,6 @@ import { Component } from '@angular/core'; ...@@ -6,6 +6,6 @@ import { Component } from '@angular/core';
styleUrls: ['./name-registration-perfomance.component.scss'] styleUrls: ['./name-registration-perfomance.component.scss']
}) })
export class NameRegistrationPerfomanceComponent { export class NameRegistrationPerfomanceComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'ทะเบียนกำหนดชื่อ', 'ประเภทการประเมิน'] pathTitle = ['menu.PerformanceManagementSystem', 'menu.DataBankPms', 'PmsTypes']
currentPath = 1 currentPath = 1
} }
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
<div class="px-1"> <div class="px-1">
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
style="height: 40px;" [(ngModel)]="search" (ngModelChange)="searchChange()"> [placeholder]="'SearchByNoOrName' | translate" style="height: 40px;" [(ngModel)]="search"
<div (ngModelChange)="searchChange()">
<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>
</div> </div>
...@@ -16,17 +17,17 @@ ...@@ -16,17 +17,17 @@
<button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(click)="selectData();pathTitleChange('add')"> (click)="selectData();pathTitleChange('add')">
<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-10 m-0 shadow-md" <button href="javascript:void(0);" class="ti-btn ti-btn-soft-danger h-10 m-0 shadow-md"
data-hs-overlay="#grade-management-alert-delete-modal" (click)="selectData()"> data-hs-overlay="#grade-management-alert-delete-modal" (click)="selectData()">
<i class="ri-delete-bin-6-line"></i> <i class="ri-delete-bin-6-line"></i>
Delete {{'Delete' |translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md"> <button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-10 m-0 shadow-md">
<i class="ti ti-book fs-l"></i> <i class="ti ti-book fs-l"></i>
Help Help
...@@ -36,8 +37,8 @@ ...@@ -36,8 +37,8 @@
</div> </div>
<div class="page px-rem"> <div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="dataList" <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="dataList"
[columns]="columns" [selectedItems]="selectedItems" [columns]="columns" [selectedItems]="selectedItems" (sendSelectData)="typeTab='edit';selectData($event)"
(sendSelectData)="typeTab='edit';selectData($event)" (sendSelectedItems)="onSelectItemChange($event)"> (sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution> </app-datagrid-syncfution>
</div> </div>
<!-- <div class="page px-rem"> <!-- <div class="page px-rem">
...@@ -150,7 +151,7 @@ ...@@ -150,7 +151,7 @@
ย้อนกลับ ย้อนกลับ
</button> </button>
<a class="ti-btn ti-btn-danger" href="javascript:void(0);" <a class="ti-btn ti-btn-danger" href="javascript:void(0);"
data-hs-overlay="#grade-management-alert-delete-modal" *ngIf="numDataListChecked" data-hs-overlay="#grade-management-alert-delete-modal" *ngIf="numDataListChecked"
(click)="deletePmsGroupGradeList();"> (click)="deletePmsGroupGradeList();">
ลบข้อมูล ลบข้อมูล
</a> </a>
...@@ -163,8 +164,8 @@ ...@@ -163,8 +164,8 @@
<ng-container *ngIf="typeTab"> <ng-container *ngIf="typeTab">
<app-pms-group-grade [dataSelect]="dataSelect" [dataList]="dataList" [typeTab]="typeTab" (sendBackTab)="pathTitleChange($event)" <app-pms-group-grade [dataSelect]="dataSelect" [dataList]="dataList" [typeTab]="typeTab"
(sendDataList)="dataList=$event"></app-pms-group-grade> (sendBackTab)="pathTitleChange($event)" (sendDataList)="dataList=$event"></app-pms-group-grade>
</ng-container> </ng-container>
<!-- <ng-container *ngIf="editTab"> <!-- <ng-container *ngIf="editTab">
......
...@@ -35,35 +35,35 @@ export class PmsGradeManagementComponent { ...@@ -35,35 +35,35 @@ export class PmsGradeManagementComponent {
dataSelect: DataModel = { check: false, code: '', tdesc: '', edesc: '', pmsGrade: [] } dataSelect: DataModel = { check: false, code: '', tdesc: '', edesc: '', pmsGrade: [] }
columns: ColumnModel[] = [{ columns: ColumnModel[] = [{
field: "code", field: "code",
headerText: "รหัส", headerText: "Code",
type: "string", type: "string",
isPrimaryKey: true, isPrimaryKey: true,
}, },
{ {
field: "tdesc", field: "tdesc",
headerText: "รายละเอียด (ไทย)", headerText: "DescriptionThai",
type: "string" type: "string"
}, },
{ {
field: "edesc", field: "edesc",
headerText: "รายละเอียด (อังกฤษ)", headerText: "DescriptionEng",
type: "string" type: "string"
}] }]
searchSettings = { searchSettings = {
fields: ['code','tdesc','edesc'], fields: ['code', 'tdesc', 'edesc'],
operator: 'contains', operator: 'contains',
ignoreCase: false ignoreCase: false
}; };
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() }; selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
@ViewChild("pmsGradeModal") pmsGradeModal: any; @ViewChild("pmsGradeModal") pmsGradeModal: any;
dialogRef: any dialogRef: any
constructor(private toastr: ToastrService, constructor(private toastr: ToastrService,
private pmsGroupGradeService: PmsGroupGradeService, private pmsGroupGradeService: PmsGroupGradeService,
private dialog: MatDialog, private dialog: MatDialog,
private cdr: ChangeDetectorRef) { private cdr: ChangeDetectorRef) {
this.sendPathTitle.emit(['การประเมินจัดการประสิทธิภาพ', 'ทะเบียนเกรด', 'การจัดการเกรด']) this.sendPathTitle.emit(['menu.PerformanceManagementSystem', 'menu.Grade', 'GradeManage'])
} }
ngOnInit(): void { ngOnInit(): void {
this.getPmsGroupGradeList() this.getPmsGroupGradeList()
...@@ -146,40 +146,40 @@ export class PmsGradeManagementComponent { ...@@ -146,40 +146,40 @@ export class PmsGradeManagementComponent {
} }
deletePmsGroupGradeList() { deletePmsGroupGradeList() {
if (!this.numSelectItem()) { if (!this.numSelectItem()) {
this.showAlert('กรุณาเลือกข้อมูลที่ต้องการลบ', 'error') this.showAlert('กรุณาเลือกข้อมูลที่ต้องการลบ', 'error')
return return
} }
Swal.fire({ Swal.fire({
icon: 'question', icon: 'question',
title: 'แจ้งเตือน', title: 'แจ้งเตือน',
text: 'ยืนยันการลบข้อมูลหรือไม่', text: 'ยืนยันการลบข้อมูลหรือไม่',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'ลบข้อมูล', confirmButtonText: 'ลบข้อมูล',
cancelButtonText: 'ย้อนกลับ', cancelButtonText: 'ย้อนกลับ',
reverseButtons: true, reverseButtons: true,
}).then((result) => { }).then((result) => {
if (result.isConfirmed) { if (result.isConfirmed) {
this.dataLoading = true this.dataLoading = true
const selectedKeys = Array.from(this.selectedItems.data.keys()); const selectedKeys = Array.from(this.selectedItems.data.keys());
const body = this.dataList.filter(x => selectedKeys.includes(x.code) && this.selectedItems.data.get(x.code)).map(x => new MyPmsGroupGradeModel({ groupGradeId: x.code, tdesc: x.tdesc, edesc: x.edesc })) const body = this.dataList.filter(x => selectedKeys.includes(x.code) && this.selectedItems.data.get(x.code)).map(x => new MyPmsGroupGradeModel({ groupGradeId: x.code, tdesc: x.tdesc, edesc: x.edesc }))
this.pmsGroupGradeService.delete(body).subscribe({ this.pmsGroupGradeService.delete(body).subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
this.getPmsGroupGradeList() this.getPmsGroupGradeList()
this.closeDialog() this.closeDialog()
} else { } else {
this.showAlert(response.message, 'error') this.showAlert(response.message, 'error')
this.dataLoading = false this.dataLoading = false
} }
}, error: error => { }, error: error => {
this.showAlert(error.message, 'error') this.showAlert(error.message, 'error')
this.dataLoading = false this.dataLoading = false
}
})
} }
}); })
}
});
} }
openDialog() { openDialog() {
......
...@@ -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.Grade' | 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-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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 = ['การประเมินจัดการประสิทธิภาพ','ทะเบียนเกรด','การจัดการเกรด']"> (click)="pathTitle = ['menu.PerformanceManagementSystem', 'menu.Grade', 'GradeManage']">
การจัดการเกรด {{'GradeManage' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./pms-grade-registration.component.scss'] styleUrls: ['./pms-grade-registration.component.scss']
}) })
export class PmsGradeRegistrationComponent { export class PmsGradeRegistrationComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'ทะเบียนเกรด', 'การจัดการเกรด'] pathTitle = ['menu.PerformanceManagementSystem', 'menu.Grade', 'GradeManage']
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<button type="button" class="ti-btn ti-btn-soft-success h-10 m-0 shadow-md" <button type="button" class="ti-btn ti-btn-soft-success h-10 m-0 shadow-md"
data-hs-overlay="#assessment-system-configurtion-alert-modal"> data-hs-overlay="#assessment-system-configurtion-alert-modal">
<i class="ri-save-3-line"></i> <i class="ri-save-3-line"></i>
Save {{'Save' | translate}}
</button> </button>
</div> </div>
<!-- <div class="px-1"> <!-- <div class="px-1">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="page"> <div class="page">
<div class="grid grid-cols-3 gap-6"> <div class="grid grid-cols-3 gap-6">
<div class="col-span-1"> <div class="col-span-1">
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">ปีการประเมิน <span <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label">{{'Year' | translate}}<span
class="text-danger">*</span></label> class="text-danger">*</span></label>
</div> </div>
</div> </div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label mt-10">เเสดงผลประเมินสมรรถนะ <span <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label mt-10">{{'Competency' | translate}}<span
class="text-danger">*</span></label> class="text-danger">*</span></label>
<div class="box-body"> <div class="box-body">
<div class="grid grid-cols-6 gap-2"> <div class="grid grid-cols-6 gap-2">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<div class="col-span-5"> <div class="col-span-5">
<label for="evaluationResultsStatus-0" class="text-sm text-gray-500" <label for="evaluationResultsStatus-0" class="text-sm text-gray-500"
[class.pointer-events-none]="setting.data.evaluationResultsStatus=='0'"> [class.pointer-events-none]="setting.data.evaluationResultsStatus=='0'">
เเสดงผล {{'DisplayResults' | translate}}
</label> </label>
</div> </div>
</div> </div>
...@@ -93,13 +93,13 @@ ...@@ -93,13 +93,13 @@
<div class="col-span-5"> <div class="col-span-5">
<label for="evaluationResultsStatus-1" class="text-sm text-gray-500" <label for="evaluationResultsStatus-1" class="text-sm text-gray-500"
[class.pointer-events-none]="setting.data.evaluationResultsStatus=='1'"> [class.pointer-events-none]="setting.data.evaluationResultsStatus=='1'">
ไม่เเสดงผล {{'NotDisplay' | translate}}
</label> </label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<label for="hs-trailing-button-add-on-with-icon" class="ti-form-label mt-10">เเสดงผลประเมินเวลาทำงาน <span <label for="hs-trailing-button-add-on-with-icon" class="ti-form-label mt-10">{{'TimeAttendance' | translate}} <span
class="text-danger">*</span></label> class="text-danger">*</span></label>
<div class="box-body"> <div class="box-body">
<div class="grid grid-cols-6 gap-2"> <div class="grid grid-cols-6 gap-2">
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<div class="col-span-5"> <div class="col-span-5">
<label for="workingTimeStatus-0" class="text-sm text-gray-500" <label for="workingTimeStatus-0" class="text-sm text-gray-500"
[class.pointer-events-none]="setting.data.workingTimeStatus=='0'"> [class.pointer-events-none]="setting.data.workingTimeStatus=='0'">
เเสดงผล {{'DisplayResults' | translate}}
</label> </label>
</div> </div>
</div> </div>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<div class="col-span-5"> <div class="col-span-5">
<label for="workingTimeStatus-1" class="text-sm text-gray-500" <label for="workingTimeStatus-1" class="text-sm text-gray-500"
[class.pointer-events-none]="setting.data.workingTimeStatus=='1'"> [class.pointer-events-none]="setting.data.workingTimeStatus=='1'">
ไม่เเสดงผล {{'NotDisplay' | translate}}
</label> </label>
</div> </div>
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</div> </div>
<div class="block-main-content"> <div class="block-main-content">
<div class="text-lg font-bold py-2 text-primary px-8"> <div class="text-lg font-bold py-2 text-primary px-8">
การตั้งค่า {{'Setting' | translate}}
</div> </div>
<div class="page"> <div class="page">
<div class="border-b border-gray-200 dark:border-white/10 px-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active" <a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
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 = ['การประเมินจัดการประสิทธิภาพ','การตั้งค่า','กำหนดค่าระบบการประเมิน']"> (click)="pathTitle = ['menu.PerformanceManagementSystem','Setting','PmsConfig']">
กำหนดค่าระบบการประเมิน {{'PmsConfig' | translate}}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -6,5 +6,5 @@ import { Component } from '@angular/core'; ...@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./setting-performance-evalution.component.scss'] styleUrls: ['./setting-performance-evalution.component.scss']
}) })
export class SettingPerformanceEvalutionComponent { export class SettingPerformanceEvalutionComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'การตั้งค่า','กำหนดค่าระบบการประเมิน'] pathTitle = ['menu.PerformanceManagementSystem', 'Setting','PmsConfig']
} }
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate" class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " [placeholder]="'SearchByNoOrName' | translate"
[(ngModel)]="search"> [(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>
...@@ -68,20 +68,20 @@ ...@@ -68,20 +68,20 @@
</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)="modalStatus='add';selectEventgrp();selectWorkingtime();openDialog();"> (click)="modalStatus='add';selectEventgrp();selectWorkingtime();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)="modalStatus='deleteGroup';selectWorkingtime();deletepmsWorkingTimes()" > (click)="modalStatus='deleteGroup';selectWorkingtime();deletepmsWorkingTimes()">
<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>
</div> </div>
<!-- <div class="page px-rem"> <!-- <div class="page px-rem">
<div class="overflow-auto table-bordered rounded-top-0.65rem"> <div class="overflow-auto table-bordered rounded-top-0.65rem">
<table class="ti-custom-table ti-custom-table-head ti-custom-table-hover"> <table class="ti-custom-table ti-custom-table-head ti-custom-table-hover">
...@@ -177,210 +177,209 @@ ...@@ -177,210 +177,209 @@
</nav> </nav>
</div> --> </div> -->
<div class="page px-rem"> <div class="page px-rem">
<app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="pmsWorkingTime.dataList" <app-datagrid-syncfution [searchSettings]="searchSettings" [searchText]="search" [dataSource]="syncfutionDataList"
[columns]="columns" [selectedItems]="selectedItems" [columns]="columns" [selectedItems]="selectedItems"
(sendSelectData)="modalStatus='edit';selectWorkingtime($event);openDialog()" (sendSelectedItems)="onSelectItemChange($event)"> (sendSelectData)="modalStatus='edit';selectWorkingtime($event);openDialog()"
(sendSelectedItems)="onSelectItemChange($event)">
</app-datagrid-syncfution> </app-datagrid-syncfution>
</div> </div>
<ng-template #timeAttendanceModal let-modal> <ng-template #timeAttendanceModal let-modal>
<h3 mat-dialog-title> <h3 mat-dialog-title>
{{modalStatus=='add'?'เพิ่มข้อมูลประเภทวัน':'เเก้ไขข้อมูลประเภทวัน'}} {{modalStatus=='add'?'เพิ่มข้อมูลประเภทวัน':'เเก้ไขข้อมูลประเภทวัน'}}
</h3> </h3>
<div class="w-full flex justify-end mb-1rem"> <div class="w-full flex justify-end mb-1rem">
<div class="absolute flex"> <div class="absolute flex">
<div class="px-1"> <div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md" (click)="selectEventgrp();selectWorkingtime()"> <button type="button" class="ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
<i class="ti ti-eraser text-base"></i> (click)="selectEventgrp();selectWorkingtime()">
Clear <i class="ti ti-eraser text-base"></i>
</button> Clear
</div> </button>
</div>
</div>
<mat-dialog-content>
<label class="ti-form-label mt-2rem">รหัส<span class="text-danger">*<ng-container *ngIf="modalStatus=='add'&&checkPrimary()">
รหัสซ้ำ
</ng-container></span></label>
<input type="text" class="ti-form-input w-1/2" [class.!bg-input-readonly]="modalStatus=='edit'"
[readonly]="modalStatus=='edit'" [(ngModel)]="pmsWorkingTime.select.pmsWorkingTimeId">
<label class="ti-form-label mt-2rem">รหัสประเภทวัน<span class="text-danger">*</span></label>
<div *ngFor="let item of pmsWorkingTime.select.emeventgrp;let i = index;let f=first;let l = last"
class="grid grid-cols-2">
<div class="col-span-1">
<div class="flex relative">
<input type="text" class="ti-form-input pointer-events-none" readonly
[ngClass]="{'input-list-f1': f&&!l, 'input-list-c1': !f&&!l, 'input-list-l1': !f&&l, 'input-list-fl1': f&&l}"
[(ngModel)]="item.eventgrpId">
<div
[ngClass]="{'input-list-line-f': f&&!l, 'input-list-line-c': !f&&!l, 'input-list-line-l': !f&&l, 'input-list-line-fl': f&&l}">
<div class="input-list-line"></div>
</div>
<input type="text" class="ti-form-input pointer-events-none" readonly
[ngClass]="{'input-list-f2': f&&!l, 'input-list-c2': !f&&!l, 'input-list-l2': !f&&l, 'input-list-fl2': f&&l}"
[(ngModel)]="item.tdesc">
<div
class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<button *ngIf="item.eventgrpId" type="button" class="flex items-center text-red-500"
(click)="eventgrp.selectIndex=i;selectEventgrp()">
<i class="ti ti-circle-x cursor-pointer"></i>
</button>
</div>
</div> </div>
</div> </div>
<div class="col-span-1 ml-1" *ngIf="f">
<ng-component *ngTemplateOutlet="emeventgrpSearchButton"></ng-component>
</div>
</div> </div>
<div class="grid grid-cols-2" *ngIf="!pmsWorkingTime.select.emeventgrp.length"> <mat-dialog-content>
<div class="col-span-1"> <label class="ti-form-label mt-2rem">รหัส<span class="text-danger">*<ng-container
<div class="flex relative"> *ngIf="modalStatus=='add'&&checkPrimary()">
<input type="text" class="ti-form-input input-list-fl1 pointer-events-none" readonly> รหัสซ้ำ
<div class="input-list-line-fl"> </ng-container></span></label>
<div class="input-list-line"></div> <input type="text" class="ti-form-input w-1/2" [class.!bg-input-readonly]="modalStatus=='edit'"
[readonly]="modalStatus=='edit'" [(ngModel)]="pmsWorkingTime.select.pmsWorkingTimeId">
<label class="ti-form-label mt-2rem">รหัสประเภทวัน<span class="text-danger">*</span></label>
<div *ngFor="let item of pmsWorkingTime.select.emeventgrp;let i = index;let f=first;let l = last"
class="grid grid-cols-2">
<div class="col-span-1">
<div class="flex relative">
<input type="text" class="ti-form-input pointer-events-none" readonly
[ngClass]="{'input-list-f1': f&&!l, 'input-list-c1': !f&&!l, 'input-list-l1': !f&&l, 'input-list-fl1': f&&l}"
[(ngModel)]="item.eventgrpId">
<div
[ngClass]="{'input-list-line-f': f&&!l, 'input-list-line-c': !f&&!l, 'input-list-line-l': !f&&l, 'input-list-line-fl': f&&l}">
<div class="input-list-line"></div>
</div>
<input type="text" class="ti-form-input pointer-events-none" readonly
[ngClass]="{'input-list-f2': f&&!l, 'input-list-c2': !f&&!l, 'input-list-l2': !f&&l, 'input-list-fl2': f&&l}"
[(ngModel)]="item.tdesc">
<div
class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<button *ngIf="item.eventgrpId" type="button" class="flex items-center text-red-500"
(click)="eventgrp.selectIndex=i;selectEventgrp()">
<i class="ti ti-circle-x cursor-pointer"></i>
</button>
</div>
</div> </div>
<input type="text" class="ti-form-input input-list-fl2 pointer-events-none" readonly> </div>
<div class="col-span-1 ml-1" *ngIf="f">
<ng-component *ngTemplateOutlet="emeventgrpSearchButton"></ng-component>
</div> </div>
</div> </div>
<div class="col-span-1 ml-1"> <div class="grid grid-cols-2" *ngIf="!pmsWorkingTime.select.emeventgrp.length">
<ng-component *ngTemplateOutlet="emeventgrpSearchButton"></ng-component> <div class="col-span-1">
</div> <div class="flex relative">
</div> <input type="text" class="ti-form-input input-list-fl1 pointer-events-none" readonly>
<ng-template #emeventgrpSearchButton> <div class="input-list-line-fl">
<button type="button" <div class="input-list-line"></div>
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 !m-0 h-full" </div>
style="height: 44.8px !important;" <input type="text" class="ti-form-input input-list-fl2 pointer-events-none" readonly>
(click)="openEventgrpDialog()" </div>
data-hs-overlay="#time-attendance-eventgrp-table-modal"> </div>
<i class="ri-search-line cursor-pointer text-gray"></i> <div class="col-span-1 ml-1">
</button> <ng-component *ngTemplateOutlet="emeventgrpSearchButton"></ng-component>
</ng-template> </div>
<label class="ti-form-label mt-2rem">ชื่อหัวข้อ (ไทย)<span class="text-danger">*</span></label>
<input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.tdesc">
<label class="ti-form-label mt-2rem">ชื่อหัวข้อ (อังกฤษ)</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.edesc">
<label class="ti-form-label mt-2rem">เป้าหมายผลงาน</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.performanceTargets">
<label class="ti-form-label mt-2rem">หน่วยนับ</label>
<select class="ti-form-select" [(ngModel)]="pmsWorkingTime.select.detailUnit">
<option *ngFor="let item of ['นาที','ชั่วโมง','วัน','ครั้ง']" [value]="item">{{item}}</option>
</select>
<label class="ti-form-label mt-2rem">น้ำหนัก</label>
<input type="text" class="ti-form-input"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.weight">
<label class="ti-form-label mt-2rem">ค่าเป้าหมาย</label>
<div class="grid grid-cols-1 gap-y-2">
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">A (5 คะแนน) ชื่อ</label>
<input type="text" class="ti-form-input col-span-10"
[(ngModel)]="pmsWorkingTime.select.targetADetail">
</div>
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionAMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionAMax">
</div>
</div>
<div class="grid grid-cols-1 gap-y-2 mt-2rem">
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">B (4 คะแนน) ชื่อ</label>
<input type="text" class="ti-form-input col-span-10"
[(ngModel)]="pmsWorkingTime.select.targetBDetail">
</div>
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionBMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionBMax">
</div>
</div>
<div class="grid grid-cols-1 gap-y-2 mt-2rem">
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">C (3 คะแนน) ชื่อ</label>
<input type="text" class="ti-form-input col-span-10"
[(ngModel)]="pmsWorkingTime.select.targetCDetail">
</div> </div>
<div class="col-span-1 grid grid-cols-12 gap-x-2"> <ng-template #emeventgrpSearchButton>
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label> <button type="button"
<input type="text" class="ti-form-input col-span-2" 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 !m-0 h-full"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" style="height: 44.8px !important;" (click)="openEventgrpDialog()"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" data-hs-overlay="#time-attendance-eventgrp-table-modal">
[(ngModel)]="pmsWorkingTime.select.conditionCMin"> <i class="ri-search-line cursor-pointer text-gray"></i>
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label> </button>
<input type="text" class="ti-form-input col-span-2" </ng-template>
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" <label class="ti-form-label mt-2rem">ชื่อหัวข้อ (ไทย)<span class="text-danger">*</span></label>
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" <input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.tdesc">
[(ngModel)]="pmsWorkingTime.select.conditionCMax"> <label class="ti-form-label mt-2rem">ชื่อหัวข้อ (อังกฤษ)</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.edesc">
<label class="ti-form-label mt-2rem">เป้าหมายผลงาน</label>
<input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.performanceTargets">
<label class="ti-form-label mt-2rem">หน่วยนับ</label>
<select class="ti-form-select" [(ngModel)]="pmsWorkingTime.select.detailUnit">
<option *ngFor="let item of ['นาที','ชั่วโมง','วัน','ครั้ง']" [value]="item">{{item}}</option>
</select>
<label class="ti-form-label mt-2rem">น้ำหนัก</label>
<input type="text" class="ti-form-input"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.weight">
<label class="ti-form-label mt-2rem">ค่าเป้าหมาย</label>
<div class="grid grid-cols-1 gap-y-2">
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">A (5 คะแนน) ชื่อ</label>
<input type="text" class="ti-form-input col-span-10" [(ngModel)]="pmsWorkingTime.select.targetADetail">
</div>
<div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionAMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionAMax">
</div>
</div> </div>
</div> <div class="grid grid-cols-1 gap-y-2 mt-2rem">
<div class="grid grid-cols-1 gap-y-2 mt-2rem"> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<div class="col-span-1 grid grid-cols-12 gap-x-2"> <label class="ti-form-label col-span-2 align-center m-0">B (4 คะแนน) ชื่อ</label>
<label class="ti-form-label col-span-2 align-center m-0">D (2 คะแนน) ชื่อ</label> <input type="text" class="ti-form-input col-span-10" [(ngModel)]="pmsWorkingTime.select.targetBDetail">
<input type="text" class="ti-form-input col-span-10" </div>
[(ngModel)]="pmsWorkingTime.select.targetDDetail"> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionBMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionBMax">
</div>
</div> </div>
<div class="col-span-1 grid grid-cols-12 gap-x-2"> <div class="grid grid-cols-1 gap-y-2 mt-2rem">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<input type="text" class="ti-form-input col-span-2" <label class="ti-form-label col-span-2 align-center m-0">C (3 คะแนน) ชื่อ</label>
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" <input type="text" class="ti-form-input col-span-10" [(ngModel)]="pmsWorkingTime.select.targetCDetail">
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" </div>
[(ngModel)]="pmsWorkingTime.select.conditionDMin"> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label> <label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2" <input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionDMax"> [(ngModel)]="pmsWorkingTime.select.conditionCMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionCMax">
</div>
</div> </div>
</div> <div class="grid grid-cols-1 gap-y-2 mt-2rem">
<div class="grid grid-cols-1 gap-y-2 mt-2rem"> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<div class="col-span-1 grid grid-cols-12 gap-x-2"> <label class="ti-form-label col-span-2 align-center m-0">D (2 คะแนน) ชื่อ</label>
<label class="ti-form-label col-span-2 align-center m-0">E (1 คะแนน) ชื่อ</label> <input type="text" class="ti-form-input col-span-10" [(ngModel)]="pmsWorkingTime.select.targetDDetail">
<input type="text" class="ti-form-input col-span-10" </div>
[(ngModel)]="pmsWorkingTime.select.targetEDetail"> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionDMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionDMax">
</div>
</div> </div>
<div class="col-span-1 grid grid-cols-12 gap-x-2"> <div class="grid grid-cols-1 gap-y-2 mt-2rem">
<label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<input type="text" class="ti-form-input col-span-2" <label class="ti-form-label col-span-2 align-center m-0">E (1 คะแนน) ชื่อ</label>
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" <input type="text" class="ti-form-input col-span-10" [(ngModel)]="pmsWorkingTime.select.targetEDetail">
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" </div>
[(ngModel)]="pmsWorkingTime.select.conditionEMin"> <div class="col-span-1 grid grid-cols-12 gap-x-2">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label> <label class="ti-form-label col-span-2 align-center m-0">เงื่อนไข ช่วงระหว่าง</label>
<input type="text" class="ti-form-input col-span-2" <input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');" oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)" onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionEMax"> [(ngModel)]="pmsWorkingTime.select.conditionEMin">
<label class="ti-form-label col-span-1 align-center text-center m-0">ถึง</label>
<input type="text" class="ti-form-input col-span-2"
oninput="this.value = this.value.replace(/[^\d.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/(\..*?)(\d{2})./g, '$1$2');"
onchange="this.value = this.value.replace('', '0');this.value = parseFloat(this.value).toFixed(2)"
[(ngModel)]="pmsWorkingTime.select.conditionEMax">
</div>
</div> </div>
</div> </mat-dialog-content>
</mat-dialog-content> <mat-dialog-actions align="end">
<mat-dialog-actions align="end"> <button type="button" mat-button [mat-dialog-close]
<button type="button" mat-button [mat-dialog-close] 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">
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"> ย้อนกลับ
ย้อนกลับ </button>
</button> <button type="button" class="ti-btn ti-btn-success" mat-button
<button type="button" class="ti-btn ti-btn-success" mat-button [class.ti-btn-disabled]="!pmsWorkingTime.select.pmsWorkingTimeId||!pmsWorkingTime.select.tdesc||(modalStatus=='add'&&checkPrimary())" (click)="addpmsWorkingTimes()" [class.ti-btn-disabled]="!pmsWorkingTime.select.pmsWorkingTimeId||!pmsWorkingTime.select.tdesc||(modalStatus=='add'&&checkPrimary())"
[disabled]="!pmsWorkingTime.select.pmsWorkingTimeId||!pmsWorkingTime.select.tdesc||(modalStatus=='add'&&checkPrimary())"> (click)="addpmsWorkingTimes()"
บันทึกข้อมูล [disabled]="!pmsWorkingTime.select.pmsWorkingTimeId||!pmsWorkingTime.select.tdesc||(modalStatus=='add'&&checkPrimary())">
</button> บันทึกข้อมูล
</mat-dialog-actions> </button>
</mat-dialog-actions>
</ng-template> </ng-template>
<ng-template #evenTgrpModal let-modal> <ng-template #evenTgrpModal let-modal>
<h3 mat-dialog-title> <h3 mat-dialog-title>
รายการทะเบียนประเภทวัน รายการทะเบียนประเภทวัน
</h3> </h3>
<mat-dialog-content> <mat-dialog-content>
<div class="flex justify-end pb-1rem"> <div class="flex justify-end pb-1rem">
...@@ -388,7 +387,8 @@ ...@@ -388,7 +387,8 @@
<div class="relative shadow-md"> <div class="relative shadow-md">
<input type="text" id="hs-leading-icon" name="hs-leading-icon" <input type="text" id="hs-leading-icon" name="hs-leading-icon"
class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 " class="ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
[placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="eventgrpmodal.search" (ngModelChange)="oneventgrpModalSearchChange()"> [placeholder]="'SearchByNoOrName' | translate" [(ngModel)]="eventgrpmodal.search"
(ngModelChange)="oneventgrpModalSearchChange()">
<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>
...@@ -420,15 +420,15 @@ ...@@ -420,15 +420,15 @@
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="eventgrpListFilter().length"> <tbody *ngIf="eventgrpListFilter().length">
<tr *ngFor="let item of eventgrpListFilter() | slice:((eventgrpmodal.currentPage-1) * eventgrpmodal.pageSize) : (((eventgrpmodal.currentPage-1) * eventgrpmodal.pageSize) + eventgrpmodal.pageSize);let i = index" <tr *ngFor="let item of eventgrpListFilter() | slice:((eventgrpmodal.currentPage-1) * eventgrpmodal.pageSize) : (((eventgrpmodal.currentPage-1) * eventgrpmodal.pageSize) + eventgrpmodal.pageSize);let i = index"
class="cursor-pointer" (click)="selectEventgrp(item.data);closeEventgrpDialog()" > class="cursor-pointer" (click)="selectEventgrp(item.data);closeEventgrpDialog()">
<!-- <td class="flex justify-center"> <!-- <td class="flex justify-center">
{{((eventgrpmodal.currentPage-1) * eventgrpmodal.pageSize)+(i+1)}} {{((eventgrpmodal.currentPage-1) * eventgrpmodal.pageSize)+(i+1)}}
</td> --> </td> -->
<td>{{item.data.eventgrpId}}</td> <td>{{item.data.eventgrpId}}</td>
<td>{{item.data.tdesc}}</td> <td>{{item.data.tdesc}}</td>
<td>{{item.data.edesc}}</td> <td>{{item.data.edesc}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
......
...@@ -9,280 +9,299 @@ import { PmsWorkingTimeService } from 'src/app/shared/services/pms-working-time. ...@@ -9,280 +9,299 @@ import { PmsWorkingTimeService } from 'src/app/shared/services/pms-working-time.
import { ColumnModel } from '@syncfusion/ej2-grids'; import { ColumnModel } from '@syncfusion/ej2-grids';
import Swal from 'sweetalert2'; import Swal from 'sweetalert2';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
interface table { interface table {
currentPage: number, currentPage: number,
page: number[], page: number[],
search: string, search: string,
pageSize: number pageSize: number
} }
@Component({ @Component({
selector: 'app-time-attendance-manage', selector: 'app-time-attendance-manage',
templateUrl: './time-attendance-manage.component.html', templateUrl: './time-attendance-manage.component.html',
styleUrls: ['./time-attendance-manage.component.scss'] styleUrls: ['./time-attendance-manage.component.scss']
}) })
export class TimeAttendanceManageComponent { export class TimeAttendanceManageComponent {
numDataListChecked = 0 numDataListChecked = 0
isDataListChecked = false isDataListChecked = false
isDataListCheckedAll = false isDataListCheckedAll = false
currentPage = 1; currentPage = 1;
page = Array.from({ length: 1 }, (_, i) => i + 1); page = Array.from({ length: 1 }, (_, i) => i + 1);
search = ''; search = '';
modalStatus: "add" | "edit" | "delete" | "deleteGroup" = "add" modalStatus: "add" | "edit" | "delete" | "deleteGroup" = "add"
modal: table = { modal: table = {
currentPage: 1, currentPage: 1,
page: Array.from({ length: 1 }, (_, i) => i + 1), page: Array.from({ length: 1 }, (_, i) => i + 1),
search: "", search: "",
pageSize : 10 pageSize: 10
}
eventgrpmodal: table = {
currentPage: 1,
page: Array.from({ length: 1 }, (_, i) => i + 1),
search: "",
pageSize: 10
}
eventgrp: { loading: boolean, selectIndex: number, selectList: EventgrpModel[], dataList: { check: boolean, data: EventgrpModel }[] } = { loading: false, selectIndex: -1, selectList: [new MyEventgrpModel()], dataList: [] }
pmsWorkingTime: { loading: boolean, select: PmsWorkingTimeModel, dataList: PmsWorkingTimeModel[] } = { loading: false, select: new MyPmsWorkingTimeModel(), dataList: [] }
columns: ColumnModel[] = [{
field: "pmsWorkingTimeId",
headerText: "Code",
type: "string",
isPrimaryKey: true,
},
{
field: "name",
headerText: "TopicName",
type: "string"
},
{
field: "detailUnit",
headerText: "Unit",
type: "string"
},
{
field: "weight",
headerText: "Weight",
type: "string"
}]
searchSettings = {
fields: ['pmsWorkingTimeId', 'name', 'detailUnit', 'weight'],
operator: 'contains',
ignoreCase: false
};
syncfutionDataList: any[] = []
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
@ViewChild("timeAttendanceModal") timeAttendanceModal: any;
@ViewChild("evenTgrpModal") evenTgrpModal: any;
dialogRef: any
dialogRefEventgrp: any
constructor(
private toastr: ToastrService,
private cdr: ChangeDetectorRef,
private dialog: MatDialog,
private fileService: FileService,
private eventgrpService: EventgrpService,
private pmsWorkingTimeService: PmsWorkingTimeService,
private translateService: TranslateService
) {
this.translateService.onLangChange.subscribe((event) => {
this.setSyncfutionDataList()
});
}
setSyncfutionDataList() {
if (this.pmsWorkingTime.dataList) {
this.syncfutionDataList = this.pmsWorkingTime.dataList.map(e => ({
pmsWorkingTimeId: e.pmsWorkingTimeId,
name: this.translateService.getCurrentLang() == 'th' ? e.tdesc : e.edesc,
detailUnit: e.detailUnit,
weight: e.weight
}))
} }
eventgrpmodal: table = { }
currentPage: 1,
page: Array.from({ length: 1 }, (_, i) => i + 1), ngOnInit(): void {
search: "", this.getEventgrpList()
pageSize: 10 this.getPmsWorkingTimeList()
} }
eventgrp: { loading: boolean, selectIndex: number, selectList: EventgrpModel[], dataList: { check: boolean, data: EventgrpModel }[] } = { loading: false, selectIndex: -1, selectList: [new MyEventgrpModel()], dataList: [] } getPmsWorkingTimeList() {
pmsWorkingTime: { loading: boolean, select: PmsWorkingTimeModel, dataList: PmsWorkingTimeModel [] } = { loading: false, select: new MyPmsWorkingTimeModel(), dataList: [] } this.pmsWorkingTime.loading = true
columns: ColumnModel[] = [{ this.selectedItems.data.clear()
field: "pmsWorkingTimeId", this.pmsWorkingTimeService.getList().subscribe({
headerText: "รหัส", next: response => {
type: "string", this.pmsWorkingTime.dataList = response.map(x => {
isPrimaryKey: true, this.selectedItems.data.set(x.pmsWorkingTimeId, false)
}, return new MyPmsWorkingTimeModel(x)
{ })
field: "tdesc", this.selectedItems.key = 'pmsWorkingTimeId'
headerText: "ชื่อหัวข้อ", this.selectedItems.count = 0
type: "string" this.pmsWorkingTime.loading = false
},
{
field: "detailUnit",
headerText: "หน่วยนับ",
type: "string"
},
{
field: "weight",
headerText: "น้ำหนัก",
type: "string"
}]
searchSettings = {
fields: ['pmsWorkingTimeId', 'tdesc', 'detailUnit', 'weight'],
operator: 'contains',
ignoreCase: false
};
selectedItems: { key: string, count: number, data: Map<string, boolean> } = { key: '', count: 0, data: new Map<string, boolean>() };
@ViewChild("timeAttendanceModal") timeAttendanceModal: any;
@ViewChild("evenTgrpModal") evenTgrpModal: any;
dialogRef: any
dialogRefEventgrp: any
constructor(
private toastr: ToastrService,
private cdr: ChangeDetectorRef,
private dialog: MatDialog,
private fileService: FileService,
private eventgrpService: EventgrpService,
private pmsWorkingTimeService: PmsWorkingTimeService,
) { }
ngOnInit(): void { this.searchChange()
this.getEventgrpList() this.setSyncfutionDataList()
this.getPmsWorkingTimeList() this.cdr.detectChanges();
}, error: error => {
this.pmsWorkingTime.loading = false
this.cdr.detectChanges()
}
})
}
pmsWorkingTimeFilter() {
return this.pmsWorkingTime.dataList.filter((x) => {
const data = x
const match = data.pmsWorkingTimeId.toLowerCase().includes(this.search.toLowerCase()) ||
data.tdesc.toLowerCase().includes(this.search.toLowerCase()) ||
data.detailUnit.toLowerCase().includes(this.search.toLowerCase()) ||
(data.weight + "").toLowerCase().includes(this.search.toLowerCase())
return match;
});
}
searchChange() {
this.currentPage = 1;
const filteredData = this.pmsWorkingTimeFilter();
this.page = Array.from({ length: Math.ceil(filteredData.length / 10) }, (_, i) => i + 1);
}
selectWorkingtime(dataSelect?: any) {
const data = this.pmsWorkingTime.dataList.find(e => e.pmsWorkingTimeId == dataSelect.pmsWorkingTimeId)
if (data) {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel(data)
} else if (this.modalStatus == 'add') {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel()
} else if (this.modalStatus == 'edit') {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel({ pmsWorkingTimeId: this.pmsWorkingTime.select.pmsWorkingTimeId })
} }
getPmsWorkingTimeList() { }
addpmsWorkingTimes() {
Swal.fire({
icon: 'question',
title: 'แจ้งเตือน',
text: 'ยืนยันการบันทึกข้อมูลหรือไม่',
showCancelButton: true,
confirmButtonText: 'บันทึกข้อมูล',
cancelButtonText: 'ย้อนกลับ',
reverseButtons: true,
}).then((result) => {
if (result.isConfirmed) {
this.pmsWorkingTime.loading = true this.pmsWorkingTime.loading = true
this.selectedItems.data.clear() this.pmsWorkingTimeService.post(this.pmsWorkingTime.select).subscribe({
this.pmsWorkingTimeService.getList().subscribe({ next: response => {
next: response => { if (response.success) {
this.pmsWorkingTime.dataList = response.map(x => { this.showAlert(response.message, 'success')
this.selectedItems.data.set(x.pmsWorkingTimeId, false) this.getPmsWorkingTimeList()
return new MyPmsWorkingTimeModel(x) this.closeDialog()
}) } else {
this.selectedItems.key = 'pmsWorkingTimeId' this.showAlert(response.message, 'error')
this.selectedItems.count = 0 this.pmsWorkingTime.loading = false
this.pmsWorkingTime.loading = false
this.searchChange()
this.cdr.detectChanges();
}, error: error => {
this.pmsWorkingTime.loading = false
this.cdr.detectChanges()
} }
}) }, error: error => {
} this.showAlert(error.message, 'error')
pmsWorkingTimeFilter() { this.pmsWorkingTime.loading = false
return this.pmsWorkingTime.dataList.filter((x) => {
const data = x
const match = data.pmsWorkingTimeId.toLowerCase().includes(this.search.toLowerCase()) ||
data.tdesc.toLowerCase().includes(this.search.toLowerCase()) ||
data.detailUnit.toLowerCase().includes(this.search.toLowerCase()) ||
(data.weight + "").toLowerCase().includes(this.search.toLowerCase())
return match;
});
}
searchChange() {
this.currentPage = 1;
const filteredData = this.pmsWorkingTimeFilter();
this.page = Array.from({ length: Math.ceil(filteredData.length / 10) }, (_, i) => i + 1);
}
selectWorkingtime(pmsWorkingTime?: PmsWorkingTimeModel) {
if (pmsWorkingTime) {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel(pmsWorkingTime)
} else if (this.modalStatus == 'add') {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel()
} else if (this.modalStatus == 'edit') {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel({ pmsWorkingTimeId: this.pmsWorkingTime.select.pmsWorkingTimeId })
} }
})
}
})
}
deletepmsWorkingTimes() {
if (!this.numSelectItem()) {
this.showAlert('กรุณาเลือกข้อมูลที่ต้องการลบ', 'error')
return
} }
addpmsWorkingTimes() { Swal.fire({
Swal.fire({ icon: 'question',
icon: 'question', title: 'แจ้งเตือน',
title: 'แจ้งเตือน', text: 'ยืนยันการลบข้อมูลหรือไม่',
text: 'ยืนยันการบันทึกข้อมูลหรือไม่', showCancelButton: true,
showCancelButton: true, confirmButtonText: 'ลบข้อมูล',
confirmButtonText: 'บันทึกข้อมูล', cancelButtonText: 'ย้อนกลับ',
cancelButtonText: 'ย้อนกลับ', reverseButtons: true,
reverseButtons: true, }).then((result) => {
}).then((result) => { if (result.isConfirmed) {
if (result.isConfirmed) { this.pmsWorkingTime.loading = true
this.pmsWorkingTime.loading = true const selectedKeys = Array.from(this.selectedItems.data.keys());
this.pmsWorkingTimeService.post(this.pmsWorkingTime.select).subscribe({ const body = this.pmsWorkingTime.dataList.filter(x => selectedKeys.includes(x.pmsWorkingTimeId) && this.selectedItems.data.get(x.pmsWorkingTimeId)).map(x => new MyPmsWorkingTimeModel(x))
next: response => { this.pmsWorkingTimeService.delete(body).subscribe({
if (response.success) { next: response => {
this.showAlert(response.message, 'success') if (response.success) {
this.getPmsWorkingTimeList() this.showAlert(response.message, 'success')
this.closeDialog() this.getPmsWorkingTimeList()
} else { this.closeDialog()
this.showAlert(response.message, 'error') } else {
this.pmsWorkingTime.loading = false this.showAlert(response.message, 'error')
} this.pmsWorkingTime.loading = false
}, error: error => {
this.showAlert(error.message, 'error')
this.pmsWorkingTime.loading = false
}
})
} }
}) }, error: error => {
} this.showAlert(error.message, 'error')
deletepmsWorkingTimes() { this.pmsWorkingTime.loading = false
if (!this.numSelectItem()) {
this.showAlert('กรุณาเลือกข้อมูลที่ต้องการลบ', 'error')
return
} }
Swal.fire({
icon: 'question',
title: 'แจ้งเตือน',
text: 'ยืนยันการลบข้อมูลหรือไม่',
showCancelButton: true,
confirmButtonText: 'ลบข้อมูล',
cancelButtonText: 'ย้อนกลับ',
reverseButtons: true,
}).then((result) => {
if (result.isConfirmed) {
this.pmsWorkingTime.loading = true
const selectedKeys = Array.from(this.selectedItems.data.keys());
const body = this.pmsWorkingTime.dataList.filter(x => selectedKeys.includes(x.pmsWorkingTimeId) && this.selectedItems.data.get(x.pmsWorkingTimeId)).map(x => new MyPmsWorkingTimeModel(x))
this.pmsWorkingTimeService.delete(body).subscribe({
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
this.getPmsWorkingTimeList()
this.closeDialog()
} else {
this.showAlert(response.message, 'error')
this.pmsWorkingTime.loading = false
}
}, error: error => {
this.showAlert(error.message, 'error')
this.pmsWorkingTime.loading = false
}
})
}
});
}
getEventgrpList() {
this.eventgrp.loading = true
this.eventgrpService.getList().subscribe({
next: response => {
this.eventgrp.dataList = response.map(x => ({ check: false, data: new MyEventgrpModel(x) }))
this.eventgrp.loading = false
this.isDataListCheckedAll = false
this.searchChange()
this.cdr.detectChanges();
}, error: error => {
this.eventgrp.loading = false
this.cdr.detectChanges()
}
})
}
eventgrpListFilter() {
return this.eventgrp.dataList.filter(x => {
const data = x.data
const match = data.eventgrpId.toLowerCase().includes(this.eventgrpmodal.search.toLowerCase()) || data.tdesc.toLowerCase().includes(this.eventgrpmodal.search.toLowerCase()) || data.edesc.toLowerCase().includes(this.eventgrpmodal.search.toLowerCase());
return match;
}) })
}
});
}
getEventgrpList() {
this.eventgrp.loading = true
this.eventgrpService.getList().subscribe({
next: response => {
this.eventgrp.dataList = response.map(x => ({ check: false, data: new MyEventgrpModel(x) }))
this.eventgrp.loading = false
this.isDataListCheckedAll = false
this.searchChange()
this.cdr.detectChanges();
}, error: error => {
this.eventgrp.loading = false
this.cdr.detectChanges()
}
})
}
eventgrpListFilter() {
return this.eventgrp.dataList.filter(x => {
const data = x.data
const match = data.eventgrpId.toLowerCase().includes(this.eventgrpmodal.search.toLowerCase()) || data.tdesc.toLowerCase().includes(this.eventgrpmodal.search.toLowerCase()) || data.edesc.toLowerCase().includes(this.eventgrpmodal.search.toLowerCase());
return match;
})
}
selectEventgrp(data?: EventgrpModel) {
if (!data) {
this.pmsWorkingTime.select.emeventgrp.splice(this.eventgrp.selectIndex, 1);
return;
} }
selectEventgrp(data?: EventgrpModel) { this.pmsWorkingTime.select.emeventgrp.push(new MyEmeventgrpModel(data))
if (!data) { }
this.pmsWorkingTime.select.emeventgrp.splice(this.eventgrp.selectIndex, 1);
return;
}
this.pmsWorkingTime.select.emeventgrp.push(new MyEmeventgrpModel(data))
}
clearData(modalStatus: string) { clearData(modalStatus: string) {
if (modalStatus == 'add') { if (modalStatus == 'add') {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel() this.pmsWorkingTime.select = new MyPmsWorkingTimeModel()
} else if (modalStatus == 'edit') { } else if (modalStatus == 'edit') {
this.pmsWorkingTime.select = new MyPmsWorkingTimeModel({ pmsWorkingTimeId: this.pmsWorkingTime.select.pmsWorkingTimeId }) this.pmsWorkingTime.select = new MyPmsWorkingTimeModel({ pmsWorkingTimeId: this.pmsWorkingTime.select.pmsWorkingTimeId })
}
this.eventgrp.selectList = [new MyEventgrpModel()]
} }
this.eventgrp.selectList = [new MyEventgrpModel()]
}
modalSearchChange(dataList: any) { modalSearchChange(dataList: any) {
this.modal.currentPage = 1 this.modal.currentPage = 1
this.modal.page = Array.from({ length: Math.ceil(dataList.length / 10) }, (_, i) => i + 1); this.modal.page = Array.from({ length: Math.ceil(dataList.length / 10) }, (_, i) => i + 1);
} }
oneventgrpModalSearchChange() { oneventgrpModalSearchChange() {
this.eventgrpmodal.currentPage = 1 this.eventgrpmodal.currentPage = 1
this.eventgrpmodal.page = Array.from({ length: Math.ceil(this.eventgrpListFilter().length / 10) }, (_, i) => i + 1); this.eventgrpmodal.page = Array.from({ length: Math.ceil(this.eventgrpListFilter().length / 10) }, (_, i) => i + 1);
} }
showAlert(text: string, type: 'success' | 'error') {
this.toastr[type](text, 'แจ้งเตือน', {
timeOut: 3000,
positionClass: 'toast-top-right',
})
}
checkPrimary() { showAlert(text: string, type: 'success' | 'error') {
return this.pmsWorkingTime.dataList.find(x => x.pmsWorkingTimeId == this.pmsWorkingTime.select.pmsWorkingTimeId) this.toastr[type](text, 'แจ้งเตือน', {
} timeOut: 3000,
positionClass: 'toast-top-right',
})
}
openDialog() { checkPrimary() {
this.dialogRef = this.dialog.open(this.timeAttendanceModal, { return this.pmsWorkingTime.dataList.find(x => x.pmsWorkingTimeId == this.pmsWorkingTime.select.pmsWorkingTimeId)
width: '500px', }
disableClose: false,
}); openDialog() {
} this.dialogRef = this.dialog.open(this.timeAttendanceModal, {
openEventgrpDialog() { width: '500px',
this.dialogRefEventgrp = this.dialog.open(this.evenTgrpModal, { disableClose: false,
width: '800px', });
}) }
} openEventgrpDialog() {
onSelectItemChange(arg: any) { this.dialogRefEventgrp = this.dialog.open(this.evenTgrpModal, {
this.selectedItems = arg width: '800px',
} })
}
numSelectItem() { onSelectItemChange(arg: any) {
const selectedKeys = Array.from(this.selectedItems.data.keys()); this.selectedItems = arg
const num = this.pmsWorkingTime.dataList.filter(x => selectedKeys.includes(x.pmsWorkingTimeId) && this.selectedItems.data.get(x.pmsWorkingTimeId)).length }
return num
} numSelectItem() {
closeDialog() { const selectedKeys = Array.from(this.selectedItems.data.keys());
this.dialogRef.close() const num = this.pmsWorkingTime.dataList.filter(x => selectedKeys.includes(x.pmsWorkingTimeId) && this.selectedItems.data.get(x.pmsWorkingTimeId)).length
} return num
closeEventgrpDialog() { }
this.dialogRefEventgrp.close() closeDialog() {
} this.dialogRef.close()
}
closeEventgrpDialog() {
this.dialogRefEventgrp.close()
}
} }
<div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md"> <div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out rounded-md">
<div class="ti-modal-header bg-primary text-center"> <div class="ti-modal-header bg-primary text-center">
<h5 class="text-xxl font-bold text-white"> <h5 class="text-xxl font-bold text-white">
นำเข้าข้อมูลสถิติเวลาทำงาน {{'ImportWorkingTimeData' | translate}}
</h5> </h5>
</div> </div>
<div class="ti-modal-body max-h-full overflow-hidden ti-modal-content !rounded-t-none !rounded-b-sm"> <div class="ti-modal-body max-h-full overflow-hidden ti-modal-content !rounded-t-none !rounded-b-sm">
<h1 class="mt-2rem text-xl" style="text-align: center;">ไฟล์</h1> <h1 class="mt-2rem text-xl" style="text-align: center;">{{'File' | translate}}</h1>
<div class="mt-2rem p-2"> <div class="mt-2rem p-2">
<div class="flex rounded-md"> <div class="flex rounded-md">
<input #fileInput id="fileInput" type="file" (change)="onFileSelected($event)" hidden> <input #fileInput id="fileInput" type="file" (change)="onFileSelected($event)" hidden>
<input type="text" [value]="selectedFileName" readonly (click)="fileInput.click()" <input type="text" [value]="selectedFileName | translate" readonly (click)="fileInput.click()"
class="ti-form-input rounded-none ltr:rounded-l-md rtl:rounded-r-md focus:z-10 cursor-pointer"> class="ti-form-input rounded-none ltr:rounded-l-md rtl:rounded-r-md focus:z-10 cursor-pointer">
<button type="button" (click)="fileInput.click()" <button type="button" (click)="fileInput.click()"
class="inline-flex flex-shrink-0 justify-center items-center h-[2.875rem] w-[2.875rem] ltr:rounded-r-md rtl:rounded-l-md border border-transparent font-semibold bg-secondary text-white hover:bg-secondary focus:z-10 focus:outline-none focus:ring-0 focus:ring-secondary transition-all text-sm"> class="inline-flex flex-shrink-0 justify-center items-center h-[2.875rem] w-[2.875rem] ltr:rounded-r-md rtl:rounded-l-md border border-transparent font-semibold bg-secondary text-white hover:bg-secondary focus:z-10 focus:outline-none focus:ring-0 focus:ring-secondary transition-all text-sm">
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<h1 class="cursor-pointer justify-center -mb-px inline-flex items-center gap-2 <h1 class="cursor-pointer justify-center -mb-px inline-flex items-center gap-2
text-center text-secondary border-secondary border-b-2 align-items-end text-xl" text-center text-secondary border-secondary border-b-2 align-items-end text-xl"
(click)="downloadFile()"> (click)="downloadFile()">
ดาวน์โหลดตัวอย่างไฟล์</h1> {{'DownloadSampleFile' | translate}}</h1>
</div> </div>
<div class="flex justify-center mt-2rem mb-1rem space-x-4"> <div class="flex justify-center mt-2rem mb-1rem space-x-4">
<button type="submit" class="ti-btn ti-btn-secondary" <button type="submit" class="ti-btn ti-btn-secondary"
data-hs-overlay="#company-registration-page-upload-modal" [class.ti-btn-disabled]="!selectedFile" data-hs-overlay="#company-registration-page-upload-modal" [class.ti-btn-disabled]="!selectedFile"
(click)="uploadFile()" [disabled]="!selectedFile" [disabled]="!selectedFile"> (click)="uploadFile()" [disabled]="!selectedFile" [disabled]="!selectedFile">
อัปโหลด {{'Upload' | translate}}
</button> </button>
</div> </div>
</div> </div>
......
...@@ -13,7 +13,7 @@ interface table { ...@@ -13,7 +13,7 @@ interface table {
}) })
export class TimeAttendanceStatisticsComponent { export class TimeAttendanceStatisticsComponent {
selectedFile: File | null = null; selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์'; selectedFileName: string = 'PleaseSelectFile';
constructor(private toastr: ToastrService, constructor(private toastr: ToastrService,
private cdr: ChangeDetectorRef, private cdr: ChangeDetectorRef,
private fileService: FileService) { } private fileService: FileService) { }
...@@ -21,7 +21,7 @@ export class TimeAttendanceStatisticsComponent { ...@@ -21,7 +21,7 @@ export class TimeAttendanceStatisticsComponent {
onFileSelected(event: any) { onFileSelected(event: any) {
this.selectedFile = event.target.files.length > 0 ? event.target.files[0] : null; this.selectedFile = event.target.files.length > 0 ? event.target.files[0] : null;
this.selectedFileName = this.selectedFile?.name || "กรุณาเลือกไฟล์" this.selectedFileName = this.selectedFile?.name || "PleaseSelectFile"
} }
uploadFile() { uploadFile() {
if (!this.selectedFile) { if (!this.selectedFile) {
......
...@@ -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">
ทะเบียนการประเมินเวลาทำงาน {{'TimeAttendance_head' | 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-8"> <div class="border-b border-gray-200 dark:border-white/10 px-8">
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active" <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 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 hover:text-secondary active"
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 = ['menu.PerformanceManagementSystem','TimeAttendance_head','TimeAttendanceManage'];currentPath=1">
การจัดการหัวข้อการประเมินเวลาทำงาน {{'TimeAttendanceManage' | 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"
aria-controls="underline-2" aria-controls="underline-2"
(click)="pathTitle = ['การประเมินจัดการประสิทธิภาพ','ทะเบียนการประเมินเวลาทำงาน' ,'การจัดการข้อมูลสถิติเวลาทำงาน'];currentPath=2"> (click)="pathTitle = ['menu.PerformanceManagementSystem','TimeAttendance_head' ,'WorkingTimeDataManage'];currentPath=2">
การจัดการข้อมูลสถิติเวลาทำงาน {{'WorkingTimeDataManage' | translate }}
</a> </a>
</nav> </nav>
</div> </div>
......
...@@ -10,6 +10,6 @@ interface table { ...@@ -10,6 +10,6 @@ interface table {
styleUrls: ['./time-attendance.component.scss'] styleUrls: ['./time-attendance.component.scss']
}) })
export class TimeAttendanceComponent { export class TimeAttendanceComponent {
pathTitle = ['การประเมินจัดการประสิทธิภาพ', 'ทะเบียนการประเมินเวลาทำงาน', 'การจัดการหัวข้อการประเมินเวลาทำงาน'] pathTitle = ['menu.PerformanceManagementSystem', 'TimeAttendance_head', 'TimeAttendanceManage']
currentPath = 1 currentPath = 1
} }
...@@ -213,7 +213,7 @@ export class SidebarComponent { ...@@ -213,7 +213,7 @@ export class SidebarComponent {
})) }))
if (submenuExcel.length) { if (submenuExcel.length) {
this.menuItems.push({ this.menuItems.push({
title: 'รายงาน Excel', title: 'ExcelReport',
type: 'sub', type: 'sub',
selected: false, selected: false,
active: false, active: false,
......
...@@ -208,7 +208,7 @@ export class NavService implements OnDestroy { ...@@ -208,7 +208,7 @@ export class NavService implements OnDestroy {
}, },
{ {
title: 'ประเมินสมรรถนะ', title: 'menu.CompetencySystem',
type: 'sub', type: 'sub',
selected: false, selected: false,
active: false, active: false,
...@@ -217,19 +217,19 @@ export class NavService implements OnDestroy { ...@@ -217,19 +217,19 @@ export class NavService implements OnDestroy {
show: true, show: true,
icon: 'assets/img/icons-menu/performance-assessment.png', icon: 'assets/img/icons-menu/performance-assessment.png',
children: [ children: [
{ id: 'm41', path: 'admin/setting-competency', title: 'การตั้งค่า', type: 'link', show: true }, { id: 'm41', path: 'admin/setting-competency', title: 'menu.Setting', type: 'link', show: true },
{ id: 'm42', path: 'admin/name-registration', title: 'ทะเบียนกำหนดชื่อ', type: 'link', show: true }, { id: 'm42', path: 'admin/name-registration', title: 'menu.DataBankCompetency', type: 'link', show: true },
{ id: 'm43', path: 'admin/grade-registration', title: 'ทะเบียนเกรด', type: 'link', show: true }, { id: 'm43', path: 'admin/grade-registration', title: 'menu.Grade', type: 'link', show: true },
{ id: 'm44', path: 'admin/tool-register', title: 'ทะเบียนเครื่องมือ', type: 'link', show: true }, { id: 'm44', path: 'admin/tool-register', title: 'menu.AssessmentTools', type: 'link', show: true },
{ id: 'm45', path: 'admin/course-registration', title: 'ทะเบียนหลักสูตร', type: 'link', show: true }, { id: 'm45', path: 'admin/course-registration', title: 'menu.CDR', type: 'link', show: true },
{ id: 'm46', path: 'admin/idp-development-plan', title: 'แผนพัฒนา IDP', type: 'link', show: true }, { id: 'm46', path: 'admin/idp-development-plan', title: 'menu.IDP', type: 'link', show: true },
{ id: 'm465', path: 'admin/competency-evaluation-factors', title: 'ปัจจัยการประเมินสมรรถนะ', type: 'link', show: true }, { id: 'm465', path: 'admin/competency-evaluation-factors', title: 'menu.CompetencyFactors', type: 'link', show: true },
{ id: 'm47', path: 'admin/competency-management', title: 'การจัดการสมรรถนะ', type: 'link', show: true }, { id: 'm47', path: 'admin/competency-management', title: 'menu.CompetencyManage', type: 'link', show: true },
{ id: 'm48', path: 'admin/evaluation-cycle-manager', title: 'การจัดการรอบการประเมิน', type: 'link', show: true }, { id: 'm48', path: 'admin/evaluation-cycle-manager', title: 'menu.AssessmentPeriod', type: 'link', show: true },
], ],
}, },
{ {
title: 'ประเมินจัดการประสิทธิภาพ', title: 'menu.PerformanceManagementSystem',
type: 'sub', type: 'sub',
selected: false, selected: false,
active: false, active: false,
...@@ -238,17 +238,17 @@ export class NavService implements OnDestroy { ...@@ -238,17 +238,17 @@ export class NavService implements OnDestroy {
show: true, show: true,
icon: 'assets/img/icons-menu/performance-management-assessment.png', icon: 'assets/img/icons-menu/performance-management-assessment.png',
children: [ children: [
{ id: 'm51', path: 'admin/setting-performance-evalution', title: 'การตั้งค่า', type: 'link', show: true }, { id: 'm51', path: 'admin/setting-performance-evalution', title: 'menu.Setting', type: 'link', show: true },
{ id: 'm52', path: 'admin/name-registration-perfomance', title: 'ทะเบียนกำหนดชื่อ', type: 'link', show: true }, { id: 'm52', path: 'admin/name-registration-perfomance', title: 'menu.DataBankPms', type: 'link', show: true },
{ id: 'm53', path: 'admin/grade-registration-sub', title: 'ทะเบียนเกรด', type: 'link', show: true }, { id: 'm53', path: 'admin/grade-registration-sub', title: 'menu.Grade', type: 'link', show: true },
{ id: 'm54', path: 'admin/time-attendance', title: 'ทะเบียนการประเมินเวลาทำงาน', type: 'link', show: true }, { id: 'm54', path: 'admin/time-attendance', title: 'menu.TimeAttendance', type: 'link', show: true },
{ id: 'm55', path: 'admin/evaluation-factors', title: 'ปัจจัยการประเมินผล', type: 'link', show: true }, { id: 'm55', path: 'admin/evaluation-factors', title: 'menu.PmsFactors', type: 'link', show: true },
{ id: 'm56', path: 'admin/assessment-management', title: 'การจัดการการประเมิน', type: 'link', show: true }, { id: 'm56', path: 'admin/assessment-management', title: 'menu.PmsManage', type: 'link', show: true },
{ id: 'm57', path: 'admin/evaluation-cycle-performance', title: 'รอบการประเมิน', type: 'link', show: true } { id: 'm57', path: 'admin/evaluation-cycle-performance', title: 'menu.EvaluationPeriod', type: 'link', show: true }
], ],
}, },
{ {
title: 'รายงาน', title: 'Report',
type: 'sub', type: 'sub',
selected: false, selected: false,
active: false, active: false,
......
...@@ -16,7 +16,23 @@ ...@@ -16,7 +16,23 @@
"JobDetail": "Job Detail", "JobDetail": "Job Detail",
"JobSpecification": "Job Specification", "JobSpecification": "Job Specification",
"JobCompetency": "Job Competency", "JobCompetency": "Job Competency",
"KeyPerformanceIndicators": "Key Performance Indicators: KPIs" "KeyPerformanceIndicators": "Key Performance Indicators: KPIs",
"CompetencySystem": "Competency System",
"Setting": "Setting",
"DataBankCompetency": "Data Bank Competency",
"Grade": "Grade",
"AssessmentTools": "Assessment Tools",
"CDR": "CDR",
"IDP": "IDP",
"CompetencyFactors": "Competency Factors",
"CompetencyManage": "Competency Manage",
"AssessmentPeriod": "Assessment Period",
"PerformanceManagementSystem": "Performance Management System",
"DataBankPms": "DataBank PMS",
"TimeAttendance": "Time Attendance",
"PmsFactors": "PMS Factors",
"PmsManage": "PMS Manage",
"EvaluationPeriod": "Evaluation Period"
}, },
"SearchByNoOrName": "Search by No. or Name", "SearchByNoOrName": "Search by No. or Name",
"Import": "Import", "Import": "Import",
...@@ -25,6 +41,7 @@ ...@@ -25,6 +41,7 @@
"Print": "Print", "Print": "Print",
"ExcelExport": "Excel Export", "ExcelExport": "Excel Export",
"CSVExport": "CSV Export", "CSVExport": "CSV Export",
"Select": "Select",
"Selected": "Selected", "Selected": "Selected",
"CompanyCode": "Company Code", "CompanyCode": "Company Code",
"CompanyDescThai": "Company Desc. (Thai)", "CompanyDescThai": "Company Desc. (Thai)",
...@@ -78,8 +95,106 @@ ...@@ -78,8 +95,106 @@
"Level": "Level", "Level": "Level",
"DescriptionJobTypeThai": "Description (Thai)", "DescriptionJobTypeThai": "Description (Thai)",
"DescriptionJobTypeEng": "Description (Eng)", "DescriptionJobTypeEng": "Description (Eng)",
"JD Code": "JD Code", "JDCode": "JD Code",
"No.": "No.", "No.": "No.",
"JobSpecification": "Job Specification", "JobSpecification": "Job Specification",
"JobCompetency": "Job Competency" "JobCompetency": "Job Competency",
"CompetencySystem": "Competency System",
"Setting": "Setting",
"CompetencyConfig": "Competency Config",
"Year": "Year",
"ExpectationLevel": "Expectation Level",
"WeightOfEvaluationFactors": "Weight of Evaluation Factors",
"Score": "Score",
"Weight": "Weight",
"Save": "Save",
"CompetencyTypes": "Competency Types",
"CompetencyTopics": "Competency Topics",
"Code": "Code",
"TypeName": "Type Name",
"Abbreviations": "Abbreviations",
"EditCompetencyTypes": "Competency Types",
"TypesNameThai": "Types Name (Thai)",
"TypesNameEng": "Types Name (Eng)",
"Clear": "Clear",
"Back": "Back",
"SaveData": "Save",
"CompetencyCode": "Competency Code",
"CompetencyName": "Competency Name",
"CompetencyType": "Competency Type",
"GradeManage": "Grade Manage",
"AssessmentTools": "Assessment Tools",
"ToolsName": "Tools Name",
"DisplayName": "Display Name",
"CDRName": "CDR Name",
"IDPConfig": "IDP Config",
"GAPConfig": "GAP Config",
"Pass": "Pass",
"NoGAP": "(No GAP)",
"IDPConfig_table": "IDP Config",
"NumberOfBI": "Number of BI",
"DevelopmentTools": "Development Tools",
"OJTJobAssignment": "OJT/Job Assignment",
"CoachMentor": "Coach/Mentor",
"Training": "Training",
"BIsAndCDR": "BIs and CDR",
"CompetencyMapping": "Competency Mapping",
"AssignApprover": "Assign Approver",
"CompetencyManage": "Competency Manage",
"BIsAndCDRManage": "BIs and CDR Manage",
"CompetencyType_type": "Competency Type",
"CompetencyDefinition": "Competency Definition",
"ProficiencyLevel": "Proficiency Level",
"BehavioralIndicators": "Behavioral Indicators (BIs)",
"ItemsPerPage": "Items Per Page",
"To": "To",
"From": "From",
"JobDescription": "Job Description (Eng)",
"EditCompetencyMapping": "Competency Mapping",
"JobDescriptionThai": "Description (Thai)",
"JobDescriptionEng": "Description (Eng)",
"NoInformation": "No information",
"CompetencyTopics_list": "CompetencyTopics",
"Competency_Code": "Code",
"Approver1": "Approver 1",
"Approver2": "Approver 2",
"Approver3": "Approver 3",
"Approver4": "Approver 4",
"Approver5": "Approver 5",
"EmployeeName": "Employee Name",
"Assessor1": "Approver 1",
"Assessor2": "Approver 2",
"Assessor3": "Approver 3",
"Assessor4": "Approver 4",
"Assessor5": "Approver 5",
"AssessmentPeriod": "Assessment Period",
"PeriodCode": "Period Code",
"Description": "Description",
"Year_round": "Year",
"StartDate": "Start Date",
"EndDate": "End Date",
"EndPeriod": "End Period",
"PerformanceManagementSystem": "Performance Management System",
"PmsConfig": "PMS Config",
"Competency": "Competency",
"DisplayResults": "Display Results",
"NotDisplay": "Not Display",
"TimeAttendance": "Time Attendance",
"PmsTypes": "PMS Types",
"PmsTopics": "PMS Topics",
"TopicName": "Topic Name",
"TimeAttendance_head": "Time Attendance",
"TimeAttendanceManage": "Time Attendance Manage",
"WorkingTimeDataManage": "Working Time Data Manage",
"Unit": "Unit",
"ImportWorkingTimeData": "Import Working Time Data",
"PMSFactorsSetting": "PMS Factors Setting",
"Total": "Total",
"PMSManage": "PMS Manage",
"GroupingKPI": "Grouping KPI",
"Report": "Report",
"ExcelReport": "Excel Report",
"EvaluationPeriod": "Evaluation Period",
"JobDescription(JD)": "Job Description (JD)",
"NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll": "Note: If you do not select a JD level, The system will select all."
} }
\ No newline at end of file
...@@ -16,7 +16,23 @@ ...@@ -16,7 +16,23 @@
"JobDetail": "รายละเอียดของงาน", "JobDetail": "รายละเอียดของงาน",
"JobSpecification": "คุณสมบัติที่จำเป็น", "JobSpecification": "คุณสมบัติที่จำเป็น",
"JobCompetency": "ความสามารถในตำแหน่งงาน", "JobCompetency": "ความสามารถในตำแหน่งงาน",
"KeyPerformanceIndicators": "ตัวชี้วัดของตำแหน่งงาน" "KeyPerformanceIndicators": "ตัวชี้วัดของตำแหน่งงาน",
"CompetencySystem": "ประเมินสมรรถนะ",
"Setting": "การตั้งค่า",
"DataBankCompetency": "คลังข้อมูลสมรรถนะ",
"Grade": "เกรด",
"AssessmentTools": "เครื่องมือการประเมิน",
"CDR": "หลักสูตรการพัฒนา",
"IDP": "แผนพัฒนา IDP",
"CompetencyFactors": "ปัจจัยการประเมินสมรรถนะ",
"CompetencyManage": "การจัดการสมรรถนะ",
"AssessmentPeriod": "รอบการประเมิน",
"PerformanceManagementSystem": "ประเมินการจัดการประสิทธิภาพ",
"DataBankPms": "คลังข้อมูลการบริหารผลงาน",
"TimeAttendance": "ทะเบียนการประเมินเวลาทำงาน",
"PmsFactors": "ปัจจัยการประเมินผล",
"PmsManage": "การจัดการการประเมินผล",
"EvaluationPeriod": "รอบการประเมิน"
}, },
"SearchByNoOrName": "ค้นหาตามรหัสหรือชื่อ", "SearchByNoOrName": "ค้นหาตามรหัสหรือชื่อ",
"Import": "นำเข้า", "Import": "นำเข้า",
...@@ -25,6 +41,7 @@ ...@@ -25,6 +41,7 @@
"Print": "พิมพ์", "Print": "พิมพ์",
"ExcelExport": "ส่งออก Excel", "ExcelExport": "ส่งออก Excel",
"CSVExport": "ส่งออก CSV", "CSVExport": "ส่งออก CSV",
"Select": "เลือก",
"Selected": "เลือก", "Selected": "เลือก",
"CompanyCode": "รหัสบริษัท", "CompanyCode": "รหัสบริษัท",
"CompanyDescThai": "รายละเอียดบริษัท (ไทย)", "CompanyDescThai": "รายละเอียดบริษัท (ไทย)",
...@@ -81,8 +98,106 @@ ...@@ -81,8 +98,106 @@
"Level": "ระดับ", "Level": "ระดับ",
"DescriptionJobTypeThai": "รายละเอียด (ไทย)", "DescriptionJobTypeThai": "รายละเอียด (ไทย)",
"DescriptionJobTypeEng": "รายละเอียด (อังกฤษ)", "DescriptionJobTypeEng": "รายละเอียด (อังกฤษ)",
"JD Code": "รหัสงาน", "JDCode": "รหัสงาน",
"No.": "ลำดับ", "No.": "ลำดับ",
"JobSpecification": "คุณสมบัติที่จำเป็นต่อการปฏิบัติหน้าที่", "JobSpecification": "คุณสมบัติที่จำเป็นต่อการปฏิบัติหน้าที่",
"JobCompetency": "ความรู้ ทักษะ ความสามารถในตำแหน่งงาน ( Job Competency )" "JobCompetency": "ความรู้ ทักษะ ความสามารถในตำแหน่งงาน ( Job Competency )",
"CompetencySystem": "การประเมินสมรรถนะ",
"CompetencyConfig": "กำหนดค่าระบบประเมินสมรรถนะ",
"Year": "ปีการประเมิน",
"ExpectationLevel": "ระดับความคาดหวัง",
"WeightOfEvaluationFactors": "น้ำหนักปัจจัยการประเมิน",
"Score": "คะแนน",
"Weight": "น้ำหนัก",
"Save": "บันทึก",
"CompetencyTypes": "ประเภทสมรรถนะ",
"CompetencyTopics": "หัวข้อสมรรถนะ",
"Code": "รหัส",
"TypeName": "ชื่อประเภท",
"Abbreviations": "ชื่อย่อ",
"EditCompetencyTypes": "แก้ไขประเภทสมรรถนะ",
"TypesNameThai": "ชื่อประเภท (ไทย)",
"TypesNameEng": "ชื่อประเภท (อังกฤษ)",
"Clear": "ล้างข้อมูล",
"Back": "ย้อนกลับ",
"SaveData": "บันทึกข้อมูล",
"CompetencyCode": "รหัสสมรรถนะ",
"CompetencyName": "ชื่อสมรรถนะ",
"CompetencyType": "ประเภทสมรรถนะ",
"GradeManage": "การจัดการเกรด",
"AssessmentTools": "เครื่องมือประเมิน",
"ToolsName": "ชื่อเครื่องมือประเมิน",
"DisplayName": "ชื่อที่แสดง",
"CDRName": "ชื่อหลักสูตร",
"IDPConfig": "กำหนดแผนพัฒนา IDP",
"GAPConfig": "ตั้งค่าคะแนนประเมินตัวชี้วัดที่ไม่ติด GAP",
"Pass": "ผ่าน",
"NoGAP": "(ไม่ติดGAP)",
"IDPConfig_table": "ตารางกำหนดแผนพัฒนา",
"NumberOfBI": "จำนวน BI ที่ติด GAP",
"DevelopmentTools": "เครื่องมือพัฒนา",
"OJTJobAssignment": "OJT/การมอบหมายงาน",
"CoachMentor": "โค้ช/ที่ปรึกษา",
"Training": "อบรม",
"BIsAndCDR": "ตัวชี้วัดและหลักสูตร",
"CompetencyMapping": "จัดกลุ่มสมรรถนะ",
"AssignApprover": "กำหนดผู้ประเมิน",
"CompetencyManage": "การจัดการสมรรถนะ",
"BIsAndCDRManage": "การจัดการตัวชี้วัดและหลักสูตร",
"CompetencyType_type": "ประเภท",
"CompetencyDefinition": "นิยามสมรรถนะ",
"ProficiencyLevel": "ระดับความคาดหวัง",
"BehavioralIndicators": "ตัวชี้วัดพฤติกรรม",
"CDR": "หลักสูตร",
"ItemsPerPage": "รายการต่อหน้า",
"To": "ถึง",
"From": "จาก",
"JobDescription": "ชื่อลักษณะงาน (ไทย)",
"EditCompetencyMapping": "แก้ไขกลุ่มสมรรถนะ",
"JobDescriptionThai": "ชื่อลักษณะงาน (ไทย)",
"JobDescriptionEng": "ชื่อลักษณะงาน (อังกฤษ)",
"NoInformation": "ไม่พบข้อมูล",
"CompetencyTopics_list": "รายการสมรรถนะ",
"Competency_Code": "รหัสสมรรถนะ",
"Approver1": "ลำดับที่ 1",
"Approver2": "ลำดับที่ 2",
"Approver3": "ลำดับที่ 3",
"Approver4": "ลำดับที่ 4",
"Approver5": "ลำดับที่ 5",
"EmployeeName": "ชื่อพนักงาน",
"Assessor1": "ผู้ประเมินลำดับที่ 1",
"Assessor2": "ผู้ประเมินลำดับที่ 2",
"Assessor3": "ผู้ประเมินลำดับที่ 3",
"Assessor4": "ผู้ประเมินลำดับที่ 4",
"Assessor5": "ผู้ประเมินลำดับที่ 5",
"AssessmentPeriod": "รอบการประเมิน",
"PeriodCode": "รหัส",
"Description": "รายละเอียด",
"Year_round": "รอบปีการประเมิน",
"StartDate": "วันที่เริ่มต้น",
"EndDate": "วันที่สิ้นสุด",
"EndPeriod": "ปิดรอบการประเมิน",
"Setting": "การตั้งค่า",
"PmsConfig": "กำหนดค่าระบบการประเมิน",
"Competency": "แสดงผลประเมินสมรรถนะ",
"DisplayResults": "แสดงผล",
"NotDisplay": "ไม่แสดงผล",
"TimeAttendance": "แสดงผลประเมินเวลาทำงาน",
"PmsTypes": "ประเภทการประเมิน",
"PmsTopics": "หัวข้อการประเมิน",
"TopicName": "ชื่อหัวข้อ",
"TimeAttendance_head": "การประเมินเวลาทำงาน",
"TimeAttendanceManage": "การจัดการหัวข้อการประเมินเวลาทำงาน",
"WorkingTimeDataManage": "การจัดการข้อมูลสถิติเวลาทำงาน",
"Unit": "หน่วยนับ",
"ImportWorkingTimeData": "นำเข้าข้อมูลสถิติเวลาทำงาน",
"PMSFactorsSetting": "กำหนดปัจจัยการประเมินผล",
"Total": "รวม",
"PMSManage": "การจัดการประเมิน",
"GroupingKPI": "จัดกลุ่มการประเมิน",
"Report": "รายงาน",
"ExcelReport": "รายงาน",
"EvaluationPeriod": "แก้ไขรอบการประเมิน",
"JobDescription(JD)": "ลักษณะงาน (JD)",
"NoteIfYouDoNotSelectAJDLevelTheSystemWillSelectAll": "หมายเหตุ ถ้าไม่เลือกระดับ JD ระบบจะทำการเลือกทั้งหมด"
} }
\ 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