ordering-ui-admin-external 1.23.4 → 1.24.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 (106) hide show
  1. package/_bundles/{ordering-ui-admin.152c2c4d99f05215f0c3.js → ordering-ui-admin.0c354f3e7da49f56465b.js} +2 -2
  2. package/_modules/components/CartRecovery/RecoveryActionAdd/index.js +325 -0
  3. package/_modules/components/CartRecovery/RecoveryGeneral/index.js +41 -17
  4. package/_modules/components/Delivery/DriversCompaniesList/styles.js +1 -1
  5. package/_modules/components/Delivery/DriversCompaniesListing/index.js +20 -2
  6. package/_modules/components/Delivery/DriversCompaniesListing/styles.js +2 -2
  7. package/_modules/components/Delivery/DriversCompanyAddForm/GeneralForm/index.js +122 -0
  8. package/_modules/components/Delivery/DriversCompanyAddForm/GeneralForm/styles.js +21 -0
  9. package/_modules/components/Delivery/DriversCompanyAddForm/ScheduleForm/index.js +27 -0
  10. package/_modules/components/Delivery/DriversCompanyAddForm/ScheduleForm/styles.js +14 -0
  11. package/_modules/components/Delivery/DriversCompanyAddForm/WebhooksForm/index.js +60 -0
  12. package/_modules/components/Delivery/DriversCompanyAddForm/WebhooksForm/styles.js +16 -0
  13. package/_modules/components/Delivery/DriversCompanyAddForm/index.js +114 -0
  14. package/_modules/components/Delivery/DriversCompanyAddForm/styles.js +18 -0
  15. package/_modules/components/MyProducts/AdvancedSettings/index.js +66 -82
  16. package/_modules/components/MyProducts/AdvancedSettings/styles.js +40 -44
  17. package/_modules/components/MyProducts/CustomDomain/index.js +150 -0
  18. package/_modules/components/MyProducts/CustomDomain/styles.js +38 -0
  19. package/_modules/components/MyProducts/OrderingWebsite/SelectBusiness.js +59 -0
  20. package/_modules/components/MyProducts/OrderingWebsite/SelectFranchise.js +59 -0
  21. package/_modules/components/MyProducts/OrderingWebsite/index.js +65 -36
  22. package/_modules/components/MyProducts/OrderingWebsite/styles.js +70 -35
  23. package/_modules/components/MyProducts/UploadAudio/index.js +170 -0
  24. package/_modules/components/MyProducts/UploadAudio/styles.js +30 -0
  25. package/_modules/components/MyProducts/index.js +8 -1
  26. package/_modules/components/Orders/DeliveriesLocation/index.js +1 -0
  27. package/_modules/components/Orders/OrderBill/index.js +4 -3
  28. package/_modules/components/Orders/OrderContactInformation/index.js +14 -12
  29. package/_modules/components/Orders/OrderDetails/index.js +6 -131
  30. package/_modules/components/Orders/OrdersTable/index.js +2 -2
  31. package/_modules/components/Settings/NotificationSetting/index.js +1 -1
  32. package/_modules/components/Settings/SettingsList/index.js +1 -1
  33. package/_modules/components/Settings/SettingsList/styles.js +2 -2
  34. package/_modules/components/Shared/InputPhoneNumber/index.js +3 -2
  35. package/_modules/components/SidebarMenu/index.js +22 -22
  36. package/_modules/components/Stores/BusinessDetails/index.js +6 -3
  37. package/_modules/components/Stores/BusinessDeviceDetail/index.js +66 -16
  38. package/_modules/components/Stores/BusinessDeviceDetail/styles.js +7 -5
  39. package/_modules/components/Stores/BusinessProductsListing/index.js +18 -16
  40. package/_modules/components/Stores/BusinessSalesChannel/index.js +13 -4
  41. package/_modules/components/Stores/BusinessSalesFacebook/FacebookProfile.js +2 -2
  42. package/_modules/components/Stores/BusinessSalesFacebook/index.js +2 -2
  43. package/_modules/components/Stores/BusinessSalesGoogle/index.js +2 -2
  44. package/_modules/components/Stores/BusinessSalesInstagram/AdvancedInstagram.js +3 -2
  45. package/_modules/components/Stores/BusinessSalesInstagram/GeneralInstagram.js +2 -2
  46. package/_modules/components/Stores/BusinessSalesInstagram/index.js +3 -5
  47. package/_modules/components/Stores/BusinessSummary/index.js +11 -9
  48. package/_modules/components/Users/CustomersListing/index.js +5 -3
  49. package/_modules/utils/index.js +211 -3
  50. package/index-template.js +1 -1
  51. package/index.html +1 -0
  52. package/package.json +2 -2
  53. package/public/push/onesignal/OneSignalSDKUpdaterWorker.js +1 -0
  54. package/public/push/onesignal/OneSignalSDKWorker.js +1 -0
  55. package/src/components/CartRecovery/RecoveryActionAdd/index.js +355 -0
  56. package/src/components/CartRecovery/RecoveryGeneral/index.js +23 -4
  57. package/src/components/Delivery/DriversCompaniesList/styles.js +1 -1
  58. package/src/components/Delivery/DriversCompaniesListing/index.js +29 -12
  59. package/src/components/Delivery/DriversCompaniesListing/styles.js +1 -1
  60. package/src/components/Delivery/DriversCompanyAddForm/GeneralForm/index.js +120 -0
  61. package/src/components/Delivery/DriversCompanyAddForm/GeneralForm/styles.js +32 -0
  62. package/src/components/Delivery/DriversCompanyAddForm/ScheduleForm/index.js +29 -0
  63. package/src/components/Delivery/DriversCompanyAddForm/ScheduleForm/styles.js +11 -0
  64. package/src/components/Delivery/DriversCompanyAddForm/WebhooksForm/index.js +69 -0
  65. package/src/components/Delivery/DriversCompanyAddForm/WebhooksForm/styles.js +24 -0
  66. package/src/components/Delivery/DriversCompanyAddForm/index.js +121 -0
  67. package/src/components/Delivery/DriversCompanyAddForm/styles.js +39 -0
  68. package/src/components/MyProducts/AdvancedSettings/index.js +35 -36
  69. package/src/components/MyProducts/AdvancedSettings/styles.js +3 -11
  70. package/src/components/MyProducts/CustomDomain/index.js +137 -0
  71. package/src/components/MyProducts/CustomDomain/styles.js +103 -0
  72. package/src/components/MyProducts/OrderingWebsite/SelectBusiness.js +47 -0
  73. package/src/components/MyProducts/OrderingWebsite/SelectFranchise.js +47 -0
  74. package/src/components/MyProducts/OrderingWebsite/index.js +99 -42
  75. package/src/components/MyProducts/OrderingWebsite/styles.js +126 -7
  76. package/src/components/MyProducts/UploadAudio/index.js +168 -0
  77. package/src/components/MyProducts/UploadAudio/styles.js +120 -0
  78. package/src/components/MyProducts/index.js +3 -1
  79. package/src/components/Orders/DeliveriesLocation/index.js +1 -0
  80. package/src/components/Orders/OrderBill/index.js +9 -6
  81. package/src/components/Orders/OrderContactInformation/index.js +5 -1
  82. package/src/components/Orders/OrderDetails/index.js +7 -35
  83. package/src/components/Orders/OrdersTable/index.js +3 -1
  84. package/src/components/Settings/NotificationSetting/index.js +2 -0
  85. package/src/components/Settings/SettingsList/index.js +53 -53
  86. package/src/components/Settings/SettingsList/styles.js +2 -1
  87. package/src/components/Settings/SettingsSelectUI/index.js +1 -1
  88. package/src/components/Shared/InputPhoneNumber/index.js +2 -2
  89. package/src/components/SidebarMenu/index.js +1 -0
  90. package/src/components/Stores/BusinessDetails/index.js +4 -1
  91. package/src/components/Stores/BusinessDeviceDetail/index.js +46 -7
  92. package/src/components/Stores/BusinessDeviceDetail/styles.js +11 -0
  93. package/src/components/Stores/BusinessProductsListing/index.js +6 -2
  94. package/src/components/Stores/BusinessSalesChannel/index.js +12 -6
  95. package/src/components/Stores/BusinessSalesFacebook/FacebookProfile.js +2 -2
  96. package/src/components/Stores/BusinessSalesFacebook/index.js +3 -3
  97. package/src/components/Stores/BusinessSalesGoogle/index.js +3 -3
  98. package/src/components/Stores/BusinessSalesInstagram/AdvancedInstagram.js +2 -2
  99. package/src/components/Stores/BusinessSalesInstagram/GeneralInstagram.js +2 -2
  100. package/src/components/Stores/BusinessSalesInstagram/index.js +3 -3
  101. package/src/components/Stores/BusinessSummary/index.js +6 -2
  102. package/src/components/Users/CustomersListing/index.js +2 -3
  103. package/src/utils/index.js +59 -1
  104. package/template/app.js +76 -3
  105. package/template/config.json +1 -0
  106. /package/_bundles/{ordering-ui-admin.152c2c4d99f05215f0c3.js.LICENSE.txt → ordering-ui-admin.0c354f3e7da49f56465b.js.LICENSE.txt} +0 -0
