From dab18611013f7ce6499f1f18dce638bbd9f9b7ef Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 11 Dec 2020 16:42:23 +0100 Subject: [PATCH] Add engagements to bike --- .../pages/dataPages/bike/bike.component.ts | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/app/pages/dataPages/bike/bike.component.ts b/src/app/pages/dataPages/bike/bike.component.ts index f0c7d8b..edbd52a 100644 --- a/src/app/pages/dataPages/bike/bike.component.ts +++ b/src/app/pages/dataPages/bike/bike.component.ts @@ -170,7 +170,10 @@ export class BikeComponent implements OnInit { dataPath: 'provider.privatePerson.person.firstName', translation: 'Vorname', }, - { dataPath: 'provider.privatePerson.person.name', translation: 'Nachname' }, + { + dataPath: 'provider.privatePerson.person.name', + translation: 'Nachname', + }, { dataPath: 'provider.privatePerson.email', translation: 'Email', @@ -220,7 +223,10 @@ export class BikeComponent implements OnInit { }, }, { dataPath: 'lendingStation.address.street', translation: 'Straße' }, - { dataPath: 'lendingStation.address.number', translation: 'Hausnummer' }, + { + dataPath: 'lendingStation.address.number', + translation: 'Hausnummer', + }, { dataPath: 'lendingStation.address.zip', translation: 'PLZ' }, { dataPath: 'lendingStation.address.city', translation: 'Ort' }, ], @@ -288,6 +294,39 @@ export class BikeComponent implements OnInit { return { filter: bike.name }; }, }, + { + type: 'ReferenceTable', + title: 'Engagements', + dataPath: 'engagements', + dataService: null, + columnInfo: [ + { + dataPath: 'engagementType.name', + translation: 'Engagementtyp', + }, + { + dataPath: 'engagementType.description', + translation: 'Engagementtyp Erklärung', + }, + { dataPath: 'dateRange', translation: 'Zeitraum' }, + { + dataPath: 'participant.contactInformation.person.firstName', + translation: 'Aktiver Vorname', + }, + { + dataPath: 'participant.contactInformation.person.name', + translation: 'Aktiver Nachname', + link: (row: any) => { + return '/participant/' + row['participant.id']; + }, + }, + ], + editableReferences: false, + linkToTable: () => '/table/engagements', + linkToTableParams: (bike) => { + return { filter: bike.name }; + }, + }, ]; headlineDataPath = 'name';