Improve data page

urls
Max Ehrlicher-Schmidt 4 years ago
parent 14c080195e
commit 6ec98d868c

@ -11,15 +11,18 @@
<h1> <h1>
{{ data[headlineDataPath] }} {{ data[headlineDataPath] }}
</h1> </h1>
<ng-container *ngFor="let object of propertiesInfo">
<mat-card class="card" *ngIf="object.isGroup">
<mat-card-title>{{object.title}}</mat-card-title>
<div *ngFor="let prop of propertiesInfo"> <app-cell *ngFor="let prop of object.properties"
<app-cell
[editable]="data.isLockedByMe && !prop.readonly" [editable]="data.isLockedByMe && !prop.readonly"
[(value)]="data[prop.name]" [(value)]="data[prop.name]"
[label]="prop.translation || prop.name" [label]="prop.translation || prop.name"
[inputType]="prop.type" [inputType]="prop.type"
></app-cell> ></app-cell>
</div> </mat-card>
</ng-container>
</div> </div>
<button <button
@ -33,6 +36,7 @@
<mat-icon>sync</mat-icon> <mat-icon>sync</mat-icon>
</button> </button>
<div id="floating-fab-button-box">
<button <button
mat-fab mat-fab
(click)="lock()" (click)="lock()"
@ -43,6 +47,15 @@
> >
<mat-icon>edit</mat-icon> <mat-icon>edit</mat-icon>
</button> </button>
<button
mat-mini-fab
(click)="cancel()"
*ngIf="data.isLockedByMe"
class="floating-fab-button"
[disabled]="isSavingOrLocking || isLoading"
>
<mat-icon>cancel</mat-icon>
</button>
<button <button
mat-fab mat-fab
(click)="save()" (click)="save()"
@ -60,3 +73,4 @@
> >
<mat-icon>locked</mat-icon> <mat-icon>locked</mat-icon>
</button> </button>
</div>

@ -6,11 +6,22 @@
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
padding: 2em; padding: 2em;
.card {
display: inline-table;
width: 20em;
margin: 1em;
} }
.floating-fab-button { }
#floating-fab-button-box {
position: absolute; position: absolute;
bottom: 2em; bottom: 2em;
right: 2em; right: 2em;
display: flex;
flex-direction: column;
align-items: center;
.floating-fab-button {
margin-top: 0.5em;
}
} }
.floating-fab-button-top { .floating-fab-button-top {
position: absolute; position: absolute;

@ -1,17 +1,21 @@
import { import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
AfterViewInit,
Component,
EventEmitter,
Input,
OnInit,
Output,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { deepen } from 'src/app/helperFunctions/deepenObject'; import { deepen } from 'src/app/helperFunctions/deepenObject';
import { flatten } from 'src/app/helperFunctions/flattenObject'; import { flatten } from 'src/app/helperFunctions/flattenObject';
import { BikesService } from 'src/app/services/bikes.service';
import { SchemaService } from 'src/app/services/schema.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({ @Component({
selector: 'app-data-page', selector: 'app-data-page',
@ -20,12 +24,7 @@ import { runInThisContext } from 'vm';
}) })
export class DataPageComponent implements OnInit { export class DataPageComponent implements OnInit {
@Input() @Input()
propertiesInfo: { propertiesInfo: Array<PropertyInfoType | PropertyGroup> = [];
name: string;
translation: string;
readonly?: boolean;
type?: string;
}[] = [];
@Input() @Input()
dataService: any; dataService: any;
@ -39,6 +38,7 @@ export class DataPageComponent implements OnInit {
@Output() lockEvent = new EventEmitter(); @Output() lockEvent = new EventEmitter();
@Output() saveEvent = new EventEmitter(); @Output() saveEvent = new EventEmitter();
@Output() cancelEvent = new EventEmitter();
id: string; id: string;
data: any; data: any;
@ -51,7 +51,7 @@ export class DataPageComponent implements OnInit {
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
this.addPropertiesFromGQLSchemaToPropertiesInfo(); this.addPropertiesFromGQLSchemaToObject(this.propertiesInfo);
this.id = this.route.snapshot.paramMap.get('id'); this.id = this.route.snapshot.paramMap.get('id');
this.reloadPageData(); this.reloadPageData();
this.dataService.pageData.subscribe((data) => { this.dataService.pageData.subscribe((data) => {
@ -60,26 +60,27 @@ export class DataPageComponent implements OnInit {
this.dataService.isLoadingPageData.subscribe( this.dataService.isLoadingPageData.subscribe(
(isLoading) => (this.isLoading = isLoading) (isLoading) => (this.isLoading = isLoading)
); );
this.dataService.loadingRowIds.subscribe(loadingRowIds => { this.dataService.loadingRowIds.subscribe((loadingRowIds) => {
console.log(loadingRowIds);
this.isSavingOrLocking = loadingRowIds.includes(this.id); this.isSavingOrLocking = loadingRowIds.includes(this.id);
}) });
} }
addPropertiesFromGQLSchemaToPropertiesInfo() { addPropertiesFromGQLSchemaToObject(infoObject: any) {
for (const column of this.propertiesInfo) { for (const prop of infoObject) {
if (prop.isGroup) {
this.addPropertiesFromGQLSchemaToObject(prop.properties);
} else {
const typeInformation = this.schemaService.getTypeInformation( const typeInformation = this.schemaService.getTypeInformation(
this.pageDataGQLType, this.pageDataGQLType,
column.name prop.name
); );
column.type = column.type || typeInformation.type; prop.type = prop.type || typeInformation.type;
} const updateTypeInformation = this.schemaService.getTypeInformation(
for (const column of this.propertiesInfo) {
const typeInformation = this.schemaService.getTypeInformation(
this.pageDataGQLUpdateInputType, this.pageDataGQLUpdateInputType,
column.name prop.name
); );
column.readonly = column.readonly || !typeInformation.isPartOfType; prop.readonly = prop.readonly || !updateTypeInformation.isPartOfType;
}
} }
} }
@ -96,6 +97,10 @@ export class DataPageComponent implements OnInit {
); );
} }
cancel() {
this.cancelEvent.emit(deepen(this.data))
}
reloadPageData() { reloadPageData() {
this.dataService.loadPageData({ id: this.id }); this.dataService.loadPageData({ id: this.id });
} }

@ -33,6 +33,10 @@
min-width: 3em; min-width: 3em;
box-sizing: border-box; box-sizing: border-box;
padding: 0 0.25em; padding: 0 0.25em;
::ng-deep.mat-form-field-infix {
width: auto !important;
min-width: 50px !important;
}
} }
::ng-deep.mat-form-field { ::ng-deep.mat-form-field {
width: 100%; width: 100%;
@ -50,4 +54,3 @@
} }
} }
} }

