From f34717a0dde81440cc1b5dbe8f4b8ba1fef60dc9 Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Thu, 26 Nov 2020 10:44:10 +0100 Subject: [PATCH] Update dimensionsAndLoad box properties --- .../graphqlOperations/fragments/bike.graphql | 9 +- .../pages/dataPages/bike/bike.component.ts | 63 ++++- src/app/pages/tables/bikes/bikes.component.ts | 9 +- src/generated/graphql.schema.json | 258 ++++++++++-------- src/generated/graphql.ts | 65 +++-- 5 files changed, 254 insertions(+), 150 deletions(-) diff --git a/src/app/graphqlOperations/fragments/bike.graphql b/src/app/graphqlOperations/fragments/bike.graphql index a05e1bb..1c4654c 100644 --- a/src/app/graphqlOperations/fragments/bike.graphql +++ b/src/app/graphqlOperations/fragments/bike.graphql @@ -33,9 +33,12 @@ fragment CargoBikeFieldsForTable on CargoBike { bikeLength bikeWeight bikeWidth - boxHeight - boxLength - boxWidth + minBoxHeight + maxBoxHeight + minBoxLength + maxBoxLength + minBoxWidth + maxBoxWidth hasCoverBox lockable maxWeightBox diff --git a/src/app/pages/dataPages/bike/bike.component.ts b/src/app/pages/dataPages/bike/bike.component.ts index 702e36f..bc04539 100644 --- a/src/app/pages/dataPages/bike/bike.component.ts +++ b/src/app/pages/dataPages/bike/bike.component.ts @@ -27,8 +27,14 @@ export class BikeComponent implements OnInit { dataPath: 'insuranceData.billing', translation: 'Versicherung Abrechnung', }, - { dataPath: 'insuranceData.hasFixedRate', translation: 'Pauschale j/n' }, - { dataPath: 'insuranceData.fixedRate', translation: 'Pauschale Betrag' }, + { + dataPath: 'insuranceData.hasFixedRate', + translation: 'Pauschale j/n', + }, + { + dataPath: 'insuranceData.fixedRate', + translation: 'Pauschale Betrag', + }, { dataPath: 'insuranceData.name', translation: 'Versicherer' }, { dataPath: 'insuranceData.benefactor', translation: 'Kostenträger' }, { dataPath: 'insuranceData.noPnP', translation: 'Nr. P&P' }, @@ -59,14 +65,38 @@ export class BikeComponent implements OnInit { { dataPath: 'dimensionsAndLoad.bikeWeight', translation: 'Gewicht' }, { dataPath: 'dimensionsAndLoad.bikeHeight', translation: 'Höhe' }, { dataPath: 'dimensionsAndLoad.bikeWidth', translation: 'Breite' }, - { dataPath: 'dimensionsAndLoad.boxHeight', translation: 'Boxhöhe' }, - { dataPath: 'dimensionsAndLoad.boxLength', translation: 'Boxlänge' }, - { dataPath: 'dimensionsAndLoad.boxWidth', translation: 'Boxbreite' }, + { + dataPath: 'dimensionsAndLoad.minBoxHeight', + translation: 'Boxhöhe min', + }, + { + dataPath: 'dimensionsAndLoad.maxBoxHeight', + translation: 'Boxhöhe max', + }, + { + dataPath: 'dimensionsAndLoad.minBoxLength', + translation: 'Boxlänge min', + }, + { + dataPath: 'dimensionsAndLoad.maxBoxLength', + translation: 'Boxlänge max', + }, + { + dataPath: 'dimensionsAndLoad.minBoxWidth', + translation: 'Boxbreite min', + }, + { + dataPath: 'dimensionsAndLoad.maxBoxWidth', + translation: 'Boxbreite max', + }, { dataPath: 'dimensionsAndLoad.hasCoverBox', translation: 'Boxabdeckung j/n', }, - { dataPath: 'dimensionsAndLoad.lockable', translation: 'Box abschließbar' }, + { + dataPath: 'dimensionsAndLoad.lockable', + translation: 'Box abschließbar', + }, { dataPath: 'dimensionsAndLoad.maxWeightBox', translation: 'max Zuladung Box', @@ -106,7 +136,10 @@ export class BikeComponent implements OnInit { type: 'Group', title: 'Ausstattung', properties: [ - { dataPath: 'technicalEquipment.bicycleShift', translation: 'Schaltung' }, + { + dataPath: 'technicalEquipment.bicycleShift', + translation: 'Schaltung', + }, { dataPath: 'technicalEquipment.isEBike', translation: 'E-Bike j/n' }, { dataPath: 'technicalEquipment.hasLightSystem', @@ -140,7 +173,10 @@ export class BikeComponent implements OnInit { { dataPath: 'provider.privatePerson.id', translation: '' }, { dataPath: 'provider.privatePerson.person.id', translation: '' }, { dataPath: 'provider.privatePerson.person.name', translation: '' }, - { dataPath: 'provider.privatePerson.person.firstName', translation: '' }, + { + dataPath: 'provider.privatePerson.person.firstName', + translation: '', + }, { dataPath: 'provider.privatePerson.person.contactInformation.email', translation: '', @@ -163,9 +199,14 @@ export class BikeComponent implements OnInit { title: 'Equipmenttypen', dataPath: 'equipmentType', dataService: null, - columnInfo: [{dataPath: 'name', translation: "Name"}, {dataPath: 'description', translation: "Beschreibung"}], - nameToShowInSelection: (element) => {return element.name}, - propertyNameOfUpdateInput: "equipmentTypeIds" + columnInfo: [ + { dataPath: 'name', translation: 'Name' }, + { dataPath: 'description', translation: 'Beschreibung' }, + ], + nameToShowInSelection: (element) => { + return element.name; + }, + propertyNameOfUpdateInput: 'equipmentTypeIds', }, ]; diff --git a/src/app/pages/tables/bikes/bikes.component.ts b/src/app/pages/tables/bikes/bikes.component.ts index 9c4dc23..76e0b5a 100644 --- a/src/app/pages/tables/bikes/bikes.component.ts +++ b/src/app/pages/tables/bikes/bikes.component.ts @@ -49,9 +49,12 @@ export class BikesComponent implements OnInit { { dataPath: 'dimensionsAndLoad.bikeWeight', translation: 'Gewicht' }, { dataPath: 'dimensionsAndLoad.bikeHeight', translation: 'Höhe' }, { dataPath: 'dimensionsAndLoad.bikeWidth', translation: 'Breite' }, - { dataPath: 'dimensionsAndLoad.boxHeight', translation: 'Boxhöhe' }, - { dataPath: 'dimensionsAndLoad.boxLength', translation: 'Boxlänge' }, - { dataPath: 'dimensionsAndLoad.boxWidth', translation: 'Boxbreite' }, + { dataPath: 'dimensionsAndLoad.minBoxHeight', translation: 'Boxhöhe min' }, + { dataPath: 'dimensionsAndLoad.maxBoxHeight', translation: 'Boxhöhe max' }, + { dataPath: 'dimensionsAndLoad.minBoxLength', translation: 'Boxlänge min' }, + { dataPath: 'dimensionsAndLoad.maxBoxLength', translation: 'Boxlänge max' }, + { dataPath: 'dimensionsAndLoad.minBoxWidth', translation: 'Boxbreite min' }, + { dataPath: 'dimensionsAndLoad.maxBoxWidth', translation: 'Boxbreite max' }, { dataPath: 'dimensionsAndLoad.hasCoverBox', translation: 'Boxabdeckung j/n', diff --git a/src/generated/graphql.schema.json b/src/generated/graphql.schema.json index 75b4c9c..78fa329 100644 --- a/src/generated/graphql.schema.json +++ b/src/generated/graphql.schema.json @@ -707,7 +707,7 @@ }, { "name": "equipmentIds", - "description": "Refers to unique equipment\nWhen set to null or [], no relations will be added.", + "description": "Refers to unique equipment\nWhen set to null or [], no relations will be added.\nWhen specified id is in a relation with another bike, this relation will be deleted.", "type": { "kind": "LIST", "name": null, @@ -918,7 +918,7 @@ }, { "name": "equipmentIds", - "description": "Refers to unique equipment\nWhen set to null, field will be ignored.\nWhen set to [], all relations will be deleted.\nElse all realtions will be deleted and the specified relations will be added.", + "description": "Refers to unique equipment\nWhen set to null, field will be ignored.\nWhen set to [], all relations will be deleted.\nElse all realtions will be deleted and the specified relations will be added.\nWhen specified id is in a relation with another bike, this relation will be deleted.", "type": { "kind": "LIST", "name": null, @@ -1484,49 +1484,73 @@ "deprecationReason": null }, { - "name": "boxLength", + "name": "minBoxLength", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "boxWidth", + "name": "maxBoxLength", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "boxHeight", + "name": "minBoxWidth", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maxBoxWidth", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "minBoxHeight", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "maxBoxHeight", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1536,13 +1560,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1552,13 +1572,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1568,13 +1584,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1584,13 +1596,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1672,44 +1680,62 @@ "defaultValue": null }, { - "name": "boxLength", + "name": "minBoxLength", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, { - "name": "boxWidth", + "name": "maxBoxLength", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, { - "name": "boxHeight", + "name": "minBoxWidth", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "maxBoxWidth", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "minBoxHeight", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "maxBoxHeight", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, @@ -1717,13 +1743,9 @@ "name": "maxWeightBox", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, @@ -1731,13 +1753,9 @@ "name": "maxWeightLuggageRack", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, @@ -1745,13 +1763,9 @@ "name": "maxWeightTotal", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, @@ -1759,13 +1773,9 @@ "name": "bikeLength", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } + "kind": "SCALAR", + "name": "Float", + "ofType": null }, "defaultValue": null }, @@ -1831,7 +1841,37 @@ "defaultValue": null }, { - "name": "boxLength", + "name": "minBoxLength", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "maxBoxLength", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "minBoxWidth", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "maxBoxWidth", "description": null, "type": { "kind": "SCALAR", @@ -1841,7 +1881,7 @@ "defaultValue": null }, { - "name": "boxWidth", + "name": "minBoxHeight", "description": null, "type": { "kind": "SCALAR", @@ -1851,7 +1891,7 @@ "defaultValue": null }, { - "name": "boxHeight", + "name": "maxBoxHeight", "description": null, "type": { "kind": "SCALAR", diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 5f9aed1..5140973 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -123,6 +123,7 @@ export type CargoBikeCreateInput = { /** * Refers to unique equipment * When set to null or [], no relations will be added. + * When specified id is in a relation with another bike, this relation will be deleted. */ equipmentIds?: Maybe>>; /** Sticker State */ @@ -162,6 +163,7 @@ export type CargoBikeUpdateInput = { * When set to null, field will be ignored. * When set to [], all relations will be deleted. * Else all realtions will be deleted and the specified relations will be added. + * When specified id is in a relation with another bike, this relation will be deleted. */ equipmentIds?: Maybe>>; /** Sticker State */ @@ -253,13 +255,16 @@ export type DimensionsAndLoad = { hasCoverBox: Scalars['Boolean']; /** cover box can be locked */ lockable: Scalars['Boolean']; - boxLength: Scalars['Float']; - boxWidth: Scalars['Float']; - boxHeight: Scalars['Float']; - maxWeightBox: Scalars['Float']; - maxWeightLuggageRack: Scalars['Float']; - maxWeightTotal: Scalars['Float']; - bikeLength: Scalars['Float']; + minBoxLength?: Maybe; + maxBoxLength?: Maybe; + minBoxWidth?: Maybe; + maxBoxWidth?: Maybe; + minBoxHeight?: Maybe; + maxBoxHeight?: Maybe; + maxWeightBox?: Maybe; + maxWeightLuggageRack?: Maybe; + maxWeightTotal?: Maybe; + bikeLength?: Maybe; bikeWidth?: Maybe; bikeHeight?: Maybe; bikeWeight?: Maybe; @@ -268,13 +273,16 @@ export type DimensionsAndLoad = { export type DimensionsAndLoadCreateInput = { hasCoverBox: Scalars['Boolean']; lockable: Scalars['Boolean']; - boxLength: Scalars['Float']; - boxWidth: Scalars['Float']; - boxHeight: Scalars['Float']; - maxWeightBox: Scalars['Float']; - maxWeightLuggageRack: Scalars['Float']; - maxWeightTotal: Scalars['Float']; - bikeLength: Scalars['Float']; + minBoxLength?: Maybe; + maxBoxLength?: Maybe; + minBoxWidth?: Maybe; + maxBoxWidth?: Maybe; + minBoxHeight?: Maybe; + maxBoxHeight?: Maybe; + maxWeightBox?: Maybe; + maxWeightLuggageRack?: Maybe; + maxWeightTotal?: Maybe; + bikeLength?: Maybe; bikeWidth?: Maybe; bikeHeight?: Maybe; bikeWeight?: Maybe; @@ -283,9 +291,12 @@ export type DimensionsAndLoadCreateInput = { export type DimensionsAndLoadUpdateInput = { hasCoverBox?: Maybe; lockable?: Maybe; - boxLength?: Maybe; - boxWidth?: Maybe; - boxHeight?: Maybe; + minBoxLength?: Maybe; + maxBoxLength?: Maybe; + minBoxWidth?: Maybe; + maxBoxWidth?: Maybe; + minBoxHeight?: Maybe; + maxBoxHeight?: Maybe; maxWeightBox?: Maybe; maxWeightLuggageRack?: Maybe; maxWeightTotal?: Maybe; @@ -1920,7 +1931,7 @@ export type CargoBikeFieldsForTableFragment = ( & Pick ), dimensionsAndLoad: ( { __typename?: 'DimensionsAndLoad' } - & Pick + & Pick ), security: ( { __typename?: 'Security' } & Pick @@ -2148,9 +2159,12 @@ export const CargoBikeFieldsForTableFragmentDoc = gql` bikeWeight bikeHeight bikeWidth - boxHeight - boxLength - boxWidth + minBoxHeight + maxBoxHeight + minBoxLength + maxBoxLength + minBoxWidth + maxBoxWidth hasCoverBox lockable maxWeightBox @@ -2179,9 +2193,12 @@ export const CargoBikeFieldsForTableFragmentDoc = gql` bikeLength bikeWeight bikeWidth - boxHeight - boxLength - boxWidth + minBoxHeight + maxBoxHeight + minBoxLength + maxBoxLength + minBoxWidth + maxBoxWidth hasCoverBox lockable maxWeightBox