ordering-ui-admin-external 1.37.1 → 1.37.3
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/{ordering-ui-admin.3fe2dc8a61cda66ab217.js → ordering-ui-admin.316f4761de9be1fdca7c.js} +2 -2
- package/_modules/components/BusinessIntelligence/InvoiceBusinessPdf/index.js +5 -8
- package/_modules/components/BusinessIntelligence/InvoiceDriverPdf/index.js +5 -8
- package/_modules/components/Delivery/AddressForm/index.js +5 -8
- package/_modules/components/Delivery/DeliveryUsersListing/index.js +9 -14
- package/_modules/components/Delivery/DriversGroupsListing/index.js +5 -8
- package/_modules/components/Marketing/BannerImageDetails/index.js +5 -8
- package/_modules/components/OrderingProducts/SiteTheme/ThemeImage.js +5 -7
- package/_modules/components/Orders/CreateCustomOrder/Checkout/index.js +5 -8
- package/_modules/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +5 -8
- package/_modules/components/Orders/OrderContactInformation/index.js +5 -8
- package/_modules/components/Orders/OrdersCards/index.js +32 -81
- package/_modules/components/Orders/OrdersTable/index.js +39 -89
- package/_modules/components/Orders/OrdersTable/styles.js +2 -2
- package/_modules/components/Shared/ImageCrop/index.js +5 -7
- package/_modules/components/SidebarMenu/index.js +5 -8
- package/_modules/components/Stores/BusinessDeliveryGroupsDetails/index.js +5 -8
- package/_modules/components/Stores/BusinessLocation/index.js +5 -8
- package/_modules/components/Stores/BusinessServiceProfessionalDetail/index.js +10 -15
- package/_modules/components/Stores/BusinessesListing/index.js +5 -8
- package/_modules/components/Stores/ProductDetailsAdvanced/index.js +5 -8
- package/_modules/components/Stores/ProductExtras/index.js +5 -7
- package/_modules/utils/index.js +13 -21
- package/package.json +2 -2
- package/src/components/Orders/OrdersCards/index.js +30 -31
- package/src/components/Orders/OrdersTable/index.js +41 -42
- package/src/components/Orders/OrdersTable/styles.js +26 -24
- /package/_bundles/{ordering-ui-admin.3fe2dc8a61cda66ab217.js.LICENSE.txt → ordering-ui-admin.316f4761de9be1fdca7c.js.LICENSE.txt} +0 -0
|
@@ -21,7 +21,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
21
21
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
23
|
var InvoiceBusinessPdf = function InvoiceBusinessPdf(props) {
|
|
24
|
-
var _theme$images, _exportInvoiceList$in, _exportInvoiceList$in2, _exportInvoiceList$in3, _exportInvoiceList$in4, _exportInvoiceList$in5, _exportInvoiceList$in6, _exportInvoiceList$in7, _exportInvoiceList$in8, _exportInvoiceList$in9, _exportInvoiceList$in10, _exportInvoiceList$in11, _exportInvoiceList$in12, _exportInvoiceList$in13, _exportInvoiceList$in14, _exportInvoiceList$in15, _exportInvoiceList$in16, _exportInvoiceList$in17, _exportInvoiceList$in18, _exportInvoiceList$in19, _exportInvoiceList$in20, _exportInvoiceList$in21, _exportInvoiceList$in22, _exportInvoiceList$in23, _exportInvoiceList$in24, _exportInvoiceList$in25, _exportInvoiceList$in26, _exportInvoiceList$in27, _exportInvoiceList$in28, _exportInvoiceList$in29, _exportInvoiceList$in30;
|
|
24
|
+
var _theme$images, _ref, _exportInvoiceList$in, _exportInvoiceList$in2, _exportInvoiceList$in3, _exportInvoiceList$in4, _exportInvoiceList$in5, _exportInvoiceList$in6, _exportInvoiceList$in7, _exportInvoiceList$in8, _exportInvoiceList$in9, _exportInvoiceList$in10, _exportInvoiceList$in11, _exportInvoiceList$in12, _exportInvoiceList$in13, _exportInvoiceList$in14, _exportInvoiceList$in15, _exportInvoiceList$in16, _exportInvoiceList$in17, _exportInvoiceList$in18, _exportInvoiceList$in19, _exportInvoiceList$in20, _exportInvoiceList$in21, _exportInvoiceList$in22, _exportInvoiceList$in23, _exportInvoiceList$in24, _exportInvoiceList$in25, _exportInvoiceList$in26, _exportInvoiceList$in27, _exportInvoiceList$in28, _exportInvoiceList$in29, _exportInvoiceList$in30;
|
|
25
25
|
var exportInvoiceList = props.exportInvoiceList,
|
|
26
26
|
getSubtotal = props.getSubtotal,
|
|
27
27
|
getTotal = props.getTotal;
|
|
@@ -238,8 +238,8 @@ var InvoiceBusinessPdf = function InvoiceBusinessPdf(props) {
|
|
|
238
238
|
_useState2 = _slicedToArray(_useState, 2),
|
|
239
239
|
base64ImageString = _useState2[0],
|
|
240
240
|
setBase64ImageString = _useState2[1];
|
|
241
|
-
var getBase64ImageFromUrl =
|
|
242
|
-
|
|
241
|
+
var getBase64ImageFromUrl = function getBase64ImageFromUrl(_x) {
|
|
242
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(imageUrl) {
|
|
243
243
|
var response, blob;
|
|
244
244
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
245
245
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -267,11 +267,8 @@ var InvoiceBusinessPdf = function InvoiceBusinessPdf(props) {
|
|
|
267
267
|
return _context.stop();
|
|
268
268
|
}
|
|
269
269
|
}, _callee);
|
|
270
|
-
}));
|
|
271
|
-
|
|
272
|
-
return _ref.apply(this, arguments);
|
|
273
|
-
};
|
|
274
|
-
}();
|
|
270
|
+
}))).apply(this, arguments);
|
|
271
|
+
};
|
|
275
272
|
(0, _react.useEffect)(function () {
|
|
276
273
|
getBase64ImageFromUrl(logoImage).then(function (base64) {
|
|
277
274
|
setBase64ImageString(base64);
|
|
@@ -21,7 +21,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
21
21
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
23
|
var InvoiceDriverPdf = function InvoiceDriverPdf(props) {
|
|
24
|
-
var _theme$images, _exportInvoiceList$in, _exportInvoiceList$in2, _exportInvoiceList$in3, _exportInvoiceList$in4, _exportInvoiceList$in5, _exportInvoiceList$in6, _exportInvoiceList$in7, _exportInvoiceList$in8, _exportInvoiceList$in9, _exportInvoiceList$in10, _exportInvoiceList$in11, _exportInvoiceList$in12, _exportInvoiceList$in13, _exportInvoiceList$in14, _exportInvoiceList$in15, _exportInvoiceList$in16, _exportInvoiceList$in17, _exportInvoiceList$in18, _exportInvoiceList$in19, _exportInvoiceList$in20, _exportInvoiceList$in21, _exportInvoiceList$in22, _exportInvoiceList$in23, _exportInvoiceList$in24, _exportInvoiceList$in25, _exportInvoiceList$in26;
|
|
24
|
+
var _theme$images, _ref, _exportInvoiceList$in, _exportInvoiceList$in2, _exportInvoiceList$in3, _exportInvoiceList$in4, _exportInvoiceList$in5, _exportInvoiceList$in6, _exportInvoiceList$in7, _exportInvoiceList$in8, _exportInvoiceList$in9, _exportInvoiceList$in10, _exportInvoiceList$in11, _exportInvoiceList$in12, _exportInvoiceList$in13, _exportInvoiceList$in14, _exportInvoiceList$in15, _exportInvoiceList$in16, _exportInvoiceList$in17, _exportInvoiceList$in18, _exportInvoiceList$in19, _exportInvoiceList$in20, _exportInvoiceList$in21, _exportInvoiceList$in22, _exportInvoiceList$in23, _exportInvoiceList$in24, _exportInvoiceList$in25, _exportInvoiceList$in26;
|
|
25
25
|
var exportInvoiceList = props.exportInvoiceList,
|
|
26
26
|
getSubtotal = props.getSubtotal,
|
|
27
27
|
getTotal = props.getTotal;
|
|
@@ -228,8 +228,8 @@ var InvoiceDriverPdf = function InvoiceDriverPdf(props) {
|
|
|
228
228
|
_useState2 = _slicedToArray(_useState, 2),
|
|
229
229
|
base64ImageString = _useState2[0],
|
|
230
230
|
setBase64ImageString = _useState2[1];
|
|
231
|
-
var getBase64ImageFromUrl =
|
|
232
|
-
|
|
231
|
+
var getBase64ImageFromUrl = function getBase64ImageFromUrl(_x) {
|
|
232
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(imageUrl) {
|
|
233
233
|
var response, blob;
|
|
234
234
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
235
235
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -257,11 +257,8 @@ var InvoiceDriverPdf = function InvoiceDriverPdf(props) {
|
|
|
257
257
|
return _context.stop();
|
|
258
258
|
}
|
|
259
259
|
}, _callee);
|
|
260
|
-
}));
|
|
261
|
-
|
|
262
|
-
return _ref.apply(this, arguments);
|
|
263
|
-
};
|
|
264
|
-
}();
|
|
260
|
+
}))).apply(this, arguments);
|
|
261
|
+
};
|
|
265
262
|
(0, _react.useEffect)(function () {
|
|
266
263
|
getBase64ImageFromUrl(logoImage).then(function (base64) {
|
|
267
264
|
setBase64ImageString(base64);
|
|
@@ -50,7 +50,7 @@ var inputNames = [{
|
|
|
50
50
|
code: 'Address notes'
|
|
51
51
|
}];
|
|
52
52
|
var AddressFormUI = function AddressFormUI(props) {
|
|
53
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
53
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _configState$configs, _configState$configs2, _configState$configs3, _configState$configs4, _ref2, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _props$afterComponent, _props$afterElements;
|
|
54
54
|
var addressesList = props.addressesList,
|
|
55
55
|
googleMapsControls = props.googleMapsControls,
|
|
56
56
|
formState = props.formState,
|
|
@@ -223,8 +223,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
223
223
|
e.preventDefault();
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
var onSubmit =
|
|
227
|
-
|
|
226
|
+
var onSubmit = function onSubmit() {
|
|
227
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
228
228
|
var _formState$changes3, _addressState$address6, _formState$changes4, _formState$changes5, _arrayList$map$some2;
|
|
229
229
|
var _formState$changes6, arrayList, addressToCompare, isAddressAlreadyExist;
|
|
230
230
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -285,11 +285,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
285
285
|
return _context.stop();
|
|
286
286
|
}
|
|
287
287
|
}, _callee);
|
|
288
|
-
}));
|
|
289
|
-
|
|
290
|
-
return _ref2.apply(this, arguments);
|
|
291
|
-
};
|
|
292
|
-
}();
|
|
288
|
+
}))).apply(this, arguments);
|
|
289
|
+
};
|
|
293
290
|
var handleAddressTag = function handleAddressTag(tag) {
|
|
294
291
|
setAddressTag(tag);
|
|
295
292
|
handleChangeInput({
|
|
@@ -35,6 +35,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
35
35
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
var DeliveryUsersListingUI = function DeliveryUsersListingUI(props) {
|
|
38
|
+
var _ref, _ref2;
|
|
38
39
|
var defaultUserTypesSelected = props.defaultUserTypesSelected,
|
|
39
40
|
disabledActiveStateCondition = props.disabledActiveStateCondition,
|
|
40
41
|
headerTitle = props.headerTitle,
|
|
@@ -163,8 +164,8 @@ var DeliveryUsersListingUI = function DeliveryUsersListingUI(props) {
|
|
|
163
164
|
setIsTourOpen(false);
|
|
164
165
|
}
|
|
165
166
|
};
|
|
166
|
-
var handleSetStorage =
|
|
167
|
-
|
|
167
|
+
var handleSetStorage = function handleSetStorage() {
|
|
168
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
168
169
|
var preVisited, visited;
|
|
169
170
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
170
171
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -191,13 +192,10 @@ var DeliveryUsersListingUI = function DeliveryUsersListingUI(props) {
|
|
|
191
192
|
return _context.stop();
|
|
192
193
|
}
|
|
193
194
|
}, _callee);
|
|
194
|
-
}));
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}();
|
|
199
|
-
var getDataFromStorage = /*#__PURE__*/function () {
|
|
200
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
195
|
+
}))).apply(this, arguments);
|
|
196
|
+
};
|
|
197
|
+
var getDataFromStorage = function getDataFromStorage() {
|
|
198
|
+
return (_ref2 = _ref2 || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
201
199
|
var value;
|
|
202
200
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
203
201
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -215,11 +213,8 @@ var DeliveryUsersListingUI = function DeliveryUsersListingUI(props) {
|
|
|
215
213
|
return _context2.stop();
|
|
216
214
|
}
|
|
217
215
|
}, _callee2);
|
|
218
|
-
}));
|
|
219
|
-
|
|
220
|
-
return _ref2.apply(this, arguments);
|
|
221
|
-
};
|
|
222
|
-
}();
|
|
216
|
+
}))).apply(this, arguments);
|
|
217
|
+
};
|
|
223
218
|
(0, _react.useEffect)(function () {
|
|
224
219
|
if (usersList.loading) return;
|
|
225
220
|
handleSetStorage();
|
|
@@ -36,7 +36,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
36
36
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
37
37
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
38
|
var DriversGroupsListingUI = function DriversGroupsListingUI(props) {
|
|
39
|
-
var _history$location2;
|
|
39
|
+
var _history$location2, _ref;
|
|
40
40
|
var driversGroupsState = props.driversGroupsState,
|
|
41
41
|
setDriversGroupsState = props.setDriversGroupsState,
|
|
42
42
|
driversManagersList = props.driversManagersList,
|
|
@@ -170,8 +170,8 @@ var DriversGroupsListingUI = function DriversGroupsListingUI(props) {
|
|
|
170
170
|
setCurrentTourStep(7);
|
|
171
171
|
}, 50);
|
|
172
172
|
};
|
|
173
|
-
var getDataFromStorage =
|
|
174
|
-
|
|
173
|
+
var getDataFromStorage = function getDataFromStorage() {
|
|
174
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
175
175
|
var value;
|
|
176
176
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
177
177
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -189,11 +189,8 @@ var DriversGroupsListingUI = function DriversGroupsListingUI(props) {
|
|
|
189
189
|
return _context.stop();
|
|
190
190
|
}
|
|
191
191
|
}, _callee);
|
|
192
|
-
}));
|
|
193
|
-
|
|
194
|
-
return _ref.apply(this, arguments);
|
|
195
|
-
};
|
|
196
|
-
}();
|
|
192
|
+
}))).apply(this, arguments);
|
|
193
|
+
};
|
|
197
194
|
var handleCloseDetail = function handleCloseDetail() {
|
|
198
195
|
setCurDriversGroup(null);
|
|
199
196
|
setOpenDetails(false);
|
|
@@ -128,11 +128,12 @@ var BannerImageDetailsUI = function BannerImageDetailsUI(props) {
|
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
130
|
var onDeleteImage = function onDeleteImage(id) {
|
|
131
|
+
var _handleOnAccept;
|
|
131
132
|
setConfirm({
|
|
132
133
|
open: true,
|
|
133
134
|
content: t('QUESTION_DELETE_ITEM', 'Are you sure to delete this _item_?').replace('_item_', t('IMAGE', 'Image')),
|
|
134
|
-
handleOnAccept: function () {
|
|
135
|
-
|
|
135
|
+
handleOnAccept: function handleOnAccept() {
|
|
136
|
+
return (_handleOnAccept = _handleOnAccept || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
136
137
|
var _imageState$image;
|
|
137
138
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
138
139
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -149,12 +150,8 @@ var BannerImageDetailsUI = function BannerImageDetailsUI(props) {
|
|
|
149
150
|
return _context.stop();
|
|
150
151
|
}
|
|
151
152
|
}, _callee);
|
|
152
|
-
}));
|
|
153
|
-
|
|
154
|
-
return _handleOnAccept.apply(this, arguments);
|
|
155
|
-
}
|
|
156
|
-
return handleOnAccept;
|
|
157
|
-
}()
|
|
153
|
+
}))).apply(this, arguments);
|
|
154
|
+
}
|
|
158
155
|
});
|
|
159
156
|
};
|
|
160
157
|
(0, _react.useEffect)(function () {
|
|
@@ -30,6 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
30
30
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
31
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
32
|
var ThemeImage = function ThemeImage(props) {
|
|
33
|
+
var _ref;
|
|
33
34
|
var isMarginTop = props.isMarginTop,
|
|
34
35
|
valueObject = props.valueObject,
|
|
35
36
|
handleAddThemeGallery = props.handleAddThemeGallery,
|
|
@@ -98,8 +99,8 @@ var ThemeImage = function ThemeImage(props) {
|
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
};
|
|
101
|
-
var handleChangePhoto =
|
|
102
|
-
|
|
102
|
+
var handleChangePhoto = function handleChangePhoto(_x) {
|
|
103
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(croppedImg) {
|
|
103
104
|
var _yield$handleAddTheme, error, result;
|
|
104
105
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
105
106
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -150,11 +151,8 @@ var ThemeImage = function ThemeImage(props) {
|
|
|
150
151
|
return _context.stop();
|
|
151
152
|
}
|
|
152
153
|
}, _callee, null, [[0, 13]]);
|
|
153
|
-
}));
|
|
154
|
-
|
|
155
|
-
return _ref.apply(this, arguments);
|
|
156
|
-
};
|
|
157
|
-
}();
|
|
154
|
+
}))).apply(this, arguments);
|
|
155
|
+
};
|
|
158
156
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ComponentImage, {
|
|
159
157
|
isMarginTop: isMarginTop,
|
|
160
158
|
onClick: function onClick() {
|
|
@@ -250,7 +250,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
250
250
|
}));
|
|
251
251
|
};
|
|
252
252
|
var Checkout = function Checkout(props) {
|
|
253
|
-
var _Object$values, _cartState$error, _cartState$cart2;
|
|
253
|
+
var _Object$values, _ref, _cartState$error, _cartState$cart2;
|
|
254
254
|
var errors = props.errors,
|
|
255
255
|
clearErrors = props.clearErrors,
|
|
256
256
|
cartUuid = props.cartUuid,
|
|
@@ -325,8 +325,8 @@ var Checkout = function Checkout(props) {
|
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
}, [errors]);
|
|
328
|
-
var getOrder =
|
|
329
|
-
|
|
328
|
+
var getOrder = function getOrder(_x) {
|
|
329
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartId) {
|
|
330
330
|
var _result$order, result, cart, userCustomer, url, response, content, _result, credomaticData, urlParams, paramsObj, _confirmCartRes$resul, confirmCartRes, _cart, spotNumberFromStorage, _JSON$parse, _JSON$parse2, _cart2, spotNumber, slug;
|
|
331
331
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
332
332
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -452,11 +452,8 @@ var Checkout = function Checkout(props) {
|
|
|
452
452
|
return _context.stop();
|
|
453
453
|
}
|
|
454
454
|
}, _callee, null, [[0, 45], [25, 34]]);
|
|
455
|
-
}));
|
|
456
|
-
|
|
457
|
-
return _ref.apply(this, arguments);
|
|
458
|
-
};
|
|
459
|
-
}();
|
|
455
|
+
}))).apply(this, arguments);
|
|
456
|
+
};
|
|
460
457
|
(0, _react.useEffect)(function () {
|
|
461
458
|
if (token && cartUuid) {
|
|
462
459
|
getOrder(cartUuid);
|
|
@@ -51,7 +51,7 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
|
|
|
51
51
|
var googlePayMethods = ['google_pay', 'global_google_pay'];
|
|
52
52
|
(0, _react.useEffect)(function () {
|
|
53
53
|
if (stripe) {
|
|
54
|
-
var _configs$stripe_curre, _configs$stripe_curre2, _cart$business2;
|
|
54
|
+
var _configs$stripe_curre, _configs$stripe_curre2, _cart$business2, _ref;
|
|
55
55
|
var cartNames = '';
|
|
56
56
|
if (cartGroup) {
|
|
57
57
|
// eslint-disable-next-line no-unused-expressions
|
|
@@ -77,8 +77,8 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
|
|
|
77
77
|
setMethodUnavailable(true);
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
pr.on('paymentmethod',
|
|
81
|
-
|
|
80
|
+
pr.on('paymentmethod', function (_x) {
|
|
81
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
82
82
|
var _e$paymentMethod, _e$paymentMethod2;
|
|
83
83
|
var data;
|
|
84
84
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -101,11 +101,8 @@ var StripeMethodFormUI = function StripeMethodFormUI(props) {
|
|
|
101
101
|
return _context.stop();
|
|
102
102
|
}
|
|
103
103
|
}, _callee);
|
|
104
|
-
}));
|
|
105
|
-
|
|
106
|
-
return _ref.apply(this, arguments);
|
|
107
|
-
};
|
|
108
|
-
}());
|
|
104
|
+
}))).apply(this, arguments);
|
|
105
|
+
});
|
|
109
106
|
}
|
|
110
107
|
}, [stripe]);
|
|
111
108
|
return /*#__PURE__*/_react.default.createElement(_styles.Container, null, methodUnavailable ? /*#__PURE__*/_react.default.createElement("h2", null, googlePayMethods.includes(paymethod) ? t('GOOGLE_PAY_UNAVAILABLE', 'Google pay unavailable') : t('APPLE_PAY_UNAVAILABLE', 'Apple pay unavailable')) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, paymentRequest ? /*#__PURE__*/_react.default.createElement(_reactStripeJs.PaymentRequestButtonElement, {
|
|
@@ -30,7 +30,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
30
30
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
31
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
32
|
var OrderContactInformation = function OrderContactInformation(props) {
|
|
33
|
-
var _configs$google_maps_, _order$business, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _order$business13, _order$business14, _order$business15, _order$customer, _order$customer2, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _order$customer11, _order$customer12, _order$customer13, _ref2, _customerInfoState$cu, _customerInfoState$cu2, _order$customer17, _ref3, _customerInfoState$cu3, _customerInfoState$cu4, _order$customer18, _order$customer$addre, _order$customer19, _configs$country_auto, _ref4, _customerInfoState$cu5, _customerInfoState$cu6, _order$customer20, _order$customer21, _order$customer22, _order$customer23, _order$customer24, _order$customer25, _order$customer26, _order$customer27, _order$customer28, _order$customer29, _order$customer30, _order$customer31, _order$customer32, _order$customer33, _order$customer34, _order$customer35, _order$customer36, _order$customer37, _order$customer38, _order$customer39, _order$customer40, _order$customer41, _order$customer42, _order$customer43, _order$customer44, _order$driver_company, _ref5, _commentInfoState$dri, _order$driver, _order$external_drive, _order$driver2, _order$external_drive2, _order$driver3, _order$driver4, _order$driver5, _order$driver6, _order$driver7, _order$external_drive3, _order$external_drive4;
|
|
33
|
+
var _configs$google_maps_, _ref, _order$business, _order$business2, _order$business3, _order$business4, _order$business5, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$business11, _order$business12, _order$business13, _order$business14, _order$business15, _order$customer, _order$customer2, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _order$customer11, _order$customer12, _order$customer13, _ref2, _customerInfoState$cu, _customerInfoState$cu2, _order$customer17, _ref3, _customerInfoState$cu3, _customerInfoState$cu4, _order$customer18, _order$customer$addre, _order$customer19, _configs$country_auto, _ref4, _customerInfoState$cu5, _customerInfoState$cu6, _order$customer20, _order$customer21, _order$customer22, _order$customer23, _order$customer24, _order$customer25, _order$customer26, _order$customer27, _order$customer28, _order$customer29, _order$customer30, _order$customer31, _order$customer32, _order$customer33, _order$customer34, _order$customer35, _order$customer36, _order$customer37, _order$customer38, _order$customer39, _order$customer40, _order$customer41, _order$customer42, _order$customer43, _order$customer44, _order$driver_company, _ref5, _commentInfoState$dri, _order$driver, _order$external_drive, _order$driver2, _order$external_drive2, _order$driver3, _order$driver4, _order$driver5, _order$driver6, _order$driver7, _order$external_drive3, _order$external_drive4;
|
|
34
34
|
var order = props.order,
|
|
35
35
|
customerInfoState = props.customerInfoState,
|
|
36
36
|
handleChangeCustomerInfoState = props.handleChangeCustomerInfoState,
|
|
@@ -93,8 +93,8 @@ var OrderContactInformation = function OrderContactInformation(props) {
|
|
|
93
93
|
zipcode: e === null || e === void 0 ? void 0 : e.zipcode
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
|
-
var handleUpdateCustomer =
|
|
97
|
-
|
|
96
|
+
var handleUpdateCustomer = function handleUpdateCustomer() {
|
|
97
|
+
return (_ref = _ref || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
98
98
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
99
99
|
while (1) switch (_context.prev = _context.next) {
|
|
100
100
|
case 0:
|
|
@@ -107,11 +107,8 @@ var OrderContactInformation = function OrderContactInformation(props) {
|
|
|
107
107
|
return _context.stop();
|
|
108
108
|
}
|
|
109
109
|
}, _callee);
|
|
110
|
-
}));
|
|
111
|
-
|
|
112
|
-
return _ref.apply(this, arguments);
|
|
113
|
-
};
|
|
114
|
-
}();
|
|
110
|
+
}))).apply(this, arguments);
|
|
111
|
+
};
|
|
115
112
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Accordion, null, (user === null || user === void 0 ? void 0 : user.level) !== 2 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ContextAwareToggle, {
|
|
116
113
|
eventKey: "0"
|
|
117
114
|
}, /*#__PURE__*/_react.default.createElement(_styles2.BusinessInfo, null, /*#__PURE__*/_react.default.createElement(_styles2.PhotoWrapper, null, order !== null && order !== void 0 && (_order$business = order.business) !== null && _order$business !== void 0 && _order$business.logo ? /*#__PURE__*/_react.default.createElement(_styles2.Photo, {
|
|
@@ -48,6 +48,7 @@ var OrdersCards = function OrdersCards(props) {
|
|
|
48
48
|
isUseQuery = props.isUseQuery;
|
|
49
49
|
var _useLanguage = (0, _orderingComponentsAdminExternal.useLanguage)(),
|
|
50
50
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
51
|
+
dictionary = _useLanguage2[0].dictionary,
|
|
51
52
|
t = _useLanguage2[1];
|
|
52
53
|
var theme = (0, _styledComponents.useTheme)();
|
|
53
54
|
var _useWindowSize = (0, _useWindowSize2.useWindowSize)(),
|
|
@@ -90,85 +91,35 @@ var OrdersCards = function OrdersCards(props) {
|
|
|
90
91
|
});
|
|
91
92
|
};
|
|
92
93
|
var getOrderStatus = function getOrderStatus(s) {
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
var orderStatus =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, {
|
|
123
|
-
key: 9,
|
|
124
|
-
value: t('PICK_UP_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 || (_theme$defaultLanguag10 = theme.defaultLanguages) === null || _theme$defaultLanguag10 === void 0 ? void 0 : _theme$defaultLanguag10.PICK_UP_COMPLETED_BY_DRIVER) || 'Pick up completed by driver')
|
|
125
|
-
}, {
|
|
126
|
-
key: 10,
|
|
127
|
-
value: t('PICK_UP_FAILED_BY_DRIVER', (theme === null || theme === void 0 || (_theme$defaultLanguag11 = theme.defaultLanguages) === null || _theme$defaultLanguag11 === void 0 ? void 0 : _theme$defaultLanguag11.PICK_UP_FAILED_BY_DRIVER) || 'Pick up Failed by driver')
|
|
128
|
-
}, {
|
|
129
|
-
key: 11,
|
|
130
|
-
value: t('DELIVERY_COMPLETED_BY_DRIVER', (theme === null || theme === void 0 || (_theme$defaultLanguag12 = theme.defaultLanguages) === null || _theme$defaultLanguag12 === void 0 ? void 0 : _theme$defaultLanguag12.DELIVERY_COMPLETED_BY_DRIVER) || 'Delivery completed by driver')
|
|
131
|
-
}, {
|
|
132
|
-
key: 12,
|
|
133
|
-
value: t('DELIVERY_FAILED_BY_DRIVER', (theme === null || theme === void 0 || (_theme$defaultLanguag13 = theme.defaultLanguages) === null || _theme$defaultLanguag13 === void 0 ? void 0 : _theme$defaultLanguag13.DELIVERY_FAILED_BY_DRIVER) || 'Delivery Failed by driver')
|
|
134
|
-
}, {
|
|
135
|
-
key: 13,
|
|
136
|
-
value: t('PREORDER', (theme === null || theme === void 0 || (_theme$defaultLanguag14 = theme.defaultLanguages) === null || _theme$defaultLanguag14 === void 0 ? void 0 : _theme$defaultLanguag14.PREORDER) || 'PreOrder')
|
|
137
|
-
}, {
|
|
138
|
-
key: 14,
|
|
139
|
-
value: t('ORDER_NOT_READY', (theme === null || theme === void 0 || (_theme$defaultLanguag15 = theme.defaultLanguages) === null || _theme$defaultLanguag15 === void 0 ? void 0 : _theme$defaultLanguag15.ORDER_NOT_READY) || 'Order not ready')
|
|
140
|
-
}, {
|
|
141
|
-
key: 15,
|
|
142
|
-
value: t('ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER', (theme === null || theme === void 0 || (_theme$defaultLanguag16 = theme.defaultLanguages) === null || _theme$defaultLanguag16 === void 0 ? void 0 : _theme$defaultLanguag16.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER) || 'Order picked up completed by customer')
|
|
143
|
-
}, {
|
|
144
|
-
key: 16,
|
|
145
|
-
value: t('ORDER_STATUS_CANCELLED_BY_CUSTOMER', (theme === null || theme === void 0 || (_theme$defaultLanguag17 = theme.defaultLanguages) === null || _theme$defaultLanguag17 === void 0 ? void 0 : _theme$defaultLanguag17.ORDER_STATUS_CANCELLED_BY_CUSTOMER) || 'Order cancelled by customer')
|
|
146
|
-
}, {
|
|
147
|
-
key: 17,
|
|
148
|
-
value: t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', (theme === null || theme === void 0 || (_theme$defaultLanguag18 = theme.defaultLanguages) === null || _theme$defaultLanguag18 === void 0 ? void 0 : _theme$defaultLanguag18.ORDER_NOT_PICKEDUP_BY_CUSTOMER) || 'Order not picked up by customer')
|
|
149
|
-
}, {
|
|
150
|
-
key: 18,
|
|
151
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 || (_theme$defaultLanguag19 = theme.defaultLanguages) === null || _theme$defaultLanguag19 === void 0 ? void 0 : _theme$defaultLanguag19.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS) || 'Driver almost arrived to business')
|
|
152
|
-
}, {
|
|
153
|
-
key: 19,
|
|
154
|
-
value: t('ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER', (theme === null || theme === void 0 || (_theme$defaultLanguag20 = theme.defaultLanguages) === null || _theme$defaultLanguag20 === void 0 ? void 0 : _theme$defaultLanguag20.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER) || 'Driver almost arrived to customer')
|
|
155
|
-
}, {
|
|
156
|
-
key: 20,
|
|
157
|
-
value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', (theme === null || theme === void 0 || (_theme$defaultLanguag21 = theme.defaultLanguages) === null || _theme$defaultLanguag21 === void 0 ? void 0 : _theme$defaultLanguag21.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS) || 'Customer almost arrived to business')
|
|
158
|
-
}, {
|
|
159
|
-
key: 21,
|
|
160
|
-
value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', (theme === null || theme === void 0 || (_theme$defaultLanguag22 = theme.defaultLanguages) === null || _theme$defaultLanguag22 === void 0 ? void 0 : _theme$defaultLanguag22.ORDER_CUSTOMER_ARRIVED_BUSINESS) || 'Customer arrived to business')
|
|
161
|
-
}, {
|
|
162
|
-
key: 22,
|
|
163
|
-
value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver')
|
|
164
|
-
}, {
|
|
165
|
-
key: 23,
|
|
166
|
-
value: t('ORDER_DRIVER_ON_WAY', 'Driver on way')
|
|
167
|
-
}];
|
|
168
|
-
var objectStatus = orderStatus.find(function (o) {
|
|
169
|
-
return o.key === status;
|
|
170
|
-
});
|
|
171
|
-
return objectStatus && objectStatus;
|
|
94
|
+
var _dictionary$PENDING, _dictionary$COMPLETED, _dictionary$REJECTED, _dictionary$ORDER_STA, _dictionary$PREPARATI, _dictionary$REJECTED_, _dictionary$REJECTED_2, _dictionary$ACCEPTED_, _dictionary$ACCEPTED_2, _dictionary$PICK_UP_C, _dictionary$PICK_UP_F, _dictionary$DELIVERY_, _dictionary$DELIVERY_2, _dictionary$PREORDER, _dictionary$ORDER_NOT, _dictionary$ORDER_PIC, _dictionary$ORDER_STA2, _dictionary$ORDER_NOT2, _dictionary$ORDER_DRI, _dictionary$ORDER_DRI2, _dictionary$ORDER_CUS, _dictionary$ORDER_CUS2, _dictionary$ORDER_LOO, _dictionary$ORDER_DRI3, _orderStatus$Number;
|
|
95
|
+
if (!dictionary) return s;
|
|
96
|
+
var orderStatus = {
|
|
97
|
+
0: (_dictionary$PENDING = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PENDING) !== null && _dictionary$PENDING !== void 0 ? _dictionary$PENDING : 'Pending',
|
|
98
|
+
1: (_dictionary$COMPLETED = dictionary === null || dictionary === void 0 ? void 0 : dictionary.COMPLETED_BY_ADMIN) !== null && _dictionary$COMPLETED !== void 0 ? _dictionary$COMPLETED : 'Completed by admin',
|
|
99
|
+
2: (_dictionary$REJECTED = dictionary === null || dictionary === void 0 ? void 0 : dictionary.REJECTED) !== null && _dictionary$REJECTED !== void 0 ? _dictionary$REJECTED : 'Rejected',
|
|
100
|
+
3: (_dictionary$ORDER_STA = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_STATUS_IN_BUSINESS) !== null && _dictionary$ORDER_STA !== void 0 ? _dictionary$ORDER_STA : 'Driver arrived to business',
|
|
101
|
+
4: (_dictionary$PREPARATI = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PREPARATION_COMPLETED) !== null && _dictionary$PREPARATI !== void 0 ? _dictionary$PREPARATI : 'Preparation Completed',
|
|
102
|
+
5: (_dictionary$REJECTED_ = dictionary === null || dictionary === void 0 ? void 0 : dictionary.REJECTED_BY_BUSINESS) !== null && _dictionary$REJECTED_ !== void 0 ? _dictionary$REJECTED_ : 'Rejected by business',
|
|
103
|
+
6: (_dictionary$REJECTED_2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.REJECTED_BY_DRIVER) !== null && _dictionary$REJECTED_2 !== void 0 ? _dictionary$REJECTED_2 : 'Rejected by Driver',
|
|
104
|
+
7: (_dictionary$ACCEPTED_ = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ACCEPTED_BY_BUSINESS) !== null && _dictionary$ACCEPTED_ !== void 0 ? _dictionary$ACCEPTED_ : 'Accepted by business',
|
|
105
|
+
8: (_dictionary$ACCEPTED_2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ACCEPTED_BY_DRIVER) !== null && _dictionary$ACCEPTED_2 !== void 0 ? _dictionary$ACCEPTED_2 : 'Accepted by driver',
|
|
106
|
+
9: (_dictionary$PICK_UP_C = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PICK_UP_COMPLETED_BY_DRIVER) !== null && _dictionary$PICK_UP_C !== void 0 ? _dictionary$PICK_UP_C : 'Pick up completed by driver',
|
|
107
|
+
10: (_dictionary$PICK_UP_F = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PICK_UP_FAILED_BY_DRIVER) !== null && _dictionary$PICK_UP_F !== void 0 ? _dictionary$PICK_UP_F : 'Pick up Failed by driver',
|
|
108
|
+
11: (_dictionary$DELIVERY_ = dictionary === null || dictionary === void 0 ? void 0 : dictionary.DELIVERY_COMPLETED_BY_DRIVER) !== null && _dictionary$DELIVERY_ !== void 0 ? _dictionary$DELIVERY_ : 'Delivery completed by driver',
|
|
109
|
+
12: (_dictionary$DELIVERY_2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.DELIVERY_FAILED_BY_DRIVER) !== null && _dictionary$DELIVERY_2 !== void 0 ? _dictionary$DELIVERY_2 : 'Delivery Failed by driver',
|
|
110
|
+
13: (_dictionary$PREORDER = dictionary === null || dictionary === void 0 ? void 0 : dictionary.PREORDER) !== null && _dictionary$PREORDER !== void 0 ? _dictionary$PREORDER : 'PreOrder',
|
|
111
|
+
14: (_dictionary$ORDER_NOT = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_NOT_READY) !== null && _dictionary$ORDER_NOT !== void 0 ? _dictionary$ORDER_NOT : 'Order not ready',
|
|
112
|
+
15: (_dictionary$ORDER_PIC = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER) !== null && _dictionary$ORDER_PIC !== void 0 ? _dictionary$ORDER_PIC : 'Order picked up completed by customer',
|
|
113
|
+
16: (_dictionary$ORDER_STA2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_STATUS_CANCELLED_BY_CUSTOMER) !== null && _dictionary$ORDER_STA2 !== void 0 ? _dictionary$ORDER_STA2 : 'Order cancelled by customer',
|
|
114
|
+
17: (_dictionary$ORDER_NOT2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_NOT_PICKEDUP_BY_CUSTOMER) !== null && _dictionary$ORDER_NOT2 !== void 0 ? _dictionary$ORDER_NOT2 : 'Order not picked up by customer',
|
|
115
|
+
18: (_dictionary$ORDER_DRI = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_DRIVER_ALMOST_ARRIVED_BUSINESS) !== null && _dictionary$ORDER_DRI !== void 0 ? _dictionary$ORDER_DRI : 'Driver almost arrived to business',
|
|
116
|
+
19: (_dictionary$ORDER_DRI2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_DRIVER_ALMOST_ARRIVED_CUSTOMER) !== null && _dictionary$ORDER_DRI2 !== void 0 ? _dictionary$ORDER_DRI2 : 'Driver almost arrived to customer',
|
|
117
|
+
20: (_dictionary$ORDER_CUS = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS) !== null && _dictionary$ORDER_CUS !== void 0 ? _dictionary$ORDER_CUS : 'Customer almost arrived to business',
|
|
118
|
+
21: (_dictionary$ORDER_CUS2 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_CUSTOMER_ARRIVED_BUSINESS) !== null && _dictionary$ORDER_CUS2 !== void 0 ? _dictionary$ORDER_CUS2 : 'Customer arrived to business',
|
|
119
|
+
22: (_dictionary$ORDER_LOO = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_LOOKING_FOR_DRIVER) !== null && _dictionary$ORDER_LOO !== void 0 ? _dictionary$ORDER_LOO : 'Looking for driver',
|
|
120
|
+
23: (_dictionary$ORDER_DRI3 = dictionary === null || dictionary === void 0 ? void 0 : dictionary.ORDER_DRIVER_ON_WAY) !== null && _dictionary$ORDER_DRI3 !== void 0 ? _dictionary$ORDER_DRI3 : 'Driver on way'
|
|
121
|
+
};
|
|
122
|
+
return (_orderStatus$Number = orderStatus === null || orderStatus === void 0 ? void 0 : orderStatus[Number(s)]) !== null && _orderStatus$Number !== void 0 ? _orderStatus$Number : s;
|
|
172
123
|
};
|
|
173
124
|
var getDelayMinutes = function getDelayMinutes(order) {
|
|
174
125
|
// targetMin = delivery_datetime + eta_time - now()
|
|
@@ -268,14 +219,14 @@ var OrdersCards = function OrdersCards(props) {
|
|
|
268
219
|
width: 100
|
|
269
220
|
}))))));
|
|
270
221
|
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_orderList$orders = orderList.orders) === null || _orderList$orders === void 0 ? void 0 : _orderList$orders.map(function (order) {
|
|
271
|
-
var
|
|
222
|
+
var _order$business, _theme$images, _order$business2, _order$business3, _order$driver, _order$driver2, _order$driver3, _order$driver4;
|
|
272
223
|
return /*#__PURE__*/_react.default.createElement(_styles.OrderCard, {
|
|
273
224
|
key: order.id,
|
|
274
225
|
active: (selectedOrderCard === null || selectedOrderCard === void 0 ? void 0 : selectedOrderCard.id) === order.id,
|
|
275
226
|
onClick: function onClick(e) {
|
|
276
227
|
return handleOrderClick(e, order);
|
|
277
228
|
}
|
|
278
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.CardHeading, null, /*#__PURE__*/_react.default.createElement(_styles.OrderHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, /*#__PURE__*/_react.default.createElement("span", null, t('INVOICE_ORDER_NO', 'Order No.'), " ", showExternalId && !!(order !== null && order !== void 0 && order.external_id) ? order.external_id : order.id)), /*#__PURE__*/_react.default.createElement("p", null,
|
|
229
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.CardHeading, null, /*#__PURE__*/_react.default.createElement(_styles.OrderHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, /*#__PURE__*/_react.default.createElement("span", null, t('INVOICE_ORDER_NO', 'Order No.'), " ", showExternalId && !!(order !== null && order !== void 0 && order.external_id) ? order.external_id : order.id)), /*#__PURE__*/_react.default.createElement("p", null, getOrderStatus(order.status)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, order !== null && order !== void 0 && order.delivery_datetime_utc ? parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime_utc) : parseDate(order === null || order === void 0 ? void 0 : order.delivery_datetime, {
|
|
279
230
|
utc: false
|
|
280
231
|
})), /*#__PURE__*/_react.default.createElement(_styles.ViewDetails, {
|
|
281
232
|
className: "view-details",
|