@ -12,7 +12,6 @@ import { flatten } from 'src/app/helperFunctions/flattenObject';
import { deepen } from 'src/app/helperFunctions/deepenObject'; import { deepen } from 'src/app/helperFunctions/deepenObject';
import { SchemaService } from 'src/app/services/schema.service'; import { SchemaService } from 'src/app/services/schema.service';
import { logArrayInColumnInfoForm } from 'src/app/helperFunctions/logArrayInColumnInfoForm';
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table';
import { MatPaginator } from '@angular/material/paginator'; import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort'; import { MatSort } from '@angular/material/sort';

@ -1,4 +0,0 @@
::ng-deep.mat-form-field-infix {
width: auto !important;
min-width: 50px !important;
}

@ -1,5 +1,5 @@
query GetCargoBikes { query GetCargoBikes {
cargoBikes(limit: 1000, offset: 0) { cargoBikes {
...CargoBikeFieldsForTable ...CargoBikeFieldsForTable
} }
} }

@ -78,13 +78,13 @@ fragment CargoBikeFieldsForPage on CargoBike {
bikeEvents { bikeEvents {
...BikeEventFieldsForBikePage ...BikeEventFieldsForBikePage
} }
equipment(offset: 0, limit: 1000) { equipment {
...EquipmentFieldsForBikePage ...EquipmentFieldsForBikePage
} }
equipmentType { equipmentType {
...EquipmentTypeFieldsForBikePage ...EquipmentTypeFieldsForBikePage
} }
engagement(offset: 0, limit: 1000) { engagement {
...EngagementFieldsForBikePage ...EngagementFieldsForBikePage
} }
currentEngagements { currentEngagements {

@ -6,4 +6,5 @@
[pageDataGQLUpdateInputType]="pageDataGQLUpdateInputType" [pageDataGQLUpdateInputType]="pageDataGQLUpdateInputType"
(lockEvent)="lock($event)" (lockEvent)="lock($event)"
(saveEvent)="save($event)" (saveEvent)="save($event)"
(cancelEvent)="cancel($event)"
></app-data-page> ></app-data-page>

@ -1,8 +1,5 @@
import { Component, OnInit } from '@angular/core'; 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 { BikesService } from 'src/app/services/bikes.service';
import { SchemaService } from 'src/app/services/schema.service';
@Component({ @Component({
selector: 'app-bike', selector: 'app-bike',
@ -11,11 +8,24 @@ import { SchemaService } from 'src/app/services/schema.service';
}) })
export class BikeComponent implements OnInit { export class BikeComponent implements OnInit {
propertiesInfo = [ propertiesInfo = [
{
isGroup: true,
title: 'Allgemein',
properties: [
{ name: 'name', translation: 'Name' }, { name: 'name', translation: 'Name' },
{ name: 'id', translation: 'ID', readonly: true }, { name: 'id', translation: 'ID', readonly: true },
{ name: 'group', translation: 'Gruppe' }, { name: 'group', translation: 'Gruppe' },
{ name: 'modelName', translation: 'Modell' }, { name: 'modelName', translation: 'Modell' },
{ name: 'insuranceData.billing', translation: 'Versicherung Abrechnung' }, ],
},
{
isGroup: true,
title: 'Versicherungsdaten',
properties: [
{
name: 'insuranceData.billing',
translation: 'Versicherung Abrechnung',
},
{ name: 'insuranceData.hasFixedRate', translation: 'Pauschale j/n' }, { name: 'insuranceData.hasFixedRate', translation: 'Pauschale j/n' },
{ name: 'insuranceData.fixedRate', translation: 'Pauschale Betrag' }, { name: 'insuranceData.fixedRate', translation: 'Pauschale Betrag' },
{ name: 'insuranceData.name', translation: 'Versicherer' }, { name: 'insuranceData.name', translation: 'Versicherer' },
@ -33,8 +43,17 @@ export class BikeComponent implements OnInit {
name: 'insuranceData.maintenanceAgreement', name: 'insuranceData.maintenanceAgreement',
translation: 'Wartungsvereinbarung', translation: 'Wartungsvereinbarung',
}, },
{ name: 'insuranceData.projectAllowance', translation: 'Projektzuschuss' }, {
name: 'insuranceData.projectAllowance',
translation: 'Projektzuschuss',
},
{ name: 'insuranceData.notes', translation: 'Sonstiges' }, { name: 'insuranceData.notes', translation: 'Sonstiges' },
],
},
{
isGroup: true,
title: 'Maße und Ladungen',
properties: [
{ name: 'dimensionsAndLoad.bikeLength', translation: 'Länge' }, { name: 'dimensionsAndLoad.bikeLength', translation: 'Länge' },
{ name: 'dimensionsAndLoad.bikeWeight', translation: 'Gewicht' }, { name: 'dimensionsAndLoad.bikeWeight', translation: 'Gewicht' },
{ name: 'dimensionsAndLoad.bikeHeight', translation: 'Höhe' }, { name: 'dimensionsAndLoad.bikeHeight', translation: 'Höhe' },
@ -42,9 +61,15 @@ export class BikeComponent implements OnInit {
{ name: 'dimensionsAndLoad.boxHeight', translation: 'Boxhöhe' }, { name: 'dimensionsAndLoad.boxHeight', translation: 'Boxhöhe' },
{ name: 'dimensionsAndLoad.boxLength', translation: 'Boxlänge' }, { name: 'dimensionsAndLoad.boxLength', translation: 'Boxlänge' },
{ name: 'dimensionsAndLoad.boxWidth', translation: 'Boxbreite' }, { name: 'dimensionsAndLoad.boxWidth', translation: 'Boxbreite' },
{ name: 'dimensionsAndLoad.hasCoverBox', translation: 'Boxabdeckung j/n' }, {
name: 'dimensionsAndLoad.hasCoverBox',
translation: 'Boxabdeckung j/n',
},
{ name: 'dimensionsAndLoad.lockable', translation: 'Box abschließbar' }, { name: 'dimensionsAndLoad.lockable', translation: 'Box abschließbar' },
{ name: 'dimensionsAndLoad.maxWeightBox', translation: 'max Zuladung Box' }, {
name: 'dimensionsAndLoad.maxWeightBox',
translation: 'max Zuladung Box',
},
{ {
name: 'dimensionsAndLoad.maxWeightLuggageRack', name: 'dimensionsAndLoad.maxWeightLuggageRack',
translation: 'max Zuladung Gepäckträger', translation: 'max Zuladung Gepäckträger',
@ -57,6 +82,12 @@ export class BikeComponent implements OnInit {
{ name: 'numberOfWheels', translation: 'Anzahl Räder' }, { name: 'numberOfWheels', translation: 'Anzahl Räder' },
{ name: 'forCargo', translation: 'für Lasten j/n' }, { name: 'forCargo', translation: 'für Lasten j/n' },
{ name: 'forChildren', translation: 'für Kinder j/n' }, { name: 'forChildren', translation: 'für Kinder j/n' },
],
},
{
isGroup: true,
title: 'Sicherheitsinformationen',
properties: [
{ name: 'security.frameNumber', translation: 'Rahmennummer' }, { name: 'security.frameNumber', translation: 'Rahmennummer' },
{ name: 'security.adfcCoding', translation: 'ADFC Codierung' }, { name: 'security.adfcCoding', translation: 'ADFC Codierung' },
{ {
@ -68,6 +99,12 @@ export class BikeComponent implements OnInit {
translation: 'Schlüsselnrummer AXA-Kette', translation: 'Schlüsselnrummer AXA-Kette',
}, },
{ name: 'security.policeCoding', translation: 'Polizei Codierung' }, { name: 'security.policeCoding', translation: 'Polizei Codierung' },
],
},
{
isGroup: true,
title: 'Ausstattung',
properties: [
{ name: 'technicalEquipment.bicycleShift', translation: 'Schaltung' }, { name: 'technicalEquipment.bicycleShift', translation: 'Schaltung' },
{ name: 'technicalEquipment.isEBike', translation: 'E-Bike j/n' }, { name: 'technicalEquipment.isEBike', translation: 'E-Bike j/n' },
{ {
@ -78,10 +115,25 @@ export class BikeComponent implements OnInit {
name: 'technicalEquipment.specialFeatures', name: 'technicalEquipment.specialFeatures',
translation: 'Besonderheiten', translation: 'Besonderheiten',
}, },
],
},
{
isGroup: true,
title: 'Sonstiges',
properties: [
{ name: 'stickerBikeNameState', translation: 'Aufkleber Status' }, { name: 'stickerBikeNameState', translation: 'Aufkleber Status' },
{ name: 'note', translation: 'Aufkleber Kommentar' }, { name: 'note', translation: 'Aufkleber Kommentar' },
{ name: 'taxes.costCenter', translation: 'Steuern Kostenstelle' }, { name: 'taxes.costCenter', translation: 'Steuern Kostenstelle' },
{ name: 'taxes.organisationArea', translation: 'Steuern Vereinsbereich' }, {
name: 'taxes.organisationArea',
translation: 'Steuern Vereinsbereich',
},
],
},
{
isGroup: true,
title: 'provider',
properties: [
{ name: 'provider.id', translation: '' }, { name: 'provider.id', translation: '' },
{ name: 'provider.formName', translation: '' }, { name: 'provider.formName', translation: '' },
{ name: 'provider.privatePerson.id', translation: '' }, { name: 'provider.privatePerson.id', translation: '' },
@ -92,11 +144,19 @@ export class BikeComponent implements OnInit {
name: 'provider.privatePerson.person.contactInformation.email', name: 'provider.privatePerson.person.contactInformation.email',
translation: '', translation: '',
}, },
],
},
{
isGroup: true,
title: 'lendingstation',
properties: [
{ name: 'lendingStation.id', translation: '' }, { name: 'lendingStation.id', translation: '' },
{ name: 'lendingStation.name', translation: '' }, { name: 'lendingStation.name', translation: '' },
{ name: 'lendingStation.address.number', translation: '' }, { name: 'lendingStation.address.number', translation: '' },
{ name: 'lendingStation.address.street', translation: '' }, { name: 'lendingStation.address.street', translation: '' },
{ name: 'lendingStation.address.zip', translation: '' }, { name: 'lendingStation.address.zip', translation: '' },
],
},
]; ];
headlineDataPath = 'name'; headlineDataPath = 'name';
@ -116,6 +176,10 @@ export class BikeComponent implements OnInit {
} }
save(row: any) { save(row: any) {
this.bikesService.updateBike({bike: row}) this.bikesService.updateBike({ bike: row });
}
cancel(row: any) {
this.bikesService.unlockBike({ id: row.id });
} }
} }

File diff suppressed because it is too large Load Diff

@ -52,7 +52,9 @@ export type CargoBike = {
technicalEquipment?: Maybe<TechnicalEquipment>; technicalEquipment?: Maybe<TechnicalEquipment>;
/** Does not refer to an extra table in the database. */ /** Does not refer to an extra table in the database. */
dimensionsAndLoad: DimensionsAndLoad; dimensionsAndLoad: DimensionsAndLoad;
/** If offset or limit is not provided, both values are ignored */
bikeEvents?: Maybe<Array<Maybe<BikeEvent>>>; bikeEvents?: Maybe<Array<Maybe<BikeEvent>>>;
/** If offset or limit is not provided, both values are ignored */
equipment?: Maybe<Array<Maybe<Equipment>>>; equipment?: Maybe<Array<Maybe<Equipment>>>;
/** Refers to equipment that is not unique. See kommentierte info tabelle -> Fragen -> Frage 2 */ /** Refers to equipment that is not unique. See kommentierte info tabelle -> Fragen -> Frage 2 */
equipmentType?: Maybe<Array<Maybe<EquipmentType>>>; equipmentType?: Maybe<Array<Maybe<EquipmentType>>>;
@ -66,6 +68,7 @@ export type CargoBike = {
lendingStation?: Maybe<LendingStation>; lendingStation?: Maybe<LendingStation>;
taxes?: Maybe<Taxes>; taxes?: Maybe<Taxes>;
currentEngagements?: Maybe<Array<Maybe<Engagement>>>; currentEngagements?: Maybe<Array<Maybe<Engagement>>>;
/** If offset or limit is not provided, both values are ignored */
engagement?: Maybe<Array<Maybe<Engagement>>>; engagement?: Maybe<Array<Maybe<Engagement>>>;
timeFrames?: Maybe<Array<Maybe<TimeFrame>>>; timeFrames?: Maybe<Array<Maybe<TimeFrame>>>;
isLocked: Scalars['Boolean']; isLocked: Scalars['Boolean'];
@ -85,15 +88,15 @@ export type CargoBikeBikeEventsArgs = {
/** The CargoBike type is central to the graph. You could call it the root. */ /** The CargoBike type is central to the graph. You could call it the root. */
export type CargoBikeEquipmentArgs = { export type CargoBikeEquipmentArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
/** The CargoBike type is central to the graph. You could call it the root. */ /** The CargoBike type is central to the graph. You could call it the root. */
export type CargoBikeEngagementArgs = { export type CargoBikeEngagementArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
/** if you want to add bike to a lending station, create a new timeFrame with to: Date = null */ /** 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' Tk = 'TK'
} }
/** A participant in the organization */
export type Participant = { export type Participant = {
__typename?: 'Participant'; __typename?: 'Participant';
id: Scalars['ID']; id: Scalars['ID'];
@ -419,6 +423,7 @@ export type ParticipantUpdateInput = {
keepLock?: Maybe<Scalars['Boolean']>; keepLock?: Maybe<Scalars['Boolean']>;
}; };
/** A workshop event */
export type Workshop = { export type Workshop = {
__typename?: 'Workshop'; __typename?: 'Workshop';
id: Scalars['ID']; id: Scalars['ID'];
@ -591,6 +596,10 @@ export type EquipmentUpdateInput = {
keepLock?: Maybe<Scalars['Boolean']>; keepLock?: Maybe<Scalars['Boolean']>;
}; };
/**
* A type of equipment that is not being tracked but can be assigned
* to any bike.
*/
export type EquipmentType = { export type EquipmentType = {
__typename?: 'EquipmentType'; __typename?: 'EquipmentType';
id: Scalars['ID']; id: Scalars['ID'];
@ -626,7 +635,7 @@ export type BikeEvent = {
date: Scalars['Date']; date: Scalars['Date'];
description?: Maybe<Scalars['String']>; description?: Maybe<Scalars['String']>;
/** Path to documents */ /** Path to documents */
documents: Array<Maybe<Scalars['String']>>; documents: Array<Scalars['String']>;
remark?: Maybe<Scalars['String']>; remark?: Maybe<Scalars['String']>;
isLocked: Scalars['Boolean']; isLocked: Scalars['Boolean'];
isLockedByMe: Scalars['Boolean']; isLockedByMe: Scalars['Boolean'];
@ -667,6 +676,8 @@ export type BikeEventType = {
name: Scalars['String']; name: Scalars['String'];
isLockedByMe: Scalars['Boolean']; isLockedByMe: Scalars['Boolean'];
isLocked: Scalars['Boolean']; isLocked: Scalars['Boolean'];
/** null if not locked by other user */
lockedBy?: Maybe<Scalars['ID']>;
lockedUntil?: Maybe<Scalars['Date']>; lockedUntil?: Maybe<Scalars['Date']>;
}; };
@ -683,7 +694,7 @@ export type Provider = {
formName?: Maybe<Scalars['String']>; formName?: Maybe<Scalars['String']>;
privatePerson?: Maybe<ContactInformation>; privatePerson?: Maybe<ContactInformation>;
organisation?: Maybe<Organisation>; organisation?: Maybe<Organisation>;
cargoBikes?: Maybe<Array<Maybe<CargoBike>>>; cargoBikes?: Maybe<Array<CargoBike>>;
isLocked: Scalars['Boolean']; isLocked: Scalars['Boolean'];
isLockedByMe: Scalars['Boolean']; isLockedByMe: Scalars['Boolean'];
/** null if not locked by other user */ /** null if not locked by other user */
@ -696,7 +707,7 @@ export type ProviderCreateInput = {
formName: Scalars['String']; formName: Scalars['String'];
privatePersonId?: Maybe<Scalars['ID']>; privatePersonId?: Maybe<Scalars['ID']>;
organisationId?: Maybe<Scalars['ID']>; organisationId?: Maybe<Scalars['ID']>;
cargoBikeIds?: Maybe<Array<Maybe<Scalars['ID']>>>; cargoBikeIds?: Maybe<Array<Scalars['ID']>>;
}; };
export type ProviderUpdateInput = { export type ProviderUpdateInput = {
@ -718,7 +729,7 @@ export type Person = {
id: Scalars['ID']; id: Scalars['ID'];
name: Scalars['String']; name: Scalars['String'];
firstName: Scalars['String']; firstName: Scalars['String'];
contactInformation?: Maybe<Array<Maybe<ContactInformation>>>; contactInformation?: Maybe<Array<ContactInformation>>;
isLocked: Scalars['Boolean']; isLocked: Scalars['Boolean'];
isLockedByMe: Scalars['Boolean']; isLockedByMe: Scalars['Boolean'];
/** null if not locked by other user */ /** null if not locked by other user */
@ -780,7 +791,7 @@ export type Organisation = {
name: Scalars['String']; name: Scalars['String'];
address?: Maybe<Address>; address?: Maybe<Address>;
/** (dt. Ausleihstation) */ /** (dt. Ausleihstation) */
lendingStations?: Maybe<Array<Maybe<LendingStation>>>; lendingStations?: Maybe<Array<LendingStation>>;
/** registration number of association */ /** registration number of association */
associationNo?: Maybe<Scalars['String']>; associationNo?: Maybe<Scalars['String']>;
/** If Club, at what court registered */ /** If Club, at what court registered */
@ -827,9 +838,9 @@ export type LendingStation = {
contactInformationIntern?: Maybe<ContactInformation>; contactInformationIntern?: Maybe<ContactInformation>;
contactInformationExtern?: Maybe<ContactInformation>; contactInformationExtern?: Maybe<ContactInformation>;
address: Address; address: Address;
timeFrames: Array<Maybe<TimeFrame>>; timeFrames: Array<TimeFrame>;
loanPeriod?: Maybe<LoanPeriod>; loanPeriod?: Maybe<LoanPeriod>;
cargoBikes?: Maybe<Array<Maybe<CargoBike>>>; cargoBikes?: Maybe<Array<CargoBike>>;
/** Total amount of cargoBikes currently assigned to the lending station */ /** Total amount of cargoBikes currently assigned to the lending station */
numCargoBikes: Scalars['Int']; numCargoBikes: Scalars['Int'];
organisation?: Maybe<Organisation>; organisation?: Maybe<Organisation>;
@ -879,12 +890,12 @@ export type LoanPeriod = {
export type LoanPeriodInput = { export type LoanPeriodInput = {
generalRemark?: Maybe<Scalars['String']>; generalRemark?: Maybe<Scalars['String']>;
/** notes for each day of the week, starting on Monday */ /** notes for each day of the week, starting on Monday */
notes?: Maybe<Array<Maybe<Scalars['String']>>>; notes?: Maybe<Array<Scalars['String']>>;
/** /**
* Loan times from and until for each day of the week. * 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<Array<Maybe<Scalars['String']>>>; loanTimes?: Maybe<Array<Scalars['String']>>;
}; };
/** (dt. Zeitscheibe) When was a bike where */ /** (dt. Zeitscheibe) When was a bike where */
@ -959,48 +970,62 @@ export type Query = {
__typename?: 'Query'; __typename?: 'Query';
/** Will (eventually) return all properties of cargo bike */ /** Will (eventually) return all properties of cargo bike */
cargoBikeById?: Maybe<CargoBike>; cargoBikeById?: Maybe<CargoBike>;
/** returns cargoBikes ordered by name ascending, relations are not loaded, use cargoBikeById instead */ /** Returns cargoBikes ordered by name ascending. If offset or limit is not provided, both values are ignored. */
cargoBikes: Array<Maybe<CargoBike>>; cargoBikes: Array<CargoBike>;
engagementById?: Maybe<Engagement>; engagementById?: Maybe<Engagement>;
engagements: Array<Maybe<Engagement>>; /** If offset or limit is not provided, both values are ignored */
engagements: Array<Engagement>;
engagementTypeById?: Maybe<EngagementType>; engagementTypeById?: Maybe<EngagementType>;
engagementTypes: Array<Maybe<EngagementType>>; /** If offset or limit is not provided, both values are ignored */
engagementTypes: Array<EngagementType>;
/** equipment by id, will return null if id not found */ /** equipment by id, will return null if id not found */
equipmentById?: Maybe<Equipment>; equipmentById?: Maybe<Equipment>;
equipment: Array<Maybe<Equipment>>; /** If offset or limit is not provided, both values are ignored */
equipment: Array<Equipment>;
equipmentTypeById?: Maybe<EquipmentType>; equipmentTypeById?: Maybe<EquipmentType>;
equipmentTypes: Array<Maybe<EquipmentType>>; /** If offset or limit is not provided, both values are ignored */
equipmentTypes: Array<EquipmentType>;
/** return null if id not found */ /** return null if id not found */
providerById?: Maybe<Provider>; providerById?: Maybe<Provider>;
/** unique equipment with pagination, contains relation to bike (with no further joins), so if you wanna know more about the bike, use cargoBikeById */ /** Returns providers with pagination. If offset or limit is not provided, both values are ignored */
providers: Array<Maybe<Provider>>; providers: Array<Provider>;
/** participant by id */ /** participant by id */
participantById?: Maybe<Participant>; participantById?: Maybe<Participant>;
participants: Array<Maybe<Participant>>; /** If offset or limit is not provided, both values are ignored */
participants: Array<Participant>;
workshopTypeById?: Maybe<WorkshopType>; workshopTypeById?: Maybe<WorkshopType>;
workshopTypes: Array<Maybe<WorkshopType>>; /** If offset or limit is not provided, both values are ignored */
workshopTypes: Array<WorkshopType>;
workshopById?: Maybe<Workshop>; workshopById?: Maybe<Workshop>;
workshops: Array<Maybe<Workshop>>; /** If offset or limit is not provided, both values are ignored */
workshops: Array<Workshop>;
lendingStationById?: Maybe<LendingStation>; lendingStationById?: Maybe<LendingStation>;
lendingStations: Array<Maybe<LendingStation>>; /** If offset or limit is not provided, both values are ignored */
lendingStations: Array<LendingStation>;
organisationById?: Maybe<Organisation>; organisationById?: Maybe<Organisation>;
organisations: Array<Maybe<Organisation>>; /** If offset or limit is not provided, both values are ignored */
organisations: Array<Organisation>;
timeFrameById?: Maybe<TimeFrame>; timeFrameById?: Maybe<TimeFrame>;
timeframes: Array<Maybe<TimeFrame>>; /** If offset or limit is not provided, both values are ignored */
timeFrames: Array<TimeFrame>;
contactInformationById?: Maybe<ContactInformation>; contactInformationById?: Maybe<ContactInformation>;
contactInformation: Array<Maybe<ContactInformation>>; /** If offset or limit is not provided, both values are ignored */
contactInformation: Array<ContactInformation>;
personById?: Maybe<Person>; personById?: Maybe<Person>;
persons?: Maybe<Array<Maybe<Person>>>; /** If offset or limit is not provided, both values are ignored */
bikeEventTypes?: Maybe<Array<Maybe<BikeEventType>>>; persons?: Maybe<Array<Person>>;
/** If offset or limit is not provided, both values are ignored */
bikeEventTypes?: Maybe<Array<BikeEventType>>;
bikeEventTypeByd?: Maybe<BikeEventType>; bikeEventTypeByd?: Maybe<BikeEventType>;
bikeEvents: Array<Maybe<BikeEvent>>; /** If offset or limit is not provided, both values are ignored */
bikeEvents: Array<BikeEvent>;
bikeEventById?: Maybe<BikeEvent>; bikeEventById?: Maybe<BikeEvent>;
/** actionLog for current user */ /** actionLog for current user */
actionLog?: Maybe<Array<Maybe<ActionLog>>>; actionLog?: Maybe<Array<ActionLog>>;
/** actionLog for specific user */ /** actionLog for specific user */
actionLogByUser?: Maybe<Array<Maybe<ActionLog>>>; actionLogByUser?: Maybe<Array<ActionLog>>;
/** actionLog form all users */ /** actionLog form all users */
actionLogAll?: Maybe<Array<Maybe<ActionLog>>>; actionLogAll?: Maybe<Array<ActionLog>>;
}; };
@ -1010,8 +1035,8 @@ export type QueryCargoBikeByIdArgs = {
export type QueryCargoBikesArgs = { export type QueryCargoBikesArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1021,8 +1046,8 @@ export type QueryEngagementByIdArgs = {
export type QueryEngagementsArgs = { export type QueryEngagementsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1032,8 +1057,8 @@ export type QueryEngagementTypeByIdArgs = {
export type QueryEngagementTypesArgs = { export type QueryEngagementTypesArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1043,8 +1068,8 @@ export type QueryEquipmentByIdArgs = {
export type QueryEquipmentArgs = { export type QueryEquipmentArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1054,8 +1079,8 @@ export type QueryEquipmentTypeByIdArgs = {
export type QueryEquipmentTypesArgs = { export type QueryEquipmentTypesArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1065,8 +1090,8 @@ export type QueryProviderByIdArgs = {
export type QueryProvidersArgs = { export type QueryProvidersArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1076,8 +1101,8 @@ export type QueryParticipantByIdArgs = {
export type QueryParticipantsArgs = { export type QueryParticipantsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1087,8 +1112,8 @@ export type QueryWorkshopTypeByIdArgs = {
export type QueryWorkshopTypesArgs = { export type QueryWorkshopTypesArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1098,8 +1123,8 @@ export type QueryWorkshopByIdArgs = {
export type QueryWorkshopsArgs = { export type QueryWorkshopsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1109,8 +1134,8 @@ export type QueryLendingStationByIdArgs = {
export type QueryLendingStationsArgs = { export type QueryLendingStationsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1120,8 +1145,8 @@ export type QueryOrganisationByIdArgs = {
export type QueryOrganisationsArgs = { export type QueryOrganisationsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1130,9 +1155,9 @@ export type QueryTimeFrameByIdArgs = {
}; };
export type QueryTimeframesArgs = { export type QueryTimeFramesArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1142,8 +1167,8 @@ export type QueryContactInformationByIdArgs = {
export type QueryContactInformationArgs = { export type QueryContactInformationArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1153,14 +1178,14 @@ export type QueryPersonByIdArgs = {
export type QueryPersonsArgs = { export type QueryPersonsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
export type QueryBikeEventTypesArgs = { export type QueryBikeEventTypesArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1170,8 +1195,8 @@ export type QueryBikeEventTypeBydArgs = {
export type QueryBikeEventsArgs = { export type QueryBikeEventsArgs = {
offset: Scalars['Int']; offset?: Maybe<Scalars['Int']>;
limit: Scalars['Int']; limit?: Maybe<Scalars['Int']>;
}; };
@ -1704,10 +1729,10 @@ export type GetCargoBikesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetCargoBikesQuery = ( export type GetCargoBikesQuery = (
{ __typename?: 'Query' } { __typename?: 'Query' }
& { cargoBikes: Array<Maybe<( & { cargoBikes: Array<(
{ __typename?: 'CargoBike' } { __typename?: 'CargoBike' }
& CargoBikeFieldsForTableFragment & CargoBikeFieldsForTableFragment
)>> } )> }
); );
export type GetCargoBikeByIdQueryVariables = Exact<{ export type GetCargoBikeByIdQueryVariables = Exact<{
@ -1952,10 +1977,10 @@ export type ProviderFieldsGeneralFragment = (
& { person: ( & { person: (
{ __typename?: 'Person' } { __typename?: 'Person' }
& Pick<Person, 'id' | 'name' | 'firstName'> & Pick<Person, 'id' | 'name' | 'firstName'>
& { contactInformation?: Maybe<Array<Maybe<( & { contactInformation?: Maybe<Array<(
{ __typename?: 'ContactInformation' } { __typename?: 'ContactInformation' }
& Pick<ContactInformation, 'email'> & Pick<ContactInformation, 'email'>
)>>> } )>> }
) } ) }
)> } )> }
); );
@ -2254,13 +2279,13 @@ export const CargoBikeFieldsForPageFragmentDoc = gql`
bikeEvents { bikeEvents {
...BikeEventFieldsForBikePage ...BikeEventFieldsForBikePage
} }
equipment(offset: 0, limit: 1000) { equipment {
...EquipmentFieldsForBikePage ...EquipmentFieldsForBikePage
} }
equipmentType { equipmentType {
...EquipmentTypeFieldsForBikePage ...EquipmentTypeFieldsForBikePage
} }
engagement(offset: 0, limit: 1000) { engagement {
...EngagementFieldsForBikePage ...EngagementFieldsForBikePage
} }
currentEngagements { currentEngagements {
@ -2278,7 +2303,7 @@ ${EngagementFieldsForBikePageFragmentDoc}
${TimeFrameFieldsForBikePageFragmentDoc}`; ${TimeFrameFieldsForBikePageFragmentDoc}`;
export const GetCargoBikesDocument = gql` export const GetCargoBikesDocument = gql`
query GetCargoBikes { query GetCargoBikes {
cargoBikes(limit: 1000, offset: 0) { cargoBikes {
...CargoBikeFieldsForTable ...CargoBikeFieldsForTable
} }
} }

Loading…
Cancel
Save