Skip to content

Commit c22015d

Browse files
committed
ClientsModule added to admin dashboard sidebar
1 parent b9f6ddd commit c22015d

File tree

5 files changed

+51
-31
lines changed

5 files changed

+51
-31
lines changed

src/app/admin/admin-routing.module.ts

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,60 @@ const routes: Routes = [
99
children: [
1010
{
1111
path: '',
12-
redirectTo: 'dashboard'
12+
redirectTo: 'dashboard',
1313
},
1414
{
1515
path: 'dashboard',
16-
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule)
16+
loadChildren: () =>
17+
import('./dashboard/dashboard.module').then(m => m.DashboardModule),
1718
},
1819
{
1920
path: 'charts',
20-
loadChildren: () => import('./mat-demos/charts/charts.module').then(m => m.ChartsModule)
21+
loadChildren: () =>
22+
import('./mat-demos/charts/charts.module').then(m => m.ChartsModule),
2123
},
2224
{
2325
path: 'tables',
24-
loadChildren: () => import('./mat-demos/tables/tables.module').then(m => m.TablesModule)
26+
loadChildren: () =>
27+
import('./mat-demos/tables/tables.module').then(m => m.TablesModule),
2528
},
2629
{
2730
path: 'forms',
28-
loadChildren: () => import('./mat-demos/forms/forms.module').then(m => m.FormsModule)
31+
loadChildren: () =>
32+
import('./mat-demos/forms/forms.module').then(m => m.FormsModule),
2933
},
3034
{
3135
path: 'mat-grid',
32-
loadChildren: () => import('./mat-demos/mat-grid/mat-grid.module').then(m => m.MatGridModule)
36+
loadChildren: () =>
37+
import('./mat-demos/mat-grid/mat-grid.module').then(
38+
m => m.MatGridModule
39+
),
3340
},
3441
{
3542
path: 'mat-components',
36-
loadChildren:
37-
() => import('./mat-components/mat-components.module').then(m => m.MatComponentsModule)
43+
loadChildren: () =>
44+
import('./mat-components/mat-components.module').then(
45+
m => m.MatComponentsModule
46+
),
3847
},
3948
{
4049
path: 'animations',
41-
loadChildren:
42-
() => import('./mat-demos/animations/animations.module').then(m => m.AnimationsModule)
43-
}
44-
]
45-
}
50+
loadChildren: () =>
51+
import('./mat-demos/animations/animations.module').then(
52+
m => m.AnimationsModule
53+
),
54+
},
55+
{
56+
path: 'clients',
57+
loadChildren: () =>
58+
import('../pages/clients/clients.module').then(m => m.ClientsModule),
59+
},
60+
],
61+
},
4662
];
4763

4864
@NgModule({
4965
imports: [RouterModule.forChild(routes)],
50-
exports: [RouterModule]
66+
exports: [RouterModule],
5167
})
5268
export class AdminRoutingModule {}

src/app/admin/layout/side-nav/side-nav.component.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,24 @@
1414
<a mat-list-item [routerLinkActive]="'active'" [routerLink]="['/mat-grid']">
1515
<mat-icon class="sidenav-icon">grid_on</mat-icon>Flex Grid
1616
</a>
17-
<a mat-list-item [routerLinkActive]="'active'" [routerLink]="['/mat-components']">
17+
<a
18+
mat-list-item
19+
[routerLinkActive]="'active'"
20+
[routerLink]="['/mat-components']"
21+
>
1822
<mat-icon class="sidenav-icon">code</mat-icon>Material Components
1923
</a>
2024
<a mat-list-item [routerLinkActive]="'active'" [routerLink]="['/animations']">
2125
<mat-icon class="sidenav-icon">perm_media</mat-icon>Animations
2226
</a>
27+
<a mat-list-item [routerLinkActive]="'active'" [routerLink]="['/clients']">
28+
<mat-icon class="sidenav-icon">people</mat-icon>Clients
29+
</a>
2330
<a mat-list-item [routerLinkActive]="'active'" [routerLink]="['/blank-page']">
2431
<mat-icon class="sidenav-icon">insert_drive_file</mat-icon>Blank Page
2532
</a>
2633
<div class="nested-menu">
27-
<a mat-list-item (click)="showMenu=!showMenu">
34+
<a mat-list-item (click)="showMenu = !showMenu">
2835
<mat-icon class="sidenav-icon">add</mat-icon>Menu
2936
</a>
3037
<ul class="nested submenu" [class.expand]="showMenu">

src/app/app-routing.module.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { AuthGuard } from './core/auth.guard';
99

1010
const routes: Routes = [
1111
{
12-
path: 'admin',
12+
path: '',
1313
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
1414
canActivate: [AuthGuard],
1515
},
@@ -18,21 +18,21 @@ const routes: Routes = [
1818
loadChildren: () => import('./login/login.module').then(m => m.LoginModule),
1919
},
2020
{
21-
path: '',
21+
path: 'home',
2222
component: HomepageComponent,
2323
},
2424
{
2525
path: 'todos',
2626
component: TodoPageComponent,
2727
},
28-
{
29-
path: 'clients',
30-
loadChildren: './pages/clients/clients.module#ClientsModule',
31-
},
32-
{
33-
path: 'algorithms',
34-
loadChildren: './pages/algorithms/algorithms.module#AlgorithmsModule',
35-
},
28+
// {
29+
// path: 'clients',
30+
// loadChildren: './pages/clients/clients.module#ClientsModule',
31+
// },
32+
// {
33+
// path: 'algorithms',
34+
// loadChildren: './pages/algorithms/algorithms.module#AlgorithmsModule',
35+
// },
3636

3737
{
3838
path: '**',
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<app-main-layout>
1+
<div>
22
<h1 class="sub-header">
33
Clients
44
<button mat-stroked-button color="primary" (click)="addItem()">Add</button>
@@ -7,14 +7,11 @@ <h1 class="sub-header">
77
<app-clients-list
88
[clients]="clients$ | async"
99
[loading]="clientsLoading$ | async"
10-
1110
[count]="clientsCount$ | async"
1211
[offset]="clientsOffset$ | async"
13-
1412
(selectItem)="onItemSelected($event)"
1513
(editItem)="onItemUpdate($event)"
1614
(deleteItem)="onItemDelete($event)"
17-
1815
(reload)="onGridUpdate($event)"
1916
></app-clients-list>
20-
</app-main-layout>
17+
</div>
File renamed without changes.

0 commit comments

Comments
 (0)