Merge pull request #160 from ramzan/hide-birthday-collection

Hide birthday collection when creating new events
master
Tom Hacohen 4 years ago committed by GitHub
commit 9e0b1efda9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,13 +60,19 @@ const itemsSelector = createSelector(
if (collectionInfo.type === "ADDRESS_BOOK") { if (collectionInfo.type === "ADDRESS_BOOK") {
addressBookItems = syncEntriesToItemMap(collectionInfo, syncEntries, addressBookItems); addressBookItems = syncEntriesToItemMap(collectionInfo, syncEntries, addressBookItems);
collectionsAddressBook.push(collectionInfo); if (!syncJournal.journal.readOnly) {
collectionsAddressBook.push(collectionInfo);
}
} else if (collectionInfo.type === "CALENDAR") { } else if (collectionInfo.type === "CALENDAR") {
calendarItems = syncEntriesToEventItemMap(collectionInfo, syncEntries, calendarItems); calendarItems = syncEntriesToEventItemMap(collectionInfo, syncEntries, calendarItems);
collectionsCalendar.push(collectionInfo); if (!syncJournal.journal.readOnly) {
collectionsCalendar.push(collectionInfo);
}
} else if (collectionInfo.type === "TASKS") { } else if (collectionInfo.type === "TASKS") {
taskListItems = syncEntriesToTaskItemMap(collectionInfo, syncEntries, taskListItems); taskListItems = syncEntriesToTaskItemMap(collectionInfo, syncEntries, taskListItems);
collectionsTaskList.push(collectionInfo); if (!syncJournal.journal.readOnly) {
collectionsTaskList.push(collectionInfo);
}
} }
} }
); );

@ -300,7 +300,7 @@ class EventEdit extends React.PureComponent<PropsType> {
<Select <Select
name="journalUid" name="journalUid"
value={this.state.journalUid} value={this.state.journalUid}
disabled={this.props.item !== undefined} disabled={this.props.item !== undefined && !this.props.duplicate}
onChange={this.handleInputChange} onChange={this.handleInputChange}
> >
{this.props.collections.map((x) => ( {this.props.collections.map((x) => (

Loading…
Cancel
Save