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 { fragment ParticipantFieldsForBikePage on Participant {
id id
start dateRange {
end from
to
}
usernamefLotte usernamefLotte
usernameSlack usernameSlack
contactInformation { contactInformation {

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

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

Loading…
Cancel
Save