Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
myAppraisal
Commits
921acede
Commit
921acede
authored
Feb 21, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
แก้ refresh-token
parent
f6053f76
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
439 additions
and
720 deletions
+439
-720
manage-user.component.html
...s/account-settings/manage-user/manage-user.component.html
+2
-2
set-a-password.component.html
...unt-settings/set-a-password/set-a-password.component.html
+1
-1
group-competencies.component.html
...ment/group-competencies/group-competencies.component.html
+3
-6
group-competencies.component.ts
...gement/group-competencies/group-competencies.component.ts
+1
-0
competency-topic.component.ts
...gistration/competency-topic/competency-topic.component.ts
+1
-0
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+2
-0
assessment-management.component.html
...ssessment-management/assessment-management.component.html
+2
-7
assessment-management.component.ts
.../assessment-management/assessment-management.component.ts
+2
-3
edit-evaluation-grouping.component.html
...aluation-grouping/edit-evaluation-grouping.component.html
+40
-32
edit-evaluation-grouping.component.scss
...aluation-grouping/edit-evaluation-grouping.component.scss
+0
-119
edit-evaluation-grouping.component.ts
...evaluation-grouping/edit-evaluation-grouping.component.ts
+60
-77
evaluation-grouping.component.html
...nt/evaluation-grouping/evaluation-grouping.component.html
+129
-259
evaluation-grouping.component.scss
...nt/evaluation-grouping/evaluation-grouping.component.scss
+0
-132
evaluation-grouping.component.ts
...ment/evaluation-grouping/evaluation-grouping.component.ts
+116
-80
pms-group-assessment.model.ts
src/app/shared/model/pms-group-assessment.model.ts
+21
-0
pms-group-assessment1.model.ts
src/app/shared/model/pms-group-assessment1.model.ts
+17
-0
http-request.interceptor.ts
src/app/shared/services/http-request.interceptor.ts
+2
-2
pms-group-assessment.service.ts
src/app/shared/services/pms-group-assessment.service.ts
+35
-0
style.css
src/assets/css/style.css
+5
-0
IMPORT_COMPETENCY_TOPIC.xlsx
src/assets/template/IMPORT_COMPETENCY_TOPIC.xlsx
+0
-0
No files found.
src/app/components/company-components/account-settings/manage-user/manage-user.component.html
View file @
921acede
...
@@ -183,9 +183,9 @@
...
@@ -183,9 +183,9 @@
</div>
</div>
<ng-container
*
ngIf=
"changePassword"
>
<ng-container
*
ngIf=
"changePassword"
>
<label
class=
"ti-form-label mt-2rem"
>
รหัสผ่านเก่า*
</label>
<label
class=
"ti-form-label mt-2rem"
>
รหัสผ่านเก่า*
</label>
<input
type=
"
password"
class=
"
ti-form-input"
[(
ngModel
)]="
userPassword
.
oldPassword
"
>
<input
type=
"
text"
class=
"masked-input
ti-form-input"
[(
ngModel
)]="
userPassword
.
oldPassword
"
>
<label
class=
"ti-form-label mt-2rem"
>
รหัสผ่านใหม่*
</label>
<label
class=
"ti-form-label mt-2rem"
>
รหัสผ่านใหม่*
</label>
<input
type=
"
password"
class=
"
ti-form-input"
[(
ngModel
)]="
userPassword
.
newPassword
"
>
<input
type=
"
text"
class=
"masked-input
ti-form-input"
[(
ngModel
)]="
userPassword
.
newPassword
"
>
</ng-container>
</ng-container>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<button
type=
"button"
...
...
src/app/components/company-components/account-settings/set-a-password/set-a-password.component.html
View file @
921acede
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
<label
class=
"ti-form-label mt-2rem"
>
รหัสพนักงาน
</label>
<label
class=
"ti-form-label mt-2rem"
>
รหัสพนักงาน
</label>
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
[(
ngModel
)]="
userPassword
.
empId
"
>
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
[(
ngModel
)]="
userPassword
.
empId
"
>
<label
class=
"ti-form-label mt-2rem"
>
กำหนดผ่านใหม่*
</label>
<label
class=
"ti-form-label mt-2rem"
>
กำหนดผ่านใหม่*
</label>
<input
type=
"
password"
class=
"
ti-form-input"
[(
ngModel
)]="
userPassword
.
newPassword
"
>
<input
type=
"
text"
class=
"masked-input
ti-form-input"
[(
ngModel
)]="
userPassword
.
newPassword
"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
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"
...
...
src/app/components/competency-assessment/competency-management/group-competencies/group-competencies.component.html
View file @
921acede
<ng-container
*
ngIf=
"!editTab"
>
<ng-container
*
ngIf=
"!editTab"
>
<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"
>
</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"
>
...
@@ -18,7 +15,7 @@
...
@@ -18,7 +15,7 @@
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
<button
type=
"button"
class=
"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-45px m-0 shadow-md"
class=
"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-45px m-0 shadow-md"
data-hs-overlay=
"#group-competencies-
modal-add
"
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
...
@@ -130,7 +127,7 @@
...
@@ -130,7 +127,7 @@
</ng-container>
</ng-container>
<div
id=
"group-competencies-
modal-add
"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"group-competencies-
upload-modal
"
class=
"hs-overlay hidden ti-modal"
>
<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 !rounded-none !rounded-t-sm"
>
<div
class=
"ti-modal-header bg-primary !rounded-none !rounded-t-sm"
>
<h5
class=
"text-xxl font-bold text-white"
>
<h5
class=
"text-xxl font-bold text-white"
>
...
@@ -156,7 +153,7 @@
...
@@ -156,7 +153,7 @@
</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=
"#group-competencies-
modal-add
"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
data-hs-overlay=
"#group-competencies-
upload-modal
"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
อัปโหลด
อัปโหลด
</button>
</button>
...
...
src/app/components/competency-assessment/competency-management/group-competencies/group-competencies.component.ts
View file @
921acede
...
@@ -58,6 +58,7 @@ export class GroupCompetenciesComponent {
...
@@ -58,6 +58,7 @@ export class GroupCompetenciesComponent {
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
dataLoading
=
false
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
dataLoading
=
false
...
...
src/app/components/competency-assessment/name-registration/competency-topic/competency-topic.component.ts
View file @
921acede
...
@@ -279,6 +279,7 @@ export class CompetencyTopic {
...
@@ -279,6 +279,7 @@ export class CompetencyTopic {
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getCompetencytypeList
()
this
.
getCompetencytypeList
()
this
.
getCompetencytopicList
()
this
.
getCompetencytopicList
()
this
.
dataLoading
=
false
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
dataLoading
=
false
this
.
dataLoading
=
false
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
921acede
...
@@ -140,6 +140,7 @@ import { UserService } from 'src/app/shared/services/user.service';
...
@@ -140,6 +140,7 @@ import { UserService } from 'src/app/shared/services/user.service';
import
{
ManageUserComponent
}
from
'../company-components/account-settings/manage-user/manage-user.component'
;
import
{
ManageUserComponent
}
from
'../company-components/account-settings/manage-user/manage-user.component'
;
import
{
PmstypeService
}
from
'src/app/shared/services/pmstype.service'
;
import
{
PmstypeService
}
from
'src/app/shared/services/pmstype.service'
;
import
{
PmstopicService
}
from
'src/app/shared/services/pmstopic.service'
;
import
{
PmstopicService
}
from
'src/app/shared/services/pmstopic.service'
;
import
{
PmsGroupAssessmentService
}
from
'src/app/shared/services/pms-group-assessment.service'
;
export
const
MY_DATE_FORMATS
=
{
export
const
MY_DATE_FORMATS
=
{
parse
:
{
parse
:
{
...
@@ -310,6 +311,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
...
@@ -310,6 +311,7 @@ export class CustomDateAdapter extends NativeDateAdapter {
UserService
,
UserService
,
PmstypeService
,
PmstypeService
,
PmstopicService
,
PmstopicService
,
PmsGroupAssessmentService
,
{
{
provide
:
HTTP_INTERCEPTORS
,
provide
:
HTTP_INTERCEPTORS
,
useClass
:
HttpRequestInterceptor
,
useClass
:
HttpRequestInterceptor
,
...
...
src/app/components/performance-management-evaluation/assessment-management/assessment-management.component.html
View file @
921acede
...
@@ -26,16 +26,11 @@
...
@@ -26,16 +26,11 @@
<div
class=
"mt-3 px-2rem !-mt-3 pt-50px"
>
<div
class=
"mt-3 px-2rem !-mt-3 pt-50px"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
*
ngIf=
"activeTab === 'underline-1'"
>
*
ngIf=
"activeTab === 'underline-1'"
>
<app-evaluation-grouping
*
ngIf=
"groupShow=='1'"
[
pathTitle
]="
pathTitle
"
<app-evaluation-grouping
(
sendPathTitle
)="
pathTitle=
$event"
></app-evaluation-grouping>
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-evaluation-grouping>
<app-edit-evaluation-grouping
*
ngIf=
"groupShow=='2'"
[
pathTitle
]="
pathTitle
"
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-edit-evaluation-grouping>
</div>
</div>
<div
id=
"underline-2"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
<div
id=
"underline-2"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
*
ngIf=
"activeTab === 'underline-2'"
>
*
ngIf=
"activeTab === 'underline-2'"
>
<app-assigning-approvers
*
ngIf=
"groupShow=='1'"
[
pathTitle
]="
pathTitle
"
<app-assigning-approvers></app-assigning-approvers>
(
sendPathTitle
)="
pathTitle=
$event"
(
sendGroupShow
)="
groupShow=
$event"
></app-assigning-approvers>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/assessment-management/assessment-management.component.ts
View file @
921acede
...
@@ -6,7 +6,6 @@ import { Component } from '@angular/core';
...
@@ -6,7 +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
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
'จัดกลุ่มการประเมิน'
]
activeTab
:
string
=
'underline-1'
;
activeTab
:
string
=
'underline-1'
groupShow
=
'1'
}
}
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/edit-evaluation-grouping/edit-evaluation-grouping.component.html
View file @
921acede
<div
class=
"flex items-center py-4 border-b-2 border-collapse "
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center border-b-2 border-collapse"
>
<button
type=
"button"
class=
"ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
<div
class=
"flex justify-between"
>
(
click
)="
onBack
()"
>
<div
class=
"flex"
>
<i
class=
"ri-arrow-left-s-line"
></i>
ย้อนกลับ
<button
type=
"button"
class=
"ti-btn ti-btn-outline ti-btn-outline-light h-20px m-0 shadow-md text-blue-500"
</button>
(
click
)="
onBack
()"
>
<div
class=
"text-2xl font-bold py-2 text-primary px-4 "
>
<i
class=
"ti ti-chevron-left"
></i>
แก้ไขกลุ่มการประเมิน
ย้อนกลับ
</button>
<div
class=
"font-size-18px font-weight-700 align-center font-bold py-2 text-primary px-4"
>
แก้ไขกลุ่มการประเมิน
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"py-2 border-b-2 border-collapse "
>
<div
class=
"py-2 border-b-2 border-collapse "
>
...
@@ -14,10 +19,9 @@
...
@@ -14,10 +19,9 @@
</div>
</div>
</div>
</div>
<div
class=
"grid"
>
<div
class=
"grid"
>
<input
type=
"text"
id=
"input-label"
<input
type=
"text"
id=
"input-label"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-full rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 w-1/2 bg-input-readonly"
class=
"py-2 px-3 ltr:pr-11 rtl:pl-11 ti-form-input w-full rounded-md ltr:rounded-r-md rtl:rounded-l-md focus:z-10 bg-input-readonly"
readonly
[(
ngModel
)]="
pl
.
tdesc
"
>
readonly
value=
"พนักงานระดับ 01-02"
>
</div>
</div>
</div>
</div>
...
@@ -33,11 +37,11 @@
...
@@ -33,11 +37,11 @@
</div>
</div>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<i
(
click
)="
toggleCheckbox
()"
<
!-- <
i (click)="toggleCheckbox()"
[ngClass]="{'ri-checkbox-multiple-line': !isChecked, 'ri-checkbox-multiple-fill': isChecked}"
[ngClass]="{'ri-checkbox-multiple-line': !isChecked, 'ri-checkbox-multiple-fill': isChecked}"
class="ri-checkbox-multiple-line text-gray-500 dark:text-white/70"></i>
class="ri-checkbox-multiple-line text-gray-500 dark:text-white/70"></i>
<label for="hs-checkbox-group-2" class="text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
<label for="hs-checkbox-group-2" class="text-sm text-gray-500 ltr:ml-2 rtl:mr-2 dark:text-white/70"
(
click
)="
toggleCheckbox
()"
>
Select All
</label>
(click)="toggleCheckbox()">Select All</label>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -94,12 +98,12 @@
...
@@ -94,12 +98,12 @@
<thead>
<thead>
<tr>
<tr>
<ng-container
<ng-container
*
ngFor=
"let item of ['รหัส','ชื่อหัวข้อ','ประเภท','น้ำหนัก','Action']; let f = first; let l = last; let i = index"
>
*
ngFor=
"let item of ['รหัส','ชื่อหัวข้อ','ประเภท','น้ำหนัก','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 }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l&&!f"
>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l&&!f"
>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"50"
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"50"
height=
"16"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
height=
"16"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
<path
<path
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
...
@@ -111,7 +115,8 @@
...
@@ -111,7 +115,8 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let item of[
<tr
*
ngFor=
"let item of[
['HS-01', 'C1 CUSTOMER ORIENTED (SQCOME)','HOSHIN','5.0'],
['HS-01', 'C1 CUSTOMER ORIENTED (SQCOME)','HOSHIN','5.0'],
['HS-02', 'C2 MANUFACTURING OPTIMIZATION','HOSHIN','3.0'],
['HS-02', 'C2 MANUFACTURING OPTIMIZATION','HOSHIN','3.0'],
['HS-03', 'C3 INCREASE EMPLOYEE ENGAGEMENT','HOSHIN','3.0'],
['HS-03', 'C3 INCREASE EMPLOYEE ENGAGEMENT','HOSHIN','3.0'],
...
@@ -119,7 +124,8 @@
...
@@ -119,7 +124,8 @@
['HS-05', 'C5 RISK MANAGEMENT (TAXATION)','HOSHIN','1.0'],
['HS-05', 'C5 RISK MANAGEMENT (TAXATION)','HOSHIN','1.0'],
['KP-01', 'ประสาทงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในเเละภายนอกตามเเผนการฝึกอบรมพัฒนา','KPI','10.0']];let i = index"
>
['KP-01', 'ประสาทงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในเเละภายนอกตามเเผนการฝึกอบรมพัฒนา','KPI','10.0']];let i = index"
>
<td
style=
"font-size: 12px; width: 10%;"
class=
"text-center"
>
<td
style=
"font-size: 12px; width: 10%;"
class=
"text-center"
>
<input
style=
"margin-right: 20px;"
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer "
>
<input
style=
"margin-right: 20px;"
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer "
>
<label>
{{item[0]}}
</label>
<label>
{{item[0]}}
</label>
</td>
</td>
<td
style=
"font-size: 12px; width: 35%; word-break: break-word; white-space: normal;"
>
<td
style=
"font-size: 12px; width: 35%; word-break: break-word; white-space: normal;"
>
...
@@ -243,21 +249,23 @@
...
@@ -243,21 +249,23 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
*
ngFor=
"let item of[
<tr
*
ngFor=
"let item of[
['HS-01', 'C1 CUSTOMER ORIENTED (SQCOME)','HOSHIN','5.0'],
['HS-01', 'C1 CUSTOMER ORIENTED (SQCOME)','HOSHIN','5.0'],
['HS-02', 'C2 MANUFACTURING OPTIMIZATION','HOSHIN','3.0'],
['HS-02', 'C2 MANUFACTURING OPTIMIZATION','HOSHIN','3.0'],
['HS-03', 'C3 INCREASE EMPLOYEE ENGAGEMENT','HOSHIN','3.0'],
['HS-03', 'C3 INCREASE EMPLOYEE ENGAGEMENT','HOSHIN','3.0'],
['HS-04', 'C4 HEALTHY FINANCIAL','HOSHIN','3.0'],
['HS-04', 'C4 HEALTHY FINANCIAL','HOSHIN','3.0'],
['HS-05', 'C5 RISK MANAGEMENT (TAXATION)','HOSHIN','1.0'],
['HS-05', 'C5 RISK MANAGEMENT (TAXATION)','HOSHIN','1.0'],
['KP-01', 'ประสาทงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในเเละภายนอกตามเเผนการฝึกอบรมพัฒนา','KPI','10.0']];let i = index"
>
['KP-01', 'ประสาทงานกับวิทยากร ผู้เข้ารับการอบรมทั้งภายในเเละภายนอกตามเเผนการฝึกอบรมพัฒนา','KPI','10.0']];let i = index"
>
<td
style=
"font-size: 12px; width: 10%;"
class=
"text-center"
>
<td
style=
"font-size: 12px; width: 10%;"
class=
"text-center"
>
{{item[0]}}
{{item[0]}}
</td>
</td>
<td
style=
"font-size: 12px; width: 35%; word-break: break-word; white-space: normal;"
>
<td
{{item[1]}}
style=
"font-size: 12px; width: 35%; word-break: break-word; white-space: normal;"
>
</td>
{{item[1]}}
<td
style=
"font-size: 12px; width: 20%;"
>
{{item[2]}}
</td>
</td>
<td
class=
"text-center"
style=
"font-size: 12px; width: 15%;"
>
{{item[3]}}
</td>
<td
style=
"font-size: 12px; width: 20%;"
>
{{item[2]}}
</td>
<td
class=
"text-center"
style=
"font-size: 12px; width: 15%;"
>
{{item[3]}}
</td>
<td
class=
"flex justify-center"
>
<td
class=
"flex justify-center"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
<button
type=
"button"
...
@@ -338,10 +346,10 @@
...
@@ -338,10 +346,10 @@
data-hs-overlay=
"#edit-evaluation-grouping-modal-add"
>
data-hs-overlay=
"#edit-evaluation-grouping-modal-add"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<
!-- <
a class="ti-btn ti-btn-success" href="javascript:void(0);"
data-hs-overlay="#edit-evaluation-grouping-alert-add-modal" (click)="addUser();showSuccess()">
data-hs-overlay="#edit-evaluation-grouping-alert-add-modal" (click)="addUser();showSuccess()">
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -374,11 +382,11 @@
...
@@ -374,11 +382,11 @@
data-hs-overlay=
"#edit-evaluation-grouping-modal-edit"
>
data-hs-overlay=
"#edit-evaluation-grouping-modal-edit"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<
!-- <
a class="ti-btn ti-btn-success" href="javascript:void(0);"
data-hs-overlay="#edit-evaluation-grouping-alert-edit-modal"
data-hs-overlay="#edit-evaluation-grouping-alert-edit-modal"
(click)="addUser();showSuccessEdit()">
(click)="addUser();showSuccessEdit()">
บันทึกข้อมูล
บันทึกข้อมูล
</a>
</a>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -410,11 +418,11 @@
...
@@ -410,11 +418,11 @@
data-hs-overlay=
"#edit-evaluation-grouping-alert-delete-modal"
>
data-hs-overlay=
"#edit-evaluation-grouping-alert-delete-modal"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<
!-- <
a class="ti-btn ti-btn-success" href="javascript:void(0);"
data-hs-overlay="#edit-evaluation-grouping-alert-delete-modal"
data-hs-overlay="#edit-evaluation-grouping-alert-delete-modal"
(click)="addUser();showSuccessDelete()">
(click)="addUser();showSuccessDelete()">
ลบข้อมูล
ลบข้อมูล
</a>
</a>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/edit-evaluation-grouping/edit-evaluation-grouping.component.scss
View file @
921acede
.button-clear
{
position
:
absolute
;
top
:
96px
;
z-index
:
1
;
right
:
41vw
;
}
.button-help
{
position
:
absolute
;
top
:
0px
;
z-index
:
1
;
right
:
0vw
;
margin
:
4
.2rem
;
margin-right
:
10px
;
/* เพิ่มใหม่ 12/16*/
}
table
.ti-custom-table
th
{
height
:
60px
;
}
table
.ti-custom-table
thead
{
height
:
50px
;
}
table
.ti-custom-table
thead
th
span
{
font-size
:
12px
;
font-weight
:
bold
;
}
a
.custom-link
{
padding
:
10px
40px
;
/* ปรับ padding ให้เพิ่มขนาด */
}
/* สไตล์ของแถบเมนู */
.nav-tabs
{
display
:
flex
;
width
:
100%
;
cursor
:
pointer
;
margin-bottom
:
10px
;
height
:
20%
;
}
.nav-item
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link
{
text-decoration
:
none
;
padding
:
10px
20px
;
display
:
inline-block
;
font-size
:
large
;
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
#ccc
;
border-radius
:
5px
5px
0px
0px
;
}
.nav-link
:hover
{
background-color
:
#f0f0f0
;
/* เปลี่ยนสีเมื่อ hover */
}
.nav-link.active
{
color
:
#ffffff
;
/* สีตัวอักษรในสถานะ active */
font-size
:
large
;
border-bottom
:
3
.5px
solid
rgb
(
var
(
--
color-primary
));
/* เส้นใต้ */
background-color
:
rgb
(
var
(
--
color-primary
));
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
rgb
(
var
(
--
color-primary
));
border-radius
:
5px
5px
0px
0px
;
}
.tab-content
{
margin-top
:
20px
;
}
.tab-pane.active
{
display
:
block
;
}
.nav-item-text
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link-text
{
text-decoration
:
none
;
display
:
inline-block
;
font-size
:
large
;
color
:
#569bf5
;
border-bottom
:
2px
solid
#569bf5
;
line-height
:
0
.8
;
}
.ti-pagination
.page-link.active
{
background-color
:
#569bf5
;
color
:
white
;
border-radius
:
50%
;
padding
:
8px
12px
;
}
.box-body
{
padding
:
0rem
;
}
.page
{
min-height
:
0vh
;
}
.ti-modal
{
overflow
:
hidden
;
}
.header-title-type
{
width
:
100%
;
min-height
:
50px
;
/* ใช้ min-height เพื่อให้มีความยืดหยุ่น */
// margin-top: 50px;
// margin-bottom: 16px;
justify-content
:
space-between
;
/* จัดเรียงองค์ประกอบภายใน */
align-items
:
center
;
/* จัดกลางแนวตั้ง */
padding-top
:
50px
;
padding-bottom
:
1rem
;
}
.bg-input-readonly
{
background-color
:
rgb
(
241
245
249
);
}
\ No newline at end of file
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/edit-evaluation-grouping/edit-evaluation-grouping.component.ts
View file @
921acede
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
C
hangeDetectorRef
,
C
omponent
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyPLModel
,
PLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
MyPmsGroupAssessment1Model
,
PmsGroupAssessment1Model
}
from
'src/app/shared/model/pms-group-assessment1.model'
;
import
{
PmsGroupAssessmentService
}
from
'src/app/shared/services/pms-group-assessment.service'
;
@
Component
({
@
Component
({
selector
:
'app-edit-evaluation-grouping'
,
selector
:
'app-edit-evaluation-grouping'
,
templateUrl
:
'./edit-evaluation-grouping.component.html'
,
templateUrl
:
'./edit-evaluation-grouping.component.html'
,
styleUrls
:
[
'./edit-evaluation-grouping.component.scss'
]
styleUrls
:
[
'./edit-evaluation-grouping.component.scss'
]
})
})
export
class
EditEvaluationGroupingComponent
{
export
class
EditEvaluationGroupingComponent
{
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
'จัดกลุ่มประเมิน'
];
@
Output
()
sendOnEdit
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Input
()
pl
:
PLModel
=
new
MyPLModel
()
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
currentPage
=
1
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
""
currentModal
:
'add'
|
'edit'
|
'delete'
|
'deleteGroup'
=
"add"
// ฟังก์ชันในการเปลี่ยนแท็บ
pmsGroupAssessment
:
{
loading
:
boolean
,
select
:
PmsGroupAssessment1Model
,
dataList
:
{
check
:
boolean
,
data
:
PmsGroupAssessment1Model
}[]
}
=
{
loading
:
false
,
select
:
new
MyPmsGroupAssessment1Model
(),
dataList
:
[]
}
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
this
.
sendPathTitle
.
emit
([
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
tab
.
text
]);
this
.
activeTab
=
tab
.
id
;
}
onBack
()
{
this
.
sendGroupShow
.
emit
(
'1'
);
// เปลี่ยนกลับไปหน้า 1
}
// การจัดการการเปิดปิด modal
modalOptions
:
{
[
nameModal
:
string
]:
{
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
};
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
numDataListChecked
=
0
this
.
modalOptions
[
name
].
modalSize
=
size
;
isDataListChecked
=
false
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
isDataListCheckedAll
=
false
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
constructor
(
private
toastr
:
ToastrService
,
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
private
pmsGroupAssessmentService
:
PmsGroupAssessmentService
,
document
.
body
.
style
.
overflow
=
'hidden'
;
private
cdr
:
ChangeDetectorRef
)
{
}
ngOnInit
():
void
{
this
.
getPmsGroupAssessmentBy_plId
()
}
}
closeModal
(
name
:
string
)
{
getPmsGroupAssessmentBy_plId
()
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
this
.
pmsGroupAssessment
.
loading
=
true
if
(
!
this
.
isAnyModalOpen
())
{
this
.
pmsGroupAssessmentService
.
getBy_plId
(
this
.
pl
.
plId
).
subscribe
({
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
next
:
response
=>
{
}
this
.
pmsGroupAssessment
.
dataList
=
response
.
pmsGroupAssessment1List
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyPmsGroupAssessment1Model
(
x
)
}))
this
.
pmsGroupAssessment
.
loading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
();
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
pmsGroupAssessment
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
});
}
}
pmsGroupAssessmentListFilter
()
{
isAnyModalOpen
():
boolean
{
return
this
.
pmsGroupAssessment
.
dataList
.
filter
(
x
=>
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
const
data
=
x
.
data
const
match
=
data
.
pmsTopic
.
pmsTopicId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
pmsTopic
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
return
match
;
});
}
}
selectPmsGroupAssessment
(
data
:
PmsGroupAssessment1Model
)
{
// ฟังก์ชัน toggle checkbox
this
.
pmsGroupAssessment
.
select
=
new
MyPmsGroupAssessment1Model
(
data
)
isChecked
:
boolean
=
false
;
// ใช้สำหรับตรวจสอบสถานะของ checkbox
toggleCheckbox
()
{
this
.
isChecked
=
!
this
.
isChecked
;
// สลับสถานะ
}
}
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
searchChange
()
{
addUser
()
{
this
.
currentPage
=
1
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
pmsGroupAssessmentListFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
)
this
.
dataListCheck
();
this
.
cdr
.
detectChanges
()
}
}
dataListCheckAll
()
{
currentModal
=
""
;
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
pmsGroupAssessmentListFilter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
constructor
(
private
toastr
:
ToastrService
)
{
}
this
.
dataListCheck
();
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
dataListCheck
()
{
showSuccessEdit
()
{
const
dataCheck
=
this
.
pmsGroupAssessmentListFilter
();
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
timeOut
:
3000
,
this
.
numDataListChecked
=
this
.
pmsGroupAssessment
.
dataList
.
filter
(
x
=>
x
.
check
).
length
positionClass
:
'toast-top-right'
,
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
});
}
}
showSuccessDelete
()
{
onBack
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
this
.
sendOnEdit
.
emit
(
false
);
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
}
}
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/evaluation-grouping.component.html
View file @
921acede
<div
class=
"header-title-type"
>
<ng-container
*
ngIf=
"!onEdit"
>
<div
class=
"flex justify-end"
>
<div
class=
"header-title-type"
>
<div
class=
"px-1"
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"relative shadow-md"
>
<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=
"Search by No. or Name"
style=
"height: 40px;"
>
<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"
>
<i
class=
"ri-search-line text-gray"
></i>
</div>
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"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=
"#edit-group-indicators-modal-add"
>
<i
class=
"ti ti-file-plus"
></i>
import
</button>
</div>
<div
class=
"px-1"
>
<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>
Help
</button>
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto table-bordered rounded-t-md"
>
<div
id=
"card-type-1"
role=
"tabpanel"
aria-labelledby=
"card-type-item-1"
>
<div
class=
"overflow-auto shadow-md"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead>
<tr>
<ng-container
*
ngFor=
"let item of ['รหัส','ชื่อเครื่องมือประเมิน','Action']; let f = first; let l = last; let i = index"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l&&!f"
>
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"50"
height=
"16"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
<path
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
</path>
</svg>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let item of[
['0102', 'พนักงานระดับ 01-02'],
['0304', 'พนักงานระดับ 03-04'],
['S1S2', 'พนักงานระดับ S1-S2'],
['S3S4', 'พนักงานระดับ S3-S4'],
['M1M2', 'พนักงานระดับ M1-M2'],
['M3M4', 'พนักงานระดับ M3-M4'],
['E1E2', 'พนักงานระดับ E1-E2'],
['E3E4', 'พนักงานระดับ E3-E4']];let i = index"
>
<td
style=
"font-size: 12px; padding-left: 4rem;"
>
{{item[0]}}
</td>
<td
style=
"font-size: 12px; padding-left: 1.5rem; width: 600px;"
>
{{item[1]}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
onEdit
()"
></i>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"body-content"
style=
"margin-top: 20px;"
>
<ul
class=
"nav-tabs"
>
<div
class=
"px-1 py-1 bg-white rounded-2 shadow justify-content-center align-items-center"
>
<div
class=
"box-body"
>
<nav
class=
"pagination-style-3 overflow-auto"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li><a
class=
"page-link active"
href=
"javascript:void(0);"
aria-current=
"page"
>
1
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
2
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
3
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
4
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
5
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
...
</a></li>
<li><a
class=
"page-link"
href=
"javascript:void(0);"
>
31
</a></li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
>
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
</nav>
</div>
</div>
</ul>
<ul
class=
"nav-tabs"
>
<p>
Show 1 to 10 of 50 items
</p>
</ul>
</div>
</div>
<div
id=
"evaluation-grouping-component-modal-add"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
เพิ่มเครื่องมือประเมิน
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#evaluation-grouping-component-modal-add"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-center"
>
<div
class=
"flex justify-end"
style=
"padding-right: 1rem;"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
>
<div
class=
"relative shadow-md"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
<input
type=
"text"
id=
"hs-leading-icon"
name=
"hs-leading-icon"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
[(
ngModel
)]="
search
"
(
ngModelChange
)="
searchChange
()"
>
<g
id=
"SVGRepo_bgCarrier"
stroke-width=
"0"
></g>
<div
<g
id=
"SVGRepo_tracerCarrier"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></g>
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"
>
<g
id=
"SVGRepo_iconCarrier"
>
<i
class=
"ri-search-line text-gray"
></i>
<path
d=
"M15 49A24 24 0 0 1 32 8"
></path>
</div>
<path
d=
"M49 15a24 24 0 0 1-17 41"
></path>
</div>
<polyline
points=
"15.03 40 15.03 48.97 8 48.97"
></polyline>
<polyline
points=
"48.97 24 48.97 15.03 56 15.03"
></polyline>
</g>
</svg>
Clear
</button>
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<button
type=
"button"
<i
class=
"ti ti-book fs-l"
></i>
class=
"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-45px m-0 shadow-md"
Help
data-hs-overlay=
"#evaluation-grouping-upload-modal"
</button>
(
click
)="
fileInput
.
value =
''
;
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
</div>
<i
class=
"ti ti-file-plus"
></i>
</div>
import
</div>
<div
class=
"ti-modal-body"
style=
"padding-top: 0px;"
>
<label
for=
"input-label"
class=
"ti-form-label mt-1rem"
>
รหัส *
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-1rem"
>
ชื่อเครื่องมือประเมิน (ไทย)*
</label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input w-full"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ชื่อเครื่องมือประเมิน (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input w-full"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ชื่อที่ใช้เเสดง *
</label>
<input
type=
"text"
id=
"showname"
class=
"ti-form-input w-full"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#evaluation-grouping-component-modal-add"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#evaluation-grouping-component-alert-modal"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"evaluation-grouping-component-modal-edit"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)]"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
เเก้ไขเครื่องมือประเมิน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#evaluation-grouping-component-modal-edit"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-center"
>
<div
class=
"flex justify-end"
style=
"padding-right: 1rem;"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
>
<svg
class=
"svg-indigo"
width=
"16"
height=
"16"
viewBox=
"0 0 64.00 64.00"
xmlns=
"http://www.w3.org/2000/svg"
fill=
"none"
stroke=
"#595BEA"
stroke-width=
"3.84"
transform=
"rotate(45)matrix(-1, 0, 0, 1, 0, 0)"
>
<g
id=
"SVGRepo_bgCarrier"
stroke-width=
"0"
></g>
<g
id=
"SVGRepo_tracerCarrier"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></g>
<g
id=
"SVGRepo_iconCarrier"
>
<path
d=
"M15 49A24 24 0 0 1 32 8"
></path>
<path
d=
"M49 15a24 24 0 0 1-17 41"
></path>
<polyline
points=
"15.03 40 15.03 48.97 8 48.97"
></polyline>
<polyline
points=
"48.97 24 48.97 15.03 56 15.03"
></polyline>
</g>
</svg>
Clear
</button>
</button>
</div>
</div>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
...
@@ -216,65 +30,121 @@
...
@@ -216,65 +30,121 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body"
style=
"padding-top: 0px;"
>
</div>
<label
for=
"input-label"
class=
"ti-form-label mt-1rem"
>
รหัส *
</label>
<div
class=
"page px-rem"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2 bg-input-readonly"
readonly
value=
"01"
>
<div
class=
"overflow-auto table-bordered rounded-t-md"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-1rem"
>
ชื่อเครื่องมือประเมิน (ไทย)*
</label>
<div
class=
"overflow-auto shadow-md"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input w-full"
value=
"แบบสังเกต"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ชื่อเครื่องมือประเมิน (อังกฤษ)
</label>
<thead>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input w-full"
value=
"แบบสังเกต"
>
<tr>
<label
for=
"detail_eng"
class=
"ti-form-label mt-1rem"
>
ชื่อที่ใช้เเสดง *
</label>
<ng-container
<input
type=
"text"
id=
"showname"
class=
"ti-form-input w-full"
value=
"O"
>
*
ngFor=
"let item of ['รหัส','ชื่อเครื่องมือประเมิน','Action']; let f = first; let l = last; let i = index"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<th
scope=
"col"
class=
"relative px-10px py-10px bg-soft-secondary text-primary"
<button
type=
"button"
[
class
.!
text-center
]="
f
||
l
"
>
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"
<span
class=
"text-sm"
>
{{ item }}
</span>
data-hs-overlay=
"#evaluation-grouping-component-modal-edit"
>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l&&!f"
>
ย้อนกลับ
<svg
class=
"head-table-icon"
xmlns=
"http://www.w3.org/2000/svg"
width=
"50"
</button>
height=
"16"
fill=
"currentColor"
viewBox=
"0 0 16 16"
>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<path
data-hs-overlay=
"#evaluation-grouping-component-alert-edit-modal"
>
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
>
บันทึกข้อมูล
</path>
</a>
</svg>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let item of pl.dataList;let i = index"
>
<td
style=
"font-size: 12px; padding-left: 4rem;"
>
{{item.data.plId}}
</td>
<td
style=
"font-size: 12px; padding-left: 1.5rem; width: 600px;"
>
{{item.data.tdesc}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectPl
(
item
.
data
);
onEdit=
true;onSendPathTitle()"
></i>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link !pl-0"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&¤tPage!=1&¤tPage!=2&¤tPage!=3"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
<ng-container
*
ngIf=
"(f||l)||(item==currentPage-1||item==currentPage||item==currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPage"
(
click
)="
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==page.length-2&¤tPage!=page.length&¤tPage!=page.length-1&¤tPage!=page.length-2"
>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
><i
class=
"ri-more-line"
></i>
</a>
</ng-container>
</li>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
currentPage =
(currentPage
>
page.length-1 ? currentPage: currentPage+1 )">
<i
class=
"ri-arrow-right-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<span>
Show {{((currentPage-1) * 10)+1}} to {{plListFilter().length
<10
?
plListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
plListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
plListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div
id=
"evaluation-grouping-upload-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"evaluation-grouping-component-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<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 h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"ti-modal-header bg-primary !rounded-none !rounded-t-sm"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content-alert w-full"
>
<h5
class=
"text-xxl font-bold text-white"
>
<div
class=
"ti-modal-header"
>
นำเข้ากลุ่มการประเมิน
<h3
class=
"text-xxl font-bold text-primary"
>
</h5>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#evaluation-grouping-component-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</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 "
>
<h1
class=
"mt-2"
style=
"text-align: center;"
>
ไฟล์
</h1>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<div
class=
"mt-2 p-2"
>
ยืนยันการลบข้อมูลหรือไม่!
<div
class=
"flex rounded-md"
>
</p>
<input
#
fileInput
id=
"fileInput"
type=
"file"
(
change
)="
onFileSelected
($
event
)"
hidden
>
<input
type=
"text"
[
value
]="
selectedFileName
"
readonly
(
click
)="
fileInput
.
click
()"
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
class=
"ti-form-input rounded-none ltr:rounded-l-md rtl:rounded-r-md focus:z-10 cursor-pointer"
>
<button
type=
"button"
<button
type=
"button"
(
click
)="
fileInput
.
click
()"
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=
"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"
>
data-hs-overlay=
"#evaluation-grouping-component-alert-delete-modal"
>
<i
class=
"ti ti-upload"
></i>
ย้อนกลับ
</button>
</button>
</div>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<div
class=
"flex justify-center mt-2rem "
>
data-hs-overlay=
"#evaluation-grouping-component-alert-delete-modal"
(
click
)="
addUser
();
showSuccessDelete
()"
>
<h1
class=
"cursor-pointer justify-center -mb-px inline-flex items-center gap-2 font-weight-500 font-size-12px
ลบข้อมูล
text-center text-secondary border-secondary border-b-2 align-items-end"
</a>
(
click
)="
downloadFile
()"
>
ดาวน์โหลดตัวอย่างไฟล์
</h1>
</div>
<div
class=
"flex justify-center mt-2rem mb-1rem space-x-4"
>
<button
type=
"submit"
class=
"ti-btn ti-btn-secondary"
data-hs-overlay=
"#evaluation-grouping-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
อัปโหลด
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-container>
</div>
<ng-container
*
ngIf=
"onEdit"
>
\ No newline at end of file
<app-edit-evaluation-grouping
[
pl
]="
pl
.
select
"
(
sendOnEdit
)="
onEdit=
$event;onSendPathTitle()"
></app-edit-evaluation-grouping>
</ng-container>
\ No newline at end of file
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/evaluation-grouping.component.scss
View file @
921acede
.button-clear
{
position
:
absolute
;
top
:
96px
;
z-index
:
1
;
right
:
41vw
;
}
.button-help
{
position
:
absolute
;
top
:
0px
;
z-index
:
1
;
right
:
0vw
;
margin
:
4
.2rem
;
margin-right
:
10px
;
/* เพิ่มใหม่ 12/16*/
}
table
.ti-custom-table
thead
{
height
:
60px
;
}
table
.ti-custom-table
thead
th
span
{
font-size
:
12px
;
font-weight
:
bold
;
}
.ti-custom-table
td
{
padding-left
:
0
.9rem
;
padding-right
:
1rem
;
}
.ti-custom-table
thead
th
:first-child
{
width
:
105px
;
/* ปรับความกว้างตามที่ต้องการ */
text-align
:
left
;
/* จัดตำแหน่งข้อความถ้าต้องการ */
}
.ti-custom-table
thead
th
:last-child
{
width
:
150px
;
/* ปรับความกว้างตามที่ต้องการ */
}
a
.custom-link
{
padding
:
10px
40px
;
/* ปรับ padding ให้เพิ่มขนาด */
}
/* สไตล์ของแถบเมนู */
.nav-tabs
{
display
:
flex
;
width
:
100%
;
cursor
:
pointer
;
margin-bottom
:
10px
;
height
:
20%
;
}
.nav-item
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link
{
text-decoration
:
none
;
padding
:
10px
20px
;
display
:
inline-block
;
font-size
:
large
;
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
#ccc
;
border-radius
:
5px
5px
0px
0px
;
}
.nav-link
:hover
{
background-color
:
#f0f0f0
;
/* เปลี่ยนสีเมื่อ hover */
}
.nav-link.active
{
color
:
#ffffff
;
/* สีตัวอักษรในสถานะ active */
font-size
:
large
;
border-bottom
:
3
.5px
solid
rgb
(
var
(
--
color-primary
));
/* เส้นใต้ */
background-color
:
rgb
(
var
(
--
color-primary
));
border-width
:
2px
2px
0px
2px
;
border-style
:
solid
;
border-color
:
rgb
(
var
(
--
color-primary
));
border-radius
:
5px
5px
0px
0px
;
}
.tab-content
{
margin-top
:
20px
;
}
.tab-pane.active
{
display
:
block
;
}
.nav-item-text
{
list-style
:
none
;
margin-right
:
10px
;
/* ช่องว่างระหว่างเมนู */
}
.nav-link-text
{
text-decoration
:
none
;
display
:
inline-block
;
font-size
:
large
;
color
:
#569bf5
;
border-bottom
:
2px
solid
#569bf5
;
line-height
:
0
.8
;
}
.ti-pagination
.page-link.active
{
background-color
:
#569bf5
;
color
:
white
;
border-radius
:
50%
;
padding
:
8px
12px
;
}
.box-body
{
padding
:
0rem
;
}
.page
{
min-height
:
0vh
;
}
.ti-modal-content-alert
{
width
:
35%
;
/* ความกว้างที่คุณต้องการ */
position
:
absolute
;
/* ทำให้สามารถจัดตำแหน่งได้ */
top
:
50%
;
/* ให้อยู่กลางในแนวตั้ง */
left
:
50%
;
/* ให้อยู่กลางในแนวนอน */
transform
:
translate
(
-50%
,
-50%
);
/* เคลื่อนที่ modal กลับมาให้ตรงกลาง */
background-color
:
#ffffff
;
}
.header-title-type
{
width
:
100%
;
min-height
:
50px
;
/* ใช้ min-height เพื่อให้มีความยืดหยุ่น */
// margin-top: 50px;
// margin-bottom: 10px;
justify-content
:
space-between
;
/* จัดเรียงองค์ประกอบภายใน */
align-items
:
center
;
/* จัดกลางแนวตั้ง */
padding-top
:
50px
;
padding-bottom
:
1rem
;
}
\ No newline at end of file
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/evaluation-grouping.component.ts
View file @
921acede
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
C
hangeDetectorRef
,
C
omponent
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
PLModel
,
MyPLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
@
Component
({
@
Component
({
selector
:
'app-evaluation-grouping'
,
selector
:
'app-evaluation-grouping'
,
templateUrl
:
'./evaluation-grouping.component.html'
,
templateUrl
:
'./evaluation-grouping.component.html'
,
styleUrls
:
[
'./evaluation-grouping.component.scss'
]
styleUrls
:
[
'./evaluation-grouping.component.scss'
]
})
})
export
class
EvaluationGroupingComponent
{
export
class
EvaluationGroupingComponent
{
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
'จัดกลุ่มประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
onEdit
=
false
activeTab
:
string
=
'tab1'
;
// กำหนด tab เริ่มต้น
isChecked
:
boolean
=
false
;
// ฟังก์ชันในการเปลี่ยนแท็บ
currentPage
=
1
changeTab
(
tab
:
{
id
:
string
,
text
:
string
})
{
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
this
.
sendPathTitle
.
emit
([
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
tab
.
text
]);
search
=
""
this
.
activeTab
=
tab
.
id
;
currentModal
:
'add'
|
'edit'
|
'delete'
|
'deleteGroup'
=
"add"
}
onEdit
(){
this
.
sendGroupShow
.
emit
(
'2'
);
}
toggleCheckbox
():
void
{
selectedFile
:
File
|
null
=
null
;
this
.
isChecked
=
!
this
.
isChecked
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
}
// การจัดการการเปิดปิด modal
numDataListChecked
=
0
modalOptions
:
{
isDataListChecked
=
false
[
nameModal
:
string
]:
{
isDataListCheckedAll
=
false
isModalOpen
:
boolean
;
modalSize
:
string
;
backdropClose
:
boolean
;
};
}
=
{
"add"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
},
"edit"
:
{
isModalOpen
:
false
,
modalSize
:
'm'
,
backdropClose
:
true
,
}
};
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
pl
:
{
loading
:
boolean
,
select
:
PLModel
,
dataList
:
{
check
:
boolean
,
data
:
PLModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyPLModel
(),
dataList
:
[]
}
this
.
modalOptions
[
name
].
modalSize
=
size
;
constructor
(
private
toastr
:
ToastrService
,
private
plService
:
PLService
,
private
cdr
:
ChangeDetectorRef
,
private
fileService
:
FileService
)
{
}
this
.
modalOptions
[
name
].
backdropClose
=
closeOnBackdrop
||
false
;
ngOnInit
():
void
{
this
.
modalOptions
[
name
].
isModalOpen
=
true
;
this
.
onSendPathTitle
()
this
.
currentModal
=
name
;
// ตั้งค่าค่าของ currentModal เป็น 'add' หรือ 'edit'
this
.
getPLList
()
document
.
body
.
style
.
overflow
=
'hidden'
;
}
onFileSelected
(
event
:
any
)
{
this
.
selectedFile
=
event
.
target
.
files
.
length
>
0
?
event
.
target
.
files
[
0
]
:
null
;
this
.
selectedFileName
=
this
.
selectedFile
?.
name
||
"กรุณาเลือกไฟล์"
}
}
closeModal
(
name
:
string
)
{
uploadFile
(
)
{
this
.
modalOptions
[
name
].
isModalOpen
=
false
;
if
(
!
this
.
selectedFile
)
{
if
(
!
this
.
isAnyModalOpen
())
{
alert
(
'กรุณาเลือกไฟล์ก่อนอัปโหลด'
)
document
.
body
.
style
.
overflow
=
''
;
// คืนค่าการ Scroll เฉพาะเมื่อ Modal ทั้งหมดปิดแล้ว
return
}
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
pl
.
loading
=
true
this
.
fileService
.
uploadExcel
(
formData
,
''
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
pl
.
loading
=
false
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pl
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pl
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
}
downloadFile
()
{
const
fileName
=
'.xlsx'
this
.
fileService
.
downloadTemplate
(
fileName
).
subscribe
({
next
:
response
=>
{
const
url
=
window
.
URL
.
createObjectURL
(
response
);
const
a
=
document
.
createElement
(
"a"
);
a
.
href
=
url
;
a
.
download
=
fileName
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
document
.
body
.
removeChild
(
a
);
window
.
URL
.
revokeObjectURL
(
url
);
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
}
})
isAnyModalOpen
():
boolean
{
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// ตรวจสอบว่า modal อื่นยังเปิดอยู่หรือไม่
}
}
getPLList
()
{
// ฟังก์ชันสำหรับการเพิ่ม ลบ หรือแก้ไข ข้อมูล
this
.
pl
.
loading
=
true
addUser
()
{
this
.
plService
.
getList
().
subscribe
({
// ฟังก์ชันสำหรับการเพิ่มผู้ใช้งาน
next
:
response
=>
{
console
.
log
(
'เพิ่มผู้ใช้งาน'
);
this
.
pl
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyPLModel
(
x
)
}))
this
.
pl
.
loading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
();
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
pl
.
loading
=
false
console
.
error
(
'Error fetching employee types:'
,
error
);
this
.
cdr
.
detectChanges
()
}
});
}
}
plListFilter
()
{
deleteUser
()
{
return
this
.
pl
.
dataList
.
filter
(
x
=>
{
// ฟังก์ชันสำหรับการลบผู้ใช้งาน
const
data
=
x
.
data
console
.
log
(
'ลบผู้ใช้งาน'
);
const
match
=
data
.
plId
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
());
return
match
;
});
}
}
selectPl
(
data
:
PLModel
)
{
editUser
()
{
this
.
pl
.
select
=
new
MyPLModel
(
data
)
// ฟังก์ชันสำหรับการแก้ไขผู้ใช้งาน
console
.
log
(
'แก้ไขผู้ใช้งาน'
);
}
}
currentModal
=
""
searchChange
()
{
constructor
(
private
toastr
:
ToastrService
)
{
}
this
.
currentPage
=
1
showSuccess
()
{
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
this
.
plListFilter
().
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
)
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
this
.
dataListCheck
();
timeOut
:
3000
,
this
.
cdr
.
detectChanges
()
positionClass
:
'toast-top-right'
,
});
}
}
showSuccessEdit
()
{
dataListCheckAll
()
{
this
.
toastr
.
success
(
'เเก้ไขข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
const
selectAll
=
this
.
isDataListCheckedAll
;
timeOut
:
3000
,
this
.
plListFilter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
positionClass
:
'toast-top-right'
,
this
.
dataListCheck
();
});
}
dataListCheck
()
{
const
dataCheck
=
this
.
plListFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
pl
.
dataList
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
showSuccessDelete
()
{
onSendPathTitle
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'เเจ้งเตือน'
,
{
if
(
this
.
onEdit
)
{
this
.
sendPathTitle
.
emit
([
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
'จัดกลุ่มประเมิน'
,
'แก้ไขกลุ่มการประเมิน'
]);
}
else
if
(
!
this
.
onEdit
)
{
this
.
sendPathTitle
.
emit
([
'การประเมินจัดการประสิทธิภาพ'
,
'การจัดการประเมิน'
,
'จัดกลุ่มประเมิน'
]);
}
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
positionClass
:
'toast-top-right'
,
})
;
})
}
}
}
}
src/app/shared/model/pms-group-assessment.model.ts
0 → 100644
View file @
921acede
import
{
MyPLModel
,
PLModel
}
from
"./pl.model"
import
{
MyPmsGroupAssessment1Model
,
PmsGroupAssessment1Model
}
from
"./pms-group-assessment1.model"
export
interface
PmsGroupAssessmentModel
{
personalLevel
:
PLModel
companyId
:
string
pmsGroupAssessment1List
:
PmsGroupAssessment1Model
[]
}
export
class
MyPmsGroupAssessmentModel
implements
PmsGroupAssessmentModel
{
personalLevel
:
PLModel
companyId
:
string
pmsGroupAssessment1List
:
PmsGroupAssessment1Model
[]
constructor
(
data
?:
Partial
<
PmsGroupAssessmentModel
>
)
{
this
.
personalLevel
=
new
MyPLModel
(
data
?.
personalLevel
)
this
.
companyId
=
data
?.
companyId
||
""
this
.
pmsGroupAssessment1List
=
data
?.
pmsGroupAssessment1List
?.
map
(
x
=>
new
MyPmsGroupAssessment1Model
(
x
))
||
[]
}
}
src/app/shared/model/pms-group-assessment1.model.ts
0 → 100644
View file @
921acede
import
{
MyPmstopicModel
,
PmstopicModel
}
from
"./pmstopic.model"
export
interface
PmsGroupAssessment1Model
{
companyId
:
string
pmsTopic
:
PmstopicModel
}
export
class
MyPmsGroupAssessment1Model
implements
PmsGroupAssessment1Model
{
companyId
:
string
pmsTopic
:
PmstopicModel
constructor
(
data
?:
Partial
<
PmsGroupAssessment1Model
>
)
{
this
.
companyId
=
data
?.
companyId
||
""
this
.
pmsTopic
=
new
MyPmstopicModel
(
data
?.
pmsTopic
)
}
}
src/app/shared/services/http-request.interceptor.ts
View file @
921acede
...
@@ -16,7 +16,7 @@ export class HttpRequestInterceptor {
...
@@ -16,7 +16,7 @@ export class HttpRequestInterceptor {
private
refreshTokenSubject
:
BehaviorSubject
<
string
|
null
>
=
new
BehaviorSubject
<
string
|
null
>
(
null
);
private
refreshTokenSubject
:
BehaviorSubject
<
string
|
null
>
=
new
BehaviorSubject
<
string
|
null
>
(
null
);
private
responseCache
=
new
Map
<
string
,
any
>
();
// ใช้เก็บ cache ของ response
private
responseCache
=
new
Map
<
string
,
any
>
();
// ใช้เก็บ cache ของ response
constructor
(
private
authService
:
AuthService
)
{}
constructor
(
private
authService
:
AuthService
)
{
}
// intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
// intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
// if (req.url.startsWith("./") || !sessionStorage.getItem("accessToken")) {
// if (req.url.startsWith("./") || !sessionStorage.getItem("accessToken")) {
...
@@ -36,7 +36,7 @@ export class HttpRequestInterceptor {
...
@@ -36,7 +36,7 @@ export class HttpRequestInterceptor {
// }
// }
intercept
(
req
:
HttpRequest
<
any
>
,
next
:
HttpHandler
):
Observable
<
HttpEvent
<
any
>>
{
intercept
(
req
:
HttpRequest
<
any
>
,
next
:
HttpHandler
):
Observable
<
HttpEvent
<
any
>>
{
if
(
req
.
url
.
includes
(
'/api/auth
en/refresh-token'
)
||
req
.
url
.
startsWith
(
'./'
)
||
!
sessionStorage
.
getItem
(
'accessToken'
))
{
if
(
req
.
url
.
includes
(
'/api/auth
/refresh-token'
)
||
req
.
url
.
startsWith
(
'./'
)
||
!
sessionStorage
.
getItem
(
'accessToken'
))
{
return
next
.
handle
(
req
);
return
next
.
handle
(
req
);
}
}
const
authHeader
=
'Bearer '
+
sessionStorage
.
getItem
(
'accessToken'
);
const
authHeader
=
'Bearer '
+
sessionStorage
.
getItem
(
'accessToken'
);
...
...
src/app/shared/services/pms-group-assessment.service.ts
0 → 100644
View file @
921acede
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
PLModel
}
from
'../model/pl.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
import
{
PmsGroupAssessmentModel
}
from
'../model/pms-group-assessment.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
PmsGroupAssessmentService
{
api
=
"/pms-group-assessment"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getBy_plId
(
plId
:
string
):
Observable
<
PmsGroupAssessmentModel
>
{
return
this
.
http
.
get
<
PmsGroupAssessmentModel
>
(
this
.
urlApi
+
"/"
+
plId
)
}
getList
():
Observable
<
PmsGroupAssessmentModel
[]
>
{
return
this
.
http
.
get
<
PmsGroupAssessmentModel
[]
>
(
this
.
urlApi
+
"/lists"
)
}
post
(
body
:
PmsGroupAssessmentModel
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
PmsGroupAssessmentModel
|
PmsGroupAssessmentModel
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
\ No newline at end of file
src/assets/css/style.css
View file @
921acede
...
@@ -24915,4 +24915,8 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
...
@@ -24915,4 +24915,8 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
.rounded-t-none
{
.rounded-t-none
{
border-top-left-radius
:
0rem
;
border-top-left-radius
:
0rem
;
border-top-right-radius
:
0rem
;
border-top-right-radius
:
0rem
;
}
.masked-input
{
-webkit-text-security
:
disc
;
/* Safari, Chrome */
}
}
\ No newline at end of file
src/assets/template/IMPORT_COMPETENCY_TOPIC.xlsx
View file @
921acede
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment