diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 9655221..0df57d1 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -10,10 +10,14 @@ const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: PageAccueilComponent }, { path: 'details', component: PageDetailsComponent }, - { path: 'account', + { path: 'account', loadChildren: () => import('./modules/account/account.module') .then(m => m.AccountModule) }, + { path: 'admin', + loadChildren: () => import('./modules/admin/admin.module') + .then(m => m.AdminModule) + }, { path: '**', component: PageNotFoundComponent } ]; diff --git a/src/app/modules/admin/admin-routing.module.ts b/src/app/modules/admin/admin-routing.module.ts new file mode 100644 index 0000000..e7225ab --- /dev/null +++ b/src/app/modules/admin/admin-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { PageAjouterComponent } from './pages/page-ajouter/page-ajouter.component'; +import { PageModifierComponent } from './pages/page-modifier/page-modifier.component'; +import { PageTableauComponent } from './pages/page-tableau/page-tableau.component'; + +const routes: Routes = [ + { path: '', redirectTo: 'tableau', pathMatch: 'full'}, + { path: 'modifier', component: PageModifierComponent }, + { path: 'ajouter', component: PageAjouterComponent }, + { path: 'tableau', component: PageTableauComponent }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class AdminRoutingModule { } diff --git a/src/app/modules/admin/admin.module.ts b/src/app/modules/admin/admin.module.ts new file mode 100644 index 0000000..79afb4f --- /dev/null +++ b/src/app/modules/admin/admin.module.ts @@ -0,0 +1,27 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { PageTableauComponent } from './pages/page-tableau/page-tableau.component'; +import { PageAjouterComponent } from './pages/page-ajouter/page-ajouter.component'; +import { PageModifierComponent } from './pages/page-modifier/page-modifier.component'; +import { FormulaireComponent } from './components/formulaire/formulaire.component'; +import { AdminRoutingModule } from './admin-routing.module'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; + + + + +@NgModule({ + declarations: [ + PageTableauComponent, + PageAjouterComponent, + PageModifierComponent, + FormulaireComponent + ], + imports: [ + CommonModule, + AdminRoutingModule, + FormsModule, + ReactiveFormsModule + ] +}) +export class AdminModule { } diff --git a/src/app/modules/admin/components/formulaire/formulaire.component.html b/src/app/modules/admin/components/formulaire/formulaire.component.html new file mode 100644 index 0000000..a68eae0 --- /dev/null +++ b/src/app/modules/admin/components/formulaire/formulaire.component.html @@ -0,0 +1 @@ +

formulaire works!

diff --git a/src/app/modules/admin/components/formulaire/formulaire.component.scss b/src/app/modules/admin/components/formulaire/formulaire.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/admin/components/formulaire/formulaire.component.spec.ts b/src/app/modules/admin/components/formulaire/formulaire.component.spec.ts new file mode 100644 index 0000000..80bb572 --- /dev/null +++ b/src/app/modules/admin/components/formulaire/formulaire.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FormulaireComponent } from './formulaire.component'; + +describe('FormulaireComponent', () => { + let component: FormulaireComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ FormulaireComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(FormulaireComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modules/admin/components/formulaire/formulaire.component.ts b/src/app/modules/admin/components/formulaire/formulaire.component.ts new file mode 100644 index 0000000..034de40 --- /dev/null +++ b/src/app/modules/admin/components/formulaire/formulaire.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-formulaire', + templateUrl: './formulaire.component.html', + styleUrls: ['./formulaire.component.scss'] +}) +export class FormulaireComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.html b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.html new file mode 100644 index 0000000..a60afc4 --- /dev/null +++ b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.html @@ -0,0 +1 @@ +

page-ajouter works!

diff --git a/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.scss b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.spec.ts b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.spec.ts new file mode 100644 index 0000000..350da98 --- /dev/null +++ b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageAjouterComponent } from './page-ajouter.component'; + +describe('PageAjouterComponent', () => { + let component: PageAjouterComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PageAjouterComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PageAjouterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts new file mode 100644 index 0000000..c6a0844 --- /dev/null +++ b/src/app/modules/admin/pages/page-ajouter/page-ajouter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-page-ajouter', + templateUrl: './page-ajouter.component.html', + styleUrls: ['./page-ajouter.component.scss'] +}) +export class PageAjouterComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/admin/pages/page-modifier/page-modifier.component.html b/src/app/modules/admin/pages/page-modifier/page-modifier.component.html new file mode 100644 index 0000000..1c0ec6f --- /dev/null +++ b/src/app/modules/admin/pages/page-modifier/page-modifier.component.html @@ -0,0 +1 @@ +

page-modifier works!

diff --git a/src/app/modules/admin/pages/page-modifier/page-modifier.component.scss b/src/app/modules/admin/pages/page-modifier/page-modifier.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/admin/pages/page-modifier/page-modifier.component.spec.ts b/src/app/modules/admin/pages/page-modifier/page-modifier.component.spec.ts new file mode 100644 index 0000000..7a8526e --- /dev/null +++ b/src/app/modules/admin/pages/page-modifier/page-modifier.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageModifierComponent } from './page-modifier.component'; + +describe('PageModifierComponent', () => { + let component: PageModifierComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PageModifierComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PageModifierComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modules/admin/pages/page-modifier/page-modifier.component.ts b/src/app/modules/admin/pages/page-modifier/page-modifier.component.ts new file mode 100644 index 0000000..70691bc --- /dev/null +++ b/src/app/modules/admin/pages/page-modifier/page-modifier.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-page-modifier', + templateUrl: './page-modifier.component.html', + styleUrls: ['./page-modifier.component.scss'] +}) +export class PageModifierComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/admin/pages/page-tableau/page-tableau.component.html b/src/app/modules/admin/pages/page-tableau/page-tableau.component.html new file mode 100644 index 0000000..c7437f9 --- /dev/null +++ b/src/app/modules/admin/pages/page-tableau/page-tableau.component.html @@ -0,0 +1 @@ +

page-tableau works!

diff --git a/src/app/modules/admin/pages/page-tableau/page-tableau.component.scss b/src/app/modules/admin/pages/page-tableau/page-tableau.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/modules/admin/pages/page-tableau/page-tableau.component.spec.ts b/src/app/modules/admin/pages/page-tableau/page-tableau.component.spec.ts new file mode 100644 index 0000000..ffe8daf --- /dev/null +++ b/src/app/modules/admin/pages/page-tableau/page-tableau.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageTableauComponent } from './page-tableau.component'; + +describe('PageTableauComponent', () => { + let component: PageTableauComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ PageTableauComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PageTableauComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modules/admin/pages/page-tableau/page-tableau.component.ts b/src/app/modules/admin/pages/page-tableau/page-tableau.component.ts new file mode 100644 index 0000000..097a53e --- /dev/null +++ b/src/app/modules/admin/pages/page-tableau/page-tableau.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-page-tableau', + templateUrl: './page-tableau.component.html', + styleUrls: ['./page-tableau.component.scss'] +}) +export class PageTableauComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/modules/admin/services/admin.service.spec.ts b/src/app/modules/admin/services/admin.service.spec.ts new file mode 100644 index 0000000..c83b4be --- /dev/null +++ b/src/app/modules/admin/services/admin.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { AdminService } from './admin.service'; + +describe('AdminService', () => { + let service: AdminService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(AdminService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/modules/admin/services/admin.service.ts b/src/app/modules/admin/services/admin.service.ts new file mode 100644 index 0000000..0c3b4a2 --- /dev/null +++ b/src/app/modules/admin/services/admin.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class AdminService { + + constructor() { } +}