EP & LKG sorting fix 54/70254/4
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Sun, 14 Oct 2018 11:10:54 +0000 (14:10 +0300)
committerEinav Keidar <einavw@amdocs.com>
Sun, 14 Oct 2018 14:25:49 +0000 (14:25 +0000)
Issue-ID: SDC-1833
Change-Id: Iffca952f923188983e79ecf45d3d9acab079ecf7
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupEditor.js
openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementEditor.js

index 997a6e0..c002d06 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * permissions and limitations under the License.
  */
 import { connect } from 'react-redux';
-
+import sortByStringProperty from 'nfvo-utils/sortByStringProperty.js';
 import FeatureGroupsActionHelper from './FeatureGroupsActionHelper.js';
 import FeatureGroupEditorView from './FeatureGroupEditorView.jsx';
 import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js';
+import { SORTING_PROPERTY_NAME } from 'sdc-app/onboarding/licenseModel/LicenseModelConstants.js';
 
 export const mapStateToProps = ({
     licenseModel: { featureGroup, entitlementPool, licenseKeyGroup }
@@ -58,8 +59,14 @@ export const mapStateToProps = ({
         data,
         previousData,
         selectedTab,
-        entitlementPoolsList,
-        licenseKeyGroupsList,
+        entitlementPoolsList: sortByStringProperty(
+            entitlementPoolsList,
+            SORTING_PROPERTY_NAME
+        ),
+        licenseKeyGroupsList: sortByStringProperty(
+            licenseKeyGroupsList,
+            SORTING_PROPERTY_NAME
+        ),
         isFormValid,
         formReady,
         genericFieldInfo,
index 735531a..c9d3e4c 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * permissions and limitations under the License.
  */
 import { connect } from 'react-redux';
+import sortByStringProperty from 'nfvo-utils/sortByStringProperty.js';
 import LicenseAgreementActionHelper from './LicenseAgreementActionHelper.js';
 import LicenseAgreementEditorView from './LicenseAgreementEditorView.jsx';
 import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js';
-
+import { SORTING_PROPERTY_NAME } from 'sdc-app/onboarding/licenseModel/LicenseModelConstants.js';
 export const mapStateToProps = ({
     licenseModel: { licenseAgreement, featureGroup }
 }) => {
@@ -60,7 +61,10 @@ export const mapStateToProps = ({
         data,
         previousData,
         selectedTab,
-        featureGroupsList,
+        featureGroupsList: sortByStringProperty(
+            featureGroupsList,
+            SORTING_PROPERTY_NAME
+        ),
         LANames,
         genericFieldInfo,
         isFormValid,