mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'application-mgt-new' into 'application-mgt-new'
Remove disabled lifecycle states in APPM publisher UI See merge request entgra/carbon-device-mgt!172
This commit is contained in:
commit
345125c042
@ -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 (
|
||||
<div>
|
||||
<Title level={4}>Manage Lifecycle</Title>
|
||||
@ -169,11 +174,9 @@ class LifeCycle extends React.Component {
|
||||
value={selectedValue}
|
||||
showSearch={true}
|
||||
>
|
||||
{
|
||||
Object.keys(lifecycle).map(lifecycleState => {
|
||||
{proceedingStates.map(lifecycleState => {
|
||||
return (
|
||||
<Option
|
||||
disabled={!(lifecycle[currentStatus].proceedingStates.includes(lifecycleState))}
|
||||
key={lifecycleState}
|
||||
value={lifecycleState}>
|
||||
{lifecycleState}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user