ordering-ui-external 10.10.23 → 11.0.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 (43) hide show
  1. package/_bundles/{7.ordering-ui.40e61237ed46b8c579a3.js → 7.ordering-ui.fa5f19340751cb2d73a3.js} +1 -1
  2. package/_bundles/{ordering-ui.40e61237ed46b8c579a3.js → ordering-ui.fa5f19340751cb2d73a3.js} +2 -2
  3. package/_modules/components/BusinessProductsList/index.js +15 -4
  4. package/_modules/themes/callcenterOriginal/src/components/CartPopover/styles.js +1 -1
  5. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +0 -1
  6. package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +2 -2
  7. package/_modules/themes/five/src/components/Cart/index.js +1 -1
  8. package/_modules/themes/five/src/components/HighestRated/index.js +40 -7
  9. package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  10. package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +4 -1
  11. package/_modules/themes/five/src/components/OrderDetails/index.js +2 -1
  12. package/_modules/themes/five/src/components/ProductForm/index.js +2 -2
  13. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +14 -13
  14. package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +1 -1
  15. package/_modules/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +3 -2
  16. package/_modules/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +3 -2
  17. package/package.json +2 -2
  18. package/src/components/BusinessProductsList/index.js +9 -1
  19. package/src/themes/callcenterOriginal/src/components/CartPopover/styles.js +1 -1
  20. package/src/themes/callcenterOriginal/src/components/Header/index.js +0 -1
  21. package/src/themes/callcenterOriginal/src/components/Header/styles.js +2 -2
  22. package/src/themes/five/src/components/Cart/index.js +1 -1
  23. package/src/themes/five/src/components/HighestRated/index.js +35 -1
  24. package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  25. package/src/themes/five/src/components/OrderDetails/OrderEta.js +1 -1
  26. package/src/themes/five/src/components/OrderDetails/index.js +2 -1
  27. package/src/themes/five/src/components/ProductForm/index.js +2 -2
  28. package/src/themes/five/src/components/ProductOptionSubOption/index.js +11 -12
  29. package/src/themes/five/src/components/ProductOptionSubOption/styles.js +1 -1
  30. package/src/themes/five/src/components/SignUpDriver/layouts/NewSignUpDriver/index.js +3 -2
  31. package/src/themes/five/src/components/SignUpDriver/layouts/OldSignUpDriver/index.js +3 -2
  32. package/template/pages/SignUpDriver/index.js +5 -1
  33. /package/_bundles/{0.ordering-ui.40e61237ed46b8c579a3.js → 0.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  34. /package/_bundles/{1.ordering-ui.40e61237ed46b8c579a3.js → 1.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  35. /package/_bundles/{2.ordering-ui.40e61237ed46b8c579a3.js → 2.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  36. /package/_bundles/{4.ordering-ui.40e61237ed46b8c579a3.js → 4.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  37. /package/_bundles/{5.ordering-ui.40e61237ed46b8c579a3.js → 5.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  38. /package/_bundles/{6.ordering-ui.40e61237ed46b8c579a3.js → 6.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  39. /package/_bundles/{7.ordering-ui.40e61237ed46b8c579a3.js.LICENSE.txt → 7.ordering-ui.fa5f19340751cb2d73a3.js.LICENSE.txt} +0 -0
  40. /package/_bundles/{8.ordering-ui.40e61237ed46b8c579a3.js → 8.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  41. /package/_bundles/{9.ordering-ui.40e61237ed46b8c579a3.js → 9.ordering-ui.fa5f19340751cb2d73a3.js} +0 -0
  42. /package/_bundles/{ordering-ui.40e61237ed46b8c579a3.js.LICENSE.txt → ordering-ui.fa5f19340751cb2d73a3.js.LICENSE.txt} +0 -0
  43. /package/template/{utils → Utils}/index.js +0 -0
@@ -57,7 +57,7 @@ export const OrderEta = (props) => {
57
57
  }
58
58
  estimatedUtcTime = moment.utc(_delivery).add(totalEta, 'minutes')
59
59
  const _estimatedTime = outputFormat ? moment(estimatedUtcTime).local().format(outputFormat) : parseDate(estimatedUtcTime, { utc: false })
60
- setEstimatedDeliveryTime(_estimatedTime)
60
+ setEstimatedDeliveryTime(order?.status === 13 ? parseDate(_delivery, { utc: !!order?.delivery_datetime_utc, outputFormat: outputFormat }) : _estimatedTime)
61
61
  }
62
62
 
63
63
  useEffect(() => {
@@ -130,6 +130,7 @@ const OrderDetailsUI = (props) => {
130
130
  const completedStatus = [1, 2, 5, 6, 10, 11, 12, 15, 16, 17]
131
131
  const placeSpotTypes = [3, 4, 5]
132
132
  const activeStatus = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23]
133
+ const preorderStatus = [0, 13]
133
134
  const googleMapsApiKey = configs?.google_maps_api_key?.value
134
135
  const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
135
136
 
@@ -546,7 +547,7 @@ const OrderDetailsUI = (props) => {
546
547
  </DirectionButtonWrapper>
547
548
  )}
548
549
  </BusinessInfo>
549
- {!hideOrderActions && (
550
+ {!hideOrderActions && !preorderStatus.includes(order?.status) && (
550
551
  <BtsOrderStatus>
551
552
  <div>
552
553
  <Button
@@ -98,7 +98,7 @@ const ProductOptionsUI = (props) => {
98
98
  handleChangeSuboptionState,
99
99
  handleChangeCommentState,
100
100
  productAddedToCartLength,
101
- pizzaType,
101
+ pizzaState,
102
102
  handleFavoriteProduct,
103
103
  handleCreateGuestUser,
104
104
  actionStatus,
@@ -654,7 +654,7 @@ const ProductOptionsUI = (props) => {
654
654
  isSoldOut={isSoldOut}
655
655
  scrollDown={scrollDown}
656
656
  setIsScrollAvailable={setIsScrollAvailable}
657
- pizzaType={pizzaType}
657
+ pizzaState={pizzaState}
658
658
  productCart={productCart}
659
659
  />
660
660
  )
@@ -27,7 +27,7 @@ import MdRadioButtonUnchecked from '@meronex/icons/md/MdRadioButtonUnchecked'
27
27
 
28
28
  const ProductOptionSubOptionPropsAreEqual = (prevProps, nextProps) => {
29
29
  return JSON.stringify(prevProps.state) === JSON.stringify(nextProps.state) &&
30
- prevProps.pizzaType === nextProps.pizzaType &&
30
+ JSON.stringify(prevProps.pizzaState) === JSON.stringify(nextProps.pizzaState) &&
31
31
  prevProps.balance === nextProps.balance &&
32
32
  JSON.stringify(prevProps.productCart) === JSON.stringify(nextProps.productCart)
33
33
  }
@@ -44,9 +44,8 @@ const ProductOptionSubOptionUI = React.memo((props) => {
44
44
  changePosition,
45
45
  isSoldOut,
46
46
  setIsScrollAvailable,
47
- onChange,
48
- pizzaType,
49
- productCart
47
+ usePizzaValidation,
48
+ pizzaState
50
49
  } = props
51
50
 
52
51
  const disableIncrement = option?.limit_suboptions_by_max ? (balance === option?.max || state.quantity === suboption.max) : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
@@ -74,16 +73,18 @@ const ProductOptionSubOptionUI = React.memo((props) => {
74
73
  const handleSuboptionClick = () => {
75
74
  dirtyRef.current = true
76
75
  toggleSelect()
77
- if (balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1) && !state.selected) {
76
+ const minMaxValidation = option?.with_half_option ? usePizzaValidation : (balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1))
77
+ if (!state.selected && minMaxValidation) {
78
78
  setShowMessage(true)
79
79
  }
80
80
  }
81
81
 
82
82
  useEffect(() => {
83
- if (!(balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1) && !state.selected)) {
83
+ const minMaxValidation = option?.with_half_option ? usePizzaValidation : (!state.selected && balance === option?.max && option?.suboptions?.length > balance && !(option?.min === 1 && option?.max === 1))
84
+ if (!minMaxValidation) {
84
85
  setShowMessage(false)
85
86
  }
86
- }, [balance])
87
+ }, [balance, pizzaState?.[`option:${option?.id}`]?.value])
87
88
 
88
89
  useEffect(() => {
89
90
  if (balance === option?.max && state?.selected && dirtyRef) {
@@ -95,10 +96,10 @@ const ProductOptionSubOptionUI = React.memo((props) => {
95
96
  }, [state?.selected])
96
97
 
97
98
  useEffect(() => {
98
- if (pizzaType === 'mitad y mitad' && option?.with_half_option) {
99
+ if (option?.with_half_option) {
99
100
  handlePosition({}, 'left')
100
101
  }
101
- }, [pizzaType, state?.selected, suboption?.id])
102
+ }, [state?.selected, suboption?.id])
102
103
 
103
104
  return (
104
105
  <>
@@ -155,20 +156,18 @@ const ProductOptionSubOptionUI = React.memo((props) => {
155
156
  <>
156
157
  <BsCircleHalf
157
158
  className={[
158
- pizzaType === 'center' ? 'disabled disable-clicks' : '',
159
159
  'reverse',
160
160
  state.selected && state.position === 'left' ? 'selected' : null].filter(classname => classname).join(' ')}
161
161
  onClick={(e) => handlePosition(e, 'left')}
162
162
  />
163
163
  <BsCircleFill
164
164
  className={[
165
- pizzaType === 'mitad y mitad' ? 'disabled' : '',
165
+ pizzaState?.[`option:${option?.id}`]?.value === option?.max ? 'disabled' : '',
166
166
  state.selected && state.position === 'whole' ? 'selected' : null].filter(classname => classname).join(' ')}
167
167
  onClick={(e) => handlePosition(e, 'whole')}
168
168
  />
169
169
  <BsCircleHalf
170
170
  className={[
171
- pizzaType === 'center' ? 'disabled disable-clicks' : '',
172
171
  state.selected && state.position === 'right' ? 'selected' : null].filter(classname => classname).join(' ')}
173
172
  onClick={(e) => handlePosition(e, 'right')}
174
173
  />
@@ -56,7 +56,7 @@ export const Text = styled.div`
56
56
  text-overflow: ellipsis;
57
57
  ${props => props.theme?.rtl && css`
58
58
  margin-left: 0;
59
- margin-right: 10px;
59
+ margin-right: 10px;
60
60
  `}
61
61
  }
62
62
 
@@ -54,7 +54,8 @@ const SignUpDriverUI = (props) => {
54
54
  saveCustomerUser,
55
55
  fieldsNotValid,
56
56
  signupData,
57
- enableReCaptcha
57
+ enableReCaptcha,
58
+ isDriverSignup
58
59
  } = props
59
60
 
60
61
  const theme = useTheme()
@@ -385,7 +386,7 @@ const SignUpDriverUI = (props) => {
385
386
  </FormInput>
386
387
  </FormSide>
387
388
  <Alert
388
- title={t('SIGN_UP_FOR_BUSINESS', 'Sign up for business')}
389
+ title={isDriverSignup ? t('SIGN_UP_FOR_DRIVER', 'Sign up for driver') : t('SIGN_UP_FOR_BUSINESS', 'Sign up for business')}
389
390
  content={alertState.content}
390
391
  acceptText={t('ACCEPT', 'Accept')}
391
392
  open={alertState.open}
@@ -52,7 +52,8 @@ const SignUpDriverUI = (props) => {
52
52
  saveCustomerUser,
53
53
  fieldsNotValid,
54
54
  signupData,
55
- enableReCaptcha
55
+ enableReCaptcha,
56
+ isDriverSignup
56
57
  } = props
57
58
 
58
59
  const theme = useTheme()
@@ -381,7 +382,7 @@ const SignUpDriverUI = (props) => {
381
382
  </FormInput>
382
383
  </FormSide>
383
384
  <Alert
384
- title={t('SIGN_UP_FOR_BUSINESS', 'Sign up for business')}
385
+ title={isDriverSignup ? t('SIGN_UP_FOR_DRIVER', 'Sign up for driver') : t('SIGN_UP_FOR_BUSINESS', 'Sign up for business')}
385
386
  content={alertState.content}
386
387
  acceptText={t('ACCEPT', 'Accept')}
387
388
  open={alertState.open}
@@ -3,10 +3,14 @@ import { SignUpDriver as SignUpDriverController } from '../../../src/themes/five
3
3
  import { HelmetTags } from '../../components/HelmetTags'
4
4
 
5
5
  export const SignUpDriver = (props) => {
6
+ const SignUpDriverProps = {
7
+ ...props,
8
+ isDriverSignup: true
9
+ }
6
10
  return (
7
11
  <>
8
12
  <HelmetTags page='signup_driver' />
9
- <SignUpDriverController {...props} />
13
+ <SignUpDriverController {...SignUpDriverProps} />
10
14
  </>
11
15
  )
12
16
  }
File without changes