Sha256: 82f5190bd5eb06cc21586ea67d685852bb0eb7dbcd431ab11e71f29d8fb3b0dc

Contents?: true

Size: 798 Bytes

Versions: 3

Compression:

Stored size: 798 Bytes

Contents

import React, {Component} from 'react'
import Table from 'react-toolbox/lib/table'
import style from './style'

class Layout extends Component {
  state = {
    selected: [],
    source: this.props.storages
  }

  componentDidMount() {
    this.props.searchStorages()
  }

  handleSelect = (selected) => {
    this.setState({selected})
  }

  render() {
    const storageModel = {
      material_name: {type: String},
      date: {type: Date},
      quantity: {type: Number}
    }

    return (
      <div className={style.content}>
        <h1>Inventory</h1>

        <Table
          model={storageModel}
          selectable
          selected={this.state.selected}
          source={this.props.storages}
          onSelect={this.handleSelect} />
      </div>
    )
  }
}

export default Layout

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bouquet-0.2.2 store/private/static/app/components/layouts/contents/inventory/layout.js
bouquet-0.2.1 store/private/static/app/components/layouts/contents/inventory/layout.js
bouquet-0.2.0 store/private/static/app/components/layouts/contents/inventory/layout.js