ordering-ui-external 14.1.6 → 14.1.8

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 (65) hide show
  1. package/_bundles/{7.ordering-ui.e903b3a8ca5ebdd5b64b.js → 7.ordering-ui.8668ba2c7ba56b89cbdd.js} +1 -1
  2. package/_bundles/ordering-ui.8668ba2c7ba56b89cbdd.js +2 -0
  3. package/_modules/components/BusinessesMap/index.js +14 -5
  4. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
  5. package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +5 -2
  6. package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +7 -6
  7. package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +12 -5
  8. package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +7 -6
  9. package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
  10. package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +12 -6
  11. package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +6 -3
  12. package/_modules/themes/callcenterOriginal/src/styles/Buttons/index.js +5 -6
  13. package/_modules/themes/five/src/components/AddressDetails/styles.js +2 -2
  14. package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +5 -3
  15. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +14 -2
  16. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +1 -1
  17. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -8
  18. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
  19. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
  20. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  21. package/_modules/themes/five/src/components/Checkout/index.js +1 -1
  22. package/_modules/themes/five/src/components/Messages/MapMessages.js +1 -2
  23. package/_modules/themes/five/src/components/Messages/index.js +2 -7
  24. package/_modules/themes/five/src/components/OrdersOption/styles.js +1 -1
  25. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +1 -1
  26. package/_modules/themes/five/src/components/UserDetails/index.js +7 -7
  27. package/_modules/themes/five/src/components/UserDetails/styles.js +8 -7
  28. package/package.json +2 -2
  29. package/src/components/BusinessesMap/index.js +11 -5
  30. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +1 -1
  31. package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +3 -1
  32. package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -8
  33. package/src/themes/callcenterOriginal/src/components/AddressList/index.js +9 -3
  34. package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +6 -6
  35. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +2 -1
  36. package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -3
  37. package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +5 -5
  38. package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
  39. package/src/themes/callcenterOriginal/src/styles/Buttons/index.js +3 -3
  40. package/src/themes/five/src/components/AddressDetails/styles.js +2 -4
  41. package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +3 -2
  42. package/src/themes/five/src/components/BusinessBasicInformation/index.js +17 -6
  43. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +6 -1
  44. package/src/themes/five/src/components/BusinessProductsListing/index.js +2 -9
  45. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +1 -1
  46. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -2
  47. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  48. package/src/themes/five/src/components/Checkout/index.js +1 -1
  49. package/src/themes/five/src/components/Messages/MapMessages.js +1 -2
  50. package/src/themes/five/src/components/Messages/index.js +17 -24
  51. package/src/themes/five/src/components/OrdersOption/styles.js +1 -1
  52. package/src/themes/five/src/components/SingleOrderCard/styles.js +1 -1
  53. package/src/themes/five/src/components/UserDetails/index.js +8 -8
  54. package/src/themes/five/src/components/UserDetails/styles.js +16 -9
  55. package/_bundles/ordering-ui.e903b3a8ca5ebdd5b64b.js +0 -2
  56. /package/_bundles/{0.ordering-ui.e903b3a8ca5ebdd5b64b.js → 0.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  57. /package/_bundles/{1.ordering-ui.e903b3a8ca5ebdd5b64b.js → 1.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  58. /package/_bundles/{2.ordering-ui.e903b3a8ca5ebdd5b64b.js → 2.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  59. /package/_bundles/{4.ordering-ui.e903b3a8ca5ebdd5b64b.js → 4.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  60. /package/_bundles/{5.ordering-ui.e903b3a8ca5ebdd5b64b.js → 5.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  61. /package/_bundles/{6.ordering-ui.e903b3a8ca5ebdd5b64b.js → 6.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  62. /package/_bundles/{7.ordering-ui.e903b3a8ca5ebdd5b64b.js.LICENSE.txt → 7.ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt} +0 -0
  63. /package/_bundles/{8.ordering-ui.e903b3a8ca5ebdd5b64b.js → 8.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  64. /package/_bundles/{9.ordering-ui.e903b3a8ca5ebdd5b64b.js → 9.ordering-ui.8668ba2c7ba56b89cbdd.js} +0 -0
  65. /package/_bundles/{ordering-ui.e903b3a8ca5ebdd5b64b.js.LICENSE.txt → ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt} +0 -0
@@ -32,7 +32,7 @@ export const OrdersSection = (props) => {
32
32
  horizontal
33
33
  isBusinessesPage
34
34
  onRedirectPage={onRedirectPage}
35
- titleContent={t('CARTS', 'Carts')}
35
+ titleContent={t('OPEN_CARTS', 'Open carts')}
36
36
  businessesIds={businessesIds}
37
37
  customArray={
38
38
  getCustomArray(orderState.carts)?.filter(cart => cart.products.length > 0)
@@ -418,7 +418,7 @@ const BusinessesListingUI = (props) => {
418
418
  </HightestRatedWrapper>
419
419
  )}
420
420
 
421
- {(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
421
+ {(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden && !isCustomerMode) && (
422
422
  <BusinessTypeFilter
423
423
  images={props.images}
424
424
  businessTypes={props.businessTypes}
@@ -430,7 +430,7 @@ const BusinessesListingUI = (props) => {
430
430
  <SearchContainer>
431
431
  {isCustomLayout && (
432
432
  <BusinessesTitle isCustomerMode={isCustomerMode}>
433
- {t('BUSINESSES', 'Businesses')}
433
+ {isCustomerMode ? t('SELECT_THE_BUSINESS', 'Select the business') : t('BUSINESSES', 'businesses')}
434
434
  </BusinessesTitle>
435
435
  )}
436
436
  <WrapperSearch isCustomLayout={isCustomLayout} isCustomerMode={isCustomerMode}>
@@ -261,7 +261,7 @@ export const Title = styled.h2`
261
261
  font-weight: 600;
262
262
  font-size: 24px;
263
263
  color: ${props => props.theme?.colors.headingColor};
264
- margin: 0px 20px 5px 20px;
264
+ margin: 20px 20px 5px 20px;
265
265
  `
266
266
 
267
267
  export const TypesWrapper = styled.div`
@@ -692,7 +692,7 @@ const CheckoutUI = (props) => {
692
692
  `${t('MAXIMUM_SUBTOTAL_ORDER', 'Maximum subtotal order')}: ${parsePrice(cart?.maximum)}`
693
693
  ) : (!cart?.valid_minimum && !(cart?.discount_type === 1 && cart?.discount_rate === 100)) ? (
694
694
  `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
695
- ) : placing ? t('PLACING', 'Placing') : t('PLACE_ORDER', 'Place Order')}
695
+ ) : placing ? t('PLACING_ORDER', 'Placing order') : t('PLACE_ORDER', 'Place Order')}
696
696
  </Button>
697
697
  </WrapperPlaceOrderButton>
698
698
  )}
@@ -7,7 +7,6 @@ export const MapMessages = (props) => {
7
7
  order,
8
8
  filterSpecialStatus,
9
9
  handleModalImage,
10
- hideLogBookMessages,
11
10
  getLevel,
12
11
  business,
13
12
  driver,
@@ -22,7 +21,7 @@ export const MapMessages = (props) => {
22
21
  const [messagesToShow, setMessagesToShow] = useState(props.messagesToShow)
23
22
 
24
23
  useEffect(() => {
25
- if ((!props.messages?.messages?.length && !props.messagesToShow?.messages?.length) || !hideLogBookMessages) return
24
+ if (!props.messages?.messages?.length && !props.messagesToShow?.messages?.length) return
26
25
  const messages_ = {
27
26
  ...props.messages,
28
27
  messages: props.messages?.messages?.filter(msg => msg.type !== 1 && msg.type !== 0)
@@ -4,8 +4,7 @@ import {
4
4
  Messages as MessagesController,
5
5
  useUtils,
6
6
  useLanguage,
7
- useEvent,
8
- useConfig
7
+ useEvent
9
8
  } from 'ordering-components-external'
10
9
  import { useForm } from 'react-hook-form'
11
10
  import IosSend from '@meronex/icons/ios/IosSend'
@@ -83,7 +82,6 @@ const MessagesUI = (props) => {
83
82
  } = props
84
83
 
85
84
  const theme = useTheme()
86
- const [{ configs }] = useConfig()
87
85
  const [, t] = useLanguage()
88
86
  const { handleSubmit, register, errors, setValue } = useForm()
89
87
  const [alertState, setAlertState] = useState({ open: false, content: [] })
@@ -95,8 +93,6 @@ const MessagesUI = (props) => {
95
93
  const previousStatus = [1, 2, 5, 6, 10, 11, 12, 15, 16, 17]
96
94
  const chatDisabled = previousStatus.includes(order?.status)
97
95
 
98
- const hideLogBookMessages = configs?.order_logbook_enabled?.value === '0'
99
-
100
96
  const quickMessageList = [
101
97
  { key: 'message_1', text: t('CUSTOMER_MESSAGE_1', 'Lorem ipsum 1') },
102
98
  { key: 'message_2', text: t('CUSTOMER_MESSAGE_2', 'Lorem ipsum 2') },
@@ -480,28 +476,25 @@ const MessagesUI = (props) => {
480
476
  {
481
477
  !messages?.loading && order && (
482
478
  <MessageContentWrapper>
483
- {!hideLogBookMessages && (
484
- <>
485
- <MessageCreatedDate>
486
- <span>{parseDate(order.created_at, { outputFormat: 'MMM DD, YYYY' })}</span>
487
- </MessageCreatedDate>
488
- <MessageConsole>
489
- <BubbleConsole>
490
- {t('ORDER_PLACED_FOR', 'Order placed for')} {' '}
491
- <strong>{parseDate(order.created_at)}</strong> {' '}
492
- {t('VIA', 'Via')}{' '}
493
- <strong>
494
- {order.app_id ? t(order.app_id.toUpperCase(), order.app_id) : t('OTHER', 'Other')}
495
- </strong>{' '}
496
- <TimeofSent>{parseTime(order.created_at)}</TimeofSent>
497
- </BubbleConsole>
498
- </MessageConsole>
499
- </>
500
- )}
479
+ <>
480
+ <MessageCreatedDate>
481
+ <span>{parseDate(order.created_at, { outputFormat: 'MMM DD, YYYY' })}</span>
482
+ </MessageCreatedDate>
483
+ <MessageConsole>
484
+ <BubbleConsole>
485
+ {t('ORDER_PLACED_FOR', 'Order placed for')} {' '}
486
+ <strong>{parseDate(order.created_at)}</strong> {' '}
487
+ {t('VIA', 'Via')}{' '}
488
+ <strong>
489
+ {order.app_id ? t(order.app_id.toUpperCase(), order.app_id) : t('OTHER', 'Other')}
490
+ </strong>{' '}
491
+ <TimeofSent>{parseTime(order.created_at)}</TimeofSent>
492
+ </BubbleConsole>
493
+ </MessageConsole>
494
+ </>
501
495
  <MapMessages
502
496
  messages={messagesToShow?.messages?.length ? messagesToShow : messages}
503
497
  messagesToShow={messagesToShow}
504
- hideLogBookMessages={hideLogBookMessages}
505
498
  order={order}
506
499
  filterSpecialStatus={filterSpecialStatus}
507
500
  handleModalImage={handleModalImage}
@@ -7,7 +7,7 @@ export const OptionTitle = styled.div`
7
7
  h1{
8
8
  text-transform: capitalize;
9
9
  font-size: 18px;
10
- margin: 18px 0;
10
+ margin: 0;
11
11
  }
12
12
 
13
13
  @media (min-width: 768px){
@@ -68,7 +68,7 @@ export const Container = styled.div`
68
68
 
69
69
  @media(min-width: 993px){
70
70
  ${({ isBusinessesPage }) => isBusinessesPage && css`
71
- margin: 30px 20px;
71
+ margin: 20px;
72
72
  width: calc(33% - 40px);
73
73
  `}
74
74
  }
@@ -12,7 +12,8 @@ import {
12
12
  TitleContainer,
13
13
  CountryFlag,
14
14
  PhoneContainer,
15
- SkeletonsContainer
15
+ SkeletonsContainer,
16
+ ChangeCustomerText
16
17
  } from './styles'
17
18
  import MdClose from '@meronex/icons/md/MdClose'
18
19
  import PhoneInput from 'react-phone-number-input'
@@ -177,13 +178,7 @@ const UserDetailsUI = (props) => {
177
178
  {!isModal && (
178
179
  <h1>{t('CUSTOMER_DETAILS', 'Customer Details')}</h1>
179
180
  )}
180
- {cartStatus !== 2 && (
181
- !isEdit ? (
182
- <span onClick={() => toggleIsEdit()}>{t('CHANGE_USER_DETAILS', 'Change customer details')}</span>
183
- ) : (
184
- <FcCancel className='cancel' onClick={() => toggleEditState()} />
185
- )
186
- )}
181
+ {cartStatus !== 2 && isEdit && <FcCancel className='cancel' onClick={() => toggleEditState()} />}
187
182
  </Header>
188
183
  )}
189
184
 
@@ -211,6 +206,11 @@ const UserDetailsUI = (props) => {
211
206
  </p>
212
207
  </PhoneContainer>
213
208
  )}
209
+ <ChangeCustomerText>
210
+ {cartStatus !== 2 && (
211
+ <span onClick={() => toggleIsEdit()}>{t('CHANGE_USER_DETAILS', 'Change customer details')}</span>
212
+ )}
213
+ </ChangeCustomerText>
214
214
  </UserData>
215
215
  ) : (
216
216
  <SideForm>
@@ -27,15 +27,6 @@ export const Header = styled.div`
27
27
  cursor: pointer;
28
28
  }
29
29
 
30
- span {
31
- font-size: 13px;
32
- color: ${props => props.theme.colors.primary};
33
- cursor: pointer;
34
- user-select: none;
35
- &:hover {
36
- text-decoration: underline;
37
- }
38
- }
39
30
  `
40
31
 
41
32
  export const SideForm = styled.div`
@@ -114,8 +105,24 @@ export const PhoneContainer = styled.div`
114
105
  display: flex;
115
106
  align-items: center;
116
107
  height: 30px;
108
+ p {
109
+ margin: 1rem 0;
110
+ }
117
111
  `
118
112
 
119
113
  export const SkeletonsContainer = styled.div`
120
114
  margin-top: 25px;
121
115
  `
116
+
117
+ export const ChangeCustomerText = styled.div`
118
+
119
+ span {
120
+ font-size: 13px;
121
+ color: ${props => props.theme.colors.primary};
122
+ cursor: pointer;
123
+ user-select: none;
124
+ &:hover {
125
+ text-decoration: underline;
126
+ }
127
+ }
128
+ `