ordering-ui-external 1.5.5 → 1.6.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.cb87b9b647114f245c57.js → 0.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{1.ordering-ui.cb87b9b647114f245c57.js → 1.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{2.ordering-ui.cb87b9b647114f245c57.js → 2.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{4.ordering-ui.cb87b9b647114f245c57.js → 4.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{5.ordering-ui.cb87b9b647114f245c57.js → 5.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{6.ordering-ui.cb87b9b647114f245c57.js → 6.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js → 7.ordering-ui.ff76ec87ed271a678f9d.js} +1 -1
- package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → 7.ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.cb87b9b647114f245c57.js → 8.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{9.ordering-ui.cb87b9b647114f245c57.js → 9.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
- package/_bundles/{ordering-ui.cb87b9b647114f245c57.js → ordering-ui.ff76ec87ed271a678f9d.js} +2 -2
- package/_bundles/{ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessTypeFilter/index.js +6 -3
- package/_modules/components/CancellationComponent/index.js +58 -0
- package/_modules/components/CancellationComponent/styles.js +43 -0
- package/_modules/components/Header/index.js +1 -1
- package/_modules/index.js +7 -0
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +1 -1
- package/_modules/themes/five/src/components/AddressForm/index.js +5 -5
- package/_modules/themes/five/src/components/AddressList/index.js +3 -1
- package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +4 -2
- package/_modules/themes/five/src/components/BusinessController/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessReviews/index.js +4 -4
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -5
- package/_modules/themes/five/src/components/HomeHero/index.js +5 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderActionsSection.js +38 -0
- package/_modules/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +27 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +64 -60
- package/_modules/themes/five/src/components/OrderDetails/styles.js +7 -5
- package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +4 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -3
- package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
- package/_modules/themes/five/src/components/SingleProductCard/index.js +4 -4
- package/_modules/themes/five/src/components/UserFormDetails/index.js +51 -26
- package/_modules/themes/five/src/components/UserFormDetails/styles.js +9 -3
- package/_modules/themes/five/src/components/UserVerification/index.js +7 -2
- package/index-template.js +7 -5
- package/package.json +2 -2
- package/src/components/BusinessTypeFilter/index.js +2 -2
- package/src/components/CancellationComponent/index.js +62 -0
- package/src/components/CancellationComponent/styles.js +162 -0
- package/src/components/Header/index.js +1 -1
- package/src/index.js +2 -0
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +1 -0
- package/src/themes/five/src/components/AddressForm/index.js +2 -2
- package/src/themes/five/src/components/AddressList/index.js +2 -1
- package/src/themes/five/src/components/AddressList/styles.js +4 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +3 -2
- package/src/themes/five/src/components/BusinessController/index.js +68 -44
- package/src/themes/five/src/components/BusinessReviews/index.js +4 -4
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +15 -11
- package/src/themes/five/src/components/HomeHero/index.js +4 -2
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +5 -1
- package/src/themes/five/src/components/OrderDetails/OrderActionsSection.js +33 -0
- package/src/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +20 -0
- package/src/themes/five/src/components/OrderDetails/index.js +84 -100
- package/src/themes/five/src/components/OrderDetails/styles.js +4 -1
- package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +4 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
- package/src/themes/five/src/components/OrdersOption/index.js +3 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -2
- package/src/themes/five/src/components/SignUpApproval/index.js +6 -7
- package/src/themes/five/src/components/SingleProductCard/index.js +3 -3
- package/src/themes/five/src/components/UserFormDetails/index.js +59 -23
- package/src/themes/five/src/components/UserFormDetails/styles.js +26 -0
- package/src/themes/five/src/components/UserVerification/index.js +18 -11
- package/template/app.js +385 -367
- package/template/components/SubdomainComponent/index.js +54 -0
- package/template/config.json +4 -1
|
@@ -77,8 +77,8 @@ const AddressFormUI = (props) => {
|
|
|
77
77
|
: formState.changes?.location ?? null
|
|
78
78
|
)
|
|
79
79
|
|
|
80
|
-
const isHideMap = orderingTheme?.theme?.
|
|
81
|
-
const isHideIcons = orderingTheme?.theme?.
|
|
80
|
+
const isHideMap = orderingTheme?.theme?.address?.components?.map?.hidden
|
|
81
|
+
const isHideIcons = orderingTheme?.theme?.address?.components?.icons?.hidden
|
|
82
82
|
|
|
83
83
|
const maxLimitLocation = configState?.configs?.meters_to_change_address?.value
|
|
84
84
|
const googleMapsApiKey = configState?.configs?.google_maps_api_key?.value
|
|
@@ -91,7 +91,7 @@ const AddressListUI = (props) => {
|
|
|
91
91
|
const showIcons = !orderingTheme?.theme?.profile?.components?.address_list?.components?.icons?.hidden
|
|
92
92
|
const showZipcode = !orderingTheme?.theme?.profile?.components?.address_list?.components?.zipcode?.hidden
|
|
93
93
|
const showInternalNumber = !orderingTheme?.theme?.profile?.components?.address_list?.components?.internal_number?.hidden
|
|
94
|
-
|
|
94
|
+
const notFoundImage = orderingTheme?.theme?.profile?.components?.address_list?.components?.image
|
|
95
95
|
const openAddress = (address) => {
|
|
96
96
|
setCurAddress(address)
|
|
97
97
|
setAddressOpen(true)
|
|
@@ -326,6 +326,7 @@ const AddressListUI = (props) => {
|
|
|
326
326
|
{!(addressList.loading || actionStatus.loading || orderState.loading) && addressList.error && (
|
|
327
327
|
addressList.error.length > 0 && (
|
|
328
328
|
<NotFoundSource
|
|
329
|
+
image={notFoundImage}
|
|
329
330
|
content={addressList.error[0]?.message || addressList.error[0]}
|
|
330
331
|
/>
|
|
331
332
|
)
|
|
@@ -4,7 +4,10 @@ import { darken } from 'polished'
|
|
|
4
4
|
export const AddressListContainer = styled.div`
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
padding:
|
|
7
|
+
padding: 0;
|
|
8
|
+
@media (min-width: 768px) {
|
|
9
|
+
padding: 0px 10px;
|
|
10
|
+
}
|
|
8
11
|
${({ isProfile }) => !isProfile && css`
|
|
9
12
|
width: 100%;
|
|
10
13
|
`}
|
|
@@ -84,7 +84,8 @@ export const BusinessBasicInformation = (props) => {
|
|
|
84
84
|
const showSort = !orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.sort?.hidden
|
|
85
85
|
const isInfoShrunken = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.layout?.position === 'shrunken'
|
|
86
86
|
const hideCity = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.city?.hidden
|
|
87
|
-
|
|
87
|
+
const layoutsWithOldSearch = ['starbucks', 'old']
|
|
88
|
+
const hideSearch = layoutsWithOldSearch.includes(orderingTheme?.theme?.business_view?.components?.product_search?.components?.layout?.type)
|
|
88
89
|
const getBusinessType = () => {
|
|
89
90
|
if (Object.keys(business).length <= 0) return t('GENERAL', 'General')
|
|
90
91
|
const _types = []
|
|
@@ -349,7 +350,7 @@ export const BusinessBasicInformation = (props) => {
|
|
|
349
350
|
</BusinessInfoItem>
|
|
350
351
|
</BusinessInfo>
|
|
351
352
|
</BusinessInfoContent>
|
|
352
|
-
{(categoryState?.products?.length !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !business?.professionals?.length && (
|
|
353
|
+
{!hideSearch && (categoryState?.products?.length !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !business?.professionals?.length && (
|
|
353
354
|
<SearchComponent />
|
|
354
355
|
)}
|
|
355
356
|
</BusinessInfoContainer>
|
|
@@ -62,7 +62,8 @@ const BusinessControllerUI = (props) => {
|
|
|
62
62
|
businessDeliveryTime,
|
|
63
63
|
businessPickupTime,
|
|
64
64
|
businessDistance,
|
|
65
|
-
handleFavoriteBusiness
|
|
65
|
+
handleFavoriteBusiness,
|
|
66
|
+
businessState
|
|
66
67
|
} = props
|
|
67
68
|
const [configState] = useConfig()
|
|
68
69
|
const theme = useTheme()
|
|
@@ -78,6 +79,13 @@ const BusinessControllerUI = (props) => {
|
|
|
78
79
|
const favoriteRef = useRef(null)
|
|
79
80
|
|
|
80
81
|
const businessRows = orderingTheme?.theme?.business_listing_view?.components?.layout?.rows
|
|
82
|
+
const hideBusinessLogo = theme?.business_listing_view?.components?.business?.components?.logo?.hidden
|
|
83
|
+
const hideBusinessFee = theme?.business_listing_view?.components?.business?.components?.fee?.hidden
|
|
84
|
+
const hideBusinessTime = theme?.business_listing_view?.components?.business?.components?.time?.hidden
|
|
85
|
+
const hideBusinessDistance = theme?.business_listing_view?.components?.business?.components?.distance?.hidden
|
|
86
|
+
const hideBusinessReviews = theme?.business_listing_view?.components?.business?.components?.reviews?.hidden
|
|
87
|
+
const hideBusinessFavorite = theme?.business_listing_view?.components?.business?.components?.favorite?.hidden
|
|
88
|
+
const hideBusinessOffer = theme?.business_listing_view?.components?.business?.components?.offer?.hidden
|
|
81
89
|
|
|
82
90
|
// const handleShowAlert = () => {
|
|
83
91
|
// setAlertState({ open: true, content: [t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The Business is closed at the moment')] })
|
|
@@ -92,7 +100,7 @@ const BusinessControllerUI = (props) => {
|
|
|
92
100
|
|
|
93
101
|
const handleChangeFavorite = () => {
|
|
94
102
|
if (auth) {
|
|
95
|
-
handleFavoriteBusiness && handleFavoriteBusiness(!business?.favorite)
|
|
103
|
+
handleFavoriteBusiness && handleFavoriteBusiness(!businessState?.business?.favorite)
|
|
96
104
|
} else {
|
|
97
105
|
setModalPageToShow('login')
|
|
98
106
|
setIsModalOpen(true)
|
|
@@ -157,13 +165,13 @@ const BusinessControllerUI = (props) => {
|
|
|
157
165
|
{isSkeleton ? (
|
|
158
166
|
<Skeleton height={isCustomerMode ? 100 : 140} />
|
|
159
167
|
) : (
|
|
160
|
-
<BusinessHeader bgimage={optimizeImage((businessHeader || business?.header || theme.images?.dummies?.
|
|
168
|
+
<BusinessHeader bgimage={optimizeImage((businessHeader || business?.header || theme.images?.dummies?.businessHeader), 'h_400,c_limit')} isClosed={!isBusinessOpen}>
|
|
161
169
|
<BusinessTags>
|
|
162
170
|
{(businessFeatured ?? business?.featured) &&
|
|
163
171
|
<span className='crown'>
|
|
164
172
|
<FaCrown />
|
|
165
173
|
</span>}
|
|
166
|
-
{!isCustomLayout && (configState?.configs?.preorder_status_enabled?.value === '1') && (
|
|
174
|
+
{!hideBusinessOffer && !isCustomLayout && (configState?.configs?.preorder_status_enabled?.value === '1') && (
|
|
167
175
|
<div>
|
|
168
176
|
{getBusinessOffer((businessOffers ?? business?.offers)) && <span>{getBusinessOffer((businessOffers ?? business?.offers)) || parsePrice(0)}</span>}
|
|
169
177
|
{!isBusinessOpen && <span>{t('PREORDER', 'PreOrder')}</span>}
|
|
@@ -179,33 +187,41 @@ const BusinessControllerUI = (props) => {
|
|
|
179
187
|
</BusinessHero>
|
|
180
188
|
<BusinessContent>
|
|
181
189
|
<BusinessLogoWrapper>
|
|
182
|
-
|
|
183
|
-
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<Skeleton height={70} width={70} />
|
|
187
|
-
)}
|
|
188
|
-
</WrapperBusinessLogo>
|
|
189
|
-
<BusinessStarInfo>
|
|
190
|
-
{!isSkeleton ? (
|
|
191
|
-
(businessReviews ?? business?.reviews?.total) > 0 && (
|
|
192
|
-
<div className='reviews'>
|
|
193
|
-
<BisStar />
|
|
194
|
-
<span>{(businessReviews ?? business?.reviews?.total)}</span>
|
|
195
|
-
</div>
|
|
196
|
-
)
|
|
197
|
-
) : (
|
|
198
|
-
<Skeleton width={50} />
|
|
199
|
-
)}
|
|
200
|
-
<FavoriteWrapper ref={favoriteRef} onClick={handleChangeFavorite}>
|
|
201
|
-
{!isSkeleton ? (
|
|
202
|
-
<>
|
|
203
|
-
{(business?.favorite) ? <Like /> : <DisLike />}
|
|
204
|
-
</>
|
|
190
|
+
{!hideBusinessLogo && (
|
|
191
|
+
<WrapperBusinessLogo isSkeleton={isSkeleton} isCustomerMode={isCustomerMode}>
|
|
192
|
+
{!isSkeleton && (businessLogo || business?.logo || theme.images?.dummies?.businessLogo) ? (
|
|
193
|
+
<BusinessLogo bgimage={optimizeImage((businessLogo || business?.logo || theme.images?.dummies?.businessLogo), 'h_200,c_limit')} />
|
|
205
194
|
) : (
|
|
206
|
-
<Skeleton
|
|
195
|
+
<Skeleton height={70} width={70} />
|
|
207
196
|
)}
|
|
208
|
-
</
|
|
197
|
+
</WrapperBusinessLogo>
|
|
198
|
+
)}
|
|
199
|
+
<BusinessStarInfo>
|
|
200
|
+
{!hideBusinessReviews && (
|
|
201
|
+
<>
|
|
202
|
+
{!isSkeleton ? (
|
|
203
|
+
(businessReviews ?? business?.reviews?.total) > 0 && (
|
|
204
|
+
<div className='reviews'>
|
|
205
|
+
<BisStar />
|
|
206
|
+
<span>{(businessReviews ?? business?.reviews?.total)}</span>
|
|
207
|
+
</div>
|
|
208
|
+
)
|
|
209
|
+
) : (
|
|
210
|
+
<Skeleton width={50} />
|
|
211
|
+
)}
|
|
212
|
+
</>
|
|
213
|
+
)}
|
|
214
|
+
{!hideBusinessFavorite && (
|
|
215
|
+
<FavoriteWrapper ref={favoriteRef} onClick={handleChangeFavorite}>
|
|
216
|
+
{!isSkeleton ? (
|
|
217
|
+
<>
|
|
218
|
+
{(businessState?.business?.favorite) ? <Like /> : <DisLike />}
|
|
219
|
+
</>
|
|
220
|
+
) : (
|
|
221
|
+
<Skeleton width={16} height={16} />
|
|
222
|
+
)}
|
|
223
|
+
</FavoriteWrapper>
|
|
224
|
+
)}
|
|
209
225
|
</BusinessStarInfo>
|
|
210
226
|
</BusinessLogoWrapper>
|
|
211
227
|
<BusinessInfo className='info'>
|
|
@@ -218,7 +234,7 @@ const BusinessControllerUI = (props) => {
|
|
|
218
234
|
)}
|
|
219
235
|
</div>
|
|
220
236
|
<Medadata isCustomerMode={isCustomerMode} isSkeleton={isSkeleton}>
|
|
221
|
-
{orderType === 1 && (
|
|
237
|
+
{!hideBusinessFee && orderType === 1 && (
|
|
222
238
|
<>
|
|
223
239
|
{(businessDeliveryPrice ?? business?.delivery_price) >= 0 ? (
|
|
224
240
|
<p>
|
|
@@ -230,21 +246,29 @@ const BusinessControllerUI = (props) => {
|
|
|
230
246
|
)}
|
|
231
247
|
</>
|
|
232
248
|
)}
|
|
233
|
-
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
249
|
+
{!hideBusinessTime && (
|
|
250
|
+
<>
|
|
251
|
+
{Object.keys(business).length > 0 ? (
|
|
252
|
+
<p className='bullet'>
|
|
253
|
+
<GoPrimitiveDot />
|
|
254
|
+
{convertHoursToMinutes(orderState?.options?.type === 1 ? (businessDeliveryTime ?? business?.delivery_time) : (businessPickupTime ?? business?.pickup_time)) || <Skeleton width={100} />}
|
|
255
|
+
</p>
|
|
256
|
+
) : (
|
|
257
|
+
<Skeleton width={65} />
|
|
258
|
+
)}
|
|
259
|
+
</>
|
|
240
260
|
)}
|
|
241
|
-
{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
261
|
+
{!hideBusinessDistance && (
|
|
262
|
+
<>
|
|
263
|
+
{(businessDistance ?? business?.distance) >= 0 ? (
|
|
264
|
+
<p className='bullet'>
|
|
265
|
+
<GoPrimitiveDot />
|
|
266
|
+
{parseDistance((businessDistance ?? business?.distance))}
|
|
267
|
+
</p>
|
|
268
|
+
) : (
|
|
269
|
+
<Skeleton width={65} />
|
|
270
|
+
)}
|
|
271
|
+
</>
|
|
248
272
|
)}
|
|
249
273
|
{isCustomerMode && hasInformationLength && (
|
|
250
274
|
<CallCenterInformation>
|
|
@@ -39,10 +39,10 @@ export const BusinessReviewsUI = (props) => {
|
|
|
39
39
|
if (raiting) handleClickOption(raiting)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
const showRanking = !orderingTheme?.theme?.business_view?.components?.
|
|
43
|
-
const showReviewDate = !orderingTheme?.theme?.business_view?.components?.
|
|
44
|
-
const showCustomerComments = !orderingTheme?.theme?.business_view?.components?.
|
|
45
|
-
const showSearch = !orderingTheme?.theme?.business_view?.components?.
|
|
42
|
+
const showRanking = !orderingTheme?.theme?.business_view?.components?.review?.components?.ranking?.hidden
|
|
43
|
+
const showReviewDate = !orderingTheme?.theme?.business_view?.components?.review?.components?.review_date?.hidden
|
|
44
|
+
const showCustomerComments = !orderingTheme?.theme?.business_view?.components?.review?.components?.customer_comments?.hidden
|
|
45
|
+
const showSearch = !orderingTheme?.theme?.business_view?.components?.review?.components?.search?.hidden
|
|
46
46
|
const hideElement = !(!showReviewDate && !showCustomerComments)
|
|
47
47
|
|
|
48
48
|
const reviewPoints = [1, 2, 3, 4, 5]
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -96,7 +96,9 @@ const BusinessesListingUI = (props) => {
|
|
|
96
96
|
const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
|
|
97
97
|
const [favoriteIds, setFavoriteIds] = useState([])
|
|
98
98
|
const hideCities = theme?.business_listing_view?.components?.cities?.hidden ?? true
|
|
99
|
-
|
|
99
|
+
const hideSearch = theme?.business_listing_view?.components?.search?.hidden
|
|
100
|
+
const hideFilter = theme?.business_listing_view?.components?.filter?.hidden
|
|
101
|
+
const hideSearchSection = hideCities && hideSearch && hideFilter
|
|
100
102
|
const businessesIds = isCustomLayout &&
|
|
101
103
|
businessesList.businesses &&
|
|
102
104
|
businessesList.businesses?.map(business => business.id)
|
|
@@ -314,23 +316,25 @@ const BusinessesListingUI = (props) => {
|
|
|
314
316
|
{isCustomerMode && (
|
|
315
317
|
<OrdersSection titleContent={t('PREVIOUS_ORDERS', 'Previous orders')} />
|
|
316
318
|
)}
|
|
317
|
-
{!isCustomerMode && (
|
|
319
|
+
{!isCustomerMode && !hideSearchSection && (
|
|
318
320
|
<>
|
|
319
321
|
<WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
{!hideSearch && (
|
|
323
|
+
<SearchBar
|
|
324
|
+
lazyLoad
|
|
325
|
+
search={searchValue}
|
|
326
|
+
isCustomLayout={isCustomLayout}
|
|
327
|
+
placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
|
|
328
|
+
onSearch={handleChangeSearch}
|
|
329
|
+
handleCustomEnter={() => onRedirectPage({ page: 'business_search' })}
|
|
330
|
+
/>
|
|
331
|
+
)}
|
|
328
332
|
{!hideCities && citiesState?.cities?.length > 0 && (
|
|
329
333
|
<Button color='primary' onClick={handleOpenCities}>
|
|
330
334
|
{citiesState?.cities?.find(city => city?.id === orderState?.options?.city_id)?.name || t('SELECT_A_CITY', 'Select a city')}
|
|
331
335
|
</Button>
|
|
332
336
|
)}
|
|
333
|
-
{configs?.advanced_business_search_enabled?.value === '1' && (
|
|
337
|
+
{!hideFilter && configs?.advanced_business_search_enabled?.value === '1' && (
|
|
334
338
|
<FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
|
|
335
339
|
)}
|
|
336
340
|
{isCustomLayout && (
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useTheme } from 'styled-components'
|
|
2
3
|
import { OriginalHomeHero } from './layouts/OriginalHomeHero'
|
|
3
4
|
import { RedHomeHero } from './layouts/RedHomeHero'
|
|
4
5
|
import { StarbucksHomeHero } from './layouts/StarbucksHomeHero'
|
|
5
6
|
|
|
6
7
|
export const HomeHero = (props) => {
|
|
8
|
+
const theme = useTheme()
|
|
7
9
|
const HomeLayoutConfig = {
|
|
8
10
|
homepage_settings: {
|
|
9
|
-
layout: 'original', // 'original', 'starbucks', 'red'
|
|
10
|
-
contentPosition: 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
11
|
+
layout: theme?.homepage_view?.components?.layout?.type || 'original', // 'original', 'starbucks', 'red'
|
|
12
|
+
contentPosition: theme?.homepage_view?.components?.layout?.position || 'left' // 'left', 'right', top, 'bottom', 'center'
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
const layout = HomeLayoutConfig?.homepage_settings?.layout !== undefined
|
|
@@ -178,7 +178,11 @@ export const SingleOrderHeader = styled.div`
|
|
|
178
178
|
> div {
|
|
179
179
|
> div {
|
|
180
180
|
display: flex;
|
|
181
|
-
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
align-items: center;
|
|
183
|
+
@media (min-width: 769px) {
|
|
184
|
+
flex-direction: row;
|
|
185
|
+
}
|
|
182
186
|
p {
|
|
183
187
|
line-height: 24px;
|
|
184
188
|
font-size: 14px;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useLanguage } from 'ordering-components-external'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
4
|
+
import { Button } from '../../styles/Buttons'
|
|
5
|
+
import { MyOrderActions } from './styles'
|
|
6
|
+
|
|
7
|
+
export const OrderActionsSection = (props) => {
|
|
8
|
+
const {
|
|
9
|
+
userCustomerId,
|
|
10
|
+
isService,
|
|
11
|
+
handleGoToPage
|
|
12
|
+
} = props
|
|
13
|
+
const [, t] = useLanguage()
|
|
14
|
+
const theme = useTheme()
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
{!userCustomerId && (
|
|
19
|
+
<MyOrderActions>
|
|
20
|
+
<Button
|
|
21
|
+
color='primary'
|
|
22
|
+
outline
|
|
23
|
+
onClick={() => handleGoToPage({ page: 'orders' })}
|
|
24
|
+
>
|
|
25
|
+
{isService
|
|
26
|
+
? t('YOUR_APPOINTMENTS', 'Your appointments')
|
|
27
|
+
: t('YOUR_ORDERS', theme?.defaultLanguages?.YOUR_ORDERS || 'Your Orders')}
|
|
28
|
+
</Button>
|
|
29
|
+
</MyOrderActions>
|
|
30
|
+
)}
|
|
31
|
+
</>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useLanguage } from 'ordering-components-external'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
4
|
+
import { HeaderInfo } from './styles'
|
|
5
|
+
|
|
6
|
+
export const OrderHeaderInfoSection = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
isService
|
|
9
|
+
} = props
|
|
10
|
+
|
|
11
|
+
const [, t] = useLanguage()
|
|
12
|
+
const theme = useTheme()
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<HeaderInfo>
|
|
16
|
+
<h1>{isService ? t('SERVICES', 'Services') : t('ORDER_MESSAGE_RECEIVED', theme?.defaultLanguages?.ORDER_MESSAGE_RECEIVED || 'Your order has been received')}</h1>
|
|
17
|
+
<p>{!isService && t('ORDER_MESSAGE_HEADER_TEXT', theme?.defaultLanguages?.ORDER_MESSAGE_HEADER_TEXT || 'Once business accepts your order, we will send you an email, thank you!')}</p>
|
|
18
|
+
</HeaderInfo>
|
|
19
|
+
)
|
|
20
|
+
}
|