Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mySkill-x
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
mySkill-x
Commits
bd3515dc
Commit
bd3515dc
authored
Mar 21, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DEV' of
https://mygit.myhr.co.th/angular/myAppraisal
into DEV
parents
1671ea1d
0b1de934
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
1372 additions
and
1185 deletions
+1372
-1185
role-permission-config.component.html
...e-permission-config/role-permission-config.component.html
+6
-6
role-permission-config.component.ts
...ole-permission-config/role-permission-config.component.ts
+1
-1
department-list.component.html
...iness-unit/department-list/department-list.component.html
+16
-10
department-list.component.ts
...usiness-unit/department-list/department-list.component.ts
+4
-0
department-register.component.html
...it/department-register/department-register.component.html
+17
-9
department-register.component.ts
...unit/department-register/department-register.component.ts
+4
-0
section-registration.component.html
.../section-registration/section-registration.component.html
+18
-10
section-registration.component.ts
...it/section-registration/section-registration.component.ts
+4
-0
sub-department-four.component.html
...it/sub-department-four/sub-department-four.component.html
+18
-10
sub-department-four.component.ts
...unit/sub-department-four/sub-department-four.component.ts
+4
-0
sub-department-one.component.html
...unit/sub-department-one/sub-department-one.component.html
+18
-10
sub-department-one.component.ts
...s-unit/sub-department-one/sub-department-one.component.ts
+5
-0
sub-department-three.component.html
.../sub-department-three/sub-department-three.component.html
+23
-15
sub-department-three.component.ts
...it/sub-department-three/sub-department-three.component.ts
+4
-0
sub-department-two.component.html
...unit/sub-department-two/sub-department-two.component.html
+18
-10
sub-department-two.component.ts
...s-unit/sub-department-two/sub-department-two.component.ts
+4
-0
company-registration-page.component.html
...egistration-page/company-registration-page.component.html
+9
-4
company-registration-page.component.ts
...-registration-page/company-registration-page.component.ts
+4
-0
employee-categories.component.html
...on/employee-categories/employee-categories.component.html
+12
-5
employee-categories.component.ts
...tion/employee-categories/employee-categories.component.ts
+4
-0
employee-group-unit.component.html
...on/employee-group-unit/employee-group-unit.component.html
+12
-5
employee-group-unit.component.ts
...tion/employee-group-unit/employee-group-unit.component.ts
+4
-0
employee-level.component.html
...-description/employee-level/employee-level.component.html
+18
-11
employee-level.component.ts
...ob-description/employee-level/employee-level.component.ts
+5
-0
position-unit.component.html
...nts/job-description/position/position-unit.component.html
+11
-5
position-unit.component.ts
...nents/job-description/position/position-unit.component.ts
+4
-0
edit-group-indicators.component.html
...dit-group-indicators/edit-group-indicators.component.html
+24
-137
edit-group-indicators.component.ts
.../edit-group-indicators/edit-group-indicators.component.ts
+2
-1
indicators-and-curriculum.component.html
...s-and-curriculum/indicators-and-curriculum.component.html
+5
-40
indicators-and-curriculum.component.ts
...ors-and-curriculum/indicators-and-curriculum.component.ts
+1
-1
set-approvers.component.html
...ncy-management/set-approvers/set-approvers.component.html
+2
-2
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+21
-14
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+0
-2
grade-management.component.html
...stration/grade-management/grade-management.component.html
+2
-2
type-registration.component.ts
...stration/type-registration/type-registration.component.ts
+2
-3
competency-configuration.component.ts
...tency-configuration/competency-configuration.component.ts
+1
-9
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+4
-0
evaluation.component.html
...rformance-evaluation/evaluation/evaluation.component.html
+47
-19
evaluation.component.ts
...performance-evaluation/evaluation/evaluation.component.ts
+56
-21
idp-evalution.component.ts
...ance-evaluation/idp-evaluation/idp-evalution.component.ts
+21
-13
self-evaluation.component.html
...evaluation/self-evaluation/self-evaluation.component.html
+2
-2
supervisor-evaluation.component.html
...upervisor-evaluation/supervisor-evaluation.component.html
+6
-4
evaluation-grouping.component.html
...nt/evaluation-grouping/evaluation-grouping.component.html
+2
-2
management-evaluation-cycle.component.ts
...evaluation-cycle/management-evaluation-cycle.component.ts
+0
-8
assessment-topics.component.html
...omance/assessment-topics/assessment-topics.component.html
+2
-2
pms-grade-management.component.html
.../pms-grade-management/pms-grade-management.component.html
+2
-2
assessment-system-configuration.component.html
...figuration/assessment-system-configuration.component.html
+2
-2
assessment-system-configuration.component.ts
...onfiguration/assessment-system-configuration.component.ts
+0
-8
time-attendance-manage.component.html
...e-attendance-manage/time-attendance-manage.component.html
+573
-0
time-attendance-manage.component.scss
...e-attendance-manage/time-attendance-manage.component.scss
+0
-0
time-attendance-manage.component.ts
...ime-attendance-manage/time-attendance-manage.component.ts
+189
-0
time-attendance-statistics.component.html
...ance-statistics/time-attendance-statistics.component.html
+35
-0
time-attendance-statistics.component.scss
...ance-statistics/time-attendance-statistics.component.scss
+0
-0
time-attendance-statistics.component.ts
...ndance-statistics/time-attendance-statistics.component.ts
+73
-0
time-attendance.component.html
...evaluation/time-attendance/time-attendance.component.html
+11
-579
time-attendance.component.ts
...t-evaluation/time-attendance/time-attendance.component.ts
+2
-180
sidebar.component.ts
src/app/shared/components/sidebar/sidebar.component.ts
+29
-20
appraisal-competency.model.ts
src/app/shared/model/appraisal-competency.model.ts
+1
-0
appraisal-subordinate.model.ts
src/app/shared/model/appraisal-subordinate.model.ts
+2
-0
idp-form.model.ts
src/app/shared/model/idp-form.model.ts
+1
-0
style.css
src/assets/css/style.css
+5
-1
IMPORT_PMS_WORKING_TIME_EMP.xlsx
src/assets/template/IMPORT_PMS_WORKING_TIME_EMP.xlsx
+0
-0
No files found.
src/app/components/company-components/account-settings/role-permission-config/role-permission-config.component.html
View file @
bd3515dc
...
@@ -248,11 +248,11 @@
...
@@ -248,11 +248,11 @@
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"currentModal == 'delete'"
>
<ng-container
*
ngIf=
"currentModal == 'delete'"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
!
</ng-container>
!
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -276,7 +276,7 @@
...
@@ -276,7 +276,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=
"#role-permission-config-alert-modal"
data-hs-overlay=
"#role-permission-config-alert-modal"
(
click
)="
updateConfigPermission
('
delete
')"
*
ngIf=
"numDataListChecked"
>
(
click
)="
updateConfigPermission
('
delete
')"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/company-components/account-settings/role-permission-config/role-permission-config.component.ts
View file @
bd3515dc
...
@@ -94,7 +94,7 @@ export class RolePermissionConfigComponent {
...
@@ -94,7 +94,7 @@ export class RolePermissionConfigComponent {
}
}
})
})
this
.
configPermission
.
select
.
menuBody
.
forEach
(
x
=>
{
this
.
configPermission
.
select
.
menuBody
.
forEach
(
x
=>
{
this
.
menuItemsShow
.
set
(
x
.
path
+
x
.
title
,
tru
e
)
this
.
menuItemsShow
.
set
(
x
.
path
+
x
.
title
,
fals
e
)
})
})
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.html
View file @
bd3515dc
...
@@ -196,9 +196,14 @@
...
@@ -196,9 +196,14 @@
readonly
[
value
]="
bu1
.
tdesc
"
>
readonly
[
value
]="
bu1
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
เเผนก
<span
class=
"text-danger"
>
*
</span></label>
<label
class=
"ti-form-label mt-2rem"
>
เเผนก
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"currentModal=='add'&&checkPrimary()"
>
เเผนกซ้ำ
</ng-container>
</span></label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu2
.
bu2id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[
class
.!
border-red
]="
currentModal=
='add'&&checkPrimary()"
[(
ngModel
)]="
bu2
.
bu2id
"
>
</div>
</div>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดแผนก (ไทย)
<span
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดแผนก (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
class=
"text-danger"
>
*
</span></label>
...
@@ -212,8 +217,8 @@
...
@@ -212,8 +217,8 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
class=
"ti-btn ti-btn-success"
type=
"button"
data-hs-overlay=
"#department-list-alert-modal"
<button
class=
"ti-btn ti-btn-success"
type=
"button"
data-hs-overlay=
"#department-list-alert-modal"
[
class
.
ti-btn-disabled
]="!
bu1
.
bu1id
||!
bu2
.
bu2id
||!
bu2
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
bu1
.
bu1id
||!
bu2
.
bu2id
||!
bu2
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
[
disabled
]="!
bu1
.
bu1id
||!
bu2
.
bu2id
||!
bu2
.
tdesc
"
>
[
disabled
]="!
bu1
.
bu1id
||!
bu2
.
bu2id
||!
bu2
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -517,11 +522,11 @@
...
@@ -517,11 +522,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
!
</ng-container>
!
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -531,7 +536,8 @@
...
@@ -531,7 +536,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#department-list-alert-delete-modal"
(
click
)="
deleteBu2
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#department-list-alert-delete-modal"
(
click
)="
deleteBu2
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.ts
View file @
bd3515dc
...
@@ -244,5 +244,9 @@ export class DepartmentListComponent implements OnInit {
...
@@ -244,5 +244,9 @@ export class DepartmentListComponent implements OnInit {
this
.
numDataListChecked
=
this
.
bu2List
.
filter
(
x
=>
x
.
check
).
length
this
.
numDataListChecked
=
this
.
bu2List
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu2List
.
find
(
x
=>
x
.
data
.
bu2id
==
this
.
bu2
.
bu2id
)
}
}
}
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.html
View file @
bd3515dc
...
@@ -172,8 +172,15 @@
...
@@ -172,8 +172,15 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<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"
>
ฝ่าย
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
bu1
.
bu1id
"
>
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"checkPrimary()"
>
ฝ่ายซ้ำ
</ng-container>
</span>
</label>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-1/2"
[
class
.!
border-red
]="
checkPrimary
()"
[(
ngModel
)]="
bu1
.
bu1id
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)
<span
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดฝ่าย (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu1
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu1
.
tdesc
"
>
...
@@ -187,7 +194,8 @@
...
@@ -187,7 +194,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#department-register-alert-modal"
data-hs-overlay=
"#department-register-alert-modal"
[
class
.
ti-btn-disabled
]="!
bu1
.
bu1id
||!
bu1
.
tdesc
"
[
disabled
]="!
bu1
.
bu1id
||!
bu1
.
tdesc
"
>
[
class
.
ti-btn-disabled
]="!
bu1
.
bu1id
||!
bu1
.
tdesc
||
checkPrimary
()"
[
disabled
]="!
bu1
.
bu1id
||!
bu1
.
tdesc
||
checkPrimary
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -319,11 +327,11 @@
...
@@ -319,11 +327,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -333,7 +341,7 @@
...
@@ -333,7 +341,7 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-danger"
(
click
)="
deleteBu1
()"
<button
type=
"button"
class=
"ti-btn ti-btn-danger"
(
click
)="
deleteBu1
()"
data-hs-overlay=
"#department-register-delete-alert-modal"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#department-register-delete-alert-modal"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</button>
</button>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.ts
View file @
bd3515dc
...
@@ -170,4 +170,8 @@ export class DepartmentRegisterComponent implements OnInit {
...
@@ -170,4 +170,8 @@ export class DepartmentRegisterComponent implements OnInit {
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu1List
.
find
(
x
=>
x
.
data
.
bu1id
==
this
.
bu1
.
bu1id
)
}
}
}
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.html
View file @
bd3515dc
...
@@ -197,9 +197,16 @@
...
@@ -197,9 +197,16 @@
readonly
[
value
]="
bu2
.
tdesc
"
>
readonly
[
value
]="
bu2
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ส่วน
<span
class=
"text-danger"
>
*
</span></label>
<label
class=
"ti-form-label mt-2rem"
>
ส่วน
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"currentModal=='add'&&checkPrimary()"
>
ส่วนซ้ำ
</ng-container>
</span>
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu3
.
bu3id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[
class
.!
border-red
]="
currentModal=
='add'&&checkPrimary()"
[(
ngModel
)]="
bu3
.
bu3id
"
>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
...
@@ -228,8 +235,8 @@
...
@@ -228,8 +235,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#section-registration-alert-modal"
data-hs-overlay=
"#section-registration-alert-modal"
[
class
.
ti-btn-disabled
]="!
bu2
.
bu2id
||!
bu3
.
bu3id
||!
bu3
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
bu2
.
bu2id
||!
bu3
.
bu3id
||!
bu3
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
[
disabled
]="!
bu2
.
bu2id
||!
bu3
.
bu3id
||!
bu3
.
tdesc
"
>
[
disabled
]="!
bu2
.
bu2id
||!
bu3
.
bu3id
||!
bu3
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -535,11 +542,11 @@
...
@@ -535,11 +542,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
!
</ng-container>
!
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -549,7 +556,8 @@
...
@@ -549,7 +556,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#section-registration-alert-delete-modal"
(
click
)="
deleteBu3
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#section-registration-alert-delete-modal"
(
click
)="
deleteBu3
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.ts
View file @
bd3515dc
...
@@ -242,5 +242,9 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -242,5 +242,9 @@ export class SectionRegistrationComponent implements OnInit {
this
.
numDataListChecked
=
this
.
bu3List
.
filter
(
x
=>
x
.
check
).
length
this
.
numDataListChecked
=
this
.
bu3List
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu3List
.
find
(
x
=>
x
.
data
.
bu3id
==
this
.
bu3
.
bu3id
)
}
}
}
src/app/components/company-components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.html
View file @
bd3515dc
...
@@ -196,9 +196,16 @@
...
@@ -196,9 +196,16 @@
readonly
[
value
]="
bu6
.
tdesc
"
>
readonly
[
value
]="
bu6
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย4
<span
class=
"text-danger"
>
*
</span></label>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย4
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"currentModal=='add'&&checkPrimary()"
>
ส่วนย่อย4ซ้ำ
</ng-container>
</span>
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu7
.
bu7id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[
class
.!
border-red
]="
currentModal=
='add'&&checkPrimary()"
[(
ngModel
)]="
bu7
.
bu7id
"
>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
...
@@ -227,8 +234,8 @@
...
@@ -227,8 +234,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#sub-department-four-alert-add-modal"
data-hs-overlay=
"#sub-department-four-alert-add-modal"
[
class
.
ti-btn-disabled
]="!
bu6
.
bu6id
||!
bu7
.
bu7id
||!
bu7
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
bu6
.
bu6id
||!
bu7
.
bu7id
||!
bu7
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
[
disabled
]="
!
bu6
.
bu6id
||!
bu7
.
bu7id
||!
bu7
.
tdesc
"
>
[
disabled
]="
!
bu6
.
bu6id
||!
bu7
.
bu7id
||!
bu7
.
tdesc
||(
currentModal=
='add'
&&
checkPrimary
())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -534,11 +541,11 @@
...
@@ -534,11 +541,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -548,7 +555,8 @@
...
@@ -548,7 +555,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#sub-department-four-alert-delete-modal"
(
click
)="
deleteBu7
();"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#sub-department-four-alert-delete-modal"
(
click
)="
deleteBu7
();"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.ts
View file @
bd3515dc
...
@@ -238,6 +238,10 @@ export class SubDepartmentFourComponent implements OnInit {
...
@@ -238,6 +238,10 @@ export class SubDepartmentFourComponent implements OnInit {
this
.
numDataListChecked
=
this
.
bu7List
.
filter
(
x
=>
x
.
check
).
length
this
.
numDataListChecked
=
this
.
bu7List
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu7List
.
find
(
x
=>
x
.
data
.
bu7id
==
this
.
bu7
.
bu7id
)
}
}
}
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.html
View file @
bd3515dc
...
@@ -198,9 +198,16 @@
...
@@ -198,9 +198,16 @@
readonly
[
value
]="
bu3
.
tdesc
"
>
readonly
[
value
]="
bu3
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย1
<span
class=
"text-danger"
>
*
</span></label>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย1
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"currentModal=='add'&&checkPrimary()"
>
ส่วนย่อย1ซ้ำ
</ng-container>
</span>
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
bu4id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[
class
.!
border-red
]="
currentModal=
='add'&&checkPrimary()"
[(
ngModel
)]="
bu4
.
bu4id
"
>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
...
@@ -229,8 +236,8 @@
...
@@ -229,8 +236,8 @@
</button>
</button>
<button
class=
"ti-btn ti-btn-success"
type=
"button"
<button
class=
"ti-btn ti-btn-success"
type=
"button"
data-hs-overlay=
"#sub-department-one-alert-modal"
data-hs-overlay=
"#sub-department-one-alert-modal"
[
class
.
ti-btn-disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
[
disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
"
>
[
disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -542,11 +549,11 @@
...
@@ -542,11 +549,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -556,7 +563,8 @@
...
@@ -556,7 +563,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#sub-department-one-alert-delete-modal"
(
click
)="
deleteBu4
();"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#sub-department-one-alert-delete-modal"
(
click
)="
deleteBu4
();"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.ts
View file @
bd3515dc
...
@@ -236,6 +236,11 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -236,6 +236,11 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
numDataListChecked
=
this
.
bu4List
.
filter
(
x
=>
x
.
check
).
length
this
.
numDataListChecked
=
this
.
bu4List
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu4List
.
find
(
x
=>
x
.
data
.
bu4id
==
this
.
bu4
.
bu4id
)
}
}
}
src/app/components/company-components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.html
View file @
bd3515dc
...
@@ -123,9 +123,9 @@
...
@@ -123,9 +123,9 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<app-pagination
[
totalItems
]="
filterBu
5Modal
().
length
"
[
pageSize
]="
bu5Modal
.
pageSize
"
<app-pagination
[
totalItems
]="
filterBu
6Table
().
length
"
[
pageSize
]="
bu6Table
.
pageSize
"
(
pageChange
)="
bu
5Modal
.
currentPage =
$event"
(
pageChange
)="
bu
6Table
.
currentPage =
$event"
(
pageSizeChange
)="
bu
5Modal
.
pageSize =
$event;bu5Modal
.currentPage
=
1
"
></app-pagination>
(
pageSizeChange
)="
bu
6Table
.
pageSize =
$event;bu6Table
.currentPage
=
1
"
></app-pagination>
</div>
</div>
...
@@ -196,9 +196,16 @@
...
@@ -196,9 +196,16 @@
readonly
[
value
]="
bu5
.
tdesc
"
>
readonly
[
value
]="
bu5
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย3
<span
class=
"text-danger"
>
*
</span></label>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย3
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"currentModal=='add'&&checkPrimary()"
>
ส่วนย่อย3ซ้ำ
</ng-container>
</span>
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu6
.
bu6id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[
class
.!
border-red
]="
currentModal=
='add'&&checkPrimary()"
[(
ngModel
)]="
bu6
.
bu6id
"
>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
...
@@ -227,8 +234,8 @@
...
@@ -227,8 +234,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#sub-department-three-alert-add-modal"
data-hs-overlay=
"#sub-department-three-alert-add-modal"
[
class
.
ti-btn-disabled
]="!
bu5
.
bu5id
||!
bu6
.
bu6id
||!
bu6
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
bu5
.
bu5id
||!
bu6
.
bu6id
||!
bu6
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
[
disabled
]="!
bu5
.
bu5id
||!
bu6
.
bu6id
||!
bu6
.
tdesc
"
>
[
disabled
]="!
bu5
.
bu5id
||!
bu6
.
bu6id
||!
bu6
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -305,8 +312,8 @@
...
@@ -305,8 +312,8 @@
readonly
[
value
]="
bu5
.
tdesc
"
>
readonly
[
value
]="
bu5
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย3
<span
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย3
class=
"text-danger"
>
*
</span>
</label>
</label>
<div
class=
"sm:grid grid-cols-2 gap-1"
>
<div
class=
"sm:grid grid-cols-2 gap-1"
>
<div
class=
"relative w-full"
>
<div
class=
"relative w-full"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
...
@@ -559,11 +566,11 @@
...
@@ -559,11 +566,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -573,7 +580,8 @@
...
@@ -573,7 +580,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#sub-department-three-alert-delete-modal"
(
click
)="
deleteBu6
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#sub-department-three-alert-delete-modal"
(
click
)="
deleteBu6
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.ts
View file @
bd3515dc
...
@@ -238,6 +238,10 @@ export class SubDepartmentThreeComponent implements OnInit {
...
@@ -238,6 +238,10 @@ export class SubDepartmentThreeComponent implements OnInit {
this
.
numDataListChecked
=
this
.
bu6List
.
filter
(
x
=>
x
.
check
).
length
this
.
numDataListChecked
=
this
.
bu6List
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu6List
.
find
(
x
=>
x
.
data
.
bu6id
==
this
.
bu6
.
bu6id
)
}
}
}
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.html
View file @
bd3515dc
...
@@ -196,9 +196,16 @@
...
@@ -196,9 +196,16 @@
readonly
[
value
]="
bu4
.
tdesc
"
>
readonly
[
value
]="
bu4
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย2
<span
class=
"text-danger"
>
*
</span></label>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย2
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"currentModal=='add'&&checkPrimary()"
>
ส่วนย่อย2ซ้ำ
</ng-container>
</span>
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu5
.
bu5id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[
class
.!
border-red
]="
currentModal=
='add'&&checkPrimary()"
[(
ngModel
)]="
bu5
.
bu5id
"
>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
name="hs-leading-button-add-on-with-icon-and-button"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
...
@@ -227,8 +234,8 @@
...
@@ -227,8 +234,8 @@
</button>
</button>
<button
class=
"ti-btn ti-btn-success"
type=
"button"
<button
class=
"ti-btn ti-btn-success"
type=
"button"
data-hs-overlay=
"#sub-department-two-alert-add-modal"
data-hs-overlay=
"#sub-department-two-alert-add-modal"
[
class
.
ti-btn-disabled
]="!
bu4
.
bu4id
||!
bu5
.
bu5id
||!
bu5
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
bu4
.
bu4id
||!
bu5
.
bu5id
||!
bu5
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
[
disabled
]="!
bu4
.
bu4id
||!
bu5
.
bu5id
||!
bu5
.
tdesc
"
>
[
disabled
]="!
bu4
.
bu4id
||!
bu5
.
bu5id
||!
bu5
.
tdesc
||(
currentModal=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -556,11 +563,11 @@
...
@@ -556,11 +563,11 @@
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
...
@@ -570,7 +577,8 @@
...
@@ -570,7 +577,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#sub-department-two-alert-delete-modal"
(
click
)="
deleteBu5
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#sub-department-two-alert-delete-modal"
(
click
)="
deleteBu5
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</div>
</div>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.ts
View file @
bd3515dc
...
@@ -238,5 +238,9 @@ export class SubDepartmentTwoComponent implements OnInit {
...
@@ -238,5 +238,9 @@ export class SubDepartmentTwoComponent implements OnInit {
this
.
numDataListChecked
=
this
.
bu5List
.
filter
(
x
=>
x
.
check
).
length
this
.
numDataListChecked
=
this
.
bu5List
.
filter
(
x
=>
x
.
check
).
length
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
}
checkPrimary
()
{
return
this
.
bu5List
.
find
(
x
=>
x
.
data
.
bu5id
==
this
.
bu5
.
bu5id
)
}
}
}
src/app/components/company-components/company-registration/company-registration-page/company-registration-page.component.html
View file @
bd3515dc
...
@@ -169,9 +169,14 @@
...
@@ -169,9 +169,14 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัสบริษัท
<span
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัสบริษัท
<span
class=
"text-danger"
>
class=
"text-danger"
>
*
</span></label>
*
<ng-container
*
ngIf=
"modalStatus=='add'&&checkPrimary()"
>
รหัสบริษัทซ้ำ
</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"
[
class
.!
border-red
]="
modalStatus=
='add'&&checkPrimary()"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
code
"
[
maxLength
]="
5
"
>
[(
ngModel
)]="
dataSelect
.
code
"
[
maxLength
]="
5
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (ไทย)
<span
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (ไทย)
<span
...
@@ -191,8 +196,8 @@
...
@@ -191,8 +196,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#company-registration-page-alert-modal"
data-hs-overlay=
"#company-registration-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
code
||!
dataSelect
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
code
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
[
disabled
]="!
dataSelect
.
code
||!
dataSelect
.
tdesc
"
>
[
disabled
]="!
dataSelect
.
code
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
...
src/app/components/company-components/company-registration/company-registration-page/company-registration-page.component.ts
View file @
bd3515dc
...
@@ -200,4 +200,8 @@ export class CompanyRegistrationPageComponent {
...
@@ -200,4 +200,8 @@ export class CompanyRegistrationPageComponent {
this
.
setData
({
code
:
this
.
dataSelect
.
code
,
tdesc
:
""
,
edesc
:
""
,
address
:
""
,
contact
:
""
})
this
.
setData
({
code
:
this
.
dataSelect
.
code
,
tdesc
:
""
,
edesc
:
""
,
address
:
""
,
contact
:
""
})
}
}
}
}
checkPrimary
()
{
return
this
.
dataList
.
find
(
x
=>
x
.
data
.
code
==
this
.
dataSelect
.
code
)
}
}
}
src/app/components/company-components/job-description/employee-categories/employee-categories.component.html
View file @
bd3515dc
...
@@ -171,9 +171,15 @@
...
@@ -171,9 +171,15 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body"
style=
"margin-top: 40px;"
>
<div
class=
"ti-modal-body"
style=
"margin-top: 40px;"
>
<label
for=
"input-label"
class=
"ti-form-label"
>
รหัสประเภทพนักงาน
<span
<label
for=
"input-label"
class=
"ti-form-label"
>
รหัสประเภทพนักงาน
class=
"text-danger"
>
*
</span></label>
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"modalStatus=='add'&&checkPrimary()"
>
รหัสประเภทพนักงานซ้ำ
</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"
[
class
.!
border-red
]="
modalStatus=
='add'&&checkPrimary()"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
codeId
"
>
[(
ngModel
)]="
dataSelect
.
codeId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดประเภทพนักงาน (ไทย)
<span
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดประเภทพนักงาน (ไทย)
<span
...
@@ -189,8 +195,8 @@
...
@@ -189,8 +195,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#employee-categories-page-alert-modal"
data-hs-overlay=
"#employee-categories-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
codeId
||!
dataSelect
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
codeId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
[
disabled
]="!
dataSelect
.
codeId
||!
dataSelect
.
tdesc
"
>
[
disabled
]="!
dataSelect
.
codeId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -257,7 +263,8 @@
...
@@ -257,7 +263,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#employee-categories-page-alert-modal"
(
click
)="
deleteEmp_type
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#employee-categories-page-alert-modal"
(
click
)="
deleteEmp_type
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/company-components/job-description/employee-categories/employee-categories.component.ts
View file @
bd3515dc
...
@@ -207,4 +207,8 @@ export class EmployeeCategories {
...
@@ -207,4 +207,8 @@ export class EmployeeCategories {
this
.
dataSelect
.
edesc
=
''
this
.
dataSelect
.
edesc
=
''
}
}
}
}
checkPrimary
()
{
return
this
.
emp_typelist
.
find
(
x
=>
x
.
data
.
codeId
==
this
.
dataSelect
.
codeId
)
}
}
}
src/app/components/company-components/job-description/employee-group-unit/employee-group-unit.component.html
View file @
bd3515dc
...
@@ -168,9 +168,16 @@
...
@@ -168,9 +168,16 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัสกลุ่มพนักงาน
<span
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัสกลุ่มพนักงาน
class=
"text-danger"
>
*
</span></label>
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"modalStatus=='add'&&checkPrimary()"
>
รหัสกลุ่มพนักงานซ้ำ
</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"
[
class
.!
border-red
]="
modalStatus=
='add'&&checkPrimary()"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}"
[
readonly
]="
modalStatus=
='edit'"
[(
ngModel
)]="
dataSelect
.
groupId
"
>
[(
ngModel
)]="
dataSelect
.
groupId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดกลุ่มพนักงาน (ไทย)
<span
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดกลุ่มพนักงาน (ไทย)
<span
...
@@ -186,8 +193,8 @@
...
@@ -186,8 +193,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#employee-group-unit-component-page-alert-modal"
data-hs-overlay=
"#employee-group-unit-component-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
groupId
||!
dataSelect
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
groupId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
[
disabled
]="!
dataSelect
.
groupId
||!
dataSelect
.
tdesc
"
>
[
disabled
]="!
dataSelect
.
groupId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -255,7 +262,7 @@
...
@@ -255,7 +262,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=
"#employee-group-unit-component-page-alert-modal"
data-hs-overlay=
"#employee-group-unit-component-page-alert-modal"
(
click
)="
deleteEmp_group
()"
*
ngIf=
"numDataListChecked"
>
(
click
)="
deleteEmp_group
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/company-components/job-description/employee-group-unit/employee-group-unit.component.ts
View file @
bd3515dc
...
@@ -205,4 +205,8 @@ export class EmployeeGroupUnit implements OnInit {
...
@@ -205,4 +205,8 @@ export class EmployeeGroupUnit implements OnInit {
this
.
dataSelect
.
edesc
=
''
this
.
dataSelect
.
edesc
=
''
}
}
}
}
checkPrimary
()
{
return
this
.
emp_groupList
.
find
(
x
=>
x
.
data
.
groupId
==
this
.
dataSelect
.
groupId
)
}
}
}
src/app/components/company-components/job-description/employee-level/employee-level.component.html
View file @
bd3515dc
...
@@ -167,10 +167,17 @@
...
@@ -167,10 +167,17 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body"
style=
"margin-top: 40px;"
>
<div
class=
"ti-modal-body"
style=
"margin-top: 40px;"
>
<label
for=
"input-label"
class=
"ti-form-label"
>
รหัสระดับพนักงาน(JL)
<span
class=
"text-danger"
>
*
</span></label>
<label
for=
"input-label"
class=
"ti-form-label"
>
รหัสระดับพนักงาน(JL)
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"modalStatus=='add'&&checkPrimary()"
>
รหัสระดับพนักงาน(JL)ซ้ำ
</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'
"
[
class
.!
border-red
]="
modalStatus=
='add'&&checkPrimary()"
[
ngClass
]="{'
bg-input-readonly
'
:modalStatus=
='edit'}
"
[(
ngModel
)]="
dataSelect
.
plId
"
>
[
readonly
]="
modalStatus=
='edit'"
[
(
ngModel
)]="
dataSelect
.
plId
"
>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดระดับพนักงาน(JL) (ไทย)
<span
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดระดับพนักงาน(JL) (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
dataSelect
.
tdesc
"
>
...
@@ -183,8 +190,8 @@
...
@@ -183,8 +190,8 @@
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#employee-level-page-alert-modal"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#employee-level-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
plId
||!
dataSelect
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
plId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
[
disabled
]="!
dataSelect
.
plId
||!
dataSelect
.
tdesc
"
>
[
disabled
]="!
dataSelect
.
plId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -260,11 +267,11 @@
...
@@ -260,11 +267,11 @@
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</ng-container>
</ng-container>
</p>
</p>
...
@@ -287,7 +294,7 @@
...
@@ -287,7 +294,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=
"#employee-level-page-alert-modal"
(
click
)="
deletePL
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#employee-level-page-alert-modal"
(
click
)="
deletePL
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/company-components/job-description/employee-level/employee-level.component.ts
View file @
bd3515dc
...
@@ -212,4 +212,9 @@ export class EmployeeLevel implements OnInit {
...
@@ -212,4 +212,9 @@ export class EmployeeLevel implements OnInit {
this
.
dataSelect
.
edesc
=
''
this
.
dataSelect
.
edesc
=
''
}
}
}
}
checkPrimary
()
{
return
this
.
plList
.
find
(
x
=>
x
.
data
.
plId
==
this
.
dataSelect
.
plId
)
}
}
}
src/app/components/company-components/job-description/position/position-unit.component.html
View file @
bd3515dc
...
@@ -169,8 +169,13 @@
...
@@ -169,8 +169,13 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body "
>
<div
class=
"ti-modal-body "
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
รหัสตำแหน่ง
<span
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
class=
"text-danger"
>
*
</span></label>
<span
class=
"text-danger"
>
*
<ng-container
*
ngIf=
"modalStatus=='add'&&checkPrimary()"
>
รหัสตำแหน่งซ้ำ
</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
)]="
dataSelect
.
positionId
"
>
[(
ngModel
)]="
dataSelect
.
positionId
"
>
...
@@ -187,8 +192,8 @@
...
@@ -187,8 +192,8 @@
</button>
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#position-unit-component-page-alert-modal"
data-hs-overlay=
"#position-unit-component-page-alert-modal"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
positionId
||!
dataSelect
.
tdesc
"
[
class
.
ti-btn-disabled
]="!
dataSelect
.
positionId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
[
disabled
]="!
dataSelect
.
positionId
||!
dataSelect
.
tdesc
"
>
[
disabled
]="!
dataSelect
.
positionId
||!
dataSelect
.
tdesc
||(
modalStatus=
='add'&&checkPrimary())
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</button>
</button>
</div>
</div>
...
@@ -255,7 +260,8 @@
...
@@ -255,7 +260,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#position-unit-component-page-alert-modal"
(
click
)="
deletePosition
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#position-unit-component-page-alert-modal"
(
click
)="
deletePosition
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/company-components/job-description/position/position-unit.component.ts
View file @
bd3515dc
...
@@ -205,5 +205,9 @@ export class PositionUnitComponent implements OnInit {
...
@@ -205,5 +205,9 @@ export class PositionUnitComponent implements OnInit {
this
.
dataSelect
.
edesc
=
''
this
.
dataSelect
.
edesc
=
''
}
}
}
}
checkPrimary
()
{
return
this
.
positionList
.
find
(
x
=>
x
.
data
.
positionId
==
this
.
dataSelect
.
positionId
)
}
}
}
src/app/components/competency-assessment/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.component.html
View file @
bd3515dc
...
@@ -35,12 +35,12 @@
...
@@ -35,12 +35,12 @@
Clear
Clear
</button>
</button>
</div>
</div>
<div
class=
"px-1"
>
<
!-- <
div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<button type="button" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
</tbody>
</tbody>
<tbody
*
ngIf=
"dataListFilter().length"
>
<tbody
*
ngIf=
"dataListFilter().length"
>
<tr
<tr
*
ngFor=
"let data of dataListFilter() | slice:((currentPage-1) *
10) : (((currentPage-1) * 10) + 10
);let i = index"
>
*
ngFor=
"let data of dataListFilter() | slice:((currentPage-1) *
pageSize) : (((currentPage-1) * pageSize) + pageSize
);let i = index"
>
<td
class=
"text-center align-center"
>
<td
class=
"text-center align-center"
>
{{ data.code }}
{{ data.code }}
</td>
</td>
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
class=
"ti-btn rounded-sm ti-btn-secondary text-center m-0 hs-tooltip ti-main-tooltip flex"
class=
"ti-btn rounded-sm ti-btn-secondary text-center m-0 hs-tooltip ti-main-tooltip flex"
[
ngClass
]="{'
cursor-default
[
--trigger:click
]'
:
m
<
3
,
[
ngClass
]="{'
cursor-default
[
--trigger:click
]'
:
m
<
3
,
'
cursor-pointer
[
--trigger:hover
]'
:
m =
=
3
}"
style=
"height: 15px; width: 45px"
'
cursor-pointer
[
--trigger:hover
]'
:
m =
=
3
}"
style=
"height: 15px; width: 45px"
(
click
)="(
m
<
3
?
null
:dataSelectIndex=
i);(m
<
3
?
null
:assessmentToolsSelectIndex=
[l,m])"
(
click
)="
searchModal =
''
;
pageSizeModal =
10;
currentPageModal =
1;assessmentToolsModalSearchChange();
(m
<
3
?
null
:dataSelectIndex=
i);(m
<
3
?
null
:assessmentToolsSelectIndex=
[l,m])"
[
attr
.
data-hs-overlay
]="
m
<
3
?
null
:
'#
assessment-tools-modal
'"
>
[
attr
.
data-hs-overlay
]="
m
<
3
?
null
:
'#
assessment-tools-modal
'"
>
<ng-container
[
ngSwitch
]="
m
<
3
"
>
<ng-container
[
ngSwitch
]="
m
<
3
"
>
<ng-container
*
ngSwitchCase=
"true"
>
<ng-container
*
ngSwitchCase=
"true"
>
...
@@ -179,14 +179,14 @@
...
@@ -179,14 +179,14 @@
<button
type=
"button"
class=
"flex text-start items-center cursor-default"
<button
type=
"button"
class=
"flex text-start items-center cursor-default"
*
ngIf=
"!seeTab"
>
*
ngIf=
"!seeTab"
>
<i
class=
"ti ti-circle-plus text-green-500 cursor-pointer"
<i
class=
"ti ti-circle-plus text-green-500 cursor-pointer"
(
click
)="
dataSelectIndex=
i;dataSelect=data;assessmentToolsSelectIndex=[l,data.assessmentTools.length]"
(
click
)="
searchModal =
''
;
pageSizeModal =
10;
currentPageModal =
1;assessmentToolsModalSearchChange();
dataSelectIndex=i;dataSelect=data;assessmentToolsSelectIndex=[l,data.assessmentTools.length]"
data-hs-overlay=
"#assessment-tools-modal"
></i>
data-hs-overlay=
"#assessment-tools-modal"
></i>
</button>
</button>
</span>
</span>
<button
*
ngIf=
"!data.assessmentTools.length&&!seeTab"
type=
"button"
<button
*
ngIf=
"!data.assessmentTools.length&&!seeTab"
type=
"button"
class=
"flex text-start items-center cursor-default"
>
class=
"flex text-start items-center cursor-default"
>
<i
class=
"ti ti-circle-plus text-green-500 cursor-pointer"
<i
class=
"ti ti-circle-plus text-green-500 cursor-pointer"
(
click
)="
dataSelectIndex=
i;dataSelect=data;assessmentToolsSelectIndex=[0,data.assessmentTools.length]"
(
click
)="
searchModal =
''
;
pageSizeModal =
10;
currentPageModal =
1;assessmentToolsModalSearchChange();
dataSelectIndex=i;dataSelect=data;assessmentToolsSelectIndex=[0,data.assessmentTools.length]"
data-hs-overlay=
"#assessment-tools-modal"
></i>
data-hs-overlay=
"#assessment-tools-modal"
></i>
</button>
</button>
</div>
</div>
...
@@ -194,7 +194,8 @@
...
@@ -194,7 +194,8 @@
<td
class=
"items-center justify-center"
>
<td
class=
"items-center justify-center"
>
<div
class=
"flex items-center w-full space-x-2"
>
<div
class=
"flex items-center w-full space-x-2"
>
<i
*
ngIf=
"!seeTab"
class=
"ti ti ti-book cursor-pointer i-gray px-1"
style=
"font-size: 28px;"
<i
*
ngIf=
"!seeTab"
class=
"ti ti ti-book cursor-pointer i-gray px-1"
style=
"font-size: 28px;"
(
click
)="
dataSelectIndex=
i"
data-hs-overlay=
"#curriculum-modal"
></i>
(
click
)="
searchModal =
''
;
pageSizeModal =
10;
currentPageModal =
1;curriculumModalSearchChange();dataSelectIndex=i"
data-hs-overlay=
"#curriculum-modal"
></i>
<div
class=
"flex flex-col flex-grow"
*
ngIf=
"data.curriculum.length"
>
<div
class=
"flex flex-col flex-grow"
*
ngIf=
"data.curriculum.length"
>
<div
class=
"grid grid-cols-1 gap-1"
>
<div
class=
"grid grid-cols-1 gap-1"
>
<span
*
ngFor=
"let item of data.curriculum;let l=index"
<span
*
ngFor=
"let item of data.curriculum;let l=index"
...
@@ -227,50 +228,15 @@
...
@@ -227,50 +228,15 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<app-pagination
[
totalItems
]="
dataListFilter
().
length
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
currentPage =
$event"
<ul
class=
"ti-pagination"
>
(
pageSizeChange
)="
pageSize =
$event;currentPage
=
1
"
></app-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 {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</div>
<div
id=
"assessment-tools-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"assessment-tools-modal"
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"
>
<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
!max-w-3/4
"
>
<div
class=
"ti-modal-content"
>
<div
class=
"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"
>
...
@@ -299,12 +265,12 @@
...
@@ -299,12 +265,12 @@
</div>
</div>
</div>
</div>
</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 href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"page px-rem"
>
...
@@ -343,7 +309,7 @@
...
@@ -343,7 +309,7 @@
</tbody>
</tbody>
<tbody
*
ngIf=
"!assessmentToolsLoading&&assessmentToolsListFilter().length"
>
<tbody
*
ngIf=
"!assessmentToolsLoading&&assessmentToolsListFilter().length"
>
<tr
<tr
*
ngFor=
"let item of assessmentToolsListFilter() | slice:((currentPageModal-1) *
10) : (((currentPageModal-1) * 10) + 10
);let i = index"
>
*
ngFor=
"let item of assessmentToolsListFilter() | slice:((currentPageModal-1) *
pageSizeModal) : (((currentPageModal-1) * pageSizeModal) + pageSizeModal
);let i = index"
>
<td
class=
"flex justify-center"
>
{{item.code}}
</td>
<td
class=
"flex justify-center"
>
{{item.code}}
</td>
<td>
{{item.name}}
</td>
<td>
{{item.name}}
</td>
<td>
{{item.nameShow}}
</td>
<td>
{{item.nameShow}}
</td>
...
@@ -363,49 +329,9 @@
...
@@ -363,49 +329,9 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<nav
class=
"pagination-style-3 my-5"
*
ngIf=
"pageModal.length"
>
<app-pagination
[
totalItems
]="
assessmentToolsListFilter
().
length
"
[
pageSize
]="
pageSizeModal
"
<ul
class=
"ti-pagination"
>
(
pageChange
)="
currentPageModal =
$event"
<li>
(
pageSizeChange
)="
pageSizeModal =
$event;currentPageModal
=
1
"
></app-pagination>
<a
aria-label=
"anchor"
class=
"page-link !pl-0"
href=
"javascript:void(0);"
(
click
)="
currentPageModal =
(currentPageModal-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&¤tPageModal!=1&¤tPageModal!=2&¤tPageModal!=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==currentPageModal-1||item==currentPageModal||item==currentPageModal+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageModal"
(
click
)="
currentPageModal=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==pageModal.length-2&¤tPageModal!=pageModal.length&¤tPageModal!=pageModal.length-1&¤tPageModal!=pageModal.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
)="
currentPageModal =
(currentPageModal
>
pageModal.length-1 ? currentPageModal: currentPageModal+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 {{((currentPageModal-1) * 10)+1}} to {{assessmentToolsListFilter().length
<10
?
assessmentToolsListFilter
().
length:
(
currentPageModal=
=pageModal.length
?
((
currentPageModal
*
10
)
-
((
currentPageModal
*
10
)
-
assessmentToolsListFilter
().
length
)
)
:
(
currentPageModal
*
10
)
)
}}
of
{{
assessmentToolsListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -414,7 +340,7 @@
...
@@ -414,7 +340,7 @@
<div
id=
"curriculum-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"curriculum-modal"
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"
>
<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
!max-w-3/4
"
>
<div
class=
"ti-modal-content"
>
<div
class=
"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"
>
...
@@ -442,12 +368,12 @@
...
@@ -442,12 +368,12 @@
</div>
</div>
</div>
</div>
</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 href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"page px-rem"
>
...
@@ -476,7 +402,7 @@
...
@@ -476,7 +402,7 @@
</tbody>
</tbody>
<tbody
*
ngIf=
"curriculumListFilter().length"
>
<tbody
*
ngIf=
"curriculumListFilter().length"
>
<tr
<tr
*
ngFor=
"let item of curriculumListFilter() | slice:((currentPageModal-1) *
10) : (((currentPageModal-1) * 10) + 10
);let i = index"
>
*
ngFor=
"let item of curriculumListFilter() | slice:((currentPageModal-1) *
pageSizeModal) : (((currentPageModal-1) * pageSizeModal) + pageSizeModal
);let i = index"
>
<td
class=
"flex justify-center"
>
{{item.code}}
</td>
<td
class=
"flex justify-center"
>
{{item.code}}
</td>
<td>
{{item.name}}
</td>
<td>
{{item.name}}
</td>
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
...
@@ -493,48 +419,9 @@
...
@@ -493,48 +419,9 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<nav
class=
"pagination-style-3 my-5"
*
ngIf=
"pageModal.length"
>
<app-pagination
[
totalItems
]="
curriculumListFilter
().
length
"
[
pageSize
]="
pageSizeModal
"
<ul
class=
"ti-pagination"
>
(
pageChange
)="
currentPageModal =
$event"
<li>
(
pageSizeChange
)="
pageSizeModal =
$event;currentPageModal
=
1
"
></app-pagination>
<a
aria-label=
"anchor"
class=
"page-link !pl-0"
href=
"javascript:void(0);"
(
click
)="
currentPageModal =
(currentPageModal-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&¤tPageModal!=1&¤tPageModal!=2&¤tPageModal!=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==currentPageModal-1||item==currentPageModal||item==currentPageModal+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=currentPageModal"
(
click
)="
currentPageModal=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==pageModal.length-2&¤tPageModal!=pageModal.length&¤tPageModal!=pageModal.length-1&¤tPageModal!=pageModal.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
)="
currentPageModal =
(currentPageModal
>
pageModal.length-1 ? currentPageModal: currentPageModal+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 {{((currentPageModal-1) * 10)+1}} to {{curriculumListFilter().length
<10
?
curriculumListFilter
().
length:
(
currentPageModal=
=pageModal.length
?
((
currentPageModal
*
10
)
-
((
currentPageModal
*
10
)
-
curriculumListFilter
().
length
)
)
:
(
currentPageModal
*
10
)
)
}}
of
{{
curriculumListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/competency-management/indicators-and-curriculum/edit-group-indicators/edit-group-indicators.component.ts
View file @
bd3515dc
...
@@ -38,6 +38,7 @@ export class EditGroupIndicators implements OnInit {
...
@@ -38,6 +38,7 @@ export class EditGroupIndicators implements OnInit {
@
Output
()
sendEdit
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
@
Output
()
sendEdit
:
EventEmitter
<
boolean
>
=
new
EventEmitter
<
boolean
>
();
search
=
""
search
=
""
currentPage
=
1
currentPage
=
1
pageSize
=
10
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
dataList
:
DataModel
[]
=
[]
dataList
:
DataModel
[]
=
[]
dataSelect
:
DataModel
=
{
dataSelect
:
DataModel
=
{
...
@@ -51,6 +52,7 @@ export class EditGroupIndicators implements OnInit {
...
@@ -51,6 +52,7 @@ export class EditGroupIndicators implements OnInit {
dataSelectAssessmentToolsIndex
:
number
=
-
1
dataSelectAssessmentToolsIndex
:
number
=
-
1
searchModal
=
""
searchModal
=
""
currentPageModal
=
1
currentPageModal
=
1
pageSizeModal
=
10
pageModal
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageModal
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
assessmentToolsLoading
=
false
assessmentToolsLoading
=
false
assessmentToolsList
:
AssessmentToolsModal
[]
=
[]
assessmentToolsList
:
AssessmentToolsModal
[]
=
[]
...
@@ -60,7 +62,6 @@ export class EditGroupIndicators implements OnInit {
...
@@ -60,7 +62,6 @@ export class EditGroupIndicators implements OnInit {
curriculumSelectIndex
:
number
=
-
1
curriculumSelectIndex
:
number
=
-
1
dataLoading
=
false
dataLoading
=
false
constructor
(
private
assessmentService
:
AssessmentService
,
constructor
(
private
assessmentService
:
AssessmentService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
...
...
src/app/components/competency-assessment/competency-management/indicators-and-curriculum/indicators-and-curriculum.component.html
View file @
bd3515dc
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
import
import
</button>
</button>
</div>
</div>
<div
class=
"px-1"
>
<
!-- <
div class="px-1">
<button type="button" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<button type="button" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<div
class=
"page px-rem"
>
<div
class=
"page px-rem"
>
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</tbody>
</tbody>
<tbody
*
ngIf=
"!dataLoading&&dataListFilter().length"
>
<tbody
*
ngIf=
"!dataLoading&&dataListFilter().length"
>
<tr
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) *
10) : (((currentPage-1) * 10) + 10
);let i = index"
>
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) *
pageSize) : (((currentPage-1) * pageSize) + pageSize
);let i = index"
>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
{{item.code}}
{{item.code}}
</td>
</td>
...
@@ -80,43 +80,8 @@
...
@@ -80,43 +80,8 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<nav
class=
"pagination-style-3 overflow-auto my-5"
*
ngIf=
"page.length"
>
<app-pagination
[
totalItems
]="
dataListFilter
().
length
"
[
pageSize
]="
pageSize
"
(
pageChange
)="
currentPage =
$event"
<ul
class=
"ti-pagination"
>
(
pageSizeChange
)="
pageSize =
$event;currentPage
=
1
"
></app-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 {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</div>
</ng-container>
</ng-container>
...
...
src/app/components/competency-assessment/competency-management/indicators-and-curriculum/indicators-and-curriculum.component.ts
View file @
bd3515dc
...
@@ -21,7 +21,7 @@ export class IndicatorsAndCurriculumComponent {
...
@@ -21,7 +21,7 @@ export class IndicatorsAndCurriculumComponent {
currentPage
=
1
currentPage
=
1
search
=
""
search
=
""
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSize
=
10
dataList
:
DataModel
[]
=
[]
dataList
:
DataModel
[]
=
[]
indicatorsCoursesList
:
CompetencytopicModel
[]
=
[]
indicatorsCoursesList
:
CompetencytopicModel
[]
=
[]
indicatorsCourses
:
CompetencytopicModel
=
new
MyCompetencytopicModel
({})
indicatorsCourses
:
CompetencytopicModel
=
new
MyCompetencytopicModel
({})
...
...
src/app/components/competency-assessment/competency-management/set-approvers/set-approvers.component.html
View file @
bd3515dc
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
import
import
</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-45px m-0 shadow-md">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
bd3515dc
...
@@ -135,7 +135,8 @@
...
@@ -135,7 +135,8 @@
</span>
</span>
</td>
</td>
<td
class=
"flex justify-center items-center"
>
<td
class=
"flex justify-center items-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
modalStatusEdit=
(item.data.statusFrom.code==
'
0
'?
true:false
);
setData
(
item
.
data
)"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
modalStatusEdit=
(item.data.statusFrom.code==
'
0
'?
true:false
);
setData
(
item
.
data
)"
data-hs-overlay=
"#evaluation-cycle-page-modal"
></i>
data-hs-overlay=
"#evaluation-cycle-page-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
*
ngIf=
"item.data.statusFrom.code =='1'"
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
*
ngIf=
"item.data.statusFrom.code =='1'"
data-hs-overlay=
"#evaluation-cycle-person-modal"
data-hs-overlay=
"#evaluation-cycle-person-modal"
...
@@ -260,30 +261,35 @@
...
@@ -260,30 +261,35 @@
[(
ngModel
)]="
evaluation_cycle
.
evaluationRoundId
"
>
[(
ngModel
)]="
evaluation_cycle
.
evaluationRoundId
"
>
<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"
>
รายละเอียด (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
[(
ngModel
)]="
evaluation_cycle
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
[(
ngModel
)]="
evaluation_cycle
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
[(
ngModel
)]="
evaluation_cycle
.
edesc
"
>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
[(
ngModel
)]="
evaluation_cycle
.
edesc
"
>
<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"
>
ปีการประเมิน
<span
class=
"text-danger"
>
*
</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"
oninput="this.value = this.value.replace(/\D/g, '')" [(ngModel)]="evaluation_cycle.apsyear"> -->
oninput="this.value = this.value.replace(/\D/g, '')" [(ngModel)]="evaluation_cycle.apsyear"> -->
<select
class=
"ti-form-select"
[(
ngModel
)]="
evaluation_cycle
.
apsyear
"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
disabled
]="!
modalStatusEdit
"
>
<select
class=
"ti-form-select"
[(
ngModel
)]="
evaluation_cycle
.
apsyear
"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
disabled
]="!
modalStatusEdit
"
>
<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"
>
เริ่มวันที่
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
evaluation_cycle
.
apsPeriodStart
"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
evaluation_cycle
.
apsPeriodStart
"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
>
<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"
>
สิ้นสุดวันที่
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
evaluation_cycle
.
apsPeriodEnd
"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
>
<input
type=
"date"
id=
"input-label"
class=
"ti-form-input w-1/2"
[(
ngModel
)]="
evaluation_cycle
.
apsPeriodEnd
"
[
ngClass
]="{'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
readonly
]="!
modalStatusEdit
"
>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ระดับพนักงาน (JL)
</label>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ระดับพนักงาน (JL)
</label>
<div
*
ngFor=
"let item of evaluation_cycle.personalLevel;let i = index;let f=first;let l = last"
<div
*
ngFor=
"let item of evaluation_cycle.personalLevel;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"
>
<div
class=
"flex relative"
>
<div
class=
"flex relative"
>
<input
type=
"text"
class=
"ti-form-input pointer-events-none"
readonly
<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
,'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
ngClass
]="{'
input-list-f1
'
:
f
&&!
l
,
'
input-list-c1
'
:
!
f
&&!
l
,
'
input-list-l1
'
:
!
f
&&
l
,
'
input-list-fl1
'
:
f
&&
l
,'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[(
ngModel
)]="
item
.
plId
"
>
[(
ngModel
)]="
item
.
plId
"
>
<div
<div
...
@@ -294,7 +300,7 @@
...
@@ -294,7 +300,7 @@
[
ngClass
]="{'
input-list-f2
'
:
f
&&!
l
,
'
input-list-c2
'
:
!
f
&&!
l
,
'
input-list-l2
'
:
!
f
&&
l
,
'
input-list-fl2
'
:
f
&&
l
,'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[
ngClass
]="{'
input-list-f2
'
:
f
&&!
l
,
'
input-list-c2
'
:
!
f
&&!
l
,
'
input-list-l2
'
:
!
f
&&
l
,
'
input-list-fl2
'
:
f
&&
l
,'
bg-input-readonly
'
:
!
modalStatusEdit
}"
[(
ngModel
)]="
item
.
tdesc
"
>
[(
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"
>
<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.plId&&modalStatusEdit"
type=
"button"
class=
"flex items-center text-red-500"
<button
*
ngIf=
"item.plId&&modalStatusEdit"
type=
"button"
class=
"flex items-center text-red-500"
(
click
)="
pl
.
selectIndex=
i;selectPl()"
>
(
click
)="
pl
.
selectIndex=
i;selectPl()"
>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
</button>
</button>
...
@@ -378,11 +384,11 @@
...
@@ -378,11 +384,11 @@
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='createForm'"
>
<ng-container
*
ngIf=
"modalStatus=='createForm'"
>
คุณต้องการสร้างแบบฟอร์มการประเมินใหม่หรือไม่
คุณต้องการสร้างแบบฟอร์มการประเมินใหม่หรือไม่
...
@@ -408,7 +414,8 @@
...
@@ -408,7 +414,8 @@
ย้อนกลับ
ย้อนกลับ
</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=
"#evaluation-cycle-page-alert-modal"
(
click
)="
deleteevaluation_cycle
()"
*
ngIf=
"numDataListChecked"
>
data-hs-overlay=
"#evaluation-cycle-page-alert-modal"
(
click
)="
deleteevaluation_cycle
()"
*
ngIf=
"numDataListChecked"
>
ลบข้อมูล
ลบข้อมูล
</a>
</a>
</ng-container>
</ng-container>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
bd3515dc
...
@@ -43,11 +43,9 @@ export class EvaluationCycleComponent {
...
@@ -43,11 +43,9 @@ export class EvaluationCycleComponent {
pl
:
{
loading
:
boolean
,
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectIndex
:
-
1
,
dataList
:
[]
}
pl
:
{
loading
:
boolean
,
selectIndex
:
number
,
dataList
:
PLModel
[]
}
=
{
loading
:
false
,
selectIndex
:
-
1
,
dataList
:
[]
}
currentDate
=
new
Date
()
currentDate
=
new
Date
()
yearList
=
[
yearList
=
[
(
this
.
currentDate
.
getFullYear
()
-
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
2
)
+
""
,
]
]
modalStatusEdit
=
false
modalStatusEdit
=
false
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
...
...
src/app/components/competency-assessment/grade-registration/grade-management/grade-management.component.html
View file @
bd3515dc
...
@@ -43,12 +43,12 @@
...
@@ -43,12 +43,12 @@
Delete
Delete
</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
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/competency-assessment/name-registration/type-registration/type-registration.component.ts
View file @
bd3515dc
...
@@ -163,12 +163,11 @@ export class TypeRegistration {
...
@@ -163,12 +163,11 @@ export class TypeRegistration {
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
);
this
.
showAlert
(
response
.
message
,
'success'
);
this
.
getCompetencytypeList
();
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
);
this
.
showAlert
(
response
.
message
,
'error'
);
this
.
dataLoading
=
false
this
.
cdr
.
detectChanges
()
}
}
this
.
getCompetencytypeList
();
this
.
cdr
.
detectChanges
()
},
},
error
:
error
=>
{
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
...
...
src/app/components/competency-assessment/setting-competency/competency-configuration/competency-configuration.component.ts
View file @
bd3515dc
...
@@ -12,17 +12,9 @@ export class CompetencyConfigurationComponent {
...
@@ -12,17 +12,9 @@ export class CompetencyConfigurationComponent {
setting
:
{
loading
:
boolean
,
data
:
SettingAssessmentModel
}
=
{
loading
:
false
,
data
:
new
MySettingAssessmentModel
()
}
setting
:
{
loading
:
boolean
,
data
:
SettingAssessmentModel
}
=
{
loading
:
false
,
data
:
new
MySettingAssessmentModel
()
}
currentDate
=
new
Date
()
currentDate
=
new
Date
()
yearList
=
[
yearList
=
[
(
this
.
currentDate
.
getFullYear
()
-
5
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
4
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
3
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
(
this
.
currentDate
.
getFullYear
()
+
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
3
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
4
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
5
)
+
""
,
]
]
constructor
(
private
settingAssessmentService
:
SettingAssessmentService
,
constructor
(
private
settingAssessmentService
:
SettingAssessmentService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
bd3515dc
...
@@ -162,6 +162,8 @@ import { EmpStatusService } from 'src/app/shared/services/emp-status.service';
...
@@ -162,6 +162,8 @@ import { EmpStatusService } from 'src/app/shared/services/emp-status.service';
import
{
PaginationComponent
}
from
'../pagination/pagination.component'
;
import
{
PaginationComponent
}
from
'../pagination/pagination.component'
;
import
{
RolePermissionConfigComponent
}
from
'../company-components/account-settings/role-permission-config/role-permission-config.component'
;
import
{
RolePermissionConfigComponent
}
from
'../company-components/account-settings/role-permission-config/role-permission-config.component'
;
import
{
ConfigPermissionService
}
from
'src/app/shared/services/config-permission.service'
;
import
{
ConfigPermissionService
}
from
'src/app/shared/services/config-permission.service'
;
import
{
TimeAttendanceManageComponent
}
from
'../performance-management-evaluation/time-attendance/time-attendance-manage/time-attendance-manage.component'
;
import
{
TimeAttendanceStatisticsComponent
}
from
'../performance-management-evaluation/time-attendance/time-attendance-statistics/time-attendance-statistics.component'
;
export
const
MY_DATE_FORMATS
=
{
export
const
MY_DATE_FORMATS
=
{
...
@@ -290,6 +292,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
...
@@ -290,6 +292,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
TimeAttendanceComponent
,
TimeAttendanceComponent
,
PaginationComponent
,
PaginationComponent
,
RolePermissionConfigComponent
,
RolePermissionConfigComponent
,
TimeAttendanceManageComponent
,
TimeAttendanceStatisticsComponent
,
],
],
imports
:
[
imports
:
[
CommonModule
,
CommonModule
,
...
...
src/app/components/performance-evaluation/evaluation/evaluation.component.html
View file @
bd3515dc
...
@@ -17,7 +17,42 @@
...
@@ -17,7 +17,42 @@
<ng-container
*
ngIf=
"appraisalCompentency.data"
>
<ng-container
*
ngIf=
"appraisalCompentency.data"
>
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"font-size-18px font-weight-700 text-primary"
>
<div
class=
"font-size-18px font-weight-700 text-primary"
>
แบบประเมินสมรรถนะพนักงาน {{currentDate.getFullYear()}}
แบบประเมินสมรรถนะพนักงาน
</div>
</div>
<div
class=
"pb-2rem"
>
<div
class=
"w-full min-height-50px justify-between items-center pb-2"
>
<div
class=
"px-2rem py-3 bg-soft-secondary font-size-18px font-weight-700 text-primary"
>
ข้อมูลพนักงาน
</div>
</div>
<div
class=
"p-2 grid grid-cols-12"
>
<div
class=
"col-span-2"
></div>
<div
class=
"col-span-1 text-secondary"
>
รหัสพนักงาน
</div>
<div
class=
"col-span-2"
>
{{evaluatee.data.employeeId}}
</div>
<div
class=
"col-span-1 text-secondary"
>
ชื่อ - สกุล
</div>
<div
class=
"col-span-6"
>
{{evaluatee.data.thFullName}}
</div>
</div>
<div
class=
"p-2 grid grid-cols-12"
>
<div
class=
"col-span-2"
></div>
<div
class=
"col-span-1 text-secondary"
>
ตำเเหน่ง
</div>
<div
class=
"col-span-2"
>
{{evaluatee.data.position.tdesc || ''}}
</div>
<div
class=
"col-span-1 text-secondary"
>
ฝ่าย
</div>
<div
class=
"col-span-6"
>
{{evaluatee.data.bu1.tdesc || ''}}
</div>
</div>
<div
class=
"p-2 grid grid-cols-12"
>
<div
class=
"col-span-2"
></div>
<div
class=
"col-span-1 text-secondary"
>
แผนก
</div>
<div
class=
"col-span-2"
>
{{evaluatee.data.bu2.tdesc || ''}}
</div>
<div
class=
"col-span-1 text-secondary"
>
ส่วน
</div>
<div
class=
"col-span-6"
>
{{evaluatee.data.bu3.tdesc || ''}}
</div>
</div>
<div
class=
"p-2 grid grid-cols-12"
>
<div
class=
"col-span-2"
></div>
<div
class=
"col-span-1 text-secondary"
>
ส่วนย่อย 1
</div>
<div
class=
"col-span-2"
>
{{evaluatee.data.bu4.tdesc || ''}}
</div>
<div
class=
"col-span-1 text-secondary"
>
ส่วนย่อย 2
</div>
<div
class=
"col-span-6"
>
{{evaluatee.data.bu5.tdesc || ''}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"pb-2rem px-2rem"
>
...
@@ -94,9 +129,9 @@
...
@@ -94,9 +129,9 @@
<tbody
*
ngIf=
"!appraisalCompentency.loading&&appraisalCompentencyFilter().length"
>
<tbody
*
ngIf=
"!appraisalCompentency.loading&&appraisalCompentencyFilter().length"
>
<ng-container
*
ngFor=
"let item2 of appraisalCompentencyFilter();let i = index"
>
<ng-container
*
ngFor=
"let item2 of appraisalCompentencyFilter();let i = index"
>
<tr
*
ngFor=
"let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first"
<tr
*
ngFor=
"let bi of item2.groupAssessment1.competencyIndicatorsCourses1Mini.behavioralIndicatorsList;let i2 = index;let f = first"
(
mouseenter
)="
hoveredCode =
item2.groupAssessment1.competencyIndicatorsCourses1Mini.competency
Course
Id"
(
mouseenter
)="
hoveredCode =
item2.groupAssessment1.competencyIndicatorsCourses1Mini.competency
IndicatorsCourses0.competencyTopic.competencyTopic
Id"
(
mouseleave
)="
hoveredCode =
null"
(
mouseleave
)="
hoveredCode =
null"
[
ngClass
]="{
'
table-hover2
'
:
item2
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
competency
Course
Id =
==
hoveredCode
,'
border-none
'
:
!
f
}"
>
[
ngClass
]="{
'
table-hover2
'
:
item2
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
competency
IndicatorsCourses0
.
competencyTopic
.
competencyTopic
Id =
==
hoveredCode
,'
border-none
'
:
!
f
}"
>
<td
class=
"align-start text-center"
>
<td
class=
"align-start text-center"
>
<ng-container
*
ngIf=
"f"
>
<ng-container
*
ngIf=
"f"
>
{{i+1}}
{{i+1}}
...
@@ -174,7 +209,8 @@
...
@@ -174,7 +209,8 @@
<div
class=
"col-span-8"
>
คะแนนรวมหลังถ่วงน้ำ
</div>
<div
class=
"col-span-8"
>
คะแนนรวมหลังถ่วงน้ำ
</div>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-3 grid grid-cols-5"
>
<div
class=
"col-span-5 text-center"
>
<div
class=
"col-span-5 text-center"
>
{{appraisalCompentency.data.masfromEvaluationAssessment1lList[0].weightedTotal}}
</div>
{{showNumber(appraisalCompentency.data.masfromEvaluationAssessment1lList[0].weightedTotal)}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"py-2 grid grid-cols-11"
>
<div
class=
"py-2 grid grid-cols-11"
>
...
@@ -189,23 +225,14 @@
...
@@ -189,23 +225,14 @@
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"pb-2rem px-2rem"
>
<div
class=
"overflow-auto rounded-top-0.65rem"
>
<div
class=
"overflow-auto 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
2
"
>
<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 ['เกณฑ์การให้คะแนนการประ
ประเมิน Check Sheet E01
','ผลประเมิน (A)','สรุปผล Gap'];let f = first ;let l = last"
>
*
ngFor=
"let item of ['เกณฑ์การให้คะแนนการประ
เมิน
','ผลประเมิน (A)','สรุปผล Gap'];let f = first ;let l = last"
>
<th
scope=
"col"
[
attr
.
rowspan
]="
f
?'
1
'
:
'
2
'"
[
attr
.
colspan
]="
f
?'
2
'
:
'
1
'"
<th
scope=
"col"
[
attr
.
rowspan
]="
f
?'
1
'
:
'
2
'"
[
attr
.
colspan
]="
f
?'
2
'
:
'
1
'"
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 }}
</span>
<span
class=
"font-size-12px font-weight-700 "
>
{{ item }}
</span>
<div
*
ngIf=
"!f&&!l"
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
<th
*
ngIf=
"f"
scope=
"col"
rowspan=
"2"
class=
"relative bg-soft-secondary text-primary !text-center !p-0"
>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
</th>
</ng-container>
</ng-container>
</tr>
</tr>
...
@@ -219,7 +246,8 @@
...
@@ -219,7 +246,8 @@
</tr>
</tr>
</thead>
</thead>
<tbody
*
ngIf=
"checkSheet.length"
>
<tbody
*
ngIf=
"checkSheet.length"
>
<tr
*
ngFor=
"let item of checkSheet;let i = index"
>
<tr
*
ngFor=
"let item of checkSheet;let i = index"
(
mouseenter
)="
hoveredCode2 =
'true'
"
(
mouseleave
)="
hoveredCode2 =
null"
[
ngClass
]="{
'
table-hover2
'
:
'
true
'
===
hoveredCode2
}"
>
<td
class=
"align-start"
rowspan=
"2"
>
<td
class=
"align-start"
rowspan=
"2"
>
<div
*
ngFor=
"let item2 of item.score"
>
<div
*
ngFor=
"let item2 of item.score"
>
<span>
{{item2}}
</span><br>
<span>
{{item2}}
</span><br>
...
@@ -230,7 +258,6 @@
...
@@ -230,7 +258,6 @@
<span>
{{item2}}
</span><br>
<span>
{{item2}}
</span><br>
</div>
</div>
</td>
</td>
<td
class=
"!p-0"
></td>
<td
class=
"align-start text-center"
>
<td
class=
"align-start text-center"
>
{{calAverage(appraisalCompentency.data.masfromEvaluationAssessment1lList[0].averageScore)}}
{{calAverage(appraisalCompentency.data.masfromEvaluationAssessment1lList[0].averageScore)}}
</td>
</td>
...
@@ -238,7 +265,8 @@
...
@@ -238,7 +265,8 @@
{{calGap(appraisalCompentency.data.masfromEvaluationAssessment1lList[0].averageScore)}}
{{calGap(appraisalCompentency.data.masfromEvaluationAssessment1lList[0].averageScore)}}
</td>
</td>
</tr>
</tr>
<tr>
<tr
(
mouseenter
)="
hoveredCode2 =
'true'
"
(
mouseleave
)="
hoveredCode2 =
null"
[
ngClass
]="{
'
table-hover2
'
:
'
true
'
===
hoveredCode2
}"
>
<td
class=
"align-start !white-space-normal"
colspan=
"4"
>
<td
class=
"align-start !white-space-normal"
colspan=
"4"
>
หมายเหตุ
<br>
หมายเหตุ
<br>
ผลการประเมินอาจมีการเปลี่ยนแปลงเงื่อนไขข้อ 1-3 เนื่องจากมีคะแนนต่ำกว่าเกณฑ์ในบางข้อ
ผลการประเมินอาจมีการเปลี่ยนแปลงเงื่อนไขข้อ 1-3 เนื่องจากมีคะแนนต่ำกว่าเกณฑ์ในบางข้อ
...
@@ -250,7 +278,7 @@
...
@@ -250,7 +278,7 @@
</div>
</div>
<div
class=
"py-1rem px-2rem"
>
<div
class=
"py-1rem px-2rem"
>
<div
class=
"py-2 grid grid-cols-7 gap-3"
>
<div
class=
"py-2 grid grid-cols-7 gap-3"
>
<div
class=
"col-span-1"
>
ผู้
ถูก
ประเมิน
</div>
<div
class=
"col-span-1"
>
ผู้
รับการ
ประเมิน
</div>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
{{appraisalCompentency.data.apsassessy.thFullName}}
</div>
{{appraisalCompentency.data.apsassessy.thFullName}}
</div>
<div
class=
"col-span-1"
>
<div
class=
"col-span-1"
>
...
...
src/app/components/performance-evaluation/evaluation/evaluation.component.ts
View file @
bd3515dc
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
OnInit
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
OnInit
,
Output
}
from
'@angular/core'
;
import
{
AppraisalCompentencyModel2
}
from
'src/app/shared/model/appraisal-competency.model'
;
import
{
AppraisalCompentencyModel2
}
from
'src/app/shared/model/appraisal-competency.model'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
SettingAssessmentModel
,
MySettingAssessmentModel
}
from
'src/app/shared/model/setting-assessment.model'
;
import
{
SettingAssessmentModel
,
MySettingAssessmentModel
}
from
'src/app/shared/model/setting-assessment.model'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
import
{
EmployeeService
}
from
'src/app/shared/services/employee.service'
;
import
{
EmployeeService
}
from
'src/app/shared/services/employee.service'
;
...
@@ -19,6 +20,7 @@ export class EvaluationComponent implements OnInit {
...
@@ -19,6 +20,7 @@ export class EvaluationComponent implements OnInit {
@
Output
()
sendReturnPath
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
@
Output
()
sendReturnPath
:
EventEmitter
<
any
>
=
new
EventEmitter
<
any
>
();
canEdit
=
false
canEdit
=
false
hoveredCode
:
string
|
null
=
null
;
hoveredCode
:
string
|
null
=
null
;
hoveredCode2
:
string
|
null
=
null
;
currentDate
=
new
Date
()
currentDate
=
new
Date
()
appraisalCompentency
:
{
loading
:
boolean
,
data
?:
AppraisalCompentencyModel2
}
=
{
loading
:
false
,
data
:
undefined
}
appraisalCompentency
:
{
loading
:
boolean
,
data
?:
AppraisalCompentencyModel2
}
=
{
loading
:
false
,
data
:
undefined
}
...
@@ -31,6 +33,8 @@ export class EvaluationComponent implements OnInit {
...
@@ -31,6 +33,8 @@ export class EvaluationComponent implements OnInit {
score
:
[
"หากได้คะแนน 90 - 100% ถือว่า Gap +1"
,
"หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap"
,
"หากได้คะแนน 60 - 79% ถือว่า Gap - 1"
,
"หากได้คะแนน 40 - 59% ถือว่า Gap -2"
,
"หากได้คะแนน 0 - 39% ถือว่า Gap - 3"
],
score
:
[
"หากได้คะแนน 90 - 100% ถือว่า Gap +1"
,
"หากได้คะแนน 80 - 89% ถือว่า ไม่มี Gap"
,
"หากได้คะแนน 60 - 79% ถือว่า Gap - 1"
,
"หากได้คะแนน 40 - 59% ถือว่า Gap -2"
,
"หากได้คะแนน 0 - 39% ถือว่า Gap - 3"
],
condition
:
[
"1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1"
,
"2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %"
,
"3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"
],
condition
:
[
"1.หากได้คะแนนสูงกว่า 80% แต่มี 3 2 หรือ 1 ด้วย ถือว่า Gap -1"
,
"2.หากได้คะแนนต่ำกว่า 80% แต่มี 4 และ 5 ให้คิด Gap ตาม %"
,
"3.คะแนนต่ำกว่า 80% แต่มี 2 และ 1 ให้คิด Gap ตาม %"
],
}]
}]
evaluatee
:
{
loading
:
boolean
,
data
:
EmployeeModel
}
=
{
loading
:
false
,
data
:
new
MyEmployeeModel
()
}
constructor
(
private
appraisalService
:
AppraisalService
,
constructor
(
private
appraisalService
:
AppraisalService
,
private
employeeService
:
EmployeeService
,
private
employeeService
:
EmployeeService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
...
@@ -40,7 +44,23 @@ export class EvaluationComponent implements OnInit {
...
@@ -40,7 +44,23 @@ export class EvaluationComponent implements OnInit {
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getAppraisalCompentencyForm
()
this
.
getAppraisalCompentencyForm
()
this
.
getSettingList
()
this
.
getSettingList
()
this
.
getEvaluatee
()
}
}
getEvaluatee
()
{
this
.
evaluatee
.
loading
=
true
this
.
employeeService
.
getWorkingById
(
this
.
evaluateeId
).
subscribe
({
next
:
response
=>
{
this
.
evaluatee
.
data
=
new
MyEmployeeModel
(
response
)
this
.
evaluatee
.
loading
=
false
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
evaluatee
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
getSettingList
()
{
getSettingList
()
{
this
.
setting
.
loading
=
true
this
.
setting
.
loading
=
true
this
.
settingAssessmentService
.
get
().
subscribe
({
this
.
settingAssessmentService
.
get
().
subscribe
({
...
@@ -60,35 +80,42 @@ export class EvaluationComponent implements OnInit {
...
@@ -60,35 +80,42 @@ export class EvaluationComponent implements OnInit {
next
:
response
=>
{
next
:
response
=>
{
this
.
appraisalCompentency
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
response
))
this
.
appraisalCompentency
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
response
))
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
this
.
canEdit
=
this
.
appraisalCompentency
.
data
.
currentStep
==
this
.
appraisalCompentency
.
data
.
checkStep
switch
(
this
.
appraisalCompentency
.
data
?.
currentStep
)
{
switch
(
this
.
appraisalCompentency
.
data
?.
currentStep
)
{
case
(
"0"
):
{
case
(
"0"
):
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsassessyDate
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
appraisalCompentency
.
data
.
apsassessy
.
employeeId
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsassessyDate
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"1"
):
{
case
(
"1"
):
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove1Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
appraisalCompentency
.
data
.
apsapprove1
.
employeeId
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove1Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"2"
):
{
case
(
"2"
):
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove2Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
appraisalCompentency
.
data
.
apsapprove2
.
employeeId
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove2Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"3"
):
{
case
(
"3"
):
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove3Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
appraisalCompentency
.
data
.
apsapprove3
.
employeeId
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove3Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"4"
):
{
case
(
"4"
):
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove4Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
appraisalCompentency
.
data
.
apsapprove4
.
employeeId
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove4Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"5"
):
{
case
(
"5"
):
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove5Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
appraisalCompentency
.
data
.
apsapprove5
.
employeeId
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
apsapprove5Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
default
:
{
return
}
default
:
{
return
}
...
@@ -122,19 +149,19 @@ export class EvaluationComponent implements OnInit {
...
@@ -122,19 +149,19 @@ export class EvaluationComponent implements OnInit {
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
switch
(
numberCheck
)
{
switch
(
numberCheck
)
{
case
(
1
):
{
case
(
1
):
{
return
+
(
this
.
setting
.
data
.
settingScore1
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck1
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore1
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck1
)
}
}
case
(
2
):
{
case
(
2
):
{
return
+
(
this
.
setting
.
data
.
settingScore2
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck2
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore2
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck2
)
}
}
case
(
3
):
{
case
(
3
):
{
return
+
(
this
.
setting
.
data
.
settingScore3
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck3
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore3
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck3
)
}
}
case
(
4
):
{
case
(
4
):
{
return
+
(
this
.
setting
.
data
.
settingScore4
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck4
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore4
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck4
)
}
}
case
(
5
):
{
case
(
5
):
{
return
+
(
this
.
setting
.
data
.
settingScore5
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck5
return
this
.
showNumber
((
this
.
setting
.
data
.
settingScore5
)
*
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
numberCheck5
)
}
}
default
:
{
return
}
default
:
{
return
}
}
}
...
@@ -144,17 +171,23 @@ export class EvaluationComponent implements OnInit {
...
@@ -144,17 +171,23 @@ export class EvaluationComponent implements OnInit {
calWeightTotal
()
{
calWeightTotal
()
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
0
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
0
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
(
this
.
calWeightScore
(
1
)
??
0
)
+
(
this
.
calWeightScore
(
2
)
??
0
)
+
(
this
.
calWeightScore
(
3
)
??
0
)
+
(
this
.
calWeightScore
(
4
)
??
0
)
+
(
this
.
calWeightScore
(
5
)
??
0
)
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
=
+
(((
this
.
calWeightScore
(
1
)
??
0
)
+
(
this
.
calWeightScore
(
2
)
??
0
)
+
(
this
.
calWeightScore
(
3
)
??
0
)
+
(
this
.
calWeightScore
(
4
)
??
0
)
+
(
this
.
calWeightScore
(
5
)
??
0
)).
toFixed
(
2
)
)
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
this
.
calAverageScore
()
this
.
calAverageScore
()
}
}
}
}
calAverageScore
()
{
calAverageScore
()
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
if
(
this
.
appraisalCompentency
.
data
?.
masfromEvaluationAssessment1lList
[
0
])
{
const
total
=
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
masfromEvaluationAssessment2List
.
map
((
x
:
any
)
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
length
).
reduce
((
acc
:
any
,
num
:
any
)
=>
acc
+
num
,
0
)
*
5
const
length
=
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
masfromEvaluationAssessment2List
.
map
((
x
:
any
)
=>
x
.
groupAssessment1
.
competencyIndicatorsCourses1Mini
.
behavioralIndicatorsList
.
length
).
reduce
((
acc
:
any
,
num
:
any
)
=>
acc
+
num
,
0
)
const
max
=
Math
.
max
(...[
+
(
this
.
setting
.
data
.
settingScore5
),
+
(
this
.
setting
.
data
.
settingScore4
),
+
(
this
.
setting
.
data
.
settingScore3
),
+
(
this
.
setting
.
data
.
settingScore2
),
+
(
this
.
setting
.
data
.
settingScore1
)])
const
total
=
length
*
max
if
(
total
)
{
if
(
total
)
{
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
0
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
0
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
(
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
/
total
)
*
100
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
averageScore
=
this
.
showNumber
((
this
.
appraisalCompentency
.
data
.
masfromEvaluationAssessment1lList
[
0
].
weightedTotal
*
100
)
/
total
)
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
}
}
...
@@ -205,12 +238,14 @@ export class EvaluationComponent implements OnInit {
...
@@ -205,12 +238,14 @@ export class EvaluationComponent implements OnInit {
}
else
{
}
else
{
date
=
dateInput
date
=
dateInput
}
}
}
else
{
return
''
}
}
return
date
?.
toLocaleDateString
(
'th-TH'
,
{
day
:
'numeric'
,
month
:
'long'
,
year
:
'numeric'
})
||
''
return
date
?.
toLocaleDateString
(
'th-TH'
,
{
day
:
'numeric'
,
month
:
'long'
,
year
:
'numeric'
})
||
''
}
}
showNumber
(
text
:
number
|
string
)
{
showNumber
(
text
:
number
|
string
)
{
const
num
=
Number
(
text
);
const
num
=
Number
(
text
);
return
isNaN
(
num
)
?
0
:
+
num
.
toFixed
(
2
);
return
isNaN
(
num
)
?
0
:
+
(
+
num
.
toFixed
(
2
)
);
}
}
returnPath
()
{
returnPath
()
{
this
.
sendReturnPath
.
emit
()
this
.
sendReturnPath
.
emit
()
...
...
src/app/components/performance-evaluation/idp-evaluation/idp-evalution.component.ts
View file @
bd3515dc
...
@@ -31,36 +31,44 @@ export class IdpEvalutionComponent {
...
@@ -31,36 +31,44 @@ export class IdpEvalutionComponent {
this
.
evaluationIdpService
.
getFormIdp
(
this
.
evaluationRoundId
,
this
.
evaluateeId
).
subscribe
({
this
.
evaluationIdpService
.
getFormIdp
(
this
.
evaluationRoundId
,
this
.
evaluateeId
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
formIdp
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
response
))
this
.
formIdp
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
response
))
console
.
log
(
" 🐒 this.formIdp.data:"
,
this
.
formIdp
.
data
?.
competencyIndicatorsCourses1
)
if
(
this
.
formIdp
.
data
)
{
this
.
canEdit
=
this
.
formIdp
.
data
.
currentStep
==
this
.
formIdp
.
data
.
checkStep
}
switch
(
this
.
formIdp
.
data
?.
currentStep
)
{
switch
(
this
.
formIdp
.
data
?.
currentStep
)
{
case
(
"0"
):
{
case
(
"0"
):
{
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsassessyDate
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
formIdp
.
data
.
apsassessy
.
employeeId
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsassessyDate
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"1"
):
{
case
(
"1"
):
{
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove1Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
formIdp
.
data
.
apsapprove1
.
employeeId
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove1Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"2"
):
{
case
(
"2"
):
{
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove2Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
formIdp
.
data
.
apsapprove2
.
employeeId
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove2Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"3"
):
{
case
(
"3"
):
{
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove3Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
formIdp
.
data
.
apsapprove3
.
employeeId
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove3Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"4"
):
{
case
(
"4"
):
{
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove4Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
formIdp
.
data
.
apsapprove4
.
employeeId
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove4Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
case
(
"5"
):
{
case
(
"5"
):
{
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove5Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
if
(
this
.
canEdit
)
{
this
.
canEdit
=
this
.
evaluaterId
==
this
.
formIdp
.
data
.
apsapprove5
.
employeeId
this
.
formIdp
.
data
.
masfromEvaluationIdp
.
apsapprove5Date
=
this
.
currentDate
.
toISOString
().
split
(
'T'
)[
0
];
}
break
break
}
}
default
:
{
return
}
default
:
{
return
}
...
...
src/app/components/performance-evaluation/self-evaluation/self-evaluation.component.html
View file @
bd3515dc
...
@@ -122,8 +122,8 @@
...
@@ -122,8 +122,8 @@
<button
type=
"button"
class=
"ti-btn rounded-sm "
(
click
)="
selectCompentencyForm
(
masfromEvaluationAssessment1
.
competencyType
.
competencyTypeId
);
onEdit =
true
;
<button
type=
"button"
class=
"ti-btn rounded-sm "
(
click
)="
selectCompentencyForm
(
masfromEvaluationAssessment1
.
competencyType
.
competencyTypeId
);
onEdit =
true
;
pathTitle =
['การประเมินผล',
'ประเมินตนเอง','ประเมินผล']"
pathTitle =
['การประเมินผล',
'ประเมินตนเอง','ประเมินผล']"
[
class
.
ti-btn-soft-secondary
]="
masfromEvaluationAssessment1
.
masfromStatusType
.
code =
=
'
employee
'"
[
class
.
ti-btn-soft-secondary
]="
masfromEvaluationAssessment1
.
masfromStatusType
.
code =
=
'
employee
'"
[
class
.
ti-btn-soft-warning
]="
masfromEvaluationAssessment1
.
masfromStatusType
.
code
!=
'
employee
'&&
masfromEvaluationAssessment1
.
masfromStatusType
.
code
!=
'
Boss_finish
'"
[
class
.
ti-btn-soft-warning
]="
masfromEvaluationAssessment1
.
masfromStatusType
.
code
=
=
'
evaluating
'"
[
class
.
ti-btn-soft-success
]="
masfromEvaluationAssessment1
.
masfromStatusType
.
code =
=
'
Boss
_finish
'"
>
[
class
.
ti-btn-soft-success
]="
masfromEvaluationAssessment1
.
masfromStatusType
.
code =
=
'
employee
_finish
'"
>
ประเมิน
ประเมิน
</button>
</button>
</td>
</td>
...
...
src/app/components/performance-evaluation/supervisor-evaluation/supervisor-evaluation.component.html
View file @
bd3515dc
...
@@ -107,8 +107,9 @@
...
@@ -107,8 +107,9 @@
<div
class=
"flex justify-center"
>
<div
class=
"flex justify-center"
>
<button
type=
"button"
class=
"ti-btn rounded-sm "
<button
type=
"button"
class=
"ti-btn rounded-sm "
*
ngFor=
"let type of item.typeList"
*
ngFor=
"let type of item.typeList"
[
class
.
ti-btn-soft-secondary
]="
type
.
statusType =
=
'
employee
'"
[
class
.
ti-btn-soft-mute
]="
type
.
statusType =
=
'
Not_evaluating_yet
'"
[
class
.
ti-btn-soft-warning
]="
type
.
statusType
!=
'
employee
'&&
type
.
statusType
!=
'
Boss_finish
'"
[
class
.
ti-btn-soft-secondary
]="
type
.
statusType =
=
'
Boss
'"
[
class
.
ti-btn-soft-warning
]="
type
.
statusType =
=
'
BossEvaluating
'"
[
class
.
ti-btn-soft-success
]="
type
.
statusType =
=
'
Boss_finish
'"
[
class
.
ti-btn-soft-success
]="
type
.
statusType =
=
'
Boss_finish
'"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(
click
)="
selectSubordinate
(
item
,
type
.
competencyTypeId
,
subordinate
.
select
?.
evaluationRoundId
);
pageEvalution=
'evaluation'
"
>
(
click
)="
selectSubordinate
(
item
,
type
.
competencyTypeId
,
subordinate
.
select
?.
evaluationRoundId
);
pageEvalution=
'evaluation'
"
>
...
@@ -119,8 +120,9 @@
...
@@ -119,8 +120,9 @@
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<div
class=
"flex justify-center"
>
<div
class=
"flex justify-center"
>
<button
type=
"button"
class=
"ti-btn rounded-sm"
<button
type=
"button"
class=
"ti-btn rounded-sm"
[
class
.
ti-btn-soft-secondary
]="
item
.
statusIdp
.
statusType =
=
'
employee
'"
[
class
.
ti-btn-soft-mute
]="
item
.
statusIdp
.
statusType =
=
'
Not_evaluating_yet
'"
[
class
.
ti-btn-soft-warning
]="
item
.
statusIdp
.
statusType
!=
'
employee
'&&
item
.
statusIdp
.
statusType
!=
'
Boss_finish
'"
[
class
.
ti-btn-soft-secondary
]="
item
.
statusIdp
.
statusType =
=
'
Boss
'"
[
class
.
ti-btn-soft-warning
]="
item
.
statusIdp
.
statusType =
=
'
BossEvaluating
'"
[
class
.
ti-btn-soft-success
]="
item
.
statusIdp
.
statusType =
=
'
Boss_finish
'"
[
class
.
ti-btn-soft-success
]="
item
.
statusIdp
.
statusType =
=
'
Boss_finish
'"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
style=
"height: 15px; width: 45px; font-size: 12px; display: flex; align-items: center; justify-content: center;margin-left:4px;"
(
click
)="
selectSubordinate
(
item
,'',
subordinate
.
select
?.
evaluationRoundId
);
pageEvalution=
'idp'
"
>
(
click
)="
selectSubordinate
(
item
,'',
subordinate
.
select
?.
evaluationRoundId
);
pageEvalution=
'idp'
"
>
...
...
src/app/components/performance-management-evaluation/assessment-management/evaluation-grouping/evaluation-grouping.component.html
View file @
bd3515dc
...
@@ -22,12 +22,12 @@
...
@@ -22,12 +22,12 @@
import
import
</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-45px m-0 shadow-md">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
<i class="ti ti-book fs-l"></i>
Help
Help
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/evaluation-cycle-performance/management-evaluation-cycle/management-evaluation-cycle.component.ts
View file @
bd3515dc
...
@@ -43,17 +43,9 @@ export class ManagementCycleComponent {
...
@@ -43,17 +43,9 @@ export class ManagementCycleComponent {
currentDate
=
new
Date
()
currentDate
=
new
Date
()
yearList
=
[
yearList
=
[
(
this
.
currentDate
.
getFullYear
()
-
5
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
4
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
3
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
3
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
4
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
5
)
+
""
,
]
]
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
constructor
(
private
pmsMasfromEvaluationCycleService
:
PmsMasfromEvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
...
...
src/app/components/performance-management-evaluation/name-registration-perfomance/assessment-topics/assessment-topics.component.html
View file @
bd3515dc
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
Delete
Delete
</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
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/pms-grade-registration/pms-grade-management/pms-grade-management.component.html
View file @
bd3515dc
...
@@ -43,12 +43,12 @@
...
@@ -43,12 +43,12 @@
Delete
Delete
</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
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component.html
View file @
bd3515dc
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
Save
Save
</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
</button>
</button>
</div>
</div>
-->
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/setting-performance-evalution/assessment-system-configuration/assessment-system-configuration.component.ts
View file @
bd3515dc
...
@@ -11,17 +11,9 @@ export class AssessmentSystemConfigurationComponent {
...
@@ -11,17 +11,9 @@ export class AssessmentSystemConfigurationComponent {
setting
:
{
loading
:
boolean
,
data
:
PmsSettingAssessmentModel
}
=
{
loading
:
false
,
data
:
new
MyPmsSettingAssessmentModel
()
}
setting
:
{
loading
:
boolean
,
data
:
PmsSettingAssessmentModel
}
=
{
loading
:
false
,
data
:
new
MyPmsSettingAssessmentModel
()
}
currentDate
=
new
Date
()
currentDate
=
new
Date
()
yearList
=
[
yearList
=
[
(
this
.
currentDate
.
getFullYear
()
-
5
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
4
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
3
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
-
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
())
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
2
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
3
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
4
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
5
)
+
""
,
]
]
constructor
(
private
pmsSettingAssessmentService
:
PmsSettingAssessmentService
,
constructor
(
private
pmsSettingAssessmentService
:
PmsSettingAssessmentService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
...
...
src/app/components/performance-management-evaluation/time-attendance/time-attendance-manage/time-attendance-manage.component.html
0 → 100644
View file @
bd3515dc
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
<div
class=
"flex items-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox pointer-events-none"
id=
"hs-default-checkbox"
[(
ngModel
)]="
isDataListChecked
"
>
<label
for=
"hs-default-checkbox"
class=
"text-sm text-gray-500 mx-2 pointer-events-none"
>
{{numDataListChecked}} Selected
</label>
</div>
<div
class=
"mx-1 flex items-center"
>
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;dataListCheckAll()"
id=
"checkbox"
class=
"focus:ring-2 focus:ring-primary rounded-sm flex item-center"
>
<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>
</button>
<label
class=
"text-sm text-gray-500 ml-2"
for=
"checkbox"
>
Select All
</label>
</div>
</div>
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
[(
ngModel
)]="
search
"
(
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"
>
<i
class=
"ri-search-line text-gray"
></i>
</div>
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(
click
)="
modalStatus=
'add'
;
selectData
()"
data-hs-overlay=
"#time-attendance-modal"
>
<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-10 m-0 shadow-md"
(
click
)="
modalStatus=
'deleteGroup'
;
selectData
()"
data-hs-overlay=
"#time-attendance-alert-modal"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</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>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto table-bordered rounded-top-0.65rem"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<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"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<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>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"pmsWorkingTime.loading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!pmsWorkingTime.loading&&!pmsWorkingTimeFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!pmsWorkingTime.loading&&pmsWorkingTimeFilter().length"
>
<tr
*
ngFor=
"let item of pmsWorkingTimeFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
id=
"checkbox-{{item.data.pmsWorkingTimeId}}"
>
</td>
<td>
<label
for=
"checkbox-{{item.data.pmsWorkingTimeId}}"
>
{{item.data.pmsWorkingTimeId}}
</label>
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.detailUnit}}
</td>
<td>
{{item.data.weight}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#time-attendance-modal"
(
click
)="
modalStatus=
'edit'
;
selectData
(
item
.
data
)"
></i>
<!-- <i class="ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay="#time-attendance-alert-modal"
(click)="modalStatus='delete';selectData(item.data)"></i> -->
</td>
</tr>
</tbody>
</table>
</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"
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 {{pmsWorkingTimeFilter().length
<10
?
pmsWorkingTimeFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
pmsWorkingTimeFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
pmsWorkingTimeFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
<div
id=
"time-attendance-modal"
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)] !max-w-1/2"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
{{modalStatus=='add'?'เพิ่มข้อมูลประเภทวัน':'แก้ไขข้อมูลประเภทวัน'}}
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#time-attendance-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"w-full flex justify-end"
>
<div
class=
"absolute flex"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clearData
(
modalStatus
)"
>
<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>
</div>
<!-- <div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
Help
</button>
</div> -->
</div>
</div>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<label
class=
"ti-form-label mt-2rem"
>
รหัส
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
class=
"ti-form-input w-1/2"
[
ngClass
]="{'
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
class=
"col-span-1 ml-1"
*
ngIf=
"f"
>
<ng-component
*
ngTemplateOutlet=
"emeventgrpSearchButton"
></ng-component>
</div>
</div>
<div
class=
"grid grid-cols-2"
*
ngIf=
"!pmsWorkingTime.select.emeventgrp.length"
>
<div
class=
"col-span-1"
>
<div
class=
"flex relative"
>
<input
type=
"text"
class=
"ti-form-input input-list-fl1 pointer-events-none"
readonly
>
<div
class=
"input-list-line-fl"
>
<div
class=
"input-list-line"
></div>
</div>
<input
type=
"text"
class=
"ti-form-input input-list-fl2 pointer-events-none"
readonly
>
</div>
</div>
<div
class=
"col-span-1 ml-1"
>
<ng-component
*
ngTemplateOutlet=
"emeventgrpSearchButton"
></ng-component>
</div>
</div>
<ng-template
#
emeventgrpSearchButton
>
<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 !m-0 h-full"
style=
"height: 44.8px !important;"
(
click
)="
modal
.
search=
''
;
modalSearchChange
(
eventgrpListFilter
())"
data-hs-overlay=
"#time-attendance-eventgrp-table-modal"
>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
</button>
</ng-template>
<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>
<!-- <input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.detailUnit"> -->
<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
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
.
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
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"
>
D (2 คะแนน) ชื่อ
</label>
<input
type=
"text"
class=
"ti-form-input col-span-10"
[(
ngModel
)]="
pmsWorkingTime
.
select
.
targetDDetail
"
>
</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
.
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
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"
>
E (1 คะแนน) ชื่อ
</label>
<input
type=
"text"
class=
"ti-form-input col-span-10"
[(
ngModel
)]="
pmsWorkingTime
.
select
.
targetEDetail
"
>
</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
.
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
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=
"#time-attendance-modal"
>
ย้อนกลับ
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#time-attendance-alert-modal"
[
class
.
ti-btn-disabled
]="!
pmsWorkingTime
.
select
.
pmsWorkingTimeId
||!
pmsWorkingTime
.
select
.
emeventgrp
.
length
||!
pmsWorkingTime
.
select
.
tdesc
"
[
disabled
]="!
pmsWorkingTime
.
select
.
pmsWorkingTimeId
||!
pmsWorkingTime
.
select
.
emeventgrp
.
length
||!
pmsWorkingTime
.
select
.
tdesc
"
>
บันทึกข้อมูล
</button>
</div>
</div>
</div>
</div>
</div>
<div
id=
"time-attendance-alert-modal"
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)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#time-attendance-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#time-attendance-alert-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</ng-container>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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=
"#time-attendance-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#time-attendance-alert-modal"
(
click
)="
updatePmsWorkingTime
()"
>
บันทึกข้อมูล
</a>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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=
"#time-attendance-alert-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
*
ngIf=
"numDataListChecked"
data-hs-overlay=
"#time-attendance-alert-modal"
(
click
)="
deletePmsWorkingTime
()"
>
ลบข้อมูล
</a>
</ng-container>
</div>
</div>
</div>
</div>
</div>
<div
id=
"time-attendance-eventgrp-table-modal"
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"
>
<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=
"#time-attendance-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"flex justify-end pb-1rem"
>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
[(
ngModel
)]="
modal
.
search
"
(
ngModelChange
)="
modalSearchChange
(
eventgrpListFilter
())"
>
<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>
<div
class=
"overflow-auto border"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead>
<tr>
<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"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"eventgrp.loading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!eventgrp.loading&&!eventgrpListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!eventgrp.loading&&eventgrpListFilter().length"
>
<tr
*
ngFor=
"let item of eventgrpListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectEventgrp
(
item
.
data
)"
data-hs-overlay=
"#time-attendance-modal"
>
<td>
{{item.data.eventgrpId}}
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.edesc}}
</td>
</tr>
</tbody>
</table>
</div>
<nav
class=
"pagination-style-3 my-5"
*
ngIf=
"modal.page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
modal
.
currentPage =
(modal.currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of modal.page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&&modal.currentPage!=1&&modal.currentPage!=2&&modal.currentPage!=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==modal.currentPage-1||item==modal.currentPage||item==modal.currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=modal.currentPage"
(
click
)="
modal
.
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==modal.page.length-2&&modal.currentPage!=modal.page.length&&modal.currentPage!=modal.page.length-1&&modal.currentPage!=modal.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
)="
modal
.
currentPage =
(modal.currentPage
>
modal.page.length-1 ? modal.currentPage: modal.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 {{((modal.currentPage-1) * 10)+1}} to {{eventgrpListFilter().length
<10
?
eventgrpListFilter
().
length:
(
modal
.
currentPage=
=modal.page.length
?
((
modal
.
currentPage
*
10
)
-
((
modal
.
currentPage
*
10
)
-
eventgrpListFilter
().
length
)
)
:
(
modal
.
currentPage
*
10
)
)
}}
of
{{
eventgrpListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
<div
class=
"flex justify-end mt-2rem mb-1rem space-x-4"
>
<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=
"#time-attendance-modal"
>
ย้อนกลับ
</button>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/performance-management-evaluation/time-attendance/time-attendance-manage/time-attendance-manage.component.scss
0 → 100644
View file @
bd3515dc
src/app/components/performance-management-evaluation/time-attendance/time-attendance-manage/time-attendance-manage.component.ts
0 → 100644
View file @
bd3515dc
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyEmeventgrpModel
}
from
'src/app/shared/model/emeventgrp.model'
;
import
{
EventgrpModel
,
MyEventgrpModel
,
}
from
'src/app/shared/model/eventgrp.model'
;
import
{
PmsWorkingTimeModel
,
MyPmsWorkingTimeModel
}
from
'src/app/shared/model/pms-working-time.model'
;
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
PmsWorkingTimeService
}
from
'src/app/shared/services/pms-working-time.service'
;
interface
table
{
currentPage
:
number
,
page
:
number
[],
search
:
string
}
@
Component
({
selector
:
'app-time-attendance-manage'
,
templateUrl
:
'./time-attendance-manage.component.html'
,
styleUrls
:
[
'./time-attendance-manage.component.scss'
]
})
export
class
TimeAttendanceManageComponent
{
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
currentPage
=
1
;
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
''
;
modalStatus
:
"add"
|
"edit"
|
"delete"
|
"deleteGroup"
=
"add"
modal
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
search
:
""
}
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
:
{
check
:
boolean
,
data
:
PmsWorkingTimeModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyPmsWorkingTimeModel
(),
dataList
:
[]
}
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
fileService
:
FileService
,
private
eventgrpService
:
EventgrpService
,
private
pmsWorkingTimeService
:
PmsWorkingTimeService
,
)
{
}
ngOnInit
():
void
{
this
.
getEventgrpList
()
this
.
getPmsWorkingTimeList
()
}
getPmsWorkingTimeList
()
{
this
.
pmsWorkingTime
.
loading
=
true
this
.
pmsWorkingTimeService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
pmsWorkingTime
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyPmsWorkingTimeModel
(
x
)
}))
this
.
pmsWorkingTime
.
loading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
()
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
pmsWorkingTimeFilter
()
{
return
this
.
pmsWorkingTime
.
dataList
.
filter
((
x
)
=>
{
const
data
=
x
.
data
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
);
this
.
dataListCheck
();
}
selectData
(
data
?:
PmsWorkingTimeModel
)
{
this
.
pmsWorkingTime
.
select
=
new
MyPmsWorkingTimeModel
(
data
)
}
dataListCheckAll
()
{
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
pmsWorkingTimeFilter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
pmsWorkingTimeFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
pmsWorkingTime
.
dataList
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
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
.
dataListCheckAll
()
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
.
modal
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
());
return
match
;
})
}
selectEventgrp
(
data
?:
EventgrpModel
)
{
if
(
!
data
)
{
this
.
pmsWorkingTime
.
select
.
emeventgrp
.
splice
(
this
.
eventgrp
.
selectIndex
,
1
);
return
;
}
this
.
pmsWorkingTime
.
select
.
emeventgrp
.
push
(
new
MyEmeventgrpModel
(
data
))
}
clearData
(
modalStatus
:
string
)
{
if
(
modalStatus
==
'add'
)
{
this
.
pmsWorkingTime
.
select
=
new
MyPmsWorkingTimeModel
()
}
else
if
(
modalStatus
==
'edit'
)
{
this
.
pmsWorkingTime
.
select
=
new
MyPmsWorkingTimeModel
({
pmsWorkingTimeId
:
this
.
pmsWorkingTime
.
select
.
pmsWorkingTimeId
})
}
this
.
eventgrp
.
selectList
=
[
new
MyEventgrpModel
()]
}
modalSearchChange
(
dataList
:
any
)
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
updatePmsWorkingTime
()
{
this
.
pmsWorkingTime
.
loading
=
true
this
.
pmsWorkingTimeService
.
post
(
new
MyPmsWorkingTimeModel
(
this
.
pmsWorkingTime
.
select
)).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmsWorkingTimeList
()
this
.
searchChange
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
}
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
deletePmsWorkingTime
()
{
let
body
:
PmsWorkingTimeModel
[]
=
[]
if
(
this
.
modalStatus
==
"deleteGroup"
)
{
body
=
this
.
pmsWorkingTime
.
dataList
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyPmsWorkingTimeModel
(
x
.
data
))
}
else
{
body
=
[
new
MyPmsWorkingTimeModel
(
this
.
pmsWorkingTime
.
select
)]
}
this
.
pmsWorkingTime
.
loading
=
true
this
.
pmsWorkingTimeService
.
delete
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmsWorkingTimeList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
})
}
}
src/app/components/performance-management-evaluation/time-attendance/time-attendance-statistics/time-attendance-statistics.component.html
0 → 100644
View file @
bd3515dc
<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"
>
<h5
class=
"text-xxl font-bold text-white"
>
นำเข้าข้อมูลสถิติเวลาทำงาน
</h5>
</div>
<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>
<div
class=
"mt-2rem p-2"
>
<div
class=
"flex rounded-md"
>
<input
#
fileInput
id=
"fileInput"
type=
"file"
(
change
)="
onFileSelected
($
event
)"
hidden
>
<input
type=
"text"
[
value
]="
selectedFileName
"
readonly
(
click
)="
fileInput
.
click
()"
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
()"
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"
>
<i
class=
"ti ti-upload"
></i>
</button>
</div>
<div
class=
"flex justify-center mt-2rem "
>
<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"
(
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=
"#company-registration-page-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
(
click
)="
uploadFile
()"
[
disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
อัปโหลด
</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/performance-management-evaluation/time-attendance/time-attendance-statistics/time-attendance-statistics.component.scss
0 → 100644
View file @
bd3515dc
src/app/components/performance-management-evaluation/time-attendance/time-attendance-statistics/time-attendance-statistics.component.ts
0 → 100644
View file @
bd3515dc
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
interface
table
{
currentPage
:
number
,
page
:
number
[],
search
:
string
}
@
Component
({
selector
:
'app-time-attendance-statistics'
,
templateUrl
:
'./time-attendance-statistics.component.html'
,
styleUrls
:
[
'./time-attendance-statistics.component.scss'
]
})
export
class
TimeAttendanceStatisticsComponent
{
selectedFile
:
File
|
null
=
null
;
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
fileService
:
FileService
)
{
}
onFileSelected
(
event
:
any
)
{
this
.
selectedFile
=
event
.
target
.
files
.
length
>
0
?
event
.
target
.
files
[
0
]
:
null
;
this
.
selectedFileName
=
this
.
selectedFile
?.
name
||
"กรุณาเลือกไฟล์"
}
uploadFile
()
{
if
(
!
this
.
selectedFile
)
{
alert
(
'กรุณาเลือกไฟล์ก่อนอัปโหลด'
)
return
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
fileService
.
uploadExcel
(
formData
,
'PMS_WORKING_TIME_EMP'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
cdr
.
detectChanges
();
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
cdr
.
detectChanges
();
}
})
}
downloadFile
()
{
const
fileName
=
'IMPORT_PMS_WORKING_TIME_EMP.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'
)
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
\ No newline at end of file
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.html
View file @
bd3515dc
...
@@ -11,591 +11,23 @@
...
@@ -11,591 +11,23 @@
<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 =
['การประเมินจัดการประสิทธิภาพ','ทะเบียนการประเมินเวลาทำงาน','การจัดการหัวข้อการประเมินเวลาทำงาน']
;currentPath=1
"
>
การจัดการหัวข้อการประเมินเวลาทำงาน
การจัดการหัวข้อการประเมินเวลาทำงาน
</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"
href=
"javascript:void(0);"
id=
"underline-item-2"
data-hs-tab=
"#underline-2"
aria-controls=
"underline-2"
(
click
)="
pathTitle =
['การประเมินจัดการประสิทธิภาพ','ทะเบียนการประเมินเวลาทำงาน'
,'การจัดการข้อมูลสถิติเวลาทำงาน'];
currentPath=
2"
>
การจัดการข้อมูลสถิติเวลาทำงาน
</a>
</nav>
</nav>
</div>
</div>
<div
class=
"px-2rem pt-50px !-mt-3 pt-50px"
>
<div
class=
"px-2rem pt-50px !-mt-3 pt-50px"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<div
*
ngIf=
"currentPath==1"
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<ng-container
*
ngTemplateOutlet=
"timeAttendance"
></ng-container>
<app-time-attendance-manage></app-time-attendance-manage>
</div>
</div>
</div>
</div>
<ng-template
#
timeAttendance
>
<div
class=
"w-full min-height-50px mb-10px justify-between items-center"
>
<div
class=
"flex justify-between"
>
<div
class=
"flex"
>
<div
class=
"flex items-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox pointer-events-none"
id=
"hs-default-checkbox"
[(
ngModel
)]="
isDataListChecked
"
>
<label
for=
"hs-default-checkbox"
class=
"text-sm text-gray-500 mx-2 pointer-events-none"
>
{{numDataListChecked}} Selected
</label>
</div>
<div
class=
"mx-1 flex items-center"
>
<button
(
click
)="
isDataListCheckedAll =
!isDataListCheckedAll;dataListCheckAll()"
id=
"checkbox"
class=
"focus:ring-2 focus:ring-primary rounded-sm flex item-center"
>
<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>
</button>
<label
class=
"text-sm text-gray-500 ml-2"
for=
"checkbox"
>
Select All
</label>
</div>
</div>
<div
class=
"flex justify-end"
>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
style=
"height: 40px;"
[(
ngModel
)]="
search
"
(
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"
>
<i
class=
"ri-search-line text-gray"
></i>
</div>
</div>
</div>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-10 m-0 shadow-md"
(
click
)="
modalStatus=
'add'
;
selectData
()"
data-hs-overlay=
"#time-attendance-modal"
>
<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-10 m-0 shadow-md"
(
click
)="
modalStatus=
'deleteGroup'
;
selectData
()"
data-hs-overlay=
"#time-attendance-alert-modal"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</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>
<div
class=
"page px-rem"
>
<div
class=
"overflow-auto table-bordered rounded-top-0.65rem"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead
class=
"height-50px"
>
<tr
class=
"font-size-12px"
>
<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"
[
class
.!
text-center
]="
f
||
l
"
>
<span
class=
"font-size-12px font-weight-700"
>
{{ item }}
</span>
<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>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"pmsWorkingTime.loading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!pmsWorkingTime.loading&&!pmsWorkingTimeFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!pmsWorkingTime.loading&&pmsWorkingTimeFilter().length"
>
<tr
*
ngFor=
"let item of pmsWorkingTimeFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
[(
ngModel
)]="
item
.
check
"
(
ngModelChange
)="
dataListCheck
()"
id=
"checkbox-{{item.data.pmsWorkingTimeId}}"
>
</td>
<td>
<label
for=
"checkbox-{{item.data.pmsWorkingTimeId}}"
>
{{item.data.pmsWorkingTimeId}}
</label>
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.detailUnit}}
</td>
<td>
{{item.data.weight}}
</td>
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#time-attendance-modal"
(
click
)="
modalStatus=
'edit'
;
selectData
(
item
.
data
)"
></i>
<!-- <i class="ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay="#time-attendance-alert-modal"
(click)="modalStatus='delete';selectData(item.data)"></i> -->
</td>
</tr>
</tbody>
</table>
</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"
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 {{pmsWorkingTimeFilter().length
<10
?
pmsWorkingTimeFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
pmsWorkingTimeFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
pmsWorkingTimeFilter
().
length
}}
items
</
span
>
</ul>
</nav>
</div>
</ng-template>
<div
id=
"time-attendance-modal"
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)] !max-w-1/2"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
{{modalStatus=='add'?'เพิ่มข้อมูลประเภทวัน':'แก้ไขข้อมูลประเภทวัน'}}
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#time-attendance-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"w-full flex justify-end"
>
<div
class=
"absolute flex"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-indigo h-45px m-0 shadow-md"
(
click
)="
clearData
(
modalStatus
)"
>
<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>
</div>
<!-- <div class="px-1">
<button href="javascript:void(0);" class="ti-btn ti-btn-soft-warning h-45px m-0 shadow-md">
<i class="ti ti-book fs-l"></i>
Help
</button>
</div> -->
</div>
</div>
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<label
class=
"ti-form-label mt-2rem"
>
รหัส
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
class=
"ti-form-input w-1/2"
[
ngClass
]="{'
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
class=
"col-span-1 ml-1"
*
ngIf=
"f"
>
<ng-component
*
ngTemplateOutlet=
"emeventgrpSearchButton"
></ng-component>
</div>
</div>
<div
class=
"grid grid-cols-2"
*
ngIf=
"!pmsWorkingTime.select.emeventgrp.length"
>
<div
class=
"col-span-1"
>
<div
class=
"flex relative"
>
<input
type=
"text"
class=
"ti-form-input input-list-fl1 pointer-events-none"
readonly
>
<div
class=
"input-list-line-fl"
>
<div
class=
"input-list-line"
></div>
</div>
<input
type=
"text"
class=
"ti-form-input input-list-fl2 pointer-events-none"
readonly
>
</div>
</div>
<div
class=
"col-span-1 ml-1"
>
<ng-component
*
ngTemplateOutlet=
"emeventgrpSearchButton"
></ng-component>
</div>
</div>
<ng-template
#
emeventgrpSearchButton
>
<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 !m-0 h-full"
style=
"height: 44.8px !important;"
(
click
)="
modal
.
search=
''
;
modalSearchChange
(
eventgrpListFilter
())"
data-hs-overlay=
"#time-attendance-eventgrp-table-modal"
>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
</button>
</ng-template>
<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>
<!-- <input type="text" class="ti-form-input" [(ngModel)]="pmsWorkingTime.select.detailUnit"> -->
<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
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
.
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
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"
>
D (2 คะแนน) ชื่อ
</label>
<input
type=
"text"
class=
"ti-form-input col-span-10"
[(
ngModel
)]="
pmsWorkingTime
.
select
.
targetDDetail
"
>
</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
.
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
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"
>
E (1 คะแนน) ชื่อ
</label>
<input
type=
"text"
class=
"ti-form-input col-span-10"
[(
ngModel
)]="
pmsWorkingTime
.
select
.
targetEDetail
"
>
</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
.
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
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=
"#time-attendance-modal"
>
ย้อนกลับ
</button>
<button
type=
"button"
class=
"ti-btn ti-btn-success"
data-hs-overlay=
"#time-attendance-alert-modal"
[
class
.
ti-btn-disabled
]="!
pmsWorkingTime
.
select
.
pmsWorkingTimeId
||!
pmsWorkingTime
.
select
.
emeventgrp
.
length
||!
pmsWorkingTime
.
select
.
tdesc
"
[
disabled
]="!
pmsWorkingTime
.
select
.
pmsWorkingTimeId
||!
pmsWorkingTime
.
select
.
emeventgrp
.
length
||!
pmsWorkingTime
.
select
.
tdesc
"
>
บันทึกข้อมูล
</button>
</div>
</div>
</div>
</div>
</div>
<div
id=
"time-attendance-alert-modal"
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)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#time-attendance-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#time-attendance-alert-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</ng-container>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<ng-container
*
ngIf=
"numDataListChecked"
>
ยืนยันการลบข้อมูลหรือไม่
</ng-container>
<ng-container
*
ngIf=
"!numDataListChecked"
>
เลือกข้อมูลที่ต้องการลบ
</ng-container>
</ng-container>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<ng-container
*
ngIf=
"modalStatus=='add'||modalStatus=='edit'"
>
<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=
"#time-attendance-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#time-attendance-alert-modal"
(
click
)="
updatePmsWorkingTime
()"
>
บันทึกข้อมูล
</a>
</ng-container>
<ng-container
*
ngIf=
"modalStatus=='delete'||modalStatus=='deleteGroup'"
>
<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=
"#time-attendance-alert-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
*
ngIf=
"numDataListChecked"
data-hs-overlay=
"#time-attendance-alert-modal"
(
click
)="
deletePmsWorkingTime
()"
>
ลบข้อมูล
</a>
</ng-container>
</div>
</div>
</div>
</div>
</div>
<div
id=
"time-attendance-eventgrp-table-modal"
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"
>
<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=
"#time-attendance-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"
>
<div
*
ngIf=
"currentPath==2"
id=
"underline-2"
role=
"tabpanel"
aria-labelledby=
"underline-item-2"
>
<div
class=
"flex justify-end pb-1rem"
>
<app-time-attendance-statistics></app-time-attendance-statistics>
<div
class=
"px-1"
>
<div
class=
"relative shadow-md"
>
<input
type=
"text"
class=
"ti-form-input ltr:pl-11 rtl:pr-11 focus:z-10 "
placeholder=
"Search by No. or Name"
[(
ngModel
)]="
modal
.
search
"
(
ngModelChange
)="
modalSearchChange
(
eventgrpListFilter
())"
>
<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>
<div
class=
"overflow-auto border"
>
<table
class=
"ti-custom-table ti-custom-table-head ti-custom-table-hover"
>
<thead>
<tr>
<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"
>
<span
class=
"text-sm"
>
{{ item }}
</span>
<div
class=
"absolute top-1/2 transform -translate-y-1/2 right-0"
*
ngIf=
"!l"
>
<i
class=
"ti ti-dots-vertical fs-l"
></i>
</div>
</th>
</ng-container>
</tr>
</thead>
<tbody
*
ngIf=
"eventgrp.loading"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
<div
*
ngFor=
"let item of [1,2,3]"
class=
"ti-spinner w-8 h-8 text-secondary mx-1"
role=
"status"
aria-label=
"loading"
>
<span
class=
"sr-only"
>
Loading...
</span>
</div>
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!eventgrp.loading&&!eventgrpListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"!eventgrp.loading&&eventgrpListFilter().length"
>
<tr
*
ngFor=
"let item of eventgrpListFilter() | slice:((modal.currentPage-1) * 10) : (((modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectEventgrp
(
item
.
data
)"
data-hs-overlay=
"#time-attendance-modal"
>
<td>
{{item.data.eventgrpId}}
</td>
<td>
{{item.data.tdesc}}
</td>
<td>
{{item.data.edesc}}
</td>
</tr>
</tbody>
</table>
</div>
<nav
class=
"pagination-style-3 my-5"
*
ngIf=
"modal.page.length"
>
<ul
class=
"ti-pagination"
>
<li>
<a
aria-label=
"anchor"
class=
"page-link"
href=
"javascript:void(0);"
(
click
)="
modal
.
currentPage =
(modal.currentPage-1
||
1
)"
>
<i
class=
"ri-arrow-left-s-line align-middle rtl:rotate-180"
></i>
</a>
</li>
<li
*
ngFor=
"let item of modal.page;let f = first;let l = last"
>
<ng-container
*
ngIf=
"item==3&&modal.currentPage!=1&&modal.currentPage!=2&&modal.currentPage!=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==modal.currentPage-1||item==modal.currentPage||item==modal.currentPage+1)"
>
<a
class=
"page-link"
href=
"javascript:void(0);"
[
class
.
active
]="
item=
=modal.currentPage"
(
click
)="
modal
.
currentPage=
item"
>
{{item}}
</a>
</ng-container>
<ng-container
*
ngIf=
"item==modal.page.length-2&&modal.currentPage!=modal.page.length&&modal.currentPage!=modal.page.length-1&&modal.currentPage!=modal.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
)="
modal
.
currentPage =
(modal.currentPage
>
modal.page.length-1 ? modal.currentPage: modal.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 {{((modal.currentPage-1) * 10)+1}} to {{eventgrpListFilter().length
<10
?
eventgrpListFilter
().
length:
(
modal
.
currentPage=
=modal.page.length
?
((
modal
.
currentPage
*
10
)
-
((
modal
.
currentPage
*
10
)
-
eventgrpListFilter
().
length
)
)
:
(
modal
.
currentPage
*
10
)
)
}}
of
{{
eventgrpListFilter
().
length
}}
items
</
span
>
</ul>
</nav>
<div
class=
"flex justify-end mt-2rem mb-1rem space-x-4"
>
<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=
"#time-attendance-modal"
>
ย้อนกลับ
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.ts
View file @
bd3515dc
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
MyEmeventgrpModel
}
from
'src/app/shared/model/emeventgrp.model'
;
import
{
EventgrpModel
,
MyEventgrpModel
,
}
from
'src/app/shared/model/eventgrp.model'
;
import
{
PmsWorkingTimeModel
,
MyPmsWorkingTimeModel
}
from
'src/app/shared/model/pms-working-time.model'
;
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
PmsWorkingTimeService
}
from
'src/app/shared/services/pms-working-time.service'
;
interface
table
{
interface
table
{
currentPage
:
number
,
currentPage
:
number
,
page
:
number
[],
page
:
number
[],
...
@@ -18,176 +11,5 @@ interface table {
...
@@ -18,176 +11,5 @@ interface table {
})
})
export
class
TimeAttendanceComponent
{
export
class
TimeAttendanceComponent
{
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'ทะเบียนการประเมินเวลาทำงาน'
,
'การจัดการหัวข้อการประเมินเวลาทำงาน'
]
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'ทะเบียนการประเมินเวลาทำงาน'
,
'การจัดการหัวข้อการประเมินเวลาทำงาน'
]
currentPath
=
1
numDataListChecked
=
0
isDataListChecked
=
false
isDataListCheckedAll
=
false
currentPage
=
1
;
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
search
=
''
;
modalStatus
:
"add"
|
"edit"
|
"delete"
|
"deleteGroup"
=
"add"
modal
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
search
:
""
}
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
:
{
check
:
boolean
,
data
:
PmsWorkingTimeModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyPmsWorkingTimeModel
(),
dataList
:
[]
}
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
fileService
:
FileService
,
private
eventgrpService
:
EventgrpService
,
private
pmsWorkingTimeService
:
PmsWorkingTimeService
,
)
{
}
ngOnInit
():
void
{
this
.
getEventgrpList
()
this
.
getPmsWorkingTimeList
()
}
getPmsWorkingTimeList
()
{
this
.
pmsWorkingTime
.
loading
=
true
this
.
pmsWorkingTimeService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
pmsWorkingTime
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyPmsWorkingTimeModel
(
x
)
}))
this
.
pmsWorkingTime
.
loading
=
false
this
.
isDataListCheckedAll
=
false
this
.
dataListCheckAll
()
this
.
searchChange
()
this
.
cdr
.
detectChanges
();
},
error
:
error
=>
{
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
pmsWorkingTimeFilter
()
{
return
this
.
pmsWorkingTime
.
dataList
.
filter
((
x
)
=>
{
const
data
=
x
.
data
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
);
this
.
dataListCheck
();
}
selectData
(
data
?:
PmsWorkingTimeModel
)
{
this
.
pmsWorkingTime
.
select
=
new
MyPmsWorkingTimeModel
(
data
)
}
dataListCheckAll
()
{
const
selectAll
=
this
.
isDataListCheckedAll
;
this
.
pmsWorkingTimeFilter
().
forEach
(
x
=>
x
.
check
=
selectAll
);
this
.
dataListCheck
();
}
dataListCheck
()
{
const
dataCheck
=
this
.
pmsWorkingTimeFilter
();
this
.
isDataListCheckedAll
=
dataCheck
.
length
?
dataCheck
.
every
(
x
=>
x
.
check
)
:
false
;
this
.
numDataListChecked
=
this
.
pmsWorkingTime
.
dataList
.
filter
(
x
=>
x
.
check
).
length
;
this
.
isDataListChecked
=
Boolean
(
this
.
numDataListChecked
)
}
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
.
dataListCheckAll
()
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
.
modal
.
search
.
toLowerCase
())
||
data
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
data
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
());
return
match
;
})
}
selectEventgrp
(
data
?:
EventgrpModel
)
{
if
(
!
data
)
{
this
.
pmsWorkingTime
.
select
.
emeventgrp
.
splice
(
this
.
eventgrp
.
selectIndex
,
1
);
return
;
}
this
.
pmsWorkingTime
.
select
.
emeventgrp
.
push
(
new
MyEmeventgrpModel
(
data
))
}
clearData
(
modalStatus
:
string
)
{
if
(
modalStatus
==
'add'
)
{
this
.
pmsWorkingTime
.
select
=
new
MyPmsWorkingTimeModel
()
}
else
if
(
modalStatus
==
'edit'
)
{
this
.
pmsWorkingTime
.
select
=
new
MyPmsWorkingTimeModel
({
pmsWorkingTimeId
:
this
.
pmsWorkingTime
.
select
.
pmsWorkingTimeId
})
}
this
.
eventgrp
.
selectList
=
[
new
MyEventgrpModel
()]
}
modalSearchChange
(
dataList
:
any
)
{
this
.
modal
.
currentPage
=
1
this
.
modal
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
dataList
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
}
updatePmsWorkingTime
()
{
this
.
pmsWorkingTime
.
loading
=
true
this
.
pmsWorkingTimeService
.
post
(
new
MyPmsWorkingTimeModel
(
this
.
pmsWorkingTime
.
select
)).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmsWorkingTimeList
()
this
.
searchChange
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
}
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
deletePmsWorkingTime
()
{
let
body
:
PmsWorkingTimeModel
[]
=
[]
if
(
this
.
modalStatus
==
"deleteGroup"
)
{
body
=
this
.
pmsWorkingTime
.
dataList
.
filter
(
x
=>
x
.
check
).
map
(
x
=>
new
MyPmsWorkingTimeModel
(
x
.
data
))
}
else
{
body
=
[
new
MyPmsWorkingTimeModel
(
this
.
pmsWorkingTime
.
select
)]
}
this
.
pmsWorkingTime
.
loading
=
true
this
.
pmsWorkingTimeService
.
delete
(
body
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
getPmsWorkingTimeList
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
pmsWorkingTime
.
loading
=
false
this
.
cdr
.
detectChanges
()
}
})
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
})
}
}
}
src/app/shared/components/sidebar/sidebar.component.ts
View file @
bd3515dc
...
@@ -85,6 +85,7 @@ export class SidebarComponent {
...
@@ -85,6 +85,7 @@ export class SidebarComponent {
this
.
getConfigPermissionByUserLevel
()
this
.
getConfigPermissionByUserLevel
()
this
.
ParentActive
();
this
.
ParentActive
();
this
.
router
.
events
.
subscribe
((
event
)
=>
{
this
.
router
.
events
.
subscribe
((
event
)
=>
{
sessionStorage
.
setItem
(
'currentUrl'
,
this
.
router
.
url
)
if
(
event
instanceof
NavigationEnd
)
{
if
(
event
instanceof
NavigationEnd
)
{
this
.
ParentActive
();
this
.
ParentActive
();
}
}
...
@@ -115,33 +116,41 @@ export class SidebarComponent {
...
@@ -115,33 +116,41 @@ export class SidebarComponent {
this
.
configPermission
.
data
=
new
MyConfigPermissionModel
(
response
)
this
.
configPermission
.
data
=
new
MyConfigPermissionModel
(
response
)
this
.
menuItems
.
forEach
(
x
=>
{
this
.
menuItems
.
forEach
(
x
=>
{
// เปิดทุกเมนู
// เปิดทุกเมนู
x
.
show
=
true
//
x.show = true
x
.
children
?.
forEach
(
y
=>
{
//
x.children?.forEach(y => {
y
.
show
=
true
//
y.show = true
})
//
})
// เปิดตาม config
// เปิดตาม config
// const configMenu = this.configPermission.data.menuBody.find(y => y.id == x.id)
const
configMenu
=
this
.
configPermission
.
data
.
menuBody
.
find
(
y
=>
y
.
id
==
x
.
id
)
// if (configMenu) {
if
(
configMenu
)
{
// x.show = configMenu.show
x
.
show
=
configMenu
.
show
// x.children?.forEach(y => {
// const configChildren = configMenu.children.find(z => z.id == y.id)
// if (configChildren) {
// y.show = configChildren.show
// }
// })
// }
})
let
path404check
=
'/404page'
this
.
menuItems
.
forEach
(
x
=>
{
if
(
x
.
show
&&
path404check
==
'/404page'
)
{
x
.
children
?.
forEach
(
y
=>
{
x
.
children
?.
forEach
(
y
=>
{
if
(
y
.
show
)
{
const
configChildren
=
configMenu
.
children
.
find
(
z
=>
z
.
id
==
y
.
id
)
path404check
=
y
.
path
||
'404page'
if
(
configChildren
)
{
y
.
show
=
configChildren
.
show
}
}
})
})
}
}
})
})
let
path404check
=
'/404page'
this
.
menuItems
.
forEach
(
x
=>
{
const
children
=
x
.
children
?.
find
(
y
=>
y
.
path
==
sessionStorage
.
getItem
(
'currentUrl'
))
if
(
children
?.
show
&&
path404check
==
'/404page'
)
{
path404check
=
children
.
path
||
'/404page'
}
})
if
(
path404check
==
'/404page'
)
{
this
.
menuItems
.
forEach
(
x
=>
{
if
(
x
.
show
&&
path404check
==
'/404page'
)
{
x
.
children
?.
forEach
(
y
=>
{
if
(
y
.
show
)
{
path404check
=
y
.
path
||
'404page'
}
})
}
})
}
this
.
router
.
navigate
([
path404check
]);
this
.
router
.
navigate
([
path404check
]);
this
.
configPermission
.
loading
=
false
this
.
configPermission
.
loading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
...
...
src/app/shared/model/appraisal-competency.model.ts
View file @
bd3515dc
...
@@ -740,6 +740,7 @@ export interface AppraisalCompentencyModel2 {
...
@@ -740,6 +740,7 @@ export interface AppraisalCompentencyModel2 {
masfromEvaluationAssessment1lList
:
MasfromEvaluationAssessment1lList
[]
masfromEvaluationAssessment1lList
:
MasfromEvaluationAssessment1lList
[]
currentStep
:
string
currentStep
:
string
lastStep
:
string
lastStep
:
string
checkStep
:
string
masfromStatusType
:
MasfromStatusType
masfromStatusType
:
MasfromStatusType
}
}
export
interface
MasfromStatusType
{
export
interface
MasfromStatusType
{
...
...
src/app/shared/model/appraisal-subordinate.model.ts
View file @
bd3515dc
...
@@ -19,6 +19,8 @@ export interface Masfromevaluationassessment {
...
@@ -19,6 +19,8 @@ export interface Masfromevaluationassessment {
shortName
:
string
,
shortName
:
string
,
statusType
:
string
statusType
:
string
}
}
checkStep
:
string
currentStep
:
string
}
}
export
interface
MasfromStatusType
{
export
interface
MasfromStatusType
{
...
...
src/app/shared/model/idp-form.model.ts
View file @
bd3515dc
...
@@ -15,6 +15,7 @@ export interface IdpFormModel {
...
@@ -15,6 +15,7 @@ export interface IdpFormModel {
masfromEvaluationIdp
:
MasfromEvaluationIdp
masfromEvaluationIdp
:
MasfromEvaluationIdp
competencyIndicatorsCourses1
:
CompetencyIndicatorsCourses1
[]
competencyIndicatorsCourses1
:
CompetencyIndicatorsCourses1
[]
boss
:
Boss
boss
:
Boss
checkStep
:
string
}
}
export
interface
PersonalLevel
{
export
interface
PersonalLevel
{
...
...
src/assets/css/style.css
View file @
bd3515dc
...
@@ -25027,5 +25027,9 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
...
@@ -25027,5 +25027,9 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
}
}
.ti-btn-soft-mute
:hover
{
.ti-btn-soft-mute
:hover
{
background-color
:
rgb
(
0
0
0
/
0.5
);
background-color
:
rgb
(
0
0
0
/
0.5
);
color
:
white
color
:
white
;
}
.
\
!
border-red
{
border-color
:
red
!important
;
}
}
src/assets/template/IMPORT_PMS_WORKING_TIME_EMP.xlsx
0 → 100644
View file @
bd3515dc
File added
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