mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
⚡ rename components
This commit is contained in:
parent
46cce96dab
commit
e238b0aceb
@ -4,8 +4,8 @@ import {NgModule} from '@angular/core';
|
|||||||
import {AppRoutingModule} from './app-routing.module';
|
import {AppRoutingModule} from './app-routing.module';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {FormContainerComponent} from './form-container/form-container.component';
|
import {FormContainerComponent} from './form-container/form-container.component';
|
||||||
import {BasePageComponent} from './pages/base-page/base-page.component';
|
import {BaseComponent} from './pages/base-page/base.component';
|
||||||
import {PageKindComponent} from './pages/page-kind/page-kind.component';
|
import {KindComponent} from './pages/kind/kind.component';
|
||||||
import {HeaderComponent} from './header/header.component';
|
import {HeaderComponent} from './header/header.component';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {NavigationComponent} from './ui/navigation/navigation.component';
|
import {NavigationComponent} from './ui/navigation/navigation.component';
|
||||||
@ -14,18 +14,20 @@ import {Routes} from './config/Routes';
|
|||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import { DatesComponent } from './pages/dates/dates.component';
|
import { DatesComponent } from './pages/dates/dates.component';
|
||||||
import { DebuggerComponent } from './debugger/debugger.component';
|
import { DebuggerComponent } from './debugger/debugger.component';
|
||||||
|
import { VisibilityComponent } from './pages/visibility/visibility.component';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
FormContainerComponent,
|
FormContainerComponent,
|
||||||
BasePageComponent,
|
BaseComponent,
|
||||||
PageKindComponent,
|
KindComponent,
|
||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
NavigationComponent,
|
NavigationComponent,
|
||||||
DatesComponent,
|
DatesComponent,
|
||||||
DebuggerComponent,
|
DebuggerComponent,
|
||||||
|
VisibilityComponent,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -21,7 +21,7 @@ export class ConfigService {
|
|||||||
pollType = 'classic';
|
pollType = 'classic';
|
||||||
title = '';
|
title = '';
|
||||||
description = '';
|
description = '';
|
||||||
allowSeveralHours = true;
|
allowSeveralHours = false;
|
||||||
dateList: DateOption[] = [];
|
dateList: DateOption[] = [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {FormContainerComponent} from '../form-container/form-container.component';
|
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';
|
import {DatesComponent} from '../pages/dates/dates.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,6 +10,6 @@ export const Routes =
|
|||||||
{path: '', component: FormContainerComponent},
|
{path: '', component: FormContainerComponent},
|
||||||
{path: 'home', component: FormContainerComponent},
|
{path: 'home', component: FormContainerComponent},
|
||||||
{path: 'step/date', component: DatesComponent},
|
{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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { BasePageComponent } from './base-page.component';
|
import { BaseComponent } from './base.component';
|
||||||
|
|
||||||
describe('BasePageComponent', () => {
|
describe('BaseComponent', () => {
|
||||||
let component: BasePageComponent;
|
let component: BaseComponent;
|
||||||
let fixture: ComponentFixture<BasePageComponent>;
|
let fixture: ComponentFixture<BaseComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ BasePageComponent ]
|
declarations: [ BaseComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(BasePageComponent);
|
fixture = TestBed.createComponent(BaseComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
@ -3,13 +3,13 @@ import {ConfigService} from '../../config.service';
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'framadate-base-page',
|
selector: 'framadate-base-page',
|
||||||
templateUrl: './base-page.component.html',
|
templateUrl: './base.component.html',
|
||||||
styleUrls: ['./base-page.component.scss']
|
styleUrls: ['./base.component.scss']
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* base page is aware of the state of the filling
|
* base page is aware of the state of the filling
|
||||||
*/
|
*/
|
||||||
export class BasePageComponent implements OnInit {
|
export class BaseComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private config: ConfigService) {
|
constructor(private config: ConfigService) {
|
||||||
}
|
}
|
@ -4,13 +4,17 @@
|
|||||||
<div>
|
<div>
|
||||||
<select name="multi_hours" id="multi_hours"
|
<select name="multi_hours" id="multi_hours"
|
||||||
[(ngModel)]="config.allowSeveralHours">
|
[(ngModel)]="config.allowSeveralHours">
|
||||||
<option value="yes"></option>
|
<option value="yes">possiblement différents</option>
|
||||||
<option value="no"></option>
|
<option value="no">identiques</option>
|
||||||
</select>
|
</select>
|
||||||
<label for="multi_hours" i18n>
|
<label for="multi_hours">
|
||||||
Je souhaite mettre des créneaux horaires différents pour chaque jour
|
<span i18n>
|
||||||
|
Je souhaite mettre des créneaux horaires
|
||||||
|
</span>
|
||||||
|
<span i18n>
|
||||||
|
pour chaque journée
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
(click)="addDate()"
|
(click)="addDate()"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ConfigService} from '../../config.service';
|
import {ConfigService} from '../../config.service';
|
||||||
import {BasePageComponent} from '../base-page/base-page.component';
|
import {BaseComponent} from '../base-page/base.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'framadate-dates',
|
selector: 'framadate-dates',
|
||||||
templateUrl: './dates.component.html',
|
templateUrl: './dates.component.html',
|
||||||
styleUrls: ['./dates.component.scss']
|
styleUrls: ['./dates.component.scss']
|
||||||
})
|
})
|
||||||
export class DatesComponent extends BasePageComponent implements OnInit {
|
export class DatesComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
constructor(config: ConfigService) {
|
constructor(config: ConfigService) {
|
||||||
super(config);
|
super(config);
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { PageKindComponent } from './page-kind.component';
|
import { KindComponent } from './kind.component';
|
||||||
|
|
||||||
describe('PageKindComponent', () => {
|
describe('KindComponent', () => {
|
||||||
let component: PageKindComponent;
|
let component: KindComponent;
|
||||||
let fixture: ComponentFixture<PageKindComponent>;
|
let fixture: ComponentFixture<KindComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ PageKindComponent ]
|
declarations: [ KindComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(PageKindComponent);
|
fixture = TestBed.createComponent(KindComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
@ -1,13 +1,13 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
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';
|
import {ConfigService} from '../../config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'framadate-page-kind',
|
selector: 'framadate-page-kind',
|
||||||
templateUrl: './page-kind.component.html',
|
templateUrl: './kind.component.html',
|
||||||
styleUrls: ['./page-kind.component.scss']
|
styleUrls: ['./kind.component.scss']
|
||||||
})
|
})
|
||||||
export class PageKindComponent extends BasePageComponent implements OnInit {
|
export class KindComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
constructor(config: ConfigService) {
|
constructor(config: ConfigService) {
|
||||||
super(config);
|
super(config);
|
1
src/app/pages/visibility/visibility.component.html
Normal file
1
src/app/pages/visibility/visibility.component.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>visibility works!</p>
|
0
src/app/pages/visibility/visibility.component.scss
Normal file
0
src/app/pages/visibility/visibility.component.scss
Normal file
25
src/app/pages/visibility/visibility.component.spec.ts
Normal file
25
src/app/pages/visibility/visibility.component.spec.ts
Normal file
@ -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();
|
||||||
|
});
|
||||||
|
});
|
19
src/app/pages/visibility/visibility.component.ts
Normal file
19
src/app/pages/visibility/visibility.component.ts
Normal file
@ -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…
Reference in New Issue
Block a user