diff options
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding')
4 files changed, 35 insertions, 42 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx b/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx index 245dd2b55c..a73501468c 100644 --- a/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx @@ -232,12 +232,13 @@ export default class OnboardingPunchOut { softwareProductScreen === enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS ) { - softwareProduct = vspData; + softwareProduct = { ...vspData }; //check current vsp fields to determine which file has uploaded + if ( - vspData.onboardingOrigin === + vspData.onboardingOrigin.toLowerCase() === onboardingOriginTypes.ZIP || - vspData.candidateOnboardingOrigin === + vspData.candidateOnboardingOrigin.toLowerCase() === onboardingOriginTypes.ZIP ) { softwareProductScreen = diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js index e07777f69e..5d425a8aa4 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js @@ -124,46 +124,37 @@ export default { }); }, - saveLicenseAgreement( + async saveLicenseAgreement( dispatch, { licenseModelId, previousLicenseAgreement, licenseAgreement, version } ) { if (previousLicenseAgreement) { - return putLicenseAgreement( + await putLicenseAgreement( licenseModelId, previousLicenseAgreement, licenseAgreement, version - ).then(() => { - this.fetchLicenseAgreementList(dispatch, { - licenseModelId, - version - }); - return ItemsHelper.checkItemStatus(dispatch, { - itemId: licenseModelId, - versionId: version.id - }); - }); + ); } else { - return postLicenseAgreement( + await postLicenseAgreement( licenseModelId, licenseAgreement, version - ).then(() => { - this.fetchLicenseAgreementList(dispatch, { - licenseModelId, - version - }); - FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, { - licenseModelId, - version - }); - return ItemsHelper.checkItemStatus(dispatch, { - itemId: licenseModelId, - versionId: version.id - }); - }); + ); } + await this.fetchLicenseAgreementList(dispatch, { + licenseModelId, + version + }); + await FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, { + licenseModelId, + version + }); + + return ItemsHelper.checkItemStatus(dispatch, { + itemId: licenseModelId, + versionId: version.id + }); }, deleteLicenseAgreement( diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterComponents.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterComponents.jsx index b114941a3c..6a4760afdf 100644 --- a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterComponents.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterComponents.jsx @@ -16,7 +16,11 @@ import React from 'react'; import Input from 'nfvo-components/input/validation/Input.jsx'; import i18n from 'nfvo-utils/i18n/i18n.js'; -import { itemStatus } from 'sdc-app/common/helpers/ItemsHelperConstants.js'; +import { + itemStatus, + itemPermissions, + itemOnboardingProcedure +} from 'sdc-app/common/helpers/ItemsHelperConstants.js'; import Accordion from 'sdc-ui/lib/react/Accordion.js'; import Checklist from 'sdc-ui/lib/react/Checklist.js'; import Checkbox from 'sdc-ui/lib/react/Checkbox.js'; @@ -102,13 +106,13 @@ export const Permissions = ({ data, onDataChanged }) => { { label: i18n('Owner'), dataTestId: 'catalog-filter-permission-owner', - value: 'Owner', + value: itemPermissions.OWNER, checked: data.permission && data.permission.Owner }, { label: i18n('Contributor'), dataTestId: 'catalog-filter-permission-contributor', - value: 'Contributor', + value: itemPermissions.CONTRIBUTOR, checked: data.permission && data.permission.Contributor } ]; @@ -130,14 +134,14 @@ export const OnboardingProcedure = ({ data, onDataChanged }) => { { label: i18n('Network Package'), dataTestId: 'catalog-filter-procedure-network', - value: 'NetworkPackage', + value: itemOnboardingProcedure.NETWORK, checked: data.onboardingMethod && data.onboardingMethod.NetworkPackage }, { label: i18n('Manual'), dataTestId: 'catalog-filter-procedure-manual', - value: 'Manual', + value: itemOnboardingProcedure.MANUAL, checked: data.onboardingMethod && data.onboardingMethod.Manual } ]; diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx index 08145be9c7..814f9b38e0 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx @@ -53,6 +53,7 @@ class HeatScreenView extends Component { onboardingOrigin, activeTab, setActiveTab, + goToOverview, ...other } = this.props; @@ -82,17 +83,13 @@ class HeatScreenView extends Component { /> )} {activeTab === tabsMapping.VALIDATION && - softwareProductId && ( + softwareProductId && + goToOverview && ( <Button btnType="secondary" data-test-id="go-to-overview" - disabled={this.props.goToOverview !== true} className="go-to-overview-btn" - onClick={ - this.props.goToOverview - ? () => onGoToOverview({ version }) - : undefined - }> + onClick={() => onGoToOverview({ version })}> {i18n('GO TO OVERVIEW')} </Button> )} |