From 6ec98d868c0849a19a34414679b51f04310bb7fa Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Mon, 23 Nov 2020 19:29:19 +0100 Subject: [PATCH] Improve data page --- .../data-page/data-page.component.html | 30 +- .../data-page/data-page.component.scss | 13 +- .../data-page/data-page.component.ts | 73 +- src/app/components/table/table.component.scss | 93 +-- src/app/components/table/table.component.ts | 1 - .../tableComponents/cell/cell.component.scss | 4 - src/app/graphqlOperations/bike.graphql | 2 +- .../graphqlOperations/fragments/bike.graphql | 4 +- .../pages/dataPages/bike/bike.component.html | 1 + .../pages/dataPages/bike/bike.component.ts | 214 ++++-- src/generated/graphql.schema.json | 702 +++++++++--------- src/generated/graphql.ts | 177 +++-- 12 files changed, 706 insertions(+), 608 deletions(-) diff --git a/src/app/components/data-page/data-page.component.html b/src/app/components/data-page/data-page.component.html index 3a83ba6..f998061 100644 --- a/src/app/components/data-page/data-page.component.html +++ b/src/app/components/data-page/data-page.component.html @@ -11,15 +11,18 @@

{{ data[headlineDataPath] }}

+ + + {{object.title}} -
- -
+ +
+
+
+ +
\ No newline at end of file diff --git a/src/app/components/data-page/data-page.component.scss b/src/app/components/data-page/data-page.component.scss index 332002c..e7a2001 100644 --- a/src/app/components/data-page/data-page.component.scss +++ b/src/app/components/data-page/data-page.component.scss @@ -6,11 +6,22 @@ box-sizing: border-box; overflow: auto; padding: 2em; + .card { + display: inline-table; + width: 20em; + margin: 1em; + } } -.floating-fab-button { +#floating-fab-button-box { position: absolute; bottom: 2em; right: 2em; + display: flex; + flex-direction: column; + align-items: center; + .floating-fab-button { + margin-top: 0.5em; + } } .floating-fab-button-top { position: absolute; diff --git a/src/app/components/data-page/data-page.component.ts b/src/app/components/data-page/data-page.component.ts index 9a61b91..242c8ba 100644 --- a/src/app/components/data-page/data-page.component.ts +++ b/src/app/components/data-page/data-page.component.ts @@ -1,17 +1,21 @@ -import { - AfterViewInit, - Component, - EventEmitter, - Input, - OnInit, - Output, -} from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { deepen } from 'src/app/helperFunctions/deepenObject'; import { flatten } from 'src/app/helperFunctions/flattenObject'; -import { BikesService } from 'src/app/services/bikes.service'; import { SchemaService } from 'src/app/services/schema.service'; -import { runInThisContext } from 'vm'; + +interface PropertyInfoType { + name: string; + translation: string; + readonly?: boolean; + type?: string; +} + +interface PropertyGroup { + isGroup: boolean; + title: string; + properties: PropertyInfoType[]; +} @Component({ selector: 'app-data-page', @@ -20,12 +24,7 @@ import { runInThisContext } from 'vm'; }) export class DataPageComponent implements OnInit { @Input() - propertiesInfo: { - name: string; - translation: string; - readonly?: boolean; - type?: string; - }[] = []; + propertiesInfo: Array = []; @Input() dataService: any; @@ -39,6 +38,7 @@ export class DataPageComponent implements OnInit { @Output() lockEvent = new EventEmitter(); @Output() saveEvent = new EventEmitter(); + @Output() cancelEvent = new EventEmitter(); id: string; data: any; @@ -51,7 +51,7 @@ export class DataPageComponent implements OnInit { ) {} ngOnInit(): void { - this.addPropertiesFromGQLSchemaToPropertiesInfo(); + this.addPropertiesFromGQLSchemaToObject(this.propertiesInfo); this.id = this.route.snapshot.paramMap.get('id'); this.reloadPageData(); this.dataService.pageData.subscribe((data) => { @@ -60,26 +60,27 @@ export class DataPageComponent implements OnInit { this.dataService.isLoadingPageData.subscribe( (isLoading) => (this.isLoading = isLoading) ); - this.dataService.loadingRowIds.subscribe(loadingRowIds => { - console.log(loadingRowIds); + this.dataService.loadingRowIds.subscribe((loadingRowIds) => { this.isSavingOrLocking = loadingRowIds.includes(this.id); - }) + }); } - addPropertiesFromGQLSchemaToPropertiesInfo() { - for (const column of this.propertiesInfo) { - const typeInformation = this.schemaService.getTypeInformation( - this.pageDataGQLType, - column.name - ); - column.type = column.type || typeInformation.type; - } - for (const column of this.propertiesInfo) { - const typeInformation = this.schemaService.getTypeInformation( - this.pageDataGQLUpdateInputType, - column.name - ); - column.readonly = column.readonly || !typeInformation.isPartOfType; + addPropertiesFromGQLSchemaToObject(infoObject: any) { + for (const prop of infoObject) { + if (prop.isGroup) { + this.addPropertiesFromGQLSchemaToObject(prop.properties); + } else { + const typeInformation = this.schemaService.getTypeInformation( + this.pageDataGQLType, + prop.name + ); + prop.type = prop.type || typeInformation.type; + const updateTypeInformation = this.schemaService.getTypeInformation( + this.pageDataGQLUpdateInputType, + prop.name + ); + prop.readonly = prop.readonly || !updateTypeInformation.isPartOfType; + } } } @@ -96,6 +97,10 @@ export class DataPageComponent implements OnInit { ); } + cancel() { + this.cancelEvent.emit(deepen(this.data)) + } + reloadPageData() { this.dataService.loadPageData({ id: this.id }); } diff --git a/src/app/components/table/table.component.scss b/src/app/components/table/table.component.scss index 8907e62..78604c2 100644 --- a/src/app/components/table/table.component.scss +++ b/src/app/components/table/table.component.scss @@ -1,53 +1,56 @@ .table-page-wrapper { - display: flex; - flex-direction: column; - height: 100%; - .table-control { - margin: 0.5em; - flex: none; - .table-control-button { - margin: 0.25em; - } - .filter { - margin-right: 0.5em; - } - .mat-paginator { - display: inline-block; - width: 50em; - margin-right: 0.5em; - } + display: flex; + flex-direction: column; + height: 100%; + .table-control { + margin: 0.5em; + flex: none; + .table-control-button { + margin: 0.25em; } - .table-container { - flex: 1; - width: auto; - margin-left: 0.5em; + .filter { margin-right: 0.5em; + } + .mat-paginator { + display: inline-block; + width: 50em; + margin-right: 0.5em; + } + } + .table-container { + flex: 1; + width: auto; + margin-left: 0.5em; + margin-right: 0.5em; + max-width: 100%; + overflow: auto; + table { max-width: 100%; - overflow: auto; - table { - max-width: 100%; - margin: 0 auto; - .mat-header-cell, - .mat-footer-cell, - .mat-cell { - min-width: 3em; - box-sizing: border-box; - padding: 0 0.25em; - } - ::ng-deep.mat-form-field { - width: 100%; - } - - .mat-table-sticky { - filter: brightness(90%); - //opacity: 1; - } - - .button-wrapper { - display: flex; - flex-direction: row; + margin: 0 auto; + .mat-header-cell, + .mat-footer-cell, + .mat-cell { + min-width: 3em; + box-sizing: border-box; + padding: 0 0.25em; + ::ng-deep.mat-form-field-infix { + width: auto !important; + min-width: 50px !important; } } + ::ng-deep.mat-form-field { + width: 100%; + } + + .mat-table-sticky { + filter: brightness(90%); + //opacity: 1; + } + + .button-wrapper { + display: flex; + flex-direction: row; + } } } - \ No newline at end of file +} diff --git a/src/app/components/table/table.component.ts b/src/app/components/table/table.component.ts index ca01722..0e7a820 100644 --- a/src/app/components/table/table.component.ts +++ b/src/app/components/table/table.component.ts @@ -12,7 +12,6 @@ import { flatten } from 'src/app/helperFunctions/flattenObject'; import { deepen } from 'src/app/helperFunctions/deepenObject'; import { SchemaService } from 'src/app/services/schema.service'; -import { logArrayInColumnInfoForm } from 'src/app/helperFunctions/logArrayInColumnInfoForm'; import { MatTableDataSource } from '@angular/material/table'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; diff --git a/src/app/components/tableComponents/cell/cell.component.scss b/src/app/components/tableComponents/cell/cell.component.scss index 8f011b5..e69de29 100644 --- a/src/app/components/tableComponents/cell/cell.component.scss +++ b/src/app/components/tableComponents/cell/cell.component.scss @@ -1,4 +0,0 @@ -::ng-deep.mat-form-field-infix { - width: auto !important; - min-width: 50px !important; -} \ No newline at end of file diff --git a/src/app/graphqlOperations/bike.graphql b/src/app/graphqlOperations/bike.graphql index d9aab0c..d031b82 100644 --- a/src/app/graphqlOperations/bike.graphql +++ b/src/app/graphqlOperations/bike.graphql @@ -1,5 +1,5 @@ query GetCargoBikes { - cargoBikes(limit: 1000, offset: 0) { + cargoBikes { ...CargoBikeFieldsForTable } } diff --git a/src/app/graphqlOperations/fragments/bike.graphql b/src/app/graphqlOperations/fragments/bike.graphql index fc05c07..1b971c3 100644 --- a/src/app/graphqlOperations/fragments/bike.graphql +++ b/src/app/graphqlOperations/fragments/bike.graphql @@ -78,13 +78,13 @@ fragment CargoBikeFieldsForPage on CargoBike { bikeEvents { ...BikeEventFieldsForBikePage } -equipment(offset: 0, limit: 1000) { +equipment { ...EquipmentFieldsForBikePage } equipmentType { ...EquipmentTypeFieldsForBikePage } -engagement(offset: 0, limit: 1000) { +engagement { ...EngagementFieldsForBikePage } currentEngagements { diff --git a/src/app/pages/dataPages/bike/bike.component.html b/src/app/pages/dataPages/bike/bike.component.html index e8ba0bd..f84bcad 100644 --- a/src/app/pages/dataPages/bike/bike.component.html +++ b/src/app/pages/dataPages/bike/bike.component.html @@ -6,4 +6,5 @@ [pageDataGQLUpdateInputType]="pageDataGQLUpdateInputType" (lockEvent)="lock($event)" (saveEvent)="save($event)" + (cancelEvent)="cancel($event)" > diff --git a/src/app/pages/dataPages/bike/bike.component.ts b/src/app/pages/dataPages/bike/bike.component.ts index 3e30ca7..b1a6bae 100644 --- a/src/app/pages/dataPages/bike/bike.component.ts +++ b/src/app/pages/dataPages/bike/bike.component.ts @@ -1,8 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { flatten } from 'src/app/helperFunctions/flattenObject'; import { BikesService } from 'src/app/services/bikes.service'; -import { SchemaService } from 'src/app/services/schema.service'; @Component({ selector: 'app-bike', @@ -11,92 +8,155 @@ import { SchemaService } from 'src/app/services/schema.service'; }) export class BikeComponent implements OnInit { propertiesInfo = [ - { name: 'name', translation: 'Name' }, - { name: 'id', translation: 'ID', readonly: true }, - { name: 'group', translation: 'Gruppe' }, - { name: 'modelName', translation: 'Modell' }, - { name: 'insuranceData.billing', translation: 'Versicherung Abrechnung' }, - { name: 'insuranceData.hasFixedRate', translation: 'Pauschale j/n' }, - { name: 'insuranceData.fixedRate', translation: 'Pauschale Betrag' }, - { name: 'insuranceData.name', translation: 'Versicherer' }, - { name: 'insuranceData.benefactor', translation: 'Kostenträger' }, - { name: 'insuranceData.noPnP', translation: 'Nr. P&P' }, { - name: 'insuranceData.maintenanceResponsible', - translation: 'Wartung zuständig', + isGroup: true, + title: 'Allgemein', + properties: [ + { name: 'name', translation: 'Name' }, + { name: 'id', translation: 'ID', readonly: true }, + { name: 'group', translation: 'Gruppe' }, + { name: 'modelName', translation: 'Modell' }, + ], }, { - name: 'insuranceData.maintenanceBenefactor', - translation: 'Wartung Kostenträger', + isGroup: true, + title: 'Versicherungsdaten', + properties: [ + { + name: 'insuranceData.billing', + translation: 'Versicherung Abrechnung', + }, + { name: 'insuranceData.hasFixedRate', translation: 'Pauschale j/n' }, + { name: 'insuranceData.fixedRate', translation: 'Pauschale Betrag' }, + { name: 'insuranceData.name', translation: 'Versicherer' }, + { name: 'insuranceData.benefactor', translation: 'Kostenträger' }, + { name: 'insuranceData.noPnP', translation: 'Nr. P&P' }, + { + name: 'insuranceData.maintenanceResponsible', + translation: 'Wartung zuständig', + }, + { + name: 'insuranceData.maintenanceBenefactor', + translation: 'Wartung Kostenträger', + }, + { + name: 'insuranceData.maintenanceAgreement', + translation: 'Wartungsvereinbarung', + }, + { + name: 'insuranceData.projectAllowance', + translation: 'Projektzuschuss', + }, + { name: 'insuranceData.notes', translation: 'Sonstiges' }, + ], }, { - name: 'insuranceData.maintenanceAgreement', - translation: 'Wartungsvereinbarung', + isGroup: true, + title: 'Maße und Ladungen', + properties: [ + { name: 'dimensionsAndLoad.bikeLength', translation: 'Länge' }, + { name: 'dimensionsAndLoad.bikeWeight', translation: 'Gewicht' }, + { name: 'dimensionsAndLoad.bikeHeight', translation: 'Höhe' }, + { name: 'dimensionsAndLoad.bikeWidth', translation: 'Breite' }, + { name: 'dimensionsAndLoad.boxHeight', translation: 'Boxhöhe' }, + { name: 'dimensionsAndLoad.boxLength', translation: 'Boxlänge' }, + { name: 'dimensionsAndLoad.boxWidth', translation: 'Boxbreite' }, + { + name: 'dimensionsAndLoad.hasCoverBox', + translation: 'Boxabdeckung j/n', + }, + { name: 'dimensionsAndLoad.lockable', translation: 'Box abschließbar' }, + { + name: 'dimensionsAndLoad.maxWeightBox', + translation: 'max Zuladung Box', + }, + { + name: 'dimensionsAndLoad.maxWeightLuggageRack', + translation: 'max Zuladung Gepäckträger', + }, + { + name: 'dimensionsAndLoad.maxWeightTotal', + translation: 'max Gesamtgewicht', + }, + { name: 'numberOfChildren', translation: 'Anzahl Kinder' }, + { name: 'numberOfWheels', translation: 'Anzahl Räder' }, + { name: 'forCargo', translation: 'für Lasten j/n' }, + { name: 'forChildren', translation: 'für Kinder j/n' }, + ], }, - { name: 'insuranceData.projectAllowance', translation: 'Projektzuschuss' }, - { name: 'insuranceData.notes', translation: 'Sonstiges' }, - { name: 'dimensionsAndLoad.bikeLength', translation: 'Länge' }, - { name: 'dimensionsAndLoad.bikeWeight', translation: 'Gewicht' }, - { name: 'dimensionsAndLoad.bikeHeight', translation: 'Höhe' }, - { name: 'dimensionsAndLoad.bikeWidth', translation: 'Breite' }, - { name: 'dimensionsAndLoad.boxHeight', translation: 'Boxhöhe' }, - { name: 'dimensionsAndLoad.boxLength', translation: 'Boxlänge' }, - { name: 'dimensionsAndLoad.boxWidth', translation: 'Boxbreite' }, - { name: 'dimensionsAndLoad.hasCoverBox', translation: 'Boxabdeckung j/n' }, - { name: 'dimensionsAndLoad.lockable', translation: 'Box abschließbar' }, - { name: 'dimensionsAndLoad.maxWeightBox', translation: 'max Zuladung Box' }, { - name: 'dimensionsAndLoad.maxWeightLuggageRack', - translation: 'max Zuladung Gepäckträger', + isGroup: true, + title: 'Sicherheitsinformationen', + properties: [ + { name: 'security.frameNumber', translation: 'Rahmennummer' }, + { name: 'security.adfcCoding', translation: 'ADFC Codierung' }, + { + name: 'security.keyNumberAXAChain', + translation: 'Schlüsselnrummer Rahmenschloss', + }, + { + name: 'security.keyNumberFrameLock', + translation: 'Schlüsselnrummer AXA-Kette', + }, + { name: 'security.policeCoding', translation: 'Polizei Codierung' }, + ], }, { - name: 'dimensionsAndLoad.maxWeightTotal', - translation: 'max Gesamtgewicht', + isGroup: true, + title: 'Ausstattung', + properties: [ + { name: 'technicalEquipment.bicycleShift', translation: 'Schaltung' }, + { name: 'technicalEquipment.isEBike', translation: 'E-Bike j/n' }, + { + name: 'technicalEquipment.hasLightSystem', + translation: 'Lichtanlage j/n', + }, + { + name: 'technicalEquipment.specialFeatures', + translation: 'Besonderheiten', + }, + ], }, - { name: 'numberOfChildren', translation: 'Anzahl Kinder' }, - { name: 'numberOfWheels', translation: 'Anzahl Räder' }, - { name: 'forCargo', translation: 'für Lasten j/n' }, - { name: 'forChildren', translation: 'für Kinder j/n' }, - { name: 'security.frameNumber', translation: 'Rahmennummer' }, - { name: 'security.adfcCoding', translation: 'ADFC Codierung' }, { - name: 'security.keyNumberAXAChain', - translation: 'Schlüsselnrummer Rahmenschloss', + isGroup: true, + title: 'Sonstiges', + properties: [ + { name: 'stickerBikeNameState', translation: 'Aufkleber Status' }, + { name: 'note', translation: 'Aufkleber Kommentar' }, + { name: 'taxes.costCenter', translation: 'Steuern Kostenstelle' }, + { + name: 'taxes.organisationArea', + translation: 'Steuern Vereinsbereich', + }, + ], }, { - name: 'security.keyNumberFrameLock', - translation: 'Schlüsselnrummer AXA-Kette', + isGroup: true, + title: 'provider', + properties: [ + { name: 'provider.id', translation: '' }, + { name: 'provider.formName', translation: '' }, + { name: 'provider.privatePerson.id', translation: '' }, + { name: 'provider.privatePerson.person.id', translation: '' }, + { name: 'provider.privatePerson.person.name', translation: '' }, + { name: 'provider.privatePerson.person.firstName', translation: '' }, + { + name: 'provider.privatePerson.person.contactInformation.email', + translation: '', + }, + ], }, - { name: 'security.policeCoding', translation: 'Polizei Codierung' }, - { name: 'technicalEquipment.bicycleShift', translation: 'Schaltung' }, - { name: 'technicalEquipment.isEBike', translation: 'E-Bike j/n' }, { - name: 'technicalEquipment.hasLightSystem', - translation: 'Lichtanlage j/n', + isGroup: true, + title: 'lendingstation', + properties: [ + { name: 'lendingStation.id', translation: '' }, + { name: 'lendingStation.name', translation: '' }, + { name: 'lendingStation.address.number', translation: '' }, + { name: 'lendingStation.address.street', translation: '' }, + { name: 'lendingStation.address.zip', translation: '' }, + ], }, - { - name: 'technicalEquipment.specialFeatures', - translation: 'Besonderheiten', - }, - { name: 'stickerBikeNameState', translation: 'Aufkleber Status' }, - { name: 'note', translation: 'Aufkleber Kommentar' }, - { name: 'taxes.costCenter', translation: 'Steuern Kostenstelle' }, - { name: 'taxes.organisationArea', translation: 'Steuern Vereinsbereich' }, - { name: 'provider.id', translation: '' }, - { name: 'provider.formName', translation: '' }, - { name: 'provider.privatePerson.id', translation: '' }, - { name: 'provider.privatePerson.person.id', translation: '' }, - { name: 'provider.privatePerson.person.name', translation: '' }, - { name: 'provider.privatePerson.person.firstName', translation: '' }, - { - name: 'provider.privatePerson.person.contactInformation.email', - translation: '', - }, - { name: 'lendingStation.id', translation: '' }, - { name: 'lendingStation.name', translation: '' }, - { name: 'lendingStation.address.number', translation: '' }, - { name: 'lendingStation.address.street', translation: '' }, - { name: 'lendingStation.address.zip', translation: '' }, ]; headlineDataPath = 'name'; @@ -112,10 +172,14 @@ export class BikeComponent implements OnInit { } lock(row: any) { - this.bikesService.lockBike({id: row.id}); + this.bikesService.lockBike({ id: row.id }); } save(row: any) { - this.bikesService.updateBike({bike: row}) + this.bikesService.updateBike({ bike: row }); + } + + cancel(row: any) { + this.bikesService.unlockBike({ id: row.id }); } } diff --git a/src/generated/graphql.schema.json b/src/generated/graphql.schema.json index b72fd3f..1972f54 100644 --- a/src/generated/graphql.schema.json +++ b/src/generated/graphql.schema.json @@ -194,7 +194,7 @@ }, { "name": "bikeEvents", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", @@ -231,19 +231,15 @@ }, { "name": "equipment", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -251,13 +247,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -400,19 +392,15 @@ }, { "name": "engagement", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -420,13 +408,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -2418,7 +2402,7 @@ { "kind": "OBJECT", "name": "Participant", - "description": null, + "description": "A participant in the organization", "fields": [ { "name": "id", @@ -2923,7 +2907,7 @@ { "kind": "OBJECT", "name": "Workshop", - "description": null, + "description": "A workshop event", "fields": [ { "name": "id", @@ -4382,7 +4366,7 @@ { "kind": "OBJECT", "name": "EquipmentType", - "description": null, + "description": "A type of equipment that is not being tracked but can be assigned\nto any bike.", "fields": [ { "name": "id", @@ -4696,9 +4680,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } } }, @@ -5074,6 +5062,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lockedBy", + "description": "null if not locked by other user", + "args": [], + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lockedUntil", "description": null, @@ -5202,9 +5202,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "CargoBike", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CargoBike", + "ofType": null + } } }, "isDeprecated": false, @@ -5319,9 +5323,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } } }, "defaultValue": null @@ -5471,9 +5479,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ContactInformation", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ContactInformation", + "ofType": null + } } }, "isDeprecated": false, @@ -6021,9 +6033,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "LendingStation", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LendingStation", + "ofType": null + } } }, "isDeprecated": false, @@ -6417,9 +6433,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimeFrame", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimeFrame", + "ofType": null + } } } }, @@ -6446,9 +6466,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "CargoBike", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CargoBike", + "ofType": null + } } }, "isDeprecated": false, @@ -6753,7 +6777,7 @@ }, { "name": "loanTimes", - "description": "Loan times from and until for each day of the week.\nStarting with Monday from, Monday to, Tuesday from, ..., Sunday to ", + "description": "Loan times from and until for each day of the week.\nStarting with Monday from, Monday to, Tuesday from, ..., Sunday to", "args": [], "type": { "kind": "LIST", @@ -6796,23 +6820,31 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "defaultValue": null }, { "name": "loanTimes", - "description": "Loan times from and until for each day of the week.\nStarting with Monday from, Monday to, Tuesday from, ..., Sunday to ", + "description": "Loan times from and until for each day of the week.\nStarting with Monday from, Monday to, Tuesday from, ..., Sunday to", "type": { "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "defaultValue": null @@ -7445,19 +7477,15 @@ }, { "name": "cargoBikes", - "description": "returns cargoBikes ordered by name ascending, relations are not loaded, use cargoBikeById instead", + "description": "Returns cargoBikes ordered by name ascending. If offset or limit is not provided, both values are ignored.", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7465,13 +7493,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7483,9 +7507,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "CargoBike", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CargoBike", + "ofType": null + } } } }, @@ -7521,19 +7549,15 @@ }, { "name": "engagements", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7541,13 +7565,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7559,9 +7579,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Engagement", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Engagement", + "ofType": null + } } } }, @@ -7597,19 +7621,15 @@ }, { "name": "engagementTypes", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7617,13 +7637,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7635,9 +7651,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "EngagementType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EngagementType", + "ofType": null + } } } }, @@ -7673,19 +7693,15 @@ }, { "name": "equipment", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7693,13 +7709,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7711,9 +7723,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Equipment", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Equipment", + "ofType": null + } } } }, @@ -7749,19 +7765,15 @@ }, { "name": "equipmentTypes", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7769,13 +7781,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7787,9 +7795,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "EquipmentType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EquipmentType", + "ofType": null + } } } }, @@ -7825,19 +7837,15 @@ }, { "name": "providers", - "description": "unique equipment with pagination, contains relation to bike (with no further joins), so if you wanna know more about the bike, use cargoBikeById", + "description": "Returns providers with pagination. If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7845,13 +7853,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7863,9 +7867,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Provider", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Provider", + "ofType": null + } } } }, @@ -7901,19 +7909,15 @@ }, { "name": "participants", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7921,13 +7925,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -7939,9 +7939,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Participant", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Participant", + "ofType": null + } } } }, @@ -7977,19 +7981,15 @@ }, { "name": "workshopTypes", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -7997,13 +7997,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8015,9 +8011,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "WorkshopType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WorkshopType", + "ofType": null + } } } }, @@ -8053,19 +8053,15 @@ }, { "name": "workshops", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8073,13 +8069,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8091,9 +8083,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Workshop", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Workshop", + "ofType": null + } } } }, @@ -8129,19 +8125,15 @@ }, { "name": "lendingStations", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8149,13 +8141,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8167,9 +8155,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "LendingStation", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LendingStation", + "ofType": null + } } } }, @@ -8205,19 +8197,15 @@ }, { "name": "organisations", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8225,13 +8213,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8243,9 +8227,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Organisation", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Organisation", + "ofType": null + } } } }, @@ -8280,20 +8268,16 @@ "deprecationReason": null }, { - "name": "timeframes", - "description": null, + "name": "timeFrames", + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8301,13 +8285,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8319,9 +8299,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimeFrame", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimeFrame", + "ofType": null + } } } }, @@ -8357,19 +8341,15 @@ }, { "name": "contactInformation", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8377,13 +8357,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8395,9 +8371,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ContactInformation", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ContactInformation", + "ofType": null + } } } }, @@ -8433,19 +8413,15 @@ }, { "name": "persons", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8453,13 +8429,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8468,9 +8440,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Person", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Person", + "ofType": null + } } }, "isDeprecated": false, @@ -8478,19 +8454,15 @@ }, { "name": "bikeEventTypes", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8498,13 +8470,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8513,9 +8481,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "BikeEventType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BikeEventType", + "ofType": null + } } }, "isDeprecated": false, @@ -8550,19 +8522,15 @@ }, { "name": "bikeEvents", - "description": null, + "description": "If offset or limit is not provided, both values are ignored", "args": [ { "name": "offset", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null }, @@ -8570,13 +8538,9 @@ "name": "limit", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null } @@ -8588,9 +8552,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "BikeEvent", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BikeEvent", + "ofType": null + } } } }, @@ -8632,9 +8600,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ActionLog", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActionLog", + "ofType": null + } } }, "isDeprecated": false, @@ -8663,9 +8635,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ActionLog", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActionLog", + "ofType": null + } } }, "isDeprecated": false, @@ -8679,9 +8655,13 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ActionLog", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActionLog", + "ofType": null + } } }, "isDeprecated": false, diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 7272229..240644c 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -52,7 +52,9 @@ export type CargoBike = { technicalEquipment?: Maybe; /** Does not refer to an extra table in the database. */ dimensionsAndLoad: DimensionsAndLoad; + /** If offset or limit is not provided, both values are ignored */ bikeEvents?: Maybe>>; + /** If offset or limit is not provided, both values are ignored */ equipment?: Maybe>>; /** Refers to equipment that is not unique. See kommentierte info tabelle -> Fragen -> Frage 2 */ equipmentType?: Maybe>>; @@ -66,6 +68,7 @@ export type CargoBike = { lendingStation?: Maybe; taxes?: Maybe; currentEngagements?: Maybe>>; + /** If offset or limit is not provided, both values are ignored */ engagement?: Maybe>>; timeFrames?: Maybe>>; isLocked: Scalars['Boolean']; @@ -85,15 +88,15 @@ export type CargoBikeBikeEventsArgs = { /** The CargoBike type is central to the graph. You could call it the root. */ export type CargoBikeEquipmentArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; /** The CargoBike type is central to the graph. You could call it the root. */ export type CargoBikeEngagementArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; /** if you want to add bike to a lending station, create a new timeFrame with to: Date = null */ @@ -358,6 +361,7 @@ export enum Group { Tk = 'TK' } +/** A participant in the organization */ export type Participant = { __typename?: 'Participant'; id: Scalars['ID']; @@ -419,6 +423,7 @@ export type ParticipantUpdateInput = { keepLock?: Maybe; }; +/** A workshop event */ export type Workshop = { __typename?: 'Workshop'; id: Scalars['ID']; @@ -591,6 +596,10 @@ export type EquipmentUpdateInput = { keepLock?: Maybe; }; +/** + * A type of equipment that is not being tracked but can be assigned + * to any bike. + */ export type EquipmentType = { __typename?: 'EquipmentType'; id: Scalars['ID']; @@ -626,7 +635,7 @@ export type BikeEvent = { date: Scalars['Date']; description?: Maybe; /** Path to documents */ - documents: Array>; + documents: Array; remark?: Maybe; isLocked: Scalars['Boolean']; isLockedByMe: Scalars['Boolean']; @@ -667,6 +676,8 @@ export type BikeEventType = { name: Scalars['String']; isLockedByMe: Scalars['Boolean']; isLocked: Scalars['Boolean']; + /** null if not locked by other user */ + lockedBy?: Maybe; lockedUntil?: Maybe; }; @@ -683,7 +694,7 @@ export type Provider = { formName?: Maybe; privatePerson?: Maybe; organisation?: Maybe; - cargoBikes?: Maybe>>; + cargoBikes?: Maybe>; isLocked: Scalars['Boolean']; isLockedByMe: Scalars['Boolean']; /** null if not locked by other user */ @@ -696,7 +707,7 @@ export type ProviderCreateInput = { formName: Scalars['String']; privatePersonId?: Maybe; organisationId?: Maybe; - cargoBikeIds?: Maybe>>; + cargoBikeIds?: Maybe>; }; export type ProviderUpdateInput = { @@ -718,7 +729,7 @@ export type Person = { id: Scalars['ID']; name: Scalars['String']; firstName: Scalars['String']; - contactInformation?: Maybe>>; + contactInformation?: Maybe>; isLocked: Scalars['Boolean']; isLockedByMe: Scalars['Boolean']; /** null if not locked by other user */ @@ -780,7 +791,7 @@ export type Organisation = { name: Scalars['String']; address?: Maybe
; /** (dt. Ausleihstation) */ - lendingStations?: Maybe>>; + lendingStations?: Maybe>; /** registration number of association */ associationNo?: Maybe; /** If Club, at what court registered */ @@ -827,9 +838,9 @@ export type LendingStation = { contactInformationIntern?: Maybe; contactInformationExtern?: Maybe; address: Address; - timeFrames: Array>; + timeFrames: Array; loanPeriod?: Maybe; - cargoBikes?: Maybe>>; + cargoBikes?: Maybe>; /** Total amount of cargoBikes currently assigned to the lending station */ numCargoBikes: Scalars['Int']; organisation?: Maybe; @@ -870,7 +881,7 @@ export type LoanPeriod = { notes?: Maybe>>; /** * Loan times from and until for each day of the week. - * Starting with Monday from, Monday to, Tuesday from, ..., Sunday to + * Starting with Monday from, Monday to, Tuesday from, ..., Sunday to */ loanTimes?: Maybe>>; }; @@ -879,12 +890,12 @@ export type LoanPeriod = { export type LoanPeriodInput = { generalRemark?: Maybe; /** notes for each day of the week, starting on Monday */ - notes?: Maybe>>; + notes?: Maybe>; /** * Loan times from and until for each day of the week. - * Starting with Monday from, Monday to, Tuesday from, ..., Sunday to + * Starting with Monday from, Monday to, Tuesday from, ..., Sunday to */ - loanTimes?: Maybe>>; + loanTimes?: Maybe>; }; /** (dt. Zeitscheibe) When was a bike where */ @@ -959,48 +970,62 @@ export type Query = { __typename?: 'Query'; /** Will (eventually) return all properties of cargo bike */ cargoBikeById?: Maybe; - /** returns cargoBikes ordered by name ascending, relations are not loaded, use cargoBikeById instead */ - cargoBikes: Array>; + /** Returns cargoBikes ordered by name ascending. If offset or limit is not provided, both values are ignored. */ + cargoBikes: Array; engagementById?: Maybe; - engagements: Array>; + /** If offset or limit is not provided, both values are ignored */ + engagements: Array; engagementTypeById?: Maybe; - engagementTypes: Array>; + /** If offset or limit is not provided, both values are ignored */ + engagementTypes: Array; /** equipment by id, will return null if id not found */ equipmentById?: Maybe; - equipment: Array>; + /** If offset or limit is not provided, both values are ignored */ + equipment: Array; equipmentTypeById?: Maybe; - equipmentTypes: Array>; + /** If offset or limit is not provided, both values are ignored */ + equipmentTypes: Array; /** return null if id not found */ providerById?: Maybe; - /** unique equipment with pagination, contains relation to bike (with no further joins), so if you wanna know more about the bike, use cargoBikeById */ - providers: Array>; + /** Returns providers with pagination. If offset or limit is not provided, both values are ignored */ + providers: Array; /** participant by id */ participantById?: Maybe; - participants: Array>; + /** If offset or limit is not provided, both values are ignored */ + participants: Array; workshopTypeById?: Maybe; - workshopTypes: Array>; + /** If offset or limit is not provided, both values are ignored */ + workshopTypes: Array; workshopById?: Maybe; - workshops: Array>; + /** If offset or limit is not provided, both values are ignored */ + workshops: Array; lendingStationById?: Maybe; - lendingStations: Array>; + /** If offset or limit is not provided, both values are ignored */ + lendingStations: Array; organisationById?: Maybe; - organisations: Array>; + /** If offset or limit is not provided, both values are ignored */ + organisations: Array; timeFrameById?: Maybe; - timeframes: Array>; + /** If offset or limit is not provided, both values are ignored */ + timeFrames: Array; contactInformationById?: Maybe; - contactInformation: Array>; + /** If offset or limit is not provided, both values are ignored */ + contactInformation: Array; personById?: Maybe; - persons?: Maybe>>; - bikeEventTypes?: Maybe>>; + /** If offset or limit is not provided, both values are ignored */ + persons?: Maybe>; + /** If offset or limit is not provided, both values are ignored */ + bikeEventTypes?: Maybe>; bikeEventTypeByd?: Maybe; - bikeEvents: Array>; + /** If offset or limit is not provided, both values are ignored */ + bikeEvents: Array; bikeEventById?: Maybe; /** actionLog for current user */ - actionLog?: Maybe>>; + actionLog?: Maybe>; /** actionLog for specific user */ - actionLogByUser?: Maybe>>; + actionLogByUser?: Maybe>; /** actionLog form all users */ - actionLogAll?: Maybe>>; + actionLogAll?: Maybe>; }; @@ -1010,8 +1035,8 @@ export type QueryCargoBikeByIdArgs = { export type QueryCargoBikesArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1021,8 +1046,8 @@ export type QueryEngagementByIdArgs = { export type QueryEngagementsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1032,8 +1057,8 @@ export type QueryEngagementTypeByIdArgs = { export type QueryEngagementTypesArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1043,8 +1068,8 @@ export type QueryEquipmentByIdArgs = { export type QueryEquipmentArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1054,8 +1079,8 @@ export type QueryEquipmentTypeByIdArgs = { export type QueryEquipmentTypesArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1065,8 +1090,8 @@ export type QueryProviderByIdArgs = { export type QueryProvidersArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1076,8 +1101,8 @@ export type QueryParticipantByIdArgs = { export type QueryParticipantsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1087,8 +1112,8 @@ export type QueryWorkshopTypeByIdArgs = { export type QueryWorkshopTypesArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1098,8 +1123,8 @@ export type QueryWorkshopByIdArgs = { export type QueryWorkshopsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1109,8 +1134,8 @@ export type QueryLendingStationByIdArgs = { export type QueryLendingStationsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1120,8 +1145,8 @@ export type QueryOrganisationByIdArgs = { export type QueryOrganisationsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1130,9 +1155,9 @@ export type QueryTimeFrameByIdArgs = { }; -export type QueryTimeframesArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; +export type QueryTimeFramesArgs = { + offset?: Maybe; + limit?: Maybe; }; @@ -1142,8 +1167,8 @@ export type QueryContactInformationByIdArgs = { export type QueryContactInformationArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1153,14 +1178,14 @@ export type QueryPersonByIdArgs = { export type QueryPersonsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; export type QueryBikeEventTypesArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1170,8 +1195,8 @@ export type QueryBikeEventTypeBydArgs = { export type QueryBikeEventsArgs = { - offset: Scalars['Int']; - limit: Scalars['Int']; + offset?: Maybe; + limit?: Maybe; }; @@ -1704,10 +1729,10 @@ export type GetCargoBikesQueryVariables = Exact<{ [key: string]: never; }>; export type GetCargoBikesQuery = ( { __typename?: 'Query' } - & { cargoBikes: Array> } + )> } ); export type GetCargoBikeByIdQueryVariables = Exact<{ @@ -1952,10 +1977,10 @@ export type ProviderFieldsGeneralFragment = ( & { person: ( { __typename?: 'Person' } & Pick - & { contactInformation?: Maybe - )>>> } + )>> } ) } )> } ); @@ -2254,13 +2279,13 @@ export const CargoBikeFieldsForPageFragmentDoc = gql` bikeEvents { ...BikeEventFieldsForBikePage } - equipment(offset: 0, limit: 1000) { + equipment { ...EquipmentFieldsForBikePage } equipmentType { ...EquipmentTypeFieldsForBikePage } - engagement(offset: 0, limit: 1000) { + engagement { ...EngagementFieldsForBikePage } currentEngagements { @@ -2278,7 +2303,7 @@ ${EngagementFieldsForBikePageFragmentDoc} ${TimeFrameFieldsForBikePageFragmentDoc}`; export const GetCargoBikesDocument = gql` query GetCargoBikes { - cargoBikes(limit: 1000, offset: 0) { + cargoBikes { ...CargoBikeFieldsForTable } }