Add bikes, organisation and loanPeriod to lendingStation page

pull/8/head
Max Ehrlicher-Schmidt 4 years ago
parent b5f533a54b
commit a0c3751a31

@ -39,9 +39,13 @@ fragment LendingStationFieldsForPage on LendingStation {
timeFrames { timeFrames {
...TimeFrameFieldsForLendingStation ...TimeFrameFieldsForLendingStation
} }
# loanPeriod { loanPeriod {
# generalRemark mo
# notes tu
# loanTimes we
#} th
fr
sa
su
}
} }

@ -4,4 +4,5 @@ fragment OrganisationFieldsGeneral on Organisation {
address { address {
...AddressFields ...AddressFields
} }
associationNo
} }

@ -28,8 +28,27 @@ export class LendingStationComponent implements OnInit {
}, },
{ {
type: 'Group', type: 'Group',
title: 'Öffnungszeiten', title: 'Ausleihzeiten',
properties: [], properties: [
{ dataPath: 'loanPeriod.mo', translation: 'Montag' },
{ dataPath: 'loanPeriod.tu', translation: 'Dienstag' },
{ dataPath: 'loanPeriod.we', translation: 'Mittwoch' },
{ dataPath: 'loanPeriod.th', translation: 'Donnerstag' },
{ dataPath: 'loanPeriod.fr', translation: 'Freitag' },
{ dataPath: 'loanPeriod.sa', translation: 'Samstag' },
{ dataPath: 'loanPeriod.su', translation: 'Sonntag' },
],
},
{
type: 'Group',
title: 'Organisation',
properties: [
{ dataPath: 'organisation.name', translation: 'Name', link: (data)=> "/organisation/" + data["organisation.id"] },
{ dataPath: 'organisation.address.street', translation: 'Straße'},
{ dataPath: 'organisation.address.number', translation: 'Hausnummer'},
{ dataPath: 'organisation.address.zip', translation: 'Postleitzahl'},
{ dataPath: 'organisation.associationNo', translation: 'Nummer'},
],
}, },
{ {
type: 'Group', type: 'Group',
@ -119,6 +138,21 @@ export class LendingStationComponent implements OnInit {
{ dataPath: 'contactInformationExtern.note', translation: 'Anmerkung' }, { dataPath: 'contactInformationExtern.note', translation: 'Anmerkung' },
], ],
}, },
{
type: 'ReferenceTable',
title: 'Lastenräder',
dataPath: 'cargoBikes',
dataService: null,
columnInfo: [
{
dataPath: 'name',
translation: 'Lastenrad',
link: (row) => '/bike/' + row['cargoBike.id'],
},
],
editableReferences: false,
linkToTable: () => '/table/bikes',
},
{ {
type: 'ReferenceTable', type: 'ReferenceTable',
title: 'Zeitscheiben', title: 'Zeitscheiben',

@ -2103,11 +2103,11 @@ export type LendingStationFieldsForPageFragment = (
{ __typename?: 'LendingStation', cargoBikes?: Maybe<Array<{ __typename?: 'CargoBike', id: string, name: string }>>, timeFrames: Array<( { __typename?: 'LendingStation', cargoBikes?: Maybe<Array<{ __typename?: 'CargoBike', id: string, name: string }>>, timeFrames: Array<(
{ __typename?: 'TimeFrame' } { __typename?: 'TimeFrame' }
& TimeFrameFieldsForLendingStationFragment & 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> }> }
& LendingStationFieldsForTableFragment & LendingStationFieldsForTableFragment
); );
export type OrganisationFieldsGeneralFragment = { __typename?: 'Organisation', id: string, name: string, address?: Maybe<( export type OrganisationFieldsGeneralFragment = { __typename?: 'Organisation', id: string, name: string, associationNo?: Maybe<string>, address?: Maybe<(
{ __typename?: 'Address' } { __typename?: 'Address' }
& AddressFieldsFragment & AddressFieldsFragment
)> }; )> };
@ -2291,6 +2291,7 @@ export const OrganisationFieldsGeneralFragmentDoc = gql`
address { address {
...AddressFields ...AddressFields
} }
associationNo
} }
${AddressFieldsFragmentDoc}`; ${AddressFieldsFragmentDoc}`;
export const LendingStationFieldsForBikePageFragmentDoc = gql` export const LendingStationFieldsForBikePageFragmentDoc = gql`
@ -2652,6 +2653,15 @@ export const LendingStationFieldsForPageFragmentDoc = gql`
timeFrames { timeFrames {
...TimeFrameFieldsForLendingStation ...TimeFrameFieldsForLendingStation
} }
loanPeriod {
mo
tu
we
th
fr
sa
su
}
} }
${LendingStationFieldsForTableFragmentDoc} ${LendingStationFieldsForTableFragmentDoc}
${TimeFrameFieldsForLendingStationFragmentDoc}`; ${TimeFrameFieldsForLendingStationFragmentDoc}`;

Loading…
Cancel
Save