import React from 'react'; import superagent from 'superagent'; import { Table, Statistic, Button, Header, Segment, Icon, Flag, Grid } from 'semantic-ui-react' import * as ApiUtils from '../CloudApi/ApiUtils.js'; import InventoryWrapper from './InventoryWrapper.jsx'; class BigInventoryCompactReport extends React.Component { constructor(props) { super(props); this.state = { loading: false }; } async componentDidMount() { this.setState({ loading: true }); let res = await superagent.get(`/api/admin/inventory/items?serialNumberLike=BS1${this.props.ipd}&type=${this.props.productType}&status=InStock&limit=1`); this.setState({ count: res.body.count, loading: false }); } render() { let header, button; header =
{this.state.count}x {this.props.productType} in stock
; button = ; return ( 0} negative={this.state.loading}> {this.props.ipd} {this.state.loading ? : <>{this.props.productType}} {this.state.loading ? : {this.state.count} } View Inventory... ) } } export default class BigInventoryReport extends React.Component { constructor(props) { super(props); this.state = { bigOrder: null }; } async componentDidMount() { } render() { const beyondTable = ( IPD Product Count View {_.range(55, 73).map(ipd => { return })}
); const replacementBeyondTable = ( IPD Product Count View {_.range(55, 73).map(ipd => { return })}
); return ( {beyondTable} {replacementBeyondTable} ); } }