ordering-ui-external 1.6.8 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/_bundles/{0.ordering-ui.7635bd47ae9a481b3f59.js → 0.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  2. package/_bundles/{1.ordering-ui.7635bd47ae9a481b3f59.js → 1.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  3. package/_bundles/{2.ordering-ui.7635bd47ae9a481b3f59.js → 2.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  4. package/_bundles/{4.ordering-ui.7635bd47ae9a481b3f59.js → 4.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  5. package/_bundles/{5.ordering-ui.7635bd47ae9a481b3f59.js → 5.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  6. package/_bundles/{6.ordering-ui.7635bd47ae9a481b3f59.js → 6.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  7. package/_bundles/{7.ordering-ui.7635bd47ae9a481b3f59.js → 7.ordering-ui.8b7044a2b34939a44465.js} +1 -1
  8. package/_bundles/{7.ordering-ui.7635bd47ae9a481b3f59.js.LICENSE.txt → 7.ordering-ui.8b7044a2b34939a44465.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.7635bd47ae9a481b3f59.js → 8.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  10. package/_bundles/{9.ordering-ui.7635bd47ae9a481b3f59.js → 9.ordering-ui.8b7044a2b34939a44465.js} +0 -0
  11. package/_bundles/ordering-ui.8b7044a2b34939a44465.js +2 -0
  12. package/_bundles/{ordering-ui.7635bd47ae9a481b3f59.js.LICENSE.txt → ordering-ui.8b7044a2b34939a44465.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessInformation/index.js +8 -10
  14. package/_modules/components/LoginForm/index.js +58 -17
  15. package/_modules/components/SignUpForm/index.js +61 -20
  16. package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +71 -25
  17. package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +60 -19
  18. package/_modules/themes/eight/src/components/LoginForm/index.js +63 -20
  19. package/_modules/themes/eight/src/components/SignUpForm/index.js +63 -22
  20. package/_modules/themes/five/src/components/BusinessController/index.js +2 -2
  21. package/_modules/themes/five/src/components/BusinessPreorder/index.js +6 -45
  22. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
  23. package/_modules/themes/five/src/components/Checkout/index.js +19 -3
  24. package/_modules/themes/five/src/components/Checkout/styles.js +5 -3
  25. package/_modules/themes/five/src/components/Footer/styles.js +1 -1
  26. package/_modules/themes/five/src/components/Header/index.js +3 -3
  27. package/_modules/themes/five/src/components/Header/styles.js +1 -1
  28. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  29. package/_modules/themes/five/src/components/MomentControl/index.js +1 -41
  30. package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +2 -2
  31. package/_modules/themes/five/src/components/OrderDetails/index.js +14 -16
  32. package/_modules/themes/five/src/components/OrderDetails/styles.js +7 -3
  33. package/_modules/themes/five/src/components/PaymentOptions/index.js +3 -6
  34. package/_modules/themes/five/src/components/PlaceSpot/styles.js +2 -2
  35. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +7 -4
  36. package/_modules/themes/five/src/components/ProductOption/index.js +1 -1
  37. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +1 -1
  38. package/_modules/themes/five/src/components/ProfessionalProfile/index.js +1 -1
  39. package/_modules/themes/five/src/components/ServiceForm/index.js +136 -24
  40. package/_modules/themes/five/src/components/ServiceForm/styles.js +45 -3
  41. package/_modules/themes/four/src/components/LoginForm/index.js +64 -20
  42. package/_modules/themes/four/src/components/LoginForm/styles.js +5 -3
  43. package/_modules/themes/four/src/components/SignUpForm/index.js +67 -22
  44. package/_modules/themes/four/src/components/SignUpForm/styles.js +5 -3
  45. package/_modules/themes/franchise/src/components/LoginForm/index.js +61 -20
  46. package/_modules/themes/franchise/src/components/SignUpForm/index.js +57 -16
  47. package/_modules/themes/seven/src/components/LoginForm/index.js +60 -17
  48. package/_modules/themes/seven/src/components/SignUpForm/index.js +60 -19
  49. package/_modules/themes/six/src/components/LoginForm/index.js +62 -20
  50. package/_modules/themes/six/src/components/SignUpForm/index.js +58 -17
  51. package/_modules/themes/three/src/components/LoginForm/index.js +64 -20
  52. package/_modules/themes/three/src/components/LoginForm/styles.js +5 -3
  53. package/_modules/themes/three/src/components/SignUpForm/index.js +63 -18
  54. package/_modules/themes/three/src/components/SignUpForm/styles.js +5 -3
  55. package/_modules/themes/two/src/components/LoginForm/index.js +57 -17
  56. package/_modules/themes/two/src/components/SignUpForm/index.js +57 -17
  57. package/_modules/utils/index.js +56 -2
  58. package/package.json +2 -2
  59. package/src/components/BusinessInformation/index.js +8 -6
  60. package/src/components/LoginForm/index.js +32 -6
  61. package/src/components/SignUpForm/index.js +27 -2
  62. package/src/themes/callcenterOriginal/src/components/LoginForm/index.js +30 -2
  63. package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +27 -1
  64. package/src/themes/eight/src/components/LoginForm/index.js +30 -0
  65. package/src/themes/eight/src/components/SignUpForm/index.js +27 -1
  66. package/src/themes/five/src/components/BusinessController/index.js +2 -2
  67. package/src/themes/five/src/components/BusinessPreorder/index.js +6 -46
  68. package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
  69. package/src/themes/five/src/components/Checkout/index.js +28 -3
  70. package/src/themes/five/src/components/Checkout/styles.js +30 -0
  71. package/src/themes/five/src/components/Footer/styles.js +1 -5
  72. package/src/themes/five/src/components/Header/index.js +7 -6
  73. package/src/themes/five/src/components/Header/styles.js +1 -3
  74. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
  75. package/src/themes/five/src/components/MomentControl/index.js +1 -42
  76. package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  77. package/src/themes/five/src/components/OrderDetails/index.js +10 -8
  78. package/src/themes/five/src/components/OrderDetails/styles.js +21 -1
  79. package/src/themes/five/src/components/PaymentOptions/index.js +25 -26
  80. package/src/themes/five/src/components/PlaceSpot/styles.js +14 -4
  81. package/src/themes/five/src/components/ProductItemAccordion/index.js +7 -3
  82. package/src/themes/five/src/components/ProductOption/index.js +1 -1
  83. package/src/themes/five/src/components/ProductOptionSubOption/index.js +1 -1
  84. package/src/themes/five/src/components/ProfessionalProfile/index.js +1 -1
  85. package/src/themes/five/src/components/ServiceForm/index.js +151 -11
  86. package/src/themes/five/src/components/ServiceForm/styles.js +148 -0
  87. package/src/themes/four/src/components/LoginForm/index.js +37 -5
  88. package/src/themes/four/src/components/LoginForm/styles.js +4 -0
  89. package/src/themes/four/src/components/SignUpForm/index.js +39 -5
  90. package/src/themes/four/src/components/SignUpForm/styles.js +4 -0
  91. package/src/themes/franchise/src/components/LoginForm/index.js +26 -1
  92. package/src/themes/franchise/src/components/SignUpForm/index.js +27 -1
  93. package/src/themes/seven/src/components/LoginForm/index.js +31 -0
  94. package/src/themes/seven/src/components/SignUpForm/index.js +27 -1
  95. package/src/themes/six/src/components/LoginForm/index.js +28 -1
  96. package/src/themes/six/src/components/SignUpForm/index.js +27 -1
  97. package/src/themes/three/src/components/LoginForm/index.js +38 -6
  98. package/src/themes/three/src/components/LoginForm/styles.js +4 -0
  99. package/src/themes/three/src/components/SignUpForm/index.js +40 -4
  100. package/src/themes/three/src/components/SignUpForm/styles.js +4 -0
  101. package/src/themes/two/src/components/LoginForm/index.js +25 -1
  102. package/src/themes/two/src/components/SignUpForm/index.js +28 -3
  103. package/src/utils/index.js +53 -0
  104. package/template/app.js +15 -3
  105. package/template/config.json +1 -0
  106. package/template/pages/BusinessProductsList/index.js +2 -2
  107. package/_bundles/ordering-ui.7635bd47ae9a481b3f59.js +0 -2
@@ -43,6 +43,7 @@ import SwiperCore, {
43
43
  } from 'swiper'
44
44
  import 'swiper/swiper-bundle.min.css'
45
45
  import 'swiper/swiper.min.css'
46
+ import { getTimes } from '../../../../../utils'
46
47
 
47
48
  SwiperCore.use([Navigation])
48
49
 
@@ -92,58 +93,17 @@ const BusinessPreorderUI = (props) => {
92
93
  setIsEnabled(menu.schedule[day].enabled || false)
93
94
  }
94
95
 
95
- const getTimes = (curdate, menu) => {
96
+ const getTimeList = (curdate, menu) => {
96
97
  validateSelectedDate(curdate, menu)
97
- const date = new Date()
98
98
  const dateParts = curdate.split('-')
99
99
  const dateSeleted = new Date(dateParts[0], dateParts[1] - 1, dateParts[2])
100
- var times = []
101
- for (var k = 0; k < menu.schedule[dateSeleted.getDay()].lapses.length; k++) {
102
- var open = {
103
- hour: menu.schedule[dateSeleted.getDay()].lapses[k].open.hour,
104
- minute: menu.schedule[dateSeleted.getDay()].lapses[k].open.minute
105
- }
106
- var close = {
107
- hour: menu.schedule[dateSeleted.getDay()].lapses[k].close.hour,
108
- minute: menu.schedule[dateSeleted.getDay()].lapses[k].close.minute
109
- }
110
- for (var i = open.hour; i <= close.hour; i++) {
111
- if (date.getDate() !== dateSeleted.getDate() || i >= date.getHours()) {
112
- let hour = ''
113
- let meridian = ''
114
- if (!is12Hours) hour = i < 10 ? '0' + i : i
115
- else {
116
- if (i === 0) {
117
- hour = '12'
118
- meridian = ' ' + t('AM', 'AM')
119
- } else if (i > 0 && i < 12) {
120
- hour = (i < 10 ? '0' + i : i)
121
- meridian = ' ' + t('AM', 'AM')
122
- } else if (i === 12) {
123
- hour = '12'
124
- meridian = ' ' + t('PM', 'PM')
125
- } else {
126
- hour = ((i - 12 < 10) ? '0' + (i - 12) : (i - 12))
127
- meridian = ' ' + t('PM', 'PM')
128
- }
129
- }
130
- for (let j = (i === open.hour ? open.minute : 0); j <= (i === close.hour ? close.minute : 59); j += 15) {
131
- if (i !== date.getHours() || j >= date.getMinutes() || date.getDate() !== dateSeleted.getDate()) {
132
- times.push({
133
- text: hour + ':' + (j < 10 ? '0' + j : j) + meridian,
134
- value: (i < 10 ? '0' + i : i) + ':' + (j < 10 ? '0' + j : j)
135
- })
136
- }
137
- }
138
- }
139
- }
140
- }
100
+ const times = getTimes(dateSeleted, menu?.schedule, is12Hours)
141
101
  return times
142
102
  }
143
103
 
144
104
  useEffect(() => {
145
105
  const selectedMenu = menu ? (menu?.use_business_schedule ? business : menu) : business
146
- const _times = getTimes(dateSelected, selectedMenu)
106
+ const _times = getTimeList(dateSelected, selectedMenu)
147
107
  setTimeList(_times)
148
108
  }, [dateSelected, menu, business])
149
109
 
@@ -219,13 +179,13 @@ const BusinessPreorderUI = (props) => {
219
179
  preventClicksPropagation={false}
220
180
  >
221
181
  {
222
- datesList.slice(0, Number(maxDays || configs?.max_days_preorder?.value || 6, 10)).map(date => {
182
+ datesList.slice(0, Number(maxDays || configs?.max_days_preorder?.value || 6, 10)).map((date, i) => {
223
183
  const dateParts = date.split('-')
224
184
  const _date = new Date(dateParts[0], dateParts[1] - 1, dateParts[2])
225
185
  const dayName = t('DAY' + (_date.getDay() >= 1 ? _date.getDay() : 7)).substring(0, 2)
226
186
  const dayNumber = (_date.getDate() < 10 ? '0' : '') + _date.getDate()
227
187
  return (
228
- <SwiperSlide key={dayNumber}>
188
+ <SwiperSlide key={i}>
229
189
  <Day selected={dateSelected === date} onClick={() => handleChangeDate(date)}>
230
190
  <DayName>{dayName}</DayName>
231
191
  <DayNumber>{dayNumber}</DayNumber>
@@ -225,7 +225,7 @@ const BusinessProductsListingUI = (props) => {
225
225
  return () => {
226
226
  events.off('change_view', handleChangePage)
227
227
  }
228
- }, [openProduct])
228
+ }, [])
229
229
 
230
230
  useEffect(() => {
231
231
  window.addEventListener('scroll', handleScroll)
@@ -15,6 +15,7 @@ import {
15
15
  useCustomer,
16
16
  useEvent
17
17
  } from 'ordering-components-external'
18
+ import { useWindowSize } from '../../../../../hooks/useWindowSize'
18
19
  import { UpsellingPage } from '../UpsellingPage'
19
20
  import parsePhoneNumber from 'libphonenumber-js'
20
21
  import { useHistory } from 'react-router-dom'
@@ -41,7 +42,8 @@ import {
41
42
  WalletPaymentOptionContainer,
42
43
  CartHeader,
43
44
  SelectSpotContainer,
44
- WrapperActionsInput
45
+ WrapperActionsInput,
46
+ MobileWrapperPlaceOrderButton
45
47
  } from './styles'
46
48
 
47
49
  import { Button } from '../../styles/Buttons'
@@ -101,6 +103,7 @@ const CheckoutUI = (props) => {
101
103
  const [customerState] = useCustomer()
102
104
  const [events] = useEvent()
103
105
  const history = useHistory()
106
+ const windowSize = useWindowSize()
104
107
 
105
108
  const [errorCash, setErrorCash] = useState(false)
106
109
  const [userErrors, setUserErrors] = useState([])
@@ -214,6 +217,12 @@ const CheckoutUI = (props) => {
214
217
  setUserErrors(errors)
215
218
  }
216
219
 
220
+ const handleScrollTo = () => {
221
+ if (!((!paymethodSelected && cart?.balance > 0) && cart?.status !== 2)) return
222
+ const scrollElement = document.querySelector('.paymentsContainer')
223
+ window.scrollTo(0, scrollElement.offsetTop - 20);
224
+ }
225
+
217
226
  useEffect(() => {
218
227
  if (validationFields && validationFields?.fields?.checkout) {
219
228
  checkValidationFields()
@@ -375,7 +384,7 @@ const CheckoutUI = (props) => {
375
384
  )}
376
385
 
377
386
  {!cartState.loading && cart && (
378
- <PaymentMethodContainer>
387
+ <PaymentMethodContainer className='paymentsContainer'>
379
388
  <h1>{t('PAYMENT_METHODS', 'Payment Methods')}</h1>
380
389
  {!cartState.loading && cart?.status === 4 && (
381
390
  <WarningMessage style={{ marginTop: 20 }}>
@@ -474,7 +483,7 @@ const CheckoutUI = (props) => {
474
483
  </CartContainer>
475
484
  )}
476
485
 
477
- {!cartState.loading && cart && cart?.status !== 2 && (
486
+ {windowSize.width >= 576 && !cartState.loading && cart && cart?.status !== 2 && (
478
487
  <WrapperPlaceOrderButton>
479
488
  <Button
480
489
  color={(!cart?.valid_maximum || (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100))) ? 'secundary' : 'primary'}
@@ -523,6 +532,22 @@ const CheckoutUI = (props) => {
523
532
  </WarningText>
524
533
  )}
525
534
  </WrapperRightContainer>
535
+ {windowSize.width < 576 && !cartState.loading && cart && cart?.status !== 2 && (
536
+ <MobileWrapperPlaceOrderButton>
537
+ <span>{parsePrice(cart?.total)}</span>
538
+ <Button
539
+ color={(!cart?.valid_maximum || (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100))) ? 'secundary' : 'primary'}
540
+ // disabled={isDisablePlaceOrderButton}
541
+ onClick={() => isDisablePlaceOrderButton ? handleScrollTo('.paymentsContainer') : handlePlaceOrder()}
542
+ >
543
+ {!cart?.valid_maximum ? (
544
+ `${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
545
+ ) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
546
+ `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
547
+ ) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order')}
548
+ </Button>
549
+ </MobileWrapperPlaceOrderButton>
550
+ )}
526
551
  <Alert
527
552
  title={t('CUSTOMER_DETAILS', 'Customer Details')}
528
553
  content={alertState.content}
@@ -289,3 +289,33 @@ export const WrapperActionsInput = styled.div`
289
289
  font-size: 20px;
290
290
  }
291
291
  `
292
+
293
+ export const MobileWrapperPlaceOrderButton = styled.div`
294
+ position: fixed;
295
+ width: 100vw;
296
+ left: 0;
297
+ bottom: 0;
298
+ background-color: white;
299
+ padding: 15px 25px;
300
+ display: flex;
301
+ align-items: center;
302
+ justify-content: space-between;
303
+ box-sizing: border-box;
304
+ z-index: 1006;
305
+ box-shadow: 0px 4px 10px rgb(0 0 0 / 12%);
306
+
307
+ span {
308
+ font-weight: 600;
309
+ font-size: 16px;
310
+
311
+ @media (min-width: 1200px) {
312
+ font-size: 18px;
313
+ padding-left: 20px;
314
+ }
315
+ }
316
+
317
+ button {
318
+ min-height: 44px;
319
+ border-radius: 7.6px;
320
+ }
321
+ `
@@ -1,11 +1,7 @@
1
1
  import styled, { css } from 'styled-components'
2
2
 
3
3
  export const Container = styled.div`
4
- display: none;
5
-
6
- @media (min-width: 768px) {
7
- display: block;
8
- }
4
+ position: relative;
9
5
  `
10
6
 
11
7
  export const FooterWrapper = styled.div`
@@ -4,7 +4,7 @@ import { useLocation } from 'react-router-dom'
4
4
  import { useSession, useLanguage, useOrder, useEvent, useConfig, useCustomer, useUtils, useOrderingTheme } from 'ordering-components-external'
5
5
  import { useTheme } from 'styled-components'
6
6
  import AiOutlineClose from '@meronex/icons/ai/AiOutlineClose'
7
- import { LanguageSelector } from '../LanguageSelector'
7
+ import { LanguageSelector } from '../../../../../components/LanguageSelector'
8
8
 
9
9
  import { GeoAlt } from 'react-bootstrap-icons'
10
10
  import TiWarningOutline from '@meronex/icons/ti/TiWarningOutline'
@@ -25,7 +25,8 @@ import {
25
25
  MomentMenu,
26
26
  FarAwayMessage,
27
27
  Divider,
28
- AddressFormWrapper
28
+ AddressFormWrapper,
29
+ LanguageSelectorWrapper
29
30
  } from './styles'
30
31
  import { useWindowSize } from '../../../../../hooks/useWindowSize'
31
32
  import { useOnlineStatus } from '../../../../../hooks/useOnlineStatus'
@@ -350,9 +351,6 @@ export const Header = (props) => {
350
351
  />
351
352
  )
352
353
  )}
353
- {isCustomerMode && (
354
- <LanguageSelector />
355
- )}
356
354
  {windowSize.width > 768 && (
357
355
  <UserPopover
358
356
  withLogout
@@ -365,6 +363,9 @@ export const Header = (props) => {
365
363
  </>
366
364
  )
367
365
  }
366
+ <LanguageSelectorWrapper>
367
+ <LanguageSelector />
368
+ </LanguageSelectorWrapper>
368
369
  </Menu>
369
370
  </RightHeader>
370
371
  )}
@@ -423,7 +424,7 @@ export const Header = (props) => {
423
424
  title={(!auth && modalSelected === 'address') && t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
424
425
  open={modalIsOpen}
425
426
  onClose={() => setModalIsOpen(false)}
426
- width={modalSelected === 'address' ? orderState?.options?.user_id ? '70%' : '50%' : '700px'}
427
+ width={modalSelected === 'address' ? orderState?.options?.user_id ? '70%' : '50%' : '700px'}
427
428
  >
428
429
  {modalSelected === 'cart' && (
429
430
  <CartContent
@@ -111,10 +111,8 @@ export const Menu = styled.div`
111
111
  }
112
112
 
113
113
  ${({ isCustomerMode }) => !isCustomerMode && css`
114
- margin: 0px 10px;
114
+ margin: 0px 5px;
115
115
  height: 40px;
116
- border-color: #CCC;
117
- background-color: #CCC !important;
118
116
 
119
117
  svg {
120
118
  font-size: 16px;
@@ -93,7 +93,7 @@ export const OriginalHomeHero = (props) => {
93
93
 
94
94
  return (
95
95
  <HeroContainer
96
- mb={!auth && '30vh'}
96
+ mb={!auth && isShowLoginAccount && '30vh'}
97
97
  bgimage={bgImg || (windowSize.width < 576
98
98
  ? theme.images?.general?.homeHeroMobile
99
99
  : theme.images?.general?.homeHero)}
@@ -78,50 +78,9 @@ const MomentControlUI = (props) => {
78
78
 
79
79
  const getTimes = (curdate, schedule) => {
80
80
  validateSelectedDate(curdate, schedule)
81
- const date = new Date()
82
81
  const dateParts = curdate.split('-')
83
82
  const dateSeleted = new Date(dateParts[0], dateParts[1] - 1, dateParts[2])
84
- var times = []
85
- for (var k = 0; k < schedule[dateSeleted.getDay()].lapses.length; k++) {
86
- var open = {
87
- hour: schedule[dateSeleted.getDay()].lapses[k].open.hour,
88
- minute: schedule[dateSeleted.getDay()].lapses[k].open.minute
89
- }
90
- var close = {
91
- hour: schedule[dateSeleted.getDay()].lapses[k].close.hour,
92
- minute: schedule[dateSeleted.getDay()].lapses[k].close.minute
93
- }
94
- for (var i = open.hour; i <= close.hour; i++) {
95
- if (date.getDate() !== dateSeleted.getDate() || i >= date.getHours()) {
96
- let hour = ''
97
- let meridian = ''
98
- if (!is12hours) hour = i < 10 ? '0' + i : i
99
- else {
100
- if (i === 0) {
101
- hour = '12'
102
- meridian = ' ' + t('AM', 'AM')
103
- } else if (i > 0 && i < 12) {
104
- hour = (i < 10 ? '0' + i : i)
105
- meridian = ' ' + t('AM', 'AM')
106
- } else if (i === 12) {
107
- hour = '12'
108
- meridian = ' ' + t('PM', 'PM')
109
- } else {
110
- hour = ((i - 12 < 10) ? '0' + (i - 12) : (i - 12))
111
- meridian = ' ' + t('PM', 'PM')
112
- }
113
- }
114
- for (let j = (i === open.hour ? open.minute : 0); j <= (i === close.hour ? close.minute : 59); j += 15) {
115
- if (i !== date.getHours() || j >= date.getMinutes() || date.getDate() !== dateSeleted.getDate()) {
116
- times.push({
117
- text: hour + ':' + (j < 10 ? '0' + j : j) + meridian,
118
- value: (i < 10 ? '0' + i : i) + ':' + (j < 10 ? '0' + j : j)
119
- })
120
- }
121
- }
122
- }
123
- }
124
- }
83
+ const times = getTimes(dateSeleted, schedule, is12hours)
125
84
  return times
126
85
  }
127
86
 
@@ -254,7 +254,7 @@ export const OrderBillSection = (props) => {
254
254
  <span>
255
255
  {event?.wallet_event
256
256
  ? walletName[event?.wallet_event?.wallet?.type]?.name
257
- : event?.paymethod?.name}
257
+ : t(event?.paymethod?.name.toUpperCase(), event?.paymethod?.name)}
258
258
  </span>
259
259
  {event?.data?.charge_id && (
260
260
  <span>
@@ -23,7 +23,7 @@ import { Messages } from '../Messages'
23
23
  import { ReviewOrder } from '../ReviewOrder'
24
24
  import { ReviewProduct } from '../ReviewProduct'
25
25
  import { ReviewDriver } from '../ReviewDriver'
26
- import { ProductShare } from '../../../../../components/ProductShare'
26
+ import { ProductShare } from '../ProductShare'
27
27
  import { OrderBillSection } from './OrderBillSection'
28
28
  import { ActionsSection } from './ActionsSection'
29
29
  import { OrderPreferencesSection } from './OrderPreferencesSections'
@@ -67,7 +67,9 @@ import {
67
67
  BusinessExternalWrapper,
68
68
  DirectionButtonWrapper,
69
69
  ProfessionalWrapper,
70
- ProfessionalBlock
70
+ ProfessionalBlock,
71
+ PlaceSpotWrapper,
72
+ PoweredByOrdering
71
73
  } from './styles'
72
74
  import { useTheme } from 'styled-components'
73
75
  import { TaxInformation } from '../TaxInformation'
@@ -411,6 +413,10 @@ const OrderDetailsUI = (props) => {
411
413
  <div className='wrap'>
412
414
  <ProductShare
413
415
  defaultUrl={urlToShare(order?.hash_key)}
416
+ product={{
417
+ images: order.business?.logo,
418
+ name: order.business?.name
419
+ }}
414
420
  />
415
421
  </div>
416
422
  </ShareOrder>
@@ -535,18 +541,14 @@ const OrderDetailsUI = (props) => {
535
541
  </BusinessWrapper>
536
542
 
537
543
  {showDeliveryType && placeSpotTypes.includes(order?.delivery_type) && (
538
- <BusinessWrapper
539
- w='calc(100% - 20px)'
540
- borderTop
541
- >
544
+ <PlaceSpotWrapper>
542
545
  <PlaceSpot
543
546
  isInputMode
544
547
  cart={order}
545
- containerStyle={{ width: 'calc(100% - 20px)' }}
546
548
  spotNumberDefault={order?.spot_number}
547
549
  vehicleDefault={order?.vehicle}
548
550
  />
549
- </BusinessWrapper>
551
+ </PlaceSpotWrapper>
550
552
  )}
551
553
 
552
554
  {showOrderActions && (
@@ -789,4 +789,24 @@ export const ProfessionalWrapper = styled.div`
789
789
  export const ProfessionalBlock = styled.div`
790
790
  border-bottom: 1px solid ${props => props.theme.colors.disabled};
791
791
  margin-bottom: 15px;
792
- `
792
+ `
793
+ export const PlaceSpotWrapper = styled.div`
794
+ @media (min-width: 768px) {
795
+ width: calc(100% - 20px);
796
+ }
797
+ `
798
+
799
+ export const PoweredByOrdering = styled.p`
800
+ text-align: center;
801
+ margin: 0;
802
+ display: flex;
803
+ justify-content: center;
804
+ white-space: pre !important;
805
+ margin-bottom: 10px;
806
+ a{
807
+ font-weight: 600;
808
+ }
809
+ a:hover{
810
+ text-decoration: underline;
811
+ }
812
+ `
@@ -100,7 +100,6 @@ const PaymentOptionsUI = (props) => {
100
100
  } = props
101
101
  const [, t] = useLanguage()
102
102
  const [{ token }] = useSession()
103
- const [{ loading: loadingOptions }] = useOrder()
104
103
  const [alertState, setAlertState] = useState({ open: false, content: [] })
105
104
 
106
105
  const paymethodSelected = props.paySelected || props.paymethodSelected
@@ -173,31 +172,31 @@ const PaymentOptionsUI = (props) => {
173
172
  <BeforeComponent key={i} {...props} />))}
174
173
  <PaymentMethodsContainer>
175
174
  <PaymentMethodsList className='payments-list'>
176
- {!(paymethodsList.loading || isLoading || loadingOptions) &&
177
- supportedMethods.length > 0 && (
178
- supportedMethods.sort((a, b) => a.id - b.id).map(paymethod => (
179
- <React.Fragment key={paymethod.id}>
180
- {
181
- (!isCustomerMode || (isCustomerMode && (paymethod.gateway === 'card_delivery' || paymethod.gateway === 'cash'))) && (
182
- <PayCard
183
- isDisabled={isDisabled}
184
- className={`card ${paymethodSelected?.id === paymethod.id ? 'active' : ''}`}
185
- onClick={() => handlePaymentMethodClick(paymethod)}
186
- >
187
- <div>
188
- {getPayIcon(paymethod.id)}
189
- </div>
190
- <p>
191
- {t(paymethod.gateway.toUpperCase(), paymethod.name)}
192
- </p>
193
- </PayCard>
194
- )
195
- }
196
- </React.Fragment>
197
- ))
198
- )}
175
+ {!(paymethodsList.loading || isLoading) &&
176
+ supportedMethods.length > 0 && (
177
+ supportedMethods.sort((a, b) => a.id - b.id).map(paymethod => (
178
+ <React.Fragment key={paymethod.id}>
179
+ {
180
+ (!isCustomerMode || (isCustomerMode && (paymethod.gateway === 'card_delivery' || paymethod.gateway === 'cash'))) && (
181
+ <PayCard
182
+ isDisabled={isDisabled}
183
+ className={`card ${paymethodSelected?.id === paymethod.id ? 'active' : ''}`}
184
+ onClick={() => handlePaymentMethodClick(paymethod)}
185
+ >
186
+ <div>
187
+ {getPayIcon(paymethod.id)}
188
+ </div>
189
+ <p>
190
+ {t(paymethod.gateway.toUpperCase(), paymethod.name)}
191
+ </p>
192
+ </PayCard>
193
+ )
194
+ }
195
+ </React.Fragment>
196
+ ))
197
+ )}
199
198
 
200
- {(paymethodsList.loading || isLoading || loadingOptions) && (
199
+ {(paymethodsList.loading || isLoading) && (
201
200
  [...Array(5).keys()].map(i => (
202
201
  <PayCard key={i} isSkeleton>
203
202
  <Skeleton key={i} width={100} height={60} style={{ marginLeft: '10px' }} />
@@ -211,7 +210,7 @@ const PaymentOptionsUI = (props) => {
211
210
  />
212
211
  )}
213
212
 
214
- {!(paymethodsList.loading || isLoading || loadingOptions) &&
213
+ {!(paymethodsList.loading || isLoading) &&
215
214
  !paymethodsList.error &&
216
215
  (!paymethodsList?.paymethods || supportedMethods.length === 0) &&
217
216
  (
@@ -67,11 +67,21 @@ export const WrapperInput = styled.div`
67
67
  export const WrapperOption = styled.div`
68
68
  display: flex;
69
69
  flex-direction: column;
70
+ min-width: 240px;
71
+ flex: 1;
72
+ padding: 0 10px;
70
73
  `
71
74
 
72
75
  export const WrapperOptionList = styled.div`
73
- display:grid;
74
- grid-template-columns: 1fr 1fr;
75
- grid-column-gap: 20px;
76
- grid-row-gap: 20px;
76
+ display: flex;
77
+ flex-wrap: wrap;
78
+ width: calc(100% + 20px);
79
+ margin-left: -10px;
80
+
81
+ @media (min-width: 1600px) {
82
+ display:grid;
83
+ grid-template-columns: 1fr 1fr;
84
+ grid-column-gap: 20px;
85
+ grid-row-gap: 20px;
86
+ }
77
87
  `
@@ -4,7 +4,7 @@ import {
4
4
  Pencil,
5
5
  Trash
6
6
  } from 'react-bootstrap-icons'
7
- import { useUtils, useLanguage, useOrder, useOrderingTheme } from 'ordering-components-external'
7
+ import { useUtils, useLanguage, useOrder, useConfig, useOrderingTheme } from 'ordering-components-external'
8
8
  import { useWindowSize } from '../../../../../hooks/useWindowSize'
9
9
  import {
10
10
  AccordionSection,
@@ -50,6 +50,7 @@ export const ProductItemAccordion = (props) => {
50
50
  const [orderState] = useOrder()
51
51
  const [{ parsePrice, parseDate }] = useUtils()
52
52
  const windowSize = useWindowSize()
53
+ const [{ configs }] = useConfig()
53
54
  const [orderingTheme] = useOrderingTheme()
54
55
  const [setActive, setActiveState] = useState('')
55
56
  const [setHeight, setHeightState] = useState('0px')
@@ -130,7 +131,11 @@ export const ProductItemAccordion = (props) => {
130
131
  <ScheduleInfoWrapper>
131
132
  <h3>{product.name}</h3>
132
133
  <ScheduleInfo>
133
- <span>{parseDate(product?.calendar_event?.start, { outputFormat: 'hh:mm a' })} - {parseDate(product?.calendar_event?.end, { outputFormat: 'hh:mm a' })}</span>
134
+ <span>
135
+ {parseDate(product?.calendar_event?.start, { outputFormat: (configs?.format_time?.value === '12') ? 'hh:mm a' : 'HH:mm' })}
136
+ {' '}-{' '}
137
+ {parseDate(product?.calendar_event?.end, { outputFormat: (configs?.format_time?.value === '12') ? 'hh:mm a' : 'HH:mm' })}
138
+ </span>
134
139
  </ScheduleInfo>
135
140
  </ScheduleInfoWrapper>
136
141
  ) : (
@@ -192,7 +197,6 @@ export const ProductItemAccordion = (props) => {
192
197
  </ContentInfo>
193
198
  </>
194
199
  )}
195
-
196
200
  </ProductInfo>
197
201
 
198
202
  {(product?.valid || !isCartProduct) && windowSize.width > 410 && (
@@ -22,7 +22,7 @@ const ProductOptionUI = (props) => {
22
22
  if (option.min === 1 && option.max === 1) {
23
23
  maxMin = t('REQUIRED', 'Required')
24
24
  } else if (option.min === 0 && option.max > 0) {
25
- maxMin = `${t('MAX', 'Max')}. ${option.max}`
25
+ maxMin = `${!option?.limit_suboptions_by_max ? t('MAX_PER_SUBOPTION', 'MAX PER SUBOPTION') : t('MAX', 'Max')}. ${option.max}`
26
26
  } else if (option.min > 0 && option.max === 0) {
27
27
  maxMin = `${t('MIN', 'Min')}. ${option.min})`
28
28
  }
@@ -39,7 +39,7 @@ const ProductOptionSubOptionUI = (props) => {
39
39
  setIsScrollAvailable
40
40
  } = props
41
41
 
42
- const disableIncrement = option?.limit_suboptions_by_max ? (balance === option?.max || state.quantity === suboption.max) : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
42
+ const disableIncrement = option?.limit_suboptions_by_max ? (balance === option?.max || state.quantity === suboption.max) : state.quantity === option?.max
43
43
  const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
44
44
  const [, t] = useLanguage()
45
45
  const [{ parsePrice }] = useUtils()
@@ -48,7 +48,7 @@ export const ProfessionalProfile = (props) => {
48
48
  business={currentProfessional}
49
49
  isProfessional
50
50
  isDisabled
51
- maxDays={50}
51
+ maxDays={40}
52
52
  useOrderContext={false}
53
53
  />
54
54
  ) : (