Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BookingMyHrManagement
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
Chanachai
BookingMyHrManagement
Commits
78a6f92f
Commit
78a6f92f
authored
a month ago
by
Ooh-Ao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เส้นทาง
parent
52b52d78
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
35 deletions
+89
-35
admin.module.ts
Synto-Angular/src/app/admin/admin.module.ts
+3
-1
admin.routing.ts
Synto-Angular/src/app/admin/admin.routing.ts
+22
-0
sidebar.component.ts
...ar/src/app/shared/components/sidebar/sidebar.component.ts
+11
-4
fullroutes.ts
Synto-Angular/src/app/shared/routes/fullroutes.ts
+5
-1
navservice.ts
Synto-Angular/src/app/shared/services/navservice.ts
+48
-29
No files found.
Synto-Angular/src/app/admin/admin.module.ts
View file @
78a6f92f
...
...
@@ -9,10 +9,12 @@ import { ProjectProductManagementComponent } from './project-management/project-
import
{
HomeAdminComponent
}
from
'./home-admin/home-admin.component'
;
import
{
TransectionProductManagementComponent
}
from
'./transection-product-management/transection-product-management.component'
;
import
{
HistoryProductComponent
}
from
'./history-product/history-product.component'
;
import
{
AdminRoutingModule
}
from
'./admin.routing'
;
@
NgModule
({
imports
:
[
CommonModule
CommonModule
,
AdminRoutingModule
],
declarations
:
[
AdminComponent
,
UserManagementComponent
,
ProjectManagementComponent
,
ProductManagementComponent
,
ProjectEmployeeManagementComponent
,
ProjectProductManagementComponent
,
HomeAdminComponent
,
TransectionProductManagementComponent
,
HistoryProductComponent
]
})
...
...
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/admin/admin.routing.ts
0 → 100644
View file @
78a6f92f
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
HomeAdminComponent
}
from
'./home-admin/home-admin.component'
;
import
{
UserManagementComponent
}
from
'./user-management/user-management.component'
;
import
{
NgModule
}
from
'@angular/core'
;
const
routes
:
Routes
=
[
{
path
:
"admin"
,
children
:
[
{
path
:
"home"
,
component
:
HomeAdminComponent
},
{
path
:
"user-management"
,
component
:
UserManagementComponent
},
]
}
];
@
NgModule
({
imports
:
[
RouterModule
.
forChild
(
routes
)],
exports
:
[
RouterModule
]
})
export
class
AdminRoutingModule
{
}
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/shared/components/sidebar/sidebar.component.ts
View file @
78a6f92f
...
...
@@ -72,9 +72,16 @@ export class SidebarComponent {
}
ngOnInit
()
{
this
.
menuitemsSubscribe$
=
this
.
navServices
.
items
.
subscribe
((
items
)
=>
{
this
.
menuItems
=
items
;
});
if
(
true
){
this
.
menuitemsSubscribe$
=
this
.
navServices
.
itemsAdmin
.
subscribe
((
items
)
=>
{
this
.
menuItems
=
items
;
});
}
else
{
this
.
menuitemsSubscribe$
=
this
.
navServices
.
itemsEmp
.
subscribe
((
items
)
=>
{
this
.
menuItems
=
items
;
});
}
this
.
ParentActive
();
this
.
router
.
events
.
subscribe
((
event
)
=>
{
...
...
@@ -241,7 +248,7 @@ export class SidebarComponent {
if
(
!
this
.
eventTriggered
&&
this
.
screenWidth
<=
992
)
{
document
.
documentElement
?.
setAttribute
(
'toggled'
,
'close'
)
// Trigger your event or perform any action here
this
.
eventTriggered
=
true
;
// Set the flag to true to prevent further triggering
}
else
if
(
this
.
screenWidth
>
992
)
{
...
...
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/shared/routes/fullroutes.ts
View file @
78a6f92f
import
{
Routes
}
from
'@angular/router'
;
export
const
content
:
Routes
=
[
{
path
:
''
,
loadChildren
:
()
=>
import
(
'../../components/dashboard/dashboard.module'
).
then
(
m
=>
m
.
DashboardModule
)
...
...
@@ -68,5 +68,9 @@ export const content: Routes = [
path
:
''
,
loadChildren
:
()
=>
import
(
'../../components/icons/icons.module'
).
then
(
m
=>
m
.
IconsModule
)
},
{
path
:
''
,
loadChildren
:
()
=>
import
(
'../../admin/admin.module'
).
then
(
m
=>
m
.
AdminModule
)
},
];
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/shared/services/navservice.ts
View file @
78a6f92f
...
...
@@ -92,7 +92,7 @@ export class NavService implements OnDestroy {
title
:
'Dashboards'
,
icon
:
'home-8-line'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
active
:
false
,
children
:
[
{
path
:
'/dashboard/sales'
,
title
:
'Sales'
,
type
:
'link'
},
...
...
@@ -117,7 +117,7 @@ export class NavService implements OnDestroy {
badgeClass
:
'badge badge-sm bg-secondary badge-hide'
,
badgeValue
:
'new'
,
path
:
'/widgets'
,
selected
:
false
,
selected
:
false
,
type
:
'link'
,
},
//component
...
...
@@ -127,7 +127,7 @@ export class NavService implements OnDestroy {
icon
:
'inbox-line'
,
type
:
'sub'
,
Menusub
:
true
,
selected
:
false
,
selected
:
false
,
active
:
false
,
children
:
[
{
path
:
'/components/accordion'
,
title
:
'Accordion'
,
type
:
'link'
},
...
...
@@ -153,7 +153,7 @@ export class NavService implements OnDestroy {
icon
:
'cpu-line'
,
type
:
'sub'
,
Menusub
:
true
,
selected
:
false
,
selected
:
false
,
active
:
false
,
children
:
[
{
path
:
'/elements/nav-bar'
,
title
:
'Navbar'
,
type
:
'link'
},
...
...
@@ -172,7 +172,7 @@ export class NavService implements OnDestroy {
icon
:
'file-text-line'
,
type
:
'sub'
,
Menusub
:
true
,
selected
:
false
,
selected
:
false
,
active
:
false
,
children
:
[
{
...
...
@@ -235,7 +235,7 @@ export class NavService implements OnDestroy {
type
:
'sub'
,
Menusub
:
true
,
active
:
false
,
selected
:
false
,
selected
:
false
,
children
:
[
{
path
:
'/advanced/rangeslider'
,
title
:
'Rangeslider'
,
type
:
'link'
},
{
path
:
'/advanced/calender'
,
title
:
'Calender'
,
type
:
'link'
},
...
...
@@ -258,7 +258,7 @@ export class NavService implements OnDestroy {
title
:
'File Manager'
,
icon
:
'database'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -287,7 +287,7 @@ export class NavService implements OnDestroy {
icon
:
'file-list-3-line'
,
type
:
'sub'
,
Menusub
:
true
,
selected
:
false
,
selected
:
false
,
active
:
false
,
children
:
[
{
path
:
'/basicui/dropdown'
,
title
:
'Dropdown'
,
type
:
'link'
},
...
...
@@ -302,7 +302,7 @@ export class NavService implements OnDestroy {
title
:
'Tables'
,
icon
:
'database'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -323,7 +323,7 @@ export class NavService implements OnDestroy {
title
:
'NestedMenu'
,
icon
:
'node-tree'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
false
,
active
:
false
,
children
:
[
...
...
@@ -337,7 +337,7 @@ export class NavService implements OnDestroy {
title
:
'Nested2'
,
icon
:
'database'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
active
:
false
,
children
:
[
{
...
...
@@ -362,7 +362,7 @@ export class NavService implements OnDestroy {
title
:
'Maps'
,
icon
:
'map-pin-user-line'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -373,7 +373,7 @@ export class NavService implements OnDestroy {
title
:
'Charts'
,
icon
:
'pie-chart-2-line'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -387,14 +387,14 @@ export class NavService implements OnDestroy {
title
:
'Pages'
,
icon
:
'book-open-line'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
{
title
:
'Profile'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -409,7 +409,7 @@ export class NavService implements OnDestroy {
{
title
:
'Invoice'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -428,7 +428,7 @@ export class NavService implements OnDestroy {
{
title
:
'Blog'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -440,7 +440,7 @@ export class NavService implements OnDestroy {
{
title
:
'Mail'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -456,7 +456,7 @@ export class NavService implements OnDestroy {
{
title
:
'Ecommerce'
,
type
:
'sub'
,
selected
:
false
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -514,7 +514,7 @@ export class NavService implements OnDestroy {
{
title
:
'Icons'
,
icon
:
'camera-lens-line'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -525,13 +525,13 @@ export class NavService implements OnDestroy {
{
title
:
'Authentication'
,
icon
:
'error-warning-line'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
{
title
:
'Sign In'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -542,7 +542,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Sign Up'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -553,7 +553,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Create Password'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -564,7 +564,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Reset Password'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -575,7 +575,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Forgot Password'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -586,7 +586,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Lock Screen'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -597,7 +597,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Two-step-verification'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -635,7 +635,7 @@ export class NavService implements OnDestroy {
},
{
title
:
'Error Pages'
,
type
:
'sub'
,
selected
:
false
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
...
...
@@ -656,4 +656,23 @@ export class NavService implements OnDestroy {
];
// Array
items
=
new
BehaviorSubject
<
Menu
[]
>
(
this
.
MENUITEMS
);
itemsAdmin
=
new
BehaviorSubject
<
Menu
[]
>
([{
headTitle
:
'Admin'
},
{
path
:
'/dashboard/stocks'
,
title
:
'หน้าแรก'
,
type
:
'link'
},
{
title
:
'การจัดการ'
,
type
:
'sub'
,
selected
:
false
,
Menusub
:
true
,
active
:
false
,
children
:
[
{
path
:
'/mail/chat'
,
title
:
'การจัดการสมาชิก'
,
type
:
'link'
},
{
path
:
'/mail/mail'
,
title
:
'การจัดการอุปกรณ์'
,
type
:
'link'
},
{
path
:
'/mail/mail-settings'
,
title
:
'การจัดการอุปกรณ์'
,
type
:
'link'
,
},
],
},]);
itemsEmp
=
new
BehaviorSubject
<
Menu
[]
>
(
this
.
MENUITEMS
);
}
This diff is collapsed.
Click to expand it.
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