diff --git a/angular.json b/angular.json index 8dbb119b..ef8d1169 100644 --- a/angular.json +++ b/angular.json @@ -12,7 +12,7 @@ }, "root": "", "sourceRoot": "src", - "prefix": "app", + "prefix": "framadate", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", @@ -126,4 +126,4 @@ } }}, "defaultProject": "framadate" -} \ No newline at end of file +} diff --git a/messages.xlf b/messages.xlf new file mode 100644 index 00000000..015369e8 --- /dev/null +++ b/messages.xlf @@ -0,0 +1,25 @@ + + + + + + + Bienvenue sur Framadate + + + src/app/app.component.html + 3 + + + + + Ceci est une démo + + + src/app/app.component.html + 6 + + + + + diff --git a/src/app/app.component.html b/src/app/app.component.html index c7e68bd1..f62ef567 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,21 +1,11 @@
-

- Welcome to {{ title }}! +

+ Bienvenue sur Framadate

- Angular Logo +

+ Ceci est une démo +

-

Here are some links to help you start:

- - + diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 2c3ba299..8a294b4e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,14 +3,26 @@ import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; +import { FormContainerComponent } from './form-container/form-container.component'; +import { BasePageComponent } from './pages/base-page/base-page.component'; +import { PageKindComponent } from './pages/page-kind/page-kind.component'; +import { HeaderComponent } from './header/header.component'; +import {FormsModule} from '@angular/forms'; + @NgModule({ declarations: [ - AppComponent + AppComponent, + FormContainerComponent, + BasePageComponent, + PageKindComponent, + HeaderComponent, + ], imports: [ BrowserModule, - AppRoutingModule + AppRoutingModule, + FormsModule, ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/form-container/form-container.component.html b/src/app/form-container/form-container.component.html new file mode 100644 index 00000000..41982fcd --- /dev/null +++ b/src/app/form-container/form-container.component.html @@ -0,0 +1,19 @@ +

form-container works!

+
+ +
+
+ +
+
+ +
diff --git a/src/app/form-container/form-container.component.scss b/src/app/form-container/form-container.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/form-container/form-container.component.spec.ts b/src/app/form-container/form-container.component.spec.ts new file mode 100644 index 00000000..0a9b18d2 --- /dev/null +++ b/src/app/form-container/form-container.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FormContainerComponent } from './form-container.component'; + +describe('FormContainerComponent', () => { + let component: FormContainerComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ FormContainerComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FormContainerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/form-container/form-container.component.ts b/src/app/form-container/form-container.component.ts new file mode 100644 index 00000000..b92e8408 --- /dev/null +++ b/src/app/form-container/form-container.component.ts @@ -0,0 +1,41 @@ +import {Component, OnInit} from '@angular/core'; +import {ProgressionService} from '../progression.service'; + +@Component({ + selector: 'framadate-form-container', + templateUrl: './form-container.component.html', + styleUrls: ['./form-container.component.scss'] +}) +/** + * gestion de la progression dans le formulaire. + * à chaque étape correspond un composant de page + */ +export class FormContainerComponent implements OnInit { + + private pollConfig: any; + private progressionStep = 0; + private progressionStepMax = 0; + private formIsValid = true; + + constructor(private progression: ProgressionService) { + } + + ngOnInit() { + } + + nextPage() { + if (this.checkValidity()) { + this.progressionStep++; + } else { + this.displayErrorMessage(); + } + } + + checkValidity() { + return true; + } + + displayErrorMessage() { + return true; + } +} diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html new file mode 100644 index 00000000..f3445328 --- /dev/null +++ b/src/app/header/header.component.html @@ -0,0 +1 @@ +

(progression)

diff --git a/src/app/header/header.component.scss b/src/app/header/header.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/header/header.component.spec.ts b/src/app/header/header.component.spec.ts new file mode 100644 index 00000000..2d0479d7 --- /dev/null +++ b/src/app/header/header.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeaderComponent } from './header.component'; + +describe('HeaderComponent', () => { + let component: HeaderComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HeaderComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts new file mode 100644 index 00000000..b192e066 --- /dev/null +++ b/src/app/header/header.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'framadate-header', + templateUrl: './header.component.html', + styleUrls: ['./header.component.scss'] +}) +export class HeaderComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/pages/base-page/base-page.component.html b/src/app/pages/base-page/base-page.component.html new file mode 100644 index 00000000..27c6dab0 --- /dev/null +++ b/src/app/pages/base-page/base-page.component.html @@ -0,0 +1 @@ +

base-page works!

diff --git a/src/app/pages/base-page/base-page.component.scss b/src/app/pages/base-page/base-page.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/pages/base-page/base-page.component.spec.ts b/src/app/pages/base-page/base-page.component.spec.ts new file mode 100644 index 00000000..ca3b0897 --- /dev/null +++ b/src/app/pages/base-page/base-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BasePageComponent } from './base-page.component'; + +describe('BasePageComponent', () => { + let component: BasePageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BasePageComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BasePageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/base-page/base-page.component.ts b/src/app/pages/base-page/base-page.component.ts new file mode 100644 index 00000000..2de932a1 --- /dev/null +++ b/src/app/pages/base-page/base-page.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'framadate-base-page', + templateUrl: './base-page.component.html', + styleUrls: ['./base-page.component.scss'] +}) +export class BasePageComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/pages/page-kind/page-kind.component.html b/src/app/pages/page-kind/page-kind.component.html new file mode 100644 index 00000000..996244c5 --- /dev/null +++ b/src/app/pages/page-kind/page-kind.component.html @@ -0,0 +1 @@ +

page-kind works!

diff --git a/src/app/pages/page-kind/page-kind.component.scss b/src/app/pages/page-kind/page-kind.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/pages/page-kind/page-kind.component.spec.ts b/src/app/pages/page-kind/page-kind.component.spec.ts new file mode 100644 index 00000000..9c156f19 --- /dev/null +++ b/src/app/pages/page-kind/page-kind.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageKindComponent } from './page-kind.component'; + +describe('PageKindComponent', () => { + let component: PageKindComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PageKindComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PageKindComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/page-kind/page-kind.component.ts b/src/app/pages/page-kind/page-kind.component.ts new file mode 100644 index 00000000..bf88262d --- /dev/null +++ b/src/app/pages/page-kind/page-kind.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'framadate-page-kind', + templateUrl: './page-kind.component.html', + styleUrls: ['./page-kind.component.scss'] +}) +export class PageKindComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/progression.service.spec.ts b/src/app/progression.service.spec.ts new file mode 100644 index 00000000..d9e82023 --- /dev/null +++ b/src/app/progression.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { ProgressionService } from './progression.service'; + +describe('ProgressionService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: ProgressionService = TestBed.get(ProgressionService); + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/progression.service.ts b/src/app/progression.service.ts new file mode 100644 index 00000000..769dd034 --- /dev/null +++ b/src/app/progression.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class ProgressionService { + + constructor() { } +} diff --git a/src/locale/messages.fr.xlf b/src/locale/messages.fr.xlf new file mode 100644 index 00000000..e69de29b