ordering-ui-external 14.1.7 → 14.1.8
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.d53641b81f759911f36f.js → 7.ordering-ui.8668ba2c7ba56b89cbdd.js} +1 -1
- package/_bundles/{ordering-ui.d53641b81f759911f36f.js → ordering-ui.8668ba2c7ba56b89cbdd.js} +2 -2
- package/_modules/components/BusinessesMap/index.js +14 -5
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +5 -2
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +12 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
- package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +12 -6
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +6 -3
- package/_modules/themes/callcenterOriginal/src/styles/Buttons/index.js +5 -6
- package/_modules/themes/five/src/components/AddressDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +5 -3
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +14 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -8
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/index.js +1 -1
- package/_modules/themes/five/src/components/OrdersOption/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +7 -7
- package/_modules/themes/five/src/components/UserDetails/styles.js +8 -7
- package/package.json +2 -2
- package/src/components/BusinessesMap/index.js +11 -5
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +3 -1
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -8
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +9 -3
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -6
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +2 -1
- package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +5 -5
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/styles/Buttons/index.js +3 -3
- package/src/themes/five/src/components/AddressDetails/styles.js +2 -4
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +17 -6
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +6 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -9
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/src/themes/five/src/components/Checkout/index.js +1 -1
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -1
- package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +8 -8
- package/src/themes/five/src/components/UserDetails/styles.js +16 -9
- /package/_bundles/{0.ordering-ui.d53641b81f759911f36f.js → 0.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{1.ordering-ui.d53641b81f759911f36f.js → 1.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{2.ordering-ui.d53641b81f759911f36f.js → 2.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{4.ordering-ui.d53641b81f759911f36f.js → 4.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{5.ordering-ui.d53641b81f759911f36f.js → 5.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{6.ordering-ui.d53641b81f759911f36f.js → 6.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{7.ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → 7.ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.d53641b81f759911f36f.js → 8.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{9.ordering-ui.d53641b81f759911f36f.js → 9.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
- /package/_bundles/{ordering-ui.d53641b81f759911f36f.js.LICENSE.txt → ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt} +0 -0
|
@@ -183,19 +183,19 @@ var UserDetailsUI = function UserDetailsUI(props) {
|
|
|
183
183
|
}
|
|
184
184
|
})), /*#__PURE__*/_react.default.createElement("h1", null, t('CUSTOMER_DETAILS', 'Customer Details'))), !isCheckoutPlace && /*#__PURE__*/_react.default.createElement(_styles.Header, {
|
|
185
185
|
className: "user-form"
|
|
186
|
-
}, !isModal && /*#__PURE__*/_react.default.createElement("h1", null, t('CUSTOMER_DETAILS', 'Customer Details')), cartStatus !== 2 &&
|
|
187
|
-
onClick: function onClick() {
|
|
188
|
-
return toggleIsEdit();
|
|
189
|
-
}
|
|
190
|
-
}, t('CHANGE_USER_DETAILS', 'Change customer details')) : /*#__PURE__*/_react.default.createElement(_FcCancel.default, {
|
|
186
|
+
}, !isModal && /*#__PURE__*/_react.default.createElement("h1", null, t('CUSTOMER_DETAILS', 'Customer Details')), cartStatus !== 2 && isEdit && /*#__PURE__*/_react.default.createElement(_FcCancel.default, {
|
|
191
187
|
className: "cancel",
|
|
192
188
|
onClick: function onClick() {
|
|
193
189
|
return toggleEditState();
|
|
194
190
|
}
|
|
195
|
-
}))
|
|
191
|
+
})), !isEdit ? /*#__PURE__*/_react.default.createElement(_styles.UserData, null, ((userData === null || userData === void 0 ? void 0 : userData.name) || (userData === null || userData === void 0 ? void 0 : userData.middle_name) || (userData === null || userData === void 0 ? void 0 : userData.lastname) || (userData === null || userData === void 0 ? void 0 : userData.second_lastname)) && /*#__PURE__*/_react.default.createElement(_styles.UserName, null, userData === null || userData === void 0 ? void 0 : userData.name, " ", userData === null || userData === void 0 ? void 0 : userData.middle_name, " ", userData === null || userData === void 0 ? void 0 : userData.lastname, " ", userData === null || userData === void 0 ? void 0 : userData.second_lastname), ((_userData$email = userData === null || userData === void 0 ? void 0 : userData.email) !== null && _userData$email !== void 0 ? _userData$email : userData === null || userData === void 0 ? void 0 : userData.guest_email) && /*#__PURE__*/_react.default.createElement("p", null, userData !== null && userData !== void 0 && userData.guest_id ? userData === null || userData === void 0 ? void 0 : userData.guest_email : userData === null || userData === void 0 ? void 0 : userData.email), (((_userData$cellphone = userData === null || userData === void 0 ? void 0 : userData.cellphone) !== null && _userData$cellphone !== void 0 ? _userData$cellphone : userData === null || userData === void 0 ? void 0 : userData.guest_cellphone) || ((_user$cellphone = user === null || user === void 0 ? void 0 : user.cellphone) !== null && _user$cellphone !== void 0 ? _user$cellphone : user === null || user === void 0 ? void 0 : user.guest_cellphone)) && /*#__PURE__*/_react.default.createElement(_styles.PhoneContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CountryFlag, null, (userData === null || userData === void 0 ? void 0 : userData.country_phone_code) && ((_userData$cellphone2 = userData === null || userData === void 0 ? void 0 : userData.cellphone) !== null && _userData$cellphone2 !== void 0 ? _userData$cellphone2 : userData === null || userData === void 0 ? void 0 : userData.guest_cellphone) && /*#__PURE__*/_react.default.createElement(_reactPhoneNumberInput.default, {
|
|
196
192
|
onChange: function onChange() {},
|
|
197
193
|
defaultCountry: (_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 || (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 || (_userData = userData[userData !== null && userData !== void 0 && userData.guest_id ? 'guest_cellphone' : 'cellphone']) === null || _userData === void 0 ? void 0 : _userData.replace("+".concat(userData === null || userData === void 0 ? void 0 : userData.country_phone_code), '')))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country
|
|
198
|
-
})), /*#__PURE__*/_react.default.createElement("p", null, userData !== null && userData !== void 0 && userData.guest_id ? userData === null || userData === void 0 ? void 0 : userData.guest_cellphone : userData === null || userData === void 0 ? void 0 : userData.cellphone))
|
|
194
|
+
})), /*#__PURE__*/_react.default.createElement("p", null, userData !== null && userData !== void 0 && userData.guest_id ? userData === null || userData === void 0 ? void 0 : userData.guest_cellphone : userData === null || userData === void 0 ? void 0 : userData.cellphone)), /*#__PURE__*/_react.default.createElement(_styles.ChangeCustomerText, null, cartStatus !== 2 && /*#__PURE__*/_react.default.createElement("span", {
|
|
195
|
+
onClick: function onClick() {
|
|
196
|
+
return toggleIsEdit();
|
|
197
|
+
}
|
|
198
|
+
}, t('CHANGE_USER_DETAILS', 'Change customer details')))) : /*#__PURE__*/_react.default.createElement(_styles.SideForm, null, /*#__PURE__*/_react.default.createElement(_UserFormDetails.UserFormDetailsUI, _extends({}, props, {
|
|
199
199
|
userData: userData,
|
|
200
200
|
isCustomerMode: isCustomerMode,
|
|
201
201
|
setWillVerifyOtpState: setWillVerifyOtpState
|
|
@@ -4,20 +4,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.UserName = exports.UserData = exports.TitleContainer = exports.SkeletonsContainer = exports.SideForm = exports.PhoneContainer = exports.ModalIcon = exports.Header = exports.CountryFlag = exports.Container = void 0;
|
|
7
|
+
exports.UserName = exports.UserData = exports.TitleContainer = exports.SkeletonsContainer = exports.SideForm = exports.PhoneContainer = exports.ModalIcon = exports.Header = exports.CountryFlag = exports.Container = exports.ChangeCustomerText = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
13
|
var Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
14
|
-
var Header = exports.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n\n h1 {\n font-weight: 500;\n font-size: 20px;\n color: ", "; \n margin: 0px 10px 0px 0px;\n ", "\n }\n\n svg {\n font-size: 24px;\n }\n\n svg.cancel {\n color: #D81212;\n cursor: pointer;\n }\n\n
|
|
14
|
+
var Header = exports.Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 5px;\n\n h1 {\n font-weight: 500;\n font-size: 20px;\n color: ", "; \n margin: 0px 10px 0px 0px;\n ", "\n }\n\n svg {\n font-size: 24px;\n }\n\n svg.cancel {\n color: #D81212;\n cursor: pointer;\n }\n\n"])), function (props) {
|
|
15
15
|
return props.theme.colors.darkTextColor;
|
|
16
16
|
}, function (props) {
|
|
17
17
|
var _props$theme;
|
|
18
18
|
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.rtl) && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 0px 0px 0px 10px;\n "])));
|
|
19
|
-
}, function (props) {
|
|
20
|
-
return props.theme.colors.primary;
|
|
21
19
|
});
|
|
22
20
|
var SideForm = exports.SideForm = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n margin-top: 25px;\n @media (min-width: 768px) {\n display: flex;\n align-items: center;\n }\n"])));
|
|
23
21
|
var UserData = exports.UserData = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n text-align: left;\n ", "\n position: relative;\n > * {\n margin: 5px 0;\n }\n\n p {\n font-size: 14px;\n color: ", ";\n }\n"])), function (props) {
|
|
@@ -34,5 +32,8 @@ var TitleContainer = exports.TitleContainer = _styledComponents.default.div(_tem
|
|
|
34
32
|
return isAddressFormOpen && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n h1{ \n width: 75%;\n }\n "])));
|
|
35
33
|
});
|
|
36
34
|
var CountryFlag = exports.CountryFlag = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: 5px;\n .PhoneInputCountryIcon {\n width: 25px;\n }\n .PhoneInputInput {\n display: none;\n }\n .PhoneInputCountrySelect {\n display: none;\n }\n"])));
|
|
37
|
-
var PhoneContainer = exports.PhoneContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 30px;\n"])));
|
|
38
|
-
var SkeletonsContainer = exports.SkeletonsContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: 25px;\n"])));
|
|
35
|
+
var PhoneContainer = exports.PhoneContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: 30px;\n p {\n margin: 1rem 0;\n }\n"])));
|
|
36
|
+
var SkeletonsContainer = exports.SkeletonsContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: 25px;\n"])));
|
|
37
|
+
var ChangeCustomerText = exports.ChangeCustomerText = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n\n span {\n font-size: 13px;\n color: ", ";\n cursor: pointer;\n user-select: none;\n &:hover {\n text-decoration: underline;\n }\n }\n"])), function (props) {
|
|
38
|
+
return props.theme.colors.primary;
|
|
39
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.8",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"lodash": "^4.17.19",
|
|
89
89
|
"moment": "^2.29.4",
|
|
90
90
|
"nanoid": "^4.0.0",
|
|
91
|
-
"ordering-components-external": "13.0.
|
|
91
|
+
"ordering-components-external": "13.0.20",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { BusinessesMap as BusinessesMapController, GoogleMapsMap, useConfig, useOrder } from 'ordering-components-external'
|
|
3
3
|
import { WrapperMap } from './styles'
|
|
4
|
+
import { useTheme } from 'styled-components'
|
|
4
5
|
|
|
5
6
|
const BusinessesMapUI = (props) => {
|
|
6
7
|
const {
|
|
7
8
|
userLocation,
|
|
8
9
|
businessLocations,
|
|
9
10
|
onBusinessClick,
|
|
10
|
-
setErrors
|
|
11
|
+
setErrors,
|
|
12
|
+
businessList
|
|
11
13
|
} = props
|
|
12
14
|
|
|
13
15
|
const [configState] = useConfig()
|
|
14
16
|
const [orderState] = useOrder()
|
|
15
|
-
|
|
17
|
+
const theme = useTheme()
|
|
16
18
|
const googleMapsControls = {
|
|
17
|
-
defaultZoom:
|
|
19
|
+
defaultZoom: 18,
|
|
18
20
|
zoomControl: true,
|
|
19
21
|
streetViewControl: false,
|
|
20
22
|
fullscreenControl: false,
|
|
@@ -23,7 +25,7 @@ const BusinessesMapUI = (props) => {
|
|
|
23
25
|
mapTypeControlOptions: {
|
|
24
26
|
mapTypeIds: ['roadmap', 'satellite']
|
|
25
27
|
},
|
|
26
|
-
isMarkerDraggable:
|
|
28
|
+
isMarkerDraggable: false
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
return (
|
|
@@ -36,13 +38,17 @@ const BusinessesMapUI = (props) => {
|
|
|
36
38
|
<BeforeComponent key={i} {...props} />))}
|
|
37
39
|
<WrapperMap disabled={orderState.loading}>
|
|
38
40
|
<GoogleMapsMap
|
|
41
|
+
useMapWithBusinessZones
|
|
42
|
+
deactiveAlerts
|
|
43
|
+
businessMap
|
|
39
44
|
apiKey={configState?.configs?.google_maps_api_key?.value}
|
|
40
45
|
location={userLocation}
|
|
41
46
|
locations={businessLocations}
|
|
42
47
|
mapControls={googleMapsControls}
|
|
43
48
|
maxLimitLocation={parseInt(configState?.configs?.meters_to_change_address?.value)}
|
|
44
|
-
businessMap
|
|
45
49
|
onBusinessClick={onBusinessClick}
|
|
50
|
+
businessZones={businessList?.map(business => business?.zones)}
|
|
51
|
+
fallbackIcon={theme.images?.dummies?.businessLogo}
|
|
46
52
|
setErrors={setErrors}
|
|
47
53
|
/>
|
|
48
54
|
</WrapperMap>
|
|
@@ -125,7 +125,7 @@ const SingleOrderCardUI = (props) => {
|
|
|
125
125
|
className='review'
|
|
126
126
|
onClick={() => setOrderSelected(order)}
|
|
127
127
|
>
|
|
128
|
-
{order?.review ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')}
|
|
128
|
+
{!!order?.review ? t('REVIEWED', 'Reviewed') : t('REVIEW', 'Review')}
|
|
129
129
|
</Button>
|
|
130
130
|
)}
|
|
131
131
|
{!hideReorderButton && typeof order?.id === 'number' && (
|
|
@@ -439,10 +439,11 @@ const AddressFormUI = (props) => {
|
|
|
439
439
|
</AddressWrap>
|
|
440
440
|
|
|
441
441
|
{locationChange && (addressState?.address?.location || formState?.changes?.location) && (
|
|
442
|
-
<WrapperMap isEnableContinueButton={isEnableContinueButton} notUseCustomerInfo={notUseCustomerInfo}>
|
|
442
|
+
<WrapperMap isEnableContinueButton={isEnableContinueButton} notUseCustomerInfo={notUseCustomerInfo} addFormRestrictions={addFormRestrictions}>
|
|
443
443
|
<GoogleMapsMap
|
|
444
444
|
useMapWithBusinessZones
|
|
445
445
|
deactiveAlerts
|
|
446
|
+
avoidFitBounds
|
|
446
447
|
apiKey={googleMapsApiKey}
|
|
447
448
|
location={locationChange}
|
|
448
449
|
locations={businessesList?.businesses}
|
|
@@ -522,6 +523,7 @@ const AddressFormUI = (props) => {
|
|
|
522
523
|
type='button'
|
|
523
524
|
disabled={formState.loading}
|
|
524
525
|
onClick={() => onCancel()}
|
|
526
|
+
hoverColor='#CCC'
|
|
525
527
|
>
|
|
526
528
|
{t('CANCEL', 'Cancel')}
|
|
527
529
|
</Button>
|
|
@@ -198,18 +198,20 @@ export const AddressTagSection = styled.div`
|
|
|
198
198
|
`
|
|
199
199
|
|
|
200
200
|
export const WrapperMap = styled.div`
|
|
201
|
+
z-index: 100;
|
|
201
202
|
width: 50%;
|
|
202
203
|
position: absolute;
|
|
203
204
|
bottom: 2%;
|
|
204
205
|
right: 0;
|
|
205
206
|
padding-right: 20px;
|
|
206
|
-
${({ isEnableContinueButton, notUseCustomerInfo }) =>
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
height: ${({ isEnableContinueButton, notUseCustomerInfo, addFormRestrictions }) =>
|
|
208
|
+
isEnableContinueButton
|
|
209
|
+
? addFormRestrictions ? '460px' : '425px'
|
|
210
|
+
: notUseCustomerInfo
|
|
211
|
+
? '370px'
|
|
212
|
+
: '480px'
|
|
213
|
+
};
|
|
214
|
+
|
|
213
215
|
> div {
|
|
214
216
|
position: relative !important;
|
|
215
217
|
width: 100% !important;
|
|
@@ -237,7 +239,7 @@ export const AddressMarkContainer = styled.div`
|
|
|
237
239
|
align-items: center;
|
|
238
240
|
border-radius: 4px;
|
|
239
241
|
position: absolute;
|
|
240
|
-
top:
|
|
242
|
+
top: 50px;
|
|
241
243
|
width: max-content;
|
|
242
244
|
p {
|
|
243
245
|
margin: 0;
|
|
@@ -202,11 +202,15 @@ const AddressListUI = (props) => {
|
|
|
202
202
|
}, [isOpenUserData])
|
|
203
203
|
|
|
204
204
|
useEffect(() => {
|
|
205
|
-
|
|
205
|
+
const addressValidation = addressList.addresses?.length === 0 && !addressList?.loading && !addressList?.error
|
|
206
|
+
if (userCustomerSetup?.imported_address_text && addressValidation) {
|
|
206
207
|
openAddress({
|
|
207
208
|
address: userCustomerSetup?.imported_address_text
|
|
208
209
|
})
|
|
209
210
|
}
|
|
211
|
+
if (!userCustomerSetup?.imported_address_text && addressValidation) {
|
|
212
|
+
openAddress({})
|
|
213
|
+
}
|
|
210
214
|
}, [userCustomerSetup?.imported_address_text, addressList.addresses, addressList?.loading, addressList?.error])
|
|
211
215
|
|
|
212
216
|
return (
|
|
@@ -228,13 +232,14 @@ const AddressListUI = (props) => {
|
|
|
228
232
|
addFormRestrictions={addFormRestrictions}
|
|
229
233
|
>
|
|
230
234
|
{
|
|
231
|
-
!addFormRestrictions &&
|
|
235
|
+
!addFormRestrictions && !addressOpen && !isOpenUserData && (
|
|
232
236
|
<Button
|
|
233
237
|
className='add'
|
|
234
238
|
outline
|
|
235
239
|
color={isEnableContinueButton && addressList?.addresses?.length > 0 ? 'secondary' : 'primary'}
|
|
236
240
|
onClick={() => openAddress({})}
|
|
237
241
|
disabled={orderState?.loading || actionStatus.loading}
|
|
242
|
+
hoverColor='#CCC'
|
|
238
243
|
>
|
|
239
244
|
{(orderState?.loading || actionStatus.loading) ? t('LOADING', 'Loading') : t('ADD_NEW_ADDRESS', 'Add New Address')}
|
|
240
245
|
</Button>
|
|
@@ -348,7 +353,7 @@ const AddressListUI = (props) => {
|
|
|
348
353
|
)}
|
|
349
354
|
</List>
|
|
350
355
|
{addressOpen && !notUseCustomerInfo && (
|
|
351
|
-
<AddressFormContainer width='50%' isEnableContinueButton={isEnableContinueButton}>
|
|
356
|
+
<AddressFormContainer width='50%' isEnableContinueButton={isEnableContinueButton} addFormRestrictions={addFormRestrictions}>
|
|
352
357
|
<TitleFormContainer>
|
|
353
358
|
{!addFormRestrictions && (
|
|
354
359
|
<CloseIcon>
|
|
@@ -374,6 +379,7 @@ const AddressListUI = (props) => {
|
|
|
374
379
|
type='button'
|
|
375
380
|
disabled={(addressList.loading || actionStatus.loading || orderState.loading)}
|
|
376
381
|
onClick={() => onCancel()}
|
|
382
|
+
hoverColor='#CCC'
|
|
377
383
|
>
|
|
378
384
|
{t('CANCEL', 'Cancel')}
|
|
379
385
|
</Button>
|
|
@@ -105,7 +105,7 @@ export const AddressItemActions = styled.div`
|
|
|
105
105
|
cursor: pointer;
|
|
106
106
|
margin: 0px 5px;
|
|
107
107
|
font-size: 20px;
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
svg {
|
|
110
110
|
color: #B1BCCC;
|
|
111
111
|
}
|
|
@@ -175,7 +175,7 @@ export const ContinueButton = styled.div`
|
|
|
175
175
|
width: 100%;
|
|
176
176
|
position: sticky;
|
|
177
177
|
bottom: 1px;
|
|
178
|
-
|
|
178
|
+
|
|
179
179
|
button {
|
|
180
180
|
width: 100%;
|
|
181
181
|
white-space: nowrap;
|
|
@@ -204,7 +204,7 @@ export const List = styled.div`
|
|
|
204
204
|
margin-top: 0px;
|
|
205
205
|
` : css`
|
|
206
206
|
margin-top: 200px;
|
|
207
|
-
`}
|
|
207
|
+
`}
|
|
208
208
|
${({ addFormRestrictions }) => addFormRestrictions && css`
|
|
209
209
|
height: 405px;
|
|
210
210
|
`}
|
|
@@ -219,9 +219,9 @@ export const AddressFormContainer = styled.div`
|
|
|
219
219
|
${({ width }) => css`
|
|
220
220
|
width: ${width};
|
|
221
221
|
`}
|
|
222
|
-
${({ isEnableContinueButton }) => isEnableContinueButton && css`
|
|
222
|
+
${({ isEnableContinueButton, addFormRestrictions }) => isEnableContinueButton && css`
|
|
223
223
|
position: relative;
|
|
224
|
-
bottom: 189px;
|
|
224
|
+
bottom: ${addFormRestrictions ? '189px' : '164px'};
|
|
225
225
|
`}
|
|
226
226
|
`
|
|
227
227
|
|
|
@@ -234,7 +234,7 @@ export const CloseIcon = styled.div`
|
|
|
234
234
|
`
|
|
235
235
|
|
|
236
236
|
export const TitleFormContainer = styled.div`
|
|
237
|
-
display: flex;
|
|
237
|
+
display: flex;
|
|
238
238
|
align-items: center;
|
|
239
239
|
margin-top: 7px;
|
|
240
240
|
h1 {
|
|
@@ -99,7 +99,8 @@ const PhoneAutocompleteUI = (props) => {
|
|
|
99
99
|
const handleFindClick = () => {
|
|
100
100
|
if (optSelected && !(userCustomer?.id && orderState?.options?.address?.address)) {
|
|
101
101
|
onChange(optSelected)
|
|
102
|
-
}
|
|
102
|
+
}
|
|
103
|
+
else if (userCustomer?.id && orderState?.options?.address?.address) {
|
|
103
104
|
onRedirectPage && onRedirectPage('search')
|
|
104
105
|
} else {
|
|
105
106
|
setAlertState({ open: true, content: t('SELECT_ADDRESS_CUSTOMER', 'Please select an address for the selected customer') })
|
|
@@ -247,7 +247,7 @@ const SignUpFormUI = (props) => {
|
|
|
247
247
|
<BeforeComponent key={i} {...props} />))}
|
|
248
248
|
<SignUpContainer isPopup={isPopup}>
|
|
249
249
|
<FormSide isPopup={isPopup}>
|
|
250
|
-
<Title>{t('
|
|
250
|
+
<Title>{t('CREATE_USER', 'Create new user')}</Title>
|
|
251
251
|
<FormInput
|
|
252
252
|
noValidate
|
|
253
253
|
isPopup={isPopup}
|
|
@@ -395,7 +395,7 @@ const SignUpFormUI = (props) => {
|
|
|
395
395
|
type='submit'
|
|
396
396
|
disabled={formState.loading || validationFields?.loading}
|
|
397
397
|
>
|
|
398
|
-
{formState.loading ? `${t('LOADING', 'Loading')}...` : t('
|
|
398
|
+
{formState.loading ? `${t('LOADING', 'Loading')}...` : t('CREATE_USER', 'Create new user')}
|
|
399
399
|
</Button>
|
|
400
400
|
</ButtonContainer>
|
|
401
401
|
</FormInput>
|
|
@@ -407,7 +407,7 @@ const SignUpFormUI = (props) => {
|
|
|
407
407
|
)}
|
|
408
408
|
</FormSide>
|
|
409
409
|
<Alert
|
|
410
|
-
title={t('
|
|
410
|
+
title={t('CREATE_USER', 'Create new user')}
|
|
411
411
|
content={alertState.content}
|
|
412
412
|
acceptText={t('ACCEPT', 'Accept')}
|
|
413
413
|
open={alertState.open}
|
|
@@ -72,18 +72,18 @@ const UserDetailsUI = (props) => {
|
|
|
72
72
|
<BeforeComponent key={i} {...props} />))}
|
|
73
73
|
{(validationFields.loading || formState.loading || userState.loading) && (
|
|
74
74
|
<UserData>
|
|
75
|
-
{validationFieldsLength?.map(field => (
|
|
75
|
+
{[...Array(isCustomerMode ? 1 : validationFieldsLength?.length)]?.map(field => (
|
|
76
76
|
<React.Fragment key={field?.id}>
|
|
77
|
-
<Skeleton width={250} height={50} />
|
|
78
|
-
<Skeleton width={180} height={25} />
|
|
79
|
-
<Skeleton width={210} height={50} />
|
|
77
|
+
<Skeleton width={250} height={isCustomerMode ? 10 : 50} />
|
|
78
|
+
<Skeleton width={180} height={isCustomerMode ? 10 : 25} />
|
|
79
|
+
<Skeleton width={210} height={isCustomerMode ? 10 : 50} />
|
|
80
80
|
</React.Fragment>
|
|
81
81
|
))}
|
|
82
82
|
</UserData>
|
|
83
83
|
)}
|
|
84
84
|
|
|
85
85
|
{!(validationFields.loading || formState.loading || userState.loading) && (
|
|
86
|
-
<Container>
|
|
86
|
+
<Container isEdit={isEdit}>
|
|
87
87
|
{isModal && (
|
|
88
88
|
<TitleContainer isAddressFormOpen={isAddressFormOpen && !isEdit}>
|
|
89
89
|
<ModalIcon>
|
|
@@ -109,7 +109,7 @@ export const Button = styled.button`
|
|
|
109
109
|
`}
|
|
110
110
|
}
|
|
111
111
|
`}
|
|
112
|
-
${({ outline }) => outline && css`
|
|
112
|
+
${({ outline, hoverColor }) => outline && css`
|
|
113
113
|
background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
|
|
114
114
|
color: #CCC;
|
|
115
115
|
border-color: #CCC;
|
|
@@ -119,7 +119,7 @@ export const Button = styled.button`
|
|
|
119
119
|
}
|
|
120
120
|
&:hover {
|
|
121
121
|
background: '#CCC';
|
|
122
|
-
color: #FFF;
|
|
122
|
+
color: ${hoverColor ?? '#FFF'};
|
|
123
123
|
}
|
|
124
124
|
`}
|
|
125
125
|
${({ circle }) => circle && css`
|
|
@@ -154,7 +154,7 @@ export const Button = styled.button`
|
|
|
154
154
|
`}
|
|
155
155
|
${({ color }) => color === 'primary' && css`
|
|
156
156
|
background: ${props => props.theme.colors.primary};
|
|
157
|
-
color:
|
|
157
|
+
color: #FFF;
|
|
158
158
|
border-color: ${props => props.theme.colors.primary};
|
|
159
159
|
&:hover {
|
|
160
160
|
background: ${props => props.theme.colors.primary};
|
|
@@ -38,9 +38,7 @@ export const Text = styled.div`
|
|
|
38
38
|
white-space: nowrap;
|
|
39
39
|
|
|
40
40
|
h1{
|
|
41
|
-
|
|
42
|
-
text-overflow: ellipsis;
|
|
43
|
-
white-space: nowrap;
|
|
41
|
+
white-space: normal;
|
|
44
42
|
width: 100%;
|
|
45
43
|
font-weight: 600;
|
|
46
44
|
font-size: 16px;
|
|
@@ -67,6 +65,6 @@ export const Text = styled.div`
|
|
|
67
65
|
|
|
68
66
|
export const ToggleMap = styled.div`
|
|
69
67
|
span {
|
|
70
|
-
margin: 0
|
|
68
|
+
margin: 0;
|
|
71
69
|
}
|
|
72
70
|
`
|
|
@@ -59,6 +59,7 @@ export const BusinessInfoComponent = (props) => {
|
|
|
59
59
|
{!loading ? (
|
|
60
60
|
<TitleWrapper isCustomLayout={isCustomLayout} disableLeftSpace={singleBusinessRedirect}>
|
|
61
61
|
<h2 className='bold' id='business_name'>{business?.name}</h2>
|
|
62
|
+
<span id='business_name_feedback' />
|
|
62
63
|
{business?.ribbon?.enabled && (
|
|
63
64
|
<RibbonBox
|
|
64
65
|
bgColor={business?.ribbon?.color}
|
|
@@ -204,11 +205,11 @@ export const BusinessInfoComponent = (props) => {
|
|
|
204
205
|
<div className='preorder-Reviews'>
|
|
205
206
|
{isPreOrderSetting && (
|
|
206
207
|
<>
|
|
207
|
-
<span onClick={() => setIsPreOrder(true)}>{t('PREORDER', 'Preorder')}</span>
|
|
208
|
+
<span onClick={() => setIsPreOrder(true)}>{isCustomerMode ? t('CHANGE_SCHEDULE', 'Change schedule') : t('PREORDER', 'Preorder')}</span>
|
|
208
209
|
<span className='dot'>•</span>
|
|
209
210
|
</>
|
|
210
211
|
)}
|
|
211
|
-
{business.reviews?.reviews && !hideReviewsPopup && <span onClick={() => setIsBusinessReviews(true)}>{t('REVIEWS', 'Reviews')}</span>}
|
|
212
|
+
{business.reviews?.reviews && !hideReviewsPopup && !isCustomerMode && <span onClick={() => setIsBusinessReviews(true)}>{t('REVIEWS', 'Reviews')}</span>}
|
|
212
213
|
</div>
|
|
213
214
|
) : (
|
|
214
215
|
<Skeleton width={isCustomerMode ? 100 : 150} />
|
|
@@ -132,7 +132,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
132
132
|
const handleScroll = () => {
|
|
133
133
|
const searchElement = document.getElementById('search-component')
|
|
134
134
|
if (searchElement) {
|
|
135
|
-
const limit = window.
|
|
135
|
+
const limit = window.scrollY >= (isChew ? searchElement?.offsetTop + 40 : searchElement?.offsetTop) && window.scrollY > 0
|
|
136
136
|
if (limit) {
|
|
137
137
|
const classAdded = searchElement.classList.contains('fixed-search')
|
|
138
138
|
!classAdded && searchElement.classList.add('fixed-search')
|
|
@@ -140,15 +140,26 @@ export const BusinessBasicInformation = (props) => {
|
|
|
140
140
|
searchElement && searchElement.classList.remove('fixed-search')
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
+
const backArrowElement = document.getElementById('back-arrow')
|
|
143
144
|
|
|
144
145
|
const businessNameElement = document.getElementById('business_name')
|
|
146
|
+
const businessNameFeedbackElement = document.getElementById('business_name_feedback')
|
|
145
147
|
if (businessNameElement) {
|
|
146
|
-
const limit = window.
|
|
148
|
+
const limit = window.scrollY >= (isChew && searchElement ? searchElement?.offsetTop + 40 : (businessNameElement?.offsetTop - 55)) && window.scrollY > 0
|
|
147
149
|
if (limit) {
|
|
148
150
|
const classAdded = businessNameElement.classList.contains('fixed-name')
|
|
149
151
|
!classAdded && businessNameElement.classList.add('fixed-name')
|
|
152
|
+
if (!isChew) {
|
|
153
|
+
const classAdded2 = backArrowElement?.classList?.contains?.('fixed-arrow')
|
|
154
|
+
!classAdded2 && backArrowElement.classList.add('fixed-arrow')
|
|
155
|
+
}
|
|
156
|
+
if (businessNameFeedbackElement) businessNameFeedbackElement.style.display = 'block'
|
|
150
157
|
} else {
|
|
151
158
|
businessNameElement && businessNameElement.classList.remove('fixed-name')
|
|
159
|
+
if (!isChew) {
|
|
160
|
+
backArrowElement && backArrowElement.classList.remove('fixed-arrow')
|
|
161
|
+
}
|
|
162
|
+
if (businessNameFeedbackElement) businessNameFeedbackElement.style.display = 'none'
|
|
152
163
|
}
|
|
153
164
|
}
|
|
154
165
|
}
|
|
@@ -236,10 +247,10 @@ export const BusinessBasicInformation = (props) => {
|
|
|
236
247
|
/>
|
|
237
248
|
</WrapperFloatingSearch>
|
|
238
249
|
)}
|
|
239
|
-
{!hideInfoIcon
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
250
|
+
{!hideInfoIcon && (
|
|
251
|
+
<BusinessMoreDetail>
|
|
252
|
+
<BsInfoCircle onClick={() => setOpenBusinessInformation(true)} />
|
|
253
|
+
</BusinessMoreDetail>
|
|
243
254
|
)}
|
|
244
255
|
</>
|
|
245
256
|
)}
|
|
@@ -368,7 +368,11 @@ export const TitleWrapper = styled.div`
|
|
|
368
368
|
display: flex;
|
|
369
369
|
align-items: center;
|
|
370
370
|
flex-wrap: wrap;
|
|
371
|
-
|
|
371
|
+
span {
|
|
372
|
+
height: 70px;
|
|
373
|
+
width: 1px;
|
|
374
|
+
display: none;
|
|
375
|
+
}
|
|
372
376
|
h2 {
|
|
373
377
|
font-size: 24px;
|
|
374
378
|
line-height: 36px;
|
|
@@ -409,6 +413,7 @@ export const TitleWrapper = styled.div`
|
|
|
409
413
|
}
|
|
410
414
|
@media (min-width: 768px) {
|
|
411
415
|
font-size: 32px;
|
|
416
|
+
|
|
412
417
|
}
|
|
413
418
|
}
|
|
414
419
|
`
|
|
@@ -230,8 +230,8 @@ const BusinessProductsListingUI = (props) => {
|
|
|
230
230
|
const backArrowElement = document.getElementById('back-arrow')
|
|
231
231
|
const searchElement = document.getElementById('search-component')
|
|
232
232
|
if (backArrowElement) {
|
|
233
|
-
const limit = window.
|
|
234
|
-
const limitWidth = window.
|
|
233
|
+
const limit = window.scrollY >= backArrowElement?.offsetTop - 10 && window.scrollY > 0
|
|
234
|
+
const limitWidth = window.scrollY >= searchElement?.offsetTop + 45 && window.scrollY > 0
|
|
235
235
|
if (isChew) {
|
|
236
236
|
if (limit && !limitWidth) {
|
|
237
237
|
const classWidthAdded = backArrowElement.classList.contains('fixed-arrow-width')
|
|
@@ -240,13 +240,6 @@ const BusinessProductsListingUI = (props) => {
|
|
|
240
240
|
backArrowElement && backArrowElement.classList.remove('fixed-arrow-width')
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
|
|
244
|
-
if (limit) {
|
|
245
|
-
const classAdded = backArrowElement.classList.contains('fixed-arrow')
|
|
246
|
-
!classAdded && backArrowElement.classList.add('fixed-arrow')
|
|
247
|
-
} else {
|
|
248
|
-
backArrowElement && backArrowElement.classList.remove('fixed-arrow')
|
|
249
|
-
}
|
|
250
243
|
}
|
|
251
244
|
|
|
252
245
|
const innerHeightScrolltop = window.innerHeight + document.documentElement?.scrollTop + PIXELS_TO_SCROLL
|
|
@@ -32,7 +32,7 @@ export const OrdersSection = (props) => {
|
|
|
32
32
|
horizontal
|
|
33
33
|
isBusinessesPage
|
|
34
34
|
onRedirectPage={onRedirectPage}
|
|
35
|
-
titleContent={t('
|
|
35
|
+
titleContent={t('OPEN_CARTS', 'Open carts')}
|
|
36
36
|
businessesIds={businessesIds}
|
|
37
37
|
customArray={
|
|
38
38
|
getCustomArray(orderState.carts)?.filter(cart => cart.products.length > 0)
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -418,7 +418,7 @@ const BusinessesListingUI = (props) => {
|
|
|
418
418
|
</HightestRatedWrapper>
|
|
419
419
|
)}
|
|
420
420
|
|
|
421
|
-
{(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
|
|
421
|
+
{(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden && !isCustomerMode) && (
|
|
422
422
|
<BusinessTypeFilter
|
|
423
423
|
images={props.images}
|
|
424
424
|
businessTypes={props.businessTypes}
|
|
@@ -430,7 +430,7 @@ const BusinessesListingUI = (props) => {
|
|
|
430
430
|
<SearchContainer>
|
|
431
431
|
{isCustomLayout && (
|
|
432
432
|
<BusinessesTitle isCustomerMode={isCustomerMode}>
|
|
433
|
-
{t('BUSINESSES', '
|
|
433
|
+
{isCustomerMode ? t('SELECT_THE_BUSINESS', 'Select the business') : t('BUSINESSES', 'businesses')}
|
|
434
434
|
</BusinessesTitle>
|
|
435
435
|
)}
|
|
436
436
|
<WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
|
|
@@ -692,7 +692,7 @@ const CheckoutUI = (props) => {
|
|
|
692
692
|
`${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
|
|
693
693
|
) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
|
|
694
694
|
`${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
|
|
695
|
-
) : placing ? t('
|
|
695
|
+
) : placing ? t('PLACING_ORDER', 'Placing order') : t('PLACE_ORDER', 'Place Order')}
|
|
696
696
|
</Button>
|
|
697
697
|
</WrapperPlaceOrderButton>
|
|
698
698
|
)}
|