From 39cb20484bbd81ead755f251b534f525c050f433 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Wed, 28 Jun 2017 21:59:09 +0200 Subject: [PATCH] no delete button or edit view for built-ins --- .../component/strategies/list-component.jsx | 2 +- .../strategies/strategy-details-component.jsx | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/src/component/strategies/list-component.jsx b/frontend/src/component/strategies/list-component.jsx index 3b9d417181..a56632a441 100644 --- a/frontend/src/component/strategies/list-component.jsx +++ b/frontend/src/component/strategies/list-component.jsx @@ -33,7 +33,7 @@ class StrategiesListComponent extends Component { {strategy.name} - removeStrategy(strategy)} /> + {strategy.editable === false ? '' : removeStrategy(strategy)} />} )) : No entries} diff --git a/frontend/src/component/strategies/strategy-details-component.jsx b/frontend/src/component/strategies/strategy-details-component.jsx index 6a879e5b7b..e538baa16b 100644 --- a/frontend/src/component/strategies/strategy-details-component.jsx +++ b/frontend/src/component/strategies/strategy-details-component.jsx @@ -60,21 +60,24 @@ export default class StrategyDetails extends Component { const tabContent = this.getTabContent(activeTabId); - return ( - + return ( - - this.goToTab('view')}>Details - this.goToTab('edit')}>Edit - + {strategy.editable === false ? '' : + this.goToTab('view')}> + Details + + this.goToTab('edit')}> + Edit + + } +
{tabContent}
-
- ); +
); } }