Add timeFrames to lendingStation page

pull/8/head
Max Ehrlicher-Schmidt 4 years ago
parent faf13916ed
commit d7c332a501

@ -1,7 +1,9 @@
fragment ParticipantFieldsForBikePage on Participant {
id
start
end
dateRange {
from
to
}
usernamefLotte
usernameSlack
contactInformation {

@ -226,10 +226,14 @@ export class BikeComponent implements OnInit {
dataService: null,
columnInfo: [
{ dataPath: 'dateRange', translation: 'Zeitraum' },
{ dataPath: 'lendingStation.name', translation: 'Standort' },
{
dataPath: 'lendingStation.name',
translation: 'Standort',
link: (row) => '/lendingStation/' + row["lendingStation.id"],
},
],
editableReferences: false,
linkToTable: (element) => '/table/timeFrames',
linkToTable: () => '/table/timeFrames',
linkToTableParams: (bike) => {
return { filter: bike.name };
},
@ -237,7 +241,7 @@ export class BikeComponent implements OnInit {
];
headlineDataPath = 'name';
headlineIconName = 'directions_bike'
headlineIconName = 'directions_bike';
pageDataGQLType: string = 'CargoBike';
pageDataGQLUpdateInputType: string = 'CargoBikeUpdateInput';

@ -115,26 +115,6 @@ export class LendingStationComponent implements OnInit {
{ dataPath: 'contactInformationExtern.note', translation: 'Anmerkung' },
],
},
/*
{
type: 'ReferenceTable',
title: 'Equipment',
dataPath: 'equipment',
dataService: null,
columnInfo: [
{ dataPath: 'serialNo', translation: 'Seriennummer' },
{ dataPath: 'title', translation: 'Name' },
{ dataPath: 'description', translation: 'Beschreibung' },
],
nameToShowInSelection: (element) => {
return element.title + ' (' + element.serialNo + ')';
},
linkToTable: (element) => '/table/equipment',
linkToTableParams: (lendingStation) => {
return { filter: lendingStation.name };
},
propertyNameOfUpdateInput: 'equipmentIds',
},
{
type: 'ReferenceTable',
title: 'Zeitscheiben',
@ -142,14 +122,15 @@ export class LendingStationComponent implements OnInit {
dataService: null,
columnInfo: [
{ dataPath: 'dateRange', translation: 'Zeitraum' },
{ dataPath: 'lendingStation.name', translation: 'Standort' },
{ dataPath: 'cargoBike.name', translation: 'Lastenrad',
link: (row) => '/bike/' + row["cargoBike.id"], },
],
editableReferences: false,
linkToTable: (element) => '/table/timeFrames',
linkToTable: () => '/table/timeFrames',
linkToTableParams: (lendingStation) => {
return { filter: lendingStation.name };
},
},*/
},
];
headlineDataPath = 'name';
@ -161,11 +142,8 @@ export class LendingStationComponent implements OnInit {
constructor(
private lendingStationsService: LendingStationsService,
private contactInformationService: ContactInformationService
private contactInformationService: ContactInformationService,
) {
/*this.propertiesInfo.find(
(prop) => prop.dataPath === 'equipmentType'
).dataService = this.equipmentTypeService;*/
this.contactInformationService.loadTableData();
this.contactInformationService.tableData.subscribe((data) => {
this.propertiesInfo.find(

Loading…
Cancel
Save