Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
myAppraisal
Commits
93acff53
Commit
93acff53
authored
Mar 05, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
การประเมินจัดการประสิทธิภาพ
ทะเบียนการประเมินเวลาทำงาน การจัดการหัวข้อการประเมินเวลาทำงาน
parent
fd68d956
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
650 additions
and
5 deletions
+650
-5
dashboard-routing.module.ts
src/app/components/dashboard/dashboard-routing.module.ts
+3
-1
dashboard.module.ts
src/app/components/dashboard/dashboard.module.ts
+3
-1
time-attendance.component.html
...evaluation/time-attendance/time-attendance.component.html
+510
-0
time-attendance.component.scss
...evaluation/time-attendance/time-attendance.component.scss
+0
-0
time-attendance.component.ts
...t-evaluation/time-attendance/time-attendance.component.ts
+124
-0
navservice.ts
src/app/shared/services/navservice.ts
+1
-0
style.css
src/assets/css/style.css
+9
-3
No files found.
src/app/components/dashboard/dashboard-routing.module.ts
View file @
93acff53
...
@@ -41,6 +41,7 @@ import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluati
...
@@ -41,6 +41,7 @@ import { SelfEvaluationComponent } from '../performance-evaluation/self-evaluati
import
{
IdpEvalutionComponent
}
from
'../performance-evaluation/idp-evaluation/idp-evalution.component'
;
import
{
IdpEvalutionComponent
}
from
'../performance-evaluation/idp-evaluation/idp-evalution.component'
;
import
{
PmsGradeRegistrationComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-pms-grade-registration.component'
;
import
{
PmsGradeRegistrationComponent
}
from
'../performance-management-evaluation/pms-grade-registration/pms-pms-grade-registration.component'
;
import
{
DayTypeRegistryComponent
}
from
'../company-components/day-type-registry/day-type-registry.component'
;
import
{
DayTypeRegistryComponent
}
from
'../company-components/day-type-registry/day-type-registry.component'
;
import
{
TimeAttendanceComponent
}
from
'../performance-management-evaluation/time-attendance/time-attendance.component'
;
...
@@ -89,7 +90,8 @@ const routes: Routes = [
...
@@ -89,7 +90,8 @@ const routes: Routes = [
{
path
:
"grade-registration-sub"
,
title
:
'ทะเบียนเกรด'
,
component
:
PmsGradeRegistrationComponent
},
{
path
:
"grade-registration-sub"
,
title
:
'ทะเบียนเกรด'
,
component
:
PmsGradeRegistrationComponent
},
{
path
:
"setting-performance-evalution"
,
title
:
'การตั้งค่า'
,
component
:
SettingPerformanceEvalutionComponent
},
{
path
:
"setting-performance-evalution"
,
title
:
'การตั้งค่า'
,
component
:
SettingPerformanceEvalutionComponent
},
{
path
:
"self-evaluation"
,
title
:
'ประเมินตนเอง'
,
component
:
SelfEvaluationComponent
},
{
path
:
"self-evaluation"
,
title
:
'ประเมินตนเอง'
,
component
:
SelfEvaluationComponent
},
{
path
:
"day-type-registry"
,
title
:
'ประเมินตนเอง'
,
component
:
DayTypeRegistryComponent
}
{
path
:
"day-type-registry"
,
title
:
'ประเมินตนเอง'
,
component
:
DayTypeRegistryComponent
},
{
path
:
"time-attendance"
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
component
:
TimeAttendanceComponent
}
]
]
}
}
];
];
...
...
src/app/components/dashboard/dashboard.module.ts
View file @
93acff53
...
@@ -153,6 +153,7 @@ import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-
...
@@ -153,6 +153,7 @@ import { EvaluationAssessmentService } from 'src/app/shared/services/evaluation-
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
import
{
AppraisalService
}
from
'src/app/shared/services/appraisal.service'
;
import
{
DayTypeRegistryComponent
}
from
'../company-components/day-type-registry/day-type-registry.component'
;
import
{
DayTypeRegistryComponent
}
from
'../company-components/day-type-registry/day-type-registry.component'
;
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
TimeAttendanceComponent
}
from
'../performance-management-evaluation/time-attendance/time-attendance.component'
;
export
const
MY_DATE_FORMATS
=
{
export
const
MY_DATE_FORMATS
=
{
parse
:
{
parse
:
{
...
@@ -276,7 +277,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
...
@@ -276,7 +277,8 @@ export class CustomDateAdapter extends NativeDateAdapter {
PmsGradeManagementComponent
,
PmsGradeManagementComponent
,
PmsGroupGradeComponent
,
PmsGroupGradeComponent
,
PmsSubGradeRegistrationComponent
,
PmsSubGradeRegistrationComponent
,
DayTypeRegistryComponent
DayTypeRegistryComponent
,
TimeAttendanceComponent
],
],
imports
:
[
imports
:
[
CommonModule
,
CommonModule
,
...
...
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.html
0 → 100644
View file @
93acff53
<app-page-header
[
pathTitle
]="
pathTitle
"
></app-page-header>
<div
class=
"bg-card-white"
>
</div>
<div
class=
"block-main-content"
>
<div
class=
"font-size-18px font-weight-700 pt-1.5rem text-primary px-2rem"
>
ทะเบียนการประเมินเวลาทำงาน
</div>
<div
class=
"page pt-0.75rem"
>
<div
class=
"border-b border-gray-200 dark:border-white/10 px-8"
>
<nav
class=
"-mb-0.5 flex space-x-6 rtl:space-x-reverse"
>
<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"
aria-controls=
"underline-1"
(
click
)="
pathTitle =
['การประเมินจัดการประสิทธิภาพ','ทะเบียนการประเมินเวลาทำงาน','การจัดการหัวข้อการประเมินเวลาทำงาน']"
>
การจัดการหัวข้อการประเมินเวลาทำงาน
</a>
</nav>
</div>
<div
class=
"px-2rem pt-50px !-mt-3 pt-50px"
>
<div
id=
"underline-1"
role=
"tabpanel"
aria-labelledby=
"underline-item-1"
>
<ng-container
*
ngTemplateOutlet=
"timeAttendance"
></ng-container>
</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 ['','รหัส','ชื่อหัวข้อ','หน่วยนับ','น้ำหนัก','Action']; 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=
"!dataListFilter().length"
>
<tr>
<td
class=
"text-center"
colspan=
"100%"
>
ไม่พบข้อมูล
</td>
</tr>
</tbody>
<tbody
*
ngIf=
"dataListFilter().length"
>
<tr
*
ngFor=
"let item of dataListFilter() | 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.code}}">
</td>
<td class="text-center">
<label for="checkbox-{{item.code}}"> {{item.code}}</label>
</td>
<td>{{item.tdesc}}</td>
<td>{{item.edesc}}</td>
<td class="flex justify-center">
<i class="ti ti-edit cursor-pointer i-gray fs-l px-1" (click)="modalStatus='edit';selectData(item)"></i>
<i class="ti ti-trash cursor-pointer i-gray fs-l px-1" (click)="modalStatus='delete';selectData(item)"></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 {{dataListFilter().length
<10
?
dataListFilter
().
length:
(
currentPage=
=page.length
?
((
currentPage
*
10
)
-
((
currentPage
*
10
)
-
dataListFilter
().
length
)
)
:
(
currentPage
*
10
)
)
}}
of
{{
dataListFilter
().
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'"
>
<label
class=
"ti-form-label mt-2rem"
>
รหัสประเภทวัน
<span
class=
"text-danger"
>
*
</span></label>
<div
*
ngFor=
"let item of eventgrp.selectList; let i=index;let f=first"
[
class
.
mt-2
]="!
f
"
class=
"col-span-6 sm:col-span-6 "
>
<div
class=
"flex"
>
<div
class=
"relative flex rounded-sm w-2/3"
>
<input
type=
"text"
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"
readonly
style=
"padding-right: 2.5rem;"
[(
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
type=
"button"
class=
"flex items-center text-red-500"
(
click
)="
eventgrp
.
selectIndex=
i;selectEventgrp()"
>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
</button>
<button
type=
"button"
class=
"flex items-center text-gray-500 dark:text-white/70"
data-hs-overlay=
"#time-attendance-eventgrp-table-modal"
(
click
)="
eventgrp
.
selectIndex=
i"
>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
</button>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ชื่อหัวข้อ (ไทย)
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
class=
"ti-form-input"
>
<label
class=
"ti-form-label mt-2rem"
>
ชื่อหัวข้อ (อังกฤษ)
</label>
<input
type=
"text"
class=
"ti-form-input"
>
<label
class=
"ti-form-label mt-2rem"
>
เป้าหมายผลงาน
</label>
<input
type=
"text"
class=
"ti-form-input"
>
<label
class=
"ti-form-label mt-2rem"
>
น้ำหนัก
</label>
<input
type=
"text"
class=
"ti-form-input"
>
<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"
>
</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"
>
<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"
>
</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"
>
</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"
>
<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"
>
</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"
>
</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"
>
<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"
>
</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"
>
</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"
>
<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"
>
</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"
>
</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"
>
<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"
>
</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
]="
false
"
[
disabled
]="
false
"
>
บันทึกข้อมูล
</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>
</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"
>
บันทึกข้อมูล
</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);"
data-hs-overlay=
"#time-attendance-alert-modal"
>
ลบข้อมูล
</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.component.scss
0 → 100644
View file @
93acff53
src/app/components/performance-management-evaluation/time-attendance/time-attendance.component.ts
0 → 100644
View file @
93acff53
import
{
ChangeDetectorRef
,
Component
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EventgrpModel
,
MyEventgrpModel
}
from
'src/app/shared/model/eventgrp.model'
;
import
{
EventgrpService
}
from
'src/app/shared/services/eventgrp.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
interface
table
{
currentPage
:
number
,
page
:
number
[],
search
:
string
}
@
Component
({
selector
:
'app-time-attendance'
,
templateUrl
:
'./time-attendance.component.html'
,
styleUrls
:
[
'./time-attendance.component.scss'
]
})
export
class
TimeAttendanceComponent
{
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'ทะเบียนการประเมินเวลาทำงาน'
,
'การจัดการหัวข้อการประเมินเวลาทำงาน'
]
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
:
[]
}
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
fileService
:
FileService
,
private
eventgrpService
:
EventgrpService
)
{
}
ngOnInit
():
void
{
this
.
getEventgrpList
()
}
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
.
eventgrp
.
selectList
.
splice
(
this
.
eventgrp
.
selectIndex
,
1
);
return
;
}
this
.
eventgrp
.
selectList
[
this
.
eventgrp
.
selectIndex
]
=
new
MyEventgrpModel
(
data
);
if
(
this
.
eventgrp
.
selectIndex
===
this
.
eventgrp
.
selectList
.
length
-
1
)
{
this
.
eventgrp
.
selectList
.
push
(
new
MyEventgrpModel
());
}
}
dataListFilter
()
{
// return this.pmsGrade.dataList.filter((x) => {
// const data = x.data
// const match = data.gradeId.toLowerCase().includes(this.search.toLowerCase()) || data.tdesc.toLowerCase().includes(this.search.toLowerCase()) || data.edesc.toLowerCase().includes(this.search.toLowerCase());
// return match;
// });
return
[]
}
dataListCheckAll
()
{
// const selectAll = this.isDataListCheckedAll;
// this.dataListFilter().forEach(x => x.check = selectAll);
// this.dataListCheck();
}
dataListCheck
()
{
// const dataCheck = this.dataListFilter();
// this.isDataListCheckedAll = dataCheck.length ? dataCheck.every(x => x.check) : false;
// this.numDataListChecked = this.pmsGrade.dataList.filter(x => x.check).length;
// this.isDataListChecked = Boolean(this.numDataListChecked)
}
searchChange
()
{
this
.
currentPage
=
1
;
const
filteredData
=
this
.
dataListFilter
();
this
.
page
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
10
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
dataListCheck
();
}
selectData
()
{
}
clearData
(
modalStatus
:
string
)
{
if
(
modalStatus
==
'add'
)
{
}
else
if
(
modalStatus
==
'edit'
)
{
}
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
);
}
}
src/app/shared/services/navservice.ts
View file @
93acff53
...
@@ -151,6 +151,7 @@ export class NavService implements OnDestroy {
...
@@ -151,6 +151,7 @@ export class NavService implements OnDestroy {
children
:
[
children
:
[
{
path
:
'/name-registration-perfomance'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
},
{
path
:
'/name-registration-perfomance'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
},
{
path
:
'/grade-registration-sub'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
},
{
path
:
'/grade-registration-sub'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
},
{
path
:
'/time-attendance'
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
type
:
'link'
},
{
path
:
'/evaluation-factors'
,
title
:
'ปัจจัยการประเมินผล'
,
type
:
'link'
},
{
path
:
'/evaluation-factors'
,
title
:
'ปัจจัยการประเมินผล'
,
type
:
'link'
},
{
path
:
'/assessment-management'
,
title
:
'การจัดการการประเมิน'
,
type
:
'link'
},
{
path
:
'/assessment-management'
,
title
:
'การจัดการการประเมิน'
,
type
:
'link'
},
{
path
:
'/evaluation-cycle-performance'
,
title
:
'รอบการประเมิน'
,
type
:
'link'
},
{
path
:
'/evaluation-cycle-performance'
,
title
:
'รอบการประเมิน'
,
type
:
'link'
},
...
...
src/assets/css/style.css
View file @
93acff53
...
@@ -24923,11 +24923,17 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
...
@@ -24923,11 +24923,17 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
-webkit-text-security
:
disc
;
/* Safari, Chrome */
-webkit-text-security
:
disc
;
/* Safari, Chrome */
}
}
.cursor-not-allowed
{
.cursor-not-allowed
{
cursor
:
not-allowed
cursor
:
not-allowed
;
}
}
.
\
!
max-w-3
\
/
4
{
.
\
!
max-w-3
\
/
4
{
max-width
:
75%
!important
;
max-width
:
75%
!important
;
}
}
.
\
!
max-w-1
\
/
2
{
max-width
:
50%
!important
;
}
.max-w-1
\
/
2
{
max-width
:
50%
!important
;
}
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