@@ -0,0 +1,168 @@
1
+ import React, { useState, useRef, useEffect } from 'react'
2
+ import { useLanguage, ExamineClick, DragAndDrop, UploadAudio as UploadAudioController } from 'ordering-components-admin-external'
3
+ import { CloudUploadFill, FileMusicFill } from 'react-bootstrap-icons'
4
+ import { Button, Input } from '../../../styles'
5
+ import { bytesConverter } from '../../../utils'
6
+ import { Alert } from '../../Shared'
7
+ import {
8
+ Container,
9
+ FileUploadBox,
10
+ UploadIconBox,
11
+ Or,
12
+ FormControl,
13
+ ButtonGroup,
14
+ PdfIconBox
15
+ } from './styles'
16
+ import Skeleton from 'react-loading-skeleton'
17
+
18
+ const UploadAudioUI = (props) => {
19
+ const { onClose, formState, changeFormState, handleUploadAudio } = props
20
+
21
+ const [, t] = useLanguage()
22
+ const [alertState, setAlertState] = useState({ open: false, content: [] })
23
+
24
+ const fileRef = useRef(null)
25
+
26
+ const closeAlert = () => {
27
+ setAlertState({
28
+ open: false,
29
+ content: []
30
+ })
31
+ }
32
+
33
+ const handleFiles = (files) => {
34
+ if (files.length === 1) {
35
+ const type = files[0].type
36
+ if (type?.split('/')[0] !== 'audio' && type !== 'audio/mpeg' && type !== 'audio/ogg') {
37
+ setAlertState({
38
+ open: true,
39
+ content: [t('ERROR_ONLY_AUDIO', 'Only audio files can be accepted')]
40
+ })
41
+ return
42
+ }
43
+
44
+ if (bytesConverter(files[0]?.size) > 512) {
45
+ setAlertState({
46
+ open: true,
47
+ content: [t('FILE_MAXIMUM_SIZE', 'The maximum file size is 500 kilobytes')]
48
+ })
49
+ return
50
+ }
51
+ const reader = new window.FileReader()
52
+ reader.readAsDataURL(files[0])
53
+ reader.onload = () => {
54
+ changeFormState({ file: reader.result, type: type === 'application/pdf' ? 'pdf' : 'image' })
55
+ }
56
+ reader.onerror = error => console.log(error)
57
+ }
58
+ }
59
+
60
+ const handleSendRequest = () => {
61
+ if (formState?.changes?.file || formState?.changes?.url) {
62
+ handleUploadAudio()
63
+ return
64
+ }
65
+ if (!formState?.changes?.file) {
66
+ setAlertState({
67
+ open: true,
68
+ content: t('AUDIO_FILE_IS_REQUIRED', 'Audio file is required!')
69
+ })
70
+ return
71
+ }
72
+ if (!formState?.changes?.url) {
73
+ setAlertState({
74
+ open: true,
75
+ content: t('URL_IS_REQUIRED', 'URL is required')
76
+ })
77
+ }
78
+ }
79
+
80
+ useEffect(() => {
81
+ if (formState?.error) {
82
+ setAlertState({
83
+ open: true,
84
+ content: formState.error
85
+ })
86
+ }
87
+ }, [formState?.error])
88
+
89
+ return (
90
+ <>
91
+ <Container>
92
+ <h2>{t('UPLOAD_YOUR_CUSTOM_SOUNDS', 'Upload your custom sounds')}</h2>
93
+ <p>{t('UPLOAD_CUSTOM_SOUNDS_DESC', 'Click to upload your custom sounds or share your custom sounds link')}</p>
94
+ <FileUploadBox onClick={() => fileRef.current.click()}>
95
+ {formState?.loading ? (
96
+ <Skeleton height={150} />
97
+ ) : (
98
+ <ExamineClick
99
+ onFiles={files => handleFiles(files)}
100
+ childRef={(e) => { fileRef.current = e }}
101
+ accept='.mp3, .aac, .ogg'
102
+ >
103
+ <DragAndDrop
104
+ onDrop={dataTransfer => handleFiles(dataTransfer.files)}
105
+ accept='.mp3, .aac, .ogg'
106
+ >
107
+ {formState?.changes?.file && (
108
+ <PdfIconBox><FileMusicFill /></PdfIconBox>
109
+ )}
110
+ <UploadIconBox>
111
+ <div>
112
+ <CloudUploadFill />
113
+ <p>{t('DRAG_AND_DROP', 'Drag and drop')}</p>
114
+ </div>
115
+ </UploadIconBox>
116
+ </DragAndDrop>
117
+ </ExamineClick>
118
+ )}
119
+ </FileUploadBox>
120
+ <Or>{t('OR', 'Or')}</Or>
121
+ <FormControl>
122
+ <label>{t('SHARE_CUSTOM_SOUNDS_LINK', 'Share your custom sounds link')}</label>
123
+ {formState?.loading ? (
124
+ <Skeleton height={44} />
125
+ ) : (
126
+ <Input
127
+ placeholder={t('URL', 'URL')}
128
+ defaultValue={formState?.changes?.url}
129
+ onChange={(e) => changeFormState({ url: e.target.value })}
130
+ />
131
+ )}
132
+ </FormControl>
133
+ <ButtonGroup>
134
+ <Button
135
+ color='primary'
136
+ outline
137
+ onClick={onClose}
138
+ >
139
+ {t('CANCEL', 'Cancel')}
140
+ </Button>
141
+ <Button
142
+ color='primary'
143
+ onClick={() => handleSendRequest()}
144
+ >
145
+ {t('UPLOAD', 'Upload')}
146
+ </Button>
147
+ </ButtonGroup>
148
+ </Container>
149
+ <Alert
150
+ title={t('ORDERING', 'Ordering')}
151
+ content={alertState.content}
152
+ acceptText={t('ACCEPT', 'Accept')}
153
+ open={alertState.open}
154
+ onClose={() => closeAlert()}
155
+ onAccept={() => closeAlert()}
156
+ closeOnBackdrop={false}
157
+ />
158
+ </>
159
+ )
160
+ }
161
+
162
+ export const UploadAudio = (props) => {
163
+ const uploadAudioProps = {
164
+ ...props,
165
+ UIComponent: UploadAudioUI
166
+ }
167
+ return <UploadAudioController {...uploadAudioProps} />
168
+ }
@@ -0,0 +1,120 @@
1
+ import styled from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ > h2 {
5
+ font-weight: 600;
6
+ font-size: 24px;
7
+ line-height: 36px;
8
+ text-align: center;
9
+ margin-top: 0;
10
+ margin-bottom: 8px;
11
+ }
12
+ > p {
13
+ width: 100%;
14
+ font-weight: 400;
15
+ font-size: 12px;
16
+ line-height: 18px;
17
+ text-align: center;
18
+ margin: 0 auto;
19
+ }
20
+
21
+ @media (min-width: 768px) {
22
+ > p {
23
+ width: 80%;
24
+ }
25
+ }
26
+ `
27
+
28
+ export const FileUploadBox = styled.div`
29
+ height: 210px;
30
+ margin-top: 35px;
31
+ border-radius: 8px;
32
+ background-color: ${props => props.theme.colors.borderColor};
33
+ position: relative;
34
+ overflow: hidden;
35
+ cursor: -webkit-grab;
36
+ cursor: grab;
37
+ img, div {
38
+ width: 100%;
39
+ overflow: hidden;
40
+ height: 100%;
41
+ }
42
+ img {
43
+ object-fit: contain;
44
+ }
45
+ `
46
+
47
+ export const UploadIconBox = styled.div`
48
+ position: absolute;
49
+ top: 0px;
50
+ > div {
51
+ color: ${props => props.theme.colors.secundaryLight};
52
+ display: flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ flex-direction: column;
56
+ svg {
57
+ width: 43px;
58
+ font-size: 40px;
59
+ }
60
+ p {
61
+ font-weight: 400;
62
+ font-size: 12px;
63
+ line-height: 18px;
64
+ margin-bottom: 0;
65
+ margin-top: 8px;
66
+ }
67
+ }
68
+ `
69
+
70
+ export const Or = styled.h6`
71
+ text-align: center;
72
+ font-weight: 400;
73
+ font-size: 14px;
74
+ line-height: 24px;
75
+ margin: 27px 0;
76
+ `
77
+
78
+ export const FormControl = styled.div`
79
+ label {
80
+ font-weight: 400;
81
+ font-size: 14px;
82
+ line-height: 24px;
83
+ margin-bottom: 13px;
84
+ }
85
+ input {
86
+ width: 100%;
87
+ border-radius: 8px;
88
+ height: 44px;
89
+ }
90
+ `
91
+
92
+ export const ButtonGroup = styled.div`
93
+ display: flex;
94
+ flex-direction: column;
95
+ padding-top: 30px;
96
+ > button {
97
+ width: 100%;
98
+ margin-top: 15px;
99
+ height: 44px;
100
+ border-radius: 8px;
101
+ }
102
+
103
+ @media (min-width: 576px) {
104
+ justify-content: space-between;
105
+ flex-direction: row;
106
+ > button {
107
+ width: 48%;
108
+ }
109
+ }
110
+ `
111
+
112
+ export const PdfIconBox = styled.div`
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ svg {
117
+ font-size: 150px;
118
+ color: ${props => props.theme.colors.danger};
119
+ }
120
+ `
@@ -7,6 +7,7 @@ import { CallCenterApp } from './CallCenterApp'
7
7
  import { KioskApp } from './KioskApp'
8
8
  import { CustomProject } from './CustomProject'
9
9
  import { OrderingWidgets } from './OrderingWidgets'
10
+ import { UploadAudio } from './UploadAudio'
10
11
 
11
12
  export {
12
13
  OrderingWebsite,
@@ -17,5 +18,6 @@ export {
17
18
  CallCenterApp,
18
19
  KioskApp,
19
20
  CustomProject,
20
- OrderingWidgets
21
+ OrderingWidgets,
22
+ UploadAudio
21
23
  }
@@ -146,6 +146,7 @@ export const DeliveriesLocation = (props) => {
146
146
  }, [interActionMapOrder])
147
147
 
148
148
  const handleMapChange = (data) => {
149
+ if(!data?.zoom) return
149
150
  setMapZoom(data?.zoom)
150
151
  }
151
152
 
@@ -18,6 +18,7 @@ export const OrderBill = (props) => {
18
18
  handleOrderRefund
19
19
  } = props
20
20
 
21
+ const isGiftCardOrder = order?.products?.[0]?.type === 'gift_card'
21
22
  const [, t] = useLanguage()
22
23
  const [{ parsePrice, parseNumber }] = useUtils()
23
24
  const [{ configs }] = useConfig()
@@ -262,11 +263,13 @@ export const OrderBill = (props) => {
262
263
  </tbody>
263
264
  </table>
264
265
  )}
265
- <RefundToWallet
266
- order={order}
267
- actionStatus={actionStatus}
268
- handleOrderRefund={handleOrderRefund}
269
- />
266
+ {!isGiftCardOrder && (
267
+ <RefundToWallet
268
+ order={order}
269
+ actionStatus={actionStatus}
270
+ handleOrderRefund={handleOrderRefund}
271
+ />
272
+ )}
270
273
  {order?.payment_events?.filter(item => item.event === 'refund').length > 0 && (
271
274
  <table className='payments'>
272
275
  <thead>
@@ -352,7 +355,7 @@ export const OrderBill = (props) => {
352
355
  </table>
353
356
  )}
354
357
 
355
- {!order?.refund_data && stripePaymethods.includes(order?.paymethod?.gateway) && (
358
+ {!isGiftCardOrder && !order?.refund_data && stripePaymethods.includes(order?.paymethod?.gateway) && (
356
359
  <RefundButtonWrapper>
357
360
  <Button
358
361
  color='primary'
@@ -130,7 +130,11 @@ export const OrderContactInformation = (props) => {
130
130
  </PhotoWrapper>
131
131
  <InfoContent>
132
132
  <div>
133
- <p className='name'>{order?.customer?.name} {order?.customer?.middle_name} {order?.customer?.lastname} {order?.customer?.second_lastname}</p>
133
+ {(order?.customer?.name || order?.customer?.middle_name || order?.customer?.lastname || order?.customer?.second_lastname) ? (
134
+ <p className='name'>{order?.customer?.name} {order?.customer?.middle_name} {order?.customer?.lastname} {order?.customer?.second_lastname}</p>
135
+ ) : (
136
+ (!order?.customer?.email || !order?.customer?.phone) && <p className='name'>{t('GUEST_USER', 'Guest user')}</p>
137
+ )}
134
138
  {order?.customer?.cellphone && (
135
139
  <IconButton
136
140
  onClick={() => window.open(`tel:${order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''}${order?.customer?.cellphone}`)}
@@ -15,6 +15,7 @@ import { NotFoundSource, Modal } from '../../Shared'
15
15
  import { IconButton } from '../../../styles'
16
16
  import { OrderToPrint } from '../OrderToPrint'
17
17
  import { OrderToPrintTicket } from '../OrderToPrintTicket'
18
+ import { getOrderStatuPickUp, getOrderStatus } from '../../../utils'
18
19
 
19
20
  import {
20
21
  Container,
@@ -77,37 +78,6 @@ const OrderDetailsUI = (props) => {
77
78
  } = props.order
78
79
 
79
80
  const rejectResonStatuses = [6, 9, 10, 11, 12, 14]
80
- const getOrderStatus = (status) => {
81
- const orderStatus = [
82
- { key: 0, value: 'Pending Order', slug: 'PENDING_ORDER', percentage: 10 },
83
- { key: 1, value: 'Completed by admin', slug: 'COMPLETED_BY_ADMIN', percentage: 100 },
84
- { key: 2, value: 'Reject by admin', slug: 'REJECT_BY_ADMIN', percentage: 0 },
85
- { key: 3, value: 'Driver arrived by business', slug: 'DRIVER_IN_BUSINESS', percentage: 60 },
86
- { key: 4, value: 'Preparation Completed', slug: 'PREPARATION_COMPLETED', percentage: 20 },
87
- { key: 5, value: 'Reject by business', slug: 'REJECT_BY_BUSINESS', percentage: 0 },
88
- { key: 6, value: 'Reject by driver', slug: 'REJECT_BY_DRIVER', percentage: 0 },
89
- { key: 7, value: 'Accepted by business', slug: 'ACCEPTED_BY_BUSINESS', percentage: 15 },
90
- { key: 8, value: 'Accepted by driver', slug: 'ACCEPTED_BY_DRIVER', percentage: 40 },
91
- { key: 9, value: 'Pick up completed by driver', slug: 'PICK_UP_COMPLETED_BY_DRIVER', percentage: 70 },
92
- { key: 10, value: 'Pick up Failed by driver', slug: 'PICK_UP_FAILED_BY_DRIVER', percentage: 0 },
93
- { key: 11, value: 'Delivery completed by driver', slug: 'DELIVERY_COMPLETED_BY_DRIVER', percentage: 100 },
94
- { key: 12, value: 'Delivery Failed by driver', slug: 'DELIVERY_FAILED_BY_DRIVER', percentage: 0 },
95
- { key: 13, value: 'Preorder', slug: 'PREORDER', percentage: 0 },
96
- { key: 14, value: 'Order not ready', slug: 'ORDER_NOT_READY', percentage: 15 },
97
- { key: 15, value: 'Pickup completed by customer', slug: 'PICKUP_COMPLETED_BY_CUSTOMER', percentage: 100 },
98
- { key: 16, value: 'Canceled by customer', slug: 'CANCELED_BY_CUSTOMER', percentage: 0 },
99
- { key: 17, value: 'Not picked by customer', slug: 'NOT_PICKED_BY_CUSTOMER', percentage: 0 },
100
- { key: 18, value: 'Driver almost arrived to business', slug: 'DRIVER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 50 },
101
- { key: 19, value: 'Driver almost arrived to customer', slug: 'DRIVER_ALMOST_ARRIVED_TO_CUSTOMER', percentage: 90 },
102
- { key: 20, value: 'Customer almost arrived to business', slug: 'CUSTOMER_ALMOST_ARRIVED_TO_BUSINESS', percentage: 90 },
103
- { key: 21, value: 'Customer arrived to business', slug: 'CUSTOMER_ARRIVED_TO_BUSINESS', percentage: 90 },
104
- { key: 22, value: 'Looking for driver', slug: 'ORDER_LOOKING_FOR_DRIVER', percentage: 30 },
105
- { key: 23, value: 'Driver on way', slug: 'ORDER_DRIVER_ON_WAY', percentage: 80 }
106
- ]
107
-
108
- const objectStatus = orderStatus.find((o) => o.key === status)
109
- return objectStatus && objectStatus
110
- }
111
81
 
112
82
  const getLogisticTag = (status) => {
113
83
  switch (parseInt(status)) {
@@ -302,6 +272,8 @@ const OrderDetailsUI = (props) => {
302
272
  }
303
273
  }, [loading])
304
274
 
275
+ const progressBarObjt = order?.delivery_type && order?.delivery_type === 2 ? getOrderStatuPickUp : getOrderStatus
276
+
305
277
  return (
306
278
  <Container
307
279
  isSelectedOrders={isSelectedOrders}
@@ -367,10 +339,10 @@ const OrderDetailsUI = (props) => {
367
339
  <p>
368
340
  {t('SPOT', 'Spot')}: {order?.place?.name}
369
341
  </p>
370
- </PlaceSpotContainer>
342
+ </PlaceSpotContainer>
371
343
  )}
372
344
  <StatusBarContainer>
373
- <StatusBar percentage={getOrderStatus(order?.status)?.percentage} />
345
+ <StatusBar percentage={progressBarObjt(order?.status)?.percentage} />
374
346
  </StatusBarContainer>
375
347
  <AdvancedLogistic>
376
348
  <div>
@@ -542,7 +514,7 @@ const OrderDetailsUI = (props) => {
542
514
  ref={printRef}
543
515
  order={order}
544
516
  placeSpotEnabled={placeSpotEnabled}
545
- getOrderStatus={getOrderStatus}
517
+ getOrderStatus={progressBarObjt}
546
518
  getLogisticTag={getLogisticTag}
547
519
  getPriorityTag={getPriorityTag}
548
520
  />
@@ -551,7 +523,7 @@ const OrderDetailsUI = (props) => {
551
523
  <OrderToPrintTicket
552
524
  ref={printTicketRef}
553
525
  order={order}
554
- getOrderStatus={getOrderStatus}
526
+ getOrderStatus={progressBarObjt}
555
527
  />
556
528
  )}
557
529
  </Container>
@@ -734,7 +734,9 @@ export const OrdersTable = (props) => {
734
734
  </OrdersCountWrapper>
735
735
  </WrapperImage>
736
736
  <div className='info'>
737
- <p className='bold'>{order?.customer?.name}</p>
737
+ <p className='bold'>
738
+ {(!order?.customer?.email && !order?.customer?.cellphone && !order?.customer?.name) ? t('GUEST_USER', 'Guest user') : order?.customer?.name}
739
+ </p>
738
740
  <p>{order?.customer?.cellphone}</p>
739
741
  </div>
740
742
  </CustomerInfo>
@@ -33,6 +33,8 @@ const NotificationSettingUI = (props) => {
33
33
  'onesignal_orderingapp_id',
34
34
  'onesignal_businessapp_id',
35
35
  'onesignal_deliveryapp_id',
36
+ 'onesignal_orderingweb_id',
37
+ 'onesignal_dashboardweb_id',
36
38
  'driver_close_distance',
37
39
  'notification_toast'
38
40
  ]
@@ -190,22 +190,22 @@ export const SettingsListUI = (props) => {
190
190
  <p>{config?.description}</p>
191
191
  )}
192
192
  {
193
- config?.options?.length > 0 && config?.options?.map((item, j) => (
194
- <FormGroupWrapper key={j}>
195
- <FormGroupCheck className='checkbox'>
196
- <label>
197
- <input
198
- type='checkbox'
199
- name={item?.value}
200
- data-id={config?.id}
201
- defaultChecked={config?.value.split('|').includes(item?.value)}
202
- onChange={(e) => handleCheckBoxChange(e, true, config?.value)}
203
- />
204
- {t(item.text.toUpperCase())}
205
- </label>
206
- </FormGroupCheck>
207
- </FormGroupWrapper>
208
- ))
193
+ config?.options?.length > 0 && config?.options?.map((item, j) => (
194
+ <FormGroupWrapper key={j}>
195
+ <FormGroupCheck className='checkbox'>
196
+ <label>
197
+ <input
198
+ type='checkbox'
199
+ name={item?.value}
200
+ data-id={config?.id}
201
+ defaultChecked={config?.value.split('|').includes(item?.value)}
202
+ onChange={(e) => handleCheckBoxChange(e, true, config?.value)}
203
+ />
204
+ {t(item.text.toUpperCase(), item.text.replace(/_/g, ' ').toLowerCase())}
205
+ </label>
206
+ </FormGroupCheck>
207
+ </FormGroupWrapper>
208
+ ))
209
209
  }
210
210
  {
211
211
  !config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>
@@ -236,22 +236,22 @@ export const SettingsListUI = (props) => {
236
236
  <p>{config?.description}</p>
237
237
  )}
238
238
  {
239
- config?.options?.length > 0 && config?.options?.map((item, j) => (
240
- <FormGroupWrapper key={j}>
241
- <FormGroupCheck className='checkbox'>
242
- <label>
243
- <input
244
- type='checkbox'
245
- name={item?.value}
246
- data-id={config?.id}
247
- defaultChecked={JSON.parse(config?.value).includes(parseInt(item?.value))}
248
- onChange={(e) => handleCheckBoxChange(e, false, config?.value)}
249
- />
250
- {item.text}
251
- </label>
252
- </FormGroupCheck>
253
- </FormGroupWrapper>
254
- ))
239
+ config?.options?.length > 0 && config?.options?.map((item, j) => (
240
+ <FormGroupWrapper key={j}>
241
+ <FormGroupCheck className='checkbox'>
242
+ <label>
243
+ <input
244
+ type='checkbox'
245
+ name={item?.value}
246
+ data-id={config?.id}
247
+ defaultChecked={JSON.parse(config?.value).includes(parseInt(item?.value))}
248
+ onChange={(e) => handleCheckBoxChange(e, false, config?.value)}
249
+ />
250
+ {item.text}
251
+ </label>
252
+ </FormGroupCheck>
253
+ </FormGroupWrapper>
254
+ ))
255
255
  }
256
256
  {!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>}
257
257
  </CheckBoxWrapper>
@@ -267,27 +267,27 @@ export const SettingsListUI = (props) => {
267
267
  )
268
268
  }
269
269
  {/* {config.type === 6 && (
270
- <>
271
- <FormGroupText className='form-group'>
272
- <label>{config?.name}</label>
273
- {config?.description && <Description>{config?.description}</Description>}
274
- {config?.value?.split('|')?.filter(value => valuesTypeSix.includes(value?.split(',')[0]))?.map((value, i, hash) => (
275
- <React.Fragment key={`${config?.id} ${value}`}>
276
- <Description typeSix>{t(value?.split(',')[0], value?.split(',')[0].replace('_', ' '))}</Description>
277
- <input
278
- type='text'
279
- defaultValue={value?.split(',')[1]}
280
- onChange={(e) => handleChangeTypeSix({
281
- value: e.target.value,
282
- type: value?.split(',')[0]
283
- }, config)}
284
- className='form-control'
285
- placeholder={0}
286
- />
287
- </React.Fragment>
288
- ))}
289
- </FormGroupText>
290
- </>
270
+ <>
271
+ <FormGroupText className='form-group'>
272
+ <label>{config?.name}</label>
273
+ {config?.description && <Description>{config?.description}</Description>}
274
+ {config?.value?.split('|')?.filter(value => valuesTypeSix.includes(value?.split(',')[0]))?.map((value, i, hash) => (
275
+ <React.Fragment key={`${config?.id} ${value}`}>
276
+ <Description typeSix>{t(value?.split(',')[0], value?.split(',')[0].replace('_', ' '))}</Description>
277
+ <input
278
+ type='text'
279
+ defaultValue={value?.split(',')[1]}
280
+ onChange={(e) => handleChangeTypeSix({
281
+ value: e.target.value,
282
+ type: value?.split(',')[0]
283
+ }, config)}
284
+ className='form-control'
285
+ placeholder={0}
286
+ />
287
+ </React.Fragment>
288
+ ))}
289
+ </FormGroupText>
290
+ </>
291
291
  )} */}
292
292
  </div>
293
293
  )
@@ -61,6 +61,7 @@ export const FormGroupCheck = styled.div`
61
61
  display: flex;
