ordering-ui-admin-external 1.30.7 → 1.31.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 (160) hide show
  1. package/_bundles/{ordering-ui-admin.a29dbc53a1f823ce0ce5.js → ordering-ui-admin.2f5049887bf500c65392.js} +2 -2
  2. package/_modules/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +80 -47
  3. package/_modules/components/BusinessIntelligence/BusinessAnalytics/index.js +2 -1
  4. package/_modules/components/BusinessIntelligence/BusinessAnalytics/styles.js +6 -4
  5. package/_modules/components/BusinessIntelligence/ReportsAverageSales/index.js +3 -2
  6. package/_modules/components/BusinessIntelligence/ReportsAverageSales/styles.js +13 -3
  7. package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/index.js +3 -2
  8. package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +13 -3
  9. package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/index.js +3 -2
  10. package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +13 -3
  11. package/_modules/components/BusinessIntelligence/ReportsCustomer/index.js +3 -2
  12. package/_modules/components/BusinessIntelligence/ReportsCustomer/styles.js +13 -3
  13. package/_modules/components/BusinessIntelligence/ReportsDriverDistance/index.js +4 -3
  14. package/_modules/components/BusinessIntelligence/ReportsDriverDistance/styles.js +13 -3
  15. package/_modules/components/BusinessIntelligence/ReportsDriverOrder/index.js +3 -2
  16. package/_modules/components/BusinessIntelligence/ReportsDriverOrder/styles.js +13 -3
  17. package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +3 -2
  18. package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +13 -3
  19. package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/index.js +4 -3
  20. package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +13 -3
  21. package/_modules/components/BusinessIntelligence/ReportsDriverSpend/index.js +3 -2
  22. package/_modules/components/BusinessIntelligence/ReportsDriverSpend/styles.js +13 -3
  23. package/_modules/components/BusinessIntelligence/ReportsGeneralSales/index.js +3 -2
  24. package/_modules/components/BusinessIntelligence/ReportsGeneralSales/styles.js +13 -3
  25. package/_modules/components/BusinessIntelligence/ReportsHeatMap/index.js +3 -2
  26. package/_modules/components/BusinessIntelligence/ReportsHeatMap/styles.js +13 -3
  27. package/_modules/components/BusinessIntelligence/ReportsOrderDistance/index.js +3 -2
  28. package/_modules/components/BusinessIntelligence/ReportsOrderDistance/styles.js +13 -3
  29. package/_modules/components/BusinessIntelligence/ReportsOrderStatus/index.js +4 -3
  30. package/_modules/components/BusinessIntelligence/ReportsOrderStatus/styles.js +13 -3
  31. package/_modules/components/BusinessIntelligence/ReportsOrders/index.js +3 -2
  32. package/_modules/components/BusinessIntelligence/ReportsOrders/styles.js +13 -3
  33. package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/index.js +3 -2
  34. package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +13 -3
  35. package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +3 -2
  36. package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +13 -3
  37. package/_modules/components/BusinessIntelligence/ReportsSales/index.js +3 -2
  38. package/_modules/components/BusinessIntelligence/ReportsSales/styles.js +13 -3
  39. package/_modules/components/BusinessIntelligence/ReportsSpentTIme/index.js +3 -2
  40. package/_modules/components/BusinessIntelligence/ReportsSpentTIme/styles.js +13 -3
  41. package/_modules/components/BusinessIntelligence/ReportsTopDrivers/index.js +3 -2
  42. package/_modules/components/BusinessIntelligence/ReportsTopDrivers/styles.js +13 -3
  43. package/_modules/components/BusinessIntelligence/ReportsUsers/index.js +3 -2
  44. package/_modules/components/BusinessIntelligence/ReportsUsers/styles.js +13 -3
  45. package/_modules/components/Delivery/AddressList/index.js +15 -5
  46. package/_modules/components/Home/HomePage/index.js +3 -2
  47. package/_modules/components/MyProducts/OrderingWebsite/index.js +25 -18
  48. package/_modules/components/MyProducts/OrderingWebsite/styles.js +1 -1
  49. package/_modules/components/Orders/AllInOne/index.js +15 -6
  50. package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +102 -9
  51. package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +19 -3
  52. package/_modules/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
  53. package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/index.js +21 -9
  54. package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +8 -5
  55. package/_modules/components/Orders/DeliveriesManager/index.js +11 -2
  56. package/_modules/components/Orders/DeliveryDashboard/index.js +6 -6
  57. package/_modules/components/Orders/OrderNotification/index.js +43 -14
  58. package/_modules/components/Orders/OrderNotification/styles.js +18 -3
  59. package/_modules/components/Orders/OrderStatusFilterBar/index.js +6 -6
  60. package/_modules/components/Orders/OrdersContentHeader/index.js +11 -2
  61. package/_modules/components/Orders/OrdersContentHeader/styles.js +20 -4
  62. package/_modules/components/Orders/OrdersDashboardList/index.js +34 -5
  63. package/_modules/components/Orders/OrdersFilterGroup/index.js +18 -1
  64. package/_modules/components/Orders/OrdersListing/index.js +6 -0
  65. package/_modules/components/Orders/OrdersManager/index.js +16 -7
  66. package/_modules/components/Orders/WebsocketStatus/index.js +6 -1
  67. package/_modules/components/Settings/WebhookListSelector/index.js +6 -0
  68. package/_modules/components/Shared/InputPhoneNumber/index.js +2 -3
  69. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +6 -2
  70. package/_modules/components/Stores/BusinessDeviceDetail/index.js +1 -1
  71. package/_modules/components/Stores/BusinessProductsListing/index.js +5 -1
  72. package/_modules/components/Stores/BusinessSummary/index.js +7 -4
  73. package/_modules/components/Stores/BusinessWebhooks/index.js +6 -0
  74. package/_modules/components/Stores/ProductExtraOptionDetails/index.js +6 -1
  75. package/_modules/components/Stores/ProductExtraOptions/index.js +8 -2
  76. package/_modules/components/Stores/ProductExtraSuboption/index.js +6 -1
  77. package/_modules/components/Stores/ProductExtras/index.js +8 -3
  78. package/_modules/components/Stores/ProductSummary/index.js +4 -1
  79. package/_modules/components/Users/UserAddForm/index.js +0 -2
  80. package/package.json +2 -2
  81. package/src/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +39 -17
  82. package/src/components/BusinessIntelligence/BusinessAnalytics/index.js +6 -1
  83. package/src/components/BusinessIntelligence/BusinessAnalytics/styles.js +2 -0
  84. package/src/components/BusinessIntelligence/ReportsAverageSales/index.js +15 -7
  85. package/src/components/BusinessIntelligence/ReportsAverageSales/styles.js +34 -0
  86. package/src/components/BusinessIntelligence/ReportsBusinessDistance/index.js +9 -1
  87. package/src/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +34 -0
  88. package/src/components/BusinessIntelligence/ReportsBusinessSpend/index.js +9 -1
  89. package/src/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +34 -0
  90. package/src/components/BusinessIntelligence/ReportsCustomer/index.js +15 -7
  91. package/src/components/BusinessIntelligence/ReportsCustomer/styles.js +34 -0
  92. package/src/components/BusinessIntelligence/ReportsDriverDistance/index.js +10 -2
  93. package/src/components/BusinessIntelligence/ReportsDriverDistance/styles.js +34 -0
  94. package/src/components/BusinessIntelligence/ReportsDriverOrder/index.js +9 -1
  95. package/src/components/BusinessIntelligence/ReportsDriverOrder/styles.js +34 -0
  96. package/src/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +9 -1
  97. package/src/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +34 -0
  98. package/src/components/BusinessIntelligence/ReportsDriverSchedule/index.js +16 -8
  99. package/src/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +34 -0
  100. package/src/components/BusinessIntelligence/ReportsDriverSpend/index.js +9 -1
  101. package/src/components/BusinessIntelligence/ReportsDriverSpend/styles.js +34 -0
  102. package/src/components/BusinessIntelligence/ReportsGeneralSales/index.js +9 -1
  103. package/src/components/BusinessIntelligence/ReportsGeneralSales/styles.js +34 -0
  104. package/src/components/BusinessIntelligence/ReportsHeatMap/index.js +9 -1
  105. package/src/components/BusinessIntelligence/ReportsHeatMap/styles.js +34 -0
  106. package/src/components/BusinessIntelligence/ReportsOrderDistance/index.js +10 -1
  107. package/src/components/BusinessIntelligence/ReportsOrderDistance/styles.js +34 -0
  108. package/src/components/BusinessIntelligence/ReportsOrderStatus/index.js +10 -2
  109. package/src/components/BusinessIntelligence/ReportsOrderStatus/styles.js +34 -0
  110. package/src/components/BusinessIntelligence/ReportsOrders/index.js +9 -1
  111. package/src/components/BusinessIntelligence/ReportsOrders/styles.js +34 -0
  112. package/src/components/BusinessIntelligence/ReportsPaymethodSales/index.js +9 -1
  113. package/src/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +34 -0
  114. package/src/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +9 -1
  115. package/src/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +34 -0
  116. package/src/components/BusinessIntelligence/ReportsSales/index.js +9 -1
  117. package/src/components/BusinessIntelligence/ReportsSales/styles.js +34 -0
  118. package/src/components/BusinessIntelligence/ReportsSpentTIme/index.js +15 -7
  119. package/src/components/BusinessIntelligence/ReportsSpentTIme/styles.js +34 -0
  120. package/src/components/BusinessIntelligence/ReportsTopDrivers/index.js +9 -2
  121. package/src/components/BusinessIntelligence/ReportsTopDrivers/styles.js +34 -0
  122. package/src/components/BusinessIntelligence/ReportsUsers/index.js +15 -7
  123. package/src/components/BusinessIntelligence/ReportsUsers/styles.js +34 -0
  124. package/src/components/Delivery/AddressList/index.js +11 -1
  125. package/src/components/Home/HomePage/index.js +5 -1
  126. package/src/components/MyProducts/OrderingWebsite/index.js +25 -12
  127. package/src/components/MyProducts/OrderingWebsite/styles.js +0 -2
  128. package/src/components/Orders/AllInOne/index.js +8 -2
  129. package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +118 -6
  130. package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +56 -0
  131. package/src/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
  132. package/src/components/Orders/CreateCustomOrder/SelectCustomer/index.js +19 -11
  133. package/src/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +3 -0
  134. package/src/components/Orders/DeliveriesManager/index.js +8 -2
  135. package/src/components/Orders/DeliveryDashboard/index.js +4 -4
  136. package/src/components/Orders/OrderNotification/index.js +31 -5
  137. package/src/components/Orders/OrderNotification/styles.js +37 -0
  138. package/src/components/Orders/OrderStatusFilterBar/index.js +10 -9
  139. package/src/components/Orders/OrdersContentHeader/index.js +17 -3
  140. package/src/components/Orders/OrdersContentHeader/styles.js +54 -0
  141. package/src/components/Orders/OrdersDashboardList/index.js +6 -1
  142. package/src/components/Orders/OrdersFilterGroup/index.js +16 -0
  143. package/src/components/Orders/OrdersListing/index.js +7 -0
  144. package/src/components/Orders/OrdersManager/index.js +11 -3
  145. package/src/components/Orders/WebsocketStatus/index.js +5 -2
  146. package/src/components/Settings/WebhookListSelector/index.js +3 -1
  147. package/src/components/Shared/InputPhoneNumber/index.js +2 -3
  148. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +16 -12
  149. package/src/components/Stores/BusinessDeviceDetail/index.js +1 -1
  150. package/src/components/Stores/BusinessProductsListing/index.js +4 -0
  151. package/src/components/Stores/BusinessSummary/index.js +21 -15
  152. package/src/components/Stores/BusinessWebhooks/index.js +3 -1
  153. package/src/components/Stores/ProductExtraOptionDetails/index.js +8 -0
  154. package/src/components/Stores/ProductExtraOptions/index.js +10 -1
  155. package/src/components/Stores/ProductExtraSuboption/index.js +7 -1
  156. package/src/components/Stores/ProductExtras/index.js +6 -1
  157. package/src/components/Stores/ProductSummary/index.js +7 -1
  158. package/src/components/Users/UserAddForm/index.js +0 -2
  159. package/template/config.json +1 -1
  160. /package/_bundles/{ordering-ui-admin.a29dbc53a1f823ce0ce5.js.LICENSE.txt → ordering-ui-admin.2f5049887bf500c65392.js.LICENSE.txt} +0 -0
