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.
Files changed (73) hide show
  1. package/_bundles/{0.ordering-ui.cb87b9b647114f245c57.js → 0.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  2. package/_bundles/{1.ordering-ui.cb87b9b647114f245c57.js → 1.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  3. package/_bundles/{2.ordering-ui.cb87b9b647114f245c57.js → 2.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  4. package/_bundles/{4.ordering-ui.cb87b9b647114f245c57.js → 4.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  5. package/_bundles/{5.ordering-ui.cb87b9b647114f245c57.js → 5.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  6. package/_bundles/{6.ordering-ui.cb87b9b647114f245c57.js → 6.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  7. package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js → 7.ordering-ui.ff76ec87ed271a678f9d.js} +1 -1
  8. package/_bundles/{7.ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → 7.ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.cb87b9b647114f245c57.js → 8.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  10. package/_bundles/{9.ordering-ui.cb87b9b647114f245c57.js → 9.ordering-ui.ff76ec87ed271a678f9d.js} +0 -0
  11. package/_bundles/{ordering-ui.cb87b9b647114f245c57.js → ordering-ui.ff76ec87ed271a678f9d.js} +2 -2
  12. package/_bundles/{ordering-ui.cb87b9b647114f245c57.js.LICENSE.txt → ordering-ui.ff76ec87ed271a678f9d.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessTypeFilter/index.js +6 -3
  14. package/_modules/components/CancellationComponent/index.js +58 -0
  15. package/_modules/components/CancellationComponent/styles.js +43 -0
  16. package/_modules/components/Header/index.js +1 -1
  17. package/_modules/index.js +7 -0
  18. package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +1 -1
  19. package/_modules/themes/five/src/components/AddressForm/index.js +5 -5
  20. package/_modules/themes/five/src/components/AddressList/index.js +3 -1
  21. package/_modules/themes/five/src/components/AddressList/styles.js +1 -1
  22. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +4 -2
  23. package/_modules/themes/five/src/components/BusinessController/index.js +22 -13
  24. package/_modules/themes/five/src/components/BusinessReviews/index.js +4 -4
  25. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +8 -5
  26. package/_modules/themes/five/src/components/HomeHero/index.js +5 -3
  27. package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +1 -1
  28. package/_modules/themes/five/src/components/OrderDetails/OrderActionsSection.js +38 -0
  29. package/_modules/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +27 -0
  30. package/_modules/themes/five/src/components/OrderDetails/index.js +64 -60
  31. package/_modules/themes/five/src/components/OrderDetails/styles.js +7 -5
  32. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -2
  33. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
  34. package/_modules/themes/five/src/components/OrdersOption/index.js +4 -2
  35. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -3
  36. package/_modules/themes/five/src/components/SignUpApproval/index.js +6 -6
  37. package/_modules/themes/five/src/components/SingleProductCard/index.js +4 -4
  38. package/_modules/themes/five/src/components/UserFormDetails/index.js +51 -26
  39. package/_modules/themes/five/src/components/UserFormDetails/styles.js +9 -3
  40. package/_modules/themes/five/src/components/UserVerification/index.js +7 -2
  41. package/index-template.js +7 -5
  42. package/package.json +2 -2
  43. package/src/components/BusinessTypeFilter/index.js +2 -2
  44. package/src/components/CancellationComponent/index.js +62 -0
  45. package/src/components/CancellationComponent/styles.js +162 -0
  46. package/src/components/Header/index.js +1 -1
  47. package/src/index.js +2 -0
  48. package/src/themes/callcenterOriginal/src/components/Header/styles.js +1 -0
  49. package/src/themes/five/src/components/AddressForm/index.js +2 -2
  50. package/src/themes/five/src/components/AddressList/index.js +2 -1
  51. package/src/themes/five/src/components/AddressList/styles.js +4 -1
  52. package/src/themes/five/src/components/BusinessBasicInformation/index.js +3 -2
  53. package/src/themes/five/src/components/BusinessController/index.js +68 -44
  54. package/src/themes/five/src/components/BusinessReviews/index.js +4 -4
  55. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +15 -11
  56. package/src/themes/five/src/components/HomeHero/index.js +4 -2
  57. package/src/themes/five/src/components/MultiOrdersDetails/styles.js +5 -1
  58. package/src/themes/five/src/components/OrderDetails/OrderActionsSection.js +33 -0
  59. package/src/themes/five/src/components/OrderDetails/OrderHeaderInfoSection.js +20 -0
  60. package/src/themes/five/src/components/OrderDetails/index.js +84 -100
  61. package/src/themes/five/src/components/OrderDetails/styles.js +4 -1
  62. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +4 -2
  63. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +2 -2
  64. package/src/themes/five/src/components/OrdersOption/index.js +3 -1
  65. package/src/themes/five/src/components/ProductItemAccordion/index.js +4 -2
  66. package/src/themes/five/src/components/SignUpApproval/index.js +6 -7
  67. package/src/themes/five/src/components/SingleProductCard/index.js +3 -3
  68. package/src/themes/five/src/components/UserFormDetails/index.js +59 -23
  69. package/src/themes/five/src/components/UserFormDetails/styles.js +26 -0
  70. package/src/themes/five/src/components/UserVerification/index.js +18 -11
  71. package/template/app.js +385 -367
  72. package/template/components/SubdomainComponent/index.js +54 -0
  73. package/template/config.json +4 -1
@@ -306,6 +306,7 @@ export const FarAwayMessage = styled.div`
306
306
  border-radius: 7.6px;
307
307
  padding: 6px 15px;
308
308
  box-sizing: border-box;
309
+ z-index: 2000;
309
310
  margin: 10px 0px 0px 0px !important;
310
311
 
311
312
  left: 5px;
@@ -77,8 +77,8 @@ const AddressFormUI = (props) => {
77
77
  : formState.changes?.location ?? null
78
78
  )
79
79
 
80
- const isHideMap = orderingTheme?.theme?.header?.components?.address_form?.components?.map?.hidden
81
- const isHideIcons = orderingTheme?.theme?.header?.components?.address_form?.components?.icons?.hidden
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: 0px 10px;
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?.businessLogo), 'h_400,c_limit')} isClosed={!isBusinessOpen}>
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
- <WrapperBusinessLogo isSkeleton={isSkeleton} isCustomerMode={isCustomerMode}>
183
- {!isSkeleton && (businessLogo || business?.logo || theme.images?.dummies?.businessLogo) ? (
184
- <BusinessLogo bgimage={optimizeImage((businessLogo || business?.logo || theme.images?.dummies?.businessLogo), 'h_200,c_limit')} />
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 width={16} height={16} />
195
+ <Skeleton height={70} width={70} />
207
196
  )}
208
- </FavoriteWrapper>
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
- {Object.keys(business).length > 0 ? (
234
- <p className='bullet'>
235
- <GoPrimitiveDot />
236
- {convertHoursToMinutes(orderState?.options?.type === 1 ? (businessDeliveryTime ?? business?.delivery_time) : (businessPickupTime ?? business?.pickup_time)) || <Skeleton width={100} />}
237
- </p>
238
- ) : (
239
- <Skeleton width={65} />
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
- {(businessDistance ?? business?.distance) >= 0 ? (
242
- <p className='bullet'>
243
- <GoPrimitiveDot />
244
- {parseDistance((businessDistance ?? business?.distance))}
245
- </p>
246
- ) : (
247
- <Skeleton width={65} />
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?.reviews?.components?.ranking?.hidden
43
- const showReviewDate = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.review_date?.hidden
44
- const showCustomerComments = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.customer_comments?.hidden
45
- const showSearch = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.search?.hidden
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]
@@ -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
- <SearchBar
321
- lazyLoad
322
- search={searchValue}
323
- isCustomLayout={isCustomLayout}
324
- placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
325
- onSearch={handleChangeSearch}
326
- handleCustomEnter={() => onRedirectPage({ page: 'business_search' })}
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
- align-items: center;
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
+ }