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
1762715a
Commit
1762715a
authored
Mar 19, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
กำหนดสิทธิการเข้าใช้งาน
parent
0cc7a97a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
53 deletions
+65
-53
role-permission-config.component.html
...e-permission-config/role-permission-config.component.html
+3
-3
role-permission-config.component.ts
...ole-permission-config/role-permission-config.component.ts
+3
-3
dashboard-routing.module.ts
src/app/components/dashboard/dashboard-routing.module.ts
+1
-1
sidebar.component.ts
src/app/shared/components/sidebar/sidebar.component.ts
+15
-16
config-permission.model.ts
src/app/shared/model/config-permission.model.ts
+8
-1
navservice.ts
src/app/shared/services/navservice.ts
+35
-29
No files found.
src/app/components/company-components/account-settings/role-permission-config/role-permission-config.component.html
View file @
1762715a
...
...
@@ -3,7 +3,7 @@
</div>
<div
class=
"block-main-content"
>
<div
class=
"text-lg font-bold py-2 px-8 text-primary"
>
ทะเบียน
กำหนดสิทธิการเข้าใช้งาน
กำหนดสิทธิการเข้าใช้งาน
</div>
<div
class=
"page"
>
<div
class=
"border-b border-gray-200 dark:border-white/10 px-8"
>
...
...
@@ -11,7 +11,7 @@
<a
class=
"text-base font-medium hs-tab-active:text-lg hs-tab-active:font-bold hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
href=
"javascript:void(0);"
id=
"underline-item-1"
data-hs-tab=
"#underline-1"
aria-controls=
"underline-1"
>
ทะเบียน
กำหนดสิทธิการเข้าใช้งาน
กำหนดสิทธิการเข้าใช้งาน
</a>
</nav>
</div>
...
...
@@ -299,7 +299,7 @@
ย้อนกลับ
</button>
<div
class=
"font-size-18px font-weight-700 align-center text-primary pl-1rem"
>
ทะเบียน
กำหนดสิทธิการเข้าใช้งาน
กำหนดสิทธิการเข้าใช้งาน
</div>
</div>
<div
class=
"flex justify-end"
>
...
...
src/app/components/company-components/account-settings/role-permission-config/role-permission-config.component.ts
View file @
1762715a
...
...
@@ -10,7 +10,7 @@ import { NavService } from 'src/app/shared/services/navservice';
styleUrls
:
[
'./role-permission-config.component.scss'
]
})
export
class
RolePermissionConfigComponent
{
pathTitle
=
[
'การจัดการข้อมูลองค์กร'
,
'
ทะเบียน
กำหนดสิทธิการเข้าใช้งาน'
]
pathTitle
=
[
'การจัดการข้อมูลองค์กร'
,
'กำหนดสิทธิการเข้าใช้งาน'
]
pageSize
=
10
currentPage
=
1
page
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
...
...
@@ -82,11 +82,11 @@ export class RolePermissionConfigComponent {
this
.
configPermission
.
select
.
menuBody
=
this
.
menuItems
.
map
(
x
=>
new
MyMenuBodyModel
(
x
))
this
.
clearDataMenu
()
this
.
configPermission
.
select
.
menuBody
.
forEach
(
x
=>
{
const
configMenu
=
menuBody
.
find
(
y
=>
(
y
.
path
+
y
.
title
)
==
((
x
.
path
||
''
)
+
x
.
title
)
)
const
configMenu
=
menuBody
.
find
(
y
=>
y
.
id
==
x
.
id
)
if
(
configMenu
)
{
x
.
show
=
configMenu
.
show
x
.
children
?.
forEach
(
y
=>
{
const
configChildren
=
configMenu
.
children
.
find
(
z
=>
(
z
.
path
+
z
.
title
)
==
((
y
.
path
||
''
)
+
y
.
title
)
)
const
configChildren
=
configMenu
.
children
.
find
(
z
=>
z
.
id
==
y
.
id
)
if
(
configChildren
)
{
y
.
show
=
configChildren
.
show
}
...
...
src/app/components/dashboard/dashboard-routing.module.ts
View file @
1762715a
...
...
@@ -93,7 +93,7 @@ const routes: Routes = [
{
path
:
"self-evaluation"
,
title
:
'ประเมินตนเอง'
,
component
:
SelfEvaluationComponent
},
{
path
:
"day-type-registry"
,
title
:
'ประเมินตนเอง'
,
component
:
DayTypeRegistryComponent
},
{
path
:
"time-attendance"
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
component
:
TimeAttendanceComponent
},
{
path
:
"role-permission-config"
,
title
:
'
ทะเบียน
กำหนดสิทธิการเข้าใช้งาน'
,
component
:
RolePermissionConfigComponent
},
{
path
:
"role-permission-config"
,
title
:
'กำหนดสิทธิการเข้าใช้งาน'
,
component
:
RolePermissionConfigComponent
},
]
}
];
...
...
src/app/shared/components/sidebar/sidebar.component.ts
View file @
1762715a
...
...
@@ -108,30 +108,29 @@ export class SidebarComponent {
}
public
getConfigPermissionByUserLevel
()
{
getConfigPermissionByUserLevel
()
{
this
.
configPermission
.
loading
=
true
this
.
configPermissionService
.
getByUserLevel
(
this
.
user_level
).
subscribe
({
next
:
response
=>
{
this
.
configPermission
.
data
=
new
MyConfigPermissionModel
(
response
)
this
.
menuItems
.
forEach
(
x
=>
{
// เปิดทุกเมนู
//
x.show = true
//
x.children?.forEach(y => {
//
y.show = true
//
})
x
.
show
=
true
x
.
children
?.
forEach
(
y
=>
{
y
.
show
=
true
})
// เปิดตาม config
const
configMenu
=
this
.
configPermission
.
data
.
menuBody
.
find
(
y
=>
(
y
.
path
+
y
.
title
)
==
((
x
.
path
||
''
)
+
x
.
title
)
)
if
(
configMenu
)
{
x
.
show
=
configMenu
.
show
x
.
children
?.
forEach
(
y
=>
{
const
configChildren
=
configMenu
.
children
.
find
(
z
=>
(
z
.
path
+
z
.
title
)
==
((
y
.
path
||
''
)
+
y
.
title
)
)
if
(
configChildren
)
{
y
.
show
=
configChildren
.
show
}
})
}
// const configMenu = this.configPermission.data.menuBody.find(y => y.id == x.id
)
//
if (configMenu) {
//
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
=>
{
...
...
src/app/shared/model/config-permission.model.ts
View file @
1762715a
...
...
@@ -33,6 +33,7 @@ export interface MenuBodyModel {
show
:
boolean
type
:
string
title
:
string
id
:
string
}[]
selected
:
boolean
headTitle
?:
string
;
...
...
@@ -49,6 +50,7 @@ export interface MenuBodyModel {
}[];
Menusub
?:
boolean
;
target
?:
boolean
;
id
:
string
}
...
...
@@ -63,6 +65,7 @@ export class MyMenuBodyModel implements MenuBodyModel {
show
:
boolean
type
:
string
title
:
string
id
:
string
}[]
selected
:
boolean
headTitle
?:
string
;
...
...
@@ -76,9 +79,11 @@ export class MyMenuBodyModel implements MenuBodyModel {
show
:
boolean
type
:
string
title
:
string
id
:
string
}[];
Menusub
?:
boolean
;
target
?:
boolean
;
id
:
string
constructor
(
data
?:
Partial
<
MenuBodyModel
>
)
{
this
.
path
=
data
?.
path
||
''
this
.
show
=
data
?.
show
??
false
...
...
@@ -89,9 +94,11 @@ export class MyMenuBodyModel implements MenuBodyModel {
path
:
x
.
path
||
''
,
show
:
x
.
show
??
false
,
type
:
x
.
type
||
''
,
title
:
x
.
title
||
''
title
:
x
.
title
||
''
,
id
:
x
.
id
||
''
}))
||
[]
this
.
selected
=
data
?.
selected
??
false
this
.
id
=
data
?.
id
||
''
// this.headTitle = data?.headTitle || ""
// this.headTitle2 = data?.headTitle2 || ""
// this.icon = data?.icon || ""
...
...
src/app/shared/services/navservice.ts
View file @
1762715a
...
...
@@ -21,6 +21,7 @@ export interface Menu {
Menusub
?:
boolean
;
target
?:
boolean
;
show
?:
boolean
id
?:
string
}
@
Injectable
({
...
...
@@ -94,10 +95,11 @@ export class NavService implements OnDestroy {
selected
:
false
,
active
:
false
,
path
:
''
,
id
:
'm1'
,
show
:
false
,
children
:
[
{
path
:
'/self-evaluation'
,
title
:
'ประเมินตนเอง'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/supervisor-evaluation'
,
title
:
'ประเมินโดยหัวหน้า'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm11'
,
path
:
'/self-evaluation'
,
title
:
'ประเมินตนเอง'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm12'
,
path
:
'/supervisor-evaluation'
,
title
:
'ประเมินโดยหัวหน้า'
,
type
:
'link'
,
show
:
false
},
],
},
{
...
...
@@ -106,14 +108,15 @@ export class NavService implements OnDestroy {
selected
:
false
,
active
:
false
,
path
:
''
,
id
:
'm2'
,
show
:
false
,
children
:
[
{
path
:
'/company-registration'
,
title
:
'ทะเบียนบริษัท'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/job-description'
,
title
:
'ข้อมูลลักษณะงาน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/employee-registration'
,
title
:
'ทะเบียนพนักงาน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/day-type-registry'
,
title
:
'ทะเบียนประเภทวัน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/account-settings'
,
title
:
'ตั้งค่าชื่อผู้ใช้'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/role-permission-config'
,
title
:
'ทะเบียน
กำหนดสิทธิการเข้าใช้งาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm21'
,
path
:
'/company-registration'
,
title
:
'ทะเบียนบริษัท'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm22'
,
path
:
'/job-description'
,
title
:
'ข้อมูลลักษณะงาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm23'
,
path
:
'/employee-registration'
,
title
:
'ทะเบียนพนักงาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm24'
,
path
:
'/day-type-registry'
,
title
:
'ทะเบียนประเภทวัน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm25'
,
path
:
'/account-settings'
,
title
:
'ตั้งค่าชื่อผู้ใช้'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm26'
,
path
:
'/role-permission-config'
,
title
:
'
กำหนดสิทธิการเข้าใช้งาน'
,
type
:
'link'
,
show
:
false
},
],
},
{
...
...
@@ -122,14 +125,15 @@ export class NavService implements OnDestroy {
selected
:
false
,
active
:
false
,
path
:
''
,
id
:
'm3'
,
show
:
false
,
children
:
[
{
path
:
'/job-detail-management'
,
title
:
'ข้อมูลทั่วไป'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/command-structure'
,
title
:
'โครงสร้างสายการบังคับบัญชา'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/job-detail'
,
title
:
'รายละเอียดของงาน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/job-qualifications'
,
title
:
'คุณสมบัติที่จำเป็น'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/job-competency'
,
title
:
'ความสามารถในตำเเหน่งงาน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/job-position-indicators'
,
title
:
'ตัวชี้วัดของตำแหน่งงาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm31'
,
path
:
'/job-detail-management'
,
title
:
'ข้อมูลทั่วไป'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm32'
,
path
:
'/command-structure'
,
title
:
'โครงสร้างสายการบังคับบัญชา'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm33'
,
path
:
'/job-detail'
,
title
:
'รายละเอียดของงาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm34'
,
path
:
'/job-qualifications'
,
title
:
'คุณสมบัติที่จำเป็น'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm35'
,
path
:
'/job-competency'
,
title
:
'ความสามารถในตำเเหน่งงาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm36'
,
path
:
'/job-position-indicators'
,
title
:
'ตัวชี้วัดของตำแหน่งงาน'
,
type
:
'link'
,
show
:
false
},
],
},
...
...
@@ -139,16 +143,17 @@ export class NavService implements OnDestroy {
selected
:
false
,
active
:
false
,
path
:
''
,
id
:
'm4'
,
show
:
false
,
children
:
[
{
path
:
'/name-registration'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/grade-registration'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/tool-register'
,
title
:
'ทะเบียนเครื่องมือ'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/course-registration'
,
title
:
'ทะเบียนหลักสูตร'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/idp-development-plan'
,
title
:
'แผนพัฒนา IDP'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/competency-management'
,
title
:
'การจัดการสมรรถนะ'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/evaluation-cycle-manager'
,
title
:
'การจัดการรอบการประเมิน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/setting-competency'
,
title
:
'การตั้งค่า'
,
type
:
'link'
,
show
:
false
}
{
id
:
'm41'
,
path
:
'/name-registration'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm42'
,
path
:
'/grade-registration'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm43'
,
path
:
'/tool-register'
,
title
:
'ทะเบียนเครื่องมือ'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm44'
,
path
:
'/course-registration'
,
title
:
'ทะเบียนหลักสูตร'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm45'
,
path
:
'/idp-development-plan'
,
title
:
'แผนพัฒนา IDP'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm46'
,
path
:
'/competency-management'
,
title
:
'การจัดการสมรรถนะ'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm47'
,
path
:
'/evaluation-cycle-manager'
,
title
:
'การจัดการรอบการประเมิน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm48'
,
path
:
'/setting-competency'
,
title
:
'การตั้งค่า'
,
type
:
'link'
,
show
:
false
}
],
},
{
...
...
@@ -157,15 +162,16 @@ export class NavService implements OnDestroy {
selected
:
false
,
active
:
false
,
path
:
''
,
id
:
'm5'
,
show
:
false
,
children
:
[
{
path
:
'/name-registration-perfomance'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/grade-registration-sub'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/time-attendance'
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/evaluation-factors'
,
title
:
'ปัจจัยการประเมินผล'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/assessment-management'
,
title
:
'การจัดการการประเมิน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/evaluation-cycle-performance'
,
title
:
'รอบการประเมิน'
,
type
:
'link'
,
show
:
false
},
{
path
:
'/setting-performance-evalution'
,
title
:
'การตั้งค่า'
,
type
:
'link'
,
show
:
false
}
{
id
:
'm51'
,
path
:
'/name-registration-perfomance'
,
title
:
'ทะเบียนกำหนดชื่อ'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm52'
,
path
:
'/grade-registration-sub'
,
title
:
'ทะเบียนเกรด'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm53'
,
path
:
'/time-attendance'
,
title
:
'ทะเบียนการประเมินเวลาทำงาน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm54'
,
path
:
'/evaluation-factors'
,
title
:
'ปัจจัยการประเมินผล'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm55'
,
path
:
'/assessment-management'
,
title
:
'การจัดการการประเมิน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm56'
,
path
:
'/evaluation-cycle-performance'
,
title
:
'รอบการประเมิน'
,
type
:
'link'
,
show
:
false
},
{
id
:
'm57'
,
path
:
'/setting-performance-evalution'
,
title
:
'การตั้งค่า'
,
type
:
'link'
,
show
:
false
}
],
},
];
...
...
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