ordering-ui-admin-external 1.25.1 → 1.26.1
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/main.css +1829 -1829
- package/_bundles/{ordering-ui-admin.bb3d2f1a6bc2f5d19b6c.js → ordering-ui-admin.45097ebbca4f4a7d30b7.js} +2 -2
- package/_modules/components/BusinessIntelligence/AnalyticsCalendar/index.js +8 -1
- package/_modules/components/Delivery/DriversCompanyAddForm/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/index.js +68 -0
- package/_modules/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/styles.js +42 -0
- package/_modules/components/Delivery/DriversGroupAddForm/BusinessesForm/index.js +89 -0
- package/_modules/components/Delivery/DriversGroupAddForm/BusinessesForm/styles.js +47 -0
- package/_modules/components/Delivery/DriversGroupAddForm/GeneralForm/index.js +106 -0
- package/_modules/components/Delivery/DriversGroupAddForm/GeneralForm/styles.js +16 -0
- package/_modules/components/Delivery/DriversGroupAddForm/PaymethodsForm/index.js +87 -0
- package/_modules/components/Delivery/DriversGroupAddForm/PaymethodsForm/styles.js +33 -0
- package/_modules/components/Delivery/DriversGroupAddForm/index.js +132 -0
- package/_modules/components/Delivery/DriversGroupAddForm/styles.js +18 -0
- package/_modules/components/Delivery/DriversGroupCompanies/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupDrivers/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupOrders/index.js +5 -5
- package/_modules/components/Delivery/DriversGroupsList/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupsListing/index.js +28 -7
- package/_modules/components/Delivery/DriversGroupsListing/styles.js +2 -2
- package/_modules/components/Delivery/UserAddForm/index.js +39 -6
- package/_modules/components/Delivery/UserAddForm/styles.js +28 -21
- package/_modules/components/Delivery/UserDetails/index.js +2 -2
- package/_modules/components/Home/HomePage/index.js +71 -3
- package/_modules/components/Home/HomePage/styles.js +27 -5
- package/_modules/components/Login/LoginForm/index.js +0 -5
- package/_modules/components/MyProducts/AdvancedLayouts/LayoutStyleGroup.js +46 -0
- package/_modules/components/MyProducts/AdvancedLayouts/index.js +213 -0
- package/_modules/components/MyProducts/AdvancedLayouts/styles.js +146 -0
- package/_modules/components/MyProducts/AdvancedSettings/index.js +12 -0
- package/_modules/components/MyProducts/CustomDomain/index.js +6 -4
- package/_modules/components/MyProducts/CustomDomain/styles.js +27 -9
- package/_modules/components/MyProducts/OrderingWebsite/index.js +94 -17
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +20 -11
- package/_modules/components/Orders/AllInOne/DriversManager/index.js +128 -0
- package/_modules/components/Orders/AllInOne/DriversManager/styles.js +27 -0
- package/_modules/components/Orders/AllInOne/index.js +337 -0
- package/_modules/components/Orders/AllInOne/styles.js +67 -0
- package/_modules/components/Orders/CompanySelector/index.js +259 -0
- package/_modules/components/Orders/CompanySelector/styles.js +86 -0
- package/_modules/components/Orders/DriversBusyStatusFilter/styles.js +6 -3
- package/_modules/components/Orders/DriversList/index.js +3 -2
- package/_modules/components/Orders/DriversList/styles.js +2 -2
- package/_modules/components/Orders/DriversManager/index.js +2 -1
- package/_modules/components/Orders/DriversOnlineOfflineFilter/styles.js +5 -2
- package/_modules/components/Orders/OrderBill/RefundToWallet.js +1 -1
- package/_modules/components/Orders/OrderBill/index.js +17 -18
- package/_modules/components/Orders/OrderContactInformation/index.js +14 -3
- package/_modules/components/Orders/OrderDetails/index.js +1 -1
- package/_modules/components/Orders/OrderStatusSubFilter/styles.js +1 -1
- package/_modules/components/Orders/OrderToPrint/index.js +2 -1
- package/_modules/components/Orders/OrderToPrintTicket/index.js +4 -2
- package/_modules/components/Orders/OrdersContentHeader/index.js +2 -1
- package/_modules/components/Orders/OrdersListing/index.js +3 -1
- package/_modules/components/Orders/OrdersManager/index.js +5 -1
- package/_modules/components/Orders/OrdersTable/index.js +11 -10
- package/_modules/components/Orders/ProductItemAccordion/index.js +5 -9
- package/_modules/components/Orders/WebsocketStatus/index.js +119 -0
- package/_modules/components/Orders/WebsocketStatus/styles.js +65 -0
- package/_modules/components/Orders/index.js +7 -0
- package/_modules/components/Settings/IntegrationListing/Analytics.js +130 -0
- package/_modules/components/Settings/IntegrationListing/PaymentGateway.js +130 -0
- package/_modules/components/Settings/IntegrationListing/index.js +174 -31
- package/_modules/components/Settings/IntegrationListing/styles.js +42 -11
- package/_modules/components/Settings/NotificationSetting/index.js +25 -4
- package/_modules/components/Settings/NotificationSetting/styles.js +5 -3
- package/_modules/components/Settings/SettingsSelectUI/index.js +3 -2
- package/_modules/components/Shared/RangeCalendar/index.js +9 -1
- package/_modules/components/Shared/SearchBar/index.js +11 -6
- package/_modules/components/Shared/SearchBar/styles.js +9 -15
- package/_modules/components/SidebarMenu/index.js +19 -10
- package/_modules/components/Users/UserDetails/index.js +2 -2
- package/_modules/config/currency.js +1017 -0
- package/_modules/index.js +6 -0
- package/_modules/utils/index.js +26 -3
- package/index-template.js +10 -0
- package/package.json +3 -2
- package/src/components/BusinessIntelligence/AnalyticsCalendar/index.js +7 -1
- package/src/components/Delivery/DriversCompanyAddForm/styles.js +0 -1
- package/src/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/index.js +113 -0
- package/src/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/styles.js +72 -0
- package/src/components/Delivery/DriversGroupAddForm/BusinessesForm/index.js +87 -0
- package/src/components/Delivery/DriversGroupAddForm/BusinessesForm/styles.js +87 -0
- package/src/components/Delivery/DriversGroupAddForm/GeneralForm/index.js +104 -0
- package/src/components/Delivery/DriversGroupAddForm/GeneralForm/styles.js +31 -0
- package/src/components/Delivery/DriversGroupAddForm/PaymethodsForm/index.js +82 -0
- package/src/components/Delivery/DriversGroupAddForm/PaymethodsForm/styles.js +46 -0
- package/src/components/Delivery/DriversGroupAddForm/index.js +130 -0
- package/src/components/Delivery/DriversGroupAddForm/styles.js +38 -0
- package/src/components/Delivery/DriversGroupCompanies/styles.js +1 -0
- package/src/components/Delivery/DriversGroupDrivers/styles.js +1 -0
- package/src/components/Delivery/DriversGroupOrders/index.js +2 -2
- package/src/components/Delivery/DriversGroupsList/styles.js +1 -1
- package/src/components/Delivery/DriversGroupsListing/index.js +35 -13
- package/src/components/Delivery/DriversGroupsListing/styles.js +1 -1
- package/src/components/Delivery/UserAddForm/index.js +34 -2
- package/src/components/Delivery/UserAddForm/styles.js +25 -0
- package/src/components/Delivery/UserDetails/index.js +1 -1
- package/src/components/Home/HomePage/index.js +215 -142
- package/src/components/Home/HomePage/styles.js +105 -1
- package/src/components/Login/LoginForm/index.js +0 -7
- package/src/components/MyProducts/AdvancedLayouts/LayoutStyleGroup.js +37 -0
- package/src/components/MyProducts/AdvancedLayouts/index.js +240 -0
- package/src/components/MyProducts/AdvancedLayouts/styles.js +388 -0
- package/src/components/MyProducts/AdvancedSettings/index.js +5 -2
- package/src/components/MyProducts/CustomDomain/index.js +35 -16
- package/src/components/MyProducts/CustomDomain/styles.js +73 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +147 -79
- package/src/components/MyProducts/OrderingWebsite/styles.js +38 -0
- package/src/components/Orders/AllInOne/DriversManager/index.js +137 -0
- package/src/components/Orders/AllInOne/DriversManager/styles.js +51 -0
- package/src/components/Orders/AllInOne/index.js +339 -0
- package/src/components/Orders/AllInOne/styles.js +144 -0
- package/src/components/Orders/CompanySelector/index.js +250 -0
- package/src/components/Orders/CompanySelector/styles.js +142 -0
- package/src/components/Orders/DriversBusyStatusFilter/styles.js +7 -1
- package/src/components/Orders/DriversList/index.js +7 -4
- package/src/components/Orders/DriversList/styles.js +2 -1
- package/src/components/Orders/DriversManager/index.js +2 -0
- package/src/components/Orders/DriversOnlineOfflineFilter/styles.js +8 -1
- package/src/components/Orders/OrderBill/RefundToWallet.js +12 -10
- package/src/components/Orders/OrderBill/index.js +18 -18
- package/src/components/Orders/OrderContactInformation/index.js +20 -1
- package/src/components/Orders/OrderDetails/index.js +8 -8
- package/src/components/Orders/OrderStatusSubFilter/styles.js +1 -1
- package/src/components/Orders/OrderToPrint/index.js +2 -1
- package/src/components/Orders/OrderToPrintTicket/index.js +160 -173
- package/src/components/Orders/OrdersContentHeader/index.js +2 -0
- package/src/components/Orders/OrdersListing/index.js +2 -0
- package/src/components/Orders/OrdersManager/index.js +2 -2
- package/src/components/Orders/OrdersTable/index.js +39 -25
- package/src/components/Orders/ProductItemAccordion/index.js +3 -3
- package/src/components/Orders/WebsocketStatus/index.js +138 -0
- package/src/components/Orders/WebsocketStatus/styles.js +171 -0
- package/src/components/Orders/index.js +2 -0
- package/src/components/Settings/IntegrationListing/Analytics.js +127 -0
- package/src/components/Settings/IntegrationListing/PaymentGateway.js +126 -0
- package/src/components/Settings/IntegrationListing/index.js +189 -96
- package/src/components/Settings/IntegrationListing/styles.js +90 -1
- package/src/components/Settings/NotificationSetting/index.js +73 -10
- package/src/components/Settings/NotificationSetting/styles.js +19 -0
- package/src/components/Settings/SettingsSelectUI/index.js +12 -9
- package/src/components/Shared/RangeCalendar/index.js +7 -1
- package/src/components/Shared/SearchBar/index.js +14 -5
- package/src/components/Shared/SearchBar/styles.js +19 -32
- package/src/components/SidebarMenu/index.js +15 -8
- package/src/components/Users/UserDetails/index.js +1 -1
- package/src/config/currency.js +1010 -0
- package/src/index.js +2 -0
- package/src/utils/index.js +21 -0
- package/template/app.js +4 -0
- package/template/assets/images/preview/franchise.png +0 -0
- package/template/assets/images/preview/marketplace.png +0 -0
- package/template/assets/images/preview/single-store.png +0 -0
- package/template/components/AutologinParams/index.js +1 -3
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/AllInOne/index.js +23 -0
- /package/_bundles/{ordering-ui-admin.bb3d2f1a6bc2f5d19b6c.js.LICENSE.txt → ordering-ui-admin.45097ebbca4f4a7d30b7.js.LICENSE.txt} +0 -0
|
@@ -3,6 +3,7 @@ import { useLanguage, useSession, useUtils } from 'ordering-components-admin-ext
|
|
|
3
3
|
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
4
4
|
import BisBusiness from '@meronex/icons/bi/BisBusiness'
|
|
5
5
|
import { DriverSelector } from '../DriverSelector'
|
|
6
|
+
import { CompanySelector } from '../CompanySelector'
|
|
6
7
|
import { IconButton } from '../../../styles'
|
|
7
8
|
import { Telephone, ChevronDown } from 'react-bootstrap-icons'
|
|
8
9
|
import { Accordion, AccordionContext, useAccordionToggle } from 'react-bootstrap'
|
|
@@ -215,12 +216,29 @@ export const OrderContactInformation = (props) => {
|
|
|
215
216
|
</Accordion>
|
|
216
217
|
{order?.delivery_type === 1 && !isServiceOrder && (
|
|
217
218
|
<>
|
|
219
|
+
{!order?.driver_id && (
|
|
220
|
+
<DriverSelectorContainer>
|
|
221
|
+
<p>{t('DRIVER_COMPANY', 'Driver company')}</p>
|
|
222
|
+
<CompanySelector
|
|
223
|
+
small
|
|
224
|
+
isPhoneView
|
|
225
|
+
defaultValue={order?.driver_company_id ?? 'default'}
|
|
226
|
+
order={order}
|
|
227
|
+
isTourOpen={isTourOpen}
|
|
228
|
+
setCurrentTourStep={setCurrentTourStep}
|
|
229
|
+
handleOpenMessages={handleOpenMessages}
|
|
230
|
+
isOrderDrivers
|
|
231
|
+
orderId={order?.id}
|
|
232
|
+
/>
|
|
233
|
+
</DriverSelectorContainer>
|
|
234
|
+
)}
|
|
235
|
+
{!order?.driver_company_id && (
|
|
218
236
|
<DriverSelectorContainer>
|
|
219
237
|
<p>{t('DRIVER_ASSIGN', 'Driver assign')}</p>
|
|
220
238
|
<DriverSelector
|
|
221
239
|
small
|
|
222
240
|
isPhoneView
|
|
223
|
-
defaultValue={order?.driver_id
|
|
241
|
+
defaultValue={order?.driver_id ?? 'default'}
|
|
224
242
|
order={order}
|
|
225
243
|
isTourOpen={isTourOpen}
|
|
226
244
|
setCurrentTourStep={setCurrentTourStep}
|
|
@@ -229,6 +247,7 @@ export const OrderContactInformation = (props) => {
|
|
|
229
247
|
orderId={order?.id}
|
|
230
248
|
/>
|
|
231
249
|
</DriverSelectorContainer>
|
|
250
|
+
)}
|
|
232
251
|
<DriverInfoContainer>
|
|
233
252
|
<DriverInfo>
|
|
234
253
|
<PhotoWrapper>
|
|
@@ -15,7 +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
|
+
import { getOrderStatuPickUp, getOrderStatus, getCurrenySymbol } from '../../../utils'
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
21
|
Container,
|
|
@@ -337,7 +337,7 @@ const OrderDetailsUI = (props) => {
|
|
|
337
337
|
<p>
|
|
338
338
|
{t('SPOT', 'Spot')}: {order?.place?.name}
|
|
339
339
|
</p>
|
|
340
|
-
</PlaceSpotContainer>
|
|
340
|
+
</PlaceSpotContainer>
|
|
341
341
|
)}
|
|
342
342
|
<StatusBarContainer>
|
|
343
343
|
<StatusBar percentage={progressBarObjt(order?.status)?.percentage} />
|
|
@@ -382,7 +382,7 @@ const OrderDetailsUI = (props) => {
|
|
|
382
382
|
<ProductItemAccordion
|
|
383
383
|
key={product.id}
|
|
384
384
|
product={product}
|
|
385
|
-
currency={order?.currency}
|
|
385
|
+
currency={getCurrenySymbol(order?.currency)}
|
|
386
386
|
/>
|
|
387
387
|
))}
|
|
388
388
|
</OrderProducts>
|
|
@@ -518,11 +518,11 @@ const OrderDetailsUI = (props) => {
|
|
|
518
518
|
/>
|
|
519
519
|
)}
|
|
520
520
|
{order && Object.keys(order).length > 0 && !loading && (
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
521
|
+
<OrderToPrintTicket
|
|
522
|
+
ref={printTicketRef}
|
|
523
|
+
order={order}
|
|
524
|
+
getOrderStatus={progressBarObjt}
|
|
525
|
+
/>
|
|
526
526
|
)}
|
|
527
527
|
</Container>
|
|
528
528
|
)
|
|
@@ -4,6 +4,7 @@ import EnDotSingle from '@meronex/icons/en/EnDotSingle'
|
|
|
4
4
|
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
5
5
|
import BisBusiness from '@meronex/icons/bi/BisBusiness'
|
|
6
6
|
import { OrderBill } from '../OrderBill'
|
|
7
|
+
import { getCurrenySymbol } from '../../../utils'
|
|
7
8
|
|
|
8
9
|
import {
|
|
9
10
|
OrderStatus,
|
|
@@ -81,7 +82,7 @@ export const OrderToPrint = forwardRef((props, ref) => {
|
|
|
81
82
|
const getFormattedSubOptionName = ({ quantity, name, position, price }) => {
|
|
82
83
|
if (name !== 'No') {
|
|
83
84
|
const pos = position ? `(${position})` : ''
|
|
84
|
-
return price > 0 ? `${name} ${pos} ${parsePrice(quantity * price, {
|
|
85
|
+
return price > 0 ? `${name} ${pos} ${parsePrice(quantity * price, { currency: getCurrenySymbol(order?.currency) })}` : `${name} ${pos}`
|
|
85
86
|
} else {
|
|
86
87
|
return 'No'
|
|
87
88
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
2
|
import { verifyDecimals } from '../../../utils'
|
|
3
|
-
import { useUtils, useLanguage, useConfig } from 'ordering-components-admin-external'
|
|
3
|
+
import { useUtils, useLanguage, useConfig } from 'ordering-components-admin-external'
|
|
4
4
|
import { PrintContainer, PrintTextContainer, ProductComments, ProdcutCommentsContainer, Products, InfoContainer, InsideInfo2, InsideInfo, PrintProductsContainer, PrintProducts } from './styles'
|
|
5
5
|
|
|
6
6
|
export const OrderToPrintTicket = forwardRef((props, ref) => {
|
|
@@ -10,7 +10,7 @@ export const OrderToPrintTicket = forwardRef((props, ref) => {
|
|
|
10
10
|
} = props
|
|
11
11
|
|
|
12
12
|
const [, t] = useLanguage()
|
|
13
|
-
const [{ configs }] = useConfig()
|
|
13
|
+
const [{ configs }] = useConfig()
|
|
14
14
|
const [{ parseDate, parsePrice, parseNumber }] = useUtils()
|
|
15
15
|
|
|
16
16
|
const deliveryStatus = {
|
|
@@ -18,7 +18,7 @@ export const OrderToPrintTicket = forwardRef((props, ref) => {
|
|
|
18
18
|
2: t('PICK_UP', 'Pick up'),
|
|
19
19
|
3: t('EAT_IN', 'Eat In'),
|
|
20
20
|
4: t('CURBSIDE', 'Curbside'),
|
|
21
|
-
5: t('DRIVER_THRU', 'Driver thru')
|
|
21
|
+
5: t('DRIVER_THRU', 'Driver thru')
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const getProductPrice = (product) => {
|
|
@@ -39,14 +39,14 @@ export const OrderToPrintTicket = forwardRef((props, ref) => {
|
|
|
39
39
|
|
|
40
40
|
const getFormattedSubOptionName = ({ quantity, name, position, price }) => {
|
|
41
41
|
if (name !== 'No') {
|
|
42
|
-
const pos = position && position !== 'whole' ? `(${t(position.toUpperCase(), position)})` : ''
|
|
42
|
+
const pos = position && position !== 'whole' ? `(${t(position.toUpperCase(), position)})` : ''
|
|
43
43
|
return pos
|
|
44
44
|
? `${quantity} x ${name} ${pos} + ${parsePrice(price)}`
|
|
45
|
-
: `${quantity} x ${name} + ${parsePrice(price)}
|
|
45
|
+
: `${quantity} x ${name} + ${parsePrice(price)}`
|
|
46
46
|
} else {
|
|
47
|
-
return 'No'
|
|
47
|
+
return 'No'
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
const getSuboptions = (suboptions) => {
|
|
52
52
|
const array = []
|
|
@@ -60,19 +60,18 @@ export const OrderToPrintTicket = forwardRef((props, ref) => {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const getOptions = (options, productComment = '') => {
|
|
63
|
-
const array = []
|
|
63
|
+
const array = []
|
|
64
64
|
|
|
65
65
|
options?.length &&
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
66
|
+
options?.map((option) => {
|
|
67
|
+
const string =
|
|
68
|
+
`${option.name} ${getSuboptions(option.suboptions)}`
|
|
69
|
+
array.push(string)
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
if (productComment) {
|
|
73
|
+
array.push(`${t('COMMENT', 'Comment')}${productComment}`)
|
|
74
|
+
}
|
|
76
75
|
|
|
77
76
|
return array
|
|
78
77
|
}
|
|
@@ -80,185 +79,173 @@ export const OrderToPrintTicket = forwardRef((props, ref) => {
|
|
|
80
79
|
const percentTip =
|
|
81
80
|
parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
|
|
82
81
|
!parseInt(configs?.driver_tip_use_custom?.value, 10) &&
|
|
83
|
-
verifyDecimals(order?.summary?.driver_tip, parseNumber)
|
|
82
|
+
verifyDecimals(order?.summary?.driver_tip, parseNumber)
|
|
84
83
|
|
|
85
84
|
const customerName = `${order?.customer?.name ?? ''} ${order?.customer?.middle_name ?? ''} ${order?.customer?.lastname ?? ''} ${order?.customer?.second_lastname ?? ''}`?.replace(' ', ' ')?.trim() ?? ''
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<>
|
|
86
|
+
return (
|
|
87
|
+
<PrintContainer ref={ref}>
|
|
88
|
+
<h1>{t('ORDER_NO', 'Order No.')} {order.id}</h1>
|
|
89
|
+
<PrintTextContainer>
|
|
90
|
+
{getOrderStatus(order?.status)?.value}
|
|
91
|
+
<br />
|
|
92
|
+
{t('DELIVERY_TYPE', 'Delivery Type')}: {deliveryStatus[order?.delivery_type]}
|
|
93
|
+
<br />
|
|
94
|
+
{t('DELIVERY_DATE', 'Delivery Date')}: {order?.delivery_datetime_utc
|
|
95
|
+
? parseDate(order?.delivery_datetime_utc)
|
|
96
|
+
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
97
|
+
<br />
|
|
98
|
+
{t('PAYMENT_METHOD')}: {order?.paymethod?.name}
|
|
99
|
+
</PrintTextContainer>
|
|
100
|
+
|
|
101
|
+
<h1>{t('CUSTOMER_DETAILS', 'Customer details')}</h1>
|
|
102
|
+
<PrintTextContainer>
|
|
103
|
+
{t('FULL_NAME', 'Full Name')}: {customerName}
|
|
104
|
+
<br />
|
|
105
|
+
{t('EMAIL', 'Email')}: {order?.customer?.email}
|
|
106
|
+
<br />
|
|
107
|
+
{t('MOBILE_PHONE', 'Mobile Phone')}: {order?.customer?.cellphone}
|
|
108
|
+
<br />
|
|
109
|
+
{!!order?.customer?.phone && (
|
|
110
|
+
`${t('MOBILE_PHONE', 'Mobile Phone')}: ${order?.customer?.phone}`)}
|
|
111
|
+
{t('FULL_ADDRESS', 'Full Addres')}: {order?.customer?.address}
|
|
112
|
+
{!!order?.customer?.internal_number && (
|
|
113
|
+
`${t('INTERNAL_NUMBER', 'Internal Number')}: ${order?.customer?.internal_number}`)}
|
|
114
|
+
<br />
|
|
115
|
+
{!!order?.customer.zipcode && (
|
|
116
|
+
`${t('ZIPCODE', 'Zipcode')}: ${order?.customer.zipcode}`
|
|
117
|
+
)}
|
|
118
|
+
</PrintTextContainer>
|
|
119
|
+
|
|
120
|
+
<h1>{t('BUSINESS_DETAILS', 'Business details')}</h1>
|
|
121
|
+
<PrintTextContainer>
|
|
122
|
+
{order?.business?.name}
|
|
123
|
+
<br />
|
|
124
|
+
{order?.business?.email}
|
|
125
|
+
<br />
|
|
126
|
+
{!!order?.business?.cellphone && (
|
|
127
|
+
<>
|
|
130
128
|
{`${t('BUSINESS_PHONE', 'Business cellphone')}: ${order?.business?.cellphone}`}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
<br />
|
|
130
|
+
</>
|
|
131
|
+
)}
|
|
132
|
+
{!!order?.business?.phone && (
|
|
133
|
+
<>
|
|
136
134
|
{`${t('BUSINESS_PHONE', 'Business Phone')}: ${order?.business?.phone}`}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
<br />
|
|
136
|
+
</>
|
|
137
|
+
)}
|
|
138
|
+
{t('ADDRESS', 'Address')}: {order?.business?.address}
|
|
139
|
+
<br />
|
|
140
|
+
{!!order?.business?.address_notes && (
|
|
141
|
+
<>
|
|
144
142
|
{`${t('SPECIAL_ADDRESS', 'Special Address')}: ${order?.business?.address_notes}`}
|
|
145
|
-
<br/>
|
|
143
|
+
<br />
|
|
146
144
|
</>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
145
|
+
)}
|
|
146
|
+
</PrintTextContainer>
|
|
147
|
+
<h1>{t('ORDER_DETAILS', 'Order Details')}</h1>
|
|
148
|
+
<br />
|
|
149
|
+
<PrintProductsContainer>
|
|
150
|
+
{order?.products?.length &&
|
|
151
|
+
order?.products?.map((product, i) =>
|
|
152
|
+
<PrintProducts key={i}>
|
|
153
|
+
<Products>
|
|
154
|
+
<InsideInfo>
|
|
157
155
|
{`${product?.quantity}x ${product?.name}`}
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
</InsideInfo>
|
|
157
|
+
<InsideInfo2>
|
|
160
158
|
{parsePrice(product?.total ?? getProductPrice(product))}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<ProductComments>
|
|
159
|
+
</InsideInfo2>
|
|
160
|
+
</Products>
|
|
161
|
+
<ProdcutCommentsContainer>
|
|
162
|
+
{getOptions(product?.options, product?.comment)?.map((option, i) => (
|
|
163
|
+
<ProductComments key={i}>
|
|
166
164
|
{option}
|
|
167
165
|
</ProductComments>
|
|
168
166
|
))}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
</InsideInfo>
|
|
197
|
-
: ''
|
|
198
|
-
}
|
|
199
|
-
{order?.summary?.discount > 0
|
|
200
|
-
? <InsideInfo2>- {parsePrice(
|
|
201
|
-
order?.summary?.discount,
|
|
202
|
-
)}
|
|
203
|
-
</InsideInfo2>
|
|
204
|
-
: ''
|
|
205
|
-
}
|
|
206
|
-
</InfoContainer>
|
|
167
|
+
</ProdcutCommentsContainer>
|
|
168
|
+
</PrintProducts>
|
|
169
|
+
)}
|
|
170
|
+
</PrintProductsContainer>
|
|
171
|
+
<br />
|
|
172
|
+
<InfoContainer>
|
|
173
|
+
<InsideInfo>
|
|
174
|
+
{t('SUBTOTAL', 'Subtotal')}
|
|
175
|
+
</InsideInfo>
|
|
176
|
+
<InsideInfo2>
|
|
177
|
+
{parsePrice(
|
|
178
|
+
order?.tax_type === 1
|
|
179
|
+
? order?.summary?.subtotal + order?.summary?.tax ?? 0
|
|
180
|
+
: order?.summary?.subtotal ?? 0
|
|
181
|
+
)}
|
|
182
|
+
</InsideInfo2>
|
|
183
|
+
</InfoContainer>
|
|
184
|
+
<InfoContainer>
|
|
185
|
+
{order?.summary?.discount > 0
|
|
186
|
+
? order?.offer_type === 1
|
|
187
|
+
? <InsideInfo>{t('DISCOUNT', 'Discount')} ({verifyDecimals(order?.offer_rate, parsePrice)}%)</InsideInfo>
|
|
188
|
+
: <InsideInfo> {t('DISCOUNT', 'Discount')}</InsideInfo>
|
|
189
|
+
: ''}
|
|
190
|
+
{order?.summary?.discount > 0
|
|
191
|
+
? <InsideInfo2>- {parsePrice(order?.summary?.discount)}</InsideInfo2>
|
|
192
|
+
: ''}
|
|
193
|
+
</InfoContainer>
|
|
207
194
|
|
|
208
195
|
{order?.tax_type !== 1 && (
|
|
209
196
|
<>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
</InsideInfo>
|
|
216
|
-
<InsideInfo2>
|
|
217
|
-
{parsePrice(order?.summary?.tax ?? 0)}
|
|
218
|
-
</InsideInfo2>
|
|
219
|
-
</InfoContainer>
|
|
220
|
-
</>
|
|
221
|
-
)}
|
|
222
|
-
|
|
223
|
-
{order?.summary?.delivery_price > 0 && (
|
|
224
|
-
<InfoContainer>
|
|
225
|
-
<InsideInfo>
|
|
226
|
-
{t('DELIVERY_FEE','Delivery Fee',)}
|
|
197
|
+
<InfoContainer>
|
|
198
|
+
<InsideInfo>
|
|
199
|
+
{t('TAX', 'Tax')}
|
|
200
|
+
{' '}
|
|
201
|
+
{`(${verifyDecimals(order?.summary?.tax_rate, parseNumber)}%)`}
|
|
227
202
|
</InsideInfo>
|
|
228
|
-
|
|
229
|
-
|
|
203
|
+
<InsideInfo2>
|
|
204
|
+
{parsePrice(order?.summary?.tax ?? 0)}
|
|
230
205
|
</InsideInfo2>
|
|
231
206
|
</InfoContainer>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
<InfoContainer>
|
|
235
|
-
<InsideInfo>
|
|
236
|
-
{t('DRIVER_TIP', 'Driver tip')}
|
|
237
|
-
{percentTip ? `(${percentTip}%)` : ''}
|
|
238
|
-
</InsideInfo>
|
|
239
|
-
<InsideInfo2>
|
|
240
|
-
{parsePrice(order?.summary?.driver_tip ?? 0)}
|
|
241
|
-
</InsideInfo2>
|
|
242
|
-
</InfoContainer>
|
|
207
|
+
</>
|
|
208
|
+
)}
|
|
243
209
|
|
|
210
|
+
{order?.summary?.delivery_price > 0 && (
|
|
244
211
|
<InfoContainer>
|
|
245
212
|
<InsideInfo>
|
|
246
|
-
{t('
|
|
247
|
-
({verifyDecimals(order?.summary?.service_fee, parseNumber)}%)
|
|
213
|
+
{t('DELIVERY_FEE', 'Delivery Fee')}
|
|
248
214
|
</InsideInfo>
|
|
249
215
|
<InsideInfo2>
|
|
250
|
-
{parsePrice(order?.summary?.
|
|
216
|
+
{parsePrice(order?.summary?.delivery_price)}
|
|
251
217
|
</InsideInfo2>
|
|
252
218
|
</InfoContainer>
|
|
219
|
+
)}
|
|
253
220
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
</
|
|
221
|
+
<InfoContainer>
|
|
222
|
+
<InsideInfo>
|
|
223
|
+
{t('DRIVER_TIP', 'Driver tip')}
|
|
224
|
+
{percentTip ? `(${percentTip}%)` : ''}
|
|
225
|
+
</InsideInfo>
|
|
226
|
+
<InsideInfo2>
|
|
227
|
+
{parsePrice(order?.summary?.driver_tip ?? 0)}
|
|
228
|
+
</InsideInfo2>
|
|
229
|
+
</InfoContainer>
|
|
230
|
+
|
|
231
|
+
<InfoContainer>
|
|
232
|
+
<InsideInfo>
|
|
233
|
+
{t('SERVICE_FEE', 'Service Fee')}
|
|
234
|
+
({verifyDecimals(order?.summary?.service_fee, parseNumber)}%)
|
|
235
|
+
</InsideInfo>
|
|
236
|
+
<InsideInfo2>
|
|
237
|
+
{parsePrice(order?.summary?.service_fee ?? 0)}
|
|
238
|
+
</InsideInfo2>
|
|
239
|
+
</InfoContainer>
|
|
240
|
+
|
|
241
|
+
<InfoContainer>
|
|
242
|
+
<InsideInfo>
|
|
243
|
+
{t('TOTAL', 'Total')}
|
|
244
|
+
</InsideInfo>
|
|
245
|
+
<InsideInfo2>
|
|
246
|
+
{parsePrice(order?.summary?.total ?? 0)}
|
|
247
|
+
</InsideInfo2>
|
|
248
|
+
</InfoContainer>
|
|
262
249
|
</PrintContainer>
|
|
263
|
-
|
|
264
|
-
|
|
250
|
+
)
|
|
251
|
+
})
|
|
@@ -11,6 +11,7 @@ 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
|
+
import { WebsocketStatus } from '../WebsocketStatus'
|
|
14
15
|
|
|
15
16
|
import {
|
|
16
17
|
OrderContentHeaderContainer,
|
|
@@ -104,6 +105,7 @@ export const OrdersContentHeader = (props) => {
|
|
|
104
105
|
</HeaderSection>
|
|
105
106
|
)}
|
|
106
107
|
<TopRightSection>
|
|
108
|
+
<WebsocketStatus />
|
|
107
109
|
{isShowMapsKeySettingButton && (
|
|
108
110
|
<GoogleMapsApiKeySettingButton />
|
|
109
111
|
)}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
|
|
14
14
|
export const OrdersListing = (props) => {
|
|
15
15
|
const {
|
|
16
|
+
hidePhoto,
|
|
16
17
|
isSelectedOrders,
|
|
17
18
|
orderList,
|
|
18
19
|
selectedOrderIds,
|
|
@@ -111,6 +112,7 @@ export const OrdersListing = (props) => {
|
|
|
111
112
|
>
|
|
112
113
|
{orderListView === 'table' ? (
|
|
113
114
|
<OrdersTable
|
|
115
|
+
hidePhoto={hidePhoto}
|
|
114
116
|
setSelectedOrderIds={setSelectedOrderIds}
|
|
115
117
|
isSelectedOrders={isSelectedOrders}
|
|
116
118
|
orderList={orderList}
|
|
@@ -190,8 +190,8 @@ const OrdersManagerUI = (props) => {
|
|
|
190
190
|
changeOrderStatus={handleOrdersStatusGroupFilter}
|
|
191
191
|
numberOfOrdersByStatus={numberOfOrdersByStatus}
|
|
192
192
|
/>
|
|
193
|
-
<OrderSubFilterControls>
|
|
194
|
-
<OrderStatusSubFilterWrapper>
|
|
193
|
+
<OrderSubFilterControls isColumn={selectedOrderIds?.length}>
|
|
194
|
+
<OrderStatusSubFilterWrapper isColumn={selectedOrderIds?.length}>
|
|
195
195
|
<OrderStatusSubFilter
|
|
196
196
|
ordersStatusGroup={ordersStatusGroup}
|
|
197
197
|
selectedSubOrderStatus={selectedSubOrderStatus}
|