Skip to content

Commit 0e9dcb3

Browse files
committed
removed Timer, OrderReadyTime, added distance bug
1 parent c03406e commit 0e9dcb3

File tree

7 files changed

+76
-58
lines changed

7 files changed

+76
-58
lines changed

business-admin/components/BusinessAdminView/BAOrder/BAOrder.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ var BAOrder = React.createClass({
3232
},
3333

3434

35-
_handleCompleteOrder: function() {
35+
_handleCompleteOrder: function () {
3636
console.log('completing order');
3737
this.props.completeOrder(this.props.order._id);
3838
},
3939

40-
render: function() {
40+
render: function () {
4141

4242
var orderDetails = this.props.order.items.map(
43-
function(item, i) {
43+
function (item, i) {
4444
return <BAOrderDetails
45-
key={i}
46-
item={item} />
47-
});
45+
key={i}
46+
item={item} />
47+
});
4848

4949
if (this.props.order.specialInstructions) {
5050
var specialInstructions = <div className="special-instructions">"{this.props.order.specialInstructions}"</div>
@@ -59,11 +59,12 @@ var BAOrder = React.createClass({
5959
{specialInstructions}
6060
</div>
6161
<div className="ba-order-right">
62-
<Timer
62+
{ /*<Timer
6363
secondsUntilArrival={this.props.order.secondsUntilArrival}
6464
timeSelectedForPickup={this.props.order.timeSelectedForPickup}
6565
expectedPickupTime={this.props.order.expectedPickupTime} />
6666
<p>ETA:</p>
67+
*/ }
6768
<button onClick={this._handleCompleteOrder}>
6869
Complete
6970
<i className="fa fa-check-circle fa-2x" aria-hidden="true"></i>

customer/components/ConfirmationView/OrderReadyTime/OrderReadyTime.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,19 @@ var OrderReadyTime = React.createClass({
1313
expectedPickupTime: React.PropTypes.string
1414
},
1515

16-
render: function() {
16+
render: function () {
1717

1818
var pickupTime;
1919
if (this.props.pickupTime === true) {
2020
pickupTime = <div className="order-ready-time-container">
2121
<h2 className="order-ready-time-pickup">Head to the shop,
22-
and your order will be ready in...</h2>
23-
<div className="order-ready-time">{this.props.duration}</div>
24-
{/*
25-
<p>How you're getting there: {methodOfTransIcon}</p>
26-
<div className="order-ready-time-divider"></div>
27-
*/}
22+
and your order will be ready when you get there!
23+
</h2>
2824
</div>
2925
} else {
3026
pickupTime = <div className="order-ready-time-container">
3127
<h2>Your order will be ready at {this.props.pickupTime}</h2>
32-
<div className="order-ready-time-divider"></div>
28+
<div className="order-ready-time-divider"></div>
3329
</div>
3430
}
3531

customer/components/ConfirmationView/ShopDetails/ShopDetails.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ var ShopDetails = React.createClass({
88
distance: React.PropTypes.string
99
},
1010

11-
render: function() {
11+
render: function () {
1212

1313
var selectedShop = this.props.selectedShop;
1414

1515
return (
1616
<div className="shop-details-container">
1717
<h2>{selectedShop.name}</h2>
18-
<p>{selectedShop.address_components[0].short_name + ' ' + selectedShop.address_components[1].short_name}</p>
18+
<p>{selectedShop.address_components[0].short_name + ' ' + selectedShop.address_components[1].short_name}</p>
1919

20-
<p>{selectedShop.address_components[2].short_name + ', ' + selectedShop.address_components[3].short_name + ' ' + selectedShop.address_components[5].short_name}</p>
21-
<p>{selectedShop.formatted_phone_number}</p>
22-
<p>Distance: {this.props.distance}</p>
20+
<p>{selectedShop.address_components[2].short_name + ', ' + selectedShop.address_components[3].short_name + ' ' + selectedShop.address_components[5].short_name}</p>
21+
<p>{selectedShop.formatted_phone_number}</p>
22+
<p>Distance: 0.5 mi</p>
2323
</div>
2424
)
2525
}

customer/components/SelectShopView/ShopListItem/ShopListItem.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ var ShopListItem = React.createClass({
99
handleSelectedShop: React.PropTypes.func
1010
},
1111

12-
render: function() {
12+
render: function () {
1313

1414
return (
1515
<div className="shop-list-item-container"
1616
onClick={() => this.props.handleSelectedShop(this.props.shop)} >
17-
<Link to="/custom-order">
17+
<Link to="/custom-order">
1818
<div className="shop-list-item-details">
1919
<h2>{this.props.shop.name}</h2>
2020
<p>{this.props.shop.vicinity}</p>
2121

22-
<div className="shop-list-bottom-row">
23-
{this.props.shop.hasOwnProperty('opening_hours') ?
22+
<div className="shop-list-bottom-row">
23+
{/*this.props.shop.hasOwnProperty('opening_hours') ?
2424
this.props.shop.opening_hours.open_now ?
2525
<div className="open-now"><i className="fa fa-clock-o" aria-hidden="true"></i> Open now!</div>
2626
: <div className="closed-now"><i className="fa fa-clock-o" aria-hidden="true"></i> Currently closed</div>
27-
: ''}
28-
<p className="shop-list-distance">{this.props.shop.shopDistance}</p>
27+
: '' */ }
28+
<div className="open-now"><i className="fa fa-clock-o" aria-hidden="true"></i> Open now!</div>
29+
<p className="shop-list-distance">{this.props.shop.distance}</p>
30+
</div>
2931
</div>
30-
</div>
3132
</Link>
3233
</div>
3334
)

dummy-shop-data.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
1616
"id": "9a7febec4d42a6dd9f97a576f9b00499bb02cfe6",
17-
"name": "La Boulangerie de San Francisco, Hayes",
17+
"name": "La Boulangerie de San Francisco",
18+
"distance": "0.1 mi",
1819
"opening_hours": {
1920
"open_now": false,
2021
"weekday_text": []
@@ -60,6 +61,7 @@
6061
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
6162
"id": "8a6bc5994097971fa94c7ef99c4a1b836fb4c381",
6263
"name": "Cafe Claude",
64+
"distance": "0.1 mi",
6365
"opening_hours": {
6466
"open_now": true,
6567
"weekday_text": []
@@ -105,6 +107,7 @@
105107
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
106108
"id": "892e2f452faa6d8d8a3c495347199577a339f98c",
107109
"name": "Dottie's True Blue Cafe",
110+
"distance": "0.2 mi",
108111
"opening_hours": {
109112
"open_now": false,
110113
"weekday_text": []
@@ -148,6 +151,7 @@
148151
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png",
149152
"id": "ea6ff166f8491ff9efed520ae1c49ed97e93675a",
150153
"name": "DNA Lounge",
154+
"distance": "0.2 mi",
151155
"opening_hours": {
152156
"open_now": true,
153157
"weekday_text": []
@@ -195,6 +199,7 @@
195199
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
196200
"id": "2d0b4ef360b34aceb9ed2b3ae3651a58bde7bfbe",
197201
"name": "Sightglass Coffee",
202+
"distance": "0.3 mi",
198203
"opening_hours": {
199204
"open_now": false,
200205
"weekday_text": []
@@ -239,6 +244,7 @@
239244
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/movies-71.png",
240245
"id": "6c34db954947fe709b120321bde1f7061641c3fc",
241246
"name": "New People",
247+
"distance": "0.4 mi",
242248
"opening_hours": {
243249
"open_now": false,
244250
"weekday_text": []
@@ -285,6 +291,7 @@
285291
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
286292
"id": "51c2fff6e4b4163faee969e844a80d2ab81e6a2e",
287293
"name": "Blue Bottle Coffee",
294+
"distance": "0.44 mi",
288295
"opening_hours": {
289296
"open_now": false,
290297
"weekday_text": []
@@ -329,6 +336,7 @@
329336
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
330337
"id": "977b70880f1d7e60c5f2f085042f2ac1ebd5326b",
331338
"name": "The Creamery",
339+
"distance": "0.5 mi",
332340
"opening_hours": {
333341
"open_now": false,
334342
"weekday_text": []
@@ -376,6 +384,7 @@
376384
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/shopping-71.png",
377385
"id": "024de0b0c08fd83ae08aee6efef472b42859e9ba",
378386
"name": "Auntie Anne's Pretzels",
387+
"distance": "0.5 mi",
379388
"opening_hours": {
380389
"open_now": false,
381390
"weekday_text": []
@@ -422,6 +431,7 @@
422431
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
423432
"id": "e36ed3acbf815e3cc49501912b2c456edaaf8abc",
424433
"name": "Four Barrel Coffee",
434+
"distance": "0.7 mi",
425435
"opening_hours": {
426436
"open_now": false,
427437
"weekday_text": []
@@ -465,7 +475,8 @@
465475
},
466476
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
467477
"id": "6be13075fac2d506c5325c49eaf1b9fd46274fad",
468-
"name": "Samovar Tea Lounge, Yerba Buena Gardens",
478+
"name": "Samovar Tea Lounge",
479+
"distance": "0.7 mi",
469480
"opening_hours": {
470481
"open_now": false,
471482
"weekday_text": []
@@ -509,6 +520,7 @@
509520
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
510521
"id": "39259f1890c200b2438a145f6c28bcf2ef034fc0",
511522
"name": "Honey Honey Cafe & Crepery",
523+
"distance": "0.7 mi",
512524
"opening_hours": {
513525
"open_now": true,
514526
"weekday_text": []
@@ -554,6 +566,7 @@
554566
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
555567
"id": "913b3f1febc842fd5afaf3664d0610946d19b9e1",
556568
"name": "Starbucks",
569+
"distance": "0.8 mi",
557570
"opening_hours": {
558571
"open_now": true,
559572
"weekday_text": []
@@ -598,6 +611,7 @@
598611
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
599612
"id": "cd5bce3cda7d6f6f360d7179b25dc9e33130eb27",
600613
"name": "Il Fornaio San Francisco",
614+
"distance": "0.9 mi",
601615
"opening_hours": {
602616
"open_now": true,
603617
"weekday_text": []
@@ -641,6 +655,7 @@
641655
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
642656
"id": "dd1229d0b63e07a48eab115ba6e5998f49baa23e",
643657
"name": "Boudin Bakery Cafe",
658+
"distance": "1.1 mi",
644659
"opening_hours": {
645660
"open_now": true,
646661
"weekday_text": []
@@ -667,7 +682,7 @@
667682
"point_of_interest",
668683
"establishment"
669684
],
670-
"vicinity": "Baker's Hall, 160 Jefferson Street, San Francisco",
685+
"vicinity": "Baker's Hall, 160 Jefferson Street, SF",
671686
"html_attributions": []
672687
},
673688
{
@@ -686,6 +701,7 @@
686701
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
687702
"id": "8de88a2df523cb2eda7ae3876fae921faf6864c1",
688703
"name": "Hard Rock Cafe",
704+
"distance": "1.1 mi",
689705
"opening_hours": {
690706
"open_now": true,
691707
"weekday_text": []
@@ -731,6 +747,7 @@
731747
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
732748
"id": "3945b6376c3ad30e861eb5363f3b5514f223a440",
733749
"name": "Starbucks",
750+
"distance": "1.3 mi",
734751
"opening_hours": {
735752
"open_now": false,
736753
"weekday_text": []
@@ -775,6 +792,7 @@
775792
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
776793
"id": "300efc067dc0e0e3d9218b5cff0cbea394886c0b",
777794
"name": "Hollywood Cafe",
795+
"distance": "1.4 mi",
778796
"opening_hours": {
779797
"open_now": false,
780798
"weekday_text": []
@@ -819,6 +837,7 @@
819837
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png",
820838
"id": "e3e6124732a8e03aa4276691362981ffa59526ee",
821839
"name": "Specialty's Cafe & Bakery",
840+
"distance": "1.5 mi",
822841
"opening_hours": {
823842
"open_now": false,
824843
"weekday_text": []
@@ -864,6 +883,7 @@
864883
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
865884
"id": "1883b98f6769be3c79329112195e4623b75ec7fb",
866885
"name": "Craftsman and Wolves",
886+
"distance": "1.7 mi",
867887
"opening_hours": {
868888
"open_now": false,
869889
"weekday_text": []

public/ba-bundle.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27618,15 +27618,6 @@
2761827618
_react2.default.createElement(
2761927619
'div',
2762027620
{ className: 'ba-order-right' },
27621-
_react2.default.createElement(_Timer2.default, {
27622-
secondsUntilArrival: this.props.order.secondsUntilArrival,
27623-
timeSelectedForPickup: this.props.order.timeSelectedForPickup,
27624-
expectedPickupTime: this.props.order.expectedPickupTime }),
27625-
_react2.default.createElement(
27626-
'p',
27627-
null,
27628-
'ETA:'
27629-
),
2763027621
_react2.default.createElement(
2763127622
'button',
2763227623
{ onClick: this._handleCompleteOrder },

0 commit comments

Comments
 (0)