From 280f8015d06af1f41a3ef12e8300801c7a5e0d54 Mon Sep 17 00:00:00 2001 From: AviZi Date: Fri, 9 Jun 2017 02:39:56 +0300 Subject: [SDC-29] Amdocs OnBoard 1707 initial commit. Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi --- .../OnboardingCatalogActionHelper.js | 85 +++++++++++++++++++ .../OnboardingCatalogConstants.js | 50 +++++++++++ .../onboardingCatalog/OnboardingCatalogReducer.js | 30 +++++++ .../onboardingCatalog/OnboardingCatalogUtils.js | 21 +++++ .../onboardingCatalog/OnboardingCatalogView.jsx | 98 ++++++++++++++++++++++ .../onboard/onboardingCatalog/Tooltip.jsx | 24 ++++++ .../onboard/onboardingCatalog/VSPOverlay.jsx | 50 +++++++++++ .../onboardingCatalog/VendorCatalogReducer.js | 38 +++++++++ .../onboardingCatalog/VendorCatalogView.jsx | 74 ++++++++++++++++ .../onboard/onboardingCatalog/VendorItem.jsx | 96 +++++++++++++++++++++ 10 files changed, 566 insertions(+) create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/Tooltip.jsx create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VSPOverlay.jsx create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogReducer.js create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx create mode 100644 openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx (limited to 'openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog') diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js new file mode 100644 index 0000000000..73a447558d --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogActionHelper.js @@ -0,0 +1,85 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import React from 'react'; +import i18n from 'nfvo-utils/i18n/i18n.js'; +import {actionTypes} from './OnboardingCatalogConstants.js'; +import {actionTypes as modalActionTypes} from 'nfvo-components/modal/GlobalModalConstants.js'; +import {statusEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js'; +import VersionControllerUtils from 'nfvo-components/panel/versionController/VersionControllerUtils.js'; +import OnboardActionHelper from '../OnboardActionHelper.js'; +import SoftwareProductActionHelper from 'sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js'; + + +function getMessageForMigration(name) { + return ( +
+
{i18n('{name} needs to be updated. Click ‘Checkout & Update’, to proceed.',{name})}
+
{i18n('Please don’t forget to submit afterwards')}
+
+ ); +} + +const OnboardingCatalogActionHelper = { + changeVspOverlay(dispatch, vendor) { + dispatch({ + type: actionTypes.CHANGE_VSP_OVERLAY, + vendorId: vendor ? vendor.id : null + }); + }, + closeVspOverlay(dispatch) { + dispatch({ + type: actionTypes.CLOSE_VSP_OVERLAY + }); + }, + changeActiveTab(dispatch, activeTab) { + OnboardActionHelper.clearSearchValue(dispatch); + dispatch({ + type: actionTypes.CHANGE_ACTIVE_CATALOG_TAB, + activeTab + }); + }, + onVendorSelect(dispatch, {vendor}) { + OnboardActionHelper.clearSearchValue(dispatch); + dispatch({ + type: actionTypes.ONBOARDING_CATALOG_OPEN_VENDOR_PAGE, + selectedVendor: vendor + }); + }, + onMigrate(dispatch, softwareProduct) { + const {status, name, lockingUser} = softwareProduct; + if (status === statusEnum.CHECK_OUT_STATUS && !VersionControllerUtils.isCheckedOutByCurrentUser(softwareProduct)) { + dispatch({ + type: modalActionTypes.GLOBAL_MODAL_WARNING, + data: { + title: 'WARNING', + msg: i18n('{name} is locked by user {lockingUser} for self-healing',{name, lockingUser}) + } + }); + } else { + dispatch({ + type: modalActionTypes.GLOBAL_MODAL_WARNING, + data:{ + title: 'WARNING', + msg: getMessageForMigration(softwareProduct.name.toUpperCase()), + confirmationButtonText: i18n('Checkout & Update'), + onConfirmed: ()=>SoftwareProductActionHelper.migrateSoftwareProduct(dispatch, {softwareProduct}) + } + }); + } + } +}; + +export default OnboardingCatalogActionHelper; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js new file mode 100644 index 0000000000..071160c4fd --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js @@ -0,0 +1,50 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import keyMirror from 'nfvo-utils/KeyMirror.js'; + +export const catalogItemTypes = Object.freeze({ + LICENSE_MODEL: 'license-model', + SOFTWARE_PRODUCT: 'software-product' +}); + +export const catalogItemTypeClasses = { + LICENSE_MODEL: 'license-model-type', + SOFTWARE_PRODUCT: 'software-product-type', + VENDOR: 'vendor-type' + +}; + +export const modalMapper = { + 'license-model': 'LICENSE_MODEL', + 'software-product': 'SOFTWARE_PRODUCT' +}; + +export const tabsMapping = { + 'BY_VENDOR': 1, + 'ALL': 2 +}; + +export const migrationStatusMapper = { + OLD_VERSION: 'True', +}; + +export const actionTypes = keyMirror({ + ONBOARDING_CATALOG_OPEN_VENDOR_PAGE: null, + CHANGE_ACTIVE_CATALOG_TAB: null, + CHANGE_SEARCH_VALUE: null, + CHANGE_VSP_OVERLAY: null, + CLOSE_VSP_OVERLAY: null +}); diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js new file mode 100644 index 0000000000..d7d9d0bd6c --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js @@ -0,0 +1,30 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import {actionTypes, tabsMapping} from './OnboardingCatalogConstants.js'; +import {combineReducers} from 'redux'; +import vendorCatalogReducer from './VendorCatalogReducer.js'; + +const onboardingCatalogReducer = combineReducers({ + vendorCatalog: vendorCatalogReducer, + activeTab: (state = tabsMapping.ALL, action) => action.type === actionTypes.CHANGE_ACTIVE_CATALOG_TAB ? action.activeTab : state +}); + +export default (state, action) => { + if (action.type === actionTypes.RESET_ONBOARDING_CATALOG_STORE) { + state = undefined; + } + return onboardingCatalogReducer(state, action); +}; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js new file mode 100644 index 0000000000..ac623db920 --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogUtils.js @@ -0,0 +1,21 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import {catalogItemTypes} from './OnboardingCatalogConstants.js'; + +export const filterCatalogItemsByType = (items, type, filter) => { + const fieldName = type === catalogItemTypes.LICENSE_MODEL ? 'vendorName' : 'name'; + return items.filter(item => item[fieldName].toLowerCase().indexOf(filter.toLowerCase()) > -1); +}; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx new file mode 100644 index 0000000000..b1f002d2fb --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx @@ -0,0 +1,98 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import React from 'react'; +import i18n from 'nfvo-utils/i18n/i18n.js'; +import classnames from 'classnames'; +import DetailsCatalogView from 'sdc-app/onboarding/onboard/DetailsCatalogView.jsx'; +import VendorCatalogView from './VendorCatalogView.jsx'; +import { tabsMapping} from './OnboardingCatalogConstants.js'; + +const CatalogHeaderTabs = ({onTabPress, activeTab}) => ( +
+
onTabPress(tabsMapping.ALL)} + data-test-id='catalog-all-tab'> + {i18n('ALL')} +
+
+
onTabPress(tabsMapping.BY_VENDOR)} + data-test-id='catalog-by-vendor-tab'> + {i18n('BY VENDOR')} +
+
+); + +const CatalogHeader = ({activeTab, onTabPress}) => ( +
+ +
+); + +class OnboardingCatalogView extends React.Component { + renderViewByTab(activeTab){ + const {finalizedLicenseModelList: licenseModelList, vspOverlay, finalizedSoftwareProductList: softwareProductList, onSelectLicenseModel, onSelectSoftwareProduct, + onAddLicenseModelClick, onAddSoftwareProductClick, onVspOverlayChange, onVendorSelect, selectedVendor, searchValue, onMigrate} = this.props; + switch (activeTab){ + case tabsMapping.ALL: + return ( + + ); + case tabsMapping.BY_VENDOR: + default: + return ( + + ); + } + } + + render() { + const {selectedVendor, catalogActiveTab: activeTab, onCatalogTabClick, onSearch, searchValue} = this.props; + return ( +
+ {!selectedVendor && onSearch(event.target.value)} + activeTab={activeTab} + onTabPress={tab => onCatalogTabClick(tab)} + searchValue={searchValue}/>} + {this.renderViewByTab(activeTab)} +
+ ); + } +} + +export default OnboardingCatalogView; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/Tooltip.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/Tooltip.jsx new file mode 100644 index 0000000000..8d8d1162a0 --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/Tooltip.jsx @@ -0,0 +1,24 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +import React from 'react'; +import Tooltip from 'react-bootstrap/lib/Tooltip.js'; + +export default function tooltip (msg) { + return ( + {msg} + ); +}; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VSPOverlay.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VSPOverlay.jsx new file mode 100644 index 0000000000..1ba4834fa3 --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VSPOverlay.jsx @@ -0,0 +1,50 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import React from 'react'; +import i18n from 'nfvo-utils/i18n/i18n.js'; +import {migrationStatusMapper} from './OnboardingCatalogConstants.js'; + +const VSPOverlay = ({VSPList, onSelectVSP, onSeeMore, onMigrate}) => ( +
{ + e.stopPropagation(); + e.preventDefault(); + }}> +
+
+
{i18n('Recently Edited')}
+
+ {VSPList.slice(0, 5).map(vsp =>
{ + if (vsp.isOldVersion && vsp.isOldVersion === migrationStatusMapper.OLD_VERSION) { + onMigrate({ + softwareProduct: vsp + }); + } else { + onSelectVSP(vsp); + } + } + }>{i18n(vsp.name)}
)} +
+ {VSPList.length > 5 &&
{i18n('See More')}
} +
+
+); + +VSPOverlay.PropTypes = { + VSPList: React.PropTypes.array, + onSelectVSP: React.PropTypes.func +}; + +export default VSPOverlay; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogReducer.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogReducer.js new file mode 100644 index 0000000000..dd8b41bd22 --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogReducer.js @@ -0,0 +1,38 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import {actionTypes} from './OnboardingCatalogConstants.js'; + +export default (state = {}, action) => { + switch(action.type) { + case actionTypes.ONBOARDING_CATALOG_OPEN_VENDOR_PAGE: + return { + ...state, + selectedVendor: action.selectedVendor + }; + case actionTypes.CHANGE_VSP_OVERLAY: + return { + ...state, + vspOverlay: action.vendorId + }; + case actionTypes.CLOSE_VSP_OVERLAY: + return { + ...state, + vspOverlay: null + }; + default: + return state; + } +}; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx new file mode 100644 index 0000000000..c4e0599d85 --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorCatalogView.jsx @@ -0,0 +1,74 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import React from 'react'; +import VendorItem from './VendorItem.jsx'; +import CatalogList from '../CatalogList.jsx'; +import CatalogItemDetails from '../CatalogItemDetails.jsx'; +import {catalogItemTypes, catalogItemTypeClasses} from './OnboardingCatalogConstants.js'; +import {filterCatalogItemsByType} from './OnboardingCatalogUtils.js'; + +const VendorList = ({onAddVLM, onAddVSP, onSelectVSP, licenseModelList = [], vspOverlay: currentOverlay, onVspOverlayChange, onVendorSelect, filter, onMigrate}) => { + return( + + { + filterCatalogItemsByType(licenseModelList, catalogItemTypes.LICENSE_MODEL, filter).map(vlm => + onVspOverlayChange(vlm.id === currentOverlay || !hasVSP ? null : vlm)} + onVendorSelect={onVendorSelect} + onMigrate={onMigrate} + vendor={vlm}/>) + } + + ); +}; + +const SoftwareProductListByVendor = ({onAddVSP, selectedVendor, onVendorSelect, onSelectVSP, onSelectVLM, filter, onMigrate}) => { + return( +
+ {onAddVSP(selectedVendor.id);}} vendorPageOptions={{selectedVendor, onBack: () => onVendorSelect(false)}}> + onSelectVLM(selectedVendor)} + catalogItemTypeClass={catalogItemTypeClasses.LICENSE_MODEL} + onMigrate={onMigrate} + catalogItemData={{...selectedVendor, name: selectedVendor.vendorName}}/> + { + filterCatalogItemsByType(selectedVendor.softwareProductList, catalogItemTypes.SOFTWARE_PRODUCT, filter).map(vsp => + onSelectVSP(vsp)} + catalogItemData={vsp}/> + ) + } + +
+ ); +}; + +class VendorCatalogView extends React.Component { + render() { + let {selectedVendor} = this.props; + return( selectedVendor ? : ); + } +} + +export default VendorCatalogView; diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx new file mode 100644 index 0000000000..cecccdd9ad --- /dev/null +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx @@ -0,0 +1,96 @@ +/*! + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +import React from 'react'; +import {catalogItemTypeClasses} from './OnboardingCatalogConstants.js'; +import CatalogTile from '../CatalogTile.jsx'; +import classnames from 'classnames'; +import VSPOverlay from './VSPOverlay.jsx'; +import i18n from 'nfvo-utils/i18n/i18n.js'; +import SVGIcon from 'nfvo-components/icon/SVGIcon.jsx'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger.js'; +import tooltip from './Tooltip.jsx'; + + +class VendorItem extends React.Component { + + static PropTypes = { + softwareProductList: React.PropTypes.array, + vendor: React.PropTypes.object, + onSelectVSP: React.PropTypes.func, + shouldShowOverlay: React.PropTypes.boolm, + onVendorSelect: React.PropTypes.func, + onAddVSP: React.PropTypes.func, + onVSPIconClick: React.PropTypes.func, + + }; + + render() { + let {vendor, onSelectVSP, shouldShowOverlay, onVendorSelect, onMigrate} = this.props; + let {softwareProductList = [], vendorName} = vendor; + return ( + onVendorSelect(vendor)}> +
+
+
+
+ +
{vendorName}
+
+
this.handleVspCountClick(event)} + data-test-id='catalog-vsp-count'> + {i18n(`${softwareProductList.length} VSPs`)} +
+
this.onCreateVspClick(event)} data-test-id='catalog-create-new-vsp-from-vendor'> +
+    {i18n('Create new VSP')} +
+
+
+ + {shouldShowOverlay && softwareProductList.length > 0 + && onVendorSelect(vendor)}/>} +
+ ); + } + + onClick(vlm) { + this.setState({ + licenseModelToShow: vlm + }); + } + + onCreateVspClick(event) { + let {onAddVSP, vendor: {id}} = this.props; + event.stopPropagation(); + event.preventDefault(); + onAddVSP(id); + } + + handleVspCountClick(e){ + let {onVSPIconClick, vendor: {softwareProductList}} = this.props; + e.stopPropagation(); + e.preventDefault(); + const hasVSP = Boolean(softwareProductList.length); + onVSPIconClick(hasVSP); + } + +} + +export default VendorItem; -- cgit 1.2.3-korg