Commit 7961588b by Natthaphat

การประเมินสมรรถนะ > การจัดการรอบการประเมิน > รอบการประเมิน

การประเมินจัดการประสิทธิภาพ > รอบการประเมิน > รอบการประเมิน
parent 52f56c3d
......@@ -12,10 +12,10 @@
</div>
<div class="grid grid-cols-2 gap-6 mb-5">
<div class="col-span-1">
<input type="text" id="input-label" class="ti-form-input w-full pr-10 bg-input-readonly" readonly [value]="evaluationRound.tdesc">
<input type="text" id="input-label" class="ti-form-input w-full pr-10 bg-input-readonly" readonly [value]="evaluationRound?.tdesc">
</div>
<div class="col-span-1">
<input type="text" id="input-label" class="ti-form-input w-full pr-10 bg-input-readonly" readonly [value]="evaluationRound.apsyear">
<input type="text" id="input-label" class="ti-form-input w-full pr-10 bg-input-readonly" readonly [value]="evaluationRound?.apsyear">
</div>
</div>
</div>
......@@ -472,7 +472,7 @@
</ng-template>
<div id="form-pm-emp" class="hs-overlay hidden ti-modal" >
<div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto mt-7">
<div class="hs-overlay-open:mt-7 ti-modal-box ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto mt-7">
<div class="max-h-full overflow-hidden ti-modal-content !width-80 !box-modal" >
<div class="ti-modal-header">
<h3 class="text-xxl font-bold text-primary">
......@@ -670,7 +670,7 @@
</div>
<div id="form-assessment" class="hs-overlay hidden ti-modal" >
<div class="hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto mt-7">
<div class="hs-overlay-open:mt-7 ti-modal-box ease-out lg:!max-w-4xl lg:w-full m-3 lg:!mx-auto mt-7">
<div class="max-h-full overflow-hidden ti-modal-content !width-80 !box-modal" >
<div class="ti-modal-header">
<h3 class="text-xxl font-bold text-primary">
......
......@@ -112,15 +112,20 @@ export class EditDefineDocumentFormComponent {
});
}
assessmentListFilter() {
return this.assessmentList.filter(x =>
x.apsassessy.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.efname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.elname.toLowerCase().includes(this.search.toLowerCase()) ||
x.masfromEvaluationRound.evaluationRoundId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase())
)
if (!Array.isArray(this.assessmentList)) {
return []; // หรือ return null แล้วจัดการใน HTML
}
return this.assessmentList.filter(x =>
x.apsassessy.fname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.lname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.efname.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.elname.toLowerCase().includes(this.search.toLowerCase()) ||
x.masfromEvaluationRound.evaluationRoundId.toLowerCase().includes(this.search.toLowerCase()) ||
x.apsassessy.employeeId.toLowerCase().includes(this.search.toLowerCase())
);
}
searchChange() {
this.currentPage = 1;
const filteredData = this.assessmentListFilter();
......
......@@ -29,8 +29,31 @@
<ng-template #headerTemplate let-data>
<span class="font-size-12px font-weight-700 text-primary">{{ col.headerText }}</span>
</ng-template>
<ng-template #template let-data *ngIf="col.field == 'statusCode.tdesc'">
<div class="flex justify-center items-center w-full h-full">
<span
class="hs-tooltip ti-main-tooltip [--trigger:hover] flex items-center justify-center rounded-full h-6 w-6 text-white"
[ngClass]="{
'bg-success': data.statusCode.tdesc == 'กำลังดำเนินการประเมิน',
'bg-warning': data.statusCode.tdesc == 'รอดำเนินการ',
'bg-gray-400': data.statusCode.tdesc == 'สิ้นสุดช่วงเวลาประเมิน'
}" role="tooltip">
<ng-container [ngSwitch]="data.statusCode.tdesc">
<i *ngSwitchCase="'กำลังดำเนินการประเมิน'" class="ti ti-clock hs-tooltip-toggle ti-main-tooltip-toggle"></i>
<i *ngSwitchCase="'รอดำเนินการ'" class="ti ti-hourglass-empty hs-tooltip-toggle ti-main-tooltip-toggle"></i>
<i *ngSwitchCase="'สิ้นสุดช่วงเวลาประเมิน'" class="ti ti-check hs-tooltip-toggle ti-main-tooltip-toggle"></i>
</ng-container>
<span
class="hs-tooltip-content ti-main-tooltip-content py-1 px-2 bg-primary text-white shadow-sm dark:bg-slate-700">
{{ data.statusCode.tdesc }}
</span>
</span>
</div>
</ng-template>
</e-column>
<e-column headerText='action' width='150' textAlign='Center' *ngIf="actionSetting">
<e-column headerText='action' width='205' textAlign='Center' *ngIf="actionSetting">
<ng-template #headerTemplate let-data *ngIf="actionSetting">
<span class="font-size-12px font-weight-700 text-primary">การจัดการ</span>
</ng-template>
......@@ -38,10 +61,32 @@
<i class="ti ti-eye cursor-pointer i-gray fs-l px-1" (click)="onNextPageView(data)" *ngIf="childView"></i>
<i class="ti ti-edit cursor-pointer i-gray fs-l px-1" [attr.data-hs-overlay]="modalName" *ngIf="canEdit"
(click)="onSelectData(data)"></i>
<i class="ti ti-file-download cursor-pointer i-gray fs-l px-1" (click)="onFileDownload(data)"
<i class="ti ti-file-download cursor-pointer i-gray fs-l px-1" (click)="onFileDownload(data)"
*ngIf="canDownload && data.competencyFiles"></i>
<i class="ti ti-menu-2 cursor-pointer i-gray fs-l px-1" (click)="onNextPage(data)" *ngIf="canChild"></i>
</ng-template>
<i class="ti ti-user cursor-pointer i-gray fs-l px-1" (click)="onNextPageForm(data)" *ngIf="childForm"></i>
<ng-container *ngIf="data.statusFrom as statusFrom">
<ng-container [ngSwitch]="statusFrom.code">
<span class="badge text-white m-1 cursor-pointer"
(click)="modalStatus='createForm'; createFormEvent.emit(data)" *ngIf="statusFrom.code == '0'"
[ngClass]="{'bg-secondary': true, 'text-white': true}">
สร้างแบบฟอร์ม
</span>
<span class="badge text-white m-1" *ngIf="statusFrom.code == '1'"
[ngClass]="{'bg-primary': true, 'text-white': true}">
ปิดรอบประเมิน
</span>
<span class="badge text-white m-1" *ngIf="statusFrom.code == '2'"
[ngClass]="{'bg-gray-400': true, 'text-white': true}">
ปิดรอบประเมิน
</span>
</ng-container>
</ng-container>
</ng-template>
</e-column>
</e-columns>
......
......@@ -108,7 +108,11 @@ export class DatagridSyncfutionComponent implements OnInit {
@Output() sendNextPageView = new EventEmitter<any>();
@Input() canDownload = false
@Output() sendFileDownload = new EventEmitter<any>();
@Input() childForm = false
@Output() sendNextPageForm = new EventEmitter<any>();
modalStatus = '';
@Output() createFormEvent = new EventEmitter<any>();
@Input() checkBoxSetting = true
@Input() actionSetting = true
@Input() detailSetting = false
......@@ -376,12 +380,13 @@ export class DatagridSyncfutionComponent implements OnInit {
}
}
onNextPageView(data: any) {
this.sendNextPageView.emit(data);
}
onFileDownload(data: any) {
this.sendFileDownload.emit(data);
}
onNextPageForm(data: any) {
this.sendNextPageForm.emit(data);
}
}
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