From cd7a5f2f9a58d79df35a0419776831d93be5f22b Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Mon, 28 Feb 2022 21:31:25 +0530 Subject: [PATCH] Federation zone count fixed (#1218) * federation zone count fixed --- src/pages/main/federation/reg/Fedaration.js | 2 +- src/services/modules/federation/federation.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/main/federation/reg/Fedaration.js b/src/pages/main/federation/reg/Fedaration.js index e8acf955f9..b3ffc8d5b6 100644 --- a/src/pages/main/federation/reg/Fedaration.js +++ b/src/pages/main/federation/reg/Fedaration.js @@ -29,7 +29,7 @@ class RegisterPartner extends React.Component { { field: fields.partnerCountryCode, selectField: fields.countryCode, label: 'Partner Country Code', formType: SELECT, placeholder: 'Select Partner Country Code', rules: { required: true }, visible: true, update: { key: true }, tip: 'Country where operator platform is located' }, { field: fields.partnerFederationId, label: 'Partner Federation ID', formType: INPUT, placeholder: 'Enter Partner Federation ID', visible: true, rules: { required: true }, tip: 'Globally unique string used to indentify a federation with partner federation' }, { field: fields.partnerFederationAddr, label: 'Partner Federation Addr', formType: INPUT, placeholder: 'Enter Partner Federation Addr', rules: { required: true }, visible: true, tip: 'Globally unique string used to indentify a federation with partner federation' }, - { field: fields.partnerAPIKey, label: 'Partner API Key', formType: INPUT, placeholder: 'Enter Partner API Key', rules: { required: true }, visible: true, tip: 'API Key used for authentication (stored in secure storage)' }, + { field: fields.partnerAPIKey, label: 'Partner API Key', formType: INPUT, placeholder: 'Enter Partner API Key', rules: { required: true, type:'password' }, visible: true, tip: 'API Key used for authentication (stored in secure storage)' }, { field: fields.partnerFederationName, label: 'Federation Name', formType: INPUT, placeholder: 'Enter Partner Federation Name', rules: { required: true }, visible: true, tip: 'Name to uniquely identify a federation' } ] } diff --git a/src/services/modules/federation/federation.js b/src/services/modules/federation/federation.js index 6942153a7e..ebd78aae43 100644 --- a/src/services/modules/federation/federation.js +++ b/src/services/modules/federation/federation.js @@ -3,7 +3,6 @@ import * as formatter from '../../model/format' import { authSyncRequest, responseValid } from '../../service'; import { endpoint, perpetual } from '../../../helper/constant' import { redux_org } from '../../../helper/reduxData' -import { operatorRoles } from '../../../constant'; import { unionBy } from 'lodash'; let fields = formatter.fields @@ -69,6 +68,7 @@ export const multiDataRequest = (keys, mcList) => { zoneList = data } } + if (federatorList && federatorList.length > 0) { for (let federator of federatorList) { for (let federation of federationList) { @@ -85,7 +85,7 @@ export const multiDataRequest = (keys, mcList) => { } federator[fields.zones] = [] for (let zone of zoneList) { - if (federator[fields.partnerFederationName] === zone[fields.partnerFederationName] && federator[fields.operatorName] === zone[fields.operatorName] && federator[fields.partnerOperatorName] === zone[fields.partnerOperatorName]) { + if (federator[fields.partnerFederationName] === zone[fields.partnerFederationName] && federator[fields.operatorName] === zone[fields.operatorName]) { federator[fields.zones].push({ ...zone, registered: zone[fields.registered] ? perpetual.YES : perpetual.NO }) } }