From 4aa2ea656f5dde4ed536d70700b56b9f8f17a0f7 Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Fri, 5 Jul 2019 16:47:59 +0530 Subject: [PATCH] Remove disabled lifecycle states in change lifecycle component --- .../src/components/apps/release/lifeCycle/LifeCycle.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/lifeCycle/LifeCycle.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/lifeCycle/LifeCycle.js index 1b4203daea..1d5fbcb427 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/lifeCycle/LifeCycle.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/components/apps/release/lifeCycle/LifeCycle.js @@ -148,6 +148,11 @@ class LifeCycle extends React.Component { render() { const {currentStatus, lifecycle, selectedStatus} = this.state; const selectedValue = selectedStatus == null ? [] : selectedStatus; + let proceedingStates = []; + if((lifecycle.hasOwnProperty(currentStatus)) && lifecycle[currentStatus].hasOwnProperty("proceedingStates")){ + proceedingStates = lifecycle[currentStatus].proceedingStates; + } + console.log(lifecycle); return (
Manage Lifecycle @@ -169,11 +174,9 @@ class LifeCycle extends React.Component { value={selectedValue} showSearch={true} > - { - Object.keys(lifecycle).map(lifecycleState => { + {proceedingStates.map(lifecycleState => { return (