@@ -89,6 +89,7 @@ export const SLAControlsWrapper = styled.div`
89
89
  `
90
90
 
91
91
  export const WrapperSearchAndFilter = styled.div`
92
+ position: relative;
92
93
  display: flex;
93
94
  align-items: center;
94
95
  margin-top: 10px;
@@ -127,3 +128,56 @@ export const WrapperSearchAndFilter = styled.div`
127
128
  `}
128
129
  }
129
130
  `
131
+ export const WarningMessage = styled.div`
132
+ position: absolute;
133
+ display: flex;
134
+ align-items: center;
135
+ z-index: 2000;
136
+ top: 100%;
137
+ background: ${props => props.theme.colors.warning100};
138
+ border: 1px solid ${props => props.theme.colors.warning};
139
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
140
+ border-radius: 7.6px;
141
+ padding: 6px 15px;
142
+ box-sizing: border-box;
143
+ margin: 10px 0px 0px 0px !important;
144
+
145
+ right: 0px;
146
+ ${props => props.theme?.rtl && css`
147
+ left: 0px;
148
+ right: initial;
149
+ `}
150
+
151
+ svg {
152
+ font-size: 20px;
153
+ color: ${props => props.theme.colors.warning};
154
+ }
155
+
156
+ span {
157
+ font-size: 12px;
158
+ line-height: 18px;
159
+ color: ${props => props.theme.colors.headingColor};
160
+ margin: 0 10px;
161
+ flex: 1;
162
+ }
163
+
164
+ a {
165
+ font-size: 12px;
166
+ white-space: nowrap;
167
+ }
168
+
169
+ @media (min-width: 768px) {
170
+ padding: 8px 20px;
171
+ font-size: 14px;
172
+ line-height: 24px;
173
+ right: 0px;
174
+ ${props => props.theme?.rtl && css`
175
+ left: 0px;
176
+ right: initial;
177
+ `}
178
+
179
+ span {
180
+ white-space: nowrap;
181
+ }
182
+ }
183
+ `
@@ -6,7 +6,8 @@ export const OrdersDashboardList = (props) => {
6
6
  const {
7
7
  selectedSubOrderStatus,
8
8
  isMessagesView,
9
- orderByOption
9
+ orderByOption,
10
+ setOrdersAmountByStatus
10
11
  } = props
11
12
 
12
13
  const OrdersCommonControlProps = {
@@ -40,24 +41,28 @@ export const OrdersDashboardList = (props) => {
40
41
  groupStatus='pending'
41
42
  {...OrdersCommonControlProps}
42
43
  orderStatus={selectedSubOrderStatus?.pending}
44
+ setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, pending: total }))}
43
45
  />
