🚑 change form-container to home component

This commit is contained in:
ty kayn 2019-09-09 10:49:33 +02:00
parent 018b1ce83e
commit d2478c37a4
9 changed files with 7217 additions and 36 deletions

View File

@ -3,7 +3,6 @@ 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 {BaseComponent} from './pages/base-page/base.component';
import {KindComponent} from './pages/kind/kind.component';
import {HeaderComponent} from './header/header.component';
@ -28,13 +27,13 @@ import { VotingSummaryComponent } from './pages/voting-summary/voting-summary.co
import { VotingGraphComponent } from './pages/voting-graph/voting-graph.component';
import { VotingChoiceComponent } from './pages/voting-choice/voting-choice.component';
import { PasswordComponent } from './pages/password/password.component';
import { HomeComponent } from './pages/home/home.component';
registerLocaleData(localeFr, 'fr');
@NgModule({
declarations: [
AppComponent,
FormContainerComponent,
BaseComponent,
KindComponent,
HeaderComponent,
@ -52,6 +51,7 @@ registerLocaleData(localeFr, 'fr');
VotingGraphComponent,
VotingChoiceComponent,
PasswordComponent,
HomeComponent,
],
imports: [

View File

@ -1,4 +1,3 @@
import {FormContainerComponent} from '../form-container/form-container.component';
import {KindComponent} from '../pages/kind/kind.component';
import {DatesComponent} from '../pages/dates/dates.component';
import {VisibilityComponent} from '../pages/visibility/visibility.component';
@ -8,6 +7,7 @@ import {EndConfirmationComponent} from '../pages/end-confirmation/end-confirmati
import {AnswersComponent} from '../pages/answers/answers.component';
import {CreateOrRetrieveComponent} from '../pages/create-or-retrieve/create-or-retrieve.component';
import {BaseComponent} from '../pages/base-page/base.component';
import {HomeComponent} from "../pages/home/home.component";
/**
* each step in the form is a component
@ -15,7 +15,7 @@ import {BaseComponent} from '../pages/base-page/base.component';
export const Routes =
[
{path: '', component: CreateOrRetrieveComponent},
{path: 'home', component: FormContainerComponent},
{path: 'home', component: HomeComponent},
{path: 'base', component: BaseComponent},
{path: 'step/creation', component: CreateOrRetrieveComponent},
{path: 'step/date', component: DatesComponent},

View File

@ -1,25 +0,0 @@
import {Component, OnInit} from '@angular/core';
import {ConfigService} from '../config.service';
// import {PollConfig} from '../config/PollConfig';
@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 {
constructor(public config: ConfigService) {
}
ngOnInit() {
}
}

View File

@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormContainerComponent } from './form-container.component';
import { HomeComponent } from './home.component';
describe('FormContainerComponent', () => {
let component: FormContainerComponent;
let fixture: ComponentFixture<FormContainerComponent>;
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FormContainerComponent ]
declarations: [ HomeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FormContainerComponent);
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

View File

@ -0,0 +1,19 @@
import {Component, OnInit} from '@angular/core';
import {ConfigService} from "../../config.service";
@Component({
selector: 'framadate-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
constructor(public config: ConfigService) {
}
ngOnInit() {
}
}

View File

@ -1,4 +1,4 @@
<h1>page de démo</h1>
<p>cette étape est en cours de développement. <br> S'inspirer de la page de FormContainer pour réaliser d'autres pages
<p>cette étape est en cours de développement. <br> S'inspirer de la page de Home pour réaliser d'autres pages
</p>
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a>

7187
yarn.lock Normal file

File diff suppressed because it is too large Load Diff