ordering-ui-external 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/0.ordering-ui.ea0875b41af5b7f1d809.js +1 -0
- package/_bundles/{1.ordering-ui.a97bdaf67c563ada4c74.js → 1.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{2.ordering-ui.a97bdaf67c563ada4c74.js → 2.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{4.ordering-ui.a97bdaf67c563ada4c74.js → 4.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{5.ordering-ui.a97bdaf67c563ada4c74.js → 5.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{6.ordering-ui.a97bdaf67c563ada4c74.js → 6.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js → 7.ordering-ui.ea0875b41af5b7f1d809.js} +2 -2
- package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → 7.ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.a97bdaf67c563ada4c74.js → 8.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{9.ordering-ui.a97bdaf67c563ada4c74.js → 9.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/ordering-ui.ea0875b41af5b7f1d809.js +2 -0
- package/_bundles/{ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +9 -10
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/AddressList/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +34 -129
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
- package/_modules/themes/five/src/components/Cart/index.js +6 -3
- package/_modules/themes/five/src/components/CartContent/index.js +97 -2
- package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
- package/_modules/themes/five/src/components/Checkout/index.js +8 -2
- package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
- package/_modules/themes/five/src/components/Header/index.js +26 -34
- package/_modules/themes/five/src/components/Header/styles.js +46 -35
- package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
- package/_modules/themes/five/src/components/MultiCheckout/index.js +20 -10
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
- package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
- package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
- package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
- package/package.json +2 -1
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +12 -12
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/AddressList/index.js +3 -2
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
- package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -85
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
- package/src/themes/five/src/components/Cart/index.js +6 -3
- package/src/themes/five/src/components/CartContent/index.js +61 -3
- package/src/themes/five/src/components/CartContent/styles.js +6 -0
- package/src/themes/five/src/components/Checkout/index.js +16 -2
- package/src/themes/five/src/components/Checkout/styles.js +19 -6
- package/src/themes/five/src/components/Header/index.js +281 -277
- package/src/themes/five/src/components/Header/styles.js +20 -51
- package/src/themes/five/src/components/HeaderOption/index.js +3 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +26 -6
- package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
- package/src/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
- package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
- package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
- package/src/themes/five/src/components/OrderDetails/index.js +6 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
- package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
- package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
- package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
- package/template/app.js +1 -1
- package/template/components/ListenPageChanges/index.js +3 -2
- package/template/components/OrderingThemeUpdated/index.js +41 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/MessagesList/index.js +2 -0
- package/template/pages/MultiCart/index.js +24 -0
- package/template/pages/MultiCheckout/index.js +86 -10
- package/template/pages/MultiOrdersDetails/index.js +9 -4
- package/_bundles/0.ordering-ui.a97bdaf67c563ada4c74.js +0 -1
- package/_bundles/ordering-ui.a97bdaf67c563ada4c74.js +0 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
${({ isBusinessList }) => isBusinessList && css`
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 10%;
|
|
7
|
+
width: 100%;
|
|
8
|
+
padding: 0 15px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
`}
|
|
11
|
+
margin-top: 10px;
|
|
12
|
+
`
|
|
13
|
+
|
|
14
|
+
export const AddressMenu = styled.div`
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
background-color: ${props => props.theme.colors.backgroundPage};
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
border-radius: 50px;
|
|
22
|
+
padding: 13px 19px;
|
|
23
|
+
margin-bottom: 10px;
|
|
24
|
+
${({ isCheckOut }) => isCheckOut && css`
|
|
25
|
+
background-color: ${props => props.theme.colors.grayDividerColor};
|
|
26
|
+
`}
|
|
27
|
+
|
|
28
|
+
span {
|
|
29
|
+
width: 100%;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
}
|
|
34
|
+
svg {
|
|
35
|
+
margin-right: 5px;
|
|
36
|
+
color: ${props => props.theme.colors.lightGray};
|
|
37
|
+
${props => props.theme?.rtl && css`
|
|
38
|
+
margin-left: 5px;
|
|
39
|
+
margin-right: 0;
|
|
40
|
+
`}
|
|
41
|
+
}
|
|
42
|
+
`
|
|
43
|
+
|
|
44
|
+
export const FeatureItems = styled.div`
|
|
45
|
+
width: 100%;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export const ItemInline = styled.div`
|
|
51
|
+
> span #select-input {
|
|
52
|
+
background-color: ${props => props.theme.colors.grayDividerColor} !important;
|
|
53
|
+
border: none;
|
|
54
|
+
border-radius: 7.6px;
|
|
55
|
+
svg {
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
}
|
|
58
|
+
#list {
|
|
59
|
+
background-color: ${props => props.theme.colors.backgroundPage};
|
|
60
|
+
border: none;
|
|
61
|
+
border-radius: 7.6px;
|
|
62
|
+
|
|
63
|
+
left: 0px;
|
|
64
|
+
right: initial;
|
|
65
|
+
|
|
66
|
+
${props => props.theme.rtl && css`
|
|
67
|
+
left: initial;
|
|
68
|
+
right: 0px;
|
|
69
|
+
`}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> div:first-child {
|
|
73
|
+
font-size: 11px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.moment-popover {
|
|
78
|
+
> div:first-child {
|
|
79
|
+
font-size: 11px;
|
|
80
|
+
padding: 4px 7px;
|
|
81
|
+
svg {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`
|
|
@@ -400,8 +400,12 @@ const OrderDetailsUI = (props) => {
|
|
|
400
400
|
businessLogoUrlValidation()
|
|
401
401
|
}, [order])
|
|
402
402
|
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
useEffect(() => {
|
|
404
|
+
window.scrollTo(0, 0)
|
|
405
|
+
}, [])
|
|
406
|
+
|
|
407
|
+
const disableLeftButton = [1, 2, 5, 15, 16, 17, 20, 21]
|
|
408
|
+
const disableRightButton = [1, 2, 5, 15, 16, 17, 21]
|
|
405
409
|
|
|
406
410
|
return (
|
|
407
411
|
<Container>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useOrder } from 'ordering-components-external'
|
|
2
|
+
import { useOrder, useOrderingTheme } from 'ordering-components-external'
|
|
3
3
|
import { BusinessController } from '../../BusinessController'
|
|
4
4
|
import { AutoScroll } from '../../AutoScroll'
|
|
5
5
|
import { BusinessList, BusinessListWrapper } from './styles'
|
|
@@ -15,14 +15,17 @@ export const PreviousBusinessOrdered = (props) => {
|
|
|
15
15
|
} = props
|
|
16
16
|
|
|
17
17
|
const [orderState] = useOrder()
|
|
18
|
+
const [orderingTheme] = useOrderingTheme()
|
|
18
19
|
const { width } = useWindowSize()
|
|
20
|
+
const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
21
|
+
|
|
19
22
|
const onBusinessClick = (business) => {
|
|
20
23
|
onRedirectPage({ page: 'business', params: { store: business.slug } })
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
return (
|
|
24
27
|
<BusinessListWrapper isLoading={businesses?.loading}>
|
|
25
|
-
<BusinessList>
|
|
28
|
+
<BusinessList marginCard={isChew && '0 20px 0 0'}>
|
|
26
29
|
<AutoScroll scrollId='searchlistorder'>
|
|
27
30
|
{
|
|
28
31
|
businesses?.result?.map((business, i) => (
|
|
@@ -33,6 +33,10 @@ export const BusinessList = styled.div`
|
|
|
33
33
|
width: calc(100vw - 40px);
|
|
34
34
|
min-width: calc(100vw - 40px);
|
|
35
35
|
|
|
36
|
+
${({ marginCard }) => marginCard && css`
|
|
37
|
+
margin: ${({ marginCard }) => marginCard} !important;
|
|
38
|
+
`}
|
|
39
|
+
|
|
36
40
|
@media (min-width: 681px) {
|
|
37
41
|
width: calc(50vw - 40px);
|
|
38
42
|
min-width: calc(50vw - 40px);
|
|
@@ -33,6 +33,7 @@ import { useTheme } from 'styled-components'
|
|
|
33
33
|
|
|
34
34
|
export const ProductItemAccordion = (props) => {
|
|
35
35
|
const {
|
|
36
|
+
isDisabledEdit,
|
|
36
37
|
isCartPending,
|
|
37
38
|
isCartProduct,
|
|
38
39
|
product,
|
|
@@ -117,11 +118,10 @@ export const ProductItemAccordion = (props) => {
|
|
|
117
118
|
<BeforeComponent key={i} {...props} />))}
|
|
118
119
|
<AccordionSection isCheckout={isCheckout}>
|
|
119
120
|
<Accordion
|
|
120
|
-
isValid={product?.valid ?? true}
|
|
121
121
|
className={`product accordion ${setActive}`}
|
|
122
122
|
onClick={(e) => toggleAccordion(e)}
|
|
123
123
|
>
|
|
124
|
-
<ProductInfo className='info'>
|
|
124
|
+
<ProductInfo className='info' isValid={product?.valid ?? true}>
|
|
125
125
|
{(product?.images || theme?.images?.dummies?.product) && showProductImage && (
|
|
126
126
|
<WrapperProductImage>
|
|
127
127
|
<ProductImage bgimage={product?.images || theme?.images?.dummies?.product} />
|
|
@@ -140,7 +140,7 @@ export const ProductItemAccordion = (props) => {
|
|
|
140
140
|
</ScheduleInfoWrapper>
|
|
141
141
|
) : (
|
|
142
142
|
<>
|
|
143
|
-
{isCartProduct && !isCartPending && getProductMax ? (
|
|
143
|
+
{!isDisabledEdit && isCartProduct && !isCartPending && getProductMax ? (
|
|
144
144
|
<ProductSelectWrapper>
|
|
145
145
|
<IosArrowDown />
|
|
146
146
|
<ProductSelect
|
|
@@ -180,7 +180,7 @@ export const ProductItemAccordion = (props) => {
|
|
|
180
180
|
<p>{parsePrice(product.total || product.price)}</p>
|
|
181
181
|
{isCartProduct && !isCartPending && (
|
|
182
182
|
<div>
|
|
183
|
-
{onEditProduct && (
|
|
183
|
+
{onEditProduct && !isDisabledEdit && (
|
|
184
184
|
<span ref={productActionsEdit}>
|
|
185
185
|
<Pencil color='#B1BCCC' onClick={() => onEditProduct(product)} />
|
|
186
186
|
</span>
|
|
@@ -199,20 +199,59 @@ export const ProductItemAccordion = (props) => {
|
|
|
199
199
|
)}
|
|
200
200
|
</ProductInfo>
|
|
201
201
|
|
|
202
|
-
{
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
202
|
+
{product.valid ? (
|
|
203
|
+
<>
|
|
204
|
+
{(product?.valid || !isCartProduct) && windowSize.width > 410 && (
|
|
205
|
+
<ProductPriceSection>
|
|
206
|
+
<ProductPrice className='prod-price'>
|
|
207
|
+
<span>
|
|
208
|
+
{parsePrice(product.total || product.price)}
|
|
209
|
+
</span>
|
|
210
|
+
{(productInfo().ingredients.length > 0 || productInfo().options.length > 0 || product.comment) && (
|
|
211
|
+
<p>
|
|
212
|
+
<IosArrowDown className={`${setRotate}`} />
|
|
213
|
+
</p>
|
|
214
|
+
)}
|
|
215
|
+
</ProductPrice>
|
|
216
|
+
{isCartProduct && !isCartPending && (
|
|
217
|
+
<ProductActions>
|
|
218
|
+
{!isDisabledEdit && (
|
|
219
|
+
<ProductActionsEdit
|
|
220
|
+
ref={productActionsEdit}
|
|
221
|
+
onClick={() => onEditProduct(product)}
|
|
222
|
+
disabled={orderState.loading}
|
|
223
|
+
>
|
|
224
|
+
<Pencil color='#B1BCCC' />
|
|
225
|
+
</ProductActionsEdit>
|
|
226
|
+
)}
|
|
227
|
+
<ProductActionsDelete
|
|
228
|
+
ref={productActionsDelete}
|
|
229
|
+
onClick={() => onDeleteProduct(product)}
|
|
230
|
+
disabled={orderState.loading}
|
|
231
|
+
>
|
|
232
|
+
<Trash color='#B1BCCC' />
|
|
233
|
+
</ProductActionsDelete>
|
|
234
|
+
</ProductActions>
|
|
235
|
+
)}
|
|
236
|
+
</ProductPriceSection>
|
|
237
|
+
)}
|
|
238
|
+
</>
|
|
239
|
+
) : (
|
|
240
|
+
<ProductActions>
|
|
241
|
+
<ProductActionsDelete
|
|
242
|
+
ref={productActionsDelete}
|
|
243
|
+
onClick={() => onDeleteProduct(product)}
|
|
244
|
+
disabled={orderState.loading}
|
|
245
|
+
>
|
|
246
|
+
<Trash color='#B1BCCC' />
|
|
247
|
+
</ProductActionsDelete>
|
|
248
|
+
</ProductActions>
|
|
249
|
+
)}
|
|
250
|
+
|
|
251
|
+
{isCartProduct && !isCartPending && product?.valid_menu && !product?.valid_quantity && (
|
|
252
|
+
<ProductError>
|
|
253
|
+
<ProductActions>
|
|
254
|
+
{!isDisabledEdit && (
|
|
216
255
|
<ProductActionsEdit
|
|
217
256
|
ref={productActionsEdit}
|
|
218
257
|
onClick={() => onEditProduct(product)}
|
|
@@ -220,28 +259,7 @@ export const ProductItemAccordion = (props) => {
|
|
|
220
259
|
>
|
|
221
260
|
<Pencil color='#B1BCCC' />
|
|
222
261
|
</ProductActionsEdit>
|
|
223
|
-
|
|
224
|
-
ref={productActionsDelete}
|
|
225
|
-
onClick={() => onDeleteProduct(product)}
|
|
226
|
-
disabled={orderState.loading}
|
|
227
|
-
>
|
|
228
|
-
<Trash color='#B1BCCC' />
|
|
229
|
-
</ProductActionsDelete>
|
|
230
|
-
</ProductActions>
|
|
231
|
-
)}
|
|
232
|
-
</ProductPriceSection>
|
|
233
|
-
)}
|
|
234
|
-
|
|
235
|
-
{isCartProduct && !isCartPending && product?.valid_menu && !product?.valid_quantity && (
|
|
236
|
-
<ProductError>
|
|
237
|
-
<ProductActions>
|
|
238
|
-
<ProductActionsEdit
|
|
239
|
-
ref={productActionsEdit}
|
|
240
|
-
onClick={() => onEditProduct(product)}
|
|
241
|
-
disabled={orderState.loading}
|
|
242
|
-
>
|
|
243
|
-
<Pencil color='#B1BCCC' />
|
|
244
|
-
</ProductActionsEdit>
|
|
262
|
+
)}
|
|
245
263
|
<ProductActionsDelete
|
|
246
264
|
ref={productActionsDelete}
|
|
247
265
|
onClick={() => onDeleteProduct(product)}
|
|
@@ -41,9 +41,6 @@ const AccordionStyled = styled.div`
|
|
|
41
41
|
|
|
42
42
|
export const Accordion = (props) => {
|
|
43
43
|
const style = {}
|
|
44
|
-
if (!props.isValid) {
|
|
45
|
-
style.opacity = '0.5'
|
|
46
|
-
}
|
|
47
44
|
return (
|
|
48
45
|
<AccordionStyled
|
|
49
46
|
{...props}
|
|
@@ -217,6 +214,10 @@ export const ProductInfo = styled.div`
|
|
|
217
214
|
margin: 0px 5px;
|
|
218
215
|
}
|
|
219
216
|
|
|
217
|
+
${({ isValid }) => !isValid && css`
|
|
218
|
+
opacity: 0.5;
|
|
219
|
+
`}
|
|
220
|
+
|
|
220
221
|
@media (min-width: 411px) {
|
|
221
222
|
width: 80%;
|
|
222
223
|
}
|
|
@@ -8,6 +8,7 @@ import BsCircleFill from '@meronex/icons/bs/BsCircleFill'
|
|
|
8
8
|
import BsCircleHalf from '@meronex/icons/bs/BsCircleHalf'
|
|
9
9
|
import BsDashCircle from '@meronex/icons/bs/BsDashCircle'
|
|
10
10
|
import BsPlusCircle from '@meronex/icons/bs/BsPlusCircle'
|
|
11
|
+
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
11
12
|
|
|
12
13
|
import {
|
|
13
14
|
Container,
|
|
@@ -43,6 +44,7 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
43
44
|
const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
|
|
44
45
|
const [, t] = useLanguage()
|
|
45
46
|
const [{ parsePrice }] = useUtils()
|
|
47
|
+
const { width } = useWindowSize()
|
|
46
48
|
const [showMessage, setShowMessage] = useState(false)
|
|
47
49
|
const [isDirty, setIsDirty] = useState(false)
|
|
48
50
|
|
|
@@ -112,7 +114,7 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
112
114
|
)}
|
|
113
115
|
<Text>
|
|
114
116
|
<div>{suboption?.name}</div>
|
|
115
|
-
{showMessage && <span>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</span>}
|
|
117
|
+
{showMessage && width > 576 && <span>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</span>}
|
|
116
118
|
</Text>
|
|
117
119
|
</LeftOptionContainer>
|
|
118
120
|
<RightOptionContainer>
|
|
@@ -159,6 +161,11 @@ const ProductOptionSubOptionUI = (props) => {
|
|
|
159
161
|
)}
|
|
160
162
|
</SuboptionPrice>
|
|
161
163
|
</Container>
|
|
164
|
+
{showMessage && width < 576 && (
|
|
165
|
+
<Text noMargin>
|
|
166
|
+
<span>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</span>
|
|
167
|
+
</Text>
|
|
168
|
+
)}
|
|
162
169
|
{props.afterComponents?.map((AfterComponent, i) => (
|
|
163
170
|
<AfterComponent key={i} {...props} />))}
|
|
164
171
|
{props.afterElements?.map((AfterElement, i) => (
|
|
@@ -142,6 +142,7 @@ const SingleOrderCardUI = (props) => {
|
|
|
142
142
|
<BeforeComponent key={i} {...props} />))}
|
|
143
143
|
<Container
|
|
144
144
|
id='order-card'
|
|
145
|
+
w={screen.width - (screen.width < 411 ? -60 : 60)}
|
|
145
146
|
isBusinessesPage={isBusinessesPage}
|
|
146
147
|
isCustomerMode={isCustomerMode}
|
|
147
148
|
onClick={(e) => handleClickCard(e, order)}
|
|
@@ -155,20 +156,18 @@ const SingleOrderCardUI = (props) => {
|
|
|
155
156
|
<>
|
|
156
157
|
{order?.business?.length > 1 ? (
|
|
157
158
|
<MultiLogosContainer>
|
|
158
|
-
{order?.business?.map((business, i) => (
|
|
159
|
-
<
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
) : (
|
|
165
|
-
<BusinessLogoWrapper
|
|
166
|
-
bgimage={optimizeImage(business?.logo || theme.images?.dummies?.businessLogo, 'h_400,c_limit')}
|
|
167
|
-
isMulti
|
|
168
|
-
/>
|
|
169
|
-
)}
|
|
170
|
-
</React.Fragment>
|
|
159
|
+
{order?.business?.map((business, i) => i < 2 && (
|
|
160
|
+
<BusinessLogoWrapper
|
|
161
|
+
key={business?.id}
|
|
162
|
+
bgimage={optimizeImage(business?.logo || theme.images?.dummies?.businessLogo, 'h_400,c_limit')}
|
|
163
|
+
isMulti
|
|
164
|
+
/>
|
|
171
165
|
))}
|
|
166
|
+
{order?.business?.length > 1 && (order?.business?.length - 2) > 0 && (
|
|
167
|
+
<p>
|
|
168
|
+
+ {order?.business?.length - 2}
|
|
169
|
+
</p>
|
|
170
|
+
)}
|
|
172
171
|
</MultiLogosContainer>
|
|
173
172
|
) : (
|
|
174
173
|
<BusinessLogoWrapper bgimage={optimizeImage(order?.business?.logo || theme.images?.dummies?.businessLogo, 'h_400,c_limit')} />
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
cursor: pointer;
|
|
6
|
-
margin: 10px;
|
|
6
|
+
margin: 10px 0;
|
|
7
7
|
position: relative;
|
|
8
8
|
background: white;
|
|
9
9
|
border-radius: 16px;
|
|
@@ -20,8 +20,8 @@ export const Container = styled.div`
|
|
|
20
20
|
width: 300px;
|
|
21
21
|
display: inline-block;
|
|
22
22
|
` : css`
|
|
23
|
-
min-width:
|
|
24
|
-
width:
|
|
23
|
+
min-width: ${({ w }) => w ?? 380}px;
|
|
24
|
+
width: ${({ w }) => w ?? 380}px;
|
|
25
25
|
height: ${({ isBusinessesPage }) => isBusinessesPage && '300px'};
|
|
26
26
|
max-height: ${({ isBusinessesPage }) => isBusinessesPage ? '300px' : '220px'};
|
|
27
27
|
`}
|
|
@@ -54,6 +54,10 @@ export const Container = styled.div`
|
|
|
54
54
|
width: 430px;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
@media (min-width: 768px) {
|
|
58
|
+
margin: 10px;
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
@media(min-width: 993px){
|
|
58
62
|
${({ isBusinessesPage }) => isBusinessesPage && css`
|
|
59
63
|
margin: 30px 20px;
|
|
@@ -66,13 +70,17 @@ export const Content = styled.div`
|
|
|
66
70
|
display: flex;
|
|
67
71
|
position: relative;
|
|
68
72
|
border-radius: 16px;
|
|
69
|
-
padding:
|
|
73
|
+
padding: 0;
|
|
70
74
|
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
71
75
|
align-items: center;
|
|
72
76
|
` : css`
|
|
73
77
|
align-items: flex-start;
|
|
74
78
|
flex: 1;
|
|
75
79
|
`}
|
|
80
|
+
|
|
81
|
+
@media (min-width: 768px) {
|
|
82
|
+
padding: 10px;
|
|
83
|
+
}
|
|
76
84
|
`
|
|
77
85
|
|
|
78
86
|
export const Price = styled.div`
|
|
@@ -135,13 +143,24 @@ const BusinessLogoWrapperStyled = styled.div`
|
|
|
135
143
|
border-radius: 7.6px;
|
|
136
144
|
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
|
|
137
145
|
|
|
138
|
-
margin-
|
|
146
|
+
margin-right: 8px;
|
|
147
|
+
margin-left: 0px;
|
|
139
148
|
|
|
140
149
|
${props => props.theme.rtl && css`
|
|
141
|
-
margin-left:
|
|
142
|
-
margin-right:
|
|
150
|
+
margin-left: 8px;
|
|
151
|
+
margin-right: 0px;
|
|
143
152
|
`}
|
|
144
153
|
|
|
154
|
+
@media (min-width: 768px) {
|
|
155
|
+
margin-right: 0px;
|
|
156
|
+
margin-left: 8px;
|
|
157
|
+
|
|
158
|
+
${props => props.theme.rtl && css`
|
|
159
|
+
margin-left: 0px;
|
|
160
|
+
margin-right: 8px;
|
|
161
|
+
`}
|
|
162
|
+
}
|
|
163
|
+
|
|
145
164
|
@media (min-width: 576px) {
|
|
146
165
|
width: 86px;
|
|
147
166
|
min-width: 86px;
|
package/template/app.js
CHANGED
|
@@ -369,7 +369,7 @@ export const App = () => {
|
|
|
369
369
|
loaded && (
|
|
370
370
|
<ThemeProvider theme={themeUpdated}>
|
|
371
371
|
<ListenPageChanges />
|
|
372
|
-
{!(isKioskApp && isHome) &&
|
|
372
|
+
{!(isKioskApp && isHome) && (
|
|
373
373
|
<HeaderComponent
|
|
374
374
|
isHome={isHome}
|
|
375
375
|
location={location}
|
|
@@ -31,8 +31,9 @@ export const ListenPageChanges = ({ children }) => {
|
|
|
31
31
|
order_detail: '/orders/:orderId',
|
|
32
32
|
checkout: '/checkout/:cartUuid',
|
|
33
33
|
checkout_list: '/checkout',
|
|
34
|
-
multi_checkout: '/multi-checkout',
|
|
35
|
-
multi_orders: '/multi-orders',
|
|
34
|
+
multi_checkout: '/multi-checkout/:cartUuid',
|
|
35
|
+
multi_orders: '/multi-orders/:orderId',
|
|
36
|
+
multi_cart: '/multi-cart/:cartUuid/:cartGroup',
|
|
36
37
|
business: businessUrl,
|
|
37
38
|
business_slug: '/:store',
|
|
38
39
|
product: productUrl,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export const orderingThemeUpdated = (theme, orderingTheme) => ({
|
|
2
|
+
...theme,
|
|
3
|
+
...orderingTheme?.theme,
|
|
4
|
+
colors: {
|
|
5
|
+
...theme.colors,
|
|
6
|
+
...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_btn_color && { primary: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_btn_color }),
|
|
7
|
+
...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color && { links: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color })
|
|
8
|
+
},
|
|
9
|
+
images: {
|
|
10
|
+
...theme.images,
|
|
11
|
+
general: {
|
|
12
|
+
...theme.images.general,
|
|
13
|
+
homeHero: orderingTheme?.theme?.homepage_view?.components?.homepage_header?.components?.image || theme.images?.general?.homeHero,
|
|
14
|
+
businessHero: orderingTheme?.theme?.business_listing_view?.components?.business_hero?.components?.image || theme.images?.general?.businessHero,
|
|
15
|
+
notFound: orderingTheme?.theme?.business_listing_view?.components?.not_found_source?.components?.image || theme.images?.general?.notFound,
|
|
16
|
+
emptyActiveOrders: orderingTheme?.theme?.orders?.components?.active_orders?.components?.not_found_source?.components?.image || theme.images?.general?.emptyActiveOrders,
|
|
17
|
+
emptyPastOrders: orderingTheme?.theme?.orders?.components?.past_orders?.components?.not_found_source?.components?.image,
|
|
18
|
+
notNetwork: orderingTheme?.theme?.no_internet?.components?.image || theme.images?.general?.notNetwork,
|
|
19
|
+
businessSignUpHero: orderingTheme?.theme?.business_signup?.components?.icon?.components?.image || theme.images?.general?.businessSignUpHero,
|
|
20
|
+
driverSignUpHero: orderingTheme?.theme?.driver_signup?.components?.icon?.components?.image || theme.images?.general?.driverSignUpHero
|
|
21
|
+
},
|
|
22
|
+
categories: {
|
|
23
|
+
...theme.images.categories,
|
|
24
|
+
food: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.food?.image || theme.images.categories.categoryFood,
|
|
25
|
+
groceries: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.groceries?.image || theme.images.categories.categoryGroceries,
|
|
26
|
+
alcohol: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.alcohol?.image || theme.images.categories.categoryAlcohol,
|
|
27
|
+
laundry: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.laundry?.image || theme.images.categories.categoryLaundry,
|
|
28
|
+
all: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.all?.image || theme.images.categories.categoryAll
|
|
29
|
+
},
|
|
30
|
+
dummies: {
|
|
31
|
+
...theme.images.dummies,
|
|
32
|
+
businessHeader: orderingTheme?.theme?.business_view?.components?.header?.components?.dummy_image || theme.images.dummies.businessHeader,
|
|
33
|
+
businessLogo: orderingTheme?.theme?.business_view?.components?.header?.components?.logo?.dummy_image || theme.images.dummies.businessLogo,
|
|
34
|
+
product: orderingTheme?.theme?.business_view?.components?.products?.components?.photo?.components?.dummy_image || theme.images.dummies.product
|
|
35
|
+
},
|
|
36
|
+
logos: {
|
|
37
|
+
...theme.images.logos,
|
|
38
|
+
logotype: orderingTheme?.theme?.header?.components?.logo?.components?.image || theme.images.logos.logotype
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
})
|
package/template/helmetdata.json
CHANGED
|
@@ -180,5 +180,12 @@
|
|
|
180
180
|
"keywords": "test, dummy, data",
|
|
181
181
|
"robots": "index, follow",
|
|
182
182
|
"canonicalUrl": ""
|
|
183
|
+
},
|
|
184
|
+
"multi_cart": {
|
|
185
|
+
"title": "Multi Cart",
|
|
186
|
+
"description": "a dummy description about this page",
|
|
187
|
+
"keywords": "test, dummy, data",
|
|
188
|
+
"robots": "index, follow",
|
|
189
|
+
"canonicalUrl": ""
|
|
183
190
|
}
|
|
184
191
|
}
|
|
@@ -3,11 +3,13 @@ import { MessagesListing } from '../../../src/themes/five/src/components/Message
|
|
|
3
3
|
|
|
4
4
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
5
5
|
import { useEvent } from 'ordering-components-external'
|
|
6
|
+
import settings from '../../config'
|
|
6
7
|
|
|
7
8
|
export const MessagesList = (props) => {
|
|
8
9
|
const [events] = useEvent()
|
|
9
10
|
const messageprops = {
|
|
10
11
|
...props,
|
|
12
|
+
franchiseId: settings?.franchiseSlug,
|
|
11
13
|
onRedirectPage: (data) => events.emit('go_to_page', data)
|
|
12
14
|
}
|
|
13
15
|
return (
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { MultiCart as MultiCartController } from '../../../src/themes/five/src/components/MultiCart'
|
|
3
|
+
import { HelmetTags } from '../../components/HelmetTags'
|
|
4
|
+
import { useEvent } from 'ordering-components-external'
|
|
5
|
+
import { useParams } from 'react-router-dom'
|
|
6
|
+
|
|
7
|
+
export const MultiCart = (props) => {
|
|
8
|
+
const [events] = useEvent()
|
|
9
|
+
const { cartUuid, cartGroup } = useParams()
|
|
10
|
+
const multiCheckoutProps = {
|
|
11
|
+
...props,
|
|
12
|
+
onRedirectPage: (data) => events.emit('go_to_page', data),
|
|
13
|
+
cartUuid,
|
|
14
|
+
cartGroup
|
|
15
|
+
}
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<HelmetTags page='multi_cart' />
|
|
19
|
+
<MultiCartController {...multiCheckoutProps} />
|
|
20
|
+
</>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default MultiCart
|