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 {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 { BasePageComponent } from './base-page.component';
|
||||
import { BaseComponent } from './base.component';
|
||||
|
||||
describe('BasePageComponent', () => {
|
||||
let component: BasePageComponent;
|
||||
let fixture: ComponentFixture<BasePageComponent>;
|
||||
describe('BaseComponent', () => {
|
||||
let component: BaseComponent;
|
||||
let fixture: ComponentFixture<BaseComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ BasePageComponent ]
|
||||
declarations: [ BaseComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BasePageComponent);
|
||||
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 { PageKindComponent } from './page-kind.component';
|
||||
import { KindComponent } from './kind.component';
|
||||
|
||||
describe('PageKindComponent', () => {
|
||||
let component: PageKindComponent;
|
||||
let fixture: ComponentFixture<PageKindComponent>;
|
||||
describe('KindComponent', () => {
|
||||
let component: KindComponent;
|
||||
let fixture: ComponentFixture<KindComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PageKindComponent ]
|
||||
declarations: [ KindComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageKindComponent);
|
||||
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);
|
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