Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
portal-apps-manage
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
portal-apps-manage
Commits
38b859c0
Commit
38b859c0
authored
Jul 23, 2025
by
DESKTOP-E3GSHH7\myhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เเก้ ติดลูปหน้า sidebar
parent
46062c6e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
sidebar.component.ts
src/app/shared/components/sidebar/sidebar.component.ts
+5
-4
No files found.
src/app/shared/components/sidebar/sidebar.component.ts
View file @
38b859c0
...
@@ -110,6 +110,7 @@ export class SidebarComponent {
...
@@ -110,6 +110,7 @@ export class SidebarComponent {
this
.
isCommonRoute
=
this
.
currentUrl
.
includes
(
'/admin'
);
this
.
isCommonRoute
=
this
.
currentUrl
.
includes
(
'/admin'
);
this
.
isInstallerRoute
=
this
.
currentUrl
.
includes
(
'/company'
);
this
.
isInstallerRoute
=
this
.
currentUrl
.
includes
(
'/company'
);
this
.
isMyportalRoute
=
this
.
currentUrl
.
includes
(
'/myportal'
);
this
.
isMyportalRoute
=
this
.
currentUrl
.
includes
(
'/myportal'
);
this
.
isMylearnRoute
=
this
.
currentUrl
.
includes
(
'/mylearn'
)
this
.
menuitemsSubscribe$
=
this
.
navServices
.
items
.
subscribe
((
items
)
=>
{
this
.
menuitemsSubscribe$
=
this
.
navServices
.
items
.
subscribe
((
items
)
=>
{
this
.
changeMenu
()
this
.
changeMenu
()
});
});
...
@@ -206,11 +207,11 @@ export class SidebarComponent {
...
@@ -206,11 +207,11 @@ export class SidebarComponent {
}
else
if
(
this
.
isMylearnRoute
){
}
else
if
(
this
.
isMylearnRoute
){
this
.
menuItems
=
this
.
navServices
.
getMylearnMenu
();
this
.
menuItems
=
this
.
navServices
.
getMylearnMenu
();
}
else
{
}
else
{
this
.
menuItems
=
this
.
navServices
.
getCommonMenu
()
;
this
.
menuItems
=
this
.
navServices
.
getCommonMenu
()
}
}
// เพิ่มรายการรายงาน Excel เข้าไปในเมนู หากมีข้อมูลและยังไม่ได้เพิ่ม
// เพิ่มรายการรายงาน Excel เข้าไปในเมนู หากมีข้อมูลและยังไม่ได้เพิ่ม
if
(
this
.
submenuExcel
.
length
>
0
)
{
if
(
(
this
.
isMyportalRoute
||
this
.
isInstallerRoute
)
&&
this
.
submenuExcel
.
length
>
0
)
{
const
excelMenuExists
=
this
.
menuItems
.
some
(
item
=>
item
.
title
===
'รายงาน Excel'
);
const
excelMenuExists
=
this
.
menuItems
.
some
(
item
=>
item
.
title
===
'รายงาน Excel'
);
if
(
!
excelMenuExists
)
{
if
(
!
excelMenuExists
)
{
...
@@ -342,7 +343,7 @@ export class SidebarComponent {
...
@@ -342,7 +343,7 @@ export class SidebarComponent {
element
.
selected
=
true
;
element
.
selected
=
true
;
}
}
// ตรวจสอบ path สำหรับ Excel Report ที่มี query parameters
// ตรวจสอบ path สำหรับ Excel Report ที่มี query parameters
if
(
ele
.
path
&&
this
.
currentUrl
.
startsWith
(
ele
.
path
.
split
(
'?'
)[
0
]))
{
if
(
(
this
.
isMyportalRoute
||
this
.
isInstallerRoute
)
&&
ele
.
path
&&
this
.
currentUrl
.
startsWith
(
ele
.
path
.
split
(
'?'
)[
0
]))
{
const
currentUrlBase
=
this
.
currentUrl
.
split
(
'?'
)[
0
];
const
currentUrlBase
=
this
.
currentUrl
.
split
(
'?'
)[
0
];
const
elePathBase
=
ele
.
path
.
split
(
'?'
)[
0
];
const
elePathBase
=
ele
.
path
.
split
(
'?'
)[
0
];
if
(
currentUrlBase
===
elePathBase
)
{
if
(
currentUrlBase
===
elePathBase
)
{
...
@@ -363,7 +364,7 @@ export class SidebarComponent {
...
@@ -363,7 +364,7 @@ export class SidebarComponent {
ele
.
selected
=
true
;
ele
.
selected
=
true
;
}
}
// ตรวจสอบ path สำหรับ Excel Report ที่มี query parameters ในระดับที่ 3
// ตรวจสอบ path สำหรับ Excel Report ที่มี query parameters ในระดับที่ 3
if
(
child1
.
path
&&
this
.
currentUrl
.
startsWith
(
child1
.
path
.
split
(
'?'
)[
0
]))
{
if
(
(
this
.
isMyportalRoute
||
this
.
isInstallerRoute
)
&&
child1
.
path
&&
this
.
currentUrl
.
startsWith
(
child1
.
path
.
split
(
'?'
)[
0
]))
{
const
currentUrlBase
=
this
.
currentUrl
.
split
(
'?'
)[
0
];
const
currentUrlBase
=
this
.
currentUrl
.
split
(
'?'
)[
0
];
const
child1PathBase
=
child1
.
path
.
split
(
'?'
)[
0
];
const
child1PathBase
=
child1
.
path
.
split
(
'?'
)[
0
];
if
(
currentUrlBase
===
child1PathBase
)
{
if
(
currentUrlBase
===
child1PathBase
)
{
...
...
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