Ajout module account + pages + routes

This commit is contained in:
Romain 2022-01-17 12:16:38 +01:00
parent b81ebb7d89
commit 247071b04f
24 changed files with 15449 additions and 36 deletions

View File

@ -6048,5 +6048,6 @@
"product_seller": "Truffaut", "product_seller": "Truffaut",
"product_web_only": "oui" "product_web_only": "oui"
} }
] ],
"users" : []
} }

15249
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,7 @@
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"@types/underscore": "^1.11.4", "@types/underscore": "^1.11.4",
"jasmine-core": "~3.10.0", "jasmine-core": "~3.10.0",
"json-server-auth": "^2.1.0",
"karma": "~6.3.0", "karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3", "karma-coverage": "~2.0.3",

View File

@ -6,9 +6,14 @@ import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.com
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' }, { path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: PageAccueilComponent }, {
path: 'home', component: PageAccueilComponent },
{ path: 'details', component: PageDetailsComponent }, { path: 'details', component: PageDetailsComponent },
{ path: '**', component: PageNotFoundComponent } {path : 'account',
loadChildren : () => import('./modules/account/account.module')
.then(m => m.AccountModule)
},
{ path: '**', component: PageNotFoundComponent }
]; ];
@NgModule({ @NgModule({

View File

@ -28,7 +28,9 @@ import { AvisBarComponent } from './components/avis-bar/avis-bar.component';
imports: [ imports: [
BrowserModule, BrowserModule,
AppRoutingModule, AppRoutingModule,
HttpClientModule HttpClientModule,
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]

View File

@ -1,12 +1,12 @@
<nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light shadow "> <nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light shadow ">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#">🪴 La Belle Plante</a> <a class="navbar-brand" href="#">🪴 La Belle Plante</a>
<button class="navbar-toggler" <button class="navbar-toggler"
type="button" type="button"
data-bs-toggle="collapse" data-bs-toggle="collapse"
data-bs-target="#navbarNavAltMarkup" data-bs-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-controls="navbarNavAltMarkup"
aria-expanded="false" aria-expanded="false"
aria-label="Toggle navigation"> aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
@ -14,6 +14,7 @@
<div class="navbar-nav"> <div class="navbar-nav">
<a routerLink="home" routerLinkActive="active-custom" class="nav-link">Accueil</a> <a routerLink="home" routerLinkActive="active-custom" class="nav-link">Accueil</a>
<a routerLink="details" routerLinkActive="active-custom" class="nav-link">Details</a> <a routerLink="details" routerLinkActive="active-custom" class="nav-link">Details</a>
<a routerLink="account/signin" routerLinkActive="active-custom" class="nav-link">Se connecter</a>
<a class="nav-link">Panier</a> <a class="nav-link">Panier</a>
<a class="nav-link disabled">Plus d'option bientôt</a> <a class="nav-link disabled">Plus d'option bientôt</a>
<a class="nav-link disabled" *ngIf="likeCounter == 0"> Pas de plante likée</a> <a class="nav-link disabled" *ngIf="likeCounter == 0"> Pas de plante likée</a>

View File

@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PageForgotPasswordComponent } from './pages/page-forgot-password/page-forgot-password.component';
import { PageResetPasswordComponent } from './pages/page-reset-password/page-reset-password.component';
import { PageSigninComponent } from './pages/page-signin/page-signin.component';
import { PageSignupComponent } from './pages/page-signup/page-signup.component';
const routes: Routes = [
{path : '', redirectTo:'signin', pathMatch: 'full'},
{path : "signin", component : PageSigninComponent},
{path : "signup", component : PageSignupComponent},
{path : "forgot-password", component : PageForgotPasswordComponent},
{path : "reset-password", component : PageResetPasswordComponent}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AccountRoutingModule { }

View File

@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AccountRoutingModule } from './account-routing.module';
import { PageSignupComponent } from './pages/page-signup/page-signup.component';
import { PageSigninComponent } from './pages/page-signin/page-signin.component';
import { PageForgotPasswordComponent } from './pages/page-forgot-password/page-forgot-password.component';
import { PageResetPasswordComponent } from './pages/page-reset-password/page-reset-password.component';
@NgModule({
declarations: [
PageSignupComponent,
PageSigninComponent,
PageForgotPasswordComponent,
PageResetPasswordComponent
],
imports: [
CommonModule,
AccountRoutingModule
]
})
export class AccountModule { }

View File

@ -0,0 +1 @@
<p>page-forgot-password works!</p>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PageForgotPasswordComponent } from './page-forgot-password.component';
describe('PageForgotPasswordComponent', () => {
let component: PageForgotPasswordComponent;
let fixture: ComponentFixture<PageForgotPasswordComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PageForgotPasswordComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PageForgotPasswordComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-page-forgot-password',
templateUrl: './page-forgot-password.component.html',
styleUrls: ['./page-forgot-password.component.scss']
})
export class PageForgotPasswordComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

View File

@ -0,0 +1 @@
<p>page-reset-password works!</p>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PageResetPasswordComponent } from './page-reset-password.component';
describe('PageResetPasswordComponent', () => {
let component: PageResetPasswordComponent;
let fixture: ComponentFixture<PageResetPasswordComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PageResetPasswordComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PageResetPasswordComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-page-reset-password',
templateUrl: './page-reset-password.component.html',
styleUrls: ['./page-reset-password.component.scss']
})
export class PageResetPasswordComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

View File

@ -0,0 +1 @@
<p>page-signin works!</p>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PageSigninComponent } from './page-signin.component';
describe('PageSigninComponent', () => {
let component: PageSigninComponent;
let fixture: ComponentFixture<PageSigninComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PageSigninComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PageSigninComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-page-signin',
templateUrl: './page-signin.component.html',
styleUrls: ['./page-signin.component.scss']
})
export class PageSigninComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

View File

@ -0,0 +1 @@
<p>page-signup works!</p>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PageSignupComponent } from './page-signup.component';
describe('PageSignupComponent', () => {
let component: PageSignupComponent;
let fixture: ComponentFixture<PageSignupComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PageSignupComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PageSignupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-page-signup',
templateUrl: './page-signup.component.html',
styleUrls: ['./page-signup.component.scss']
})
export class PageSignupComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}