ordering-ui-external 2.0.4 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.a228aa8797d9d0fc5a6c.js → 0.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{1.ordering-ui.a228aa8797d9d0fc5a6c.js → 1.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{2.ordering-ui.a228aa8797d9d0fc5a6c.js → 2.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{4.ordering-ui.a228aa8797d9d0fc5a6c.js → 4.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{5.ordering-ui.a228aa8797d9d0fc5a6c.js → 5.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{6.ordering-ui.a228aa8797d9d0fc5a6c.js → 6.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{7.ordering-ui.a228aa8797d9d0fc5a6c.js → 7.ordering-ui.3861d1cf52cf041c74c5.js} +1 -1
- package/_bundles/{7.ordering-ui.a228aa8797d9d0fc5a6c.js.LICENSE.txt → 7.ordering-ui.3861d1cf52cf041c74c5.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.a228aa8797d9d0fc5a6c.js → 8.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{9.ordering-ui.a228aa8797d9d0fc5a6c.js → 9.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{ordering-ui.a228aa8797d9d0fc5a6c.js → ordering-ui.3861d1cf52cf041c74c5.js} +2 -2
- package/_bundles/{ordering-ui.a228aa8797d9d0fc5a6c.js.LICENSE.txt → ordering-ui.3861d1cf52cf041c74c5.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +36 -28
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -34
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/_modules/themes/five/src/components/Cart/index.js +73 -25
- package/_modules/themes/five/src/components/CartContent/index.js +3 -1
- package/_modules/themes/five/src/components/Checkout/index.js +25 -15
- package/_modules/themes/five/src/components/DriverTips/index.js +26 -15
- package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +63 -0
- package/_modules/themes/five/src/components/GiftCard/GiftCardUI/styles.js +27 -0
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +69 -0
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +29 -0
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +123 -0
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/styles.js +20 -0
- package/_modules/themes/five/src/components/GiftCard/SendGiftCard/index.js +114 -0
- package/_modules/themes/five/src/components/GiftCard/SendGiftCard/styles.js +14 -0
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +8 -56
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/LoginForm/index.js +6 -0
- package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +69 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +84 -76
- package/_modules/themes/five/src/components/OrderDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +3 -3
- package/_modules/themes/five/src/components/OrderProgress/index.js +5 -14
- package/_modules/themes/five/src/components/PageBanner/index.js +120 -6
- package/_modules/themes/five/src/components/PaymentOptions/index.js +22 -8
- package/_modules/themes/five/src/components/PaymentOptions/styles.js +9 -7
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +20 -14
- package/_modules/themes/five/src/components/ProfessionalFilter/index.js +23 -25
- package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +6 -32
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +38 -22
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +3 -9
- package/_modules/themes/five/src/components/ServiceForm/index.js +10 -4
- package/_modules/themes/five/src/components/ServiceForm/styles.js +23 -25
- package/_modules/themes/five/src/components/SignUpForm/index.js +6 -0
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +22 -16
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -2
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +73 -51
- package/_modules/themes/five/src/components/SingleProfessionalCard/index.js +23 -7
- package/_modules/themes/five/src/components/SingleProfessionalCard/styles.js +29 -10
- package/_modules/themes/five/src/components/Wallets/index.js +2 -1
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +49 -35
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +26 -4
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -1
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +2 -2
- package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/src/themes/five/src/components/Cart/index.js +44 -14
- package/src/themes/five/src/components/CartContent/index.js +1 -0
- package/src/themes/five/src/components/Checkout/index.js +67 -51
- package/src/themes/five/src/components/DriverTips/index.js +52 -40
- package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +59 -0
- package/src/themes/five/src/components/GiftCard/GiftCardUI/styles.js +41 -0
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +70 -0
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +52 -0
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +122 -0
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/styles.js +41 -0
- package/src/themes/five/src/components/GiftCard/SendGiftCard/index.js +103 -0
- package/src/themes/five/src/components/GiftCard/SendGiftCard/styles.js +27 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +33 -79
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +0 -1
- package/src/themes/five/src/components/LoginForm/index.js +7 -0
- package/src/themes/five/src/components/OrderDetails/OrderEta.js +59 -0
- package/src/themes/five/src/components/OrderDetails/index.js +141 -133
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -1
- package/src/themes/five/src/components/OrderItAgain/styles.js +6 -6
- package/src/themes/five/src/components/OrderProgress/index.js +3 -12
- package/src/themes/five/src/components/PageBanner/index.js +96 -4
- package/src/themes/five/src/components/PaymentOptions/index.js +26 -5
- package/src/themes/five/src/components/PaymentOptions/styles.js +4 -0
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +24 -4
- package/src/themes/five/src/components/ProfessionalFilter/index.js +18 -30
- package/src/themes/five/src/components/ProfessionalFilter/styles.js +1 -57
- package/src/themes/five/src/components/RenderProductsLayout/index.js +33 -17
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +0 -18
- package/src/themes/five/src/components/ServiceForm/index.js +11 -5
- package/src/themes/five/src/components/ServiceForm/styles.js +1 -9
- package/src/themes/five/src/components/SignUpForm/index.js +7 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +43 -26
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +12 -2
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +51 -4
- package/src/themes/five/src/components/SingleProfessionalCard/index.js +17 -6
- package/src/themes/five/src/components/SingleProfessionalCard/styles.js +33 -6
- package/src/themes/five/src/components/Wallets/index.js +2 -1
|
@@ -23,7 +23,9 @@ var _OrderBillSection = require("./OrderBillSection");
|
|
|
23
23
|
var _ActionsSection = require("./ActionsSection");
|
|
24
24
|
var _OrderPreferencesSections = require("./OrderPreferencesSections");
|
|
25
25
|
var _PlaceSpot = require("../PlaceSpot");
|
|
26
|
+
var _SendGiftCard = require("../GiftCard/SendGiftCard");
|
|
26
27
|
var _Confirm = require("../Confirm");
|
|
28
|
+
var _OrderEta = require("./OrderEta");
|
|
27
29
|
var _styles = require("./styles");
|
|
28
30
|
var _styledComponents = require("styled-components");
|
|
29
31
|
var _TaxInformation = require("../TaxInformation");
|
|
@@ -55,7 +57,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
55
57
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
56
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
59
|
var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
58
|
-
var _configs$google_maps_, _configs$powered_by_o, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3,
|
|
60
|
+
var _configs$google_maps_, _configs$powered_by_o, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$confirmation, _theme$confirmation$c, _theme$confirmation$c2, _theme$confirmation$c3, _theme$confirmation$c4, _theme$confirmation2, _theme$confirmation2$, _theme$confirmation2$2, _theme$confirmation2$3, _theme$confirmation2$4, _theme$confirmation3, _theme$confirmation3$, _theme$confirmation3$2, _theme$confirmation3$3, _theme$confirmation3$4, _theme$confirmation4, _theme$confirmation4$, _theme$confirmation4$2, _theme$confirmation4$3, _theme$confirmation4$4, _theme$confirmation5, _theme$confirmation5$, _theme$confirmation5$2, _theme$confirmation5$3, _theme$confirmation5$4, _theme$confirmation6, _theme$confirmation6$, _theme$confirmation6$2, _theme$confirmation6$3, _theme$confirmation6$4, _theme$confirmation7, _theme$confirmation7$, _theme$confirmation7$2, _theme$confirmation7$3, _theme$confirmation7$4, _theme$confirmation8, _theme$confirmation8$, _theme$confirmation8$2, _theme$confirmation8$3, _theme$confirmation8$4, _theme$confirmation9, _theme$confirmation9$, _theme$confirmation9$2, _theme$confirmation9$3, _theme$confirmation9$4, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _theme$confirmation19, _theme$confirmation20, _theme$confirmation21, _theme$confirmation22, _theme$confirmation23, _theme$confirmation24, _theme$confirmation25, _theme$confirmation26, _theme$confirmation27, _theme$confirmation28, _theme$confirmation29, _theme$confirmation30, _theme$confirmation31, _theme$confirmation32, _theme$confirmation33, _theme$confirmation34, _theme$confirmation35, _theme$confirmation36, _theme$confirmation37, _theme$confirmation38, _theme$confirmation39, _theme$confirmation40, _theme$confirmation41, _theme$confirmation42, _theme$confirmation43, _theme$confirmation44, _theme$confirmation45, _theme$confirmation46, _theme$confirmation47, _theme$confirmation48, _theme$confirmation49, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _order$driver3, _order$driver3$locati, _order$driver4, _order$driver4$locati, _order$driver4$locati2, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _order$reporting_data, _getOrderStatus, _getOrderStatus2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _getOrderStatus3, _getOrderStatus4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver13$locat, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$$gift, _order$products$2, _order$products$2$gif, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
|
|
59
61
|
var userCustomerId = props.userCustomerId,
|
|
60
62
|
handleChangeOrderStatus = props.handleChangeOrderStatus,
|
|
61
63
|
handleBusinessRedirect = props.handleBusinessRedirect,
|
|
@@ -119,53 +121,57 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
119
121
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
120
122
|
isProReviewed = _useState10[0],
|
|
121
123
|
setIsProReviewed = _useState10[1];
|
|
122
|
-
var _useState11 = (0, _react.useState)(
|
|
124
|
+
var _useState11 = (0, _react.useState)(false),
|
|
125
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
126
|
+
isGiftCardSent = _useState12[0],
|
|
127
|
+
setIsGiftCardSent = _useState12[1];
|
|
128
|
+
var _useState13 = (0, _react.useState)({
|
|
123
129
|
business: false,
|
|
124
130
|
driver: false
|
|
125
131
|
}),
|
|
126
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
127
|
-
unreadAlert = _useState12[0],
|
|
128
|
-
setUnreadAlert = _useState12[1];
|
|
129
|
-
var _useState13 = (0, _react.useState)(false),
|
|
130
132
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var _useState15 = (0, _react.useState)(
|
|
133
|
+
unreadAlert = _useState14[0],
|
|
134
|
+
setUnreadAlert = _useState14[1];
|
|
135
|
+
var _useState15 = (0, _react.useState)(false),
|
|
136
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
137
|
+
isReviewOpen = _useState16[0],
|
|
138
|
+
setIsReviewOpen = _useState16[1];
|
|
139
|
+
var _useState17 = (0, _react.useState)({
|
|
134
140
|
order: false,
|
|
135
141
|
product: false,
|
|
136
142
|
driver: false,
|
|
137
143
|
professional: false
|
|
138
144
|
}),
|
|
139
|
-
|
|
140
|
-
reviewStatus =
|
|
141
|
-
setReviewStatus =
|
|
142
|
-
var
|
|
145
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
146
|
+
reviewStatus = _useState18[0],
|
|
147
|
+
setReviewStatus = _useState18[1];
|
|
148
|
+
var _useState19 = (0, _react.useState)({
|
|
143
149
|
open: false,
|
|
144
150
|
tax: null
|
|
145
151
|
}),
|
|
146
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
147
|
-
openTaxModal = _useState18[0],
|
|
148
|
-
setOpenTaxModal = _useState18[1];
|
|
149
|
-
var _useState19 = (0, _react.useState)(false),
|
|
150
152
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
openTaxModal = _useState20[0],
|
|
154
|
+
setOpenTaxModal = _useState20[1];
|
|
153
155
|
var _useState21 = (0, _react.useState)(false),
|
|
154
156
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var _useState23 = (0, _react.useState)(
|
|
157
|
+
isService = _useState22[0],
|
|
158
|
+
setIsService = _useState22[1];
|
|
159
|
+
var _useState23 = (0, _react.useState)(false),
|
|
160
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
161
|
+
isOrderHistory = _useState24[0],
|
|
162
|
+
setIsOrderHistory = _useState24[1];
|
|
163
|
+
var _useState25 = (0, _react.useState)({
|
|
158
164
|
open: false,
|
|
159
165
|
content: null,
|
|
160
166
|
handleOnAccept: null
|
|
161
167
|
}),
|
|
162
|
-
_useState24 = _slicedToArray(_useState23, 2),
|
|
163
|
-
confirm = _useState24[0],
|
|
164
|
-
setConfirm = _useState24[1];
|
|
165
|
-
var _useState25 = (0, _react.useState)(true),
|
|
166
168
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
+
confirm = _useState26[0],
|
|
170
|
+
setConfirm = _useState26[1];
|
|
171
|
+
var _useState27 = (0, _react.useState)(true),
|
|
172
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
173
|
+
isShowBusinessLogo = _useState28[0],
|
|
174
|
+
setIsShowBusinessLogo = _useState28[1];
|
|
169
175
|
var _props$order = props.order,
|
|
170
176
|
order = _props$order.order,
|
|
171
177
|
loading = _props$order.loading,
|
|
@@ -175,27 +181,29 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
175
181
|
var acceptedStatus = [1, 2, 5, 6, 10, 11, 12];
|
|
176
182
|
var completedStatus = [1, 2, 5, 6, 10, 11, 12, 15, 16, 17];
|
|
177
183
|
var placeSpotTypes = [3, 4, 5];
|
|
184
|
+
var activeStatus = [0, 3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23];
|
|
178
185
|
var googleMapsApiKey = configs === null || configs === void 0 ? void 0 : (_configs$google_maps_ = configs.google_maps_api_key) === null || _configs$google_maps_ === void 0 ? void 0 : _configs$google_maps_.value;
|
|
179
186
|
var enabledPoweredByOrdering = configs === null || configs === void 0 ? void 0 : (_configs$powered_by_o = configs.powered_by_ordering_module) === null || _configs$powered_by_o === void 0 ? void 0 : _configs$powered_by_o.value;
|
|
180
|
-
var
|
|
187
|
+
var hideOrderActions = (order === null || order === void 0 ? void 0 : order.delivery_type) === 1;
|
|
188
|
+
var isGiftCardOrder = !(order !== null && order !== void 0 && order.business_id);
|
|
181
189
|
var isOriginalLayout = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.confirmation) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : _orderingTheme$theme$3.type) === 'original';
|
|
182
|
-
var
|
|
183
|
-
var
|
|
184
|
-
var
|
|
185
|
-
var
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
var
|
|
192
|
-
var
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
var
|
|
197
|
-
var
|
|
198
|
-
var
|
|
190
|
+
var hideDeliveryType = theme === null || theme === void 0 ? void 0 : (_theme$confirmation = theme.confirmation) === null || _theme$confirmation === void 0 ? void 0 : (_theme$confirmation$c = _theme$confirmation.components) === null || _theme$confirmation$c === void 0 ? void 0 : (_theme$confirmation$c2 = _theme$confirmation$c.order) === null || _theme$confirmation$c2 === void 0 ? void 0 : (_theme$confirmation$c3 = _theme$confirmation$c2.components) === null || _theme$confirmation$c3 === void 0 ? void 0 : (_theme$confirmation$c4 = _theme$confirmation$c3.delivery_type) === null || _theme$confirmation$c4 === void 0 ? void 0 : _theme$confirmation$c4.hidden;
|
|
191
|
+
var hideDeliveryDate = theme === null || theme === void 0 ? void 0 : (_theme$confirmation2 = theme.confirmation) === null || _theme$confirmation2 === void 0 ? void 0 : (_theme$confirmation2$ = _theme$confirmation2.components) === null || _theme$confirmation2$ === void 0 ? void 0 : (_theme$confirmation2$2 = _theme$confirmation2$.order) === null || _theme$confirmation2$2 === void 0 ? void 0 : (_theme$confirmation2$3 = _theme$confirmation2$2.components) === null || _theme$confirmation2$3 === void 0 ? void 0 : (_theme$confirmation2$4 = _theme$confirmation2$3.date) === null || _theme$confirmation2$4 === void 0 ? void 0 : _theme$confirmation2$4.hidden;
|
|
192
|
+
var hideDeliveryProgress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation3 = theme.confirmation) === null || _theme$confirmation3 === void 0 ? void 0 : (_theme$confirmation3$ = _theme$confirmation3.components) === null || _theme$confirmation3$ === void 0 ? void 0 : (_theme$confirmation3$2 = _theme$confirmation3$.order) === null || _theme$confirmation3$2 === void 0 ? void 0 : (_theme$confirmation3$3 = _theme$confirmation3$2.components) === null || _theme$confirmation3$3 === void 0 ? void 0 : (_theme$confirmation3$4 = _theme$confirmation3$3.progress) === null || _theme$confirmation3$4 === void 0 ? void 0 : _theme$confirmation3$4.hidden;
|
|
193
|
+
var hideBusinessPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation4 = theme.confirmation) === null || _theme$confirmation4 === void 0 ? void 0 : (_theme$confirmation4$ = _theme$confirmation4.components) === null || _theme$confirmation4$ === void 0 ? void 0 : (_theme$confirmation4$2 = _theme$confirmation4$.business) === null || _theme$confirmation4$2 === void 0 ? void 0 : (_theme$confirmation4$3 = _theme$confirmation4$2.components) === null || _theme$confirmation4$3 === void 0 ? void 0 : (_theme$confirmation4$4 = _theme$confirmation4$3.phone) === null || _theme$confirmation4$4 === void 0 ? void 0 : _theme$confirmation4$4.hidden;
|
|
194
|
+
var hideBusinessMessages = theme === null || theme === void 0 ? void 0 : (_theme$confirmation5 = theme.confirmation) === null || _theme$confirmation5 === void 0 ? void 0 : (_theme$confirmation5$ = _theme$confirmation5.components) === null || _theme$confirmation5$ === void 0 ? void 0 : (_theme$confirmation5$2 = _theme$confirmation5$.business) === null || _theme$confirmation5$2 === void 0 ? void 0 : (_theme$confirmation5$3 = _theme$confirmation5$2.components) === null || _theme$confirmation5$3 === void 0 ? void 0 : (_theme$confirmation5$4 = _theme$confirmation5$3.messages) === null || _theme$confirmation5$4 === void 0 ? void 0 : _theme$confirmation5$4.hidden;
|
|
195
|
+
var hideBusinessEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation6 = theme.confirmation) === null || _theme$confirmation6 === void 0 ? void 0 : (_theme$confirmation6$ = _theme$confirmation6.components) === null || _theme$confirmation6$ === void 0 ? void 0 : (_theme$confirmation6$2 = _theme$confirmation6$.business) === null || _theme$confirmation6$2 === void 0 ? void 0 : (_theme$confirmation6$3 = _theme$confirmation6$2.components) === null || _theme$confirmation6$3 === void 0 ? void 0 : (_theme$confirmation6$4 = _theme$confirmation6$3.email) === null || _theme$confirmation6$4 === void 0 ? void 0 : _theme$confirmation6$4.hidden;
|
|
196
|
+
var hideBusinessAddress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation7 = theme.confirmation) === null || _theme$confirmation7 === void 0 ? void 0 : (_theme$confirmation7$ = _theme$confirmation7.components) === null || _theme$confirmation7$ === void 0 ? void 0 : (_theme$confirmation7$2 = _theme$confirmation7$.business) === null || _theme$confirmation7$2 === void 0 ? void 0 : (_theme$confirmation7$3 = _theme$confirmation7$2.components) === null || _theme$confirmation7$3 === void 0 ? void 0 : (_theme$confirmation7$4 = _theme$confirmation7$3.address) === null || _theme$confirmation7$4 === void 0 ? void 0 : _theme$confirmation7$4.hidden;
|
|
197
|
+
var hideBusinessMap = theme === null || theme === void 0 ? void 0 : (_theme$confirmation8 = theme.confirmation) === null || _theme$confirmation8 === void 0 ? void 0 : (_theme$confirmation8$ = _theme$confirmation8.components) === null || _theme$confirmation8$ === void 0 ? void 0 : (_theme$confirmation8$2 = _theme$confirmation8$.business) === null || _theme$confirmation8$2 === void 0 ? void 0 : (_theme$confirmation8$3 = _theme$confirmation8$2.components) === null || _theme$confirmation8$3 === void 0 ? void 0 : (_theme$confirmation8$4 = _theme$confirmation8$3.map) === null || _theme$confirmation8$4 === void 0 ? void 0 : _theme$confirmation8$4.hidden;
|
|
198
|
+
var hideDriverName = theme === null || theme === void 0 ? void 0 : (_theme$confirmation9 = theme.confirmation) === null || _theme$confirmation9 === void 0 ? void 0 : (_theme$confirmation9$ = _theme$confirmation9.components) === null || _theme$confirmation9$ === void 0 ? void 0 : (_theme$confirmation9$2 = _theme$confirmation9$.driver) === null || _theme$confirmation9$2 === void 0 ? void 0 : (_theme$confirmation9$3 = _theme$confirmation9$2.components) === null || _theme$confirmation9$3 === void 0 ? void 0 : (_theme$confirmation9$4 = _theme$confirmation9$3.name) === null || _theme$confirmation9$4 === void 0 ? void 0 : _theme$confirmation9$4.hidden;
|
|
199
|
+
var hideDriverPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation10 = theme.confirmation) === null || _theme$confirmation10 === void 0 ? void 0 : (_theme$confirmation11 = _theme$confirmation10.components) === null || _theme$confirmation11 === void 0 ? void 0 : (_theme$confirmation12 = _theme$confirmation11.driver) === null || _theme$confirmation12 === void 0 ? void 0 : (_theme$confirmation13 = _theme$confirmation12.components) === null || _theme$confirmation13 === void 0 ? void 0 : (_theme$confirmation14 = _theme$confirmation13.phone) === null || _theme$confirmation14 === void 0 ? void 0 : _theme$confirmation14.hidden;
|
|
200
|
+
var hideDriverMessages = theme === null || theme === void 0 ? void 0 : (_theme$confirmation15 = theme.confirmation) === null || _theme$confirmation15 === void 0 ? void 0 : (_theme$confirmation16 = _theme$confirmation15.components) === null || _theme$confirmation16 === void 0 ? void 0 : (_theme$confirmation17 = _theme$confirmation16.driver) === null || _theme$confirmation17 === void 0 ? void 0 : (_theme$confirmation18 = _theme$confirmation17.components) === null || _theme$confirmation18 === void 0 ? void 0 : (_theme$confirmation19 = _theme$confirmation18.messages) === null || _theme$confirmation19 === void 0 ? void 0 : _theme$confirmation19.hidden;
|
|
201
|
+
var hideDriverEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation20 = theme.confirmation) === null || _theme$confirmation20 === void 0 ? void 0 : (_theme$confirmation21 = _theme$confirmation20.components) === null || _theme$confirmation21 === void 0 ? void 0 : (_theme$confirmation22 = _theme$confirmation21.driver) === null || _theme$confirmation22 === void 0 ? void 0 : (_theme$confirmation23 = _theme$confirmation22.components) === null || _theme$confirmation23 === void 0 ? void 0 : (_theme$confirmation24 = _theme$confirmation23.email) === null || _theme$confirmation24 === void 0 ? void 0 : _theme$confirmation24.hidden;
|
|
202
|
+
var hideDriverPhoto = theme === null || theme === void 0 ? void 0 : (_theme$confirmation25 = theme.confirmation) === null || _theme$confirmation25 === void 0 ? void 0 : (_theme$confirmation26 = _theme$confirmation25.components) === null || _theme$confirmation26 === void 0 ? void 0 : (_theme$confirmation27 = _theme$confirmation26.driver) === null || _theme$confirmation27 === void 0 ? void 0 : (_theme$confirmation28 = _theme$confirmation27.components) === null || _theme$confirmation28 === void 0 ? void 0 : (_theme$confirmation29 = _theme$confirmation28.photo) === null || _theme$confirmation29 === void 0 ? void 0 : _theme$confirmation29.hidden;
|
|
203
|
+
var hideCustomerPhone = theme === null || theme === void 0 ? void 0 : (_theme$confirmation30 = theme.confirmation) === null || _theme$confirmation30 === void 0 ? void 0 : (_theme$confirmation31 = _theme$confirmation30.components) === null || _theme$confirmation31 === void 0 ? void 0 : (_theme$confirmation32 = _theme$confirmation31.customer) === null || _theme$confirmation32 === void 0 ? void 0 : (_theme$confirmation33 = _theme$confirmation32.components) === null || _theme$confirmation33 === void 0 ? void 0 : (_theme$confirmation34 = _theme$confirmation33.phone) === null || _theme$confirmation34 === void 0 ? void 0 : _theme$confirmation34.hidden;
|
|
204
|
+
var hideCustomerAddress = theme === null || theme === void 0 ? void 0 : (_theme$confirmation35 = theme.confirmation) === null || _theme$confirmation35 === void 0 ? void 0 : (_theme$confirmation36 = _theme$confirmation35.components) === null || _theme$confirmation36 === void 0 ? void 0 : (_theme$confirmation37 = _theme$confirmation36.customer) === null || _theme$confirmation37 === void 0 ? void 0 : (_theme$confirmation38 = _theme$confirmation37.components) === null || _theme$confirmation38 === void 0 ? void 0 : (_theme$confirmation39 = _theme$confirmation38.address) === null || _theme$confirmation39 === void 0 ? void 0 : _theme$confirmation39.hidden;
|
|
205
|
+
var hideCustomerEmail = theme === null || theme === void 0 ? void 0 : (_theme$confirmation40 = theme.confirmation) === null || _theme$confirmation40 === void 0 ? void 0 : (_theme$confirmation41 = _theme$confirmation40.components) === null || _theme$confirmation41 === void 0 ? void 0 : (_theme$confirmation42 = _theme$confirmation41.customer) === null || _theme$confirmation42 === void 0 ? void 0 : (_theme$confirmation43 = _theme$confirmation42.components) === null || _theme$confirmation43 === void 0 ? void 0 : (_theme$confirmation44 = _theme$confirmation43.email) === null || _theme$confirmation44 === void 0 ? void 0 : _theme$confirmation44.hidden;
|
|
206
|
+
var hideCustomerPhoto = theme === null || theme === void 0 ? void 0 : (_theme$confirmation45 = theme.confirmation) === null || _theme$confirmation45 === void 0 ? void 0 : (_theme$confirmation46 = _theme$confirmation45.components) === null || _theme$confirmation46 === void 0 ? void 0 : (_theme$confirmation47 = _theme$confirmation46.customer) === null || _theme$confirmation47 === void 0 ? void 0 : (_theme$confirmation48 = _theme$confirmation47.components) === null || _theme$confirmation48 === void 0 ? void 0 : (_theme$confirmation49 = _theme$confirmation48.photo) === null || _theme$confirmation49 === void 0 ? void 0 : _theme$confirmation49.hidden;
|
|
199
207
|
var validTrackingStatus = [9, 19, 23];
|
|
200
208
|
var mapConfigs = {
|
|
201
209
|
zoom: 15
|
|
@@ -512,15 +520,15 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
512
520
|
images: (_order$business4 = order.business) === null || _order$business4 === void 0 ? void 0 : _order$business4.logo,
|
|
513
521
|
name: (_order$business5 = order.business) === null || _order$business5 === void 0 ? void 0 : _order$business5.name
|
|
514
522
|
}
|
|
515
|
-
})))), (order === null || order === void 0 ? void 0 : order.status) !== 0 && (order === null || order === void 0 ? void 0 : order.integration_id) && /*#__PURE__*/_react.default.createElement("h1", null, t('TICKET', 'Ticket'), ": ", order === null || order === void 0 ? void 0 : order.integration_id),
|
|
523
|
+
})))), (order === null || order === void 0 ? void 0 : order.status) !== 0 && (order === null || order === void 0 ? void 0 : order.integration_id) && /*#__PURE__*/_react.default.createElement("h1", null, t('TICKET', 'Ticket'), ": ", order === null || order === void 0 ? void 0 : order.integration_id), !hideDeliveryType && /*#__PURE__*/_react.default.createElement("p", {
|
|
516
524
|
className: "types"
|
|
517
525
|
}, isService ? t('SERVICE_AT_HOME', 'Service at home') : orderTypes === null || orderTypes === void 0 ? void 0 : (_orderTypes$find = orderTypes.find(function (type) {
|
|
518
526
|
return (order === null || order === void 0 ? void 0 : order.delivery_type) === (type === null || type === void 0 ? void 0 : type.value);
|
|
519
|
-
})) === null || _orderTypes$find === void 0 ? void 0 : _orderTypes$find.text),
|
|
527
|
+
})) === null || _orderTypes$find === void 0 ? void 0 : _orderTypes$find.text), !hideDeliveryDate && /*#__PURE__*/_react.default.createElement("p", {
|
|
520
528
|
className: "date"
|
|
521
|
-
},
|
|
522
|
-
|
|
523
|
-
})), (acceptedStatus.includes(parseInt(order === null || order === void 0 ? void 0 : order.status, 10)) || !isOriginalLayout) && /*#__PURE__*/_react.default.createElement(_styles.ReOrder, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
529
|
+
}, activeStatus.includes(order === null || order === void 0 ? void 0 : order.status) ? /*#__PURE__*/_react.default.createElement(_OrderEta.OrderEta, {
|
|
530
|
+
order: order
|
|
531
|
+
}) : parseDate(order === null || order === void 0 ? void 0 : (_order$reporting_data = order.reporting_data) === null || _order$reporting_data === void 0 ? void 0 : _order$reporting_data.at["status:".concat(order.status)])), (acceptedStatus.includes(parseInt(order === null || order === void 0 ? void 0 : order.status, 10)) || !isOriginalLayout) && !isGiftCardOrder && /*#__PURE__*/_react.default.createElement(_styles.ReOrder, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
524
532
|
color: "primary",
|
|
525
533
|
outline: true,
|
|
526
534
|
onClick: function onClick() {
|
|
@@ -534,7 +542,7 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
534
542
|
return handleClickReorder(order);
|
|
535
543
|
},
|
|
536
544
|
disabled: reorderState === null || reorderState === void 0 ? void 0 : reorderState.loading
|
|
537
|
-
}, reorderState !== null && reorderState !== void 0 && reorderState.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder')))),
|
|
545
|
+
}, reorderState !== null && reorderState !== void 0 && reorderState.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder')))), !hideDeliveryProgress && !isGiftCardOrder && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.StatusBar, {
|
|
538
546
|
percentage: (_getOrderStatus = (0, _utils.getOrderStatus)(order === null || order === void 0 ? void 0 : order.status)) === null || _getOrderStatus === void 0 ? void 0 : _getOrderStatus.percentage
|
|
539
547
|
}), /*#__PURE__*/_react.default.createElement(_styles.OrderStatusAndLinkContainer, null, /*#__PURE__*/_react.default.createElement("p", {
|
|
540
548
|
className: "order-status"
|
|
@@ -550,30 +558,22 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
550
558
|
active: acceptedStatus.includes(parseInt(order === null || order === void 0 ? void 0 : order.status, 10)) && (!(order !== null && order !== void 0 && order.review) || order.driver && !(order !== null && order !== void 0 && order.user_review)) && (!isOrderReviewed || !isProductReviewed || isService && !isProReviewed || !isDriverReviewed)
|
|
551
559
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
552
560
|
onClick: handleOpenReview
|
|
553
|
-
}, t('REVIEW_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.REVIEW_ORDER) || 'Review your Order'))))))), /*#__PURE__*/_react.default.createElement(_styles.OrderBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessExternalWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessWrapper, {
|
|
554
|
-
w: "calc(100% - 20px)"
|
|
555
|
-
|
|
561
|
+
}, t('REVIEW_ORDER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag2 = theme.defaultLanguages) === null || _theme$defaultLanguag2 === void 0 ? void 0 : _theme$defaultLanguag2.REVIEW_ORDER) || 'Review your Order'))))))), !isGiftCardOrder && /*#__PURE__*/_react.default.createElement(_styles.OrderBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessExternalWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessWrapper, {
|
|
562
|
+
w: "calc(100% - 20px)",
|
|
563
|
+
borderTop: !hideDeliveryType && placeSpotTypes.includes(order === null || order === void 0 ? void 0 : order.delivery_type)
|
|
556
564
|
}, isShowBusinessLogo && /*#__PURE__*/_react.default.createElement("img", {
|
|
557
565
|
src: order === null || order === void 0 ? void 0 : (_order$business6 = order.business) === null || _order$business6 === void 0 ? void 0 : _order$business6.logo
|
|
558
566
|
}), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfo, null, /*#__PURE__*/_react.default.createElement("h2", null, order === null || order === void 0 ? void 0 : (_order$business7 = order.business) === null || _order$business7 === void 0 ? void 0 : _order$business7.name), /*#__PURE__*/_react.default.createElement(_ActionsSection.ActionsSection, _extends({}, ActionsSectionProps, {
|
|
559
567
|
actionType: "business",
|
|
560
|
-
showPhone:
|
|
561
|
-
showMessages:
|
|
562
|
-
})),
|
|
568
|
+
showPhone: !hideBusinessPhone,
|
|
569
|
+
showMessages: !hideBusinessMessages
|
|
570
|
+
})), !hideBusinessEmail && /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$business8 = order.business) === null || _order$business8 === void 0 ? void 0 : _order$business8.email), !hideBusinessPhone && /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$business9 = order.business) === null || _order$business9 === void 0 ? void 0 : _order$business9.cellphone), !hideBusinessAddress && /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$business10 = order.business) === null || _order$business10 === void 0 ? void 0 : _order$business10.address), (order === null || order === void 0 ? void 0 : (_order$place = order.place) === null || _order$place === void 0 ? void 0 : _order$place.name) && /*#__PURE__*/_react.default.createElement(_styles.PlaceSpotSection, null, /*#__PURE__*/_react.default.createElement("p", null, yourSpotString, ": ", order === null || order === void 0 ? void 0 : (_order$place2 = order.place) === null || _order$place2 === void 0 ? void 0 : _order$place2.name)), hideOrderActions && /*#__PURE__*/_react.default.createElement(_styles.DirectionButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
563
571
|
color: "primary",
|
|
564
572
|
onClick: function onClick() {
|
|
565
573
|
var _order$business11;
|
|
566
574
|
return window.open("http://maps.google.com/?q=".concat(order === null || order === void 0 ? void 0 : (_order$business11 = order.business) === null || _order$business11 === void 0 ? void 0 : _order$business11.address));
|
|
567
575
|
}
|
|
568
|
-
}, t('GET_DIRECTIONS', 'Get Directions'))))
|
|
569
|
-
isInputMode: true,
|
|
570
|
-
cart: order,
|
|
571
|
-
spotNumberDefault: order === null || order === void 0 ? void 0 : order.spot_number,
|
|
572
|
-
vehicleDefault: order === null || order === void 0 ? void 0 : order.vehicle
|
|
573
|
-
})), showOrderActions && /*#__PURE__*/_react.default.createElement(_styles.BusinessWrapper, {
|
|
574
|
-
w: "calc(100% - 20px)",
|
|
575
|
-
borderTop: true
|
|
576
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.BtsOrderStatus, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
576
|
+
}, t('GET_DIRECTIONS', 'Get Directions')))), !hideOrderActions && /*#__PURE__*/_react.default.createElement(_styles.BtsOrderStatus, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
577
577
|
style: {
|
|
578
578
|
fontSize: 14
|
|
579
579
|
},
|
|
@@ -591,7 +591,12 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
591
591
|
onClick: function onClick() {
|
|
592
592
|
return handleChangeOrderStatus(21);
|
|
593
593
|
}
|
|
594
|
-
}, (_getOrderStatus4 = (0, _utils.getOrderStatus)(21)) === null || _getOrderStatus4 === void 0 ? void 0 : _getOrderStatus4.value))))
|
|
594
|
+
}, (_getOrderStatus4 = (0, _utils.getOrderStatus)(21)) === null || _getOrderStatus4 === void 0 ? void 0 : _getOrderStatus4.value)))), !hideDeliveryType && placeSpotTypes.includes(order === null || order === void 0 ? void 0 : order.delivery_type) && /*#__PURE__*/_react.default.createElement(_styles.PlaceSpotWrapper, null, /*#__PURE__*/_react.default.createElement(_PlaceSpot.PlaceSpot, {
|
|
595
|
+
isInputMode: true,
|
|
596
|
+
cart: order,
|
|
597
|
+
spotNumberDefault: order === null || order === void 0 ? void 0 : order.spot_number,
|
|
598
|
+
vehicleDefault: order === null || order === void 0 ? void 0 : order.vehicle
|
|
599
|
+
}))), googleMapsApiKey && !hideBusinessMap && /*#__PURE__*/_react.default.createElement(_styles.MapWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.Map, {
|
|
595
600
|
style: {
|
|
596
601
|
width: '100%'
|
|
597
602
|
}
|
|
@@ -602,17 +607,17 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
602
607
|
width: "100%",
|
|
603
608
|
height: "100%",
|
|
604
609
|
loading: "lazy"
|
|
605
|
-
})))), /*#__PURE__*/_react.default.createElement(_styles.OrderCustomer, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessWrapper, null,
|
|
610
|
+
})))), /*#__PURE__*/_react.default.createElement(_styles.OrderCustomer, null, /*#__PURE__*/_react.default.createElement(_styles.BusinessWrapper, null, !hideCustomerPhoto && (order === null || order === void 0 ? void 0 : (_order$customer3 = order.customer) === null || _order$customer3 === void 0 ? void 0 : _order$customer3.photo) && /*#__PURE__*/_react.default.createElement("img", {
|
|
606
611
|
src: order === null || order === void 0 ? void 0 : (_order$customer4 = order.customer) === null || _order$customer4 === void 0 ? void 0 : _order$customer4.photo
|
|
607
|
-
}), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfo, null, /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$customer5 = order.customer) === null || _order$customer5 === void 0 ? void 0 : _order$customer5.name, " ", order === null || order === void 0 ? void 0 : (_order$customer6 = order.customer) === null || _order$customer6 === void 0 ? void 0 : _order$customer6.lastname),
|
|
612
|
+
}), /*#__PURE__*/_react.default.createElement(_styles.BusinessInfo, null, /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$customer5 = order.customer) === null || _order$customer5 === void 0 ? void 0 : _order$customer5.name, " ", order === null || order === void 0 ? void 0 : (_order$customer6 = order.customer) === null || _order$customer6 === void 0 ? void 0 : _order$customer6.lastname), !hideCustomerEmail && /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$customer7 = order.customer) === null || _order$customer7 === void 0 ? void 0 : _order$customer7.email), !hideCustomerPhone && /*#__PURE__*/_react.default.createElement("p", null, (order === null || order === void 0 ? void 0 : (_order$customer8 = order.customer) === null || _order$customer8 === void 0 ? void 0 : _order$customer8.cellphone) || (order === null || order === void 0 ? void 0 : (_order$customer9 = order.customer) === null || _order$customer9 === void 0 ? void 0 : _order$customer9.phone)), !hideCustomerAddress && /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$customer10 = order.customer) === null || _order$customer10 === void 0 ? void 0 : _order$customer10.address)))), (order === null || order === void 0 ? void 0 : order.driver) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.OrderDriver, null, /*#__PURE__*/_react.default.createElement(_styles.SectionTitleContainer, null, /*#__PURE__*/_react.default.createElement("h2", null, t('DRIVER', (theme === null || theme === void 0 ? void 0 : (_theme$defaultLanguag3 = theme.defaultLanguages) === null || _theme$defaultLanguag3 === void 0 ? void 0 : _theme$defaultLanguag3.DRIVER) || 'Driver')), /*#__PURE__*/_react.default.createElement(_ActionsSection.ActionsSection, _extends({}, ActionsSectionProps, {
|
|
608
613
|
actionType: "driver",
|
|
609
|
-
showPhone:
|
|
610
|
-
showMessages:
|
|
611
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.WrapperDriver, null,
|
|
614
|
+
showPhone: !hideDriverPhone,
|
|
615
|
+
showMessages: !hideDriverMessages
|
|
616
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.WrapperDriver, null, !hideDriverPhoto && /*#__PURE__*/_react.default.createElement("div", {
|
|
612
617
|
className: "photo"
|
|
613
618
|
}, order !== null && order !== void 0 && (_order$driver5 = order.driver) !== null && _order$driver5 !== void 0 && _order$driver5.photo ? /*#__PURE__*/_react.default.createElement(_styles.PhotoBlock, {
|
|
614
619
|
src: order === null || order === void 0 ? void 0 : (_order$driver6 = order.driver) === null || _order$driver6 === void 0 ? void 0 : _order$driver6.photo
|
|
615
|
-
}) : /*#__PURE__*/_react.default.createElement(_RiUser2Fill.default, null)), /*#__PURE__*/_react.default.createElement("div", null,
|
|
620
|
+
}) : /*#__PURE__*/_react.default.createElement(_RiUser2Fill.default, null)), /*#__PURE__*/_react.default.createElement("div", null, !hideDriverName && /*#__PURE__*/_react.default.createElement("h2", null, order === null || order === void 0 ? void 0 : (_order$driver7 = order.driver) === null || _order$driver7 === void 0 ? void 0 : _order$driver7.name, " ", order === null || order === void 0 ? void 0 : (_order$driver8 = order.driver) === null || _order$driver8 === void 0 ? void 0 : _order$driver8.lastname), !hideDriverEmail && /*#__PURE__*/_react.default.createElement("p", null, order === null || order === void 0 ? void 0 : (_order$driver9 = order.driver) === null || _order$driver9 === void 0 ? void 0 : _order$driver9.email), !hideDriverPhone && /*#__PURE__*/_react.default.createElement("p", null, (order === null || order === void 0 ? void 0 : (_order$driver10 = order.driver) === null || _order$driver10 === void 0 ? void 0 : _order$driver10.cellphone) || (order === null || order === void 0 ? void 0 : (_order$driver11 = order.driver) === null || _order$driver11 === void 0 ? void 0 : _order$driver11.phone))))), (order === null || order === void 0 ? void 0 : (_order$driver12 = order.driver) === null || _order$driver12 === void 0 ? void 0 : _order$driver12.location) && validTrackingStatus.includes(parseInt(order === null || order === void 0 ? void 0 : order.status)) && /*#__PURE__*/_react.default.createElement(_styles.Map, {
|
|
616
621
|
style: {
|
|
617
622
|
width: '100%'
|
|
618
623
|
}
|
|
@@ -624,7 +629,7 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
624
629
|
locations: parsedLocations,
|
|
625
630
|
mapControls: googleMapsControls,
|
|
626
631
|
apiKey: configs === null || configs === void 0 ? void 0 : (_configs$google_maps_2 = configs.google_maps_api_key) === null || _configs$google_maps_2 === void 0 ? void 0 : _configs$google_maps_2.value
|
|
627
|
-
}))), ((order === null || order === void 0 ? void 0 : order.delivery_type) === 1 || (order === null || order === void 0 ? void 0 : order.comment)) && /*#__PURE__*/_react.default.createElement(_styles.OrderPreferences, null, /*#__PURE__*/_react.default.createElement(_OrderPreferencesSections.OrderPreferencesSection, {
|
|
632
|
+
}))), ((order === null || order === void 0 ? void 0 : order.delivery_type) === 1 || (order === null || order === void 0 ? void 0 : order.comment)) && !isGiftCardOrder && /*#__PURE__*/_react.default.createElement(_styles.OrderPreferences, null, /*#__PURE__*/_react.default.createElement(_OrderPreferencesSections.OrderPreferencesSection, {
|
|
628
633
|
order: order,
|
|
629
634
|
placeSpotTypes: placeSpotTypes
|
|
630
635
|
}))), /*#__PURE__*/_react.default.createElement(_styles.WrapperRightContainer, null, /*#__PURE__*/_react.default.createElement(_styles.OrderProducts, null, /*#__PURE__*/_react.default.createElement(_styles.HeaderTitle, null, /*#__PURE__*/_react.default.createElement(_OrderHeaderInfoSection.OrderHeaderInfoSection, {
|
|
@@ -636,7 +641,10 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
636
641
|
})), sortedProductList, /*#__PURE__*/_react.default.createElement(_OrderBillSection.OrderBillSection, {
|
|
637
642
|
order: order,
|
|
638
643
|
setOpenTaxModal: setOpenTaxModal
|
|
639
|
-
})))
|
|
644
|
+
}))), isGiftCardOrder && (order === null || order === void 0 ? void 0 : (_order$products$ = order.products[0]) === null || _order$products$ === void 0 ? void 0 : (_order$products$$gift = _order$products$.gift_card) === null || _order$products$$gift === void 0 ? void 0 : _order$products$$gift.status) === 'pending' && !isGiftCardSent && /*#__PURE__*/_react.default.createElement(_SendGiftCard.SendGiftCard, {
|
|
645
|
+
giftCardId: order === null || order === void 0 ? void 0 : (_order$products$2 = order.products[0]) === null || _order$products$2 === void 0 ? void 0 : (_order$products$2$gif = _order$products$2.gift_card) === null || _order$products$2$gif === void 0 ? void 0 : _order$products$2$gif.id,
|
|
646
|
+
setIsGiftCardSent: setIsGiftCardSent
|
|
647
|
+
})), (openMessages.driver || openMessages.business) && /*#__PURE__*/_react.default.createElement(_Messages.Messages, {
|
|
640
648
|
orderId: order === null || order === void 0 ? void 0 : order.id,
|
|
641
649
|
order: order,
|
|
642
650
|
business: openMessages.business,
|
|
@@ -26,7 +26,7 @@ var Content = _styledComponents.default.div(_templateObject5 || (_templateObject
|
|
|
26
26
|
exports.Content = Content;
|
|
27
27
|
var OrderBusiness = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n box-sizing: border-box;\n width: 100%;\n flex-direction: column;\n align-items: flex-start;\n border-radius: 7.6px;\n padding: 20px;\n margin-bottom: 20px;\n box-shadow: 0px 4px 10px 0px #0000001F;\n @media (min-width: 769px) {\n flex-direction: row;\n }\n"])));
|
|
28
28
|
exports.OrderBusiness = OrderBusiness;
|
|
29
|
-
var BusinessWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n display: flex;\n align-items: center;\n flex-direction: column;\n ", "\n ", "\n img {\n width: 100px;\n height: 100px;\n border-radius: 7.6px;\n margin-right: 0;\n @media (min-width: 400px) {\n margin-right: 40px;\n }\n }\n @media (min-width: 400px) {\n
|
|
29
|
+
var BusinessWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n display: flex;\n align-items: center;\n flex-direction: column;\n ", "\n ", "\n img {\n width: 100px;\n height: 100px;\n border-radius: 7.6px;\n margin-right: 0;\n @media (min-width: 400px) {\n margin-right: 40px;\n }\n }\n @media (min-width: 400px) {\n width: ", ";\n }\n"])), function (props) {
|
|
30
30
|
return props.borderBottom && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding-bottom: 15px;\n border-bottom: 1px solid ", ";\n "])), function (props) {
|
|
31
31
|
return props.theme.colors.lightGray;
|
|
32
32
|
});
|
|
@@ -10,14 +10,14 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top:
|
|
13
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 5px;\n margin: 0px;\n ", "\n ", "\n @media (min-width: 993px) {\n margin-right: 30px;\n }\n"])), function (props) {
|
|
14
14
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 30px;\n margin-right: 0px;\n "])));
|
|
15
15
|
}, function (_ref) {
|
|
16
16
|
var isGroceries = _ref.isGroceries;
|
|
17
17
|
return isGroceries && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-top: 0px;\n margin-right: 0px;\n margin-left: 0px;\n "])));
|
|
18
18
|
});
|
|
19
19
|
exports.Container = Container;
|
|
20
|
-
var ContentHeader = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-bottom:
|
|
20
|
+
var ContentHeader = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-bottom: 15px;\n > h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 36px;\n margin: 0px;\n }\n p {\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n margin: 0px;\n color: ", ";\n }\n ", "\n"])), function (props) {
|
|
21
21
|
return props.theme.colors.darkGray;
|
|
22
22
|
}, function (_ref2) {
|
|
23
23
|
var isGroceries = _ref2.isGroceries;
|
|
@@ -28,7 +28,7 @@ var ContentHeader = _styledComponents.default.div(_templateObject4 || (_template
|
|
|
28
28
|
exports.ContentHeader = ContentHeader;
|
|
29
29
|
var ProductListWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n overflow: auto hidden;\n width: 100%;\n ::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n"])));
|
|
30
30
|
exports.ProductListWrapper = ProductListWrapper;
|
|
31
|
-
var ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n
|
|
31
|
+
var ProductList = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n align-items: center;\n button {\n padding: 0px;\n }\n #orderItAgain > div {\n width: 350px;\n ", "\n }\n"])), function (_ref3) {
|
|
32
32
|
var _theme$business_view, _theme$business_view$, _theme$business_view$2, _theme$business_view$3, _theme$business_view$4;
|
|
33
33
|
var theme = _ref3.theme;
|
|
34
34
|
return (theme === null || theme === void 0 ? void 0 : (_theme$business_view = theme.business_view) === null || _theme$business_view === void 0 ? void 0 : (_theme$business_view$ = _theme$business_view.components) === null || _theme$business_view$ === void 0 ? void 0 : (_theme$business_view$2 = _theme$business_view$.products) === null || _theme$business_view$2 === void 0 ? void 0 : (_theme$business_view$3 = _theme$business_view$2.components) === null || _theme$business_view$3 === void 0 ? void 0 : (_theme$business_view$4 = _theme$business_view$3.layout) === null || _theme$business_view$4 === void 0 ? void 0 : _theme$business_view$4.type) === 'starbucks' && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 230px;\n "])));
|
|
@@ -8,10 +8,10 @@ exports.OrderProgress = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
10
|
var _Buttons = require("../../styles/Buttons");
|
|
11
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
12
11
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
13
12
|
var _styledComponents = require("styled-components");
|
|
14
13
|
var _BsArrowRight = _interopRequireDefault(require("@meronex/icons/bs/BsArrowRight"));
|
|
14
|
+
var _OrderEta = require("../OrderDetails/OrderEta");
|
|
15
15
|
var _styles = require("./styles");
|
|
16
16
|
var _utils = require("../../../../../utils");
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -39,7 +39,6 @@ var OrderProgressUI = function OrderProgressUI(props) {
|
|
|
39
39
|
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
40
40
|
_useUtils2$ = _useUtils2[0],
|
|
41
41
|
optimizeImage = _useUtils2$.optimizeImage,
|
|
42
|
-
parseDate = _useUtils2$.parseDate,
|
|
43
42
|
parseTime = _useUtils2$.parseTime;
|
|
44
43
|
var theme = (0, _styledComponents.useTheme)();
|
|
45
44
|
var _useEvent = (0, _orderingComponentsExternal.useEvent)(),
|
|
@@ -49,17 +48,6 @@ var OrderProgressUI = function OrderProgressUI(props) {
|
|
|
49
48
|
_useState2 = _slicedToArray(_useState, 2),
|
|
50
49
|
lastOrder = _useState2[0],
|
|
51
50
|
setLastOrder = _useState2[1];
|
|
52
|
-
var convertDiffToHours = function convertDiffToHours(time) {
|
|
53
|
-
if (!time) return;
|
|
54
|
-
var deliveryTime = lastOrder !== null && lastOrder !== void 0 && lastOrder.delivery_datetime_utc ? parseDate(lastOrder === null || lastOrder === void 0 ? void 0 : lastOrder.delivery_datetime_utc, {
|
|
55
|
-
outputFormat: 'YYYY-MM-DD hh:mm A'
|
|
56
|
-
}) : parseDate(lastOrder === null || lastOrder === void 0 ? void 0 : lastOrder.delivery_datetime, {
|
|
57
|
-
utc: false,
|
|
58
|
-
outputFormat: 'YYYY-MM-DD hh:mm A'
|
|
59
|
-
});
|
|
60
|
-
var returnedDate = (0, _moment.default)(new Date(deliveryTime.replace(/-/g, '/'))).add(time, 'minutes').format('hh:mm A');
|
|
61
|
-
return returnedDate;
|
|
62
|
-
};
|
|
63
51
|
var handleGoToPage = function handleGoToPage(index) {
|
|
64
52
|
events.emit('go_to_page', {
|
|
65
53
|
page: index,
|
|
@@ -98,7 +86,10 @@ var OrderProgressUI = function OrderProgressUI(props) {
|
|
|
98
86
|
outputFormat: 'hh:mm A'
|
|
99
87
|
}) : parseTime(lastOrder === null || lastOrder === void 0 ? void 0 : lastOrder.delivery_datetime, {
|
|
100
88
|
utc: false
|
|
101
|
-
}), "\xA0-\xA0",
|
|
89
|
+
}), "\xA0-\xA0", /*#__PURE__*/_react.default.createElement(_OrderEta.OrderEta, {
|
|
90
|
+
order: lastOrder,
|
|
91
|
+
outputFormat: "hh:mm A"
|
|
92
|
+
}))))))));
|
|
102
93
|
};
|
|
103
94
|
var OrderProgress = function OrderProgress(props) {
|
|
104
95
|
var orderProgressProps = _objectSpread(_objectSpread({}, props), {}, {
|