import React, {Component, PropTypes} from 'react'; import i18n from 'nfvo-utils/i18n/i18n.js'; import Form from 'nfvo-components/input/validation/ValidationForm.jsx'; import ValidationInput from 'nfvo-components/input/validation/ValidationInput.jsx'; import SoftwareProductCategoriesHelper from 'sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js'; class SoftwareProductDetails extends Component { static propTypes = { vendorName: PropTypes.string, currentSoftwareProduct: PropTypes.shape({ id: PropTypes.string, name: PropTypes.string, description: PropTypes.string, category: PropTypes.string, subCategory: PropTypes.string, vendorId: PropTypes.string, vendorName: PropTypes.string, licensingVersion: PropTypes.string, licensingData: PropTypes.shape({ licenceAgreement: PropTypes.string, featureGroups: PropTypes.array }) }), softwareProductCategories: PropTypes.array, finalizedLicenseModelList: PropTypes.array, licenseAgreementList: PropTypes.array, featureGroupsList: PropTypes.array, onSubmit: PropTypes.func.isRequired, onDataChanged: PropTypes.func.isRequired, onValidityChanged: PropTypes.func.isRequired, qdata: PropTypes.object.isRequired, qschema: PropTypes.object.isRequired, onQDataChanged: PropTypes.func.isRequired, onVendorParamChanged: PropTypes.func.isRequired }; state = { licensingVersionsList: [] }; render() { let {softwareProductCategories, finalizedLicenseModelList, onDataChanged, featureGroupsList, licenseAgreementList, currentSoftwareProduct} = this.props; let {name, description, vendorId, licensingVersion, subCategory, licensingData = {}} = currentSoftwareProduct; let licensingVersionsList = this.state.licensingVersionsList.length > 0 ? this.state.licensingVersionsList : this.refreshVendorVersionsList(vendorId); let {qdata, qschema, onQDataChanged} = this.props; let {isReadOnlyMode} = this.props; return (