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 {
...TimeFrameFieldsForLendingStation
}
# loanPeriod {
# generalRemark
# notes
# loanTimes
#}
loanPeriod {
mo
tu
we
th
fr
sa
su
}
}

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

@ -28,8 +28,27 @@ export class LendingStationComponent implements OnInit {
},
{
type: 'Group',
title: 'Öffnungszeiten',
properties: [],
title: 'Ausleihzeiten',
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',
@ -119,6 +138,21 @@ export class LendingStationComponent implements OnInit {
{ 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',
title: 'Zeitscheiben',

@ -2103,11 +2103,11 @@ 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> }> }
& 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' }
& AddressFieldsFragment
)> };
@ -2291,6 +2291,7 @@ export const OrganisationFieldsGeneralFragmentDoc = gql`
address {
...AddressFields
}
associationNo
}
${AddressFieldsFragmentDoc}`;
export const LendingStationFieldsForBikePageFragmentDoc = gql`
@ -2652,6 +2653,15 @@ export const LendingStationFieldsForPageFragmentDoc = gql`
timeFrames {
...TimeFrameFieldsForLendingStation
}
loanPeriod {
mo
tu
we
th
fr
sa
su
}
}
${LendingStationFieldsForTableFragmentDoc}
${TimeFrameFieldsForLendingStationFragmentDoc}`;

Loading…
Cancel
Save