ordering-ui-admin-external 1.33.1 → 1.35.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.462f5c3aad7a320965e9.js → ordering-ui-admin.78f6259366a43cc634db.js} +2 -2
- package/_modules/components/BusinessIntelligence/AnalyticsCalendar/index.js +1 -0
- package/_modules/components/BusinessIntelligence/AnalyticsOrdersOrSales/index.js +40 -133
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +14 -6
- package/_modules/components/BusinessIntelligence/InvoiceBusinessManager/index.js +4 -3
- package/_modules/components/BusinessIntelligence/InvoiceDriverManager/index.js +4 -3
- package/_modules/components/BusinessIntelligence/InvoiceManager/index.js +5 -3
- package/_modules/components/BusinessIntelligence/Reports/ReportsSlaOrders/index.js +173 -0
- package/_modules/components/BusinessIntelligence/Reports/ReportsSlaOrders/styles.js +93 -0
- package/_modules/components/BusinessIntelligence/Reports/index.js +12 -4
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +21 -10
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +52 -12
- package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +14 -6
- package/_modules/components/CartRecovery/OpenCartList/index.js +12 -3
- package/_modules/components/CartRecovery/OpenCartListing/index.js +16 -4
- package/_modules/components/CartRecovery/OpenCartsDetail/index.js +52 -2
- package/_modules/components/CartRecovery/OpenCartsDetail/styles.js +20 -3
- package/_modules/components/CartRecovery/RecoveryActionDetail/index.js +4 -3
- package/_modules/components/CartRecovery/RecoveryActionList/index.js +10 -1
- package/_modules/components/CartRecovery/RecoveryActionListing/index.js +15 -5
- package/_modules/components/Delivery/DeliveryUsersListing/index.js +19 -6
- package/_modules/components/Delivery/DriversCompaniesList/index.js +16 -3
- package/_modules/components/Delivery/DriversCompaniesListing/index.js +9 -5
- package/_modules/components/Delivery/DriversCompanyDetailsForm/index.js +4 -3
- package/_modules/components/Delivery/DriversGroupDetails/index.js +4 -3
- package/_modules/components/Delivery/DriversGroupLogistics/index.js +4 -4
- package/_modules/components/Delivery/DriversGroupsList/index.js +16 -3
- package/_modules/components/Delivery/DriversGroupsListing/index.js +9 -5
- package/_modules/components/Delivery/UserDetails/index.js +4 -8
- package/_modules/components/Delivery/UserFormDetails/index.js +9 -1
- package/_modules/components/Delivery/UsersList/index.js +10 -1
- package/_modules/components/Marketing/AdBannersListing/index.js +6 -3
- package/_modules/components/Marketing/CampaignDetail/index.js +4 -3
- package/_modules/components/Marketing/CampaignList/index.js +10 -1
- package/_modules/components/Marketing/CampaignListing/index.js +14 -4
- package/_modules/components/Marketing/EnterprisePromotionList/index.js +10 -1
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +14 -4
- package/_modules/components/Marketing/PageBanner/index.js +5 -5
- package/_modules/components/Messages/MessagesListing/index.js +15 -5
- package/_modules/components/MyProducts/AdvancedSettings/index.js +12 -0
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +4 -2
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +23 -5
- package/_modules/components/Orders/AllInOne/DriversManager/styles.js +1 -1
- package/_modules/components/Orders/AllInOne/index.js +7 -3
- package/_modules/components/Orders/AllInOne/styles.js +2 -2
- package/_modules/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +2 -16
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/index.js +26 -3
- package/_modules/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +7 -2
- package/_modules/components/Orders/DeliveriesManager/index.js +4 -2
- package/_modules/components/Orders/DeliveryDashboard/index.js +4 -1
- package/_modules/components/Orders/DriverSelector/index.js +17 -5
- package/_modules/components/Orders/DriversDashboard/index.js +4 -2
- package/_modules/components/Orders/DriversLocation/index.js +70 -9
- package/_modules/components/Orders/DriversManager/index.js +5 -7
- package/_modules/components/Orders/DriversManager/styles.js +1 -1
- package/_modules/components/Orders/GiftCardsListing/index.js +46 -5
- package/_modules/components/Orders/Messages/index.js +4 -4
- package/_modules/components/Orders/OrderContactInformation/index.js +28 -20
- package/_modules/components/Orders/OrderDashboardSLASetting/index.js +1 -1
- package/_modules/components/Orders/OrderDetails/index.js +24 -13
- package/_modules/components/Orders/OrderStatusFilterBar/index.js +28 -5
- package/_modules/components/Orders/OrdersCards/index.js +10 -1
- package/_modules/components/Orders/OrdersDashboardControls/index.js +6 -2
- package/_modules/components/Orders/OrdersDashboardList/index.js +34 -4
- package/_modules/components/Orders/OrdersFilterGroup/styles.js +1 -1
- package/_modules/components/Orders/OrdersListing/index.js +6 -3
- package/_modules/components/Orders/OrdersManager/index.js +7 -2
- package/_modules/components/Orders/OrdersManager/styles.js +3 -3
- package/_modules/components/Orders/OrdersTable/index.js +9 -1
- package/_modules/components/Orders/OrdersTable/styles.js +1 -1
- package/_modules/components/Settings/Cms/index.js +14 -3
- package/_modules/components/Settings/LanguageManager/index.js +3 -1
- package/_modules/components/Settings/LanguageTransTable/index.js +14 -3
- package/_modules/components/Settings/SettingsList/index.js +1 -2
- package/_modules/components/Settings/WebhookDelaySelector/index.js +3 -0
- package/_modules/components/Settings/WebhookList/styles.js +1 -1
- package/_modules/components/Settings/WebhookListSelector/index.js +3 -0
- package/_modules/components/Shared/Pagination/index.js +1 -1
- package/_modules/components/Stores/BusinessActiveStateFilter/index.js +28 -5
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +3 -2
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +10 -5
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +2 -1
- package/_modules/components/Stores/BusinessBrandListing/index.js +8 -5
- package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -4
- package/_modules/components/Stores/BusinessDeliveryZoneDetails/index.js +4 -6
- package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +5 -9
- package/_modules/components/Stores/BusinessDetail/index.js +4 -4
- package/_modules/components/Stores/BusinessDetails/index.js +5 -5
- package/_modules/components/Stores/BusinessDeviceListing/index.js +5 -4
- package/_modules/components/Stores/BusinessInformation/index.js +10 -6
- package/_modules/components/Stores/BusinessInformation/styles.js +1 -1
- package/_modules/components/Stores/BusinessMenu/index.js +8 -12
- package/_modules/components/Stores/BusinessMenuBasicOptions/index.js +8 -0
- package/_modules/components/Stores/BusinessMenuOptions/index.js +4 -6
- package/_modules/components/Stores/BusinessOrderingChannels/index.js +4 -4
- package/_modules/components/Stores/BusinessPaymentMethods/index.js +11 -7
- package/_modules/components/Stores/BusinessPlaceGroupList/index.js +5 -7
- package/_modules/components/Stores/BusinessPreorderDetails/index.js +13 -1
- package/_modules/components/Stores/BusinessProductList/index.js +1 -1
- package/_modules/components/Stores/BusinessProductsCategoyDetails/index.js +4 -3
- package/_modules/components/Stores/BusinessProductsListing/index.js +10 -6
- package/_modules/components/Stores/BusinessSharedMenuProducts/index.js +5 -11
- package/_modules/components/Stores/BusinessSync/index.js +4 -3
- package/_modules/components/Stores/BusinessTypes/index.js +5 -9
- package/_modules/components/Stores/BusinessWalletsList/index.js +5 -7
- package/_modules/components/Stores/BusinessWebhooks/index.js +12 -6
- package/_modules/components/Stores/BusinessesList/index.js +10 -1
- package/_modules/components/Stores/BusinessesListing/index.js +21 -6
- package/_modules/components/Stores/ImportersButton/index.js +5 -3
- package/_modules/components/Stores/PaymentOption/index.js +4 -5
- package/_modules/components/Stores/PaymentOptionMethods/index.js +4 -5
- package/_modules/components/Stores/PaymentOptionPaypal/index.js +4 -5
- package/_modules/components/Stores/PaymentOptionSquare/index.js +4 -5
- package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +4 -5
- package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +4 -5
- package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +4 -5
- package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +4 -5
- package/_modules/components/Stores/ProductDetails/index.js +5 -7
- package/_modules/components/Stores/ProductExtras/index.js +95 -23
- package/_modules/components/Stores/ProductExtras/styles.js +14 -8
- package/_modules/components/Stores/ProductIngredient/index.js +5 -9
- package/_modules/components/Stores/ProductMainDetails/index.js +4 -5
- package/_modules/components/Stores/ProductTagsList/index.js +5 -11
- package/_modules/components/Users/CustomerCashWallet/index.js +4 -5
- package/_modules/components/Users/CustomerDetails/index.js +21 -17
- package/_modules/components/Users/CustomerPointsWallet/index.js +4 -5
- package/_modules/components/Users/CustomersListing/index.js +17 -8
- package/_modules/components/Users/ProfessionalDetail/index.js +4 -9
- package/_modules/components/Users/ProfessionalList/index.js +10 -1
- package/_modules/components/Users/ProfessionalListing/index.js +17 -8
- package/_modules/components/Users/UserActiveStateFilter/index.js +7 -3
- package/_modules/components/Users/UserDetails/index.js +4 -9
- package/_modules/components/Users/UsersList/index.js +10 -1
- package/_modules/components/Users/UsersListing/index.js +17 -8
- package/_modules/index.js +12 -0
- package/_modules/utils/index.js +39 -2
- package/index-template.js +1 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/AnalyticsCalendar/index.js +4 -0
- package/src/components/BusinessIntelligence/AnalyticsOrdersOrSales/index.js +33 -123
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +13 -7
- package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +3 -4
- package/src/components/BusinessIntelligence/InvoiceDriverManager/index.js +3 -4
- package/src/components/BusinessIntelligence/InvoiceManager/index.js +4 -4
- package/src/components/BusinessIntelligence/Reports/ReportsSlaOrders/index.js +200 -0
- package/src/components/BusinessIntelligence/Reports/ReportsSlaOrders/styles.js +239 -0
- package/src/components/BusinessIntelligence/Reports/index.js +10 -6
- package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +23 -11
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +54 -10
- package/src/components/BusinessIntelligence/UsersReviewList/index.js +14 -7
- package/src/components/CartRecovery/OpenCartList/index.js +15 -5
- package/src/components/CartRecovery/OpenCartListing/index.js +14 -3
- package/src/components/CartRecovery/OpenCartsDetail/index.js +44 -4
- package/src/components/CartRecovery/OpenCartsDetail/styles.js +54 -0
- package/src/components/CartRecovery/RecoveryActionDetail/index.js +3 -4
- package/src/components/CartRecovery/RecoveryActionList/index.js +12 -2
- package/src/components/CartRecovery/RecoveryActionListing/index.js +14 -6
- package/src/components/Delivery/DeliveryUsersListing/index.js +19 -8
- package/src/components/Delivery/DriversCompaniesList/index.js +17 -3
- package/src/components/Delivery/DriversCompaniesListing/index.js +7 -5
- package/src/components/Delivery/DriversCompanyDetailsForm/index.js +3 -4
- package/src/components/Delivery/DriversGroupDetails/index.js +3 -4
- package/src/components/Delivery/DriversGroupLogistics/index.js +3 -5
- package/src/components/Delivery/DriversGroupsList/index.js +17 -3
- package/src/components/Delivery/DriversGroupsListing/index.js +7 -5
- package/src/components/Delivery/UserDetails/index.js +4 -9
- package/src/components/Delivery/UserFormDetails/index.js +9 -0
- package/src/components/Delivery/UsersList/index.js +11 -1
- package/src/components/Marketing/AdBannersListing/index.js +5 -4
- package/src/components/Marketing/CampaignDetail/index.js +3 -4
- package/src/components/Marketing/CampaignList/index.js +12 -2
- package/src/components/Marketing/CampaignListing/index.js +14 -5
- package/src/components/Marketing/EnterprisePromotionList/index.js +11 -1
- package/src/components/Marketing/EnterprisePromotionListing/index.js +13 -5
- package/src/components/Marketing/PageBanner/index.js +5 -6
- package/src/components/Messages/MessagesListing/index.js +14 -5
- package/src/components/MyProducts/AdvancedSettings/index.js +4 -1
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +4 -3
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +23 -6
- package/src/components/Orders/AllInOne/DriversManager/styles.js +1 -1
- package/src/components/Orders/AllInOne/index.js +5 -1
- package/src/components/Orders/AllInOne/styles.js +6 -2
- package/src/components/Orders/CreateCustomOrder/CustomOrderDetails/index.js +4 -17
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/index.js +23 -2
- package/src/components/Orders/CreateCustomOrder/SelectCustomer/styles.js +22 -0
- package/src/components/Orders/DeliveriesManager/index.js +3 -1
- package/src/components/Orders/DeliveryDashboard/index.js +4 -1
- package/src/components/Orders/DriverSelector/index.js +8 -2
- package/src/components/Orders/DriversDashboard/index.js +3 -1
- package/src/components/Orders/DriversLocation/index.js +117 -43
- package/src/components/Orders/DriversManager/index.js +3 -2
- package/src/components/Orders/DriversManager/styles.js +1 -1
- package/src/components/Orders/GiftCardsListing/index.js +44 -5
- package/src/components/Orders/Messages/index.js +5 -5
- package/src/components/Orders/OrderContactInformation/index.js +13 -7
- package/src/components/Orders/OrderDashboardSLASetting/index.js +1 -1
- package/src/components/Orders/OrderDetails/index.js +16 -16
- package/src/components/Orders/OrderStatusFilterBar/index.js +19 -2
- package/src/components/Orders/OrdersCards/index.js +11 -1
- package/src/components/Orders/OrdersDashboardControls/index.js +8 -2
- package/src/components/Orders/OrdersDashboardList/index.js +34 -2
- package/src/components/Orders/OrdersFilterGroup/styles.js +1 -1
- package/src/components/Orders/OrdersListing/index.js +4 -1
- package/src/components/Orders/OrdersManager/index.js +6 -1
- package/src/components/Orders/OrdersManager/styles.js +4 -2
- package/src/components/Orders/OrdersTable/index.js +11 -2
- package/src/components/Orders/OrdersTable/styles.js +0 -6
- package/src/components/Settings/Cms/index.js +15 -2
- package/src/components/Settings/LanguageManager/index.js +5 -1
- package/src/components/Settings/LanguageTransTable/index.js +15 -2
- package/src/components/Settings/SettingsList/index.js +90 -94
- package/src/components/Settings/WebhookDelaySelector/index.js +3 -2
- package/src/components/Settings/WebhookList/styles.js +3 -0
- package/src/components/Settings/WebhookListSelector/index.js +1 -0
- package/src/components/Shared/Pagination/index.js +1 -1
- package/src/components/Stores/BusinessActiveStateFilter/index.js +24 -4
- package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +1 -1
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +9 -6
- package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +1 -1
- package/src/components/Stores/BusinessBrandListing/index.js +6 -6
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +3 -5
- package/src/components/Stores/BusinessDeliveryZoneDetails/index.js +3 -7
- package/src/components/Stores/BusinessDeliveryZoneList/index.js +4 -11
- package/src/components/Stores/BusinessDetail/index.js +4 -5
- package/src/components/Stores/BusinessDetails/index.js +4 -6
- package/src/components/Stores/BusinessDeviceListing/index.js +4 -4
- package/src/components/Stores/BusinessInformation/index.js +8 -6
- package/src/components/Stores/BusinessInformation/styles.js +1 -0
- package/src/components/Stores/BusinessMenu/index.js +5 -13
- package/src/components/Stores/BusinessMenuBasicOptions/index.js +3 -2
- package/src/components/Stores/BusinessMenuOptions/index.js +3 -7
- package/src/components/Stores/BusinessOrderingChannels/index.js +3 -5
- package/src/components/Stores/BusinessPaymentMethods/index.js +7 -9
- package/src/components/Stores/BusinessPlaceGroupList/index.js +4 -8
- package/src/components/Stores/BusinessPreorderDetails/index.js +2 -2
- package/src/components/Stores/BusinessProductList/index.js +1 -1
- package/src/components/Stores/BusinessProductsCategoyDetails/index.js +3 -5
- package/src/components/Stores/BusinessProductsListing/index.js +9 -7
- package/src/components/Stores/BusinessSharedMenuProducts/index.js +4 -12
- package/src/components/Stores/BusinessSync/index.js +3 -4
- package/src/components/Stores/BusinessTypes/index.js +4 -11
- package/src/components/Stores/BusinessWalletsList/index.js +4 -8
- package/src/components/Stores/BusinessWebhooks/index.js +6 -4
- package/src/components/Stores/BusinessesList/index.js +11 -1
- package/src/components/Stores/BusinessesListing/index.js +21 -7
- package/src/components/Stores/ImportersButton/index.js +4 -5
- package/src/components/Stores/PaymentOption/index.js +3 -6
- package/src/components/Stores/PaymentOptionMethods/index.js +3 -6
- package/src/components/Stores/PaymentOptionPaypal/index.js +3 -6
- package/src/components/Stores/PaymentOptionSquare/index.js +3 -6
- package/src/components/Stores/PaymentOptionStripeDirect/index.js +3 -6
- package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +3 -6
- package/src/components/Stores/PaymethodOptionStripeConnect/index.js +3 -6
- package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +3 -6
- package/src/components/Stores/ProductDetails/index.js +5 -8
- package/src/components/Stores/ProductExtras/index.js +65 -14
- package/src/components/Stores/ProductExtras/styles.js +41 -1
- package/src/components/Stores/ProductIngredient/index.js +4 -10
- package/src/components/Stores/ProductMainDetails/index.js +4 -6
- package/src/components/Stores/ProductTagsList/index.js +4 -12
- package/src/components/Users/CustomerCashWallet/index.js +3 -6
- package/src/components/Users/CustomerDetails/index.js +13 -11
- package/src/components/Users/CustomerPointsWallet/index.js +3 -6
- package/src/components/Users/CustomersListing/index.js +15 -8
- package/src/components/Users/ProfessionalDetail/index.js +3 -10
- package/src/components/Users/ProfessionalList/index.js +11 -1
- package/src/components/Users/ProfessionalListing/index.js +15 -8
- package/src/components/Users/UserActiveStateFilter/index.js +5 -4
- package/src/components/Users/UserDetails/index.js +3 -10
- package/src/components/Users/UsersList/index.js +11 -1
- package/src/components/Users/UsersListing/index.js +15 -8
- package/src/index.js +3 -1
- package/src/utils/index.js +27 -0
- package/template/pages/AllInOne/index.js +4 -4
- package/template/pages/BusinessesList/index.js +4 -4
- package/template/pages/CampaignListing/index.js +5 -1
- package/template/pages/CustomersList/index.js +5 -4
- package/template/pages/DeliveriesManager/index.js +5 -4
- package/template/pages/DeliveryDriversList/index.js +5 -4
- package/template/pages/DriversCompaniesList/index.js +5 -1
- package/template/pages/DriversGroupsList/index.js +5 -1
- package/template/pages/DriversManagersList/index.js +5 -4
- package/template/pages/EnterprisePromotionList/index.js +1 -0
- package/template/pages/GiftCardsList/index.js +5 -1
- package/template/pages/ManagersList/index.js +5 -4
- package/template/pages/MessagesList/index.js +5 -1
- package/template/pages/OpenCarts/index.js +4 -5
- package/template/pages/OrderingProducts/index.js +2 -1
- package/template/pages/OrdersList/index.js +4 -4
- package/template/pages/Professionals/index.js +5 -4
- package/template/pages/RecoveryActionListing/index.js +5 -1
- package/template/pages/ReviewsList/index.js +5 -1
- /package/_bundles/{ordering-ui-admin.462f5c3aad7a320965e9.js.LICENSE.txt → ordering-ui-admin.78f6259366a43cc634db.js.LICENSE.txt} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage, AdBannersList as AdBannersListController } from 'ordering-components-admin-external'
|
|
4
4
|
import Skeleton from 'react-loading-skeleton'
|
|
5
5
|
import { SideBar, Alert, SearchBar } from '../../Shared'
|
|
6
6
|
import { Button, Switch, IconButton } from '../../../styles'
|
|
7
7
|
import { ArrowsAngleContract, ArrowsAngleExpand, ChevronRight, InfoCircle } from 'react-bootstrap-icons'
|
|
8
8
|
import { BannerDetails } from '../BannerDetails'
|
|
9
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
10
|
+
|
|
9
11
|
import {
|
|
10
12
|
Container,
|
|
11
13
|
HeaderContainer,
|
|
@@ -39,7 +41,6 @@ const PageBannersUI = (props) => {
|
|
|
39
41
|
isSearhShow
|
|
40
42
|
} = props
|
|
41
43
|
|
|
42
|
-
const history = useHistory()
|
|
43
44
|
const query = new URLSearchParams(useLocation().search)
|
|
44
45
|
const [, t] = useLanguage()
|
|
45
46
|
const { width } = useWindowSize()
|
|
@@ -58,8 +59,7 @@ const PageBannersUI = (props) => {
|
|
|
58
59
|
setOpenItemsDetail(true)
|
|
59
60
|
setMoveDistance(500)
|
|
60
61
|
if (banner && !isInitialRender) {
|
|
61
|
-
|
|
62
|
-
history.replace(`${location.pathname}?position=${position}&banner=${banner?.id}`)
|
|
62
|
+
addQueryToUrl({ banner: banner?.id })
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -67,8 +67,7 @@ const PageBannersUI = (props) => {
|
|
|
67
67
|
setMoveDistance(0)
|
|
68
68
|
setOpenItemsDetail(false)
|
|
69
69
|
setSelectedBanner(null)
|
|
70
|
-
|
|
71
|
-
history.replace(`${location.pathname}?position=${position}`)
|
|
70
|
+
removeQueryToUrl(['banner'])
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
const expandSidebar = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage, OrdersManage as OrdersManageController } from 'ordering-components-admin-external'
|
|
4
4
|
import { OrdersContentHeader, OrdersDashboardList, OrderNotification, OrderDetails, Messages } from '../../Orders'
|
|
5
5
|
import { Button } from '../../../styles/Buttons'
|
|
@@ -8,6 +8,7 @@ import { ChatContactList } from '../ChatContactList'
|
|
|
8
8
|
import { ChatBusinessesList } from '../ChatBusinessesList'
|
|
9
9
|
import { AutoScroll } from '../../Shared'
|
|
10
10
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
11
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
11
12
|
|
|
12
13
|
import {
|
|
13
14
|
MessagesListingContainer,
|
|
@@ -32,10 +33,10 @@ const MessagesListingUI = (props) => {
|
|
|
32
33
|
filterValues,
|
|
33
34
|
selectedSubOrderStatus,
|
|
34
35
|
handleChangeSearch,
|
|
35
|
-
handleChangeFilterValues
|
|
36
|
+
handleChangeFilterValues,
|
|
37
|
+
isUseQuery
|
|
36
38
|
} = props
|
|
37
39
|
|
|
38
|
-
const history = useHistory()
|
|
39
40
|
const query = new URLSearchParams(useLocation().search)
|
|
40
41
|
|
|
41
42
|
const [, t] = useLanguage()
|
|
@@ -56,7 +57,14 @@ const MessagesListingUI = (props) => {
|
|
|
56
57
|
setOrderDetailId(order.id)
|
|
57
58
|
setIsOpenOrderDetail(true)
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
if (isUseQuery) {
|
|
61
|
+
addQueryToUrl({ id: order.id })
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const handleCloseOrderDetail = () => {
|
|
66
|
+
setIsOpenOrderDetail(false)
|
|
67
|
+
removeQueryToUrl(['id'])
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
const handleOrderCardClick = (order) => {
|
|
@@ -176,6 +184,7 @@ const MessagesListingUI = (props) => {
|
|
|
176
184
|
handleOpenOrderDetail={handleOpenOrderDetail}
|
|
177
185
|
handleOrderCardClick={handleOrderCardClick}
|
|
178
186
|
timeStatus={timeStatus}
|
|
187
|
+
isUseQuery={isUseQuery}
|
|
179
188
|
/>
|
|
180
189
|
)}
|
|
181
190
|
{selectedOption === 'contacts' && (
|
|
@@ -211,7 +220,7 @@ const MessagesListingUI = (props) => {
|
|
|
211
220
|
order={detailsOrder}
|
|
212
221
|
orderId={orderDetailId}
|
|
213
222
|
drivers={driversList.drivers}
|
|
214
|
-
onClose={() =>
|
|
223
|
+
onClose={() => handleCloseOrderDetail()}
|
|
215
224
|
/>
|
|
216
225
|
)}
|
|
217
226
|
<OrderNotification />
|
|
@@ -64,7 +64,10 @@ export const AdvancedSettings = (props) => {
|
|
|
64
64
|
const businessPageList = [
|
|
65
65
|
{ name: t('DEFAULT_BACKGROUND_COLOR', 'Default Background color'), type: 'color', path: 'business_view.components.style.backgroundColor' },
|
|
66
66
|
{ name: t('PRODUCTS_FROM_PREVIOUS_ORDERS_BLOCK', 'Products from previous orders block'), type: 'hidden', path: 'business_view.components.products_ordered.hidden' },
|
|
67
|
-
{ name: t('NEAR_BUSINESS_BLOCK', 'Near business block'), type: 'hidden', path: 'business_view.components.near_business.hidden' }
|
|
67
|
+
{ name: t('NEAR_BUSINESS_BLOCK', 'Near business block'), type: 'hidden', path: 'business_view.components.near_business.hidden' },
|
|
68
|
+
{ name: t('BUSINESS_LOGO', 'Business logo'), type: 'hidden', path: 'business_view.components.header.components.logo.hidden' },
|
|
69
|
+
{ name: t('BUSINESS_INFO_ICON', 'Business info icon'), type: 'hidden', path: 'business_view.components.header.components.business_info.hidden' },
|
|
70
|
+
{ name: t('BUSINESS_HEADER', 'Business header'), type: 'hidden', path: 'business_view.components.header.hidden' }
|
|
68
71
|
]
|
|
69
72
|
|
|
70
73
|
const businessInfoList = [
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage, SiteDetails as SiteDetailsController } from 'ordering-components-admin-external'
|
|
4
4
|
import { DefaultSelect, IconButton } from '../../../styles'
|
|
5
5
|
import { ArrowsAngleContract, ArrowsAngleExpand, ThreeDots } from 'react-bootstrap-icons'
|
|
6
6
|
import { Confirm } from '../../Shared'
|
|
7
7
|
import { OrderingProductGeneralDetails } from '../OrderingProductGeneralDetails'
|
|
8
8
|
import { SiteTheme } from '../SiteTheme'
|
|
9
|
+
import { addQueryToUrl } from '../../../utils'
|
|
10
|
+
|
|
9
11
|
import {
|
|
10
12
|
Container,
|
|
11
13
|
Tabs,
|
|
@@ -24,7 +26,6 @@ const OrderingProductDetailsUI = (props) => {
|
|
|
24
26
|
handleDeleteSite
|
|
25
27
|
} = props
|
|
26
28
|
|
|
27
|
-
const history = useHistory()
|
|
28
29
|
const query = new URLSearchParams(useLocation().search)
|
|
29
30
|
const [, t] = useLanguage()
|
|
30
31
|
const [selectedTab, setSelectedTab] = useState('general')
|
|
@@ -65,7 +66,7 @@ const OrderingProductDetailsUI = (props) => {
|
|
|
65
66
|
if (!isInitialRender) {
|
|
66
67
|
const id = query.get('id')
|
|
67
68
|
if (id) {
|
|
68
|
-
|
|
69
|
+
addQueryToUrl({ tab: tab })
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import {
|
|
4
4
|
useLanguage,
|
|
5
5
|
SitesList as SitesListController
|
|
@@ -10,6 +10,7 @@ import { List as MenuIcon, InfoCircle } from 'react-bootstrap-icons'
|
|
|
10
10
|
import { Button, IconButton, LinkButton } from '../../../styles'
|
|
11
11
|
import Skeleton from 'react-loading-skeleton'
|
|
12
12
|
import { OrderingProductDetails } from '../OrderingProductDetails'
|
|
13
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
13
14
|
|
|
14
15
|
import {
|
|
15
16
|
OrderingProductsContainer,
|
|
@@ -32,10 +33,10 @@ const OrderingProductsUI = (props) => {
|
|
|
32
33
|
getSites,
|
|
33
34
|
paginationProps,
|
|
34
35
|
setPaginationProps,
|
|
35
|
-
handleSuccessUpdateSites
|
|
36
|
+
handleSuccessUpdateSites,
|
|
37
|
+
isUseQuery
|
|
36
38
|
} = props
|
|
37
39
|
|
|
38
|
-
const history = useHistory()
|
|
39
40
|
const query = new URLSearchParams(useLocation().search)
|
|
40
41
|
const [, t] = useLanguage()
|
|
41
42
|
|
|
@@ -59,14 +60,14 @@ const OrderingProductsUI = (props) => {
|
|
|
59
60
|
setSelectedSite(product)
|
|
60
61
|
setOpenDetails(true)
|
|
61
62
|
if (product && !isInitialRender) {
|
|
62
|
-
|
|
63
|
+
addQueryToUrl({ id: product?.id })
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
const handleCloseDetail = () => {
|
|
67
68
|
setOpenDetails(false)
|
|
68
69
|
setSelectedSite(null)
|
|
69
|
-
|
|
70
|
+
removeQueryToUrl(['id'])
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
useEffect(() => {
|
|
@@ -86,6 +87,14 @@ const OrderingProductsUI = (props) => {
|
|
|
86
87
|
}
|
|
87
88
|
}, [sitesListState])
|
|
88
89
|
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (!isUseQuery || !paginationProps?.currentPage || !paginationProps?.pageSize || !paginationProps?.totalPages) return
|
|
92
|
+
addQueryToUrl({
|
|
93
|
+
page: paginationProps.currentPage,
|
|
94
|
+
pageSize: paginationProps.pageSize
|
|
95
|
+
})
|
|
96
|
+
}, [paginationProps?.currentPage, paginationProps?.pageSize, paginationProps?.totalPages])
|
|
97
|
+
|
|
89
98
|
return (
|
|
90
99
|
<>
|
|
91
100
|
<OrderingProductsContainer>
|
|
@@ -222,9 +231,17 @@ const OrderingProductsUI = (props) => {
|
|
|
222
231
|
}
|
|
223
232
|
|
|
224
233
|
export const OrderingProductsListing = (props) => {
|
|
234
|
+
const query = new URLSearchParams(useLocation().search)
|
|
235
|
+
const defaultPage = query.get('page') || 1
|
|
236
|
+
const defaultPageSize = query.get('pageSize') || 10
|
|
225
237
|
const sitesProps = {
|
|
226
238
|
...props,
|
|
227
|
-
UIComponent: OrderingProductsUI
|
|
239
|
+
UIComponent: OrderingProductsUI,
|
|
240
|
+
paginationSettings: {
|
|
241
|
+
initialPage: props.isUseQuery && !isNaN(defaultPage) ? Number(defaultPage) : 1,
|
|
242
|
+
pageSize: props.isUseQuery && !isNaN(defaultPage) ? Number(defaultPageSize) : 10,
|
|
243
|
+
controlType: 'pages'
|
|
244
|
+
}
|
|
228
245
|
}
|
|
229
246
|
return <SitesListController {...sitesProps} />
|
|
230
247
|
}
|
|
@@ -55,7 +55,8 @@ const OrdersManagerUI = (props) => {
|
|
|
55
55
|
handleCustomOrderDetail,
|
|
56
56
|
setSelectedOrderIds,
|
|
57
57
|
allowColumns,
|
|
58
|
-
setAllowColumns
|
|
58
|
+
setAllowColumns,
|
|
59
|
+
isUseQuery
|
|
59
60
|
} = props
|
|
60
61
|
|
|
61
62
|
const [, t] = useLanguage()
|
|
@@ -215,6 +216,7 @@ const OrdersManagerUI = (props) => {
|
|
|
215
216
|
</DriversContainer>
|
|
216
217
|
<OrdersContainer>
|
|
217
218
|
<OrderStatusFilterBar
|
|
219
|
+
isUseQuery={isUseQuery}
|
|
218
220
|
selectedOrderStatus={ordersStatusGroup}
|
|
219
221
|
changeOrderStatus={handleOrdersStatusGroupFilter}
|
|
220
222
|
ordersAmountByStatus={ordersAmountByStatus}
|
|
@@ -266,6 +268,7 @@ const OrdersManagerUI = (props) => {
|
|
|
266
268
|
allowColumns={allowColumns}
|
|
267
269
|
setAllowColumns={setAllowColumns}
|
|
268
270
|
setOrdersAmountByStatus={setOrdersAmountByStatus}
|
|
271
|
+
isUseQuery={isUseQuery}
|
|
269
272
|
/>
|
|
270
273
|
</WrapItemView>
|
|
271
274
|
</OrdersInnerContent>
|
|
@@ -278,6 +281,7 @@ const OrdersManagerUI = (props) => {
|
|
|
278
281
|
selectedDriver={mapsData.selectedDriver}
|
|
279
282
|
onlineDrivers={mapsData.onlineDrivers}
|
|
280
283
|
offlineDrivers={mapsData.offlineDrivers}
|
|
284
|
+
selectedOrder={!detailsOrder?.driver_id ? detailsOrder : null}
|
|
281
285
|
/>
|
|
282
286
|
</WrapperDriversLocation>
|
|
283
287
|
</MainContentContainer>
|
|
@@ -109,14 +109,18 @@ export const TopContent = styled.div`
|
|
|
109
109
|
@media (min-width: 992px) {
|
|
110
110
|
flex-direction: row;
|
|
111
111
|
#orderTable {
|
|
112
|
-
max-height: calc(var(--vh, 1vh) *
|
|
112
|
+
max-height: calc(var(--vh, 1vh) * 50 - 180px);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
`
|
|
116
116
|
export const WrapperDriversLocation = styled.div`
|
|
117
117
|
border-radius: 8px;
|
|
118
118
|
overflow: hidden;
|
|
119
|
-
height:
|
|
119
|
+
height: calc(var(--vh, 1vh) * 100 - 40px);
|
|
120
|
+
|
|
121
|
+
@media (min-width: 992px) {
|
|
122
|
+
height: calc(var(--vh, 1vh) * 50 - 115px);
|
|
123
|
+
}
|
|
120
124
|
`
|
|
121
125
|
export const DriversContainer = styled.div`
|
|
122
126
|
box-sizing: border-box;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
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'
|
|
@@ -26,7 +26,6 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
26
26
|
setCustomersPhones,
|
|
27
27
|
handleParentSidebarMove,
|
|
28
28
|
businessList,
|
|
29
|
-
getBusinessList,
|
|
30
29
|
selectedUser,
|
|
31
30
|
selectedBusiness,
|
|
32
31
|
setSelectedUser,
|
|
@@ -40,12 +39,13 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
40
39
|
handlePlaceOrderByTotal,
|
|
41
40
|
extraFields,
|
|
42
41
|
setExtraFields,
|
|
43
|
-
actionState
|
|
42
|
+
actionState,
|
|
43
|
+
customerAddress
|
|
44
44
|
} = props
|
|
45
45
|
|
|
46
46
|
const [, t] = useLanguage()
|
|
47
47
|
const [validationFields] = useValidationFields()
|
|
48
|
-
const [
|
|
48
|
+
const [, { changeAddress }] = useOrder()
|
|
49
49
|
|
|
50
50
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
51
51
|
const [isOrderByProducts, setIsOrderByProducts] = useState(true)
|
|
@@ -87,24 +87,11 @@ const CustomOrderDetailsUI = (props) => {
|
|
|
87
87
|
handlePlaceOrderByTotal()
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
const customerAddress = useMemo(() => {
|
|
91
|
-
let address = null
|
|
92
|
-
if (selectedUser?.addresses) {
|
|
93
|
-
address = selectedUser.addresses.find(address => address?.default)
|
|
94
|
-
}
|
|
95
|
-
return address
|
|
96
|
-
}, [selectedUser])
|
|
97
|
-
|
|
98
90
|
useEffect(() => {
|
|
99
91
|
if (!customerAddress?.id) return
|
|
100
92
|
changeAddress(customerAddress.id)
|
|
101
93
|
}, [customerAddress?.id])
|
|
102
94
|
|
|
103
|
-
useEffect(() => {
|
|
104
|
-
if (!customerAddress?.location || orderState?.loading) return
|
|
105
|
-
getBusinessList(customerAddress.location)
|
|
106
|
-
}, [customerAddress?.location, orderState])
|
|
107
|
-
|
|
108
95
|
useEffect(() => {
|
|
109
96
|
if (customersPhones?.error) {
|
|
110
97
|
setAlertState({ open: true, content: [customersPhones?.error] })
|
|
@@ -5,6 +5,7 @@ import { AddressList } from '../../../Delivery'
|
|
|
5
5
|
import { Dot, HouseDoor } from 'react-bootstrap-icons'
|
|
6
6
|
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
7
7
|
import CgSpinnerTwoAlt from '@meronex/icons/cg/CgSpinnerTwoAlt'
|
|
8
|
+
import MdClose from '@meronex/icons/md/MdClose'
|
|
8
9
|
import { SideBar } from '../../../Shared'
|
|
9
10
|
import { Button, Input, LinkButton } from '../../../../styles'
|
|
10
11
|
import { findExitingCountryPhoneCode } from '../../../../utils'
|
|
@@ -34,7 +35,7 @@ export const SelectCustomer = (props) => {
|
|
|
34
35
|
|
|
35
36
|
const [, t] = useLanguage()
|
|
36
37
|
const [{ optimizeImage }] = useUtils()
|
|
37
|
-
const [, { setUserCustomer }] = useCustomer()
|
|
38
|
+
const [, { setUserCustomer, deleteUserCustomer }] = useCustomer()
|
|
38
39
|
const [{ configs }] = useConfig()
|
|
39
40
|
|
|
40
41
|
const [searchInputFocus, setSearchInputFocus] = useState(false)
|
|
@@ -56,9 +57,16 @@ export const SelectCustomer = (props) => {
|
|
|
56
57
|
const onSelectUser = (user) => {
|
|
57
58
|
setUserCustomer(user, true)
|
|
58
59
|
setSelectedUser(user)
|
|
60
|
+
onChangeNumber('')
|
|
59
61
|
setShowSearchbar(false)
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
const onRemoveCustomer = () => {
|
|
65
|
+
deleteUserCustomer(true)
|
|
66
|
+
setSelectedUser(null)
|
|
67
|
+
setShowSearchbar(true)
|
|
68
|
+
}
|
|
69
|
+
|
|
62
70
|
const handleOpenAddForm = () => {
|
|
63
71
|
setOpenSidebar('user_add_form')
|
|
64
72
|
handleParentSidebarMove(500)
|
|
@@ -150,7 +158,9 @@ export const SelectCustomer = (props) => {
|
|
|
150
158
|
{
|
|
151
159
|
customersPhones.loading
|
|
152
160
|
? t('LOADING', 'Loading')
|
|
153
|
-
: phone?.length > 6
|
|
161
|
+
: phone?.length > 6
|
|
162
|
+
? <span className='new' onClick={() => handleOpenAddForm()}>{t('USERS_REGISTER', 'New user')}</span>
|
|
163
|
+
: t('TYPE_AT_LEAST_NUMBER_SUGGEST', 'Type at least 7 numbers for suggesstions')
|
|
154
164
|
}
|
|
155
165
|
</p>
|
|
156
166
|
)}
|
|
@@ -173,6 +183,17 @@ export const SelectCustomer = (props) => {
|
|
|
173
183
|
)}
|
|
174
184
|
</WrapperImage>
|
|
175
185
|
<span className='name'>{selectedUser?.name} {selectedUser?.lastname}</span>
|
|
186
|
+
|
|
187
|
+
<Button
|
|
188
|
+
circle
|
|
189
|
+
outline
|
|
190
|
+
color='primary'
|
|
191
|
+
type='reset'
|
|
192
|
+
className='remove_option'
|
|
193
|
+
onClick={() => onRemoveCustomer()}
|
|
194
|
+
>
|
|
195
|
+
<MdClose />
|
|
196
|
+
</Button>
|
|
176
197
|
</SelectOption>
|
|
177
198
|
</SelectedUserWrapper>
|
|
178
199
|
</>
|
|
@@ -76,9 +76,18 @@ export const OptionsToSelectContainer = styled.div`
|
|
|
76
76
|
> p {
|
|
77
77
|
font-size: 12px;
|
|
78
78
|
margin: 0 16px;
|
|
79
|
+
|
|
80
|
+
> span.new {
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
color: ${props => props.theme.colors.primary};
|
|
83
|
+
&:hover {
|
|
84
|
+
text-decoration: underline;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
}
|
|
80
88
|
`
|
|
81
89
|
export const SelectOption = styled.div`
|
|
90
|
+
position: relative;
|
|
82
91
|
cursor: pointer;
|
|
83
92
|
width: 100%;
|
|
84
93
|
padding: 9px 16px;
|
|
@@ -96,6 +105,19 @@ export const SelectOption = styled.div`
|
|
|
96
105
|
white-space: nowrap;
|
|
97
106
|
}
|
|
98
107
|
}
|
|
108
|
+
|
|
109
|
+
button {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
position: absolute;
|
|
114
|
+
background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
|
|
115
|
+
width: 20px;
|
|
116
|
+
height: 20px;
|
|
117
|
+
transform: translate(100%, -50%);
|
|
118
|
+
top: 11px;
|
|
119
|
+
right: 20px;
|
|
120
|
+
}
|
|
99
121
|
`
|
|
100
122
|
|
|
101
123
|
export const WrapperImage = styled.div`
|
|
@@ -31,7 +31,8 @@ const DeliveriesManagerUI = (props) => {
|
|
|
31
31
|
onOrderRedirect,
|
|
32
32
|
numberOfOrdersBySubstatus,
|
|
33
33
|
timeStatus,
|
|
34
|
-
setTimeStatus
|
|
34
|
+
setTimeStatus,
|
|
35
|
+
isUseQuery
|
|
35
36
|
} = props
|
|
36
37
|
|
|
37
38
|
const [, t] = useLanguage()
|
|
@@ -112,6 +113,7 @@ const DeliveriesManagerUI = (props) => {
|
|
|
112
113
|
ordersAmountByStatus={ordersAmountByStatus}
|
|
113
114
|
setOrdersAmountByStatus={setOrdersAmountByStatus}
|
|
114
115
|
numberOfOrdersBySubstatus={numberOfOrdersBySubstatus}
|
|
116
|
+
isUseQuery={isUseQuery}
|
|
115
117
|
/>
|
|
116
118
|
</WrapItemView>
|
|
117
119
|
</OrdersContent>
|
|
@@ -18,7 +18,8 @@ export const DeliveryDashboard = (props) => {
|
|
|
18
18
|
handleOrdersStatusGroupFilter,
|
|
19
19
|
handleSelectedSubOrderStatus,
|
|
20
20
|
ordersAmountByStatus,
|
|
21
|
-
setOrdersAmountByStatus
|
|
21
|
+
setOrdersAmountByStatus,
|
|
22
|
+
isUseQuery
|
|
22
23
|
} = props
|
|
23
24
|
|
|
24
25
|
const [interActionMapOrder, setInterActionMapOrder] = useState(null)
|
|
@@ -40,6 +41,7 @@ export const DeliveryDashboard = (props) => {
|
|
|
40
41
|
<OrdersContainer>
|
|
41
42
|
<FilterContainer>
|
|
42
43
|
<OrderStatusFilterBar
|
|
44
|
+
isUseQuery={isUseQuery}
|
|
43
45
|
selectedOrderStatus={ordersStatusGroup}
|
|
44
46
|
changeOrderStatus={handleOrdersStatusGroupFilter}
|
|
45
47
|
ordersAmountByStatus={ordersAmountByStatus}
|
|
@@ -53,6 +55,7 @@ export const DeliveryDashboard = (props) => {
|
|
|
53
55
|
<WrapperOrderlist id='cardOrders'>
|
|
54
56
|
<OrdersDashboardList
|
|
55
57
|
{...props}
|
|
58
|
+
isUseQuery={isUseQuery}
|
|
56
59
|
orderListView='card'
|
|
57
60
|
selectedOrderCard={interActionMapOrder}
|
|
58
61
|
handleOrderCardClick={handleLocation}
|
|
@@ -29,7 +29,8 @@ const DriverSelectorUI = (props) => {
|
|
|
29
29
|
handleAssignDriver,
|
|
30
30
|
isTourOpen,
|
|
31
31
|
setCurrentTourStep,
|
|
32
|
-
handleOpenMessages
|
|
32
|
+
handleOpenMessages,
|
|
33
|
+
setCommentInfostate
|
|
33
34
|
} = props
|
|
34
35
|
|
|
35
36
|
const [, t] = useLanguage()
|
|
@@ -137,7 +138,12 @@ const DriverSelectorUI = (props) => {
|
|
|
137
138
|
if (driverId === 'remove') {
|
|
138
139
|
driverId = null
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
+
if (driverId && setCommentInfostate) {
|
|
142
|
+
setCommentInfostate({ open: true, driverId: driverId })
|
|
143
|
+
} else {
|
|
144
|
+
setCommentInfostate && setCommentInfostate({ open: false, driverId: null })
|
|
145
|
+
handleAssignDriver({ orderId: order.id, driverId: driverId })
|
|
146
|
+
}
|
|
141
147
|
if (isTourOpen && setCurrentTourStep) {
|
|
142
148
|
handleOpenMessages('chat')
|
|
143
149
|
setTimeout(() => {
|
|
@@ -22,7 +22,8 @@ export const DriversDashboard = (props) => {
|
|
|
22
22
|
handleChangeDriver,
|
|
23
23
|
handleChangeDriverIsOnline,
|
|
24
24
|
handleChangeDriversSubFilter,
|
|
25
|
-
handleOpenDriverOrders
|
|
25
|
+
handleOpenDriverOrders,
|
|
26
|
+
assignedOrders
|
|
26
27
|
} = props
|
|
27
28
|
|
|
28
29
|
const numberOfonlineDrivers = onlineDrivers.length
|
|
@@ -66,6 +67,7 @@ export const DriversDashboard = (props) => {
|
|
|
66
67
|
onlineDrivers={onlineDrivers}
|
|
67
68
|
offlineDrivers={offlineDrivers}
|
|
68
69
|
driversList={driversList}
|
|
70
|
+
assignedOrders={assignedOrders}
|
|
69
71
|
/>
|
|
70
72
|
</WrapperDriversLocation>
|
|
71
73
|
</DriversDashboardContainer>
|