From 593e30ad772c98a25558ab9f4a9e3b0859817f3c Mon Sep 17 00:00:00 2001 From: Ramzan Date: Wed, 19 Aug 2020 18:14:32 -0400 Subject: [PATCH 1/2] Hide read only journals when creating/editing an item --- src/Pim/index.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Pim/index.tsx b/src/Pim/index.tsx index 32fe2f9..cbc8dc1 100644 --- a/src/Pim/index.tsx +++ b/src/Pim/index.tsx @@ -60,13 +60,19 @@ const itemsSelector = createSelector( if (collectionInfo.type === "ADDRESS_BOOK") { addressBookItems = syncEntriesToItemMap(collectionInfo, syncEntries, addressBookItems); - collectionsAddressBook.push(collectionInfo); + if (!syncJournal.journal.readOnly) { + collectionsAddressBook.push(collectionInfo); + } } else if (collectionInfo.type === "CALENDAR") { calendarItems = syncEntriesToEventItemMap(collectionInfo, syncEntries, calendarItems); - collectionsCalendar.push(collectionInfo); + if (!syncJournal.journal.readOnly) { + collectionsCalendar.push(collectionInfo); + } } else if (collectionInfo.type === "TASKS") { taskListItems = syncEntriesToTaskItemMap(collectionInfo, syncEntries, taskListItems); - collectionsTaskList.push(collectionInfo); + if (!syncJournal.journal.readOnly) { + collectionsTaskList.push(collectionInfo); + } } } ); From 109013e9ec2f6126624344657fa91cd14f105ac9 Mon Sep 17 00:00:00 2001 From: Ramzan Date: Thu, 20 Aug 2020 17:04:11 -0400 Subject: [PATCH 2/2] EventEdit: allow changing calendar when duplicating event --- src/components/EventEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/EventEdit.tsx b/src/components/EventEdit.tsx index 372d761..139e7c2 100644 --- a/src/components/EventEdit.tsx +++ b/src/components/EventEdit.tsx @@ -300,7 +300,7 @@ class EventEdit extends React.PureComponent {