created a very ugly report

This commit is contained in:
Senad Uka
2015-04-08 07:35:00 +02:00
parent 670f58fcff
commit 6da4e6c9fd
10 changed files with 186 additions and 17 deletions

View File

@@ -34,10 +34,22 @@ var CartPage = React.createClass({
)
});
console.log("bla :" , this.state.items.length);
var deliveryDestination = (<span></span>);
if (this.state.destinationValid) {
deliveryDestination = (
<div>
Na adresu {this.state.deliveryDestination.name},
</div>
)
}
var cartTotal = (
<div className="row cart-total">
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} deliveryCosts={this.state.deliveryCosts}/>
<div className="col-md-1 span1">
<button className="btn btn-warning" onClick={this._onOrderClick}>Izgleda OK</button>

View File

@@ -213,7 +213,8 @@ var CartStore = _.extend({}, EventEmitter.prototype, {
deliveryDestination: _deliveryDestination,
deliveryDestinationErrors: _deliveryDestinationErrors,
isDeliveryDestinationValid: isDeliveryDestinationValid(),
deliveryCosts: _deliveryCosts
deliveryCosts: _deliveryCosts,
destinationValid: isDeliveryDestinationValid()
};
return state;
},