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.
- package/_bundles/{ordering-ui-admin.a29dbc53a1f823ce0ce5.js → ordering-ui-admin.2f5049887bf500c65392.js} +2 -2
- package/_modules/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +80 -47
- package/_modules/components/BusinessIntelligence/BusinessAnalytics/index.js +2 -1
- package/_modules/components/BusinessIntelligence/BusinessAnalytics/styles.js +6 -4
- package/_modules/components/BusinessIntelligence/ReportsAverageSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsAverageSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsCustomer/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsCustomer/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/index.js +4 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsDriverOrder/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/index.js +4 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsDriverSpend/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsGeneralSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsHeatMap/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsOrderDistance/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/index.js +4 -3
- package/_modules/components/BusinessIntelligence/ReportsOrderStatus/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsOrders/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsOrders/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSales/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsSales/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsSpentTIme/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsSpentTIme/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsTopDrivers/styles.js +13 -3
- package/_modules/components/BusinessIntelligence/ReportsUsers/index.js +3 -2
- package/_modules/components/BusinessIntelligence/ReportsUsers/styles.js +13 -3
- package/_modules/components/Delivery/AddressList/index.js +15 -5
- package/_modules/components/Home/HomePage/index.js +3 -2
- package/_modules/components/MyProducts/OrderingWebsite/index.js +25 -18
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +1 -1
- package/_modules/components/Orders/AllInOne/index.js +15 -6
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +102 -9
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +19 -3
- package/_modules/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/index.js +21 -9
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +8 -5
- package/_modules/components/Orders/DeliveriesManager/index.js +11 -2
- package/_modules/components/Orders/DeliveryDashboard/index.js +6 -6
- package/_modules/components/Orders/OrderNotification/index.js +43 -14
- package/_modules/components/Orders/OrderNotification/styles.js +18 -3
- package/_modules/components/Orders/OrderStatusFilterBar/index.js +6 -6
- package/_modules/components/Orders/OrdersContentHeader/index.js +11 -2
- package/_modules/components/Orders/OrdersContentHeader/styles.js +20 -4
- package/_modules/components/Orders/OrdersDashboardList/index.js +34 -5
- package/_modules/components/Orders/OrdersFilterGroup/index.js +18 -1
- package/_modules/components/Orders/OrdersListing/index.js +6 -0
- package/_modules/components/Orders/OrdersManager/index.js +16 -7
- package/_modules/components/Orders/WebsocketStatus/index.js +6 -1
- package/_modules/components/Settings/WebhookListSelector/index.js +6 -0
- package/_modules/components/Shared/InputPhoneNumber/index.js +2 -3
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +6 -2
- package/_modules/components/Stores/BusinessDeviceDetail/index.js +1 -1
- package/_modules/components/Stores/BusinessProductsListing/index.js +5 -1
- package/_modules/components/Stores/BusinessSummary/index.js +7 -4
- package/_modules/components/Stores/BusinessWebhooks/index.js +6 -0
- package/_modules/components/Stores/ProductExtraOptionDetails/index.js +6 -1
- package/_modules/components/Stores/ProductExtraOptions/index.js +8 -2
- package/_modules/components/Stores/ProductExtraSuboption/index.js +6 -1
- package/_modules/components/Stores/ProductExtras/index.js +8 -3
- package/_modules/components/Stores/ProductSummary/index.js +4 -1
- package/_modules/components/Users/UserAddForm/index.js +0 -2
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/AnalyticsDriverOrders/index.js +39 -17
- package/src/components/BusinessIntelligence/BusinessAnalytics/index.js +6 -1
- package/src/components/BusinessIntelligence/BusinessAnalytics/styles.js +2 -0
- package/src/components/BusinessIntelligence/ReportsAverageSales/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsAverageSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsBusinessDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsBusinessSpend/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsCustomer/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsCustomer/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverDistance/index.js +10 -2
- package/src/components/BusinessIntelligence/ReportsDriverDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverOrder/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverOrder/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverOrderTime/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverSchedule/index.js +16 -8
- package/src/components/BusinessIntelligence/ReportsDriverSchedule/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsDriverSpend/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsDriverSpend/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsGeneralSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsGeneralSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsHeatMap/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsHeatMap/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrderDistance/index.js +10 -1
- package/src/components/BusinessIntelligence/ReportsOrderDistance/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrderStatus/index.js +10 -2
- package/src/components/BusinessIntelligence/ReportsOrderStatus/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsOrders/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsOrders/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsPaymethodSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsSaleAndCategory/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSales/index.js +9 -1
- package/src/components/BusinessIntelligence/ReportsSales/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsSpentTIme/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsSpentTIme/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsTopDrivers/index.js +9 -2
- package/src/components/BusinessIntelligence/ReportsTopDrivers/styles.js +34 -0
- package/src/components/BusinessIntelligence/ReportsUsers/index.js +15 -7
- package/src/components/BusinessIntelligence/ReportsUsers/styles.js +34 -0
- package/src/components/Delivery/AddressList/index.js +11 -1
- package/src/components/Home/HomePage/index.js +5 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +25 -12
- package/src/components/MyProducts/OrderingWebsite/styles.js +0 -2
- package/src/components/Orders/AllInOne/index.js +8 -2
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +118 -6
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/styles.js +56 -0
- package/src/components/Orders/CreateCustomOrder/OrderTypeSelector/index.js +1 -1
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/index.js +19 -11
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +3 -0
- package/src/components/Orders/DeliveriesManager/index.js +8 -2
- package/src/components/Orders/DeliveryDashboard/index.js +4 -4
- package/src/components/Orders/OrderNotification/index.js +31 -5
- package/src/components/Orders/OrderNotification/styles.js +37 -0
- package/src/components/Orders/OrderStatusFilterBar/index.js +10 -9
- package/src/components/Orders/OrdersContentHeader/index.js +17 -3
- package/src/components/Orders/OrdersContentHeader/styles.js +54 -0
- package/src/components/Orders/OrdersDashboardList/index.js +6 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +16 -0
- package/src/components/Orders/OrdersListing/index.js +7 -0
- package/src/components/Orders/OrdersManager/index.js +11 -3
- package/src/components/Orders/WebsocketStatus/index.js +5 -2
- package/src/components/Settings/WebhookListSelector/index.js +3 -1
- package/src/components/Shared/InputPhoneNumber/index.js +2 -3
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +16 -12
- package/src/components/Stores/BusinessDeviceDetail/index.js +1 -1
- package/src/components/Stores/BusinessProductsListing/index.js +4 -0
- package/src/components/Stores/BusinessSummary/index.js +21 -15
- package/src/components/Stores/BusinessWebhooks/index.js +3 -1
- package/src/components/Stores/ProductExtraOptionDetails/index.js +8 -0
- package/src/components/Stores/ProductExtraOptions/index.js +10 -1
- package/src/components/Stores/ProductExtraSuboption/index.js +7 -1
- package/src/components/Stores/ProductExtras/index.js +6 -1
- package/src/components/Stores/ProductSummary/index.js +7 -1
- package/src/components/Users/UserAddForm/index.js +0 -2
- package/template/config.json +1 -1
- /package/_bundles/{ordering-ui-admin.a29dbc53a1f823ce0ce5.js.LICENSE.txt → ordering-ui-admin.2f5049887bf500c65392.js.LICENSE.txt} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect, useMemo } from 'react'
|
|
2
|
-
import { useLanguage, useOrder, CustomOrderDetails as CustomOrderDetailsController } from 'ordering-components-admin-external'
|
|
2
|
+
import { useLanguage, useOrder, useValidationFields, CustomOrderDetails as CustomOrderDetailsController } from 'ordering-components-admin-external'
|
|
3
3
|
import { SelectCustomer } from '../SelectCustomer'
|
|
4
4
|
import { OrderTypeSelector } from '../OrderTypeSelector'
|
|
5
5
|
import { SelectBusinesses } from '../SelectBusinesses'
|
|
@@ -7,9 +7,15 @@ import { Map } from '../Map'
|
|
|
7
7
|
import { SelectProducts } from '../SelectProducts'
|
|
8
8
|
import { Checkout } from '../Checkout'
|
|
9
9
|
import { Alert } from '../../../Shared'
|
|
10
|
+
import { Button, Input, TextArea } from '../../../../styles'
|
|
11
|
+
import { RecordCircleFill, Circle } from 'react-bootstrap-icons'
|
|
10
12
|
|
|
11
13
|
import {
|
|
12
|
-
DetailsContainer
|
|
14
|
+
DetailsContainer,
|
|
15
|
+
FormControl,
|
|
16
|
+
ToggleOptions,
|
|
17
|
+
RaidoButton,
|
|
18
|
+
ButtonWrapper
|
|
13
19
|
} from './styles'
|
|
14
20
|
|
|
15
21
|
const CustomOrderDetailsUI = (props) => {
|
|
@@ -31,19 +37,56 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
31
37
|
cart,
|
|
32
38
|
onClose,
|
|
33
39
|
handleOpenCustomOrderDetail,
|
|
34
|
-
|
|
40
|
+
handlePlaceOrderByTotal,
|
|
41
|
+
extraFields,
|
|
42
|
+
setExtraFields,
|
|
43
|
+
actionState
|
|
35
44
|
} = props
|
|
36
45
|
|
|
37
46
|
const [, t] = useLanguage()
|
|
47
|
+
const [validationFields] = useValidationFields()
|
|
38
48
|
const [orderState, { changeAddress }] = useOrder()
|
|
39
49
|
|
|
40
50
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
51
|
+
const [isOrderByProducts, setIsOrderByProducts] = useState(true)
|
|
41
52
|
|
|
42
53
|
const handleCloseAlert = () => {
|
|
43
54
|
setCustomersPhones({ ...customersPhones, error: null })
|
|
44
55
|
setAlertState({ open: false, content: [] })
|
|
45
56
|
}
|
|
46
57
|
|
|
58
|
+
const handlePlaceOrder = () => {
|
|
59
|
+
const errMessage = []
|
|
60
|
+
|
|
61
|
+
if (!selectedBusiness) {
|
|
62
|
+
errMessage.push(t(
|
|
63
|
+
'VALIDATION_ERROR_REQUIRED',
|
|
64
|
+
'Name is required'
|
|
65
|
+
).replace('_attribute_', t('BUSINESS', 'Business')))
|
|
66
|
+
}
|
|
67
|
+
if (!extraFields?.total) {
|
|
68
|
+
errMessage.push(t(
|
|
69
|
+
'VALIDATION_ERROR_REQUIRED',
|
|
70
|
+
'Name is required'
|
|
71
|
+
).replace('_attribute_', t('TOTAL', 'Total')))
|
|
72
|
+
}
|
|
73
|
+
if (validationFields?.fields?.checkout?.comments?.enabled && validationFields?.fields?.checkout?.comments?.required && !extraFields?.comment) {
|
|
74
|
+
errMessage.push(t(
|
|
75
|
+
'VALIDATION_ERROR_REQUIRED',
|
|
76
|
+
'Name is required'
|
|
77
|
+
).replace('_attribute_', t('COMMENT', 'Comment')))
|
|
78
|
+
}
|
|
79
|
+
if (errMessage.length > 0) {
|
|
80
|
+
setAlertState({
|
|
81
|
+
open: true,
|
|
82
|
+
content: errMessage
|
|
83
|
+
})
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
handlePlaceOrderByTotal()
|
|
88
|
+
}
|
|
89
|
+
|
|
47
90
|
const customerAddress = useMemo(() => {
|
|
48
91
|
let address = null
|
|
49
92
|
if (selectedUser?.addresses) {
|
|
@@ -68,6 +111,18 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
68
111
|
}
|
|
69
112
|
}, [customersPhones?.error])
|
|
70
113
|
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (actionState?.error) {
|
|
116
|
+
setAlertState({ open: true, content: actionState?.error })
|
|
117
|
+
}
|
|
118
|
+
}, [actionState])
|
|
119
|
+
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
if (!isOrderByProducts) {
|
|
122
|
+
setExtraFields({ external_id: extraFields?.external_id })
|
|
123
|
+
}
|
|
124
|
+
}, [isOrderByProducts])
|
|
125
|
+
|
|
71
126
|
return (
|
|
72
127
|
<>
|
|
73
128
|
<DetailsContainer className='custom-order-content'>
|
|
@@ -80,7 +135,6 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
80
135
|
onChangeNumber={onChangeNumber}
|
|
81
136
|
handleParentSidebarMove={handleParentSidebarMove}
|
|
82
137
|
customerAddress={customerAddress}
|
|
83
|
-
defaultCountryCodeState={defaultCountryCodeState}
|
|
84
138
|
/>
|
|
85
139
|
{customerAddress?.location && (
|
|
86
140
|
<>
|
|
@@ -95,7 +149,53 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
95
149
|
customerLocation={customerAddress?.location}
|
|
96
150
|
business={selectedBusiness}
|
|
97
151
|
/>
|
|
98
|
-
|
|
152
|
+
<ToggleOptions>
|
|
153
|
+
<RaidoButton onClick={() => setIsOrderByProducts(true)}>
|
|
154
|
+
{isOrderByProducts ? <RecordCircleFill className='active' /> : <Circle />}
|
|
155
|
+
<span>{t('ORDER_BY_PRODUCTS', 'Order by products')}</span>
|
|
156
|
+
</RaidoButton>
|
|
157
|
+
<RaidoButton onClick={() => setIsOrderByProducts(false)}>
|
|
158
|
+
{isOrderByProducts ? <Circle /> : <RecordCircleFill className='active' />}
|
|
159
|
+
<span>{t('ORDER_BY_TOTAL', 'Order by total')}</span>
|
|
160
|
+
</RaidoButton>
|
|
161
|
+
</ToggleOptions>
|
|
162
|
+
{!isOrderByProducts && (
|
|
163
|
+
<FormControl>
|
|
164
|
+
<label>{t('TOTAL', 'Total')}</label>
|
|
165
|
+
<Input
|
|
166
|
+
value={extraFields?.total || ''}
|
|
167
|
+
onKeyPress={(e) => {
|
|
168
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
169
|
+
e.preventDefault()
|
|
170
|
+
}
|
|
171
|
+
}}
|
|
172
|
+
onChange={(e) => setExtraFields({ ...extraFields, total: e.target.value })}
|
|
173
|
+
placeholder={t('TOTAL', 'Total')}
|
|
174
|
+
/>
|
|
175
|
+
</FormControl>
|
|
176
|
+
)}
|
|
177
|
+
<FormControl>
|
|
178
|
+
<label>
|
|
179
|
+
{t('EXTERNAL_ID', 'External id')}
|
|
180
|
+
<span>{t('OPTIONAL', 'Optional')}</span>
|
|
181
|
+
</label>
|
|
182
|
+
<Input
|
|
183
|
+
value={extraFields?.external_id || ''}
|
|
184
|
+
onChange={(e) => setExtraFields({ ...extraFields, external_id: e.target.value })}
|
|
185
|
+
placeholder={t('EXTERNAL_ID', 'External id')}
|
|
186
|
+
/>
|
|
187
|
+
</FormControl>
|
|
188
|
+
{!isOrderByProducts && (
|
|
189
|
+
<FormControl>
|
|
190
|
+
<label>{t('COMMENT', 'Comment')}</label>
|
|
191
|
+
<TextArea
|
|
192
|
+
value={extraFields?.comment || ''}
|
|
193
|
+
onChange={(e) => setExtraFields({ ...extraFields, comment: e.target.value })}
|
|
194
|
+
placeholder={t('COMMENT', 'Comment')}
|
|
195
|
+
/>
|
|
196
|
+
</FormControl>
|
|
197
|
+
)}
|
|
198
|
+
{selectedBusiness && isOrderByProducts && (
|
|
99
199
|
<SelectProducts
|
|
100
200
|
productList={productList}
|
|
101
201
|
getProducts={getProducts}
|
|
@@ -104,15 +204,27 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
104
204
|
business={selectedBusiness}
|
|
105
205
|
/>
|
|
106
206
|
)}
|
|
107
|
-
{cart && cart?.products.length > 0 && (
|
|
207
|
+
{cart && cart?.products.length > 0 && isOrderByProducts && (
|
|
108
208
|
<Checkout
|
|
109
209
|
cartUuid={cart.uuid}
|
|
110
210
|
onPlaceOrderClick={(data, paymethod, cart) => {
|
|
111
211
|
cart?.uuid && handleOpenCustomOrderDetail(cart.uuid)
|
|
112
212
|
onClose()
|
|
113
213
|
}}
|
|
214
|
+
extraFields={extraFields}
|
|
114
215
|
/>
|
|
115
216
|
)}
|
|
217
|
+
{!isOrderByProducts && (
|
|
218
|
+
<ButtonWrapper>
|
|
219
|
+
<Button
|
|
220
|
+
color='primary'
|
|
221
|
+
onClick={handlePlaceOrder}
|
|
222
|
+
disabled={actionState?.loading}
|
|
223
|
+
>
|
|
224
|
+
{t('PLACE_ORDER', 'Place Order')}
|
|
225
|
+
</Button>
|
|
226
|
+
</ButtonWrapper>
|
|
227
|
+
)}
|
|
116
228
|
</>
|
|
117
229
|
)}
|
|
118
230
|
<Alert
|
|
@@ -26,3 +26,59 @@ export const DetailsContainer = styled.div`
|
|
|
26
26
|
margin-bottom: 4px;
|
|
27
27
|
}
|
|
28
28
|
`
|
|
29
|
+
|
|
30
|
+
export const FormControl = styled.div`
|
|
31
|
+
margin-top: 20px;
|
|
32
|
+
label {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
margin-bottom: 10px;
|
|
38
|
+
span {
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: ${props => props.theme.colors.primary};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
input, textarea {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
`
|
|
47
|
+
|
|
48
|
+
export const ToggleOptions = styled.div`
|
|
49
|
+
margin-top: 30px;
|
|
50
|
+
`
|
|
51
|
+
|
|
52
|
+
export const RaidoButton = styled.div`
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
margin-bottom: 15px;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
svg {
|
|
59
|
+
color: ${props => props.theme.colors.secundaryLight};
|
|
60
|
+
&.active {
|
|
61
|
+
color: ${props => props.theme.colors.primary};
|
|
62
|
+
}
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
min-width: 16px;
|
|
65
|
+
margin-right: 12px;
|
|
66
|
+
${props => props.theme.rtl && css`
|
|
67
|
+
margin-left: 13px;
|
|
68
|
+
margin-right: 0px;
|
|
69
|
+
`}
|
|
70
|
+
}
|
|
71
|
+
span {
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
line-height: 24px;
|
|
74
|
+
margin: 0px;
|
|
75
|
+
}
|
|
76
|
+
`
|
|
77
|
+
|
|
78
|
+
export const ButtonWrapper = styled.div`
|
|
79
|
+
margin-top: 30px;
|
|
80
|
+
button {
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
height: 44px;
|
|
83
|
+
}
|
|
84
|
+
`
|
|
@@ -28,7 +28,7 @@ const OrderTypeSelectorUI = (props) => {
|
|
|
28
28
|
<p>{t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will you delivery type?')}</p>
|
|
29
29
|
<Select
|
|
30
30
|
placeholder={<Option>{t('SELECT_DELIVERY_TYPE', 'Select delivery type')}</Option>}
|
|
31
|
-
options={configTypes
|
|
31
|
+
options={configTypes.length > 0
|
|
32
32
|
? orderTypes.filter(type => configTypes?.includes(type.value)).filter(type => type.name.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()))
|
|
33
33
|
: orderTypes.filter(type => type.name.toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()))}
|
|
34
34
|
defaultValue={defaultType || typeSelected || defaultValue}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import { useLanguage, useUtils, useCustomer } from 'ordering-components-admin-external'
|
|
2
|
+
import { useLanguage, useUtils, useCustomer, useConfig } from 'ordering-components-admin-external'
|
|
3
3
|
import { UserAddForm } from '../../../Users'
|
|
4
4
|
import { AddressList } from '../../../Delivery'
|
|
5
5
|
import { Dot, HouseDoor } from 'react-bootstrap-icons'
|
|
@@ -29,13 +29,13 @@ export const SelectCustomer = (props) => {
|
|
|
29
29
|
setSelectedUser,
|
|
30
30
|
onChangeNumber,
|
|
31
31
|
handleParentSidebarMove,
|
|
32
|
-
customerAddress
|
|
33
|
-
defaultCountryCodeState
|
|
32
|
+
customerAddress
|
|
34
33
|
} = props
|
|
35
34
|
|
|
36
35
|
const [, t] = useLanguage()
|
|
37
36
|
const [{ optimizeImage }] = useUtils()
|
|
38
37
|
const [, { setUserCustomer }] = useCustomer()
|
|
38
|
+
const [{ configs }] = useConfig()
|
|
39
39
|
|
|
40
40
|
const [searchInputFocus, setSearchInputFocus] = useState(false)
|
|
41
41
|
const [showSearchbar, setShowSearchbar] = useState(true)
|
|
@@ -77,11 +77,22 @@ export const SelectCustomer = (props) => {
|
|
|
77
77
|
onChangeNumber(trimmedValue)
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
const handleOpenAddressListSidebar = () => {
|
|
81
|
+
setOpenSidebar('address_list')
|
|
82
|
+
handleParentSidebarMove(500)
|
|
83
|
+
}
|
|
84
|
+
|
|
80
85
|
useEffect(() => {
|
|
81
86
|
setOpenSidebar(null)
|
|
82
87
|
handleParentSidebarMove(0)
|
|
83
88
|
}, [customerAddress?.location])
|
|
84
89
|
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (!customerAddress?.address && selectedUser) {
|
|
92
|
+
handleOpenAddressListSidebar()
|
|
93
|
+
}
|
|
94
|
+
}, [customerAddress?.address, selectedUser])
|
|
95
|
+
|
|
85
96
|
return (
|
|
86
97
|
<>
|
|
87
98
|
<SectionContainer>
|
|
@@ -169,7 +180,7 @@ export const SelectCustomer = (props) => {
|
|
|
169
180
|
<Button
|
|
170
181
|
borderRadius='8px'
|
|
171
182
|
color='primary'
|
|
172
|
-
disabled={openSidebar === 'user_add_form'
|
|
183
|
+
disabled={openSidebar === 'user_add_form'}
|
|
173
184
|
onClick={() => handleOpenAddForm()}
|
|
174
185
|
>
|
|
175
186
|
{t('USERS_REGISTER', 'New user')}
|
|
@@ -184,10 +195,7 @@ export const SelectCustomer = (props) => {
|
|
|
184
195
|
</div>
|
|
185
196
|
)}
|
|
186
197
|
<LinkButton
|
|
187
|
-
onClick={() =>
|
|
188
|
-
setOpenSidebar('address_list')
|
|
189
|
-
handleParentSidebarMove(500)
|
|
190
|
-
}}
|
|
198
|
+
onClick={() => handleOpenAddressListSidebar()}
|
|
191
199
|
>
|
|
192
200
|
{customerAddress?.address ? t('CHANGE', 'Change') : t('ADD_NEW_ADDRESS', 'Add new address')}
|
|
193
201
|
</LinkButton>
|
|
@@ -205,8 +213,7 @@ export const SelectCustomer = (props) => {
|
|
|
205
213
|
<UserAddForm
|
|
206
214
|
isFromCustomOrder
|
|
207
215
|
hideUserTypeSelector
|
|
208
|
-
|
|
209
|
-
defaultPhoneNumber={(selectedUser?.cellphone || phone) && `+${findExitingCountryPhoneCode(defaultCountryCodeState?.code)} ${selectedUser?.cellphone || phone}`}
|
|
216
|
+
defaultPhoneNumber={(selectedUser?.cellphone || phone) && `+${findExitingCountryPhoneCode(configs?.default_country_code?.value?.toUpperCase())} ${selectedUser?.cellphone || phone}`}
|
|
210
217
|
handleSuccessAdd={onSelectUser}
|
|
211
218
|
onClose={() => handleCloseSidebar()}
|
|
212
219
|
/>
|
|
@@ -221,11 +228,12 @@ export const SelectCustomer = (props) => {
|
|
|
221
228
|
open={openSidebar === 'address_list'}
|
|
222
229
|
onClose={() => handleCloseSidebar()}
|
|
223
230
|
>
|
|
224
|
-
<SavedPlaces>
|
|
231
|
+
<SavedPlaces openExtraAdddress={openExtraAdddress}>
|
|
225
232
|
<h2>{selectedUser?.name} {selectedUser?.lastname}</h2>
|
|
226
233
|
<p>{t('SELECT_CUSTOMER_ADDRESS', 'Select customer address')}</p>
|
|
227
234
|
<AddressListWrapper>
|
|
228
235
|
<AddressList
|
|
236
|
+
isAutoOpenAddNewAddress
|
|
229
237
|
isSeletectedUserAddresses
|
|
230
238
|
userId={selectedUser?.id}
|
|
231
239
|
addresses={selectedUser?.addresses}
|
|
@@ -29,7 +29,6 @@ const DeliveriesManagerUI = (props) => {
|
|
|
29
29
|
selectedSubOrderStatus,
|
|
30
30
|
handleSelectedSubOrderStatus,
|
|
31
31
|
onOrderRedirect,
|
|
32
|
-
numberOfOrdersByStatus,
|
|
33
32
|
numberOfOrdersBySubstatus,
|
|
34
33
|
timeStatus,
|
|
35
34
|
setTimeStatus
|
|
@@ -42,6 +41,12 @@ const DeliveriesManagerUI = (props) => {
|
|
|
42
41
|
const [detailsOrder, setDetailsOrder] = useState(null)
|
|
43
42
|
const [filterModalOpen, setFilterModalOpen] = useState(false)
|
|
44
43
|
const [slaSettingTime, setSlaSettingTime] = useState(60000)
|
|
44
|
+
const [ordersAmountByStatus, setOrdersAmountByStatus] = useState({
|
|
45
|
+
pending: null,
|
|
46
|
+
inProgress: null,
|
|
47
|
+
completed: null,
|
|
48
|
+
cancelled: null
|
|
49
|
+
})
|
|
45
50
|
|
|
46
51
|
const [configState] = useConfig()
|
|
47
52
|
const googleMapsApiKey = configState?.configs?.google_maps_api_key?.value
|
|
@@ -104,7 +109,8 @@ const DeliveriesManagerUI = (props) => {
|
|
|
104
109
|
setFilterModalOpen={setFilterModalOpen}
|
|
105
110
|
slaSettingTime={slaSettingTime}
|
|
106
111
|
timeStatus={timeStatus}
|
|
107
|
-
|
|
112
|
+
ordersAmountByStatus={ordersAmountByStatus}
|
|
113
|
+
setOrdersAmountByStatus={setOrdersAmountByStatus}
|
|
108
114
|
numberOfOrdersBySubstatus={numberOfOrdersBySubstatus}
|
|
109
115
|
/>
|
|
110
116
|
</WrapItemView>
|
|
@@ -17,8 +17,8 @@ export const DeliveryDashboard = (props) => {
|
|
|
17
17
|
selectedSubOrderStatus,
|
|
18
18
|
handleOrdersStatusGroupFilter,
|
|
19
19
|
handleSelectedSubOrderStatus,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
ordersAmountByStatus,
|
|
21
|
+
setOrdersAmountByStatus
|
|
22
22
|
} = props
|
|
23
23
|
|
|
24
24
|
const [interActionMapOrder, setInterActionMapOrder] = useState(null)
|
|
@@ -42,13 +42,12 @@ export const DeliveryDashboard = (props) => {
|
|
|
42
42
|
<OrderStatusFilterBar
|
|
43
43
|
selectedOrderStatus={ordersStatusGroup}
|
|
44
44
|
changeOrderStatus={handleOrdersStatusGroupFilter}
|
|
45
|
-
|
|
45
|
+
ordersAmountByStatus={ordersAmountByStatus}
|
|
46
46
|
/>
|
|
47
47
|
<OrderStatusSubFilter
|
|
48
48
|
ordersStatusGroup={ordersStatusGroup}
|
|
49
49
|
selectedSubOrderStatus={selectedSubOrderStatus}
|
|
50
50
|
handleSelectedSubOrderStatus={handleSelectedSubOrderStatus}
|
|
51
|
-
numberOfOrdersBySubstatus={numberOfOrdersBySubstatus}
|
|
52
51
|
/>
|
|
53
52
|
</FilterContainer>
|
|
54
53
|
<WrapperOrderlist id='cardOrders'>
|
|
@@ -59,6 +58,7 @@ export const DeliveryDashboard = (props) => {
|
|
|
59
58
|
handleOrderCardClick={handleLocation}
|
|
60
59
|
handleUpdateDriverLocation={handleUpdateDriverLocation}
|
|
61
60
|
isDelivery
|
|
61
|
+
setOrdersAmountByStatus={setOrdersAmountByStatus}
|
|
62
62
|
/>
|
|
63
63
|
</WrapperOrderlist>
|
|
64
64
|
</OrdersContainer>
|
|
@@ -9,11 +9,15 @@ import { Alert, Modal } from '../../Shared'
|
|
|
9
9
|
import 'react-toastify/dist/ReactToastify.css'
|
|
10
10
|
import { toast } from 'react-toastify'
|
|
11
11
|
import { useTheme } from 'styled-components'
|
|
12
|
+
import { CheckSquareFill, Square } from 'react-bootstrap-icons'
|
|
12
13
|
|
|
13
14
|
import {
|
|
14
15
|
ModalContainer,
|
|
15
|
-
ToastWrapper
|
|
16
|
+
ToastWrapper,
|
|
17
|
+
AlarmContent,
|
|
18
|
+
CheckBoxWrapper
|
|
16
19
|
} from './styles'
|
|
20
|
+
import { Button } from '../../../styles'
|
|
17
21
|
|
|
18
22
|
toast.configure()
|
|
19
23
|
|
|
@@ -27,6 +31,8 @@ const OrderNotificationUI = (props) => {
|
|
|
27
31
|
const [, t] = useLanguage()
|
|
28
32
|
const [events] = useEvent()
|
|
29
33
|
const theme = useTheme()
|
|
34
|
+
const [showModal, setShowModal] = useState(false)
|
|
35
|
+
const [isChecked, setIsChecked] = useState(false)
|
|
30
36
|
|
|
31
37
|
const [notificationModalOpen, setNotificationModalOpen] = useState(false)
|
|
32
38
|
const [registerOrderIds, setRegisterOrderIds] = useState([])
|
|
@@ -110,12 +116,17 @@ const OrderNotificationUI = (props) => {
|
|
|
110
116
|
}, [configState, registerOrderIds, customerId])
|
|
111
117
|
|
|
112
118
|
useEffect(() => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
content: t('SOUND_WILL_BE_PLAYED', 'The sound will be played on this page whenever a new order is received.')
|
|
116
|
-
})
|
|
119
|
+
const isSaved = localStorage.getItem('new_order_notification')
|
|
120
|
+
if (!isSaved) setShowModal(true)
|
|
117
121
|
}, [])
|
|
118
122
|
|
|
123
|
+
const handleClose = () => {
|
|
124
|
+
setShowModal(false)
|
|
125
|
+
if (isChecked) {
|
|
126
|
+
localStorage.setItem('new_order_notification', '1')
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
119
130
|
return (
|
|
120
131
|
<>
|
|
121
132
|
<Modal
|
|
@@ -147,6 +158,21 @@ const OrderNotificationUI = (props) => {
|
|
|
147
158
|
onAccept={() => setAlertState({ open: false, content: [] })}
|
|
148
159
|
closeOnBackdrop={false}
|
|
149
160
|
/>
|
|
161
|
+
<Modal
|
|
162
|
+
open={showModal}
|
|
163
|
+
width='700px'
|
|
164
|
+
onClose={handleClose}
|
|
165
|
+
title={t('ORDERING', 'Ordering')}
|
|
166
|
+
>
|
|
167
|
+
<AlarmContent>
|
|
168
|
+
<span>{t('SOUND_WILL_BE_PLAYED', 'The sound will be played on this page whenever a new order is received.')}</span>
|
|
169
|
+
<CheckBoxWrapper onClick={() => setIsChecked(prev => !prev)} isChecked={isChecked}>
|
|
170
|
+
{isChecked ? <CheckSquareFill /> : <Square />}
|
|
171
|
+
<span>{t('DONT_SHOW_AGAIN', 'Don\'t show again')}</span>
|
|
172
|
+
</CheckBoxWrapper>
|
|
173
|
+
<Button color='primary' onClick={handleClose}>{t('ACCEPT', 'Accept')}</Button>
|
|
174
|
+
</AlarmContent>
|
|
175
|
+
</Modal>
|
|
150
176
|
</>
|
|
151
177
|
)
|
|
152
178
|
}
|
|
@@ -79,3 +79,40 @@ export const ToastWrapper = styled.div`
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
`
|
|
82
|
+
|
|
83
|
+
export const AlarmContent = styled.div`
|
|
84
|
+
button {
|
|
85
|
+
height: 44px;
|
|
86
|
+
width: 100%;
|
|
87
|
+
border-radius: 8px;
|
|
88
|
+
margin-top: 20px;
|
|
89
|
+
}
|
|
90
|
+
> span {
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
}
|
|
93
|
+
`
|
|
94
|
+
|
|
95
|
+
export const CheckBoxWrapper = styled.div`
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
margin-top: 10px;
|
|
100
|
+
span {
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
}
|
|
103
|
+
svg {
|
|
104
|
+
${props => props.theme?.rtl ? css`
|
|
105
|
+
margin-left: 10px;
|
|
106
|
+
` : css`
|
|
107
|
+
margin-right: 10px;
|
|
108
|
+
`}
|
|
109
|
+
font-size: 16px;
|
|
110
|
+
color: ${props => props.theme.colors.secundaryLight};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
${({ isChecked }) => isChecked && css`
|
|
114
|
+
svg {
|
|
115
|
+
color: ${props => props.theme.colors?.primary};
|
|
116
|
+
}
|
|
117
|
+
`}
|
|
118
|
+
`
|
|
@@ -12,7 +12,7 @@ export const OrderStatusFilterBar = (props) => {
|
|
|
12
12
|
const {
|
|
13
13
|
selectedOrderStatus,
|
|
14
14
|
changeOrderStatus,
|
|
15
|
-
|
|
15
|
+
ordersAmountByStatus
|
|
16
16
|
} = props
|
|
17
17
|
|
|
18
18
|
const changeSelectedOrderStatus = (orderStatus) => {
|
|
@@ -21,6 +21,7 @@ export const OrderStatusFilterBar = (props) => {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const [, t] = useLanguage()
|
|
24
|
+
|
|
24
25
|
return (
|
|
25
26
|
<>
|
|
26
27
|
<OrderStatusFilterContainer className='order_status_filter'>
|
|
@@ -31,8 +32,8 @@ export const OrderStatusFilterBar = (props) => {
|
|
|
31
32
|
>
|
|
32
33
|
{t('PENDING', 'pending')}
|
|
33
34
|
<span>(
|
|
34
|
-
{
|
|
35
|
-
|
|
35
|
+
{!isNaN(ordersAmountByStatus?.pending) && ordersAmountByStatus?.pending !== null ? (
|
|
36
|
+
ordersAmountByStatus?.pending ?? 0
|
|
36
37
|
) : (
|
|
37
38
|
<CgSpinnerTwoAlt />
|
|
38
39
|
)}
|
|
@@ -46,8 +47,8 @@ export const OrderStatusFilterBar = (props) => {
|
|
|
46
47
|
>
|
|
47
48
|
{t('IN_PROGRESS', 'in progress')}
|
|
48
49
|
<span>(
|
|
49
|
-
{
|
|
50
|
-
|
|
50
|
+
{!isNaN(ordersAmountByStatus?.inProgress) && ordersAmountByStatus?.inProgress !== null ? (
|
|
51
|
+
ordersAmountByStatus?.inProgress ?? 0
|
|
51
52
|
) : (
|
|
52
53
|
<CgSpinnerTwoAlt />
|
|
53
54
|
)}
|
|
@@ -61,8 +62,8 @@ export const OrderStatusFilterBar = (props) => {
|
|
|
61
62
|
>
|
|
62
63
|
{t('COMPLETED', 'completed')}
|
|
63
64
|
<span>(
|
|
64
|
-
{
|
|
65
|
-
|
|
65
|
+
{!isNaN(ordersAmountByStatus?.completed) && ordersAmountByStatus?.completed !== null ? (
|
|
66
|
+
ordersAmountByStatus?.completed ?? 0
|
|
66
67
|
) : (
|
|
67
68
|
<CgSpinnerTwoAlt />
|
|
68
69
|
)}
|
|
@@ -76,8 +77,8 @@ export const OrderStatusFilterBar = (props) => {
|
|
|
76
77
|
>
|
|
77
78
|
{t('CANCELLED', 'cancelled')}
|
|
78
79
|
<span>(
|
|
79
|
-
{
|
|
80
|
-
|
|
80
|
+
{!isNaN(ordersAmountByStatus?.cancelled) && ordersAmountByStatus?.cancelled !== null ? (
|
|
81
|
+
ordersAmountByStatus?.cancelled ?? 0
|
|
81
82
|
) : (
|
|
82
83
|
<CgSpinnerTwoAlt />
|
|
83
84
|
)}
|
|
@@ -6,12 +6,13 @@ import { Funnel, List as MenuIcon, LifePreserver } from 'react-bootstrap-icons'
|
|
|
6
6
|
import MdcFilterOff from '@meronex/icons/mdc/MdcFilterOff'
|
|
7
7
|
import { OrdersDashboardSLAControls } from '../OrdersDashboardSLAControls'
|
|
8
8
|
import { OrderDashboardSLASetting } from '../OrderDashboardSLASetting'
|
|
9
|
-
import { IconButton } from '../../../styles'
|
|
9
|
+
import { IconButton, LinkButton } from '../../../styles'
|
|
10
10
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
11
11
|
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
|
|
12
12
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
13
13
|
import { GoogleMapsApiKeySettingButton } from '../GoogleMapsApiKeySettingButton'
|
|
14
14
|
import { WebsocketStatus } from '../WebsocketStatus'
|
|
15
|
+
import TiWarningOutline from '@meronex/icons/ti/TiWarningOutline'
|
|
15
16
|
|
|
16
17
|
import {
|
|
17
18
|
OrderContentHeaderContainer,
|
|
@@ -19,7 +20,8 @@ import {
|
|
|
19
20
|
HeaderTitle,
|
|
20
21
|
TopRightSection,
|
|
21
22
|
SLAControlsWrapper,
|
|
22
|
-
WrapperSearchAndFilter
|
|
23
|
+
WrapperSearchAndFilter,
|
|
24
|
+
WarningMessage
|
|
23
25
|
} from './styles'
|
|
24
26
|
|
|
25
27
|
export const OrdersContentHeader = (props) => {
|
|
@@ -52,6 +54,11 @@ export const OrdersContentHeader = (props) => {
|
|
|
52
54
|
const [filterApplied, setFilterApplied] = useState(false)
|
|
53
55
|
const [configState] = useConfig()
|
|
54
56
|
|
|
57
|
+
const handleClearFilters = () => {
|
|
58
|
+
if (searchValue) handleChangeSearch('')
|
|
59
|
+
if (filterApplied) handleChangeFilterValues({})
|
|
60
|
+
}
|
|
61
|
+
|
|
55
62
|
useEffect(() => {
|
|
56
63
|
let _filterApplied = false
|
|
57
64
|
if (Object.keys(filterValues).length === 0) {
|
|
@@ -60,7 +67,7 @@ export const OrdersContentHeader = (props) => {
|
|
|
60
67
|
_filterApplied = filterValues?.groupTypes?.length || filterValues.businessIds.length > 0 || filterValues.cityIds.length > 0 ||
|
|
61
68
|
filterValues.deliveryEndDatetime !== null || filterValues.deliveryFromDatetime !== null || filterValues.deliveryTypes.length > 0 ||
|
|
62
69
|
filterValues.driverIds.length > 0 || filterValues.paymethodIds.length > 0 || filterValues.statuses.length > 0 || filterValues?.metafield?.length > 0 ||
|
|
63
|
-
filterValues?.externalId || filterValues?.logisticStatus !== null
|
|
70
|
+
filterValues?.externalId || filterValues?.logisticStatus !== null || filterValues?.assigned !== null
|
|
64
71
|
}
|
|
65
72
|
setFilterApplied(_filterApplied)
|
|
66
73
|
}, [filterValues])
|
|
@@ -136,6 +143,13 @@ export const OrdersContentHeader = (props) => {
|
|
|
136
143
|
>
|
|
137
144
|
{filterApplied ? <Funnel /> : <MdcFilterOff />}
|
|
138
145
|
</IconButton>
|
|
146
|
+
{(filterApplied || !!searchValue) && (
|
|
147
|
+
<WarningMessage>
|
|
148
|
+
<TiWarningOutline />
|
|
149
|
+
<span>{t('WARNING_FILTER_APPLIED', 'Notifications Paused. Filters applied. You may miss new orders.')}</span>
|
|
150
|
+
<LinkButton onClick={() => handleClearFilters()}>{t('CLEAR_FILTERS', 'Clear filters')}</LinkButton>
|
|
151
|
+
</WarningMessage>
|
|
152
|
+
)}
|
|
139
153
|
</WrapperSearchAndFilter>
|
|
140
154
|
</TopRightSection>
|
|
141
155
|
</OrderContentHeaderContainer>
|