From 768f706f6f017ca605e0b292619e46b24fda1767 Mon Sep 17 00:00:00 2001
From: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Date: Thu, 18 Oct 2018 14:34:47 +0300
Subject: vendor view issues fix

Issue-ID: SDC-1850
Change-Id: I13f39b82ea152399ccd43914c893856bc6063cb1
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
---
 .../onboarding/onboard/workspace/WorkspaceView.jsx | 30 ++++++++--------------
 1 file changed, 10 insertions(+), 20 deletions(-)

(limited to 'openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx')

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}
             />
-- 
cgit 1.2.3-korg

