ordering-ui-external 13.0.1 → 13.0.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/_modules/themes/eight/src/components/AddressForm/index.js +0 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/_modules/themes/five/src/components/Cart/index.js +5 -2
- package/_modules/themes/five/src/components/HomeHero/index.js +0 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +5 -2
- package/_modules/themes/five/src/components/ServiceForm/index.js +3 -3
- package/_modules/themes/pwa/src/components/MomentPopover/index.js +0 -1
- package/_modules/themes/seven/src/components/OrderDetails/index.js +0 -1
- package/package.json +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/src/themes/five/src/components/Cart/index.js +9 -0
- package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +9 -0
- package/src/themes/five/src/components/ServiceForm/index.js +79 -81
|
@@ -429,7 +429,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
429
429
|
if (openProduct) {
|
|
430
430
|
onChangeMetaTag && onChangeMetaTag(curProduct === null || curProduct === void 0 ? void 0 : curProduct.seo_title, curProduct === null || curProduct === void 0 ? void 0 : curProduct.seo_description, curProduct === null || curProduct === void 0 ? void 0 : curProduct.seo_keywords);
|
|
431
431
|
} else {
|
|
432
|
-
onChangeMetaTag && onChangeMetaTag(business === null || business === void 0 ? void 0 : business.
|
|
432
|
+
onChangeMetaTag && onChangeMetaTag(business === null || business === void 0 ? void 0 : business.name, business === null || business === void 0 ? void 0 : business.description, business === null || business === void 0 ? void 0 : business.name);
|
|
433
433
|
updateProductModal(null);
|
|
434
434
|
setCurProduct(null);
|
|
435
435
|
}
|
|
@@ -44,7 +44,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
44
44
|
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; } }
|
|
45
45
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
46
46
|
var CartUI = function CartUI(props) {
|
|
47
|
-
var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _configs$checkout_mul, _orderState$carts, _props$cart, _validationFields$fie2, _theme$viewString, _validationFields$fie3, _theme$viewString2, _orderState$options, _orderState$options2, _cart$taxes, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers4, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes3, _cart$taxes4, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _orderState$options3, _cart$taxes5, _cart$taxes6, _cart$offers7, _cart$offers8, _configs$driver_tip_t, _configs$driver_tip_u, _orderState$options4, _validationFields$fie4, _configs$driver_tip_t2, _configs$driver_tip_u2, _configs$driver_tip_t3, _cart$payment_events, _cart$payment_events2, _orderState$options5, _cart$business2, _cart$business3, _curProduct$calendar_, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
|
|
47
|
+
var _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _validationFields$fie, _configs$checkout_mul, _orderState$carts, _props$cart, _validationFields$fie2, _theme$viewString, _validationFields$fie3, _theme$viewString2, _orderState$options, _orderState$options2, _cart$metafields, _cart$metafields$find, _cart$taxes, _orderState$option, _orderState$option2, _props$beforeElements, _props$beforeComponen, _cart$products, _cart$offers, _cart$offers2, _cart$offers3, _cart$offers4, _cart$business, _ref, _cart$subtotal_with_d, _cart$taxes3, _cart$taxes4, _cart$fees, _cart$fees2, _cart$offers5, _cart$offers6, _orderState$options3, _cart$taxes5, _cart$taxes6, _cart$offers7, _cart$offers8, _configs$driver_tip_t, _configs$driver_tip_u, _extraValueAdjustment, _orderState$options4, _validationFields$fie4, _configs$driver_tip_t2, _configs$driver_tip_u2, _configs$driver_tip_t3, _cart$payment_events, _cart$payment_events2, _orderState$options5, _cart$business2, _cart$business3, _curProduct$calendar_, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6, _props$afterComponent, _props$afterElements;
|
|
48
48
|
var currentCartUuid = props.currentCartUuid,
|
|
49
49
|
clearCart = props.clearCart,
|
|
50
50
|
isProducts = props.isProducts,
|
|
@@ -159,6 +159,9 @@ var CartUI = function CartUI(props) {
|
|
|
159
159
|
var hideCartDiscount = isCheckout ? hideCouponByValidationCheckout : !(validationFields !== null && validationFields !== void 0 && (_validationFields$fie3 = validationFields.fields) !== null && _validationFields$fie3 !== void 0 && (_validationFields$fie3 = _validationFields$fie3.checkout) !== null && _validationFields$fie3 !== void 0 && (_validationFields$fie3 = _validationFields$fie3.coupon) !== null && _validationFields$fie3 !== void 0 && _validationFields$fie3.enabled) || (theme === null || theme === void 0 || (_theme$viewString2 = theme[viewString]) === null || _theme$viewString2 === void 0 || (_theme$viewString2 = _theme$viewString2.components) === null || _theme$viewString2 === void 0 || (_theme$viewString2 = _theme$viewString2.cart) === null || _theme$viewString2 === void 0 || (_theme$viewString2 = _theme$viewString2.components) === null || _theme$viewString2 === void 0 || (_theme$viewString2 = _theme$viewString2.discount_coupon) === null || _theme$viewString2 === void 0 ? void 0 : _theme$viewString2.hidden);
|
|
160
160
|
var cateringTypeString = (orderState === null || orderState === void 0 || (_orderState$options = orderState.options) === null || _orderState$options === void 0 ? void 0 : _orderState$options.type) === 7 ? 'catering_delivery' : (orderState === null || orderState === void 0 || (_orderState$options2 = orderState.options) === null || _orderState$options2 === void 0 ? void 0 : _orderState$options2.type) === 8 ? 'catering_pickup' : null;
|
|
161
161
|
var cateringValues = businessConfigs && (0, _utils.getCateringValues)(cateringTypeString, businessConfigs);
|
|
162
|
+
var extraValueAdjustment = cart === null || cart === void 0 || (_cart$metafields = cart.metafields) === null || _cart$metafields === void 0 || (_cart$metafields$find = _cart$metafields.find) === null || _cart$metafields$find === void 0 ? void 0 : _cart$metafields$find.call(_cart$metafields, function (meta) {
|
|
163
|
+
return (meta === null || meta === void 0 ? void 0 : meta.key) === 'extra_value_adjustment_amount';
|
|
164
|
+
});
|
|
162
165
|
var walletName = {
|
|
163
166
|
cash: {
|
|
164
167
|
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet')
|
|
@@ -530,7 +533,7 @@ var CartUI = function CartUI(props) {
|
|
|
530
533
|
return onRemoveOffer(offer === null || offer === void 0 ? void 0 : offer.id);
|
|
531
534
|
}
|
|
532
535
|
}))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 || (_offer$summary3 = offer.summary) === null || _offer$summary3 === void 0 ? void 0 : _offer$summary3.discount)));
|
|
533
|
-
})), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 || (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && !hideCartDiscount && !hideCouponInput && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
|
|
536
|
+
})), (cart === null || cart === void 0 ? void 0 : cart.driver_tip) > 0 && !hideDriverTip && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', 'Driver tip'), ' ', (cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate) > 0 && parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 || (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(cart === null || cart === void 0 ? void 0 : cart.driver_tip_rate, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice(cart === null || cart === void 0 ? void 0 : cart.driver_tip))), extraValueAdjustment && !!parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t(extraValueAdjustment === null || extraValueAdjustment === void 0 || (_extraValueAdjustment = extraValueAdjustment.key) === null || _extraValueAdjustment === void 0 ? void 0 : _extraValueAdjustment.toUpperCase(), extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.key), ' '), /*#__PURE__*/_react.default.createElement("td", null, parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value) > 0 ? parsePrice(parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value)) : "- ".concat(parsePrice(parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value) * -1)))))), isCouponEnabled && !isCartPending && (isCheckout || isCartPopover || isMultiCheckout) && !(isCheckout && isCartPopover) && !hideCartDiscount && !hideCouponInput && /*#__PURE__*/_react.default.createElement(_styles.CouponContainer, null, /*#__PURE__*/_react.default.createElement(_CouponControl.CouponControl, {
|
|
534
537
|
businessId: cart === null || cart === void 0 ? void 0 : cart.business_id,
|
|
535
538
|
price: cart === null || cart === void 0 ? void 0 : cart.total
|
|
536
539
|
})), !isStore && !isMultiCheckout && cart && (cart === null || cart === void 0 ? void 0 : cart.business_id) && (orderState === null || orderState === void 0 || (_orderState$options4 = orderState.options) === null || _orderState$options4 === void 0 ? void 0 : _orderState$options4.type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.status) !== 2 && (validationFields === null || validationFields === void 0 || (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 || (_validationFields$fie4 = _validationFields$fie4.checkout) === null || _validationFields$fie4 === void 0 || (_validationFields$fie4 = _validationFields$fie4.driver_tip) === null || _validationFields$fie4 === void 0 ? void 0 : _validationFields$fie4.enabled) && driverTipsOptions.length > 0 && !useKioskApp && !isCheckout && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.DriverTipContainer, null, /*#__PURE__*/_react.default.createElement("h1", null, t('DRIVER_TIPS', 'Driver Tips')), /*#__PURE__*/_react.default.createElement("p", null, t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')), /*#__PURE__*/_react.default.createElement(_DriverTips.DriverTips, {
|
|
@@ -26,7 +26,6 @@ var HomeHero = exports.HomeHero = function HomeHero(props) {
|
|
|
26
26
|
contentPosition: (theme === null || theme === void 0 || (_theme$homepage_view2 = theme.homepage_view) === null || _theme$homepage_view2 === void 0 || (_theme$homepage_view2 = _theme$homepage_view2.components) === null || _theme$homepage_view2 === void 0 || (_theme$homepage_view2 = _theme$homepage_view2.layout) === null || _theme$homepage_view2 === void 0 ? void 0 : _theme$homepage_view2.position) || 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
|
|
30
29
|
var layout = (HomeLayoutConfig === null || HomeLayoutConfig === void 0 || (_HomeLayoutConfig$hom = HomeLayoutConfig.homepage_settings) === null || _HomeLayoutConfig$hom === void 0 ? void 0 : _HomeLayoutConfig$hom.layout) !== undefined ? HomeLayoutConfig === null || HomeLayoutConfig === void 0 || (_HomeLayoutConfig$hom2 = HomeLayoutConfig.homepage_settings) === null || _HomeLayoutConfig$hom2 === void 0 ? void 0 : _HomeLayoutConfig$hom2.layout : 'original';
|
|
31
30
|
var homeLayoutProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
32
31
|
layout: layout,
|
|
@@ -18,7 +18,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
18
18
|
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; } }
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
var OrderBillSection = exports.OrderBillSection = function OrderBillSection(props) {
|
|
21
|
-
var _theme$defaultLanguag, _order$summary$subtot, _order$summary2, _ref, _order$summary3, _order$offers, _theme$defaultLanguag2, _theme$defaultLanguag3, _order$summary$discou, _order$summary4, _order$offers2, _order$offers3, _order$summary5, _order$summary6, _order$summary7, _ref2, _order$summary8, _order$summary$subtot2, _order$summary9, _order$taxes3, _order$summary$tax2, _order$summary10, _order$fees, _order$summary$servic, _order$summary11, _order$taxes4, _order$taxes5, _order$fees2, _order$fees3, _order$offers4, _order$offers5, _order$summary12, _theme$defaultLanguag4, _order$summary13, _order$taxes6, _order$taxes7, _order$offers6, _order$offers7, _order$summary14, _theme$defaultLanguag5, _order$summary15, _configs$driver_tip_t, _configs$driver_tip_u, _order$summary$driver, _order$summary16, _theme$defaultLanguag6, _order$summary$total, _order$summary17, _order$payment_events, _order$payment_events2;
|
|
21
|
+
var _order$metafields, _order$metafields$fin, _theme$defaultLanguag, _order$summary$subtot, _order$summary2, _ref, _order$summary3, _order$offers, _theme$defaultLanguag2, _theme$defaultLanguag3, _order$summary$discou, _order$summary4, _order$offers2, _order$offers3, _order$summary5, _order$summary6, _order$summary7, _ref2, _order$summary8, _order$summary$subtot2, _order$summary9, _order$taxes3, _order$summary$tax2, _order$summary10, _order$fees, _order$summary$servic, _order$summary11, _order$taxes4, _order$taxes5, _order$fees2, _order$fees3, _order$offers4, _order$offers5, _order$summary12, _theme$defaultLanguag4, _order$summary13, _order$taxes6, _order$taxes7, _order$offers6, _order$offers7, _order$summary14, _theme$defaultLanguag5, _order$summary15, _configs$driver_tip_t, _configs$driver_tip_u, _order$summary$driver, _order$summary16, _extraValueAdjustment, _theme$defaultLanguag6, _order$summary$total, _order$summary17, _order$payment_events, _order$payment_events2;
|
|
22
22
|
var order = props.order,
|
|
23
23
|
setOpenTaxModal = props.setOpenTaxModal;
|
|
24
24
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
@@ -42,6 +42,9 @@ var OrderBillSection = exports.OrderBillSection = function OrderBillSection(prop
|
|
|
42
42
|
name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet')
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
var extraValueAdjustment = order === null || order === void 0 || (_order$metafields = order.metafields) === null || _order$metafields === void 0 || (_order$metafields$fin = _order$metafields.find) === null || _order$metafields$fin === void 0 ? void 0 : _order$metafields$fin.call(_order$metafields, function (meta) {
|
|
46
|
+
return (meta === null || meta === void 0 ? void 0 : meta.key) === 'extra_value_adjustment_amount';
|
|
47
|
+
});
|
|
45
48
|
var getIncludedTaxes = function getIncludedTaxes(isDeliveryFee) {
|
|
46
49
|
var _order$taxes;
|
|
47
50
|
if ((order === null || order === void 0 || (_order$taxes = order.taxes) === null || _order$taxes === void 0 ? void 0 : _order$taxes.length) === 0) {
|
|
@@ -171,7 +174,7 @@ var OrderBillSection = exports.OrderBillSection = function OrderBillSection(prop
|
|
|
171
174
|
size: "20",
|
|
172
175
|
color: theme.colors.primary
|
|
173
176
|
}))), /*#__PURE__*/_react.default.createElement("td", null, "- ", parsePrice(offer === null || offer === void 0 || (_offer$summary3 = offer.summary) === null || _offer$summary3 === void 0 ? void 0 : _offer$summary3.discount)));
|
|
174
|
-
})), ((order === null || order === void 0 || (_order$summary14 = order.summary) === null || _order$summary14 === void 0 ? void 0 : _order$summary14.driver_tip) > 0 || (order === null || order === void 0 ? void 0 : order.driver_tip) > 0) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', (theme === null || theme === void 0 || (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.DRIVER_TIP) || 'Driver tip'), ' ', ((order === null || order === void 0 || (_order$summary15 = order.summary) === null || _order$summary15 === void 0 ? void 0 : _order$summary15.driver_tip) > 0 || (order === null || order === void 0 ? void 0 : order.driver_tip) > 0) && parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 || (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(order === null || order === void 0 ? void 0 : order.driver_tip, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice((_order$summary$driver = order === null || order === void 0 || (_order$summary16 = order.summary) === null || _order$summary16 === void 0 ? void 0 : _order$summary16.driver_tip) !== null && _order$summary$driver !== void 0 ? _order$summary$driver : order === null || order === void 0 ? void 0 : order.totalDriverTip))))), /*#__PURE__*/_react.default.createElement("table", {
|
|
177
|
+
})), ((order === null || order === void 0 || (_order$summary14 = order.summary) === null || _order$summary14 === void 0 ? void 0 : _order$summary14.driver_tip) > 0 || (order === null || order === void 0 ? void 0 : order.driver_tip) > 0) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('DRIVER_TIP', (theme === null || theme === void 0 || (_theme$defaultLanguag5 = theme.defaultLanguages) === null || _theme$defaultLanguag5 === void 0 ? void 0 : _theme$defaultLanguag5.DRIVER_TIP) || 'Driver tip'), ' ', ((order === null || order === void 0 || (_order$summary15 = order.summary) === null || _order$summary15 === void 0 ? void 0 : _order$summary15.driver_tip) > 0 || (order === null || order === void 0 ? void 0 : order.driver_tip) > 0) && parseInt(configs === null || configs === void 0 || (_configs$driver_tip_t = configs.driver_tip_type) === null || _configs$driver_tip_t === void 0 ? void 0 : _configs$driver_tip_t.value, 10) === 2 && !parseInt(configs === null || configs === void 0 || (_configs$driver_tip_u = configs.driver_tip_use_custom) === null || _configs$driver_tip_u === void 0 ? void 0 : _configs$driver_tip_u.value, 10) && /*#__PURE__*/_react.default.createElement("span", null, "(".concat((0, _utils.verifyDecimals)(order === null || order === void 0 ? void 0 : order.driver_tip, parseNumber), "%)"))), /*#__PURE__*/_react.default.createElement("td", null, parsePrice((_order$summary$driver = order === null || order === void 0 || (_order$summary16 = order.summary) === null || _order$summary16 === void 0 ? void 0 : _order$summary16.driver_tip) !== null && _order$summary$driver !== void 0 ? _order$summary$driver : order === null || order === void 0 ? void 0 : order.totalDriverTip))), extraValueAdjustment && !!parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value) && /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t(extraValueAdjustment === null || extraValueAdjustment === void 0 || (_extraValueAdjustment = extraValueAdjustment.key) === null || _extraValueAdjustment === void 0 ? void 0 : _extraValueAdjustment.toUpperCase(), extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.key), ' '), /*#__PURE__*/_react.default.createElement("td", null, parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value) > 0 ? parsePrice(parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value)) : "- ".concat(parsePrice(parseFloat(extraValueAdjustment === null || extraValueAdjustment === void 0 ? void 0 : extraValueAdjustment.value) * -1)))))), /*#__PURE__*/_react.default.createElement("table", {
|
|
175
178
|
className: "total"
|
|
176
179
|
}, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, t('TOTAL', (theme === null || theme === void 0 || (_theme$defaultLanguag6 = theme.defaultLanguages) === null || _theme$defaultLanguag6 === void 0 ? void 0 : _theme$defaultLanguag6.TOTAL) || 'Total')), /*#__PURE__*/_react.default.createElement("td", null, parsePrice((_order$summary$total = order === null || order === void 0 || (_order$summary17 = order.summary) === null || _order$summary17 === void 0 ? void 0 : _order$summary17.total) !== null && _order$summary$total !== void 0 ? _order$summary$total : order === null || order === void 0 ? void 0 : order.total))))), (order === null || order === void 0 || (_order$payment_events = order.payment_events) === null || _order$payment_events === void 0 ? void 0 : _order$payment_events.length) > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
177
180
|
style: {
|
|
@@ -211,7 +211,7 @@ var ServiceFormUI = function ServiceFormUI(props) {
|
|
|
211
211
|
return !(item.start === (productCart === null || productCart === void 0 || (_productCart$calendar = productCart.calendar_event) === null || _productCart$calendar === void 0 ? void 0 : _productCart$calendar.start) && item.end === (productCart === null || productCart === void 0 || (_productCart$calendar2 = productCart.calendar_event) === null || _productCart$calendar2 === void 0 ? void 0 : _productCart$calendar2.end));
|
|
212
212
|
}) : _toConsumableArray(professional === null || professional === void 0 ? void 0 : professional.busy_times);
|
|
213
213
|
var valid = busyTimes.some(function (item) {
|
|
214
|
-
return _moment2.default.utc(item === null || item === void 0 ? void 0 : item.start).local().valueOf() <= (0, _moment2.default)(selectedMoment).valueOf() && (0, _moment2.default)(selectedMoment).valueOf() < _moment2.default.utc(item === null || item === void 0 ? void 0 : item.end).local().valueOf() || _moment2.default.utc(item === null || item === void 0 ? void 0 : item.start).local().valueOf() < (0, _moment2.default)(selectedMoment).
|
|
214
|
+
return _moment2.default.utc(item === null || item === void 0 ? void 0 : item.start).local().valueOf() <= (0, _moment2.default)(selectedMoment).valueOf() && (0, _moment2.default)(selectedMoment).valueOf() < _moment2.default.utc(item === null || item === void 0 ? void 0 : item.end).local().valueOf() || _moment2.default.utc(item === null || item === void 0 ? void 0 : item.start).local().valueOf() < (0, _moment2.default)(selectedMoment).valueOf() && (0, _moment2.default)(selectedMoment).add(duration, 'minutes').valueOf() < _moment2.default.utc(item === null || item === void 0 ? void 0 : item.end).local().valueOf();
|
|
215
215
|
});
|
|
216
216
|
return valid;
|
|
217
217
|
};
|
|
@@ -338,7 +338,7 @@ var ServiceFormUI = function ServiceFormUI(props) {
|
|
|
338
338
|
className: "button-next"
|
|
339
339
|
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.ChevronRight, null)))), /*#__PURE__*/_react.default.createElement(_styles.HeaderInfoWrapper, null, /*#__PURE__*/_react.default.createElement("h2", null, product === null || product === void 0 ? void 0 : product.name), /*#__PURE__*/_react.default.createElement(_styles.PriceAndDuration, null, /*#__PURE__*/_react.default.createElement("span", null, parsePrice(product === null || product === void 0 ? void 0 : product.price)), /*#__PURE__*/_react.default.createElement("span", {
|
|
340
340
|
className: "dot"
|
|
341
|
-
}, "\u2022"), /*#__PURE__*/_react.default.createElement("span", null, product === null || product === void 0 ? void 0 : product.duration, "min")), /*#__PURE__*/_react.default.createElement("p", null, product === null || product === void 0 ? void 0 : product.description)), /*#__PURE__*/_react.default.createElement(_styles.Divider, null),
|
|
341
|
+
}, "\u2022"), /*#__PURE__*/_react.default.createElement("span", null, product === null || product === void 0 ? void 0 : product.duration, "min")), /*#__PURE__*/_react.default.createElement("p", null, product === null || product === void 0 ? void 0 : product.description)), /*#__PURE__*/_react.default.createElement(_styles.Divider, null), /*#__PURE__*/_react.default.createElement(_styles.ProfessionalInfoWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, t('PROFESSIONALS', 'Professionals')), /*#__PURE__*/_react.default.createElement("span", null, t('REQUIRED', 'Required'))), /*#__PURE__*/_react.default.createElement(_styles.ProfessionalSelectWrapper, {
|
|
342
342
|
ref: dropDownRef
|
|
343
343
|
}, /*#__PURE__*/_react.default.createElement(_styles.SelectedItem, {
|
|
344
344
|
onClick: function onClick() {
|
|
@@ -375,7 +375,7 @@ var ServiceFormUI = function ServiceFormUI(props) {
|
|
|
375
375
|
}, t('AVAILABLE', 'Available'))) : /*#__PURE__*/_react.default.createElement("span", {
|
|
376
376
|
className: "status"
|
|
377
377
|
}, t('NOT_AVAILABLE', 'Not available'))))));
|
|
378
|
-
})))), /*#__PURE__*/_react.default.createElement(_styles.ScheduleWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, t('SCHEDULE', 'Schedule')), /*#__PURE__*/_react.default.createElement("span", null, t('REQUIRED', 'Required'))), currentProfessional !== null && currentProfessional !== void 0 && currentProfessional.schedule ? /*#__PURE__*/_react.default.createElement(_styles.OrderTimeWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.DateWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MonthYearLayer, null, /*#__PURE__*/_react.default.createElement("span", null, (0, _moment2.default)(dateSelected).format('MMMM, yyyy'))), /*#__PURE__*/_react.default.createElement(_styles.DaysSwiper, {
|
|
378
|
+
})))), /*#__PURE__*/_react.default.createElement(_styles.ScheduleWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.SectionHeader, null, /*#__PURE__*/_react.default.createElement("h2", null, t('SCHEDULE', 'Schedule')), /*#__PURE__*/_react.default.createElement("span", null, t('REQUIRED', 'Required'))), currentProfessional !== null && currentProfessional !== void 0 && currentProfessional.schedule ? /*#__PURE__*/_react.default.createElement(_styles.OrderTimeWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.DateWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MonthYearLayer, null, /*#__PURE__*/_react.default.createElement("span", null, dateSelected && (0, _moment2.default)(dateSelected).format('MMMM, yyyy'))), /*#__PURE__*/_react.default.createElement(_styles.DaysSwiper, {
|
|
379
379
|
left: /*#__PURE__*/_react.default.createElement(_BsCaretLeftFill.default, null)
|
|
380
380
|
}, /*#__PURE__*/_react.default.createElement(_react2.Swiper, {
|
|
381
381
|
spaceBetween: 0,
|
|
@@ -261,7 +261,6 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
261
261
|
window.open(hrefUrl, '_blank' // <- This is what makes it open in a new window.
|
|
262
262
|
);
|
|
263
263
|
};
|
|
264
|
-
|
|
265
264
|
(0, _react.useEffect)(function () {
|
|
266
265
|
if (driverLocation) {
|
|
267
266
|
locations[0] = driverLocation;
|
package/package.json
CHANGED
|
@@ -325,7 +325,7 @@ const BusinessProductsListingUI = (props) => {
|
|
|
325
325
|
if (openProduct) {
|
|
326
326
|
onChangeMetaTag && onChangeMetaTag(curProduct?.seo_title, curProduct?.seo_description, curProduct?.seo_keywords)
|
|
327
327
|
} else {
|
|
328
|
-
onChangeMetaTag && onChangeMetaTag(business?.
|
|
328
|
+
onChangeMetaTag && onChangeMetaTag(business?.name, business?.description, business?.name)
|
|
329
329
|
updateProductModal(null)
|
|
330
330
|
setCurProduct(null)
|
|
331
331
|
}
|
|
@@ -123,6 +123,7 @@ const CartUI = (props) => {
|
|
|
123
123
|
: null
|
|
124
124
|
|
|
125
125
|
const cateringValues = businessConfigs && getCateringValues(cateringTypeString, businessConfigs)
|
|
126
|
+
const extraValueAdjustment = cart?.metafields?.find?.(meta => meta?.key === 'extra_value_adjustment_amount')
|
|
126
127
|
|
|
127
128
|
const walletName = {
|
|
128
129
|
cash: {
|
|
@@ -509,6 +510,14 @@ const CartUI = (props) => {
|
|
|
509
510
|
<td>{parsePrice(cart?.driver_tip)}</td>
|
|
510
511
|
</tr>
|
|
511
512
|
)}
|
|
513
|
+
{extraValueAdjustment && !!parseFloat(extraValueAdjustment?.value) && (
|
|
514
|
+
<tr>
|
|
515
|
+
<td>
|
|
516
|
+
{t(extraValueAdjustment?.key?.toUpperCase(), extraValueAdjustment?.key)}{' '}
|
|
517
|
+
</td>
|
|
518
|
+
<td>{parseFloat(extraValueAdjustment?.value) > 0 ? parsePrice(parseFloat(extraValueAdjustment?.value)) : `- ${parsePrice(parseFloat(extraValueAdjustment?.value) * -1)}`}</td>
|
|
519
|
+
</tr>
|
|
520
|
+
)}
|
|
512
521
|
</tbody>
|
|
513
522
|
</table>
|
|
514
523
|
{isCouponEnabled && !isCartPending &&
|
|
@@ -34,6 +34,7 @@ export const OrderBillSection = (props) => {
|
|
|
34
34
|
name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet')
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
const extraValueAdjustment = order?.metafields?.find?.(meta => meta?.key === 'extra_value_adjustment_amount')
|
|
37
38
|
|
|
38
39
|
const getIncludedTaxes = (isDeliveryFee) => {
|
|
39
40
|
if (order?.taxes?.length === 0) {
|
|
@@ -238,6 +239,14 @@ export const OrderBillSection = (props) => {
|
|
|
238
239
|
<td>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip)}</td>
|
|
239
240
|
</tr>
|
|
240
241
|
)}
|
|
242
|
+
{extraValueAdjustment && !!parseFloat(extraValueAdjustment?.value) && (
|
|
243
|
+
<tr>
|
|
244
|
+
<td>
|
|
245
|
+
{t(extraValueAdjustment?.key?.toUpperCase(), extraValueAdjustment?.key)}{' '}
|
|
246
|
+
</td>
|
|
247
|
+
<td>{parseFloat(extraValueAdjustment?.value) > 0 ? parsePrice(parseFloat(extraValueAdjustment?.value)) : `- ${parsePrice(parseFloat(extraValueAdjustment?.value) * -1)}`}</td>
|
|
248
|
+
</tr>
|
|
249
|
+
)}
|
|
241
250
|
</tbody>
|
|
242
251
|
</table>
|
|
243
252
|
<table className='total'>
|
|
@@ -177,7 +177,7 @@ const ServiceFormUI = (props) => {
|
|
|
177
177
|
const valid = busyTimes.some(item => {
|
|
178
178
|
return (moment.utc(item?.start).local().valueOf() <= moment(selectedMoment).valueOf() &&
|
|
179
179
|
moment(selectedMoment).valueOf() < moment.utc(item?.end).local().valueOf()) ||
|
|
180
|
-
(moment.utc(item?.start).local().valueOf() < moment(selectedMoment).
|
|
180
|
+
(moment.utc(item?.start).local().valueOf() < moment(selectedMoment).valueOf() &&
|
|
181
181
|
moment(selectedMoment).add(duration, 'minutes').valueOf() < moment.utc(item?.end).local().valueOf())
|
|
182
182
|
})
|
|
183
183
|
return valid
|
|
@@ -320,86 +320,84 @@ const ServiceFormUI = (props) => {
|
|
|
320
320
|
<p>{product?.description}</p>
|
|
321
321
|
</HeaderInfoWrapper>
|
|
322
322
|
<Divider />
|
|
323
|
-
|
|
324
|
-
<
|
|
325
|
-
<
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
<
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
<p>{t('SELECT_PROFESSIONAL', 'Select professional')}</p>
|
|
359
|
-
)}
|
|
360
|
-
<ChevronDown />
|
|
361
|
-
</SelectedItem>
|
|
362
|
-
{isDropDown && (
|
|
363
|
-
<DropDownWrapper>
|
|
364
|
-
{professionalListState?.professionals?.map((professional) => (
|
|
365
|
-
<SelectedItem
|
|
366
|
-
key={professional?.id}
|
|
367
|
-
isDropDown
|
|
368
|
-
active={professional?.id === currentProfessional?.id}
|
|
369
|
-
onClick={() => handleChangeProfessional(professional)}
|
|
370
|
-
>
|
|
371
|
-
<InfoWrapper>
|
|
372
|
-
{professional?.photo ? (
|
|
373
|
-
<ProfessionalPhoto
|
|
374
|
-
bgimage={professional?.photo}
|
|
375
|
-
/>
|
|
376
|
-
) : <FaUserAlt />}
|
|
377
|
-
<NameWrapper>
|
|
378
|
-
<p>{professional?.name} {professional?.lastname}</p>
|
|
379
|
-
<StatusInfo available={!isBusyTime(professional, dateSelected)}>
|
|
380
|
-
{professional?.schedule ? (
|
|
381
|
-
<>
|
|
382
|
-
{isBusyTime(professional, dateSelected) ? (
|
|
383
|
-
<>
|
|
384
|
-
<span className='status'>{t('BUSY_ON_SELECTED_TIME', 'Busy on selected time')}</span>
|
|
385
|
-
</>
|
|
386
|
-
) : (
|
|
387
|
-
<span className='status'>{t('AVAILABLE', 'Available')}</span>
|
|
388
|
-
)}
|
|
389
|
-
</>
|
|
390
|
-
) : (
|
|
391
|
-
<span className='status'>{t('NOT_AVAILABLE', 'Not available')}</span>
|
|
392
|
-
)}
|
|
393
|
-
</StatusInfo>
|
|
394
|
-
</NameWrapper>
|
|
395
|
-
</InfoWrapper>
|
|
396
|
-
</SelectedItem>
|
|
397
|
-
))}
|
|
398
|
-
</DropDownWrapper>
|
|
323
|
+
<ProfessionalInfoWrapper>
|
|
324
|
+
<SectionHeader>
|
|
325
|
+
<h2>{t('PROFESSIONALS', 'Professionals')}</h2>
|
|
326
|
+
<span>{t('REQUIRED', 'Required')}</span>
|
|
327
|
+
</SectionHeader>
|
|
328
|
+
<ProfessionalSelectWrapper ref={dropDownRef}>
|
|
329
|
+
<SelectedItem onClick={() => setIsDropDown(prev => !prev)}>
|
|
330
|
+
{currentProfessional ? (
|
|
331
|
+
<InfoWrapper>
|
|
332
|
+
{currentProfessional?.photo ? (
|
|
333
|
+
<ProfessionalPhoto
|
|
334
|
+
bgimage={currentProfessional?.photo}
|
|
335
|
+
/>
|
|
336
|
+
) : <FaUserAlt />}
|
|
337
|
+
<NameWrapper>
|
|
338
|
+
<p>{currentProfessional?.name} {currentProfessional?.lastname}</p>
|
|
339
|
+
<StatusInfo available={!isBusyTime(currentProfessional, dateSelected)}>
|
|
340
|
+
{currentProfessional?.schedule ? (
|
|
341
|
+
<>
|
|
342
|
+
{isBusyTime(currentProfessional, dateSelected) ? (
|
|
343
|
+
<>
|
|
344
|
+
<span className='status'>{t('BUSY_ON_SELECTED_TIME', 'Busy on selected time')}</span>
|
|
345
|
+
</>
|
|
346
|
+
) : (
|
|
347
|
+
<span className='status'>{t('AVAILABLE', 'Available')}</span>
|
|
348
|
+
)}
|
|
349
|
+
</>
|
|
350
|
+
) : (
|
|
351
|
+
<span className='status'>{t('NOT_AVAILABLE', 'Not available')}</span>
|
|
352
|
+
)}
|
|
353
|
+
</StatusInfo>
|
|
354
|
+
</NameWrapper>
|
|
355
|
+
</InfoWrapper>
|
|
356
|
+
) : (
|
|
357
|
+
<p>{t('SELECT_PROFESSIONAL', 'Select professional')}</p>
|
|
399
358
|
)}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
359
|
+
<ChevronDown />
|
|
360
|
+
</SelectedItem>
|
|
361
|
+
{isDropDown && (
|
|
362
|
+
<DropDownWrapper>
|
|
363
|
+
{professionalListState?.professionals?.map((professional) => (
|
|
364
|
+
<SelectedItem
|
|
365
|
+
key={professional?.id}
|
|
366
|
+
isDropDown
|
|
367
|
+
active={professional?.id === currentProfessional?.id}
|
|
368
|
+
onClick={() => handleChangeProfessional(professional)}
|
|
369
|
+
>
|
|
370
|
+
<InfoWrapper>
|
|
371
|
+
{professional?.photo ? (
|
|
372
|
+
<ProfessionalPhoto
|
|
373
|
+
bgimage={professional?.photo}
|
|
374
|
+
/>
|
|
375
|
+
) : <FaUserAlt />}
|
|
376
|
+
<NameWrapper>
|
|
377
|
+
<p>{professional?.name} {professional?.lastname}</p>
|
|
378
|
+
<StatusInfo available={!isBusyTime(professional, dateSelected)}>
|
|
379
|
+
{professional?.schedule ? (
|
|
380
|
+
<>
|
|
381
|
+
{isBusyTime(professional, dateSelected) ? (
|
|
382
|
+
<>
|
|
383
|
+
<span className='status'>{t('BUSY_ON_SELECTED_TIME', 'Busy on selected time')}</span>
|
|
384
|
+
</>
|
|
385
|
+
) : (
|
|
386
|
+
<span className='status'>{t('AVAILABLE', 'Available')}</span>
|
|
387
|
+
)}
|
|
388
|
+
</>
|
|
389
|
+
) : (
|
|
390
|
+
<span className='status'>{t('NOT_AVAILABLE', 'Not available')}</span>
|
|
391
|
+
)}
|
|
392
|
+
</StatusInfo>
|
|
393
|
+
</NameWrapper>
|
|
394
|
+
</InfoWrapper>
|
|
395
|
+
</SelectedItem>
|
|
396
|
+
))}
|
|
397
|
+
</DropDownWrapper>
|
|
398
|
+
)}
|
|
399
|
+
</ProfessionalSelectWrapper>
|
|
400
|
+
</ProfessionalInfoWrapper>
|
|
403
401
|
<ScheduleWrapper>
|
|
404
402
|
<SectionHeader>
|
|
405
403
|
<h2>{t('SCHEDULE', 'Schedule')}</h2>
|
|
@@ -409,7 +407,7 @@ const ServiceFormUI = (props) => {
|
|
|
409
407
|
<OrderTimeWrapper>
|
|
410
408
|
<DateWrapper>
|
|
411
409
|
<MonthYearLayer>
|
|
412
|
-
<span>{moment(dateSelected).format('MMMM, yyyy')}</span>
|
|
410
|
+
<span>{dateSelected && moment(dateSelected).format('MMMM, yyyy')}</span>
|
|
413
411
|
</MonthYearLayer>
|
|
414
412
|
<DaysSwiper left={<BsCaretLeftFill />}>
|
|
415
413
|
<Swiper
|