ordering-ui-external 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/0.ordering-ui.4daed536057dd0fbaf15.js +1 -0
- package/_bundles/{0.ordering-ui.8d3ec9f208550df10621.js → 1.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
- package/_bundles/{1.ordering-ui.8d3ec9f208550df10621.js → 2.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
- package/_bundles/{4.ordering-ui.8d3ec9f208550df10621.js → 4.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
- package/_bundles/{5.ordering-ui.8d3ec9f208550df10621.js → 5.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
- package/_bundles/{6.ordering-ui.8d3ec9f208550df10621.js → 6.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
- package/_bundles/7.ordering-ui.4daed536057dd0fbaf15.js +2 -0
- package/_bundles/{7.ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → 7.ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.8d3ec9f208550df10621.js → 8.ordering-ui.4daed536057dd0fbaf15.js} +0 -0
- package/_bundles/{9.ordering-ui.8d3ec9f208550df10621.js → 9.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
- package/_bundles/ordering-ui.4daed536057dd0fbaf15.js +2 -0
- package/_bundles/{ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +47 -0
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -29
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +10 -6
- package/_modules/themes/five/src/components/BusinessProductsList/styles.js +8 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +3 -3
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +4 -1
- package/_modules/themes/five/src/components/Cart/index.js +3 -1
- package/_modules/themes/five/src/components/Checkout/index.js +46 -33
- package/_modules/themes/five/src/components/Favorite/index.js +16 -2
- package/_modules/themes/five/src/components/FavoriteList/index.js +15 -1
- package/_modules/themes/five/src/components/Header/index.js +2 -2
- package/_modules/themes/five/src/components/Header/styles.js +5 -3
- package/_modules/themes/five/src/components/Modal/index.js +2 -2
- package/_modules/themes/five/src/components/Modal/styles.js +8 -4
- package/_modules/themes/five/src/components/MyOrders/index.js +9 -2
- package/_modules/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +10 -40
- package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +25 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +19 -0
- package/_modules/themes/five/src/components/OrdersOption/index.js +16 -13
- package/_modules/themes/five/src/components/ProductForm/index.js +5 -5
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/SidebarMenu/index.js +39 -17
- package/_modules/themes/five/src/components/SingleProductCard/styles.js +1 -1
- package/_modules/themes/five/src/components/SingleProfessionalCard/index.js +95 -0
- package/_modules/themes/five/src/components/SingleProfessionalCard/styles.js +47 -0
- package/_modules/themes/five/src/styles/Selects/index.js +1 -1
- package/index-template.js +28 -5
- package/package.json +6 -3
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +44 -0
- package/src/themes/five/src/components/BusinessListingSearch/index.js +8 -30
- package/src/themes/five/src/components/BusinessProductsList/index.js +29 -22
- package/src/themes/five/src/components/BusinessProductsList/styles.js +25 -2
- package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +4 -3
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/src/themes/five/src/components/Cart/index.js +2 -0
- package/src/themes/five/src/components/Checkout/index.js +19 -12
- package/src/themes/five/src/components/Favorite/index.js +19 -1
- package/src/themes/five/src/components/FavoriteList/index.js +24 -0
- package/src/themes/five/src/components/Header/index.js +11 -8
- package/src/themes/five/src/components/Header/styles.js +5 -0
- package/src/themes/five/src/components/Modal/index.js +9 -6
- package/src/themes/five/src/components/Modal/styles.js +15 -1
- package/src/themes/five/src/components/MyOrders/index.js +11 -1
- package/src/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -29
- package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +32 -0
- package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +38 -0
- package/src/themes/five/src/components/OrdersOption/index.js +18 -9
- package/src/themes/five/src/components/ProductForm/index.js +5 -5
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/src/themes/five/src/components/SidebarMenu/index.js +98 -42
- package/src/themes/five/src/components/SingleProductCard/styles.js +5 -1
- package/src/themes/five/src/components/SingleProfessionalCard/index.js +82 -0
- package/src/themes/five/src/components/SingleProfessionalCard/styles.js +92 -0
- package/src/themes/five/src/styles/Selects/index.js +1 -0
- package/template/Utils/index.js +4 -0
- package/template/app.js +554 -143
- package/template/assets/images/business-hero.jpg +0 -0
- package/template/assets/images/business-signup-background.png +0 -0
- package/template/assets/images/business_signup.png +0 -0
- package/template/assets/images/congratulation_approval.png +0 -0
- package/template/assets/images/congratulation_no_approval.png +0 -0
- package/template/assets/images/credit.png +0 -0
- package/template/assets/images/delivery-types/curbside.jpg +0 -0
- package/template/assets/images/delivery-types/delivery.jpg +0 -0
- package/template/assets/images/delivery-types/drive_thru.jpg +0 -0
- package/template/assets/images/delivery-types/eat_in.jpg +0 -0
- package/template/assets/images/delivery-types/pickup.jpg +0 -0
- package/template/assets/images/driver-signup-background.png +0 -0
- package/template/assets/images/driver-signup-hero.png +0 -0
- package/template/assets/images/driver_congratulation_approval.png +0 -0
- package/template/assets/images/driver_congratulation_no_approval.png +0 -0
- package/template/assets/images/driver_signup.png +0 -0
- package/template/assets/images/home-hero.jpg +0 -0
- package/template/assets/images/loyalty_level.png +0 -0
- package/template/assets/images/mastercard.png +0 -0
- package/template/assets/images/not-found.svg +94 -1
- package/template/assets/images/not-network.svg +226 -1
- package/template/assets/images/visa.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/template/components/ListenPageChanges/index.js +25 -12
- package/template/components/ScrollToTop/index.js +4 -0
- package/template/config.js +14 -0
- package/template/config.json +1 -0
- package/template/helmetdata.json +91 -28
- package/template/pages/AddressList/index.js +34 -0
- package/template/pages/AddressList/styles.js +43 -0
- package/template/pages/BusinessListingSearch/index.js +106 -0
- package/template/pages/BusinessProductsList/index.js +152 -29
- package/template/pages/BusinessesList/index.js +17 -6
- package/template/pages/Checkout/index.js +14 -4
- package/template/pages/Favorite/index.js +12 -0
- package/template/pages/Help/index.js +7 -2
- package/template/pages/Home/index.js +58 -36
- package/template/pages/Home/styles.js +14 -0
- package/template/pages/MessagesList/index.js +19 -0
- package/template/pages/MultiCheckout/index.js +26 -0
- package/template/pages/MultiOrdersDetails/index.js +21 -0
- package/template/pages/MyOrders/index.js +87 -3
- package/template/pages/OrderDetails/index.js +12 -2
- package/template/pages/Profile/index.js +16 -3
- package/template/pages/Promotions/index.js +13 -0
- package/template/pages/ResetPassword/index.js +15 -9
- package/template/pages/SessionsList/index.js +12 -0
- package/template/pages/SignUpBusiness/index.js +12 -0
- package/template/pages/SignUpDriver/index.js +12 -0
- package/template/pages/UserVerification/index.js +12 -0
- package/template/pages/Wallets/index.js +12 -0
- package/template/service-worker.js +72 -0
- package/template/theme.json +27 -51
- package/_bundles/3.ordering-ui.8d3ec9f208550df10621.js +0 -1
- package/_bundles/7.ordering-ui.8d3ec9f208550df10621.js +0 -2
- package/_bundles/ordering-ui.8d3ec9f208550df10621.js +0 -2
- package/template/assets/images/exclamation.svg +0 -3
- package/template/assets/images/order-creating.png +0 -0
- package/template/assets/images/order-sucess.png +0 -0
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
ModalTitle,
|
|
8
8
|
ModalIcon,
|
|
9
9
|
ModalHeader,
|
|
10
|
-
ModalBackHeader
|
|
10
|
+
ModalBackHeader,
|
|
11
|
+
ModalIconWrapper
|
|
11
12
|
} from './styles'
|
|
12
13
|
|
|
13
14
|
import { Button } from '../../styles/Buttons'
|
|
@@ -68,11 +69,13 @@ const ModalUI = (props) => {
|
|
|
68
69
|
<ModalBackHeader />
|
|
69
70
|
)}
|
|
70
71
|
{!hideCloseDefault && (
|
|
71
|
-
<
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
<ModalIconWrapper>
|
|
73
|
+
<ModalIcon isProductForm={isProductForm}>
|
|
74
|
+
{
|
|
75
|
+
(authModal && onRemove) ? <MdClose onClick={() => onRemove()} /> : <MdClose onClick={() => onClose()} />
|
|
76
|
+
}
|
|
77
|
+
</ModalIcon>
|
|
78
|
+
</ModalIconWrapper>
|
|
76
79
|
)}
|
|
77
80
|
<ModalHeader>
|
|
78
81
|
{title && (
|
|
@@ -86,7 +86,7 @@ export const ModalActions = styled.div`
|
|
|
86
86
|
`
|
|
87
87
|
export const ModalHeader = styled.div`
|
|
88
88
|
display: flex;
|
|
89
|
-
margin-top:
|
|
89
|
+
margin-top: 40px;
|
|
90
90
|
|
|
91
91
|
@media(min-width: 450px){
|
|
92
92
|
margin-top: 0;
|
|
@@ -172,3 +172,17 @@ export const ModalBackHeader = styled.div`
|
|
|
172
172
|
display: none;
|
|
173
173
|
}
|
|
174
174
|
`
|
|
175
|
+
export const ModalIconWrapper = styled.div`
|
|
176
|
+
position: fixed;
|
|
177
|
+
top: 0;
|
|
178
|
+
left: 0;
|
|
179
|
+
width: 100%;
|
|
180
|
+
background-color: ${props => props.theme.colors.backgroundPage};
|
|
181
|
+
z-index: 100;
|
|
182
|
+
height: 70px;
|
|
183
|
+
|
|
184
|
+
@media (min-width: 450px) {
|
|
185
|
+
position: initial;
|
|
186
|
+
height: initial;
|
|
187
|
+
}
|
|
188
|
+
`
|
|
@@ -48,7 +48,7 @@ export const MyOrders = (props) => {
|
|
|
48
48
|
{ key: 'products', value: t('PRODUCTS', 'Products') }
|
|
49
49
|
]
|
|
50
50
|
|
|
51
|
-
const notOrderOptions = ['business', 'products']
|
|
51
|
+
const notOrderOptions = ['business', 'products', 'professionals']
|
|
52
52
|
const allEmpty = (isEmptyActive && isEmptyPast && isEmptyPreorder) || ((isEmptyBusinesses || businessOrderIds?.length === 0) && hideOrders)
|
|
53
53
|
|
|
54
54
|
const handleChangeFilter = (key) => {
|
|
@@ -87,6 +87,15 @@ export const MyOrders = (props) => {
|
|
|
87
87
|
{option?.value}
|
|
88
88
|
</Tab>
|
|
89
89
|
))}
|
|
90
|
+
{layout === 'appointments' && (
|
|
91
|
+
<Tab
|
|
92
|
+
onClick={() => setSelectedOption('professionals')}
|
|
93
|
+
active={selectedOption === 'professionals'}
|
|
94
|
+
borderBottom
|
|
95
|
+
>
|
|
96
|
+
{t('PROFESSIONALS', 'Professionals')}
|
|
97
|
+
</Tab>
|
|
98
|
+
)}
|
|
90
99
|
</Tabs>
|
|
91
100
|
</MyOrdersMenuContainer>
|
|
92
101
|
)}
|
|
@@ -165,6 +174,7 @@ export const MyOrders = (props) => {
|
|
|
165
174
|
horizontal
|
|
166
175
|
isBusiness={selectedOption === 'business'}
|
|
167
176
|
isProducts={selectedOption === 'products'}
|
|
177
|
+
isProfessionals={selectedOption === 'professionals'}
|
|
168
178
|
activeOrders
|
|
169
179
|
pastOrders
|
|
170
180
|
preOrders
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useOrder } from 'ordering-components-external'
|
|
3
3
|
import { BusinessController } from '../../BusinessController'
|
|
4
4
|
import { AutoScroll } from '../../AutoScroll'
|
|
5
5
|
import { BusinessList, BusinessListWrapper } from './styles'
|
|
6
6
|
import { useWindowSize } from '../../../../../../hooks/useWindowSize'
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
export const PreviousBusinessOrdered = (props) => {
|
|
8
9
|
const {
|
|
9
|
-
businessesList,
|
|
10
10
|
isCustomLayout,
|
|
11
11
|
isCustomerMode,
|
|
12
|
-
setBusinessLoading,
|
|
13
12
|
onRedirectPage,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
handleUpdateBusinessList
|
|
13
|
+
handleUpdateBusinessList,
|
|
14
|
+
businesses
|
|
17
15
|
} = props
|
|
18
16
|
|
|
19
17
|
const [orderState] = useOrder()
|
|
@@ -21,20 +19,13 @@ export const PreviousBusinessOrderedUI = (props) => {
|
|
|
21
19
|
const onBusinessClick = (business) => {
|
|
22
20
|
onRedirectPage({ page: 'business', params: { store: business.slug } })
|
|
23
21
|
}
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (businessesList?.loading && businessesList?.businesses?.length === 0) {
|
|
26
|
-
setBusinessLoading(true)
|
|
27
|
-
} else {
|
|
28
|
-
setBusinessLoading(false)
|
|
29
|
-
}
|
|
30
|
-
}, [businessesList?.loading])
|
|
31
22
|
|
|
32
23
|
return (
|
|
33
|
-
<BusinessListWrapper isLoading={
|
|
24
|
+
<BusinessListWrapper isLoading={businesses?.loading}>
|
|
34
25
|
<BusinessList>
|
|
35
26
|
<AutoScroll scrollId='searchlistorder'>
|
|
36
27
|
{
|
|
37
|
-
|
|
28
|
+
businesses?.result?.map((business, i) => (
|
|
38
29
|
<BusinessController
|
|
39
30
|
key={business.id}
|
|
40
31
|
className='card'
|
|
@@ -63,15 +54,3 @@ export const PreviousBusinessOrderedUI = (props) => {
|
|
|
63
54
|
</BusinessListWrapper>
|
|
64
55
|
)
|
|
65
56
|
}
|
|
66
|
-
|
|
67
|
-
export const PreviousBusinessOrdered = (props) => {
|
|
68
|
-
const previousBusinessOrderedController = {
|
|
69
|
-
...props,
|
|
70
|
-
UIComponent: PreviousBusinessOrderedUI,
|
|
71
|
-
paginationSettings: { initialPage: 1, pageSize: 50, controlType: 'infinity' }
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<BusinessListController {...previousBusinessOrderedController} />
|
|
76
|
-
)
|
|
77
|
-
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ProductsList,
|
|
5
|
+
ProductsListContainer
|
|
6
|
+
} from './styles'
|
|
7
|
+
|
|
8
|
+
import { AutoScroll } from '../../AutoScroll'
|
|
9
|
+
import { SingleProfessionalCard } from '../../SingleProfessionalCard'
|
|
10
|
+
|
|
11
|
+
export const PreviousProfessionalOrdered = (props) => {
|
|
12
|
+
const {
|
|
13
|
+
professionals,
|
|
14
|
+
handleUpdateProfessionals
|
|
15
|
+
} = props
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<ProductsListContainer isLoading={professionals?.length < 1}>
|
|
19
|
+
<ProductsList>
|
|
20
|
+
<AutoScroll>
|
|
21
|
+
{professionals?.map(professional => (
|
|
22
|
+
<SingleProfessionalCard
|
|
23
|
+
key={professional?.id}
|
|
24
|
+
professional={professional}
|
|
25
|
+
handleUpdateProfessionals={handleUpdateProfessionals}
|
|
26
|
+
/>
|
|
27
|
+
))}
|
|
28
|
+
</AutoScroll>
|
|
29
|
+
</ProductsList>
|
|
30
|
+
</ProductsListContainer>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const ProductsList = styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
#autoscroll {
|
|
8
|
+
> div {
|
|
9
|
+
width: 300px;
|
|
10
|
+
max-width: 300px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media(min-width: 480px){
|
|
15
|
+
#autoscroll {
|
|
16
|
+
> div {
|
|
17
|
+
width: 350px;
|
|
18
|
+
max-width: 350px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`
|
|
23
|
+
|
|
24
|
+
export const ProductsListContainer = styled.div`
|
|
25
|
+
margin-top: 10px;
|
|
26
|
+
display: flex;
|
|
27
|
+
overflow: scroll hidden;
|
|
28
|
+
::-webkit-scrollbar {
|
|
29
|
+
width: 6px;
|
|
30
|
+
height: 6px;
|
|
31
|
+
}
|
|
32
|
+
${({ isLoading }) => isLoading && css`
|
|
33
|
+
::-webkit-scrollbar {
|
|
34
|
+
width: 0px;
|
|
35
|
+
height: 0px;
|
|
36
|
+
}
|
|
37
|
+
`}
|
|
38
|
+
`
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import Skeleton from 'react-loading-skeleton'
|
|
3
3
|
import moment from 'moment'
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { useLanguage, useOrder, useEvent, OrderList } from 'ordering-components-external'
|
|
6
5
|
import { HorizontalOrdersLayout } from '../HorizontalOrdersLayout'
|
|
7
6
|
import { VerticalOrdersLayout } from '../../../../../components/VerticalOrdersLayout'
|
|
8
7
|
import { NotFoundSource } from '../../../../../components/NotFoundSource'
|
|
@@ -28,6 +27,7 @@ import { BusinessController } from '../BusinessController'
|
|
|
28
27
|
import { SingleProductCard } from '../SingleProductCard'
|
|
29
28
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
30
29
|
import { Alert } from '../Confirm'
|
|
30
|
+
import { PreviousProfessionalOrdered } from './PreviousProfessionalOrdered'
|
|
31
31
|
|
|
32
32
|
const OrdersOptionUI = (props) => {
|
|
33
33
|
const {
|
|
@@ -56,13 +56,17 @@ const OrdersOptionUI = (props) => {
|
|
|
56
56
|
handleReorder,
|
|
57
57
|
isBusiness,
|
|
58
58
|
isProducts,
|
|
59
|
+
isProfessionals,
|
|
59
60
|
businessOrderIds,
|
|
60
61
|
products,
|
|
61
62
|
hideOrders,
|
|
62
63
|
onProductRedirect,
|
|
63
64
|
businessesSearchList,
|
|
64
65
|
handleUpdateProducts,
|
|
65
|
-
onBusinessClick
|
|
66
|
+
onBusinessClick,
|
|
67
|
+
professionals,
|
|
68
|
+
handleUpdateProfessionals,
|
|
69
|
+
businesses
|
|
66
70
|
} = props
|
|
67
71
|
|
|
68
72
|
const [, t] = useLanguage()
|
|
@@ -82,7 +86,6 @@ const OrdersOptionUI = (props) => {
|
|
|
82
86
|
: orders.length > 0
|
|
83
87
|
|
|
84
88
|
const [loadingOrders, setLoadingOrders] = useState(true)
|
|
85
|
-
const [businessLoading, setBusinessLoading] = useState(true)
|
|
86
89
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
87
90
|
const closeOrderModal = (e) => {
|
|
88
91
|
const outsideModal = !window.document.getElementById('app-modals') ||
|
|
@@ -94,7 +97,7 @@ const OrdersOptionUI = (props) => {
|
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
const showSkeletons = (!isBusiness && !isProducts && loading) || (
|
|
100
|
+
const showSkeletons = (!isBusiness && !isProducts && loading) || (businesses?.loading && isBusiness) || (products?.length === 0 && isProducts && ((!businessesSearchList && loading) || businessesSearchList?.loading))
|
|
98
101
|
|
|
99
102
|
const getOrderStatus = (s) => {
|
|
100
103
|
const status = parseInt(s)
|
|
@@ -222,8 +225,7 @@ const OrdersOptionUI = (props) => {
|
|
|
222
225
|
)}
|
|
223
226
|
{isBusiness && businessOrderIds?.length > 0 && (
|
|
224
227
|
<PreviousBusinessOrdered
|
|
225
|
-
|
|
226
|
-
setBusinessLoading={setBusinessLoading}
|
|
228
|
+
businesses={businesses}
|
|
227
229
|
onRedirectPage={onRedirectPage}
|
|
228
230
|
isLoadingOrders={loading}
|
|
229
231
|
/>
|
|
@@ -238,9 +240,16 @@ const OrdersOptionUI = (props) => {
|
|
|
238
240
|
/>
|
|
239
241
|
)}
|
|
240
242
|
|
|
241
|
-
{
|
|
243
|
+
{isProfessionals && (
|
|
244
|
+
<PreviousProfessionalOrdered
|
|
245
|
+
professionals={professionals}
|
|
246
|
+
handleUpdateProfessionals={handleUpdateProfessionals}
|
|
247
|
+
/>
|
|
248
|
+
)}
|
|
249
|
+
|
|
250
|
+
{(isCustomLayout ? (loadingOrders || loading || businesses?.loading) : showSkeletons) && (
|
|
242
251
|
<>
|
|
243
|
-
{(
|
|
252
|
+
{(businesses?.loading && isBusiness) ? (
|
|
244
253
|
<BusinessControllerSkeleton>
|
|
245
254
|
{[...Array(3).keys()].map((item, i) => (
|
|
246
255
|
<BusinessController
|
|
@@ -640,15 +640,15 @@ const ProductOptionsUI = (props) => {
|
|
|
640
640
|
<div className='price-amount-block'>
|
|
641
641
|
<div className='price'>
|
|
642
642
|
<h4>{productCart.total && parsePrice(productCart.total)}</h4>
|
|
643
|
-
{product?.minimum_per_order && productCart?.quantity
|
|
644
|
-
{product?.maximum_per_order && productCart?.quantity
|
|
643
|
+
{product?.minimum_per_order && productCart?.quantity <= product?.minimum_per_order && productCart?.quantity !== 1 && <span>{t('MINIMUM_TO_ORDER', 'Minimum _number_ to order').replace('_number_', product?.minimum_per_order)}</span>}
|
|
644
|
+
{product?.maximum_per_order && productCart?.quantity >= product?.maximum_per_order && <span>{t('MAXIMUM_TO_ORDER', 'Max. _number_ to order'.replace('_number_', product?.maximum_per_order))}</span>}
|
|
645
645
|
</div>
|
|
646
646
|
{
|
|
647
647
|
productCart && !isSoldOut && maxProductQuantity > 0 && (
|
|
648
648
|
<div className={isHaveWeight ? 'incdec-control show-weight-unit' : 'incdec-control'}>
|
|
649
649
|
<FiMinusCircle
|
|
650
650
|
onClick={decrement}
|
|
651
|
-
className={`${productCart.quantity === 1 || !productCart.quantity || isSoldOut ? 'disabled' : ''}`}
|
|
651
|
+
className={`${productCart.quantity === 1 || !productCart.quantity || isSoldOut || (productCart?.quantity <= product?.minimum_per_order) ? 'disabled' : ''}`}
|
|
652
652
|
/>
|
|
653
653
|
{
|
|
654
654
|
qtyBy?.pieces && (
|
|
@@ -669,7 +669,7 @@ const ProductOptionsUI = (props) => {
|
|
|
669
669
|
)}
|
|
670
670
|
<FiPlusCircle
|
|
671
671
|
onClick={increment}
|
|
672
|
-
className={`${maxProductQuantity <= 0 || productCart.quantity >= maxProductQuantity || isSoldOut ? 'disabled' : ''}`}
|
|
672
|
+
className={`${maxProductQuantity <= 0 || productCart.quantity >= maxProductQuantity || (productCart.quantity >= product?.maximum_per_order && product?.maximum_per_order) || isSoldOut ? 'disabled' : ''}`}
|
|
673
673
|
/>
|
|
674
674
|
{isHaveWeight && (
|
|
675
675
|
<WeightUnitSwitch>
|
|
@@ -817,7 +817,7 @@ const ProductOptionsUI = (props) => {
|
|
|
817
817
|
export const ProductForm = (props) => {
|
|
818
818
|
const productOptionsProps = {
|
|
819
819
|
...props,
|
|
820
|
-
productCart: { quantity: props?.product?.minimum_per_order || 1 },
|
|
820
|
+
productCart: { quantity: props?.product?.maximum_per_order || props?.product?.minimum_per_order || 1 },
|
|
821
821
|
UIComponent: ProductOptionsUI
|
|
822
822
|
}
|
|
823
823
|
|
|
@@ -11,6 +11,8 @@ import BiStore from '@meronex/icons/bi/BiStore'
|
|
|
11
11
|
import FaUserCircle from '@meronex/icons/fa/FaUserCircle'
|
|
12
12
|
import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
|
|
13
13
|
import SiJsonwebtokens from '@meronex/icons/si/SiJsonwebtokens'
|
|
14
|
+
import BiMessageDetail from '@meronex/icons/bi/BiMessageDetail'
|
|
15
|
+
import BsSearch from '@meronex/icons/bs/BsSearch'
|
|
14
16
|
import { Heart, Tag } from 'react-bootstrap-icons'
|
|
15
17
|
|
|
16
18
|
import { useEvent, useLanguage, useOrder, useSession, useConfig } from 'ordering-components-external'
|
|
@@ -196,6 +198,64 @@ export const SidebarMenu = (props) => {
|
|
|
196
198
|
|
|
197
199
|
{auth && (
|
|
198
200
|
<>
|
|
201
|
+
<MenuLink
|
|
202
|
+
onClick={() => handleGoToPage({ page: 'business_search' })}
|
|
203
|
+
>
|
|
204
|
+
<WrappContent>
|
|
205
|
+
<MenuLinkIcon
|
|
206
|
+
active={
|
|
207
|
+
window.location.pathname === '/business_search'
|
|
208
|
+
}
|
|
209
|
+
>
|
|
210
|
+
<BsSearch />
|
|
211
|
+
</MenuLinkIcon>
|
|
212
|
+
<MenuLinkText>
|
|
213
|
+
<TextInfo
|
|
214
|
+
active={
|
|
215
|
+
window.location.pathname === '/business_search'
|
|
216
|
+
}
|
|
217
|
+
>
|
|
218
|
+
{t('BROWSE_SEARCH', 'Browse & Search')}
|
|
219
|
+
</TextInfo>
|
|
220
|
+
</MenuLinkText>
|
|
221
|
+
<MenuLinkSeparator>
|
|
222
|
+
<div>
|
|
223
|
+
<hr />
|
|
224
|
+
</div>
|
|
225
|
+
</MenuLinkSeparator>
|
|
226
|
+
</WrappContent>
|
|
227
|
+
</MenuLink>
|
|
228
|
+
{
|
|
229
|
+
!isCustomerMode && (
|
|
230
|
+
<MenuLink
|
|
231
|
+
onClick={() => handleGoToPage({ page: 'orders' })}
|
|
232
|
+
>
|
|
233
|
+
<WrappContent>
|
|
234
|
+
<MenuLinkIcon
|
|
235
|
+
active={
|
|
236
|
+
window.location.pathname === '/profile/orders'
|
|
237
|
+
}
|
|
238
|
+
>
|
|
239
|
+
<FaRegListAlt />
|
|
240
|
+
</MenuLinkIcon>
|
|
241
|
+
<MenuLinkText>
|
|
242
|
+
<TextInfo
|
|
243
|
+
active={
|
|
244
|
+
window.location.pathname === '/profile/orders'
|
|
245
|
+
}
|
|
246
|
+
>
|
|
247
|
+
{t('ORDERS', 'Orders')}
|
|
248
|
+
</TextInfo>
|
|
249
|
+
</MenuLinkText>
|
|
250
|
+
<MenuLinkSeparator>
|
|
251
|
+
<div>
|
|
252
|
+
<hr />
|
|
253
|
+
</div>
|
|
254
|
+
</MenuLinkSeparator>
|
|
255
|
+
</WrappContent>
|
|
256
|
+
</MenuLink>
|
|
257
|
+
)
|
|
258
|
+
}
|
|
199
259
|
<MenuLink
|
|
200
260
|
onClick={() => handleGoToPage({ page: 'profile' })}
|
|
201
261
|
>
|
|
@@ -213,7 +273,7 @@ export const SidebarMenu = (props) => {
|
|
|
213
273
|
window.location.pathname === '/profile'
|
|
214
274
|
}
|
|
215
275
|
>
|
|
216
|
-
{t('
|
|
276
|
+
{t('VIEW_ACCOUNT', 'View account')}
|
|
217
277
|
</TextInfo>
|
|
218
278
|
</MenuLinkText>
|
|
219
279
|
<MenuLinkSeparator>
|
|
@@ -283,23 +343,23 @@ export const SidebarMenu = (props) => {
|
|
|
283
343
|
)}
|
|
284
344
|
|
|
285
345
|
<MenuLink
|
|
286
|
-
onClick={() => handleGoToPage({ page: '
|
|
346
|
+
onClick={() => handleGoToPage({ page: 'messages' })}
|
|
287
347
|
>
|
|
288
348
|
<WrappContent>
|
|
289
349
|
<MenuLinkIcon
|
|
290
350
|
active={
|
|
291
|
-
window.location.pathname === '/
|
|
351
|
+
window.location.pathname === '/messages'
|
|
292
352
|
}
|
|
293
353
|
>
|
|
294
|
-
<
|
|
354
|
+
<BiMessageDetail />
|
|
295
355
|
</MenuLinkIcon>
|
|
296
356
|
<MenuLinkText>
|
|
297
357
|
<TextInfo
|
|
298
358
|
active={
|
|
299
|
-
window.location.pathname === '/
|
|
359
|
+
window.location.pathname === '/messages'
|
|
300
360
|
}
|
|
301
361
|
>
|
|
302
|
-
{t('
|
|
362
|
+
{t('MESSAGES', 'Messages')}
|
|
303
363
|
</TextInfo>
|
|
304
364
|
</MenuLinkText>
|
|
305
365
|
<MenuLinkSeparator>
|
|
@@ -309,24 +369,25 @@ export const SidebarMenu = (props) => {
|
|
|
309
369
|
</MenuLinkSeparator>
|
|
310
370
|
</WrappContent>
|
|
311
371
|
</MenuLink>
|
|
372
|
+
|
|
312
373
|
<MenuLink
|
|
313
|
-
onClick={() => handleGoToPage({ page: '
|
|
374
|
+
onClick={() => handleGoToPage({ page: 'help' })}
|
|
314
375
|
>
|
|
315
376
|
<WrappContent>
|
|
316
377
|
<MenuLinkIcon
|
|
317
378
|
active={
|
|
318
|
-
window.location.pathname === '/
|
|
379
|
+
window.location.pathname === '/help'
|
|
319
380
|
}
|
|
320
381
|
>
|
|
321
|
-
<
|
|
382
|
+
<BiHelpCircle />
|
|
322
383
|
</MenuLinkIcon>
|
|
323
384
|
<MenuLinkText>
|
|
324
385
|
<TextInfo
|
|
325
386
|
active={
|
|
326
|
-
window.location.pathname === '/
|
|
387
|
+
window.location.pathname === '/help'
|
|
327
388
|
}
|
|
328
389
|
>
|
|
329
|
-
{t('
|
|
390
|
+
{t('HELP', 'help')}
|
|
330
391
|
</TextInfo>
|
|
331
392
|
</MenuLinkText>
|
|
332
393
|
<MenuLinkSeparator>
|
|
@@ -363,38 +424,33 @@ export const SidebarMenu = (props) => {
|
|
|
363
424
|
</MenuLinkSeparator>
|
|
364
425
|
</WrappContent>
|
|
365
426
|
</MenuLink>
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
427
|
+
<MenuLink
|
|
428
|
+
onClick={() => handleGoToPage({ page: 'favorite' })}
|
|
429
|
+
>
|
|
430
|
+
<WrappContent>
|
|
431
|
+
<MenuLinkIcon
|
|
432
|
+
active={
|
|
433
|
+
window.location.pathname === '/favorite'
|
|
434
|
+
}
|
|
370
435
|
>
|
|
371
|
-
<
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<div>
|
|
390
|
-
<hr />
|
|
391
|
-
</div>
|
|
392
|
-
</MenuLinkSeparator>
|
|
393
|
-
</WrappContent>
|
|
394
|
-
</MenuLink>
|
|
395
|
-
)
|
|
396
|
-
}
|
|
397
|
-
|
|
436
|
+
<Heart />
|
|
437
|
+
</MenuLinkIcon>
|
|
438
|
+
<MenuLinkText>
|
|
439
|
+
<TextInfo
|
|
440
|
+
active={
|
|
441
|
+
window.location.pathname === '/favorite'
|
|
442
|
+
}
|
|
443
|
+
>
|
|
444
|
+
{t('FAVORITES', 'Favorites')}
|
|
445
|
+
</TextInfo>
|
|
446
|
+
</MenuLinkText>
|
|
447
|
+
<MenuLinkSeparator>
|
|
448
|
+
<div>
|
|
449
|
+
<hr />
|
|
450
|
+
</div>
|
|
451
|
+
</MenuLinkSeparator>
|
|
452
|
+
</WrappContent>
|
|
453
|
+
</MenuLink>
|
|
398
454
|
<LogoutButton onCustomClick={() => actionSidebar(false)} />
|
|
399
455
|
</>
|
|
400
456
|
)}
|
|
@@ -188,7 +188,11 @@ export const QuantityContainer = styled.div`
|
|
|
188
188
|
height: 25px;
|
|
189
189
|
text-align: center;
|
|
190
190
|
border-radius: 50%;
|
|
191
|
-
transform: translate(-
|
|
191
|
+
transform: translate(-20px, 50%);
|
|
192
|
+
|
|
193
|
+
@media (min-width: 768px) {
|
|
194
|
+
transform: translate(-50%, 50%);
|
|
195
|
+
}
|
|
192
196
|
`
|
|
193
197
|
|
|
194
198
|
export const RibbonBox = styled.div`
|