diff --git a/customer/components/App/App.jsx b/customer/components/App/App.jsx
index 93460cc..ca774dd 100644
--- a/customer/components/App/App.jsx
+++ b/customer/components/App/App.jsx
@@ -227,6 +227,9 @@ var App = React.createClass({
if (this.state.pickupTime === true) {
var expectedPickupTime = moment().add(this.state.durationSeconds, 's').format('LT');
+ this.setState({
+ expectedPickupTime: expectedPickupTime
+ })
} else {
var expectedPickupTime = '';
}
@@ -580,7 +583,8 @@ var App = React.createClass({
previousOrders: this.state.previousOrders,
favoriteOrders: this.state.favoriteOrders,
handleMenuToggle:this._handleMenuToggle,
- menuShow:this.state.menuShow
+ menuShow:this.state.menuShow,
+ expectedPickupTime: this.state.expectedPickupTime
})
}
diff --git a/customer/components/ConfirmationView/ConfirmationView/ConfirmationView.jsx b/customer/components/ConfirmationView/ConfirmationView/ConfirmationView.jsx
index bda8e8a..f70cd76 100644
--- a/customer/components/ConfirmationView/ConfirmationView/ConfirmationView.jsx
+++ b/customer/components/ConfirmationView/ConfirmationView/ConfirmationView.jsx
@@ -25,7 +25,8 @@ var ConfirmationView = React.createClass({
selectedShopLocation: React.PropTypes.shape({
lat: React.PropTypes.number,
lng: React.PropTypes.number
- })
+ }),
+ expectedPickupTime: React.PropTypes.string
},
render: function() {
diff --git a/customer/components/ConfirmationView/OrderReadyTime/OrderReadyTime.jsx b/customer/components/ConfirmationView/OrderReadyTime/OrderReadyTime.jsx
index 66c9bed..510fd2f 100644
--- a/customer/components/ConfirmationView/OrderReadyTime/OrderReadyTime.jsx
+++ b/customer/components/ConfirmationView/OrderReadyTime/OrderReadyTime.jsx
@@ -9,28 +9,14 @@ var OrderReadyTime = React.createClass({
React.PropTypes.string,
React.PropTypes.bool
]),
- duration: React.PropTypes.string
+ duration: React.PropTypes.string,
+ expectedPickupTime: React.PropTypes.string
},
render: function() {
- var methodOfTransIcon;
- switch(this.props.methodOfTrans) {
- case 'walking':
- methodOfTransIcon =
;
- break;
- case 'biking':
- methodOfTransIcon =
;
- break;
- case 'driving':
- methodOfTransIcon =
;
- break;
- default:
- methodOfTransIcon = No user input :(
- }
-
var pickupTime;
- if (this.props.pickupTime) {
+ if (this.props.pickupTime === true) {
pickupTime =
Head to the shop,
and your order will be ready in...
diff --git a/public/customer-bundle.js b/public/customer-bundle.js
index 14dd4f9..e10daba 100644
--- a/public/customer-bundle.js
+++ b/public/customer-bundle.js
@@ -25406,6 +25406,9 @@
if (this.state.pickupTime === true) {
var expectedPickupTime = (0, _moment2.default)().add(this.state.durationSeconds, 's').format('LT');
+ this.setState({
+ expectedPickupTime: expectedPickupTime
+ });
} else {
var expectedPickupTime = '';
}
@@ -25804,7 +25807,8 @@
previousOrders: this.state.previousOrders,
favoriteOrders: this.state.favoriteOrders,
handleMenuToggle: this._handleMenuToggle,
- menuShow: this.state.menuShow
+ menuShow: this.state.menuShow,
+ expectedPickupTime: this.state.expectedPickupTime
})
)
);
@@ -61993,7 +61997,8 @@
selectedShopLocation: _react2.default.PropTypes.shape({
lat: _react2.default.PropTypes.number,
lng: _react2.default.PropTypes.number
- })
+ }),
+ expectedPickupTime: _react2.default.PropTypes.string
},
render: function render() {
@@ -62069,44 +62074,14 @@
propTypes: {
methodOfTrans: _react2.default.PropTypes.string,
pickupTime: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.bool]),
- duration: _react2.default.PropTypes.string
+ duration: _react2.default.PropTypes.string,
+ expectedPickupTime: _react2.default.PropTypes.string
},
render: function render() {
- var methodOfTransIcon;
- switch (this.props.methodOfTrans) {
- case 'walking':
- methodOfTransIcon = _react2.default.createElement(
- 'div',
- { className: 'method-of-trans-icon' },
- _react2.default.createElement('i', { className: 'fa fa-male fa-3x', 'aria-hidden': 'true' })
- );
- break;
- case 'biking':
- methodOfTransIcon = _react2.default.createElement(
- 'div',
- { className: 'method-of-trans-icon' },
- _react2.default.createElement('i', { className: 'fa fa-bicycle fa-3x', 'aria-hidden': 'true' })
- );
- break;
- case 'driving':
- methodOfTransIcon = _react2.default.createElement(
- 'div',
- { className: 'method-of-trans-icon' },
- _react2.default.createElement('i', { className: 'fa fa-car fa-3x', 'aria-hidden': 'true' })
- );
- break;
- default:
- methodOfTransIcon = _react2.default.createElement(
- 'div',
- { className: 'method-of-trans-icon' },
- 'No user input :('
- );
- }
-
var pickupTime;
- if (this.props.pickupTime) {
+ if (this.props.pickupTime === true) {
pickupTime = _react2.default.createElement(
'div',
{ className: 'order-ready-time-container' },