From db0863404d13c751d1a7929bf254918c4ce3ecea Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Sat, 19 Sep 2020 13:05:55 +0200 Subject: [PATCH] Add more pages --- src/app/app-routing.module.ts | 13 +++++++--- src/app/app.component.html | 12 ++++----- src/app/app.module.ts | 10 ++++++-- .../table-overview.component.html | 1 + .../table-overview.component.scss} | 0 .../table-overview.component.spec.ts | 25 +++++++++++++++++++ .../table-overview.component.ts | 15 +++++++++++ .../{ => tables}/bikes/bikes.component.html | 0 .../pages/tables/bikes/bikes.component.scss | 0 .../{ => tables}/bikes/bikes.component.ts | 2 +- .../lending-stations.component.html | 1 + .../lending-stations.component.scss | 0 .../lending-stations.component.spec.ts | 25 +++++++++++++++++++ .../lending-stations.component.ts | 15 +++++++++++ .../participants/participants.component.html | 1 + .../participants/participants.component.scss | 0 .../participants.component.spec.ts} | 12 ++++----- .../participants/participants.component.ts | 15 +++++++++++ src/app/services/bikes.service.ts | 9 +++++++ src/app/services/lending-stations.service.ts | 9 +++++++ src/app/services/participants.service.ts | 9 +++++++ 21 files changed, 155 insertions(+), 19 deletions(-) create mode 100644 src/app/pages/table-overview/table-overview.component.html rename src/app/pages/{bikes/bikes.component.scss => table-overview/table-overview.component.scss} (100%) create mode 100644 src/app/pages/table-overview/table-overview.component.spec.ts create mode 100644 src/app/pages/table-overview/table-overview.component.ts rename src/app/pages/{ => tables}/bikes/bikes.component.html (100%) create mode 100644 src/app/pages/tables/bikes/bikes.component.scss rename src/app/pages/{ => tables}/bikes/bikes.component.ts (94%) create mode 100644 src/app/pages/tables/lending-stations/lending-stations.component.html create mode 100644 src/app/pages/tables/lending-stations/lending-stations.component.scss create mode 100644 src/app/pages/tables/lending-stations/lending-stations.component.spec.ts create mode 100644 src/app/pages/tables/lending-stations/lending-stations.component.ts create mode 100644 src/app/pages/tables/participants/participants.component.html create mode 100644 src/app/pages/tables/participants/participants.component.scss rename src/app/pages/{bikes/bikes.component.spec.ts => tables/participants/participants.component.spec.ts} (53%) create mode 100644 src/app/pages/tables/participants/participants.component.ts create mode 100644 src/app/services/bikes.service.ts create mode 100644 src/app/services/lending-stations.service.ts create mode 100644 src/app/services/participants.service.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d42612b..c7eab73 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,12 +1,19 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { LoginComponent} from './pages/login/login.component' -import { BikesComponent} from './pages/bikes/bikes.component' +import { TableOverviewComponent } from './pages/table-overview/table-overview.component'; +import { BikesComponent} from './pages/tables/bikes/bikes.component' +import { LendingStationsComponent } from './pages/tables/lending-stations/lending-stations.component'; +import { ParticipantsComponent } from './pages/tables/participants/participants.component'; const routes: Routes = [ { path: 'login', component: LoginComponent }, - { path: 'bikes', component: BikesComponent }, - { path: '', redirectTo: '/bikes', pathMatch: 'full' }, + { path: 'tableOverview', component: TableOverviewComponent }, + { path: 'table/bikes', component: BikesComponent }, + { path: 'table/participants', component: ParticipantsComponent }, + { path: 'table/lendingStations', component: LendingStationsComponent }, + { path: '', redirectTo: 'tableOverview', pathMatch: 'full' }, + { path: 'table', redirectTo: 'tableOverview', pathMatch: 'full' }, ]; @NgModule({ diff --git a/src/app/app.component.html b/src/app/app.component.html index 1d6ad0a..2196b3b 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -29,13 +29,11 @@ - - Accounts - Create Account - Contacts - Create Contact - Activities - Create Activity + + Tabellenübersicht + Lastenräder + Beteiligte + Ausleihstationen diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 741b1a6..06e62ec 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -22,8 +22,11 @@ import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { LoginComponent } from './pages/login/login.component'; -import { BikesComponent } from './pages/bikes/bikes.component'; +import { BikesComponent } from './pages/tables/bikes/bikes.component'; import { GraphQLModule } from './graphql.module'; +import { ParticipantsComponent } from './pages/tables/participants/participants.component'; +import { LendingStationsComponent } from './pages/tables/lending-stations/lending-stations.component'; +import { TableOverviewComponent } from './pages/table-overview/table-overview.component'; @@ -31,7 +34,10 @@ import { GraphQLModule } from './graphql.module'; declarations: [ AppComponent, LoginComponent, - BikesComponent + BikesComponent, + ParticipantsComponent, + LendingStationsComponent, + TableOverviewComponent ], imports: [ BrowserModule, diff --git a/src/app/pages/table-overview/table-overview.component.html b/src/app/pages/table-overview/table-overview.component.html new file mode 100644 index 0000000..61a83f2 --- /dev/null +++ b/src/app/pages/table-overview/table-overview.component.html @@ -0,0 +1 @@ +

table-overview works!

diff --git a/src/app/pages/bikes/bikes.component.scss b/src/app/pages/table-overview/table-overview.component.scss similarity index 100% rename from src/app/pages/bikes/bikes.component.scss rename to src/app/pages/table-overview/table-overview.component.scss diff --git a/src/app/pages/table-overview/table-overview.component.spec.ts b/src/app/pages/table-overview/table-overview.component.spec.ts new file mode 100644 index 0000000..999cc86 --- /dev/null +++ b/src/app/pages/table-overview/table-overview.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TableOverviewComponent } from './table-overview.component'; + +describe('TableOverviewComponent', () => { + let component: TableOverviewComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ TableOverviewComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TableOverviewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/table-overview/table-overview.component.ts b/src/app/pages/table-overview/table-overview.component.ts new file mode 100644 index 0000000..b494e94 --- /dev/null +++ b/src/app/pages/table-overview/table-overview.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-table-overview', + templateUrl: './table-overview.component.html', + styleUrls: ['./table-overview.component.scss'] +}) +export class TableOverviewComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/pages/bikes/bikes.component.html b/src/app/pages/tables/bikes/bikes.component.html similarity index 100% rename from src/app/pages/bikes/bikes.component.html rename to src/app/pages/tables/bikes/bikes.component.html diff --git a/src/app/pages/tables/bikes/bikes.component.scss b/src/app/pages/tables/bikes/bikes.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/bikes/bikes.component.ts b/src/app/pages/tables/bikes/bikes.component.ts similarity index 94% rename from src/app/pages/bikes/bikes.component.ts rename to src/app/pages/tables/bikes/bikes.component.ts index 8e29936..940a7f7 100644 --- a/src/app/pages/bikes/bikes.component.ts +++ b/src/app/pages/tables/bikes/bikes.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { DeepExtractTypeSkipArrays } from 'ts-deep-extract-types'; -import { GetCargoBikesGQL, GetCargoBikesQuery } from '../../../generated/graphql'; +import { GetCargoBikesGQL, GetCargoBikesQuery } from '../../../../generated/graphql'; type CargoBikeResult = DeepExtractTypeSkipArrays; diff --git a/src/app/pages/tables/lending-stations/lending-stations.component.html b/src/app/pages/tables/lending-stations/lending-stations.component.html new file mode 100644 index 0000000..ff9ae61 --- /dev/null +++ b/src/app/pages/tables/lending-stations/lending-stations.component.html @@ -0,0 +1 @@ +

lending-stations works!

diff --git a/src/app/pages/tables/lending-stations/lending-stations.component.scss b/src/app/pages/tables/lending-stations/lending-stations.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/tables/lending-stations/lending-stations.component.spec.ts b/src/app/pages/tables/lending-stations/lending-stations.component.spec.ts new file mode 100644 index 0000000..5138c69 --- /dev/null +++ b/src/app/pages/tables/lending-stations/lending-stations.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LendingStationsComponent } from './lending-stations.component'; + +describe('LendingStationsComponent', () => { + let component: LendingStationsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LendingStationsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LendingStationsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/tables/lending-stations/lending-stations.component.ts b/src/app/pages/tables/lending-stations/lending-stations.component.ts new file mode 100644 index 0000000..1873823 --- /dev/null +++ b/src/app/pages/tables/lending-stations/lending-stations.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-lending-stations', + templateUrl: './lending-stations.component.html', + styleUrls: ['./lending-stations.component.scss'] +}) +export class LendingStationsComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/pages/tables/participants/participants.component.html b/src/app/pages/tables/participants/participants.component.html new file mode 100644 index 0000000..628a43c --- /dev/null +++ b/src/app/pages/tables/participants/participants.component.html @@ -0,0 +1 @@ +

participants works!

diff --git a/src/app/pages/tables/participants/participants.component.scss b/src/app/pages/tables/participants/participants.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/bikes/bikes.component.spec.ts b/src/app/pages/tables/participants/participants.component.spec.ts similarity index 53% rename from src/app/pages/bikes/bikes.component.spec.ts rename to src/app/pages/tables/participants/participants.component.spec.ts index 5b919b7..8334856 100644 --- a/src/app/pages/bikes/bikes.component.spec.ts +++ b/src/app/pages/tables/participants/participants.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { BikesComponent } from './bikes.component'; +import { ParticipantsComponent } from './participants.component'; -describe('BikesComponent', () => { - let component: BikesComponent; - let fixture: ComponentFixture; +describe('ParticipantsComponent', () => { + let component: ParticipantsComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ BikesComponent ] + declarations: [ ParticipantsComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(BikesComponent); + fixture = TestBed.createComponent(ParticipantsComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/pages/tables/participants/participants.component.ts b/src/app/pages/tables/participants/participants.component.ts new file mode 100644 index 0000000..9fc1aa2 --- /dev/null +++ b/src/app/pages/tables/participants/participants.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-participants', + templateUrl: './participants.component.html', + styleUrls: ['./participants.component.scss'] +}) +export class ParticipantsComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/services/bikes.service.ts b/src/app/services/bikes.service.ts new file mode 100644 index 0000000..6bb9a7d --- /dev/null +++ b/src/app/services/bikes.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class BikesService { + + constructor() { } +} diff --git a/src/app/services/lending-stations.service.ts b/src/app/services/lending-stations.service.ts new file mode 100644 index 0000000..8c3b179 --- /dev/null +++ b/src/app/services/lending-stations.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class LendingStationsService { + + constructor() { } +} diff --git a/src/app/services/participants.service.ts b/src/app/services/participants.service.ts new file mode 100644 index 0000000..fa7a378 --- /dev/null +++ b/src/app/services/participants.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class ParticipantsService { + + constructor() { } +}