diff options
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/onboard/workspace')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx index bef88df14d..8cc396f6fc 100644 --- a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx @@ -17,7 +17,6 @@ import React from 'react'; import DetailsCatalogView from '../DetailsCatalogView.jsx'; import i18n from 'nfvo-utils/i18n/i18n.js'; import { tabsMapping } from 'sdc-app/onboarding/onboard/OnboardConstants.js'; -import { tabsMapping as catalogTabsMappping } from '../onboardingCatalog/OnboardingCatalogConstants.js'; const WorkspaceView = props => { let { @@ -28,10 +27,13 @@ const WorkspaceView = props => { onSelectSoftwareProduct, searchValue, onMigrate, - catalogActiveTab, - filteredItems: { vspList, vlmList } + filteredItems: { vspList, vlmList }, + isArchived } = props; - + const handleSelectVSP = (item, users) => + onSelectSoftwareProduct(item, users, tabsMapping.WORKSPACE); + const handleSelectVLM = (item, users) => + onSelectLicenseModel(item, users, tabsMapping.WORKSPACE); return ( <div className="catalog-wrapper workspace-view"> <div className="catalog-header workspace-header"> @@ -41,22 +43,10 @@ const WorkspaceView = props => { VLMList={vlmList} VSPList={vspList} users={users} - onAddVLM={ - catalogActiveTab === catalogTabsMappping.ACTIVE - ? onAddLicenseModelClick - : undefined - } - onAddVSP={ - catalogActiveTab === catalogTabsMappping.ACTIVE - ? onAddSoftwareProductClick - : undefined - } - onSelectVLM={(item, users) => - onSelectLicenseModel(item, users, tabsMapping.WORKSPACE) - } - onSelectVSP={(item, users) => - onSelectSoftwareProduct(item, users, tabsMapping.WORKSPACE) - } + onAddVLM={!isArchived ? onAddLicenseModelClick : undefined} + onAddVSP={!isArchived ? onAddSoftwareProductClick : undefined} + onSelectVLM={handleSelectVLM} + onSelectVSP={handleSelectVSP} onMigrate={onMigrate} filter={searchValue} /> |