62
62
  align-items: center;
63
63
  color: ${props => props.theme.colors.headingColor};
64
+ text-transform: capitalize;
64
65
  }
65
66
  `
66
67
 
@@ -87,7 +88,7 @@ export const CheckBoxWrapper = styled.div`
87
88
 
88
89
  > label {
89
90
  font-weight: 600;
90
- margin: 20px 0 0;
91
+ margin: 0px;
91
92
  font-size: 14px;
92
93
  color: ${props => props.theme.colors.headingColor};
93
94
  }
@@ -21,7 +21,7 @@ export const SettingsSelectUI = (props) => {
21
21
  const [, t] = useLanguage()
22
22
 
23
23
  const [options, setOptions] = useState(null)
24
-
24
+
25
25
  useEffect(() => {
26
26
  if (!config) return
27
27
  if (config.key === 'terms_and_conditions') {
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react'
2
2
  import parsePhoneNumber from 'libphonenumber-js'
3
3
  import PhoneInput from 'react-phone-number-input'
4
4
  import { useLanguage, useConfig, useSession } from 'ordering-components-admin-external'
5
-
5
+ import { findExitingCode } from '../../../utils'
6
6
  import { Container, ErrorMsg } from './styles'
7
7
 
8
8
  export const InputPhoneNumber = (props) => {
@@ -42,7 +42,7 @@ export const InputPhoneNumber = (props) => {
42
42
  <PhoneInput
43
43
  disabled={disabled}
44
44
  placeholder={t('PHONE_NUMBER', 'Phone number')}
45
- defaultCountry={configs?.default_country_code?.value}
45
+ defaultCountry={findExitingCode(configs?.default_country_code?.value?.toUpperCase())}
46
46
  value={value}
47
47
  displayInitialValueAsLocalNumber
48
48
  onChange={(val) => setValue && setValue(val, isValidPhoneNumber(val))}
@@ -504,6 +504,7 @@ const SidebarMenuUI = (props) => {
504
504
  <MenuContent>
505
505
  {ordersSubMenus.map(item => (
506
506
  !(sessionState?.user?.level === 2 && item.pageName === 'drivers') &&
507
+ !((sessionState?.user?.level === 2 || sessionState?.user?.level === 5) && item.pageName === 'giftCards') &&
507
508
  !(sessionState?.user?.level === 5 && item.pageName === 'appointments') && (
508
509
  item.pageName === 'appointments' ? (
509
510
  isEnabledAppointmentsFeature && (