Split PLZ and City, Add remark and holiday to loanPeriod, add remark to LS

master
Max 4 years ago
parent 92614daff7
commit 54a6eef2e4

@ -74,7 +74,7 @@ export class DataPageComponent implements OnInit, OnDestroy {
@Output() cancelEvent = new EventEmitter();
id: string;
data: any;
data: any = null;
isLoading: boolean = false;
isSavingOrLocking: boolean = false;
@ -88,6 +88,7 @@ export class DataPageComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.addPropertiesFromGQLSchemaToObject(this.propertiesInfo);
console.log(this.propertiesInfo);
this.id = this.route.snapshot.paramMap.get('id');
this.reloadPageData();
this.dataService.pageData.subscribe((data) => {

@ -4,8 +4,8 @@ query GetBikeEventTypes {
}
}
mutation CreateBikeEventType($bikeEventType: String!) {
createBikeEventType(name: $bikeEventType) {
mutation CreateBikeEventType($bikeEventType: BikeEventTypeCreateInput!) {
createBikeEventType(bikeEventType: $bikeEventType) {
...BikeEventTypeFields
}
}

@ -2,4 +2,5 @@ fragment AddressFields on Address {
street
number
zip
city
}

@ -24,6 +24,7 @@ fragment LendingStationFieldsForTable on LendingStation {
organisation {
...OrganisationFieldsGeneral
}
remark
isLocked
isLockedByMe
lockedBy
@ -40,6 +41,8 @@ fragment LendingStationFieldsForPage on LendingStation {
...TimeFrameFieldsForLendingStation
}
loanPeriod {
generalRemark
holidays
mo
tu
we

@ -212,11 +212,17 @@ export class BikeComponent implements OnInit {
type: 'Group',
title: 'Standort',
properties: [
{ dataPath: 'lendingStation.id', translation: '' },
{ dataPath: 'lendingStation.name', translation: '' },
{ dataPath: 'lendingStation.address.number', translation: '' },
{ dataPath: 'lendingStation.address.street', translation: '' },
{ dataPath: 'lendingStation.address.zip', translation: '' },
{
dataPath: 'lendingStation.name',
translation: 'Standort',
link: (row: any) => {
return '/lendingStation/' + row['lendingStation.id'];
},
},
{ dataPath: 'lendingStation.address.street', translation: 'Straße' },
{ dataPath: 'lendingStation.address.number', translation: 'Hausnummer' },
{ dataPath: 'lendingStation.address.zip', translation: 'PLZ' },
{ dataPath: 'lendingStation.address.city', translation: 'Ort' },
],
},
{

@ -14,22 +14,25 @@ export class LendingStationComponent implements OnInit {
title: 'Allgemein',
properties: [
{ dataPath: 'name', translation: 'Name' },
{ dataPath: 'organisation.name', translation: 'Organisation' },
{ dataPath: 'remark', translation: 'Anmerkung' },
],
},
{
type: 'Group',
title: 'Adresse',
properties: [
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.street', translation: 'Straße' },
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.zip', translation: 'Postleitzahl' },
{ dataPath: 'address.city', translation: 'Ort' },
],
},
{
type: 'Group',
title: 'Ausleihzeiten',
properties: [
{ dataPath: 'loanPeriod.generalRemark', translation: 'Anmerkung' },
{ dataPath: 'loanPeriod.holidays', translation: 'An Feiertagen' },
{ dataPath: 'loanPeriod.mo', translation: 'Montag' },
{ dataPath: 'loanPeriod.tu', translation: 'Dienstag' },
{ dataPath: 'loanPeriod.we', translation: 'Mittwoch' },
@ -51,6 +54,7 @@ export class LendingStationComponent implements OnInit {
{ dataPath: 'organisation.address.street', translation: 'Straße' },
{ dataPath: 'organisation.address.number', translation: 'Hausnummer' },
{ dataPath: 'organisation.address.zip', translation: 'Postleitzahl' },
{ dataPath: 'organisation.address.city', translation: 'Ort' },
{ dataPath: 'organisation.associationNo', translation: 'Nummer' },
],
},

@ -17,6 +17,7 @@ export class OrganisationComponent implements OnInit {
{ dataPath: 'address.street', translation: 'Straße' },
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.zip', translation: 'Postleitzahl' },
{ dataPath: 'address.city', translation: 'Ort' },
{ dataPath: 'associationNo', translation: 'Vereinsnummer' },
{ dataPath: 'registeredAt', translation: 'Registergericht' },

@ -17,6 +17,7 @@ export class ProviderComponent implements OnInit {
title: 'Allgemein',
hideCondition: (data) => data.privatePerson === null,
properties: [
{ dataPath: 'formName', translation: 'Formular Name' },
{
type: 'Link',
linkText: "Zur Person",
@ -47,6 +48,7 @@ export class ProviderComponent implements OnInit {
title: 'Allgemein',
hideCondition: (data) => data.organisation === null,
properties: [
{ dataPath: 'formName', translation: 'Formular Name' },
{
type: 'Link',
linkText: "Zum Organisation",
@ -54,10 +56,11 @@ export class ProviderComponent implements OnInit {
return '/organisation/' + data['organisation.id'];
},
},
{ dataPath: 'organisation.name', translation: 'Name' },
{ dataPath: 'organisation.address.street', translation: 'Straße' },
{ dataPath: 'organisation.name', translation: 'Name Organisation' },
{ dataPath: 'organisation.address.number', translation: 'Hausnummer' },
{ dataPath: 'organisation.address.street', translation: 'Straße' },
{ dataPath: 'organisation.address.zip', translation: 'Postleitzahl' },
{ dataPath: 'organisation.address.city', translation: 'Ort' },
],
},
{

@ -111,17 +111,17 @@ export class BikesComponent implements OnInit {
dataPath: 'provider.privatePerson.person.contactInformation.email',
translation: '',
},
{ dataPath: 'lendingStation.id', translation: '' },
{
dataPath: 'lendingStation.name',
translation: '',
translation: 'Standort',
link: (row: any) => {
return '/lendingStation/' + row['lendingStation.id'];
},
},
{ dataPath: 'lendingStation.address.number', translation: '' },
{ dataPath: 'lendingStation.address.street', translation: '' },
{ dataPath: 'lendingStation.address.zip', translation: '' },
{ dataPath: 'lendingStation.address.street', translation: 'Straße' },
{ dataPath: 'lendingStation.address.number', translation: 'Hausnummer' },
{ dataPath: 'lendingStation.address.zip', translation: 'PLZ' },
{ dataPath: 'lendingStation.address.city', translation: 'Ort' },
];
dataService: any;

@ -19,6 +19,9 @@ export class LendingStationsComponent implements OnInit {
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.street', translation: 'Straße' },
{ dataPath: 'address.zip', translation: 'Postleitzahl' },
{ dataPath: 'address.city', translation: 'Ort' },
{ dataPath: 'remark', translation: 'Anmerkung' },
{ dataPath: 'organisation.name', translation: 'Organisation' },

@ -19,6 +19,7 @@ export class OrganisationsComponent implements OnInit {
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.street', translation: 'Straße' },
{ dataPath: 'address.zip', translation: 'Postleitzahl' },
{ dataPath: 'address.city', translation: 'Ort' },
{ dataPath: 'associationNo', translation: 'Vereinsnummer' },
{ dataPath: 'registeredAt', translation: 'Registergericht' },

@ -27,6 +27,7 @@ export class SchemaService {
(type) => type.name === startingObjectName
);
if (!startingObject) {
//console.error("Did't found " + startingObjectName + " in ", startingObject);
return {
isPartOfType: false,
type: '',
@ -36,6 +37,8 @@ export class SchemaService {
}
const fields = startingObject.fields || startingObject.inputFields;
if (!fields) {
//console.error("Did't found fields in ", startingObject);
return {
isPartOfType: false,
type: '',
@ -45,6 +48,8 @@ export class SchemaService {
}
const field = fields.find((field) => field.name === variablePath[0]);
if (!field) {
//console.error("[" + startingObjectName + ", " + variable + "] " + "Did't found field in ", fields);
return {
isPartOfType: false,
type: '',

@ -5044,6 +5044,31 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "BikeEventTypeCreateInput",
"description": null,
"fields": null,
"inputFields": [
{
"name": "name",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"defaultValue": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "Provider",
@ -6373,6 +6398,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "remark",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "isLocked",
"description": null,
@ -6508,6 +6545,16 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "remark",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
@ -6594,6 +6641,16 @@
},
"defaultValue": null
},
{
"name": "remark",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "keepLock",
"description": null,
@ -6626,6 +6683,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "holidays",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "mo",
"description": null,
@ -6732,6 +6801,16 @@
},
"defaultValue": null
},
{
"name": "holidays",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "mo",
"description": null,
@ -7214,6 +7293,18 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "city",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
@ -7268,6 +7359,16 @@
}
},
"defaultValue": null
},
{
"name": "city",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
@ -7309,6 +7410,16 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "city",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
@ -9521,14 +9632,14 @@
"description": "BIKEEVENT",
"args": [
{
"name": "name",
"name": "bikeEventType",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"kind": "INPUT_OBJECT",
"name": "BikeEventTypeCreateInput",
"ofType": null
}
},

@ -722,6 +722,10 @@ export type BikeEventTypeUpdateInput = {
keepLock?: Maybe<Scalars['Boolean']>;
};
export type BikeEventTypeCreateInput = {
name: Scalars['String'];
};
/** (dt. Anbieter) bezieht sich auf die Beziehung einer Person oder Organisation zum Lastenrad */
export type Provider = {
__typename?: 'Provider';
@ -876,6 +880,7 @@ export type LendingStation = {
/** Total amount of cargoBikes currently assigned to the lending station */
numCargoBikes: Scalars['Int'];
organisation?: Maybe<Organisation>;
remark?: Maybe<Scalars['String']>;
isLocked: Scalars['Boolean'];
isLockedByMe: Scalars['Boolean'];
/** null if not locked by other user */
@ -891,6 +896,7 @@ export type LendingStationCreateInput = {
address: AddressCreateInput;
loanPeriod?: Maybe<LoanPeriodInput>;
organisationId?: Maybe<Scalars['ID']>;
remark?: Maybe<Scalars['String']>;
};
/** If you want to create LendingStation with cargoBikes, use createTimeFrame and set to: Date = null */
@ -902,6 +908,7 @@ export type LendingStationUpdateInput = {
address?: Maybe<AddressUpdateInput>;
loanPeriod?: Maybe<LoanPeriodInput>;
organisationId?: Maybe<Scalars['ID']>;
remark?: Maybe<Scalars['String']>;
keepLock?: Maybe<Scalars['Boolean']>;
};
@ -909,6 +916,7 @@ export type LendingStationUpdateInput = {
export type LoanPeriod = {
__typename?: 'LoanPeriod';
generalRemark?: Maybe<Scalars['String']>;
holidays?: Maybe<Scalars['String']>;
mo?: Maybe<Scalars['String']>;
tu?: Maybe<Scalars['String']>;
we?: Maybe<Scalars['String']>;
@ -921,6 +929,7 @@ export type LoanPeriod = {
/** (dt. Ausleihzeiten) */
export type LoanPeriodInput = {
generalRemark?: Maybe<Scalars['String']>;
holidays?: Maybe<Scalars['String']>;
mo?: Maybe<Scalars['String']>;
tu?: Maybe<Scalars['String']>;
we?: Maybe<Scalars['String']>;
@ -983,18 +992,21 @@ export type Address = {
street: Scalars['String'];
number: Scalars['String'];
zip: Scalars['String'];
city?: Maybe<Scalars['String']>;
};
export type AddressCreateInput = {
street: Scalars['String'];
number: Scalars['String'];
zip: Scalars['String'];
city?: Maybe<Scalars['String']>;
};
export type AddressUpdateInput = {
street?: Maybe<Scalars['String']>;
number?: Maybe<Scalars['String']>;
zip?: Maybe<Scalars['String']>;
city?: Maybe<Scalars['String']>;
};
export type ActionLog = {
@ -1504,7 +1516,7 @@ export type MutationDeleteTimeFrameArgs = {
export type MutationCreateBikeEventTypeArgs = {
name: Scalars['String'];
bikeEventType: BikeEventTypeCreateInput;
};
@ -1942,7 +1954,7 @@ export type GetBikeEventTypesQuery = { __typename?: 'Query', bikeEventTypes?: Ma
)>> };
export type CreateBikeEventTypeMutationVariables = Exact<{
bikeEventType: Scalars['String'];
bikeEventType: BikeEventTypeCreateInput;
}>;
@ -2263,7 +2275,7 @@ export type DeleteEquipmentTypeMutationVariables = Exact<{
export type DeleteEquipmentTypeMutation = { __typename?: 'Mutation', deleteEquipmentType: boolean };
export type AddressFieldsFragment = { __typename?: 'Address', street: string, number: string, zip: string };
export type AddressFieldsFragment = { __typename?: 'Address', street: string, number: string, zip: string, city?: Maybe<string> };
export type CargoBikeFieldsForTableFragment = { __typename?: 'CargoBike', id: string, group: Group, name: string, modelName?: Maybe<string>, state?: Maybe<BikeState>, numberOfChildren?: Maybe<number>, numberOfWheels?: Maybe<number>, forCargo?: Maybe<boolean>, forChildren?: Maybe<boolean>, stickerBikeNameState?: Maybe<StickerBikeNameState>, note?: Maybe<string>, isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any>, insuranceData?: Maybe<{ __typename?: 'InsuranceData', billing?: Maybe<string>, hasFixedRate?: Maybe<boolean>, name?: Maybe<string>, benefactor?: Maybe<string>, noPnP?: Maybe<string>, maintenanceResponsible?: Maybe<string>, maintenanceBenefactor?: Maybe<string>, maintenanceAgreement?: Maybe<string>, fixedRate?: Maybe<number>, projectAllowance?: Maybe<any>, notes?: Maybe<string> }>, dimensionsAndLoad?: Maybe<{ __typename?: 'DimensionsAndLoad', bikeLength?: Maybe<number>, bikeWeight?: Maybe<number>, bikeHeight?: Maybe<number>, bikeWidth?: Maybe<number>, hasCoverBox?: Maybe<boolean>, lockable?: Maybe<boolean>, maxWeightBox?: Maybe<number>, maxWeightLuggageRack?: Maybe<number>, maxWeightTotal?: Maybe<number>, boxHeightRange?: Maybe<{ __typename?: 'NumRange', max?: Maybe<number>, min?: Maybe<number> }>, boxLengthRange?: Maybe<{ __typename?: 'NumRange', min?: Maybe<number>, max?: Maybe<number> }>, boxWidthRange?: Maybe<{ __typename?: 'NumRange', min?: Maybe<number>, max?: Maybe<number> }> }>, security?: Maybe<{ __typename?: 'Security', frameNumber?: Maybe<string>, adfcCoding?: Maybe<string>, keyNumberAXAChain?: Maybe<string>, keyNumberFrameLock?: Maybe<string>, policeCoding?: Maybe<string> }>, technicalEquipment?: Maybe<{ __typename?: 'TechnicalEquipment', bicycleShift?: Maybe<string>, isEBike?: Maybe<boolean>, hasLightSystem?: Maybe<boolean>, specialFeatures?: Maybe<string> }>, taxes?: Maybe<{ __typename?: 'Taxes', costCenter?: Maybe<string>, organisationArea?: Maybe<OrganisationArea> }>, provider?: Maybe<(
{ __typename?: 'Provider' }
@ -2369,7 +2381,7 @@ export type LendingStationFieldsForBikePageFragment = { __typename?: 'LendingSta
& OrganisationFieldsGeneralFragment
)> };
export type LendingStationFieldsForTableFragment = { __typename?: 'LendingStation', id: string, name: string, isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any>, contactInformationIntern?: Maybe<(
export type LendingStationFieldsForTableFragment = { __typename?: 'LendingStation', id: string, name: string, remark?: Maybe<string>, isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any>, contactInformationIntern?: Maybe<(
{ __typename?: 'ContactInformation' }
& ContactInformationFieldsGeneralFragment
)>, contactInformationExtern?: Maybe<(
@ -2387,7 +2399,7 @@ export type LendingStationFieldsForPageFragment = (
{ __typename?: 'LendingStation', cargoBikes?: Maybe<Array<{ __typename?: 'CargoBike', id: string, name: string }>>, timeFrames: Array<(
{ __typename?: 'TimeFrame' }
& TimeFrameFieldsForLendingStationFragment
)>, loanPeriod?: Maybe<{ __typename?: 'LoanPeriod', mo?: Maybe<string>, tu?: Maybe<string>, we?: Maybe<string>, th?: Maybe<string>, fr?: Maybe<string>, sa?: Maybe<string>, su?: Maybe<string> }> }
)>, loanPeriod?: Maybe<{ __typename?: 'LoanPeriod', generalRemark?: Maybe<string>, holidays?: Maybe<string>, mo?: Maybe<string>, tu?: Maybe<string>, we?: Maybe<string>, th?: Maybe<string>, fr?: Maybe<string>, sa?: Maybe<string>, su?: Maybe<string> }> }
& LendingStationFieldsForTableFragment
);
@ -3104,6 +3116,7 @@ export const AddressFieldsFragmentDoc = gql`
street
number
zip
city
}
`;
export const OrganisationFieldsGeneralFragmentDoc = gql`
@ -3472,6 +3485,7 @@ export const LendingStationFieldsForTableFragmentDoc = gql`
organisation {
...OrganisationFieldsGeneral
}
remark
isLocked
isLockedByMe
lockedBy
@ -3505,6 +3519,8 @@ export const LendingStationFieldsForPageFragmentDoc = gql`
...TimeFrameFieldsForLendingStation
}
loanPeriod {
generalRemark
holidays
mo
tu
we
@ -3999,8 +4015,8 @@ export const GetBikeEventTypesDocument = gql`
}
}
export const CreateBikeEventTypeDocument = gql`
mutation CreateBikeEventType($bikeEventType: String!) {
createBikeEventType(name: $bikeEventType) {
mutation CreateBikeEventType($bikeEventType: BikeEventTypeCreateInput!) {
createBikeEventType(bikeEventType: $bikeEventType) {
...BikeEventTypeFields
}
}

Loading…
Cancel
Save