|
|
@ -102,6 +102,7 @@ const CollectionRoutes = withRouter(
|
|
|
|
componentView: any,
|
|
|
|
componentView: any,
|
|
|
|
items: {[key: string]: any},
|
|
|
|
items: {[key: string]: any},
|
|
|
|
onItemSave: (item: Object, journalUid: string, originalContact?: Object) => void;
|
|
|
|
onItemSave: (item: Object, journalUid: string, originalContact?: Object) => void;
|
|
|
|
|
|
|
|
onItemCancel: () => void;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
@ -130,6 +131,7 @@ const CollectionRoutes = withRouter(
|
|
|
|
item={props.items[match.params.itemUid]}
|
|
|
|
item={props.items[match.params.itemUid]}
|
|
|
|
collections={props.collections}
|
|
|
|
collections={props.collections}
|
|
|
|
onSave={props.onItemSave}
|
|
|
|
onSave={props.onItemSave}
|
|
|
|
|
|
|
|
onCancel={props.onItemCancel}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Container>
|
|
|
|
</Container>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
@ -197,6 +199,7 @@ class Pim extends React.PureComponent {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
this.onEventSave = this.onEventSave.bind(this);
|
|
|
|
this.onEventSave = this.onEventSave.bind(this);
|
|
|
|
this.onContactSave = this.onContactSave.bind(this);
|
|
|
|
this.onContactSave = this.onContactSave.bind(this);
|
|
|
|
|
|
|
|
this.onCancel = this.onCancel.bind(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onEventSave(event: EventType, journalUid: string, originalEvent?: EventType) {
|
|
|
|
onEventSave(event: EventType, journalUid: string, originalEvent?: EventType) {
|
|
|
@ -233,6 +236,10 @@ class Pim extends React.PureComponent {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onCancel() {
|
|
|
|
|
|
|
|
this.props.history.goBack();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { collectionsAddressBook, collectionsCalendar, addressBookItems, calendarItems } = itemsSelector(this.props);
|
|
|
|
const { collectionsAddressBook, collectionsCalendar, addressBookItems, calendarItems } = itemsSelector(this.props);
|
|
|
|
|
|
|
|
|
|
|
@ -260,6 +267,7 @@ class Pim extends React.PureComponent {
|
|
|
|
componentEdit={ContactEdit}
|
|
|
|
componentEdit={ContactEdit}
|
|
|
|
componentView={Contact}
|
|
|
|
componentView={Contact}
|
|
|
|
onItemSave={this.onContactSave}
|
|
|
|
onItemSave={this.onContactSave}
|
|
|
|
|
|
|
|
onItemCancel={this.onCancel}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -274,6 +282,7 @@ class Pim extends React.PureComponent {
|
|
|
|
componentEdit={EventEdit}
|
|
|
|
componentEdit={EventEdit}
|
|
|
|
componentView={Event}
|
|
|
|
componentView={Event}
|
|
|
|
onItemSave={this.onEventSave}
|
|
|
|
onItemSave={this.onEventSave}
|
|
|
|
|
|
|
|
onItemCancel={this.onCancel}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|