44
46
 
45
47
  <OrdersListController
46
48
  groupStatus='inProgress'
47
49
  {...OrdersCommonControlProps}
48
50
  orderStatus={selectedSubOrderStatus?.inProgress}
51
+ setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, inProgress: total }))}
49
52
  />
50
53
 
51
54
  <OrdersListController
52
55
  groupStatus='completed'
53
56
  {...OrdersCommonControlProps}
54
57
  orderStatus={selectedSubOrderStatus?.completed}
58
+ setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, completed: total }))}
55
59
  />
56
60
 
57
61
  <OrdersListController
58
62
  groupStatus='cancelled'
59
63
  {...OrdersCommonControlProps}
60
64
  orderStatus={selectedSubOrderStatus?.cancelled}
65
+ setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, cancelled: total }))}
61
66
  />
62
67
  </>
63
68
  )}
@@ -72,6 +72,11 @@ const OrdersFilterGroupUI = (props) => {
72
72
  { value: 4, content: <Option>{t('RESOLVED', 'Resolved')}<LogisticStatusDot status={4} /></Option> }
73
73
  ]
74
74
 
75
+ const assignedFilterOptions = [
76
+ { value: 0, content: <Option>{t('ASSIGNED', 'Assigned')}</Option> },
77
+ { value: 1, content: <Option>{t('UNASSIGNED', 'Unassigned')}</Option> }
78
+ ]
79
+
75
80
  const handleAcceptFilter = () => {
76
81
  handleChangeFilterValues(filterValues)
77
82
  handleCloseFilterModal()
@@ -203,6 +208,17 @@ const OrdersFilterGroupUI = (props) => {
203
208
  />
204
209
  </SelectWrapper>
205
210
  </WrapperRow>
211
+ <WrapperRow>
212
+ <SelectWrapper>
213
+ <Select
214
+ options={assignedFilterOptions}
215
+ className='select'
216
+ defaultValue={filterValues?.assigned ?? ''}
217
+ placeholder={t('SELECT_DRIVER_STATUS', 'Select a driver status')}
218
+ onChange={(value) => handleChangeChildFilterValue({ assigned: value })}
219
+ />
220
+ </SelectWrapper>
221
+ </WrapperRow>
206
222
  {filterValues?.metafield.map(item => (
207
223
  <WrapperRow key={item.id}>
208
224
  <Input
@@ -36,6 +36,7 @@ export const OrdersListing = (props) => {
36
36
  orderDetailId,
37
37
  filterValues,
38
38
  setFilterModalOpen,
39
+ setOrdersTotalAmount,
39
40
 
40
41
  isMessagesView,
41
42
  setSelectedOrderIds,
@@ -81,6 +82,12 @@ export const OrdersListing = (props) => {
81
82
  setFilterApplied(_filterApplied)
82
83
  }, [filterValues])
83
84
 
85
+ useEffect(() => {
86
+ if (!isNaN(pagination.total)) {
87
+ setOrdersTotalAmount && setOrdersTotalAmount(pagination.total)
88
+ }
89
+ }, [pagination.total])
90
+
84
91
  return (
85
92
  <>
86
93
  {((ordersStatusGroup === groupStatus) || isMessagesView) && (
@@ -45,7 +45,6 @@ const OrdersManagerUI = (props) => {
45
45
  handleSelectedSubOrderStatus,
46
46
  handleCustomOrderDetail,
47
47
  setSelectedOrderIds,
48
- numberOfOrdersByStatus,
49
48
  allowColumns,
50
49
  setAllowColumns,
51
50
  timeStatus,
@@ -66,6 +65,12 @@ const OrdersManagerUI = (props) => {
66
65
  const [isTourFlag, setIsTourFlag] = useState(false)
67
66
  const [alertState, setAlertState] = useState({ open: false, content: [] })
68
67
  const [slaSettingTime, setSlaSettingTime] = useState(60000)
68
+ const [ordersAmountByStatus, setOrdersAmountByStatus] = useState({
69
+ pending: null,
70
+ inProgress: null,
71
+ completed: null,
72
+ cancelled: null
73
+ })
69
74
 
70
75
  const [totalSelectedOrder, setTotalSelectedOrder] = useState(0)
71
76
  const handleBackRedirect = () => {
@@ -189,7 +194,7 @@ const OrdersManagerUI = (props) => {
189
194
  <OrderStatusFilterBar
190
195
  selectedOrderStatus={ordersStatusGroup}
191
196
  changeOrderStatus={handleOrdersStatusGroupFilter}
192
- numberOfOrdersByStatus={numberOfOrdersByStatus}
197
+ ordersAmountByStatus={ordersAmountByStatus}
193
198
  />
194
199
  <OrderSubFilterControls>
195
200
  <OrderStatusSubFilterWrapper isColumn={selectedOrderIds?.length}>
@@ -240,6 +245,7 @@ const OrdersManagerUI = (props) => {
240
245
  slaSettingTime={slaSettingTime}
241
246
  allowColumns={allowColumns}
242
247
  setAllowColumns={setAllowColumns}
248
+ setOrdersAmountByStatus={setOrdersAmountByStatus}
243
249
  />
244
250
  </WrapItemView>
245
251
  </OrdersInnerContent>
@@ -263,7 +269,9 @@ const OrdersManagerUI = (props) => {
263
269
  />
264
270
  )}
265
271
 
266
- <OrderNotification customerId={props.customerId} />
272
+ {!isSelectedOrders && (
273
+ <OrderNotification customerId={props.customerId} />
274
+ )}
267
275
 
268
276
  {totalSelectedOrder > 0 && (
269
277
  <WrapperIndicator>
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { useLanguage, useUtils, WebsocketStatus as WebsocketStatusController } from 'ordering-components-admin-external'
2
+ import { useLanguage, useUtils, useConfig, WebsocketStatus as WebsocketStatusController } from 'ordering-components-admin-external'
3
3
  import { InfoCircle } from 'react-bootstrap-icons'
4
4
  import { Alert, Modal } from '../../Shared'
5
5
  import { Button, IconButton } from '../../../styles'
@@ -24,6 +24,9 @@ const SocketStatusUI = (props) => {
24
24
 
25
25
  const [, t] = useLanguage()
26
26
  const [{ parseDate }] = useUtils()
27
+ const [{ configs }] = useConfig()
28
+ const isEnabledWhiteLabelModule = configs?.white_label_module?.value
29
+
27
30
  const [alertState, setAlertState] = useState({ open: false, content: [] })
28
31
  const [openModal, setOpenModal] = useState(false)
29
32
 
@@ -54,7 +57,7 @@ const SocketStatusUI = (props) => {
54
57
  </IconButton>
55
58
  <InfoContent>
56
59
  {t('WEBSOCKET_STATUS_INFO', 'Verify the server connection by date and time using the Connection status button. Press update to refresh you dashboard and update the status as well. Need help? Contact our Customer support team here:')}
57
- <a href='https://www.ordering.co/contact-ordering' target='_blank' rel='noopener noreferrer'>{t('CUSTOMER_SUPPORT', 'Customer support')}</a>
60
+ {!isEnabledWhiteLabelModule && <a href='https://www.ordering.co/contact-ordering' target='_blank' rel='noopener noreferrer'>{t('CUSTOMER_SUPPORT', 'Customer support')}</a>}
58
61
  </InfoContent>
59
62
  </InfoWrapper>
60
63
  <Button
@@ -26,7 +26,9 @@ export const WebhookListSelector = (props) => {
26
26
  { value: 'orders_pickup_completed_driver', content: <Option>{t('ORDERS_PICKUP_COMPLETED_DRIVER', 'Order pickup completed by driver')}</Option> },
27
27
  { value: 'orders_pickup_failed_driver', content: <Option>{t('ORDERS_PICKUP_FAILED_DRIVER', 'Order pickup failed by driver')}</Option> },
28
28
  { value: 'orders_delivery_completed_driver', content: <Option>{t('ORDERS_DELIVERY_COMPLETED_DRIVER', 'Order delivery completed by driver')}</Option> },
29
- { value: 'orders_delivery_failed_driver', content: <Option>{t('ORDERS_DELIVERY_FAILED_DRIVER', 'Order delivery failed by driver')}</Option> }
29
+ { value: 'orders_delivery_failed_driver', content: <Option>{t('ORDERS_DELIVERY_FAILED_DRIVER', 'Order delivery failed by driver')}</Option> },
30
+ { value: 'preorder_updated', content: <Option>{t('PREORDER_UPDATED', 'Preorder updated')}</Option> },
31
+ { value: 'drivers_changes', content: <Option>{t('DRIVERS_CHANGES', 'Driver changes')}</Option> }
30
32
  ]
31
33
 
32
34
  const placeholder = <Option>{t('SELECT_HOOK', 'Select a hook')}</Option>
@@ -12,8 +12,7 @@ export const InputPhoneNumber = (props) => {
12
12
  setValue,
13
13
  handleIsValid,
14
14
  disabled,
15
- isUser,
16
- defaultCountry
15
+ isUser
17
16
  } = props
18
17
 
19
18
  const [, t] = useLanguage()
@@ -44,7 +43,7 @@ export const InputPhoneNumber = (props) => {
44
43
  <PhoneInput
45
44
  disabled={disabled}
46
45
  placeholder={t('PHONE_NUMBER', 'Phone number')}
47
- defaultCountry={defaultCountry ?? findExitingCode(configs?.default_country_code?.value?.toUpperCase())}
46
+ defaultCountry={findExitingCode(configs?.default_country_code?.value?.toUpperCase())}
48
47
  value={value}
49
48
  displayInitialValueAsLocalNumber
50
49
  onChange={(val) => setValue && setValue(val, isValidPhoneNumber(val))}
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from 'react'
2
- import { useLanguage, useSession } from 'ordering-components-admin-external'
2
+ import { useLanguage, useSession, useConfig } from 'ordering-components-admin-external'
3
3
  import { useTheme } from 'styled-components'
4
4
  import { Input } from '../../../../styles'
5
5
  import {
@@ -16,6 +16,8 @@ export const ReceiveOrders = (props) => {
16
16
 
17
17
  const [, t] = useLanguage()
18
18
  const theme = useTheme()
19
+ const [{ configs }] = useConfig()
20
+ const isEnabledWhiteLabelModule = configs?.white_label_module?.value
19
21
 
20
22
  useEffect(() => {
21
23
  if (user?.email) changeFormState({ email: user?.email })
@@ -34,17 +36,19 @@ export const ReceiveOrders = (props) => {
34
36
  placeholder={t('ADD_EMAIL', 'Add email')}
35
37
  />
36
38
  </FormControl>
37
- <DownloadWrapper>
38
- <label>{t('DOWNLOADS_APPS', 'Downloads apps')}</label>
39
- <DownloadIconWrapper>
40
- <a href='https://apps.apple.com/us/app/store-app-2-0/id1608192050' target='_blank' rel='noopener noreferrer'>
41
- <img src={theme.images.general.appStore} alt='' />
42
- </a>
43
- <a href='https://play.google.com/store/apps/details?id=com.ordering.storeappv5&hl=en&gl=US' target='_blank' rel='noopener noreferrer'>
44
- <img src={theme.images.general.googlePlay} alt='' />
45
- </a>
46
- </DownloadIconWrapper>
47
- </DownloadWrapper>
39
+ {!isEnabledWhiteLabelModule && (
40
+ <DownloadWrapper>
41
+ <label>{t('DOWNLOADS_APPS', 'Downloads apps')}</label>
42
+ <DownloadIconWrapper>
43
+ <a href='https://apps.apple.com/us/app/store-app-2-0/id1608192050' target='_blank' rel='noopener noreferrer'>
44
+ <img src={theme.images.general.appStore} alt='' />
45
+ </a>
46
+ <a href='https://play.google.com/store/apps/details?id=com.ordering.storeappv5&hl=en&gl=US' target='_blank' rel='noopener noreferrer'>
47
+ <img src={theme.images.general.googlePlay} alt='' />
48
+ </a>
49
+ </DownloadIconWrapper>
50
+ </DownloadWrapper>
51
+ )}
48
52
  </ContentWrapper>
49
53
  </ReceiveOrdersContainer>
50
54
  )
@@ -216,7 +216,7 @@ export const BusinessDeviceDetail = (props) => {
216
216
  const businessDeviceDetailProps = {
217
217
  ...props,
218
218
  UIComponent: BusinessDeviceDetailUI,
219
- propsToFetch: ['id', 'name', 'logo', 'owners']
219
+ propsToFetch: ['id', 'name', 'logo', 'owners', 'address']
220
220
  }
221
221
  return <BusinessDeviceDetailController {...businessDeviceDetailProps} />
222
222
  }
@@ -77,6 +77,8 @@ const BusinessProductsListingUI = (props) => {
77
77
  getBusiness,
78
78
  businessTypes,
79
79
  setBusinessTypes,
80
+ categoryState,
81
+ handleUpdateCategoryState,
80
82
  siteState
81
83
  } = props
82
84
 
@@ -510,6 +512,8 @@ const BusinessProductsListingUI = (props) => {
510
512
  setTaxes={setTaxes}
511
513
  fees={fees}
512
514
  setFees={setFees}
515
+ categoryState={categoryState}
516
+ handleUpdateCategoryState={handleUpdateCategoryState}
513
517
  />
514
518
  )}
515
519
  {openSidebar === 'business_details' && (
@@ -55,6 +55,8 @@ export const BusinessSummary = (props) => {
55
55
  const [selectedView, setSelectedView] = useState('desktop')
56
56
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
57
57
 
58
+ const isEnabledWhiteLabelModule = configs?.white_label_module?.value
59
+
58
60
  const handleOpenCategory = () => {
59
61
  events.emit('go_to_page', { page: 'store', params: { store: businessState?.business?.slug } })
60
62
  }
@@ -219,11 +221,13 @@ export const BusinessSummary = (props) => {
219
221
  >
220
222
  {t('DUPLICATE', 'Duplicate')}
221
223
  </Dropdown.Item>
222
- <Dropdown.Item
223
- onClick={() => handleSelectedItem('personalization')}
224
- >
225
- {t('PERSONALIZATION', 'Personalization')}
226
- </Dropdown.Item>
224
+ {!isEnabledWhiteLabelModule && (
225
+ <Dropdown.Item
226
+ onClick={() => handleSelectedItem('personalization')}
227
+ >
228
+ {t('PERSONALIZATION', 'Personalization')}
229
+ </Dropdown.Item>
230
+ )}
227
231
  <Dropdown.Item
228
232
  onClick={() => handleSelectedItem('custom_fields')}
229
233
  >
@@ -266,15 +270,17 @@ export const BusinessSummary = (props) => {
266
270
  >
267
271
  {t('CATEGORIES_AND_PRODUCTS', 'Categories & products')}
268
272
  </Button>
269
- <Button
270
- color='primary'
271
- outline
272
- borderRadius='8px'
273
- onClick={handleOpenSite}
274
- disabled={businessState?.loading}
275
- >
276
- {t('STORE_WEBSITE', 'Store website')}
277
- </Button>
273
+ {!isEnabledWhiteLabelModule && (
274
+ <Button
275
+ color='primary'
276
+ outline
277
+ borderRadius='8px'
278
+ onClick={handleOpenSite}
279
+ disabled={businessState?.loading}
280
+ >
281
+ {t('STORE_WEBSITE', 'Store website')}
282
+ </Button>
283
+ )}
278
284
  </ButtonWrapper>
279
285
  <BusinessDescription>
280
286
  {businessState?.loading ? (
@@ -289,7 +295,7 @@ export const BusinessSummary = (props) => {
289
295
  ? businessConfigs
290
296
  : businessConfigs.filter(configs => configs.key !== 'spoonity_key')
291
297
  : businessConfigs.filter(c => !itemsExcluded.includes(c.key))
292
- ).map(config => (
298
+ ).filter(item => isEnabledWhiteLabelModule ? item.key !== 'personalization' : true).map(config => (
293
299
  <BusinessConfigItem
294
300
  key={config.key}
295
301
  active={selectedItem === config.key}
@@ -47,7 +47,9 @@ const BusinessWebhooksUI = (props) => {
47
47
  { value: 'orders_pickup_completed_driver', content: t('ORDERS_PICKUP_COMPLETED_DRIVER') },
48
48
  { value: 'orders_pickup_failed_driver', content: t('ORDERS_PICKUP_FAILED_DRIVER') },
49
49
  { value: 'orders_delivery_completed_driver', content: t('ORDERS_DELIVERY_COMPLETED_DRIVER') },
50
- { value: 'orders_delivery_failed_driver', content: t('ORDERS_DELIVERY_FAILED_DRIVER') }
50
+ { value: 'orders_delivery_failed_driver', content: t('ORDERS_DELIVERY_FAILED_DRIVER') },
51
+ { value: 'preorder_updated', content: t('PREORDER_UPDATED', 'Preorder updated') },
52
+ { value: 'drivers_changes', content: t('DRIVERS_CHANGES', 'Driver changes') },
51
53
  ]
52
54
 
53
55
  const timeList = [
@@ -71,6 +71,8 @@ const ProductExtraOptionDetailsUI = (props) => {
71
71
  handleChangeItem,
72
72
  isAddForm,
73
73
  setIsAddForm,
74
+ handleDuplicateOption,
75
+ handleDuplicateSubOption,
74
76
 
75
77
  dragoverSubOptionId,
76
78
  isSubOptionsBottom,
@@ -197,6 +199,11 @@ const ProductExtraOptionDetailsUI = (props) => {
197
199
  >
198
200
  {t('CUSTOM_FIELDS', 'Custom Fields')}
199
201
  </Dropdown.Item>
202
+ <Dropdown.Item
203
+ onClick={handleDuplicateOption}
204
+ >
205
+ {t('DUPLICATE', 'Duplicate')}
206
+ </Dropdown.Item>
200
207
  <Dropdown.Item
201
208
  onClick={() => setOpenModal({ ...openModal, externalId: true })}
202
209
  >
@@ -285,6 +292,7 @@ const ProductExtraOptionDetailsUI = (props) => {
285
292
  hanldeDragOver={hanldeDragOver}
286
293
  handleDrop={handleDrop}
287
294
  handleDragEnd={handleDragEnd}
295
+ handleDuplicateSubOption={handleDuplicateSubOption}
288
296
  />
289
297
  )
290
298
  })}
@@ -61,7 +61,9 @@ const ProductExtraOptionsUI = (props) => {
61
61
  hanldeDragOver,
62
62
  handleDrop,
63
63
  handleDragEnd,
64
- handleUpdateExtraState
64
+ handleUpdateExtraState,
65
+ handleDuplicateExtra,
66
+ setExtraState
65
67
  } = props
66
68
 
67
69
  const theme = useTheme()
@@ -240,6 +242,11 @@ const ProductExtraOptionsUI = (props) => {
240
242
  >
241
243
  {t('CUSTOM_FIELDS', 'Custom Fields')}
242
244
  </Dropdown.Item>
245
+ <Dropdown.Item
246
+ onClick={handleDuplicateExtra}
247
+ >
248
+ {t('DUPLICATE', 'Duplicate')}
249
+ </Dropdown.Item>
243
250
  <Dropdown.Item
244
251
  onClick={() => setOpenModal({ ...openModal, externalId: true })}
245
252
  >
@@ -435,6 +442,8 @@ const ProductExtraOptionsUI = (props) => {
435
442
  handleUpdateBusinessState={handleUpdateBusinessState}
436
443
  handleSucccessDeleteOption={handleSucccessDeleteOption}
437
444
  isMaxError={isMaxError}
445
+ parentExtraState={extraState}
446
+ setParentExtraState={setExtraState}
438
447
  />
439
448
  </Modal>
440
449
  )}
@@ -43,7 +43,8 @@ export const ProductExtraSuboption = (props) => {
43
43
  handleDragStart,
44
44
  hanldeDragOver,
45
45
  handleDrop,
46
- handleDragEnd
46
+ handleDragEnd,
47
+ handleDuplicateSubOption
47
48
  } = props
48
49
 
49
50
  const theme = useTheme()
@@ -326,6 +327,11 @@ export const ProductExtraSuboption = (props) => {
326
327
  >
327
328
  {t('CUSTOM_FIELDS', 'Custom fields')}
328
329
  </Dropdown.Item>
330
+ <Dropdown.Item
331
+ onClick={() => handleDuplicateSubOption(subOption?.id)}
332
+ >
333
+ {t('DUPLICATE', 'Duplicate')}
334
+ </Dropdown.Item>
329
335
  <Dropdown.Item
330
336
  onClick={() => setExternalIdOpen(true)}
331
337
  >
@@ -39,7 +39,8 @@ const ProductExtrasUI = (props) => {
39
39
  hanldeDragOver,
40
40
  handleDrop,
41
41
  handleDragEnd,
42
- handleUpdateExtraState
42
+ handleUpdateExtraState,
43
+ setExtrasState
43
44
  } = props
44
45
  const history = useHistory()
45
46
  const query = new URLSearchParams(useLocation().search)
@@ -218,6 +219,8 @@ const ProductExtrasUI = (props) => {
218
219
  handleChangeExtraName={handleChangeExtraInput}
219
220
  handleUpdateBusinessState={handleUpdateBusinessState}
220
221
  handleUpdateExtraState={handleUpdateExtraState}
222
+ extrasState={extrasState}
223
+ setExtrasState={setExtrasState}
221
224
  />
222
225
  )}
223
226
  </>
@@ -238,6 +241,8 @@ const ProductExtrasUI = (props) => {
238
241
  handleChangeExtraName={handleChangeExtraInput}
239
242
  handleUpdateBusinessState={handleUpdateBusinessState}
240
243
  handleUpdateExtraState={handleUpdateExtraState}
244
+ extrasState={extrasState}
245
+ setExtrasState={setExtrasState}
241
246
  />
242
247
  </Modal>
243
248
  )}
@@ -44,7 +44,8 @@ export const ProductSummary = (props) => {
44
44
  handleDeleteProduct,
45
45
  showProductOption,
46
46
  isExpand,
47
- setIsExpand
47
+ setIsExpand,
48
+ handleDuplicateProduct
48
49
  } = props
49
50
 
50
51
  const [, t] = useLanguage()
@@ -170,6 +171,11 @@ export const ProductSummary = (props) => {
170
171
  >
171
172
  {t('PREVIEW', 'Preview')}
172
173
  </Dropdown.Item>
174
+ <Dropdown.Item
175
+ onClick={handleDuplicateProduct}
176
+ >
177
+ {t('DUPLICATE', 'Duplicate')}
178
+ </Dropdown.Item>
173
179
  <Dropdown.Item
174
180
  onClick={() => handleShowOption('custom_fields')}
175
181
  >
@@ -40,7 +40,6 @@ const UserAddFormUI = (props) => {
40
40
  handleChangeUserType,
41
41
  handlechangeImage,
42
42
  handleChangeSwtich,
43
- defaultCountry,
44
43
  defaultPhoneNumber,
45
44
  isFromCustomOrder,
46
45
  hideUserTypeSelector
@@ -287,7 +286,6 @@ const UserAddFormUI = (props) => {
287
286
  )}
288
287
  {!!showInputPhoneNumber && (
289
288
  <InputPhoneNumber
290
- defaultCountry={defaultCountry}
291
289
  value={userPhoneNumber}
292
290
  setValue={handleChangePhoneNumber}
293
291
  handleIsValid={setIsValidPhoneNumber}
@@ -11,5 +11,5 @@
11
11
  "socket": {
12
12
  "url": "https://socket.ordering.co"
13
13
  },
14
- "use_project_domain": false
14
+ "use_project_domain": true
15
15
  }