Specify a model while creating a VSP
[sdc.git] / openecomp-ui / src / sdc-app / onboarding / softwareProduct / creation / SoftwareProductCreation.js
index 539bc12..cccde78 100644 (file)
@@ -1,5 +1,6 @@
 /*!
  * Copyright © 2016-2018 European Support Limited
+ * Modifications Copyright (C) 2021 Nordix Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,7 +34,11 @@ export const mapStateToProps = ({
     archivedSoftwareProductList,
     softwareProductList,
     finalizedSoftwareProductList,
-    softwareProduct: { softwareProductCreation, softwareProductCategories }
+    softwareProduct: {
+        softwareProductCreation,
+        softwareProductCategories,
+        modelList
+    }
 }) => {
     let { genericFieldInfo, vendorList = [] } = softwareProductCreation;
     let isFormValid = ValidationHelper.checkFormValid(genericFieldInfo);
@@ -55,6 +60,7 @@ export const mapStateToProps = ({
         softwareProductCategories,
         finalizedLicenseModelList,
         vendorList,
+        modelList: modelList,
         isFormValid,
         formReady: softwareProductCreation.formReady,
         genericFieldInfo,
@@ -65,12 +71,13 @@ export const mapStateToProps = ({
 
 export const mapActionsToProps = dispatch => {
     return {
-        onDataChanged: (deltaData, formName, customValidations) =>
+        onDataChanged: (deltaData, formName, customValidations) => {
             ValidationHelper.dataChanged(dispatch, {
                 deltaData,
                 formName,
                 customValidations
-            }),
+            });
+        },
         onCancel: () => SoftwareProductCreationActionHelper.resetData(dispatch),
         onSubmit: (softwareProduct, usersList) => {
             SoftwareProductCreationActionHelper.resetData(dispatch);