From a17c3c09630e04ae06347b2fc9a2e74dbd2bfbff Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Mon, 7 Feb 2022 19:46:45 +0530 Subject: [PATCH] Federation mnc not set (#1195) --- src/pages/main/federation/reg/Fedaration.js | 18 ++---------------- src/pages/main/federation/reg/Federator.js | 14 +++----------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/pages/main/federation/reg/Fedaration.js b/src/pages/main/federation/reg/Fedaration.js index 7247d90fde..2c3cf8706d 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.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.federationAddr, 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.apiKey, 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.partnerFederationName, label: 'Federation Name', formType: INPUT, placeholder: 'Enter Partner Fderation Name', rules: { required: true }, visible: true, tip: 'Name to uniquely identify a federation' } + { 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' } ] } @@ -107,21 +107,7 @@ class RegisterPartner extends React.Component { } getFormData = () => { - // const { data } = this.props - let data = {} - data[fields.federationId] = '58ufic22-hfj9-8ghv-85uj-tfk2vh32sks' - data[fields.region] = 'EU' - data[fields.countryCode] = 'ES' - data[fields.operatorName] = 'TFK-4455-jgl' - data[fields.mnc] = ['05'] - data[fields.mcc] = 214 - data[fields.partnerOperatorName] = 'SGT-1234-xyz' - data[fields.partnerFederationId] = '85fff032-des3-58g8-jf83-sgt38ds87b9' - data[fields.partnerFederationName] = 'access-singtel-zones' - data[fields.federationAddr] = 'https://api.rh.bridgealliance.com/v6' - data[fields.apiKey] = 'L3EDPsNiNY6nplzX6RrAI8BLjmlvHsCn1fYb87ml' - data[fields.partnerCountryCode] = 'SG' - + const { data } = this.props let forms = this.elements() forms.push( diff --git a/src/pages/main/federation/reg/Federator.js b/src/pages/main/federation/reg/Federator.js index 503924b053..ff52063462 100644 --- a/src/pages/main/federation/reg/Federator.js +++ b/src/pages/main/federation/reg/Federator.js @@ -55,7 +55,7 @@ class RegisterOperator extends React.Component { return [ { label: `${this.isUpdate ? 'Update' : 'Enter'} Operator Details`, formType: MAIN_HEADER, visible: true }, { field: fields.region, label: 'Region', formType: SELECT, placeholder: 'Select Region', rules: { required: true }, visible: true, update: { key: true } }, - { field: fields.operatorName, label: 'Operator', formType: this.isUpdate || redux_org.nonAdminOrg(this) ? INPUT : SELECT, placeholder: 'Enter Partner Operator', rules: { required: true, disabled: !redux_org.isAdmin(this) }, visible: true, value: redux_org.nonAdminOrg(this), tip: 'Organization of the federation site', update: { key: true } }, + { field: fields.operatorName, label: 'Operator', formType: this.isUpdate || redux_org.nonAdminOrg(this) ? INPUT : SELECT, placeholder: 'Select Operator', rules: { required: true, disabled: !redux_org.isAdmin(this) }, visible: true, value: redux_org.nonAdminOrg(this), tip: 'Organization of the federation site', update: { key: true } }, { field: fields.countryCode, label: ' Country Code', formType: INPUT, placeholder: 'Enter Country Code', rules: { required: true }, visible: true, tip: 'ISO 3166-1 Alpha-2 code for the country where operator platform is located' }, { field: fields.federationId, label: 'Federation ID', formType: INPUT, placeholder: 'Enter Federation ID', visible: true, tip: 'Globally unique string used to indentify a federation with partner federation' }, { field: fields.locatorendpoint, label: 'Locator End Point', formType: INPUT, placeholder: 'Enter Locator Endpoint', visible: true, update: { edit: true }, tip: 'IP and Port of discovery service URL of operator platform' }, @@ -106,7 +106,7 @@ class RegisterOperator extends React.Component { let uuid = form.uuid; let multiFormData = data[uuid] if (multiFormData) { - if (form.field === fields.mnc) { + if (form.field === fields.mncmulti) { mncList.push(multiFormData[fields.mnc]) } } @@ -197,15 +197,7 @@ class RegisterOperator extends React.Component { } getFormData = async () => { - // const { data } = this.props - let data = {} - data[fields.federationId] = '58ufic22-hfj9-8ghv-85uj-tfk2vh32sks' - data[fields.region] = 'EU' - data[fields.countryCode] = 'ES' - data[fields.operatorName] = 'TFK-4455-jgl' - data[fields.mnc] = ['05'] - data[fields.mcc] = "214" - + const { data } = this.props let forms = this.elements() if (data) { this.loadDefaultData(forms, data)