Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 675eafc

Browse files
committed
💄 mis a jour du dashboard
1 parent a3ed7ad commit 675eafc

File tree

7 files changed

+74
-13
lines changed

7 files changed

+74
-13
lines changed

src/app/modules/dashboard/dashboard.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { CommonModule } from '@angular/common';
21
import { NgModule } from '@angular/core';
32
import { RouterModule } from '@angular/router';
43

4+
import { SharedModule } from '@app/shared/shared.module';
5+
56
import { DashboardComponent } from './pages/dashboard/dashboard.component';
67
import { dashboardRoutes } from './routes/dashboard.routes';
78

@@ -10,7 +11,7 @@ import { dashboardRoutes } from './routes/dashboard.routes';
1011
DashboardComponent
1112
],
1213
imports: [
13-
CommonModule,
14+
SharedModule,
1415
RouterModule.forChild(dashboardRoutes),
1516
],
1617
exports: [],
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { Menu } from '@app/shared/interfaces/menu';
2+
3+
export const adminMenu: Menu[] = [
4+
{
5+
group: 'Aperçu',
6+
items: [
7+
{
8+
title: 'Tableau de bord',
9+
svgPath: [
10+
'M12 16v5m6 0-3.951-3.293c-.73-.607-1.094-.91-1.5-1.027a2 2 0 0 0-1.098 0c-.406.116-.77.42-1.5 1.027L6 21m2-10v1m4-3v3m4-5v5m6-9H2m1 0h18v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 16 17.88 16 16.2 16H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 13.72 3 12.88 3 11.2V3Z'
11+
],
12+
link: '/dashboard',
13+
},
14+
{
15+
title: 'Transactions',
16+
svgPath: [
17+
'm6 6 2-2m0 0L6 2m2 2H6a4 4 0 0 0-4 4m16 10-2 2m0 0 2 2m-2-2h2a4 4 0 0 0 4-4M10.189 6.5a6 6 0 1 1 7.311 7.311M14 16a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z'
18+
],
19+
link: '/dashboard/transactions',
20+
}
21+
]
22+
},
23+
{
24+
group: 'Management',
25+
items: [
26+
{
27+
title: 'Utilisateurs',
28+
svgPath: [
29+
'M12 16v5m6 0-3.951-3.293c-.73-.607-1.094-.91-1.5-1.027a2 2 0 0 0-1.098 0c-.406.116-.77.42-1.5 1.027L6 21m2-10v1m4-3v3m4-5v5m6-9H2m1 0h18v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 16 17.88 16 16.2 16H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 13.72 3 12.88 3 11.2V3Z'
30+
],
31+
link: '/users',
32+
},
33+
{
34+
title: 'Promotions',
35+
svgPath: [
36+
'm6 6 2-2m0 0L6 2m2 2H6a4 4 0 0 0-4 4m16 10-2 2m0 0 2 2m-2-2h2a4 4 0 0 0 4-4M10.189 6.5a6 6 0 1 1 7.311 7.311M14 16a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z'
37+
],
38+
link: '/promotions',
39+
}
40+
]
41+
},
42+
{
43+
group: 'Opérations',
44+
items: [
45+
{
46+
title: 'Paramètres',
47+
svgPath: [
48+
'M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z',
49+
'M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z',
50+
],
51+
link: '/settings',
52+
},
53+
{
54+
title: 'Rapports',
55+
svgPath: [
56+
'M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M16 13H8m8 4H8m2-8H8m6-7H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.28 4 5.12 4 6.8v10.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 22 7.12 22 8.8 22h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V8l-6-6Z'
57+
],
58+
link: '/dashboard/reports',
59+
}
60+
]
61+
},
62+
];

src/app/modules/dashboard/pages/dashboard/dashboard.component.css

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p>dashboard works!</p>
1+
<p>dashboard works properly!</p>

src/app/modules/dashboard/pages/dashboard/dashboard.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
22

33
@Component({
44
templateUrl: './dashboard.component.html',
5-
styleUrls: ['./dashboard.component.css']
65
})
76
export class DashboardComponent implements OnInit {
87

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import { Routes } from '@angular/router';
22

3+
import { AuthGuard } from '@app/core/guards/auth.guard';
4+
5+
import { CpanelComponent } from '@app/shared/themes/layouts/cpanel/cpanel.component';
36
import { DashboardComponent } from '../pages/dashboard/dashboard.component';
47

58
export const dashboardRoutes: Routes = [
6-
{ path: '', component: DashboardComponent },
79
{
810
path: '',
9-
children: [],
11+
component: CpanelComponent,
12+
canActivateChild: [AuthGuard],
13+
children: [
14+
{ path: '', component: DashboardComponent },
15+
],
1016
}
1117
];

src/app/modules/index.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)