Fix contact selection

master
Max 4 years ago
parent 5fe4bf643f
commit c9602a40ef

@ -357,7 +357,6 @@ export class TableComponent implements AfterViewInit {
}, },
}); });
dialogRef.afterClosed().subscribe((selectedObject) => { dialogRef.afterClosed().subscribe((selectedObject) => {
console.log(selectedObject);
if (selectedObject) { if (selectedObject) {
row[column.propertyNameOfReferenceId] = selectedObject.id; row[column.propertyNameOfReferenceId] = selectedObject.id;
const newObjectFlattened = flatten(selectedObject); const newObjectFlattened = flatten(selectedObject);

@ -27,8 +27,8 @@ export class ContactInformationComponent implements OnInit {
possibleObjects: [], possibleObjects: [],
nameToShowInSelection: (person) => person.firstName + ' ' + person.name, nameToShowInSelection: (person) => person.firstName + ' ' + person.name,
propertyPrefixToOverwrite: 'person', propertyPrefixToOverwrite: 'person',
currentlySelectedObjectId: (timeFrame) => { currentlySelectedObjectId: (contactInformation) => {
return timeFrame['cargoBike.id']; return contactInformation['person.id'];
}, },
propertyNameOfReferenceId: 'personId', propertyNameOfReferenceId: 'personId',
}, },

Loading…
Cancel
Save