import React from 'react'; class AssetManagement extends React.Component { constructor() { super(); this.state = { newAssetName: 'Name', newAssetSE: 'SE', newAssetWarranty: 12, }; } onNewAssetNameChange = target => { this.setState({ newAssetName: target.value, }); }; onNewAssetSEChange = target => { this.setState({ newAssetSE: target.value, }); }; onNewAssetWarrantyChange = target => { this.setState({ newAssetWarranty: target.value, }); }; onCreateNewAssetClicked = () => { this.props.onCreateAsset({ name: this.state.newAssetName, serial: this.state.newAssetSE, warranty_months: this.state.newAssetWarranty, }); } render() { const userAssets = []; if (this.props.assets) { this.props.assets.forEach(asset => { userAssets.push(