Skip to content

Commit

Permalink
Fix for Next Button is inactive state while updating Orderer Organiza…
Browse files Browse the repository at this point in the history
…tion (#526)

* Updated logic for noAdminError to enable the next button after clicking back button during create channel wizard
* updated the lint warning
---------
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
Co-authored-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
  • Loading branch information
selvaprakash92 authored Sep 12, 2023
1 parent a11a37a commit 60c486d
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,21 @@ import Form from '../../../Form/Form';
import SidePanelWarning from '../../../SidePanelWarning/SidePanelWarning';

const SCOPE = 'channelModal';

let hasAdmin = false;
// This is step "channel_orderer_organizations"
//
// this panel allows selecting the orderer orgs in the config-block and which one's get the admin role
// (only used for osn admin nodes)
export class OrdererOrganizations extends Component {
componentDidMount() {
this.props.updateState(SCOPE, {
noAdminError: 'no_admin_error',
noOrderersError: false
});
if (!hasAdmin)
{
this.props.updateState(SCOPE, {
noAdminError: 'no_admin_error',
noOrderersError: false
});
}

}

// user added a new msp/org
Expand Down Expand Up @@ -99,7 +103,7 @@ export class OrdererOrganizations extends Component {
};

checkAdminCount(selected_ordering_orgs) {
let hasAdmin = false;
hasAdmin = false;
if (selected_ordering_orgs) {
selected_ordering_orgs.forEach(org => {
if (org.msp_id !== '' && org.roles.includes('admin')) {
Expand Down

0 comments on commit 60c486d

Please sign in to comment.