Fix license fields disabled 37/123237/3
authorsebdet <sebastien.determe@intl.att.com>
Wed, 11 Aug 2021 09:20:05 +0000 (11:20 +0200)
committerMichael Morris <michael.morris@est.tech>
Thu, 12 Aug 2021 09:07:57 +0000 (09:07 +0000)
The license fields are disabled in the VSP settings when the external license feature is disabled and when the user click on the general tab just after the ZIP validation to define the license fields.

Issue-ID: SDC-3663
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I73528bc44552ee0bc1f373cacf5318691ffc2712

openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsView.jsx

index d24916f..185617e 100644 (file)
@@ -255,7 +255,8 @@ class LicensesSection extends React.Component {
                         label={i18n('Licensing Version')}
                         disabled={
                             this.props.isVendorArchived ||
-                            this.props.licenseType !== 'INTERNAL'
+                            (typeof this.props.licenseType !== 'undefined' &&
+                                this.props.licenseType !== 'INTERNAL')
                         }
                         type="select">
                         {this.props.licensingVersionsList.map(version => (
@@ -272,7 +273,8 @@ class LicensesSection extends React.Component {
                         type="select"
                         disabled={
                             this.props.isVendorArchived ||
-                            this.props.licenseType !== 'INTERNAL'
+                            (typeof this.props.licenseType !== 'undefined' &&
+                                this.props.licenseType !== 'INTERNAL')
                         }
                         value={
                             this.props.licensingData.licenseAgreement
@@ -299,7 +301,9 @@ class LicensesSection extends React.Component {
                             onInputChange={() => {}}
                             disabled={
                                 this.props.isVendorArchived ||
-                                this.props.licenseType !== 'INTERNAL'
+                                (typeof this.props.licenseType !==
+                                    'undefined' &&
+                                    this.props.licenseType !== 'INTERNAL')
                             }
                             onEnumChange={featureGroups =>
                                 this.props.onFeatureGroupsChanged({