ordering-ui-external 3.0.1 → 4.0.0
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/{7.ordering-ui.b278a053085145d78d36.js → 7.ordering-ui.2b6bfdaa8b236eb288fa.js} +1 -1
- package/_bundles/{ordering-ui.b278a053085145d78d36.js → ordering-ui.2b6bfdaa8b236eb288fa.js} +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +3 -3
- package/_modules/themes/five/src/components/BusinessPreorder/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +4 -4
- package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +6 -5
- package/_modules/themes/five/src/components/Header/index.js +7 -6
- package/_modules/themes/five/src/components/Messages/MapMessages.js +80 -0
- package/_modules/themes/five/src/components/Messages/index.js +13 -67
- package/_modules/themes/five/src/components/MomentControl/index.js +2 -2
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -3
- package/_modules/themes/five/src/components/OrderDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/PaymentOptionWallet/index.js +2 -6
- package/_modules/themes/five/src/components/ProductForm/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +2 -2
- package/_modules/themes/five/src/components/ProductShare/styles.js +1 -1
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +3 -3
- package/src/themes/five/src/components/BusinessPreorder/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +4 -4
- package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +4 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -8
- package/src/themes/five/src/components/Header/index.js +3 -1
- package/src/themes/five/src/components/Messages/MapMessages.js +173 -0
- package/src/themes/five/src/components/Messages/index.js +13 -175
- package/src/themes/five/src/components/MomentControl/index.js +1 -1
- package/src/themes/five/src/components/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/OrderDetails/styles.js +1 -0
- package/src/themes/five/src/components/PaymentOptionWallet/index.js +2 -2
- package/src/themes/five/src/components/ProductForm/styles.js +1 -1
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +3 -1
- package/src/themes/five/src/components/ProductShare/styles.js +1 -1
- package/template/app.js +1 -1
- package/template/theme.json +2 -1
- /package/_bundles/{0.ordering-ui.b278a053085145d78d36.js → 0.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{1.ordering-ui.b278a053085145d78d36.js → 1.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{2.ordering-ui.b278a053085145d78d36.js → 2.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{4.ordering-ui.b278a053085145d78d36.js → 4.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{5.ordering-ui.b278a053085145d78d36.js → 5.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{6.ordering-ui.b278a053085145d78d36.js → 6.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{7.ordering-ui.b278a053085145d78d36.js.LICENSE.txt → 7.ordering-ui.2b6bfdaa8b236eb288fa.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.b278a053085145d78d36.js → 8.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{9.ordering-ui.b278a053085145d78d36.js → 9.ordering-ui.2b6bfdaa8b236eb288fa.js} +0 -0
- /package/_bundles/{ordering-ui.b278a053085145d78d36.js.LICENSE.txt → ordering-ui.2b6bfdaa8b236eb288fa.js.LICENSE.txt} +0 -0
|
@@ -146,7 +146,7 @@ var BusinessBasicInformation = function BusinessBasicInformation(props) {
|
|
|
146
146
|
var businessNameElement = document.getElementById('business_name');
|
|
147
147
|
if (businessNameElement) {
|
|
148
148
|
var _limit = window.pageYOffset >= (businessNameElement === null || businessNameElement === void 0 ? void 0 : businessNameElement.offsetTop) - 55 && window.pageYOffset > 0;
|
|
149
|
-
if (_limit
|
|
149
|
+
if (_limit) {
|
|
150
150
|
var _classAdded = businessNameElement.classList.contains('fixed-name');
|
|
151
151
|
!_classAdded && businessNameElement.classList.add('fixed-name');
|
|
152
152
|
} else {
|
|
@@ -72,7 +72,7 @@ var BusinessInfoContent = _styledComponents.default.div(_templateObject16 || (_t
|
|
|
72
72
|
exports.BusinessInfoContent = BusinessInfoContent;
|
|
73
73
|
var SearchWrapper = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
74
74
|
exports.SearchWrapper = SearchWrapper;
|
|
75
|
-
var WrapperSearch = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n z-index: 1002;\n\n .search-bar {\n margin-right: 10px;\n ", "\n input {\n width: 100%;\n\n @media (min-width: 500px) {\n width: 250px;\n }\n }\n }\n\n div:last-child {\n text-align: right;\n\n ", "\n }\n\n #select-input {\n background-color: transparent !important;\n border: none;\n color: #748194 !important;\n\n #list {\n border-radius: 8px;\n }\n }\n &.fixed-search {\n position: fixed;\n top: 0;\n right: 0;\n z-index: 10001;\n width: fit-content;\n margin-top: 0px;\n background-color: ", ";\n padding: 10px;\n }\n\n @media (min-width: 993px) {\n &.fixed-search {\n left: 0;\n width: 100vw;\n z-index:
|
|
75
|
+
var WrapperSearch = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n margin: 15px 0px 0px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-sizing: border-box;\n z-index: 1002;\n\n .search-bar {\n margin-right: 10px;\n ", "\n input {\n width: 100%;\n\n @media (min-width: 500px) {\n width: 250px;\n }\n }\n }\n\n div:last-child {\n text-align: right;\n\n ", "\n }\n\n #select-input {\n background-color: transparent !important;\n border: none;\n color: #748194 !important;\n\n #list {\n border-radius: 8px;\n }\n }\n &.fixed-search {\n position: fixed;\n top: 0;\n right: 0;\n z-index: 10001;\n width: fit-content;\n margin-top: 0px;\n background-color: ", ";\n padding: 10px;\n }\n\n @media (min-width: 993px) {\n &.fixed-search {\n left: 0;\n width: 100vw;\n z-index: 10000;\n }\n }\n"])), function (props) {
|
|
76
76
|
var _props$theme4;
|
|
77
77
|
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n margin-left: 10px;\n margin-right: 0;\n "])));
|
|
78
78
|
}, function (props) {
|
|
@@ -112,13 +112,13 @@ var BusinessMoreDetail = _styledComponents.default.div(_templateObject28 || (_te
|
|
|
112
112
|
return props.position ? 'black' : 'white';
|
|
113
113
|
});
|
|
114
114
|
exports.BusinessMoreDetail = BusinessMoreDetail;
|
|
115
|
-
var TitleWrapper = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n &.fixed-name {\n z-index:
|
|
115
|
+
var TitleWrapper = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n\n h2 {\n font-size: 24px;\n line-height: 36px;\n margin: 0 0 10px 0;\n font-weight: 600;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: ", ";\n &.fixed-name {\n z-index: 10001;\n position: fixed;\n top: 0;\n padding: 10px 0;\n font-size: 18px;\n ", "\n }\n @media (min-width: 768px) {\n font-size: 32px;\n }\n }\n"])), function (_ref4) {
|
|
116
116
|
var _theme$colors;
|
|
117
117
|
var theme = _ref4.theme;
|
|
118
118
|
return theme === null || theme === void 0 ? void 0 : (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.white;
|
|
119
119
|
}, function (_ref5) {
|
|
120
120
|
var isCustomLayout = _ref5.isCustomLayout;
|
|
121
|
-
return !isCustomLayout ? (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n width: calc(100vw -
|
|
121
|
+
return !isCustomLayout ? (0, _styledComponents.css)(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n width: calc(100vw - 200px);\n ", "\n "])), function (props) {
|
|
122
122
|
var _props$theme11;
|
|
123
123
|
return (_props$theme11 = props.theme) !== null && _props$theme11 !== void 0 && _props$theme11.rtl ? (0, _styledComponents.css)(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n right: 50px;\n "]))) : (0, _styledComponents.css)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n left: 50px;\n "])));
|
|
124
124
|
}) : (0, _styledComponents.css)(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n ", "\n "])), function (props) {
|
|
@@ -39,7 +39,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
39
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
40
40
|
_swiper.default.use([_swiper.Navigation]);
|
|
41
41
|
var BusinessPreorderUI = function BusinessPreorderUI(props) {
|
|
42
|
-
var _configs$
|
|
42
|
+
var _configs$general_hour, _configs$general_hour2, _configs$preorder_sta, _theme$images, _theme$images$dummies, _configs$max_days_pre, _configs$max_days_pre2, _configs$max_days_pre3, _orderState$options, _orderState$options$a;
|
|
43
43
|
var business = props.business,
|
|
44
44
|
handleClick = props.handleClick,
|
|
45
45
|
datesList = props.datesList,
|
|
@@ -85,7 +85,7 @@ var BusinessPreorderUI = function BusinessPreorderUI(props) {
|
|
|
85
85
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
86
86
|
isEnabled = _useState8[0],
|
|
87
87
|
setIsEnabled = _useState8[1];
|
|
88
|
-
var is12Hours = configs === null || configs === void 0 ? void 0 : (_configs$
|
|
88
|
+
var is12Hours = configs === null || configs === void 0 ? void 0 : (_configs$general_hour = configs.general_hour_format) === null || _configs$general_hour === void 0 ? void 0 : (_configs$general_hour2 = _configs$general_hour.value) === null || _configs$general_hour2 === void 0 ? void 0 : _configs$general_hour2.includes('hh:mm');
|
|
89
89
|
var isPreOrderSetting = (configs === null || configs === void 0 ? void 0 : (_configs$preorder_sta = configs.preorder_status_enabled) === null || _configs$preorder_sta === void 0 ? void 0 : _configs$preorder_sta.value) === '1';
|
|
90
90
|
var preOrderType = [{
|
|
91
91
|
value: 'business_menu',
|
|
@@ -149,12 +149,12 @@ var BusinessProductsCategoriesUI = function BusinessProductsCategoriesUI(props)
|
|
|
149
149
|
var disabledCustomWidth = isChew || !useKioskApp;
|
|
150
150
|
var style0 = '.sticky-prod-cat {';
|
|
151
151
|
style0 += 'position: fixed !important;';
|
|
152
|
-
style0 += "top: ".concat(
|
|
152
|
+
style0 += "top: ".concat(useKioskApp ? '0px' : '56px', " !important;");
|
|
153
153
|
style0 += 'left: 0px !important;';
|
|
154
154
|
style0 += 'z-index: 9999 !important;';
|
|
155
|
-
style0 += 'padding: 5px 5px 0px
|
|
156
|
-
style0 +=
|
|
157
|
-
!disabledCustomWidth && (style0 += "width: calc(100% - ".concat(useKioskApp ? '50px' : '
|
|
155
|
+
style0 += 'padding: 5px 5px 0px 20px !important;';
|
|
156
|
+
style0 += 'width: 100% !important;';
|
|
157
|
+
!disabledCustomWidth && (style0 += "width: calc(100% - ".concat(useKioskApp ? '50px' : '0px', ") !important;"));
|
|
158
158
|
style0 += '}';
|
|
159
159
|
var style1 = '.sticky-search {';
|
|
160
160
|
style1 += 'position: fixed !important;';
|
|
@@ -10,7 +10,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
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 CategoriesContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px 0px 0px 0px;\n background: ", ";\n z-index: 1000;\n position: absolute;\n top: 0;\n border-bottom: 1px solid #D9D9D9;\n text-align: center;\n width: ", ";\n
|
|
13
|
+
var CategoriesContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n overflow-x: auto;\n padding: 5px 0px 0px 0px;\n background: ", ";\n z-index: 1000;\n position: absolute;\n top: 0;\n border-bottom: 1px solid #D9D9D9;\n text-align: center;\n width: ", ";\n box-sizing: border-box;\n div.category {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding: 10px 0px;\n margin: 0 15px;\n &:nth-of-type(1) {\n margin-left: 0;\n ", "\n }\n }\n\n div.special {\n ", "\n }\n\n /* @media (min-width: 381px) {\n padding: 15px 0px 0px 0px;\n } */\n @media (min-width: 769px) {\n ", "\n }\n @media (min-width: 992px) {\n width: ", ";\n }\n"])), function (props) {
|
|
14
14
|
return props.theme.colors.backgroundPage;
|
|
15
15
|
}, function (props) {
|
|
16
16
|
return props.w || '100%';
|
|
@@ -272,7 +272,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
272
272
|
var backArrowElement = document.getElementById('back-arrow');
|
|
273
273
|
if (backArrowElement) {
|
|
274
274
|
var limit = window.pageYOffset >= (backArrowElement === null || backArrowElement === void 0 ? void 0 : backArrowElement.offsetTop) && window.pageYOffset > 0;
|
|
275
|
-
if (limit
|
|
275
|
+
if (limit) {
|
|
276
276
|
var classAdded = backArrowElement.classList.contains('fixed-arrow');
|
|
277
277
|
!classAdded && backArrowElement.classList.add('fixed-arrow');
|
|
278
278
|
} else {
|
|
@@ -42,7 +42,7 @@ var EmptyBtnWrapper = _styledComponents.default.div(_templateObject9 || (_templa
|
|
|
42
42
|
return props.theme.colors.darkTextColor;
|
|
43
43
|
});
|
|
44
44
|
exports.EmptyBtnWrapper = EmptyBtnWrapper;
|
|
45
|
-
var HeaderContent = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n .back-arrow {\n font-size: 24px;\n cursor: pointer;\n }\n .fixed-arrow {\n position: fixed;\n top: 0;\n left: 0;\n z-index:
|
|
45
|
+
var HeaderContent = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n .back-arrow {\n font-size: 24px;\n cursor: pointer;\n }\n .fixed-arrow {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 10001;\n width: 100vw;\n background-color: ", ";\n height: 56px;\n display: flex;\n align-items: center;\n ", "\n @media (min-width: 993px){\n width: 100px;\n }\n }\n"])), function (props) {
|
|
46
46
|
return props.theme.colors.backgroundPage;
|
|
47
47
|
}, function (props) {
|
|
48
48
|
var _props$theme;
|
|
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
51
51
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
52
52
|
var PIXELS_TO_SCROLL = 300;
|
|
53
53
|
var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
54
|
-
var _citiesState$cities, _ref, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _orderState$options, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _businessesList$busin, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderState$options2, _orderState$options3, _businessesList$busin3, _orderState$options7, _configs$business_lis, _configs$business_lis2, _configs$business_lis3, _theme$images2, _theme$images2$genera, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _configs$business_lis4, _theme$images3, _theme$images3$genera, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _citiesState$cities5, _citiesState$cities6, _citiesState$cities6$, _configs$
|
|
54
|
+
var _citiesState$cities, _ref, _theme$business_listi, _theme$business_listi2, _theme$business_listi3, _orderState$options, _theme$business_listi4, _theme$business_listi5, _theme$business_listi6, _theme$business_listi7, _theme$business_listi8, _theme$business_listi9, _theme$business_listi10, _theme$business_listi11, _theme$business_listi12, _theme$business_listi13, _theme$business_listi14, _theme$business_listi15, _theme$business_listi16, _theme$business_listi17, _theme$business_listi18, _theme$business_listi19, _theme$business_listi20, _theme$business_listi21, _businessesList$busin, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _orderState$options2, _orderState$options3, _businessesList$busin3, _orderState$options7, _configs$business_lis, _configs$business_lis2, _configs$business_lis3, _theme$images2, _theme$images2$genera, _theme$business_listi22, _theme$business_listi23, _theme$business_listi24, _theme$business_listi25, _configs$business_lis4, _theme$images3, _theme$images3$genera, _theme$business_listi26, _theme$business_listi27, _theme$business_listi28, _theme$business_listi29, _citiesState$cities5, _citiesState$cities6, _citiesState$cities6$, _configs$advanced_bus2, _orderState$options9, _orderState$options9$, _configs$advanced_bus3, _citiesState$cities7, _citiesState$cities8, _citiesState$cities8$, _orderState$options11, _orderState$options12, _businessesList$busin6, _businessesList$busin7;
|
|
55
55
|
var businessesList = props.businessesList,
|
|
56
56
|
paginationProps = props.paginationProps,
|
|
57
57
|
searchValue = props.searchValue,
|
|
@@ -289,9 +289,10 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
289
289
|
placeholder: t('SEARCH_BUSINESSES', 'Search Businesses'),
|
|
290
290
|
onSearch: handleChangeSearch,
|
|
291
291
|
handleCustomEnter: function handleCustomEnter() {
|
|
292
|
-
|
|
292
|
+
var _configs$advanced_bus;
|
|
293
|
+
return (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus = configs.advanced_business_search_enabled) === null || _configs$advanced_bus === void 0 ? void 0 : _configs$advanced_bus.value) === '1' ? onRedirectPage({
|
|
293
294
|
page: 'business_search'
|
|
294
|
-
});
|
|
295
|
+
}) : null;
|
|
295
296
|
}
|
|
296
297
|
}), !hideCities && (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities5 = citiesState.cities) === null || _citiesState$cities5 === void 0 ? void 0 : _citiesState$cities5.length) > 0 && /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
297
298
|
color: "primary",
|
|
@@ -299,7 +300,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
299
300
|
}, (citiesState === null || citiesState === void 0 ? void 0 : (_citiesState$cities6 = citiesState.cities) === null || _citiesState$cities6 === void 0 ? void 0 : (_citiesState$cities6$ = _citiesState$cities6.find(function (city) {
|
|
300
301
|
var _orderState$options8;
|
|
301
302
|
return (city === null || city === void 0 ? void 0 : city.id) === (orderState === null || orderState === void 0 ? void 0 : (_orderState$options8 = orderState.options) === null || _orderState$options8 === void 0 ? void 0 : _orderState$options8.city_id);
|
|
302
|
-
})) === null || _citiesState$cities6$ === void 0 ? void 0 : _citiesState$cities6$.name) || t('SELECT_A_CITY', 'Select a city')), !hideFilter && (configs === null || configs === void 0 ? void 0 : (_configs$
|
|
303
|
+
})) === null || _citiesState$cities6$ === void 0 ? void 0 : _citiesState$cities6$.name) || t('SELECT_A_CITY', 'Select a city')), !hideFilter && (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus2 = configs.advanced_business_search_enabled) === null || _configs$advanced_bus2 === void 0 ? void 0 : _configs$advanced_bus2.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
|
|
303
304
|
onClick: function onClick() {
|
|
304
305
|
return onRedirectPage({
|
|
305
306
|
page: 'business_search'
|
|
@@ -337,7 +338,7 @@ var BusinessesListingUI = function BusinessesListingUI(props) {
|
|
|
337
338
|
isCustomLayout: isCustomLayout,
|
|
338
339
|
placeholder: t('SEARCH_BUSINESSES', 'Search Businesses'),
|
|
339
340
|
onSearch: handleChangeSearch
|
|
340
|
-
}), (configs === null || configs === void 0 ? void 0 : (_configs$
|
|
341
|
+
}), (configs === null || configs === void 0 ? void 0 : (_configs$advanced_bus3 = configs.advanced_business_search_enabled) === null || _configs$advanced_bus3 === void 0 ? void 0 : _configs$advanced_bus3.value) === '1' && /*#__PURE__*/_react.default.createElement(_FiFilter.default, {
|
|
341
342
|
onClick: function onClick() {
|
|
342
343
|
return onRedirectPage({
|
|
343
344
|
page: 'business_search'
|
|
@@ -51,7 +51,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
51
51
|
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; } }
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
var Header = function Header(props) {
|
|
54
|
-
var _window$location$path, _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _theme$header, _theme$header$compone, _theme$header$compone2, _orderState$options, _orderState$options2, _Object$keys, _customerState$user, _orderState$options5, _orderState$options5$, _theme$images, _theme$images$logos, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _theme$images4, _theme$images4$logos, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _theme$images5, _theme$images5$logos, _orderState$options7, _orderState$options7$, _orderState$options8, _orderState$options8$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options9, _orderState$options10, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options11, _orderState$options12, _configState$
|
|
54
|
+
var _window$location$path, _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _theme$header, _theme$header$compone, _theme$header$compone2, _orderState$options, _orderState$options2, _Object$keys, _customerState$user, _orderState$options5, _orderState$options5$, _theme$images, _theme$images$logos, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _theme$images2, _theme$images2$logos, _theme$images3, _theme$images3$logos, _theme$images4, _theme$images4$logos, _orderingTheme$theme9, _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15, _theme$images5, _theme$images5$logos, _orderState$options7, _orderState$options7$, _orderState$options8, _orderState$options8$, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _configState$configs8, _configState$configs9, _orderState$options9, _orderState$options10, _configState$configs10, _configState$configs11, _theme$defaultLanguag2, _theme$defaultLanguag3, _orderState$options11, _orderState$options12, _configState$configs14, _configState$configs15, _orderState$options13, _configState$configs16, _configState$configs17, _configState$configs18, _configState$configs19, _orderState$options14, _orderState$options15, _configState$configs20, _configState$configs21, _orderState$options16, _configState$configs22, _configState$configs23, _configState$configs24, _configState$configs25, _orderState$options17, _orderState$options18, _customerState$user2, _customerState$user3, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _theme$defaultLanguag7, _theme$defaultLanguag8, _theme$defaultLanguag9;
|
|
55
55
|
var isHome = props.isHome,
|
|
56
56
|
location = props.location,
|
|
57
57
|
isShowOrderOptions = props.isShowOrderOptions,
|
|
@@ -344,7 +344,8 @@ var Header = function Header(props) {
|
|
|
344
344
|
return setSearchValue(value);
|
|
345
345
|
},
|
|
346
346
|
handleCustomEnter: function handleCustomEnter() {
|
|
347
|
-
|
|
347
|
+
var _configState$configs12, _configState$configs13;
|
|
348
|
+
return (configState === null || configState === void 0 ? void 0 : (_configState$configs12 = configState.configs) === null || _configState$configs12 === void 0 ? void 0 : (_configState$configs13 = _configState$configs12.advanced_business_search_enabled) === null || _configState$configs13 === void 0 ? void 0 : _configState$configs13.value) === '0' || businessSlug ? null : events.emit('go_to_page', {
|
|
348
349
|
page: 'business_search'
|
|
349
350
|
});
|
|
350
351
|
}
|
|
@@ -407,10 +408,10 @@ var Header = function Header(props) {
|
|
|
407
408
|
onClick: function onClick() {
|
|
408
409
|
return openModal('address');
|
|
409
410
|
}
|
|
410
|
-
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, null), " ", ((_orderState$options11 = orderState.options) === null || _orderState$options11 === void 0 ? void 0 : (_orderState$options12 = _orderState$options11.address) === null || _orderState$options12 === void 0 ? void 0 : _orderState$options12.address) || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')), !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$
|
|
411
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.GeoAlt, null), " ", ((_orderState$options11 = orderState.options) === null || _orderState$options11 === void 0 ? void 0 : (_orderState$options12 = _orderState$options11.address) === null || _orderState$options12 === void 0 ? void 0 : _orderState$options12.address) || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')), !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$configs14 = configState.configs) === null || _configState$configs14 === void 0 ? void 0 : (_configState$configs15 = _configState$configs14.preorder_status_enabled) === null || _configState$configs15 === void 0 ? void 0 : _configState$configs15.value) === undefined) && /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
|
|
411
412
|
variant: "moment",
|
|
412
413
|
momentState: orderState === null || orderState === void 0 ? void 0 : (_orderState$options13 = orderState.options) === null || _orderState$options13 === void 0 ? void 0 : _orderState$options13.moment,
|
|
413
|
-
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$
|
|
414
|
+
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$configs16 = configState.configs) === null || _configState$configs16 === void 0 ? void 0 : (_configState$configs17 = _configState$configs16.max_days_preorder) === null || _configState$configs17 === void 0 ? void 0 : _configState$configs17.value) === -1 || (configState === null || configState === void 0 ? void 0 : (_configState$configs18 = configState.configs) === null || _configState$configs18 === void 0 ? void 0 : (_configState$configs19 = _configState$configs18.max_days_preorder) === null || _configState$configs19 === void 0 ? void 0 : _configState$configs19.value) === 0 ? null : function (variant) {
|
|
414
415
|
return openModal(variant);
|
|
415
416
|
}
|
|
416
417
|
})) : windowSize.width >= 576 && /*#__PURE__*/_react.default.createElement(_styles.SubMenu, null, isFarAway && /*#__PURE__*/_react.default.createElement(_styles.FarAwayMessage, null, /*#__PURE__*/_react.default.createElement(_TiWarningOutline.default, null), /*#__PURE__*/_react.default.createElement("span", null, t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address'))), /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
|
|
@@ -422,10 +423,10 @@ var Header = function Header(props) {
|
|
|
422
423
|
containerStyle: {
|
|
423
424
|
width: '80%'
|
|
424
425
|
}
|
|
425
|
-
}), !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$
|
|
426
|
+
}), !isCustomerMode && (isPreOrderSetting || (configState === null || configState === void 0 ? void 0 : (_configState$configs20 = configState.configs) === null || _configState$configs20 === void 0 ? void 0 : (_configState$configs21 = _configState$configs20.preorder_status_enabled) === null || _configState$configs21 === void 0 ? void 0 : _configState$configs21.value) === undefined) && /*#__PURE__*/_react.default.createElement(_HeaderOption.HeaderOption, {
|
|
426
427
|
variant: "moment",
|
|
427
428
|
momentState: orderState === null || orderState === void 0 ? void 0 : (_orderState$options16 = orderState.options) === null || _orderState$options16 === void 0 ? void 0 : _orderState$options16.moment,
|
|
428
|
-
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$
|
|
429
|
+
onClick: (configState === null || configState === void 0 ? void 0 : (_configState$configs22 = configState.configs) === null || _configState$configs22 === void 0 ? void 0 : (_configState$configs23 = _configState$configs22.max_days_preorder) === null || _configState$configs23 === void 0 ? void 0 : _configState$configs23.value) === -1 || (configState === null || configState === void 0 ? void 0 : (_configState$configs24 = configState.configs) === null || _configState$configs24 === void 0 ? void 0 : (_configState$configs25 = _configState$configs24.max_days_preorder) === null || _configState$configs25 === void 0 ? void 0 : _configState$configs25.value) === 0 ? null : function (variant) {
|
|
429
430
|
return openModal(variant);
|
|
430
431
|
}
|
|
431
432
|
}))), modalIsOpen && /*#__PURE__*/_react.default.createElement(_Modal.Modal, _extends({}, !auth && modalSelected === 'address' && {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MapMessages = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
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; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
var MapMessages = function MapMessages(props) {
|
|
18
|
+
var messages = props.messages,
|
|
19
|
+
messagesToShow = props.messagesToShow,
|
|
20
|
+
order = props.order,
|
|
21
|
+
filterSpecialStatus = props.filterSpecialStatus,
|
|
22
|
+
handleModalImage = props.handleModalImage,
|
|
23
|
+
getLevel = props.getLevel,
|
|
24
|
+
business = props.business,
|
|
25
|
+
driver = props.driver,
|
|
26
|
+
getLogisticTagStatus = props.getLogisticTagStatus,
|
|
27
|
+
getStatus = props.getStatus;
|
|
28
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
29
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
30
|
+
t = _useLanguage2[1];
|
|
31
|
+
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
32
|
+
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
33
|
+
_useUtils2$ = _useUtils2[0],
|
|
34
|
+
parseDate = _useUtils2$.parseDate,
|
|
35
|
+
parseTime = _useUtils2$.parseTime;
|
|
36
|
+
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
37
|
+
_useSession2 = _slicedToArray(_useSession, 1),
|
|
38
|
+
user = _useSession2[0].user;
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, messages === null || messages === void 0 ? void 0 : messages.messages.map(function (message) {
|
|
40
|
+
var _message$change, _message$change2, _message$change3, _message$driver, _message$driver2, _messagesToShow$messa, _message$can_see, _message$can_see2;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
42
|
+
key: message.id
|
|
43
|
+
}, message.type === 1 && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, {
|
|
44
|
+
key: message.id
|
|
45
|
+
}, ((_message$change = message.change) === null || _message$change === void 0 ? void 0 : _message$change.attribute) !== 'driver_id' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
46
|
+
outputFormat: 'MMM DD, YYYY'
|
|
47
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageConsole, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleConsole, null, t('ORDER', 'Order'), " ", ' ', /*#__PURE__*/_react.default.createElement("strong", null, t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))), " ", ' ', t('CHANGED_FROM', 'Changed from'), " ", ' ', filterSpecialStatus.includes(message.change.attribute) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.change.old === null ? /*#__PURE__*/_react.default.createElement("strong", null, "0") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("strong", null, message.change.old), " ", ' '), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", t('TO', 'to'), " ", ' ', " ", /*#__PURE__*/_react.default.createElement("strong", null, message.change.new), " ", t('MINUTES', 'Minutes'))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.change.old !== null && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("strong", null, ((_message$change2 = message.change) === null || _message$change2 === void 0 ? void 0 : _message$change2.attribute) === 'logistic_status' ? getLogisticTagStatus(parseInt(message.change.old, 10)) : t(getStatus(parseInt(message.change.old, 10)))), " ", ' '), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", t('TO', 'to'), " ", ' ', " ", /*#__PURE__*/_react.default.createElement("strong", null, ((_message$change3 = message.change) === null || _message$change3 === void 0 ? void 0 : _message$change3.attribute) === 'logistic_status' ? getLogisticTagStatus(parseInt(message.change.new, 10)) : t(getStatus(parseInt(message.change.new, 10)))), " ")), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at))))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
48
|
+
outputFormat: 'MMM DD, YYYY'
|
|
49
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageConsole, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleConsole, null, message.change.new ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("strong", null, (_message$driver = message.driver) === null || _message$driver === void 0 ? void 0 : _message$driver.name, " ", ' ', " ", ((_message$driver2 = message.driver) === null || _message$driver2 === void 0 ? void 0 : _message$driver2.lastname) && message.driver.lastname, " "), t('WAS_ASSIGNED_AS_DRIVER', 'Was assigned as driver'), message.comment && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("br", null), " ", message.comment.length)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, t('DRIVER_UNASSIGNED', 'Driver unassigned')), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at)))))), ((messagesToShow === null || messagesToShow === void 0 ? void 0 : (_messagesToShow$messa = messagesToShow.messages) === null || _messagesToShow$messa === void 0 ? void 0 : _messagesToShow$messa.length) || (message === null || message === void 0 ? void 0 : (_message$can_see = message.can_see) === null || _message$can_see === void 0 ? void 0 : _message$can_see.includes('2')) && business || (message === null || message === void 0 ? void 0 : (_message$can_see2 = message.can_see) === null || _message$can_see2 === void 0 ? void 0 : _message$can_see2.includes('4')) && driver) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.type === 2 && (user === null || user === void 0 ? void 0 : user.id) === message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
50
|
+
outputFormat: 'MMM DD, YYYY'
|
|
51
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageCustomer, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleCustomer, null, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), message.comment, /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at))))), message.type === 3 && user.id === message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
52
|
+
outputFormat: 'MMM DD, YYYY'
|
|
53
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageCustomer, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleCustomer, {
|
|
54
|
+
name: "image"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), /*#__PURE__*/_react.default.createElement(_styles.ChatImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
56
|
+
src: message.source,
|
|
57
|
+
onClick: function onClick() {
|
|
58
|
+
return handleModalImage(message.source);
|
|
59
|
+
},
|
|
60
|
+
alt: "chat-image",
|
|
61
|
+
width: "168px",
|
|
62
|
+
height: "300px"
|
|
63
|
+
})), message.comment && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.comment), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at))))), message.type === 2 && (user === null || user === void 0 ? void 0 : user.id) !== message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
64
|
+
outputFormat: 'MMM DD, YYYY'
|
|
65
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleBusines, null, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), message.comment, /*#__PURE__*/_react.default.createElement(_styles.TimeofSentByAdmin, null, parseTime(message.created_at))))), message.type === 3 && user.id !== message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
66
|
+
outputFormat: 'MMM DD, YYYY'
|
|
67
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleBusines, {
|
|
68
|
+
name: "image"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), /*#__PURE__*/_react.default.createElement(_styles.ChatImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
70
|
+
src: message.source,
|
|
71
|
+
onClick: function onClick() {
|
|
72
|
+
return handleModalImage(message.source);
|
|
73
|
+
},
|
|
74
|
+
alt: "chat-image",
|
|
75
|
+
width: "168px",
|
|
76
|
+
height: "300px"
|
|
77
|
+
})), message.comment && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.comment), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at)))))));
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
exports.MapMessages = MapMessages;
|
|
@@ -23,6 +23,7 @@ var _MdcCloseOctagonOutline = _interopRequireDefault(require("@meronex/icons/mdc
|
|
|
23
23
|
var _utils = require("../../../../../utils");
|
|
24
24
|
var _Confirm = require("../Confirm");
|
|
25
25
|
var _Modal = require("../Modal");
|
|
26
|
+
var _MapMessages = require("./MapMessages");
|
|
26
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
28
|
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); }
|
|
28
29
|
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; }
|
|
@@ -31,7 +32,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
31
32
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
32
33
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
33
34
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
34
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
35
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
36
36
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
37
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -40,7 +40,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
var filterSpecialStatus = ['prepared_in', 'delivered_in', 'delivery_datetime'];
|
|
42
42
|
var MessagesUI = function MessagesUI(props) {
|
|
43
|
-
var _messages$messages, _order$business, _theme$images, _theme$images$dummies, _order$business2, _order$driver, _order$driver2, _order$business3, _theme$images2, _theme$images2$dummie, _order$driver3, _order$business4, _order$driver4, _order$business6, _theme$images3, _theme$images3$dummie, _order$driver5, _messagesToShow$
|
|
43
|
+
var _messages$messages, _order$business, _theme$images, _theme$images$dummies, _order$business2, _order$driver, _order$driver2, _order$business3, _theme$images2, _theme$images2$dummie, _order$driver3, _order$business4, _order$driver4, _order$business6, _theme$images3, _theme$images3$dummie, _order$driver5, _messagesToShow$messa;
|
|
44
44
|
var order = props.order,
|
|
45
45
|
messages = props.messages,
|
|
46
46
|
handleSend = props.handleSend,
|
|
@@ -73,9 +73,6 @@ var MessagesUI = function MessagesUI(props) {
|
|
|
73
73
|
_useState2 = _slicedToArray(_useState, 2),
|
|
74
74
|
alertState = _useState2[0],
|
|
75
75
|
setAlertState = _useState2[1];
|
|
76
|
-
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
77
|
-
_useSession2 = _slicedToArray(_useSession, 1),
|
|
78
|
-
user = _useSession2[0].user;
|
|
79
76
|
var _useEvent = (0, _orderingComponentsExternal.useEvent)(),
|
|
80
77
|
_useEvent2 = _slicedToArray(_useEvent, 1),
|
|
81
78
|
events = _useEvent2[0];
|
|
@@ -311,66 +308,6 @@ var MessagesUI = function MessagesUI(props) {
|
|
|
311
308
|
}
|
|
312
309
|
});
|
|
313
310
|
};
|
|
314
|
-
var MapMessages = function MapMessages(_ref) {
|
|
315
|
-
var _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
316
|
-
var messages = _ref.messages;
|
|
317
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
318
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
319
|
-
key: i
|
|
320
|
-
}, BeforeElement);
|
|
321
|
-
}), (_props$beforeComponen = props.beforeComponents) === null || _props$beforeComponen === void 0 ? void 0 : _props$beforeComponen.map(function (BeforeComponent, i) {
|
|
322
|
-
return /*#__PURE__*/_react.default.createElement(BeforeComponent, _extends({
|
|
323
|
-
key: i
|
|
324
|
-
}, props));
|
|
325
|
-
}), messages === null || messages === void 0 ? void 0 : messages.messages.map(function (message) {
|
|
326
|
-
var _message$change, _message$change2, _message$change3, _message$driver, _message$driver2, _messagesToShow$messa, _message$can_see, _message$can_see2;
|
|
327
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
328
|
-
key: message.id
|
|
329
|
-
}, message.type === 1 && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, {
|
|
330
|
-
key: message.id
|
|
331
|
-
}, ((_message$change = message.change) === null || _message$change === void 0 ? void 0 : _message$change.attribute) !== 'driver_id' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
332
|
-
outputFormat: 'MMM DD, YYYY'
|
|
333
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageConsole, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleConsole, null, t('ORDER', 'Order'), " ", ' ', /*#__PURE__*/_react.default.createElement("strong", null, t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))), " ", ' ', t('CHANGED_FROM', 'Changed from'), " ", ' ', filterSpecialStatus.includes(message.change.attribute) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.change.old === null ? /*#__PURE__*/_react.default.createElement("strong", null, "0") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("strong", null, message.change.old), " ", ' '), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", t('TO', 'to'), " ", ' ', " ", /*#__PURE__*/_react.default.createElement("strong", null, message.change.new), " ", t('MINUTES', 'Minutes'))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.change.old !== null && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("strong", null, ((_message$change2 = message.change) === null || _message$change2 === void 0 ? void 0 : _message$change2.attribute) === 'logistic_status' ? getLogisticTagStatus(parseInt(message.change.old, 10)) : t(getStatus(parseInt(message.change.old, 10)))), " ", ' '), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", t('TO', 'to'), " ", ' ', " ", /*#__PURE__*/_react.default.createElement("strong", null, ((_message$change3 = message.change) === null || _message$change3 === void 0 ? void 0 : _message$change3.attribute) === 'logistic_status' ? getLogisticTagStatus(parseInt(message.change.new, 10)) : t(getStatus(parseInt(message.change.new, 10)))), " ")), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at))))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
334
|
-
outputFormat: 'MMM DD, YYYY'
|
|
335
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageConsole, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleConsole, null, message.change.new ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("strong", null, (_message$driver = message.driver) === null || _message$driver === void 0 ? void 0 : _message$driver.name, " ", ' ', " ", ((_message$driver2 = message.driver) === null || _message$driver2 === void 0 ? void 0 : _message$driver2.lastname) && message.driver.lastname, " "), t('WAS_ASSIGNED_AS_DRIVER', 'Was assigned as driver'), message.comment && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("br", null), " ", message.comment.length)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, t('DRIVER_UNASSIGNED', 'Driver unassigned')), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at)))))), ((messagesToShow === null || messagesToShow === void 0 ? void 0 : (_messagesToShow$messa = messagesToShow.messages) === null || _messagesToShow$messa === void 0 ? void 0 : _messagesToShow$messa.length) || (message === null || message === void 0 ? void 0 : (_message$can_see = message.can_see) === null || _message$can_see === void 0 ? void 0 : _message$can_see.includes('2')) && business || (message === null || message === void 0 ? void 0 : (_message$can_see2 = message.can_see) === null || _message$can_see2 === void 0 ? void 0 : _message$can_see2.includes('4')) && driver) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.type === 2 && (user === null || user === void 0 ? void 0 : user.id) === message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
336
|
-
outputFormat: 'MMM DD, YYYY'
|
|
337
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageCustomer, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleCustomer, null, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), message.comment, /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at))))), message.type === 3 && user.id === message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
338
|
-
outputFormat: 'MMM DD, YYYY'
|
|
339
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageCustomer, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleCustomer, {
|
|
340
|
-
name: "image"
|
|
341
|
-
}, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), /*#__PURE__*/_react.default.createElement(_styles.ChatImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
342
|
-
src: message.source,
|
|
343
|
-
onClick: function onClick() {
|
|
344
|
-
return handleModalImage(message.source);
|
|
345
|
-
},
|
|
346
|
-
alt: "chat-image",
|
|
347
|
-
width: "168px",
|
|
348
|
-
height: "300px"
|
|
349
|
-
})), message.comment && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.comment), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at))))), message.type === 2 && (user === null || user === void 0 ? void 0 : user.id) !== message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
350
|
-
outputFormat: 'MMM DD, YYYY'
|
|
351
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleBusines, null, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), message.comment, /*#__PURE__*/_react.default.createElement(_styles.TimeofSentByAdmin, null, parseTime(message.created_at))))), message.type === 3 && user.id !== message.author_id && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(message.created_at, {
|
|
352
|
-
outputFormat: 'MMM DD, YYYY'
|
|
353
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageBusiness, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleBusines, {
|
|
354
|
-
name: "image"
|
|
355
|
-
}, /*#__PURE__*/_react.default.createElement("strong", null, /*#__PURE__*/_react.default.createElement(_styles.MyName, null, message.author.name, " (", order.customer_id === message.author.id ? getLevel(3) : getLevel(message.author.level), ")")), /*#__PURE__*/_react.default.createElement(_styles.ChatImage, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
356
|
-
src: message.source,
|
|
357
|
-
onClick: function onClick() {
|
|
358
|
-
return handleModalImage(message.source);
|
|
359
|
-
},
|
|
360
|
-
alt: "chat-image",
|
|
361
|
-
width: "168px",
|
|
362
|
-
height: "300px"
|
|
363
|
-
})), message.comment && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message.comment), /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(message.created_at)))))));
|
|
364
|
-
}), (_props$afterComponent = props.afterComponents) === null || _props$afterComponent === void 0 ? void 0 : _props$afterComponent.map(function (AfterComponent, i) {
|
|
365
|
-
return /*#__PURE__*/_react.default.createElement(AfterComponent, _extends({
|
|
366
|
-
key: i
|
|
367
|
-
}, props));
|
|
368
|
-
}), (_props$afterElements = props.afterElements) === null || _props$afterElements === void 0 ? void 0 : _props$afterElements.map(function (AfterElement, i) {
|
|
369
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
370
|
-
key: i
|
|
371
|
-
}, AfterElement);
|
|
372
|
-
}));
|
|
373
|
-
};
|
|
374
311
|
return /*#__PURE__*/_react.default.createElement(_styles.MessagesContainer, {
|
|
375
312
|
profileMessages: profileMessages
|
|
376
313
|
}, /*#__PURE__*/_react.default.createElement(_styles.MessagesLayoutWrapper, null, !profileMessages && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MessagesClose, {
|
|
@@ -455,8 +392,17 @@ var MessagesUI = function MessagesUI(props) {
|
|
|
455
392
|
height: 100
|
|
456
393
|
})))), !(messages !== null && messages !== void 0 && messages.loading) && order && /*#__PURE__*/_react.default.createElement(_styles.MessageContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styles.MessageCreatedDate, null, /*#__PURE__*/_react.default.createElement("span", null, parseDate(order.created_at, {
|
|
457
394
|
outputFormat: 'MMM DD, YYYY'
|
|
458
|
-
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageConsole, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleConsole, null, t('ORDER_PLACED_FOR', 'Order placed for'), " ", ' ', /*#__PURE__*/_react.default.createElement("strong", null, parseDate(order.created_at)), " ", ' ', t('VIA', 'Via'), ' ', /*#__PURE__*/_react.default.createElement("strong", null, order.app_id ? t(order.app_id.toUpperCase(), order.app_id) : t('OTHER', 'Other')), ' ', /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(order.created_at)))), /*#__PURE__*/_react.default.createElement(MapMessages, {
|
|
459
|
-
messages: messagesToShow !== null && messagesToShow !== void 0 && (_messagesToShow$
|
|
395
|
+
}))), /*#__PURE__*/_react.default.createElement(_styles.MessageConsole, null, /*#__PURE__*/_react.default.createElement(_styles.BubbleConsole, null, t('ORDER_PLACED_FOR', 'Order placed for'), " ", ' ', /*#__PURE__*/_react.default.createElement("strong", null, parseDate(order.created_at)), " ", ' ', t('VIA', 'Via'), ' ', /*#__PURE__*/_react.default.createElement("strong", null, order.app_id ? t(order.app_id.toUpperCase(), order.app_id) : t('OTHER', 'Other')), ' ', /*#__PURE__*/_react.default.createElement(_styles.TimeofSent, null, parseTime(order.created_at)))), /*#__PURE__*/_react.default.createElement(_MapMessages.MapMessages, {
|
|
396
|
+
messages: messagesToShow !== null && messagesToShow !== void 0 && (_messagesToShow$messa = messagesToShow.messages) !== null && _messagesToShow$messa !== void 0 && _messagesToShow$messa.length ? messagesToShow : messages,
|
|
397
|
+
messagesToShow: messagesToShow,
|
|
398
|
+
order: order,
|
|
399
|
+
filterSpecialStatus: filterSpecialStatus,
|
|
400
|
+
handleModalImage: handleModalImage,
|
|
401
|
+
getLevel: getLevel,
|
|
402
|
+
business: business,
|
|
403
|
+
driver: driver,
|
|
404
|
+
getLogisticTagStatus: getLogisticTagStatus,
|
|
405
|
+
getStatus: getStatus
|
|
460
406
|
}))), chatDisabled ? /*#__PURE__*/_react.default.createElement(_styles.NotSendMessage, null, /*#__PURE__*/_react.default.createElement(_MdcCloseOctagonOutline.default, null), /*#__PURE__*/_react.default.createElement("p", null, t('NOT_SEND_MESSAGES', 'You can\'t send messages because the order has ended'))) : /*#__PURE__*/_react.default.createElement(_styles.SendForm, null, /*#__PURE__*/_react.default.createElement(_styles.QuickMessageWrapper, null, quickMessageList.map(function (quickMessage, i) {
|
|
461
407
|
return /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
462
408
|
key: i,
|
|
@@ -38,7 +38,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
_swiper.default.use([_swiper.Navigation]);
|
|
40
40
|
var MomentControlUI = function MomentControlUI(props) {
|
|
41
|
-
var _configs$
|
|
41
|
+
var _configs$general_hour, _configs$general_hour2, _props$beforeElements, _props$beforeComponen, _configs$max_days_pre, _configs$max_days_pre2, _configs$max_days_pre3, _props$afterComponent, _props$afterElements;
|
|
42
42
|
var isAsap = props.isAsap,
|
|
43
43
|
datesList = props.datesList,
|
|
44
44
|
hoursList = props.hoursList,
|
|
@@ -52,7 +52,7 @@ var MomentControlUI = function MomentControlUI(props) {
|
|
|
52
52
|
var _useConfig = (0, _orderingComponentsExternal.useConfig)(),
|
|
53
53
|
_useConfig2 = _slicedToArray(_useConfig, 1),
|
|
54
54
|
configs = _useConfig2[0].configs;
|
|
55
|
-
var is12hours = configs === null || configs === void 0 ? void 0 : (_configs$
|
|
55
|
+
var is12hours = configs === null || configs === void 0 ? void 0 : (_configs$general_hour = configs.general_hour_format) === null || _configs$general_hour === void 0 ? void 0 : (_configs$general_hour2 = _configs$general_hour.value) === null || _configs$general_hour2 === void 0 ? void 0 : _configs$general_hour2.includes('hh:mm');
|
|
56
56
|
var _useUtils = (0, _orderingComponentsExternal.useUtils)(),
|
|
57
57
|
_useUtils2 = _slicedToArray(_useUtils, 1),
|
|
58
58
|
parseTime = _useUtils2[0].parseTime;
|
|
@@ -57,7 +57,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
57
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; } }
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
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, _configs$
|
|
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, _configs$general_hour, _order$reporting_data, _configs$general_hour2, _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;
|
|
61
61
|
var userCustomerId = props.userCustomerId,
|
|
62
62
|
handleChangeOrderStatus = props.handleChangeOrderStatus,
|
|
63
63
|
handleBusinessRedirect = props.handleBusinessRedirect,
|
|
@@ -527,9 +527,10 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
527
527
|
})) === null || _orderTypes$find === void 0 ? void 0 : _orderTypes$find.text), !hideDeliveryDate && /*#__PURE__*/_react.default.createElement("p", {
|
|
528
528
|
className: "date"
|
|
529
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)], {
|
|
530
|
+
order: order,
|
|
532
531
|
outputFormat: "YYYY-MM-DD ".concat(configs === null || configs === void 0 ? void 0 : (_configs$general_hour = configs.general_hour_format) === null || _configs$general_hour === void 0 ? void 0 : _configs$general_hour.value)
|
|
532
|
+
}) : 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)], {
|
|
533
|
+
outputFormat: "YYYY-MM-DD ".concat(configs === null || configs === void 0 ? void 0 : (_configs$general_hour2 = configs.general_hour_format) === null || _configs$general_hour2 === void 0 ? void 0 : _configs$general_hour2.value)
|
|
533
534
|
})), (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, {
|
|
534
535
|
color: "primary",
|
|
535
536
|
outline: true,
|
|
@@ -50,7 +50,7 @@ var ActionsBlock = _styledComponents.default.div(_templateObject12 || (_template
|
|
|
50
50
|
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-left: 5px;\n margin-right: 0px;\n "])));
|
|
51
51
|
});
|
|
52
52
|
exports.ActionsBlock = ActionsBlock;
|
|
53
|
-
var OrderInfo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0px 0px 35px;\n position: relative;\n h1, p {\n margin: 0px;\n color: ", ";\n }\n h1 {\n margin-bottom: 5px;\n font-weight: 600;\n font-size: 32px;\n }\n p {\n font-size: 14px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .date {\n margin-bottom: 6px;\n }\n .types {\n margin-bottom: 6px;\n font-size: 16px;\n }\n .order-status {\n font-weight: 600;\n font-size: 16px;\n }\n"])), function (props) {
|
|
53
|
+
var OrderInfo = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0px 0px 35px;\n position: relative;\n h1, p {\n margin: 0px;\n color: ", ";\n }\n h1 {\n margin-bottom: 5px;\n font-weight: 600;\n font-size: 32px;\n }\n p {\n font-size: 14px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .date {\n margin-bottom: 6px;\n text-transform: uppercase;\n }\n .types {\n margin-bottom: 6px;\n font-size: 16px;\n }\n .order-status {\n font-weight: 600;\n font-size: 16px;\n }\n"])), function (props) {
|
|
54
54
|
return props.theme.colors.darkTextColor;
|
|
55
55
|
});
|
|
56
56
|
exports.OrderInfo = OrderInfo;
|
|
@@ -139,15 +139,11 @@ var PaymentOptionWalletUI = function PaymentOptionWalletUI(props) {
|
|
|
139
139
|
color: (cart === null || cart === void 0 ? void 0 : cart.balance) === 0 && !checkedState[idx] || wallet.balance === 0 ? theme.colors.darkGray : 'black'
|
|
140
140
|
},
|
|
141
141
|
htmlFor: "custom-checkbox-".concat(idx)
|
|
142
|
-
}, (_walletName$wallet$ty2 = walletName[wallet.type]) === null || _walletName$wallet$ty2 === void 0 ? void 0 : _walletName$wallet$ty2.name))), /*#__PURE__*/_react.default.createElement("div", null, wallet.type === 'cash' && /*#__PURE__*/_react.default.createElement("span", null, parsePrice(wallet === null || wallet === void 0 ? void 0 : wallet.balance, {
|
|
143
|
-
isTruncable: true
|
|
144
|
-
})), wallet.type === 'credit_point' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
142
|
+
}, (_walletName$wallet$ty2 = walletName[wallet.type]) === null || _walletName$wallet$ty2 === void 0 ? void 0 : _walletName$wallet$ty2.name))), /*#__PURE__*/_react.default.createElement("div", null, wallet.type === 'cash' && /*#__PURE__*/_react.default.createElement("span", null, parsePrice(wallet === null || wallet === void 0 ? void 0 : wallet.balance)), wallet.type === 'credit_point' && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
145
143
|
style: {
|
|
146
144
|
color: theme.colors.primary
|
|
147
145
|
}
|
|
148
|
-
}, "".concat(wallet === null || wallet === void 0 ? void 0 : wallet.balance, " ").concat(t('POINTS', 'Points'))), " ", (wallet === null || wallet === void 0 ? void 0 : wallet.balance) > 0 && "= ".concat(parsePrice((wallet === null || wallet === void 0 ? void 0 : wallet.balance) / (wallet === null || wallet === void 0 ? void 0 : wallet.redemption_rate)
|
|
149
|
-
isTruncable: true
|
|
150
|
-
})))));
|
|
146
|
+
}, "".concat(wallet === null || wallet === void 0 ? void 0 : wallet.balance, " ").concat(t('POINTS', 'Points'))), " ", (wallet === null || wallet === void 0 ? void 0 : wallet.balance) > 0 && "= ".concat(parsePrice((wallet === null || wallet === void 0 ? void 0 : wallet.balance) / (wallet === null || wallet === void 0 ? void 0 : wallet.redemption_rate))))));
|
|
151
147
|
})), (walletsState === null || walletsState === void 0 ? void 0 : walletsState.loading) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, _toConsumableArray(Array(2).keys()).map(function (i) {
|
|
152
148
|
return /*#__PURE__*/_react.default.createElement(_styles.SectionWrapper, {
|
|
153
149
|
key: i
|
|
@@ -96,7 +96,7 @@ var WrapperIngredients = _styledComponents.default.div(_templateObject25 || (_te
|
|
|
96
96
|
return isProductSoldout && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n border-radius: 10px;\n pointer-events: none;\n background: hsl(0, 0%, 72%);\n "])));
|
|
97
97
|
});
|
|
98
98
|
exports.WrapperIngredients = WrapperIngredients;
|
|
99
|
-
var ProductTabContainer = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n border-bottom: 1px solid #E9ECEF;\n position: sticky;\n top:
|
|
99
|
+
var ProductTabContainer = _styledComponents.default.div(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n border-bottom: 1px solid #E9ECEF;\n position: sticky;\n top: 50px;\n background: white;\n z-index: 9999996;\n overflow: scroll hidden;\n width: 100%;\n ::-webkit-scrollbar {\n height: 0px;\n }\n\n #optionList {\n > div {\n white-space: nowrap;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 10px 0px;\n margin-right: 25px;\n ", "\n }\n }\n"])), function (props) {
|
|
100
100
|
return props.theme.rtl && (0, _styledComponents.css)(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n margin-right: 0px;\n margin-left: 25px;\n "])));
|
|
101
101
|
});
|
|
102
102
|
exports.ProductTabContainer = ProductTabContainer;
|