From 5756bf37ba5014f8369ac1798559e83443e212c7 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 19 Aug 2020 21:13:16 +0300 Subject: [PATCH] Make edit buttons disabled for readOnly journals. --- src/Pim/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Pim/index.tsx b/src/Pim/index.tsx index 6c79709..32fe2f9 100644 --- a/src/Pim/index.tsx +++ b/src/Pim/index.tsx @@ -247,6 +247,10 @@ const CollectionRoutes = withStyles(styles)(withRouter( if (this.itemUndefined(itemUid)) { return PageNotFound(); } + const journalUid = (props.items[itemUid] as any).journalUid; + const syncJournal = this.props.syncInfo.get(journalUid)!; + const readOnly = syncJournal.journal.readOnly; + return (
@@ -266,7 +270,7 @@ const CollectionRoutes = withStyles(styles)(withRouter(