From 5b2ae731c483b823d83d588b780c90f44ff6f98b Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Mon, 23 Nov 2020 23:48:34 +0100 Subject: [PATCH] Add equipmentType table and fix creation bug --- src/app/app-routing.module.ts | 5 + src/app/app.module.ts | 10 +- src/app/components/table/table.component.html | 5 +- src/app/components/table/table.component.ts | 15 +- .../graphqlOperations/equipmentType.graphql | 33 +++ .../graphqlOperations/fragments/bike.graphql | 2 +- .../fragments/equipmentType.graphql | 2 +- src/app/pages/tables/bikes/bikes.component.ts | 16 +- .../engagement-types.component.html | 1 + .../engagement-types.component.scss | 0 .../engagement-types.component.spec.ts | 25 +++ .../engagement-types.component.ts | 15 ++ .../equipment-types.component.html | 12 ++ .../equipment-types.component.scss | 0 .../equipment-types.component.ts | 50 +++++ .../tables/workshops/workshops.component.html | 1 + .../tables/workshops/workshops.component.scss | 0 .../workshops/workshops.component.spec.ts | 25 +++ .../tables/workshops/workshops.component.ts | 15 ++ src/app/services/bikes.service.ts | 11 +- src/app/services/equipmentType.service.ts | 124 ++++++++++++ src/generated/graphql.ts | 191 +++++++++++++++++- 22 files changed, 525 insertions(+), 33 deletions(-) create mode 100644 src/app/graphqlOperations/equipmentType.graphql create mode 100644 src/app/pages/tables/engagement-types/engagement-types.component.html create mode 100644 src/app/pages/tables/engagement-types/engagement-types.component.scss create mode 100644 src/app/pages/tables/engagement-types/engagement-types.component.spec.ts create mode 100644 src/app/pages/tables/engagement-types/engagement-types.component.ts create mode 100644 src/app/pages/tables/equipment-types/equipment-types.component.html create mode 100644 src/app/pages/tables/equipment-types/equipment-types.component.scss create mode 100644 src/app/pages/tables/equipment-types/equipment-types.component.ts create mode 100644 src/app/pages/tables/workshops/workshops.component.html create mode 100644 src/app/pages/tables/workshops/workshops.component.scss create mode 100644 src/app/pages/tables/workshops/workshops.component.spec.ts create mode 100644 src/app/pages/tables/workshops/workshops.component.ts create mode 100644 src/app/services/equipmentType.service.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 32199a6..e067b23 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,6 +4,8 @@ import { BikeComponent } from './pages/dataPages/bike/bike.component'; import { LoginComponent} from './pages/login/login.component' import { TableOverviewComponent } from './pages/table-overview/table-overview.component'; import { BikesComponent} from './pages/tables/bikes/bikes.component' +import { EngagementTypesComponent } from './pages/tables/engagement-types/engagement-types.component'; +import { EquipmentTypesComponent } from './pages/tables/equipment-types/equipment-types.component'; import { LendingStationsComponent } from './pages/tables/lending-stations/lending-stations.component'; import { ParticipantsComponent } from './pages/tables/participants/participants.component'; @@ -14,8 +16,11 @@ const routes: Routes = [ { path: 'bike/:id', component: BikeComponent }, { path: 'table/participants', component: ParticipantsComponent }, { path: 'table/lendingStations', component: LendingStationsComponent }, + { path: 'table/equipmentTypes', component: EquipmentTypesComponent }, + { path: 'table/engagementTypes', component: EngagementTypesComponent }, { path: '', redirectTo: 'tableOverview', pathMatch: 'full' }, { path: 'table', redirectTo: 'tableOverview', pathMatch: 'full' }, + { path: '**', redirectTo: 'tableOverview' }, ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5edba02..a8d49ef 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -46,7 +46,10 @@ import { NavService }from './components/menu-list-item/nav.service'; import { TokenInterceptor } from './helper/token.interceptor'; import { BikeComponent } from './pages/dataPages/bike/bike.component'; import { TableComponent, DeleteConfirmationDialog } from './components/table/table.component'; -import { DataPageComponent } from './components/data-page/data-page.component' +import { DataPageComponent } from './components/data-page/data-page.component'; +import { EquipmentTypesComponent } from './pages/tables/equipment-types/equipment-types.component'; +import { EngagementTypesComponent } from './pages/tables/engagement-types/engagement-types.component'; +import { WorkshopsComponent } from './pages/tables/workshops/workshops.component' @NgModule({ @@ -63,7 +66,10 @@ import { DataPageComponent } from './components/data-page/data-page.component' DeleteConfirmationDialog, BikeComponent, TableComponent, - DataPageComponent + DataPageComponent, + EquipmentTypesComponent, + EngagementTypesComponent, + WorkshopsComponent ], imports: [ BrowserModule, diff --git a/src/app/components/table/table.component.html b/src/app/components/table/table.component.html index c5b12cb..955a759 100644 --- a/src/app/components/table/table.component.html +++ b/src/app/components/table/table.component.html @@ -198,10 +198,7 @@