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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
32 deletions
+50
-32
header.component.html
src/app/shared/components/header/header.component.html
+16
-27
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 @@
...
@@ -38,16 +38,10 @@
<div
class=
"responsive-headernav"
>
<div
class=
"responsive-headernav"
>
<div
class=
"header-nav-right"
>
<div
class=
"header-nav-right"
>
<div
class=
"header-fullscreen hidden lg:block"
>
<div
class=
"header-fullscreen hidden lg:block"
>
<a
<a
aria-label=
"anchor"
href=
"javascript:void(0);"
appFullscreen
aria-label=
"anchor"
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"
>
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 full-screen-open"
></i>
<i
<i
class=
"ri-fullscreen-line header-icon fullscreen-exit-line hidden"
></i>
class=
"ri-fullscreen-line header-icon fullscreen-exit-line hidden"
></i>
</a>
</a>
</div>
</div>
<div
class=
"switcher-icon"
>
<div
class=
"switcher-icon"
>
...
@@ -698,10 +692,8 @@
...
@@ -698,10 +692,8 @@
src="./assets/img/users/defaultperson.jpg"
src="./assets/img/users/defaultperson.jpg"
alt="Image Description" />
alt="Image Description" />
</ng-template> -->
</ng-template> -->
<img
<img
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
src=
"./assets/img/users/man.PNG"
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
alt=
"Image Description"
/>
src=
"./assets/img/users/man.PNG"
alt=
"Image Description"
/>
</button>
</button>
<div
class=
"hs-dropdown-menu ti-dropdown-menu border-0 w-[20rem]"
aria-labelledby=
"dropdown-profile"
>
<div
class=
"hs-dropdown-menu ti-dropdown-menu border-0 w-[20rem]"
aria-labelledby=
"dropdown-profile"
>
...
@@ -709,7 +701,7 @@
...
@@ -709,7 +701,7 @@
<div
class=
"ltr:mr-3 rtl:ml-3"
>
<div
class=
"ltr:mr-3 rtl:ml-3"
>
<!-- <img class="avatar shadow-none rounded-full h-full !ring-transparent" src="./assets/img/users/profile2.jpg"
<!-- <img class="avatar shadow-none rounded-full h-full !ring-transparent" src="./assets/img/users/profile2.jpg"
alt="profile-img" /> -->
alt="profile-img" /> -->
<!-- <img *ngIf="employeeProfile?.picture && employeeProfile.picture !== ''; else defaultImage"
<!-- <img *ngIf="employeeProfile?.picture && employeeProfile.picture !== ''; else defaultImage"
class="inline-block rounded-full ring-2 h-12 w-12 !ring-transparent"
class="inline-block rounded-full ring-2 h-12 w-12 !ring-transparent"
[src]="employeeProfile.picture"
[src]="employeeProfile.picture"
alt="Image Description"
alt="Image Description"
...
@@ -721,10 +713,8 @@
...
@@ -721,10 +713,8 @@
src="./assets/img/users/defaultperson.jpg"
src="./assets/img/users/defaultperson.jpg"
alt="Image Description" />
alt="Image Description" />
</ng-template> -->
</ng-template> -->
<img
<img
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
class=
"inline-block rounded-full ring-2 h-full !ring-transparent"
src=
"./assets/img/users/man.PNG"
alt=
"Image Description"
/>
src=
"./assets/img/users/man.PNG"
alt=
"Image Description"
/>
</div>
</div>
<div>
<div>
<p
class=
"ti-dropdown-header-title !text-white"
>
<p
class=
"ti-dropdown-header-title !text-white"
>
...
@@ -747,15 +737,12 @@
...
@@ -747,15 +737,12 @@
<a routerLink="/page/tasks" class="ti-dropdown-item">
<a routerLink="/page/tasks" class="ti-dropdown-item">
<i class="ti ti-clipboard-check text-lg"></i>
<i class="ti ti-clipboard-check text-lg"></i>
Task Manager
Task Manager
</a>
</a> -->
<a
<a
(
click
)="
onSettingsClick
()"
class=
"ti-dropdown-item cursor-pointer"
>
routerLink="/profile/profilesettings"
<i
class=
"ti ti-settings text-lg"
></i>
class="ti-dropdown-item"
>
<i class="ti ti-adjustments-horizontal text-lg"></i>
Settings
Settings
</a>
</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>
<i class="ti ti-wallet text-lg"></i>
Bal: $7,12,950
Bal: $7,12,950
</a> -->
</a> -->
...
@@ -767,7 +754,8 @@
...
@@ -767,7 +754,8 @@
</div>
</div>
</div>
</div>
<div
class=
"header-name"
>
<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>
</div>
</div>
</div>
...
@@ -918,4 +906,4 @@
...
@@ -918,4 +906,4 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- ========== END Search Modal ========== -->
<!-- ========== END Search Modal ========== -->
\ No newline at end of file
src/app/shared/components/header/header.component.ts
View file @
d1362ec4
...
@@ -18,7 +18,8 @@ export class HeaderComponent {
...
@@ -18,7 +18,8 @@ export class HeaderComponent {
private
authService
:
AuthService
,
private
authService
:
AuthService
,
public
tokenService
:
TokenService
,
public
tokenService
:
TokenService
,
private
employeeService
:
EmployeeService
,
private
employeeService
:
EmployeeService
,
private
elementRef
:
ElementRef
)
{
private
elementRef
:
ElementRef
,
private
navService
:
NavService
)
{
this
.
getEvaluatee
();
this
.
getEvaluatee
();
}
}
...
@@ -137,4 +138,8 @@ export class HeaderComponent {
...
@@ -137,4 +138,8 @@ export class HeaderComponent {
const
target
=
event
.
target
as
HTMLImageElement
;
const
target
=
event
.
target
as
HTMLImageElement
;
target
.
src
=
'./assets/img/users/defaultperson.jpg'
;
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 {
...
@@ -88,7 +88,7 @@ export class NavService implements OnDestroy {
this
.
screenWidth
.
next
(
width
);
this
.
screenWidth
.
next
(
width
);
}
}
MENUITEMS
:
Menu
[]
=
[
private
MENUITEMS
:
Menu
[]
=
[
{
{
title
:
'การประเมินผล'
,
title
:
'การประเมินผล'
,
type
:
'sub'
,
type
:
'sub'
,
...
@@ -96,10 +96,10 @@ export class NavService implements OnDestroy {
...
@@ -96,10 +96,10 @@ export class NavService implements OnDestroy {
active
:
false
,
active
:
false
,
path
:
''
,
path
:
''
,
id
:
'm1'
,
id
:
'm1'
,
show
:
fals
e
,
show
:
tru
e
,
children
:
[
children
:
[
{
id
:
'm11'
,
path
:
'/self-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
:
fals
e
},
{
id
:
'm12'
,
path
:
'/supervisor-evaluation'
,
title
:
'ประเมินโดยหัวหน้า'
,
type
:
'link'
,
show
:
tru
e
},
],
],
},
},
{
{
...
@@ -182,4 +182,28 @@ export class NavService implements OnDestroy {
...
@@ -182,4 +182,28 @@ export class NavService implements OnDestroy {
];
];
// Array
// Array
items
=
new
BehaviorSubject
<
Menu
[]
>
(
this
.
MENUITEMS
);
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