ordering-ui-external 1.8.10 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{0.ordering-ui.b6cdd549ac5beb984576.js → 0.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{1.ordering-ui.b6cdd549ac5beb984576.js → 1.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{2.ordering-ui.b6cdd549ac5beb984576.js → 2.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{4.ordering-ui.b6cdd549ac5beb984576.js → 4.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{5.ordering-ui.b6cdd549ac5beb984576.js → 5.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{6.ordering-ui.b6cdd549ac5beb984576.js → 6.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{7.ordering-ui.b6cdd549ac5beb984576.js → 7.ordering-ui.a97bdaf67c563ada4c74.js} +1 -1
- package/_bundles/{7.ordering-ui.b6cdd549ac5beb984576.js.LICENSE.txt → 7.ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.b6cdd549ac5beb984576.js → 8.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{9.ordering-ui.b6cdd549ac5beb984576.js → 9.ordering-ui.a97bdaf67c563ada4c74.js} +0 -0
- package/_bundles/{ordering-ui.b6cdd549ac5beb984576.js → ordering-ui.a97bdaf67c563ada4c74.js} +2 -2
- package/_bundles/{ordering-ui.b6cdd549ac5beb984576.js.LICENSE.txt → ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt} +0 -0
- package/_modules/components/PaymentOptions/index.js +2 -2
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +2 -7
- package/_modules/themes/five/src/components/BusinessInformation/index.js +7 -6
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -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 +5 -3
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +2 -0
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +2 -2
- package/_modules/themes/five/src/components/Checkout/index.js +9 -5
- package/_modules/themes/five/src/components/Header/index.js +20 -1
- package/_modules/themes/five/src/components/Header/styles.js +7 -5
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +20 -5
- package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +12 -12
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +4 -2
- package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +4 -0
- package/_modules/themes/five/src/components/PlaceSpot/index.js +3 -1
- package/_modules/themes/five/src/components/ProductForm/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductOption/index.js +1 -1
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +1 -1
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +1 -1
- package/_modules/themes/five/src/components/ReviewProduct/index.js +2 -0
- package/_modules/themes/five/src/components/ScheduleAccordion/index.js +49 -0
- package/_modules/themes/five/src/components/ScheduleAccordion/styles.js +23 -0
- package/_modules/themes/five/src/components/SearchBar/index.js +4 -2
- package/_modules/themes/five/src/components/SearchBar/styles.js +12 -8
- package/_modules/themes/five/src/components/ServiceForm/index.js +17 -8
- package/_modules/themes/five/src/components/UserPopover/index.js +14 -4
- package/_modules/themes/pwa/src/components/MomentControl/index.js +0 -3
- package/_modules/themes/six/src/components/BusinessController/styles.js +1 -1
- package/_modules/themes/six/src/components/SearchBar/index.js +4 -2
- package/_modules/themes/six/src/components/SearchBar/styles.js +6 -4
- package/package.json +2 -2
- package/src/components/PaymentOptions/index.js +22 -22
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +0 -10
- package/src/themes/five/src/components/BusinessInformation/index.js +7 -23
- package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -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 +5 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +2 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +2 -6
- package/src/themes/five/src/components/Checkout/index.js +9 -5
- package/src/themes/five/src/components/Header/index.js +19 -3
- package/src/themes/five/src/components/Header/styles.js +20 -4
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +13 -3
- package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +6 -6
- package/src/themes/five/src/components/OrderDetails/index.js +5 -2
- package/src/themes/five/src/components/OrdersOption/index.js +10 -9
- package/src/themes/five/src/components/PhoneAutocomplete/index.js +2 -0
- package/src/themes/five/src/components/PlaceSpot/index.js +3 -1
- package/src/themes/five/src/components/ProductForm/styles.js +1 -0
- package/src/themes/five/src/components/ProductOption/index.js +1 -1
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +1 -1
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +0 -1
- package/src/themes/five/src/components/ReviewProduct/index.js +2 -0
- package/src/themes/five/src/components/ScheduleAccordion/index.js +60 -0
- package/src/themes/five/src/components/ScheduleAccordion/styles.js +28 -0
- package/src/themes/five/src/components/SearchBar/index.js +3 -1
- package/src/themes/five/src/components/SearchBar/styles.js +9 -1
- package/src/themes/five/src/components/ServiceForm/index.js +10 -4
- package/src/themes/five/src/components/UserPopover/index.js +12 -3
- package/src/themes/pwa/src/components/MomentContent/index.js +0 -1
- package/src/themes/pwa/src/components/MomentControl/index.js +0 -3
- package/src/themes/six/src/components/BusinessController/styles.js +4 -0
- package/src/themes/six/src/components/SearchBar/index.js +10 -2
- package/src/themes/six/src/components/SearchBar/styles.js +12 -1
|
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.SearchWrapper = exports.SearchIcon = exports.DeleteContent = exports.BusinessSearch = void 0;
|
|
7
|
+
exports.SearchWrapper = exports.SearchIcon = exports.FunnelWrapper = exports.DeleteContent = exports.BusinessSearch = 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, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
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) } })); }
|
|
@@ -48,7 +48,7 @@ var DeleteContent = _styledComponents.default.span(_templateObject11 || (_templa
|
|
|
48
48
|
}, function (_ref6) {
|
|
49
49
|
var isClear = _ref6.isClear,
|
|
50
50
|
isHome = _ref6.isHome;
|
|
51
|
-
return isClear && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n left: initial;\n right:
|
|
51
|
+
return isClear && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n left: initial;\n right: 40px;\n "])));
|
|
52
52
|
}, function (props) {
|
|
53
53
|
var _props$theme3;
|
|
54
54
|
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n transform: translate(30%, 0%);\n "])));
|
|
@@ -59,7 +59,9 @@ var DeleteContent = _styledComponents.default.span(_templateObject11 || (_templa
|
|
|
59
59
|
exports.DeleteContent = DeleteContent;
|
|
60
60
|
var SearchWrapper = (0, _styledComponents.default)(DeleteContent)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral([""])));
|
|
61
61
|
exports.SearchWrapper = SearchWrapper;
|
|
62
|
-
var
|
|
62
|
+
var FunnelWrapper = _styledComponents.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n svg {\n position: absolute;\n right: 10px !important;\n color: #ADB5BD;\n width: 20px;\n height: 20px;\n bottom: 22px;\n }\n"])));
|
|
63
|
+
exports.FunnelWrapper = FunnelWrapper;
|
|
64
|
+
var SearchIcon = _styledComponents.default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n background-image: url(", ");\n background-position: right 10px center;\n background-repeat: no-repeat;\n background-size: 15px;\n background-color: ", ";\n\n"])), function (props) {
|
|
63
65
|
var _props$theme5, _props$theme5$images, _props$theme5$images$;
|
|
64
66
|
return (_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : (_props$theme5$images = _props$theme5.images) === null || _props$theme5$images === void 0 ? void 0 : (_props$theme5$images$ = _props$theme5$images.general) === null || _props$theme5$images$ === void 0 ? void 0 : _props$theme5$images$.searchIcon;
|
|
65
67
|
}, function (props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"libphonenumber-js": "^1.9.4",
|
|
86
86
|
"lodash": "^4.17.19",
|
|
87
87
|
"moment": "^2.29.4",
|
|
88
|
-
"ordering-components-external": "1.
|
|
88
|
+
"ordering-components-external": "1.9.1",
|
|
89
89
|
"polished": "^3.6.6",
|
|
90
90
|
"react-bootstrap-icons": "^1.7.2",
|
|
91
91
|
"react-calendar": "^3.3.1",
|
|
@@ -8,7 +8,7 @@ import FaCcStripe from '@meronex/icons/fa/FaCcStripe'
|
|
|
8
8
|
import FaStripeS from '@meronex/icons/fa/FaStripeS'
|
|
9
9
|
import GrStripe from '@meronex/icons/gr/GrStripe'
|
|
10
10
|
import EnPaypal from '@meronex/icons/en/EnPaypal'
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
12
|
PaymentOptions as PaymentOptionsController,
|
|
13
13
|
useLanguage,
|
|
14
14
|
useOrder,
|
|
@@ -91,7 +91,7 @@ const PaymentOptionsUI = (props) => {
|
|
|
91
91
|
const [{ token }] = useSession()
|
|
92
92
|
const [{ loading: loadingOptions }] = useOrder()
|
|
93
93
|
|
|
94
|
-
const list =
|
|
94
|
+
const list = paymethodsList ? paymethodsList?.paymethods : paymethods?.map(pay => pay.paymethod)
|
|
95
95
|
|
|
96
96
|
const paymethodSelected = props.paySelected || props.paymethodSelected
|
|
97
97
|
|
|
@@ -140,26 +140,26 @@ const PaymentOptionsUI = (props) => {
|
|
|
140
140
|
<PaymentMethodsContainer>
|
|
141
141
|
<PaymentMethodsList className='payments-list'>
|
|
142
142
|
{!(paymethodsList.loading || isLoading || loadingOptions) &&
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
143
|
+
list?.length > 0 && (
|
|
144
|
+
list?.sort((a, b) => a.id - b.id).map(paymethod => (
|
|
145
|
+
<React.Fragment key={paymethod.id}>
|
|
146
|
+
{
|
|
147
|
+
(!isCustomerMode || (isCustomerMode && (paymethod.gateway === 'card_delivery' || paymethod.gateway === 'cash'))) && (
|
|
148
|
+
<PayCard
|
|
149
|
+
isDisabled={isDisabled}
|
|
150
|
+
className={`card ${paymethodSelected?.id === paymethod.id ? 'active' : ''}`}
|
|
151
|
+
onClick={() => handlePaymentMethodClick(paymethod)}
|
|
152
|
+
>
|
|
153
|
+
{getPayIcon(paymethod.id)}
|
|
154
|
+
<p>
|
|
155
|
+
{t(paymethod.gateway.toUpperCase(), paymethod.name)}
|
|
156
|
+
</p>
|
|
157
|
+
</PayCard>
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
</React.Fragment>
|
|
161
|
+
))
|
|
162
|
+
)}
|
|
163
163
|
{(paymethodsList.loading || isLoading || loadingOptions) && (
|
|
164
164
|
[...Array(5).keys()].map(i => (
|
|
165
165
|
<PayCard key={i} isSkeleton>
|
package/src/themes/five/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { BusinessItemAccordion } from './src/components/BusinessItemAccordion'
|
|
|
12
12
|
import { BusinessPreorder } from './src/components/BusinessPreorder'
|
|
13
13
|
import { BusinessMenuList } from './src/components/BusinessMenuList'
|
|
14
14
|
import { BusinessProductsCategories } from './src/components/BusinessProductsCategories'
|
|
15
|
+
import { ScheduleAccordion } from './src/components/ScheduleAccordion'
|
|
15
16
|
import { BusinessProductsCategories as CategoriesLayoutGroceries } from './src/components/BusinessProductsCategories/layouts/groceries'
|
|
16
17
|
import { BusinessProductsList } from './src/components/BusinessProductsList'
|
|
17
18
|
import { BusinessProductsList as ProductListLayoutGroceries } from './src/components/BusinessProductsList/layouts/groceries'
|
|
@@ -201,6 +202,7 @@ export {
|
|
|
201
202
|
ReviewProfessional,
|
|
202
203
|
RenderProductsLayout,
|
|
203
204
|
ResetPassword,
|
|
205
|
+
ScheduleAccordion,
|
|
204
206
|
SearchBar,
|
|
205
207
|
SessionsList,
|
|
206
208
|
SidebarMenu,
|
|
@@ -89,7 +89,6 @@ export const BusinessBasicInformation = (props) => {
|
|
|
89
89
|
const searchLayout = theme?.business_view?.components?.product_search?.components?.layout?.type
|
|
90
90
|
const hideCity = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.city?.hidden
|
|
91
91
|
const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
92
|
-
const showBusinessInfo = !orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.business_info?.hidden && !isChew
|
|
93
92
|
const layoutsWithOldSearch = ['starbucks', 'old', 'floating']
|
|
94
93
|
const hideSearch = layoutsWithOldSearch.includes(theme?.business_view?.components?.product_search?.components?.layout?.type)
|
|
95
94
|
const getBusinessType = () => {
|
|
@@ -206,15 +205,6 @@ export const BusinessBasicInformation = (props) => {
|
|
|
206
205
|
) : (
|
|
207
206
|
<Skeleton width={isCustomerMode ? 100 : 150} height={isCustomerMode ? 35 : 'auto'} />
|
|
208
207
|
)}
|
|
209
|
-
{showBusinessInfo && (
|
|
210
|
-
<>
|
|
211
|
-
{!loading ? (
|
|
212
|
-
<p className='type'>{getBusinessType()}</p>
|
|
213
|
-
) : (
|
|
214
|
-
<Skeleton width={isCustomerMode ? 100 : 150} />
|
|
215
|
-
)}
|
|
216
|
-
</>
|
|
217
|
-
)}
|
|
218
208
|
{typeof hideCity !== 'undefined' && !hideCity && business?.city?.name && (
|
|
219
209
|
<>
|
|
220
210
|
{!loading ? (
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
BusinessContent,
|
|
14
14
|
SectionTitle,
|
|
15
15
|
Map,
|
|
16
|
-
ScheduleBlock,
|
|
17
16
|
ScheduleSection,
|
|
18
17
|
ScheduleContainer,
|
|
19
18
|
DeliveryInfo,
|
|
@@ -26,6 +25,7 @@ import {
|
|
|
26
25
|
Divider
|
|
27
26
|
} from './styles'
|
|
28
27
|
import MdClose from '@meronex/icons/md/MdClose'
|
|
28
|
+
import { ScheduleAccordion } from '../ScheduleAccordion'
|
|
29
29
|
|
|
30
30
|
export const BusinessInformationUI = (props) => {
|
|
31
31
|
const {
|
|
@@ -39,16 +39,6 @@ export const BusinessInformationUI = (props) => {
|
|
|
39
39
|
|
|
40
40
|
const [, t] = useLanguage()
|
|
41
41
|
const [{ configs }] = useConfig()
|
|
42
|
-
|
|
43
|
-
const daysOfWeek = [
|
|
44
|
-
t('SUNDAY_ABBREVIATION', 'Sun'),
|
|
45
|
-
t('MONDAY_ABBREVIATION', 'Mon'),
|
|
46
|
-
t('TUESDAY_ABBREVIATION', 'Tues'),
|
|
47
|
-
t('WEDNESDAY_ABBREVIATION', 'Wed'),
|
|
48
|
-
t('THURSDAY_ABBREVIATION', 'Thur'),
|
|
49
|
-
t('FRIDAY_ABBREVIATION', 'Fri'),
|
|
50
|
-
t('SATURDAY_ABBREVIATION', 'Sat')
|
|
51
|
-
]
|
|
52
42
|
const [modalImage, setModalImage] = useState(false)
|
|
53
43
|
const [image, setImage] = useState('')
|
|
54
44
|
const [orderingTheme] = useOrderingTheme()
|
|
@@ -124,18 +114,12 @@ export const BusinessInformationUI = (props) => {
|
|
|
124
114
|
<ScheduleSection>
|
|
125
115
|
<ScheduleContainer>
|
|
126
116
|
{businessSchedule.map((schedule, i) => (
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<p>{scheduleFormatted(schedule.lapses[0].close)}</p>
|
|
134
|
-
</div>
|
|
135
|
-
) : (
|
|
136
|
-
<p className='close'>{t('CLOSED', 'Closed')}</p>
|
|
137
|
-
)}
|
|
138
|
-
</ScheduleBlock>
|
|
117
|
+
<ScheduleAccordion
|
|
118
|
+
key={i}
|
|
119
|
+
weekIndex={i}
|
|
120
|
+
scheduleFormatted={scheduleFormatted}
|
|
121
|
+
schedule={schedule}
|
|
122
|
+
/>
|
|
139
123
|
))}
|
|
140
124
|
</ScheduleContainer>
|
|
141
125
|
</ScheduleSection>
|
|
@@ -78,7 +78,8 @@ const BusinessProductsListingUI = (props) => {
|
|
|
78
78
|
onChangeMetaTag,
|
|
79
79
|
onBusinessClick,
|
|
80
80
|
handleChangePriceFilterValues,
|
|
81
|
-
priceFilterValues
|
|
81
|
+
priceFilterValues,
|
|
82
|
+
handleUpdateProfessionals
|
|
82
83
|
} = props
|
|
83
84
|
|
|
84
85
|
const { business, loading, error } = businessState
|
|
@@ -458,6 +459,7 @@ const BusinessProductsListingUI = (props) => {
|
|
|
458
459
|
professionalList={business?.professionals}
|
|
459
460
|
professionalSelected={professionalSelected}
|
|
460
461
|
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
462
|
+
handleUpdateProfessionals={handleUpdateProfessionals}
|
|
461
463
|
productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === (productModal.product || curProduct)?.id ? Cproduct?.quantity : 0) }, 0) || 0}
|
|
462
464
|
/>
|
|
463
465
|
) : (
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -98,7 +98,7 @@ const BusinessesListingUI = (props) => {
|
|
|
98
98
|
const [favoriteIds, setFavoriteIds] = useState([])
|
|
99
99
|
const hideCities = (theme?.business_listing_view?.components?.cities?.hidden || orderState?.options?.type !== 2) ?? true
|
|
100
100
|
const hideSearch = theme?.business_listing_view?.components?.search?.hidden
|
|
101
|
-
const hideFilter = theme?.business_listing_view?.components?.filter?.hidden
|
|
101
|
+
const hideFilter = theme?.business_listing_view?.components?.filter?.hidden || hideSearch
|
|
102
102
|
const hideSearchSection = hideCities && hideSearch && hideFilter
|
|
103
103
|
const isAllCategoriesHidden = theme?.business_listing_view?.components?.categories?.hidden
|
|
104
104
|
const businessesIds = isCustomLayout &&
|
|
@@ -337,7 +337,7 @@ const BusinessesListingUI = (props) => {
|
|
|
337
337
|
{!isCustomerMode && !hideSearchSection && (
|
|
338
338
|
<>
|
|
339
339
|
<WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
|
|
340
|
-
{!hideSearch && (
|
|
340
|
+
{!hideSearch && windowSize.width <= 1200 && (
|
|
341
341
|
<SearchBar
|
|
342
342
|
lazyLoad
|
|
343
343
|
search={searchValue}
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js
CHANGED
|
@@ -232,7 +232,6 @@ export const BusinessLogosWrapper = styled.div`
|
|
|
232
232
|
width: 100%;
|
|
233
233
|
`
|
|
234
234
|
|
|
235
|
-
|
|
236
235
|
const BusinessLogoStyled = styled.div`
|
|
237
236
|
min-width: 100px;
|
|
238
237
|
min-height: 100px;
|
|
@@ -267,3 +266,8 @@ export const BusinessLogosContainer = styled.div`
|
|
|
267
266
|
display: flex;
|
|
268
267
|
padding-bottom: 10px;
|
|
269
268
|
`
|
|
269
|
+
|
|
270
|
+
export const HeaderSearchMode = styled.div`
|
|
271
|
+
position: absolute;
|
|
272
|
+
width: 200px;
|
|
273
|
+
`
|
package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js
CHANGED
|
@@ -165,6 +165,7 @@ const BusinessesListingUI = (props) => {
|
|
|
165
165
|
<WrapperSearch isCustomLayout={isCustomLayout}>
|
|
166
166
|
<SearchBar
|
|
167
167
|
lazyLoad
|
|
168
|
+
isStarbucks
|
|
168
169
|
search={searchValue}
|
|
169
170
|
isCustomLayout
|
|
170
171
|
placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
|
|
@@ -240,6 +241,7 @@ const BusinessesListingUI = (props) => {
|
|
|
240
241
|
<WrapperSearch isCustomLayout={isCustomLayout}>
|
|
241
242
|
<SearchBar
|
|
242
243
|
lazyLoad
|
|
244
|
+
isStarbucks
|
|
243
245
|
search={searchValue}
|
|
244
246
|
isCustomLayout={isCustomLayout}
|
|
245
247
|
placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
|
|
@@ -4,9 +4,6 @@ export const BusinessContainer = styled.div`
|
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
width: 100%;
|
|
6
6
|
margin-top: 0;
|
|
7
|
-
@media (min-width: 577px){
|
|
8
|
-
margin-top: 35px
|
|
9
|
-
}
|
|
10
7
|
`
|
|
11
8
|
export const BusinessList = styled.div`
|
|
12
9
|
display: flex;
|
|
@@ -17,7 +14,7 @@ export const WrapperSearch = styled.div`
|
|
|
17
14
|
display: flex;
|
|
18
15
|
justify-content: space-between;
|
|
19
16
|
position: relative;
|
|
20
|
-
padding:
|
|
17
|
+
padding: 30px;
|
|
21
18
|
input {
|
|
22
19
|
border-bottom: 1px solid #ccc;
|
|
23
20
|
}
|
|
@@ -33,8 +30,7 @@ export const WrapperSearch = styled.div`
|
|
|
33
30
|
width: 100%;
|
|
34
31
|
box-shadow: 0px -2px 1px 4px lightgrey;
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
|
|
38
34
|
${({ isCustomLayout }) => isCustomLayout && css`
|
|
39
35
|
box-sizing: border-box;
|
|
40
36
|
display: flex;
|
|
@@ -89,7 +89,9 @@ const CheckoutUI = (props) => {
|
|
|
89
89
|
instructionsOptions,
|
|
90
90
|
deliveryOptionSelected,
|
|
91
91
|
handleStoreRedirect,
|
|
92
|
-
onPlaceOrderClick
|
|
92
|
+
onPlaceOrderClick,
|
|
93
|
+
setPlaceSpotNumber,
|
|
94
|
+
placeSpotNumber
|
|
93
95
|
} = props
|
|
94
96
|
|
|
95
97
|
const theme = useTheme()
|
|
@@ -114,6 +116,7 @@ const CheckoutUI = (props) => {
|
|
|
114
116
|
const [isSuccess, setIsSuccess] = useState(false)
|
|
115
117
|
|
|
116
118
|
const businessConfigs = businessDetails?.business?.configs ?? []
|
|
119
|
+
const isTableNumberEnabled = configs?.table_numer_enabled?.value
|
|
117
120
|
const isWalletCashEnabled = businessConfigs.find(config => config.key === 'wallet_cash_enabled')?.value === '1'
|
|
118
121
|
const isWalletCreditPointsEnabled = businessConfigs.find(config => config.key === 'wallet_credit_point_enabled')?.value === '1'
|
|
119
122
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletCreditPointsEnabled) && !useKioskApp
|
|
@@ -128,7 +131,7 @@ const CheckoutUI = (props) => {
|
|
|
128
131
|
placing ||
|
|
129
132
|
errorCash ||
|
|
130
133
|
loading ||
|
|
131
|
-
(options?.type === 3 && !(cartState?.cart?.spot_number || cart?.spot_number)) ||
|
|
134
|
+
(isTableNumberEnabled === '1' && (options?.type === 3 && !(cartState?.cart?.spot_number || cart?.spot_number || placeSpotNumber))) ||
|
|
132
135
|
!cart?.valid_maximum ||
|
|
133
136
|
(!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ||
|
|
134
137
|
// (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
|
|
@@ -462,6 +465,7 @@ const CheckoutUI = (props) => {
|
|
|
462
465
|
cart={cart}
|
|
463
466
|
spotNumberDefault={cartState?.cart?.spot_number ?? cart?.spot_number}
|
|
464
467
|
vehicleDefault={cart?.vehicle}
|
|
468
|
+
setPlaceSpotNumber={setPlaceSpotNumber}
|
|
465
469
|
/>
|
|
466
470
|
</SelectSpotContainer>
|
|
467
471
|
)}
|
|
@@ -547,7 +551,7 @@ const CheckoutUI = (props) => {
|
|
|
547
551
|
</WarningText>
|
|
548
552
|
)}
|
|
549
553
|
|
|
550
|
-
{options?.type === 3 && !cart?.spot_number && (
|
|
554
|
+
{isTableNumberEnabled === '1' && (options?.type === 3 && !(cart?.spot_number || placeSpotNumber)) && (
|
|
551
555
|
<WarningText>
|
|
552
556
|
{t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')}
|
|
553
557
|
</WarningText>
|
|
@@ -572,9 +576,9 @@ const CheckoutUI = (props) => {
|
|
|
572
576
|
onClick={() => isDisablePlaceOrderButton ? handleScrollTo('.paymentsContainer') : handlePlaceOrder()}
|
|
573
577
|
>
|
|
574
578
|
{!cart?.valid_maximum ? (
|
|
575
|
-
|
|
579
|
+
`${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
|
|
576
580
|
) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
|
|
577
|
-
|
|
581
|
+
`${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
|
|
578
582
|
) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order')}
|
|
579
583
|
</Button>
|
|
580
584
|
</MobileWrapperPlaceOrderButton>
|
|
@@ -26,7 +26,8 @@ import {
|
|
|
26
26
|
FarAwayMessage,
|
|
27
27
|
Divider,
|
|
28
28
|
AddressFormWrapper,
|
|
29
|
-
LanguageSelectorWrapper
|
|
29
|
+
LanguageSelectorWrapper,
|
|
30
|
+
HeaderSearchMode
|
|
30
31
|
} from './styles'
|
|
31
32
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
32
33
|
import { useOnlineStatus } from '../../../../../hooks/useOnlineStatus'
|
|
@@ -48,6 +49,7 @@ import { SignUpForm } from '../SignUpForm'
|
|
|
48
49
|
import { ForgotPasswordForm } from '../ForgotPasswordForm'
|
|
49
50
|
import { getDistance } from '../../../../../utils'
|
|
50
51
|
import { BusinessPreorder } from '../BusinessPreorder'
|
|
52
|
+
import { SearchBar } from '../SearchBar'
|
|
51
53
|
|
|
52
54
|
export const Header = (props) => {
|
|
53
55
|
const {
|
|
@@ -55,7 +57,9 @@ export const Header = (props) => {
|
|
|
55
57
|
location,
|
|
56
58
|
isShowOrderOptions,
|
|
57
59
|
isHideSignup,
|
|
58
|
-
isCustomerMode
|
|
60
|
+
isCustomerMode,
|
|
61
|
+
searchValue,
|
|
62
|
+
setSearchValue
|
|
59
63
|
} = props
|
|
60
64
|
|
|
61
65
|
const { pathname } = useLocation()
|
|
@@ -79,7 +83,6 @@ export const Header = (props) => {
|
|
|
79
83
|
const [preorderBusiness, setPreorderBusiness] = useState(null)
|
|
80
84
|
const [isAddressFormOpen, setIsAddressFormOpen] = useState(false)
|
|
81
85
|
const [isOpenUserData, setIsOpenUserData] = useState(false)
|
|
82
|
-
|
|
83
86
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
84
87
|
const [isFarAway, setIsFarAway] = useState(false)
|
|
85
88
|
|
|
@@ -310,6 +313,18 @@ export const Header = (props) => {
|
|
|
310
313
|
)}
|
|
311
314
|
</Menu>
|
|
312
315
|
)}
|
|
316
|
+
{windowSize.width > 1200 && window.location.pathname === '/search' && (
|
|
317
|
+
<HeaderSearchMode>
|
|
318
|
+
<SearchBar
|
|
319
|
+
lazyLoad
|
|
320
|
+
search={searchValue}
|
|
321
|
+
placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
|
|
322
|
+
starbucksStyle
|
|
323
|
+
onSearch={(value) => setSearchValue(value)}
|
|
324
|
+
handleCustomEnter={() => events.emit('go_to_page', { page: 'business_search' })}
|
|
325
|
+
/>
|
|
326
|
+
</HeaderSearchMode>
|
|
327
|
+
)}
|
|
313
328
|
{onlineStatus && (
|
|
314
329
|
<RightHeader id='right-side'>
|
|
315
330
|
<Menu isCustomerMode={isCustomerMode}>
|
|
@@ -358,6 +373,7 @@ export const Header = (props) => {
|
|
|
358
373
|
withLogout
|
|
359
374
|
isCustomerMode={isCustomerMode}
|
|
360
375
|
open={openPopover.user}
|
|
376
|
+
handleOpenAddressModal={() => openModal('address')}
|
|
361
377
|
onClick={() => handleTogglePopover('user')}
|
|
362
378
|
onClose={() => handleClosePopover('user')}
|
|
363
379
|
/>
|
|
@@ -22,7 +22,7 @@ export const InnerHeader = styled.div`
|
|
|
22
22
|
justify-content: flex-start;
|
|
23
23
|
}
|
|
24
24
|
#right-side {
|
|
25
|
-
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : '
|
|
25
|
+
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : '25%'};
|
|
26
26
|
justify-content: flex-end;
|
|
27
27
|
}
|
|
28
28
|
#center-side {
|
|
@@ -155,17 +155,17 @@ export const Menu = styled.div`
|
|
|
155
155
|
|
|
156
156
|
@media (min-width: 1024px) {
|
|
157
157
|
padding: 0 20px;
|
|
158
|
-
margin:
|
|
158
|
+
margin-left: 45px;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
@media (min-width: 1200px) {
|
|
162
162
|
padding: 0 30px;
|
|
163
|
-
margin:
|
|
163
|
+
margin-left: 50px;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
@media (min-width: 1500px) {
|
|
167
167
|
padding: 0 30px;
|
|
168
|
-
margin: 0
|
|
168
|
+
margin: 0 75px;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -472,3 +472,19 @@ export const LanguageSelectorWrapper = styled(InputGroup)`
|
|
|
472
472
|
margin: 0px 10px 0 5px;
|
|
473
473
|
}
|
|
474
474
|
`
|
|
475
|
+
|
|
476
|
+
export const HeaderSearchMode = styled.div`
|
|
477
|
+
display: flex;
|
|
478
|
+
justify-content: center;
|
|
479
|
+
width: 300px;
|
|
480
|
+
input {
|
|
481
|
+
overflow: hidden;
|
|
482
|
+
text-overflow: ellipsis;
|
|
483
|
+
}
|
|
484
|
+
@media (min-width: 1400px){
|
|
485
|
+
width: 300px;
|
|
486
|
+
}
|
|
487
|
+
@media (min-width: 1200px){
|
|
488
|
+
width: 250px;
|
|
489
|
+
}
|
|
490
|
+
`
|
|
@@ -38,10 +38,12 @@ export const OriginalHomeHero = (props) => {
|
|
|
38
38
|
const [orderingTheme] = useOrderingTheme()
|
|
39
39
|
const [authModalOpen, setAuthModalOpen] = useState(false)
|
|
40
40
|
const [modalPageToShow, setModalPageToShow] = useState(null)
|
|
41
|
+
const [newAddressModalOpened, setNewAddressModalOpened] = useState(false)
|
|
41
42
|
|
|
42
43
|
const isShowLoginAccount = !orderingTheme?.theme?.mobile_view_web?.components?.home?.components?.login_account?.hidden
|
|
43
44
|
const bgImg = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_background?.components?.image
|
|
44
45
|
const logo = orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image
|
|
46
|
+
const mobileBgImg = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_mobile_background?.components?.image
|
|
45
47
|
const isFullScreen = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_image_fullscreen
|
|
46
48
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
47
49
|
const handleFindBusinesses = () => {
|
|
@@ -93,12 +95,20 @@ export const OriginalHomeHero = (props) => {
|
|
|
93
95
|
return () => setModals({ listOpen: false, formOpen: false })
|
|
94
96
|
}, [])
|
|
95
97
|
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (newAddressModalOpened) return
|
|
100
|
+
if (auth && !orderState.loading && !orderState?.options?.address?.location) {
|
|
101
|
+
setModals({ ...modals, listOpen: true })
|
|
102
|
+
setNewAddressModalOpened(true)
|
|
103
|
+
}
|
|
104
|
+
}, [auth, orderState, newAddressModalOpened])
|
|
105
|
+
|
|
96
106
|
return (
|
|
97
107
|
<HeroContainer
|
|
98
108
|
mb={!auth && isShowLoginAccount && '30vh'}
|
|
99
|
-
bgimage={
|
|
100
|
-
? theme.images?.general?.homeHeroMobile
|
|
101
|
-
: theme.images?.general?.homeHero)}
|
|
109
|
+
bgimage={windowSize.width < 576
|
|
110
|
+
? (mobileBgImg || theme.images?.general?.homeHeroMobile)
|
|
111
|
+
: (bgImg || theme.images?.general?.homeHero)}
|
|
102
112
|
isFullScreen={isFullScreen}
|
|
103
113
|
>
|
|
104
114
|
<ContentWrapper>
|
|
@@ -75,7 +75,7 @@ export const OrderBillSection = (props) => {
|
|
|
75
75
|
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 1)?.map(offer => (
|
|
76
76
|
<tr key={offer.id}>
|
|
77
77
|
<td>
|
|
78
|
-
{offer.name}
|
|
78
|
+
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
79
79
|
{offer.rate_type === 1 && (
|
|
80
80
|
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
81
81
|
)}
|
|
@@ -127,7 +127,7 @@ export const OrderBillSection = (props) => {
|
|
|
127
127
|
order?.taxes?.length > 0 && order?.taxes?.filter(tax => tax?.type === 2 && tax?.rate !== 0).map(tax => (
|
|
128
128
|
<tr key={tax?.id}>
|
|
129
129
|
<td>
|
|
130
|
-
{tax?.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
130
|
+
{t(tax?.name?.toUpperCase()?.replace(/ /g, '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
131
131
|
<span>{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}</span>
|
|
132
132
|
{setOpenTaxModal && (
|
|
133
133
|
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })}>
|
|
@@ -143,7 +143,7 @@ export const OrderBillSection = (props) => {
|
|
|
143
143
|
order?.fees?.length > 0 && order?.fees?.filter(fee => !(fee?.fixed === 0 && fee?.percentage === 0))?.map(fee => (
|
|
144
144
|
<tr key={fee.id}>
|
|
145
145
|
<td>
|
|
146
|
-
{fee?.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
146
|
+
{t(fee?.name?.toUpperCase()?.replace(/ /g, '_'), fee?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
147
147
|
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`})
|
|
148
148
|
{setOpenTaxModal && (
|
|
149
149
|
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: fee, type: 'fee' })}>
|
|
@@ -159,7 +159,7 @@ export const OrderBillSection = (props) => {
|
|
|
159
159
|
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 3)?.map(offer => (
|
|
160
160
|
<tr key={offer.id}>
|
|
161
161
|
<td>
|
|
162
|
-
{offer.name}
|
|
162
|
+
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
163
163
|
{offer.rate_type === 1 && (
|
|
164
164
|
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
165
165
|
)}
|
|
@@ -185,7 +185,7 @@ export const OrderBillSection = (props) => {
|
|
|
185
185
|
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 2)?.map(offer => (
|
|
186
186
|
<tr key={offer.id}>
|
|
187
187
|
<td>
|
|
188
|
-
{offer.name}
|
|
188
|
+
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
189
189
|
{offer.rate_type === 1 && (
|
|
190
190
|
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
191
191
|
)}
|
|
@@ -254,7 +254,7 @@ export const OrderBillSection = (props) => {
|
|
|
254
254
|
<span>
|
|
255
255
|
{event?.wallet_event
|
|
256
256
|
? walletName[event?.wallet_event?.wallet?.type]?.name
|
|
257
|
-
: t(event?.paymethod?.name.toUpperCase(), event?.paymethod?.name)}
|
|
257
|
+
: t(event?.paymethod?.name.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)}
|
|
258
258
|
</span>
|
|
259
259
|
{event?.data?.charge_id && (
|
|
260
260
|
<span>
|
|
@@ -400,6 +400,9 @@ const OrderDetailsUI = (props) => {
|
|
|
400
400
|
businessLogoUrlValidation()
|
|
401
401
|
}, [order])
|
|
402
402
|
|
|
403
|
+
const disableLeftButton = [1, 15, 20, 21]
|
|
404
|
+
const disableRightButton = [1, 15, 21]
|
|
405
|
+
|
|
403
406
|
return (
|
|
404
407
|
<Container>
|
|
405
408
|
{!loading && order && Object.keys(order).length > 0 && !(openMessages.driver || openMessages.business) && (
|
|
@@ -571,7 +574,7 @@ const OrderDetailsUI = (props) => {
|
|
|
571
574
|
style={{ fontSize: 14 }}
|
|
572
575
|
color={order?.status === 20 ? 'secundary' : 'primary'}
|
|
573
576
|
onClick={() => handleChangeOrderStatus(20)}
|
|
574
|
-
disabled={order?.status
|
|
577
|
+
disabled={disableLeftButton.includes(order?.status)}
|
|
575
578
|
>
|
|
576
579
|
{getOrderStatus(20)?.value}
|
|
577
580
|
</Button>
|
|
@@ -580,7 +583,7 @@ const OrderDetailsUI = (props) => {
|
|
|
580
583
|
<Button
|
|
581
584
|
style={{ fontSize: 14 }}
|
|
582
585
|
color={order?.status === 20 ? 'primary' : 'secundary'}
|
|
583
|
-
disabled={order?.status
|
|
586
|
+
disabled={disableRightButton.includes(order?.status)}
|
|
584
587
|
onClick={() => handleChangeOrderStatus(21)}
|
|
585
588
|
>
|
|
586
589
|
{getOrderStatus(21)?.value}
|
|
@@ -78,7 +78,7 @@ const OrdersOptionUI = (props) => {
|
|
|
78
78
|
|
|
79
79
|
const _orders = customArray || values || []
|
|
80
80
|
const uniqueOrders = []
|
|
81
|
-
const
|
|
81
|
+
const ordersReduced = _orders.map(order => order?.cart_group_id
|
|
82
82
|
? _orders
|
|
83
83
|
.filter(_order => _order?.cart_group_id === order?.cart_group_id)
|
|
84
84
|
?.reduce((orderCompleted, currentOrder) => ({
|
|
@@ -92,14 +92,15 @@ const OrdersOptionUI = (props) => {
|
|
|
92
92
|
products: [orderCompleted.products, currentOrder.products].flat()
|
|
93
93
|
}))
|
|
94
94
|
: order)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
const orders = ordersReduced?.filter(order => {
|
|
96
|
+
if (!order?.cart_group_id) return true
|
|
97
|
+
const isDuplicate = uniqueOrders.includes(order?.cart_group_id)
|
|
98
|
+
if (!isDuplicate) {
|
|
99
|
+
uniqueOrders.push(order?.cart_group_id)
|
|
100
|
+
return true
|
|
101
|
+
}
|
|
102
|
+
return false
|
|
103
|
+
})
|
|
103
104
|
|
|
104
105
|
const isShowTitles = businessesIds
|
|
105
106
|
? orders && orders.length > 0 && !orders.map(order => businessesIds && businessesIds.includes(order.business_id)).every(i => !i)
|