From 39cb20484bbd81ead755f251b534f525c050f433 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Wed, 28 Jun 2017 21:59:09 +0200 Subject: [PATCH 1/2] 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}
-
- ); +
); } } From e8965398e669e8232d3e6682f426b8acb441a685 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Thu, 29 Jun 2017 09:11:28 +0200 Subject: [PATCH 2/2] fix lint --- .../component/strategies/list-component.jsx | 6 +++- .../strategies/strategy-details-component.jsx | 30 +++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/frontend/src/component/strategies/list-component.jsx b/frontend/src/component/strategies/list-component.jsx index a56632a441..8cd20d985e 100644 --- a/frontend/src/component/strategies/list-component.jsx +++ b/frontend/src/component/strategies/list-component.jsx @@ -33,7 +33,11 @@ class StrategiesListComponent extends Component { {strategy.name} - {strategy.editable === false ? '' : 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 e538baa16b..007776aa7c 100644 --- a/frontend/src/component/strategies/strategy-details-component.jsx +++ b/frontend/src/component/strategies/strategy-details-component.jsx @@ -61,23 +61,23 @@ export default class StrategyDetails extends Component { const tabContent = this.getTabContent(activeTabId); return ( - - - {strategy.editable === false ? '' : - this.goToTab('view')}> + + + {strategy.editable === false ? '' : + this.goToTab('view')}> Details - - this.goToTab('edit')}> + + this.goToTab('edit')}> Edit - - } + + } -
-
- {tabContent} -
-
-
-
); +
+
+ {tabContent} +
+
+ + ); } }