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
d1362ec4
Commit
d1362ec4
authored
May 23, 2025
by
Natthaphat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เพิ่มปุ่ม ตั้งค่าที่คลิกหน้าโปรไฟล์
parent
d829e571
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
29 deletions
+46
-29
header.component.html
src/app/shared/components/header/header.component.html
+12
-24
header.component.ts
src/app/shared/components/header/header.component.ts
+6
-1
navservice.ts
src/app/shared/services/navservice.ts
+28
-4
No files found.
src/app/shared/components/header/header.component.html
View file @
d1362ec4
...
...
@@ -38,16 +38,10 @@
<div
class=
"responsive-headernav"
>
<div
class=
"header-nav-right"
>
<div
class=
"header-fullscreen hidden lg:block"
>
<a
aria-label=
"anchor"
href=
"javascript:void(0);"
appFullscreen
class=
"inline-flex flex-shrink-0 justify-center items-center gap-2 h-[2.375rem] w-[2.375rem] rounded-full font-medium bg-gray-100 hover:bg-gray-200 text-gray-500 align-middle focus:outline-none focus:ring-0 focus:ring-gray-400 focus:ring-offset-0 focus:ring-offset-white transition-all text-xs dark:bg-bgdark dark:hover:bg-black/20 dark:text-white/70 dark:hover:text-white dark:focus:ring-white/10 dark:focus:ring-offset-white/10"
>
<a
aria-label=
"anchor"
href=
"javascript:void(0);"
appFullscreen
class=
"inline-flex flex-shrink-0 justify-center items-center gap-2 h-[2.375rem] w-[2.375rem] rounded-full font-medium bg-gray-100 hover:bg-gray-200 text-gray-500 align-middle focus:outline-none focus:ring-0 focus:ring-gray-400 focus:ring-offset-0 focus:ring-offset-white transition-all text-xs dark:bg-bgdark dark:hover:bg-black/20 dark:text-white/70 dark:hover:text-white dark:focus:ring-white/10 dark:focus:ring-offset-white/10"
>
<i
class=
"ri-fullscreen-line header-icon full-screen-open"
></i>
<i
class=
"ri-fullscreen-line header-icon fullscreen-exit-line hidden"
></i>
<i
class=
"ri-fullscreen-line header-icon fullscreen-exit-line hidden"
></i>
</a>
</div>
<div
class=
"switcher-icon"
>
...
...
@@ -698,9 +692,7 @@
src="./assets/img/users/defaultperson.jpg"
alt="Image Description" />
</ng-template> -->
<img
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
src=
"./assets/img/users/man.PNG"
<img
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
src=
"./assets/img/users/man.PNG"
alt=
"Image Description"
/>
</button>
...
...
@@ -721,10 +713,8 @@
src="./assets/img/users/defaultperson.jpg"
alt="Image Description" />
</ng-template> -->
<img
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
src=
"./assets/img/users/man.PNG"
alt=
"Image Description"
/>
<img
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
src=
"./assets/img/users/man.PNG"
alt=
"Image Description"
/>
</div>
<div>
<p
class=
"ti-dropdown-header-title !text-white"
>
...
...
@@ -747,15 +737,12 @@
<a routerLink="/page/tasks" class="ti-dropdown-item">
<i class="ti ti-clipboard-check text-lg"></i>
Task Manager
</a>
<a
routerLink="/profile/profilesettings"
class="ti-dropdown-item"
>
<i class="ti ti-adjustments-horizontal text-lg"></i>
</a> -->
<a
(
click
)="
onSettingsClick
()"
class=
"ti-dropdown-item cursor-pointer"
>
<i
class=
"ti ti-settings text-lg"
></i>
Settings
</a>
<a routerLink="/dashboard/crypto" class="ti-dropdown-item">
<
!-- <
a routerLink="/dashboard/crypto" class="ti-dropdown-item">
<i class="ti ti-wallet text-lg"></i>
Bal: $7,12,950
</a> -->
...
...
@@ -767,7 +754,8 @@
</div>
</div>
<div
class=
"header-name"
>
<span
class=
"dark:text-black/30 text-black text-center"
>
{{this.employeeProfile.thFullName?this.employeeProfile.thFullName:''}}
</span>
<span
class=
"dark:text-black/30 text-black text-center"
>
{{this.employeeProfile.thFullName?this.employeeProfile.thFullName:''}}
</span>
</div>
</div>
</div>
...
...
src/app/shared/components/header/header.component.ts
View file @
d1362ec4
...
...
@@ -18,7 +18,8 @@ export class HeaderComponent {
private
authService
:
AuthService
,
public
tokenService
:
TokenService
,
private
employeeService
:
EmployeeService
,
private
elementRef
:
ElementRef
)
{
private
elementRef
:
ElementRef
,
private
navService
:
NavService
)
{
this
.
getEvaluatee
();
}
...
...
@@ -137,4 +138,8 @@ export class HeaderComponent {
const
target
=
event
.
target
as
HTMLImageElement
;
target
.
src
=
'./assets/img/users/defaultperson.jpg'
;
}
onSettingsClick
()
{
this
.
navService
.
toggleEvaluationMenu
();
}
}
src/app/shared/services/navservice.ts
View file @
d1362ec4
...
...
@@ -88,7 +88,7 @@ export class NavService implements OnDestroy {
this
.
screenWidth
.
next
(
width
);
}
MENUITEMS
:
Menu
[]
=
[
private
MENUITEMS
:
Menu
[]
=
[
{
title
:
'การประเมินผล'
,
type
:
'sub'
,
...
...
@@ -96,10 +96,10 @@ export class NavService implements OnDestroy {
active
:
false
,
path
:
''
,
id
:
'm1'
,
show
:
fals
e
,
show
:
tru
e
,
children
:
[
{
id
:
'm11'
,
path
:
'/self-evaluation'
,
title
:
'ประเมินตนเอง'
,
type
:
'link'
,
show
:
fals
e
},
{
id
:
'm12'
,
path
:
'/supervisor-evaluation'
,
title
:
'ประเมินโดยหัวหน้า'
,
type
:
'link'
,
show
:
fals
e
},
{
id
:
'm11'
,
path
:
'/self-evaluation'
,
title
:
'ประเมินตนเอง'
,
type
:
'link'
,
show
:
tru
e
},
{
id
:
'm12'
,
path
:
'/supervisor-evaluation'
,
title
:
'ประเมินโดยหัวหน้า'
,
type
:
'link'
,
show
:
tru
e
},
],
},
{
...
...
@@ -182,4 +182,28 @@ export class NavService implements OnDestroy {
];
// Array
items
=
new
BehaviorSubject
<
Menu
[]
>
(
this
.
MENUITEMS
);
private
menuItemsSubject
=
new
BehaviorSubject
<
Menu
[]
>
(
this
.
MENUITEMS
);
menuItems$
=
this
.
menuItemsSubject
.
asObservable
();
toggleEvaluationMenu
()
{
// const menuItem = this.MENUITEMS.find(item => item.id === 'm1');
// if (menuItem) {
// menuItem.show = !menuItem.show; // Toggle ซ่อน/แสดง
// menuItem.children?.forEach(child => child.show = menuItem.show);
// this.menuItemsSubject.next([...this.MENUITEMS]);
// const currentUrl = this.router.url;
// const evaluationPaths = menuItem.children?.map(child => child.path) || [];
// if (!menuItem.show && evaluationPaths.includes(currentUrl)) {
// this.router.navigate(['/company-registration']);
// }
// if (menuItem.show) {
// this.router.navigate(['/self-evaluation']);
// }
// }
}
}
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