Skip to content

Instantly share code, notes, and snippets.

@styks1987
Created June 29, 2017 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save styks1987/74276f5c6341dc9f68e197177200155b to your computer and use it in GitHub Desktop.
Save styks1987/74276f5c6341dc9f68e197177200155b to your computer and use it in GitHub Desktop.
<div className="d-flex w-100 justify-content-between">
<span>{order.id} - {order.size_description}</span>
<small>{order.total_qty} labels</small>
<small>{order.design_qty} designs</small>
{((order) => {
if(order.is_shipping_blind){
return (
<span className="badge badge-warning">Shipping Blind</span>
)
}
})(order)}
{((order) => {
if(!this.props.checklistsVerified) {
if (this.props.shipmentOrders.indexOf(order.id) > -1) {
return (
<button
onClick={this.handleRemoveOrder.bind(this, order.id)}
className="btn btn-secondary btn-sm">Remove From
Shipment</button>
)
} else {
return (
<button onClick={this.handleAddOrder.bind(this, order.id)}
className="btn btn-primary btn-sm">Add to
Shipment</button>
)
}
} else {
if (this.props.shipmentOrders.indexOf(order.id) > -1) {
return (
<button disabled="disabled"
className="btn btn-secondary btn-sm">Added to shipment</button>
)
}
}
})(order)}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment