rename components

develop
tykayn 3 years ago
parent 46cce96dab
commit e238b0aceb
  1. 10
      src/app/app.module.ts
  2. 2
      src/app/config.service.ts
  3. 4
      src/app/config/Routes.ts
  4. 0
      src/app/pages/base-page/base.component.html
  5. 0
      src/app/pages/base-page/base.component.scss
  6. 12
      src/app/pages/base-page/base.component.spec.ts
  7. 6
      src/app/pages/base-page/base.component.ts
  8. 14
      src/app/pages/dates/dates.component.html
  9. 4
      src/app/pages/dates/dates.component.ts
  10. 0
      src/app/pages/kind/kind.component.html
  11. 0
      src/app/pages/kind/kind.component.scss
  12. 12
      src/app/pages/kind/kind.component.spec.ts
  13. 8
      src/app/pages/kind/kind.component.ts
  14. 1
      src/app/pages/visibility/visibility.component.html
  15. 0
      src/app/pages/visibility/visibility.component.scss
  16. 25
      src/app/pages/visibility/visibility.component.spec.ts
  17. 19
      src/app/pages/visibility/visibility.component.ts

@ -4,8 +4,8 @@ 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 {BaseComponent} from './pages/base-page/base.component';
import {KindComponent} from './pages/kind/kind.component';
import {HeaderComponent} from './header/header.component';
import {FormsModule} from '@angular/forms';
import {NavigationComponent} from './ui/navigation/navigation.component';
@ -14,18 +14,20 @@ import {Routes} from './config/Routes';
import {CommonModule} from '@angular/common';
import { DatesComponent } from './pages/dates/dates.component';
import { DebuggerComponent } from './debugger/debugger.component';
import { VisibilityComponent } from './pages/visibility/visibility.component';
@NgModule({
declarations: [
AppComponent,
FormContainerComponent,
BasePageComponent,
PageKindComponent,
BaseComponent,
KindComponent,
HeaderComponent,
NavigationComponent,
DatesComponent,
DebuggerComponent,
VisibilityComponent,
],
imports: [

@ -21,7 +21,7 @@ export class ConfigService {
pollType = 'classic';
title = '';
description = '';
allowSeveralHours = true;
allowSeveralHours = false;
dateList: DateOption[] = [];
constructor() {

@ -1,5 +1,5 @@
import {FormContainerComponent} from '../form-container/form-container.component';
import {PageKindComponent} from '../pages/page-kind/page-kind.component';
import {KindComponent} from '../pages/kind/kind.component';
import {DatesComponent} from '../pages/dates/dates.component';
/**
@ -10,6 +10,6 @@ export const Routes =
{path: '', component: FormContainerComponent},
{path: 'home', component: FormContainerComponent},
{path: 'step/date', component: DatesComponent},
{path: 'step/kind', component: PageKindComponent}
{path: 'step/kind', component: KindComponent}
]
;

@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PageKindComponent } from './page-kind.component';
import { BaseComponent } from './base.component';
describe('PageKindComponent', () => {
let component: PageKindComponent;
let fixture: ComponentFixture<PageKindComponent>;
describe('BaseComponent', () => {
let component: BaseComponent;
let fixture: ComponentFixture<BaseComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PageKindComponent ]
declarations: [ BaseComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageKindComponent);
fixture = TestBed.createComponent(BaseComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

@ -3,13 +3,13 @@ import {ConfigService} from '../../config.service';
@Component({
selector: 'framadate-base-page',
templateUrl: './base-page.component.html',
styleUrls: ['./base-page.component.scss']
templateUrl: './base.component.html',
styleUrls: ['./base.component.scss']
})
/**
* base page is aware of the state of the filling
*/
export class BasePageComponent implements OnInit {
export class BaseComponent implements OnInit {
constructor(private config: ConfigService) {
}

@ -4,13 +4,17 @@
<div>
<select name="multi_hours" id="multi_hours"
[(ngModel)]="config.allowSeveralHours">
<option value="yes"></option>
<option value="no"></option>
<option value="yes">possiblement différents</option>
<option value="no">identiques</option>
</select>
<label for="multi_hours" i18n>
Je souhaite mettre des créneaux horaires différents pour chaque jour
<label for="multi_hours">
<span i18n>
Je souhaite mettre des créneaux horaires
</span>
<span i18n>
pour chaque journée
</span>
</label>
</div>
<button
(click)="addDate()"

@ -1,13 +1,13 @@
import {Component, OnInit} from '@angular/core';
import {ConfigService} from '../../config.service';
import {BasePageComponent} from '../base-page/base-page.component';
import {BaseComponent} from '../base-page/base.component';
@Component({
selector: 'framadate-dates',
templateUrl: './dates.component.html',
styleUrls: ['./dates.component.scss']
})
export class DatesComponent extends BasePageComponent implements OnInit {
export class DatesComponent extends BaseComponent implements OnInit {
constructor(config: ConfigService) {
super(config);

@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BasePageComponent } from './base-page.component';
import { KindComponent } from './kind.component';
describe('BasePageComponent', () => {
let component: BasePageComponent;
let fixture: ComponentFixture<BasePageComponent>;
describe('KindComponent', () => {
let component: KindComponent;
let fixture: ComponentFixture<KindComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BasePageComponent ]
declarations: [ KindComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BasePageComponent);
fixture = TestBed.createComponent(KindComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

@ -1,13 +1,13 @@
import {Component, OnInit} from '@angular/core';
import {BasePageComponent} from '../base-page/base-page.component';
import {BaseComponent} from '../base-page/base.component';
import {ConfigService} from '../../config.service';
@Component({
selector: 'framadate-page-kind',
templateUrl: './page-kind.component.html',
styleUrls: ['./page-kind.component.scss']
templateUrl: './kind.component.html',
styleUrls: ['./kind.component.scss']
})
export class PageKindComponent extends BasePageComponent implements OnInit {
export class KindComponent extends BaseComponent implements OnInit {
constructor(config: ConfigService) {
super(config);

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

@ -0,0 +1,19 @@
import { Component, OnInit } from '@angular/core';
import {BaseComponent} from '../base-page/base.component';
import {ConfigService} from '../../config.service';
@Component({
selector: 'framadate-visibility',
templateUrl: './visibility.component.html',
styleUrls: ['./visibility.component.scss']
})
export class VisibilityComponent extends BaseComponent implements OnInit {
constructor(config: ConfigService) {
super(config);
}
ngOnInit() {
}
}
Loading…
Cancel
Save