diff options
author | 2021-02-12 13:53:13 +0100 | |
---|---|---|
committer | 2021-02-17 15:43:47 +0000 | |
commit | f2c0a4118c3c0b6360b639622766543bd754b59c (patch) | |
tree | 19e8aa82bc11dd1be0d487dde833cbaa33d69cfd /openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js | |
parent | 7f418398a37283d68c0fc934e0e4a91f529fe466 (diff) |
Creation of Vendor Licensing Model is an optional step in VSP onboarding
Issue-ID: SDC-3471
Signed-off-by: JerzySzachniewicz <jerzy.szachniewicz@nokia.com>
Change-Id: Icb98d0832c49939e200ece77f4ca26744cb82222
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js index 52a69803a6..5dc0aab0d7 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js @@ -75,14 +75,32 @@ export const mapStateToProps = ({ }; }; +function handleScreenChange(softwareProduct, dispatch, version) { + const softwareProductId = softwareProduct.id; + if (softwareProduct.licenseType === 'INTERNAL') { + ScreensHelper.loadScreen(dispatch, { + screen: enums.SCREEN.SOFTWARE_PRODUCT_DETAILS, + screenType: screenTypes.SOFTWARE_PRODUCT, + props: { softwareProductId, version } + }); + } else { + ScreensHelper.loadScreen(dispatch, { + screen: enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE, + screenType: screenTypes.SOFTWARE_PRODUCT, + props: { softwareProductId, version } + }); + } +} + const mapActionsToProps = (dispatch, { version }) => { return { - onDetailsSelect: ({ id: softwareProductId }) => - ScreensHelper.loadScreen(dispatch, { - screen: enums.SCREEN.SOFTWARE_PRODUCT_DETAILS, - screenType: screenTypes.SOFTWARE_PRODUCT, - props: { softwareProductId, version } - }), + onLicenseChange: softwareProduct => { + SoftwareProductActionHelper.updateSoftwareProductData(dispatch, { + softwareProduct, + version + }).then(() => {}); + handleScreenChange(softwareProduct, dispatch, version); + }, onCandidateInProcess: softwareProductId => ScreensHelper.loadScreen(dispatch, { screen: enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS_SETUP, |