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,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
2
3
|
import { DashboardOrdersList as OrdersListController } from 'ordering-components-admin-external'
|
|
3
4
|
import { OrdersListing } from '../OrdersListing'
|
|
4
5
|
|
|
@@ -7,9 +8,15 @@ export const OrdersDashboardList = (props) => {
|
|
|
7
8
|
selectedSubOrderStatus,
|
|
8
9
|
isMessagesView,
|
|
9
10
|
orderByOption,
|
|
10
|
-
setOrdersAmountByStatus
|
|
11
|
+
setOrdersAmountByStatus,
|
|
12
|
+
isUseQuery
|
|
11
13
|
} = props
|
|
12
14
|
|
|
15
|
+
const query = new URLSearchParams(useLocation().search)
|
|
16
|
+
const defaultStatus = query.get('status')
|
|
17
|
+
const defaultPage = query.get('page') || 1
|
|
18
|
+
const defaultPageSize = query.get('pageSize') || 10
|
|
19
|
+
|
|
13
20
|
const OrdersCommonControlProps = {
|
|
14
21
|
...props,
|
|
15
22
|
UIComponent: OrdersListing,
|
|
@@ -33,13 +40,23 @@ export const OrdersDashboardList = (props) => {
|
|
|
33
40
|
<OrdersListController
|
|
34
41
|
isMessagesView
|
|
35
42
|
{...OrdersCommonControlProps}
|
|
43
|
+
paginationSettings={{
|
|
44
|
+
initialPage: isUseQuery && !isNaN(defaultPage) ? Number(defaultPage) : 1,
|
|
45
|
+
pageSize: isUseQuery && !isNaN(defaultPage) ? Number(defaultPageSize) : 10,
|
|
46
|
+
controlType: 'pages'
|
|
47
|
+
}}
|
|
36
48
|
orderStatus={selectedSubOrderStatus?.all}
|
|
37
49
|
/>
|
|
38
50
|
) : (
|
|
39
51
|
<>
|
|
40
52
|
<OrdersListController
|
|
41
|
-
groupStatus='pending'
|
|
42
53
|
{...OrdersCommonControlProps}
|
|
54
|
+
paginationSettings={{
|
|
55
|
+
initialPage: isUseQuery && defaultStatus === 'pending' && !isNaN(defaultPage) ? Number(defaultPage) : 1,
|
|
56
|
+
pageSize: isUseQuery && defaultStatus === 'pending' && !isNaN(defaultPage) ? Number(defaultPageSize) : 10,
|
|
57
|
+
controlType: 'pages'
|
|
58
|
+
}}
|
|
59
|
+
groupStatus='pending'
|
|
43
60
|
orderStatus={selectedSubOrderStatus?.pending}
|
|
44
61
|
setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, pending: total }))}
|
|
45
62
|
/>
|
|
@@ -47,6 +64,11 @@ export const OrdersDashboardList = (props) => {
|
|
|
47
64
|
<OrdersListController
|
|
48
65
|
groupStatus='inProgress'
|
|
49
66
|
{...OrdersCommonControlProps}
|
|
67
|
+
paginationSettings={{
|
|
68
|
+
initialPage: isUseQuery && defaultStatus === 'inProgress' && !isNaN(defaultPage) ? Number(defaultPage) : 1,
|
|
69
|
+
pageSize: isUseQuery && defaultStatus === 'inProgress' && !isNaN(defaultPage) ? Number(defaultPageSize) : 10,
|
|
70
|
+
controlType: 'pages'
|
|
71
|
+
}}
|
|
50
72
|
orderStatus={selectedSubOrderStatus?.inProgress}
|
|
51
73
|
setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, inProgress: total }))}
|
|
52
74
|
/>
|
|
@@ -54,6 +76,11 @@ export const OrdersDashboardList = (props) => {
|
|
|
54
76
|
<OrdersListController
|
|
55
77
|
groupStatus='completed'
|
|
56
78
|
{...OrdersCommonControlProps}
|
|
79
|
+
paginationSettings={{
|
|
80
|
+
initialPage: isUseQuery && defaultStatus === 'completed' && !isNaN(defaultPage) ? Number(defaultPage) : 1,
|
|
81
|
+
pageSize: isUseQuery && defaultStatus === 'completed' && !isNaN(defaultPage) ? Number(defaultPageSize) : 10,
|
|
82
|
+
controlType: 'pages'
|
|
83
|
+
}}
|
|
57
84
|
orderStatus={selectedSubOrderStatus?.completed}
|
|
58
85
|
setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, completed: total }))}
|
|
59
86
|
/>
|
|
@@ -61,6 +88,11 @@ export const OrdersDashboardList = (props) => {
|
|
|
61
88
|
<OrdersListController
|
|
62
89
|
groupStatus='cancelled'
|
|
63
90
|
{...OrdersCommonControlProps}
|
|
91
|
+
paginationSettings={{
|
|
92
|
+
initialPage: isUseQuery && defaultStatus === 'cancelled' && !isNaN(defaultPage) ? Number(defaultPage) : 1,
|
|
93
|
+
pageSize: isUseQuery && defaultStatus === 'cancelled' && !isNaN(defaultPage) ? Number(defaultPageSize) : 10,
|
|
94
|
+
controlType: 'pages'
|
|
95
|
+
}}
|
|
64
96
|
orderStatus={selectedSubOrderStatus?.cancelled}
|
|
65
97
|
setOrdersTotalAmount={total => setOrdersAmountByStatus(prevState => ({ ...prevState, cancelled: total }))}
|
|
66
98
|
/>
|
|
@@ -198,7 +198,7 @@ export const WarningMessage = styled.div`
|
|
|
198
198
|
position: absolute;
|
|
199
199
|
display: flex;
|
|
200
200
|
align-items: center;
|
|
201
|
-
z-index:
|
|
201
|
+
z-index: 10;
|
|
202
202
|
top: 100%;
|
|
203
203
|
background: ${props => props.theme.colors.warning100};
|
|
204
204
|
border: 1px solid ${props => props.theme.colors.warning};
|
|
@@ -50,7 +50,8 @@ export const OrdersListing = (props) => {
|
|
|
50
50
|
setAllowColumns,
|
|
51
51
|
handleDrop,
|
|
52
52
|
isDelivery,
|
|
53
|
-
saveUserSettings
|
|
53
|
+
saveUserSettings,
|
|
54
|
+
isUseQuery
|
|
54
55
|
} = props
|
|
55
56
|
|
|
56
57
|
const theme = useTheme()
|
|
@@ -141,6 +142,7 @@ export const OrdersListing = (props) => {
|
|
|
141
142
|
setAllowColumns={setAllowColumns}
|
|
142
143
|
handleDrop={handleDrop}
|
|
143
144
|
saveUserSettings={saveUserSettings}
|
|
145
|
+
isUseQuery={isUseQuery}
|
|
144
146
|
/>
|
|
145
147
|
) : (
|
|
146
148
|
<OrdersCards
|
|
@@ -159,6 +161,7 @@ export const OrdersListing = (props) => {
|
|
|
159
161
|
handleUpdateDriverLocation={handleUpdateDriverLocation}
|
|
160
162
|
slaSettingTime={slaSettingTime}
|
|
161
163
|
isDelivery={isDelivery}
|
|
164
|
+
isUseQuery={isUseQuery}
|
|
162
165
|
/>
|
|
163
166
|
)}
|
|
164
167
|
</WrapperOrderListContent>
|
|
@@ -48,7 +48,8 @@ const OrdersManagerUI = (props) => {
|
|
|
48
48
|
allowColumns,
|
|
49
49
|
setAllowColumns,
|
|
50
50
|
timeStatus,
|
|
51
|
-
setTimeStatus
|
|
51
|
+
setTimeStatus,
|
|
52
|
+
isUseQuery
|
|
52
53
|
} = props
|
|
53
54
|
|
|
54
55
|
const [, t] = useLanguage()
|
|
@@ -191,6 +192,7 @@ const OrdersManagerUI = (props) => {
|
|
|
191
192
|
setSlaSettingTime={setSlaSettingTime}
|
|
192
193
|
/>
|
|
193
194
|
<OrderStatusFilterBar
|
|
195
|
+
isUseQuery={isUseQuery}
|
|
194
196
|
selectedOrderStatus={ordersStatusGroup}
|
|
195
197
|
changeOrderStatus={handleOrdersStatusGroupFilter}
|
|
196
198
|
ordersAmountByStatus={ordersAmountByStatus}
|
|
@@ -214,6 +216,8 @@ const OrdersManagerUI = (props) => {
|
|
|
214
216
|
setIsOpenOrderDetail(true)
|
|
215
217
|
}}
|
|
216
218
|
handleOpenOrderDetail={handleOpenOrderDetail}
|
|
219
|
+
ordersStatusGroup={ordersStatusGroup}
|
|
220
|
+
selectedSubOrderStatus={selectedSubOrderStatus}
|
|
217
221
|
/>
|
|
218
222
|
)}
|
|
219
223
|
</OrderSubFilterControls>
|
|
@@ -221,6 +225,7 @@ const OrdersManagerUI = (props) => {
|
|
|
221
225
|
<OrdersInnerContent className='order-content'>
|
|
222
226
|
<WrapItemView>
|
|
223
227
|
<OrdersDashboard
|
|
228
|
+
isUseQuery={isUseQuery}
|
|
224
229
|
isSelectedOrders={isSelectedOrders}
|
|
225
230
|
driverId={props.driverId}
|
|
226
231
|
customerId={props.customerId}
|
|
@@ -5,7 +5,8 @@ export const OrdersListContainer = styled.div`
|
|
|
5
5
|
padding: 20px;
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
transition: all 0.5s;
|
|
8
|
-
overflow:
|
|
8
|
+
overflow: auto;
|
|
9
|
+
max-height: 100vh;
|
|
9
10
|
${({ isSelectedOrders }) => isSelectedOrders && css`
|
|
10
11
|
margin-top: 0px;
|
|
11
12
|
padding: 20px 0 0 0;
|
|
@@ -15,7 +16,7 @@ export const OrdersListContainer = styled.div`
|
|
|
15
16
|
}
|
|
16
17
|
`
|
|
17
18
|
export const OrdersContent = styled.div`
|
|
18
|
-
|
|
19
|
+
margin-top: 10px;
|
|
19
20
|
`
|
|
20
21
|
export const OrdersInnerContent = styled.div`
|
|
21
22
|
`
|
|
@@ -40,6 +41,7 @@ export const WrapItemView = styled.div`
|
|
|
40
41
|
width: 100%;
|
|
41
42
|
`
|
|
42
43
|
export const OrderSubFilterControls = styled.div`
|
|
44
|
+
flex-wrap: wrap;
|
|
43
45
|
display: flex;
|
|
44
46
|
justify-content: space-between;
|
|
45
47
|
width: 100%;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from 'ordering-components-admin-external'
|
|
12
12
|
import { useTheme } from 'styled-components'
|
|
13
13
|
import { ColumnAllowSettingPopover, Pagination } from '../../Shared'
|
|
14
|
-
import { getCurrenySymbol } from '../../../utils'
|
|
14
|
+
import { getCurrenySymbol, addQueryToUrl } from '../../../utils'
|
|
15
15
|
|
|
16
16
|
import {
|
|
17
17
|
OrdersContainer,
|
|
@@ -56,7 +56,8 @@ export const OrdersTable = (props) => {
|
|
|
56
56
|
allowColumns,
|
|
57
57
|
setAllowColumns,
|
|
58
58
|
handleDrop,
|
|
59
|
-
saveUserSettings
|
|
59
|
+
saveUserSettings,
|
|
60
|
+
isUseQuery
|
|
60
61
|
} = props
|
|
61
62
|
const [, t] = useLanguage()
|
|
62
63
|
const theme = useTheme()
|
|
@@ -317,6 +318,14 @@ export const OrdersTable = (props) => {
|
|
|
317
318
|
return () => document.removeEventListener('keydown', handleChangeKeyboard)
|
|
318
319
|
}, [isTourOpen, currentTourStep])
|
|
319
320
|
|
|
321
|
+
useEffect(() => {
|
|
322
|
+
if (!isUseQuery || !pagination?.currentPage || !pagination?.pageSize || !pagination?.total) return
|
|
323
|
+
addQueryToUrl({
|
|
324
|
+
page: pagination.currentPage,
|
|
325
|
+
pageSize: pagination.pageSize
|
|
326
|
+
})
|
|
327
|
+
}, [pagination?.currentPage, pagination?.pageSize, pagination?.total])
|
|
328
|
+
|
|
320
329
|
return (
|
|
321
330
|
<>
|
|
322
331
|
<OrdersContainer
|
|
@@ -7,19 +7,13 @@ export const OrdersContainer = styled.div`
|
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
`}
|
|
9
9
|
|
|
10
|
-
@media (min-width: 768px) {
|
|
11
|
-
max-height: calc(var(--vh, 1vh) * 100 - 385px);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
@media (min-width: 992px) {
|
|
15
|
-
max-height: calc(var(--vh, 1vh) * 100 - 305px);
|
|
16
11
|
${({ isSelectedOrders }) => isSelectedOrders && css`
|
|
17
12
|
max-height: calc(var(--vh, 1vh) * 100 - 345px);
|
|
18
13
|
`}
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
@media (min-width: 1200px) {
|
|
22
|
-
max-height: calc(var(--vh, 1vh) * 100 - 275px);
|
|
23
17
|
${({ isSelectedOrders }) => isSelectedOrders && css`
|
|
24
18
|
max-height: calc(var(--vh, 1vh) * 100 - 345px);
|
|
25
19
|
`}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage, PagesList as PagesListController } from 'ordering-components-admin-external'
|
|
3
4
|
import Skeleton from 'react-loading-skeleton'
|
|
4
5
|
import { Button, IconButton, Switch, LinkButton } from '../../../styles'
|
|
@@ -9,6 +10,7 @@ import { useTheme } from 'styled-components'
|
|
|
9
10
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
10
11
|
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
11
12
|
import { PageForm } from '../PageForm'
|
|
13
|
+
import { addQueryToUrl } from '../../../utils'
|
|
12
14
|
|
|
13
15
|
import {
|
|
14
16
|
StaticPageListContainer,
|
|
@@ -39,9 +41,12 @@ const CmsUI = (props) => {
|
|
|
39
41
|
const [openModal, setOpenModal] = useState(false)
|
|
40
42
|
const [curPageId, setCurPageId] = useState(null)
|
|
41
43
|
|
|
44
|
+
const query = new URLSearchParams(useLocation().search)
|
|
45
|
+
const defaultPage = query.get('page') || 1
|
|
46
|
+
const defaultPageSize = query.get('pageSize') || 10
|
|
42
47
|
// Change page
|
|
43
|
-
const [currentPage, setCurrentPage] = useState(1)
|
|
44
|
-
const [pagesPerPage, setPagesPerPage] = useState(10)
|
|
48
|
+
const [currentPage, setCurrentPage] = useState(Number(defaultPage) || 1)
|
|
49
|
+
const [pagesPerPage, setPagesPerPage] = useState(Number(defaultPageSize) || 10)
|
|
45
50
|
|
|
46
51
|
// Get current products
|
|
47
52
|
const [currentPages, setCurrentPages] = useState([])
|
|
@@ -84,6 +89,14 @@ const CmsUI = (props) => {
|
|
|
84
89
|
setOpenModal(true)
|
|
85
90
|
}
|
|
86
91
|
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
if (!currentPage || !pagesPerPage || !totalPages) return
|
|
94
|
+
addQueryToUrl({
|
|
95
|
+
page: currentPage,
|
|
96
|
+
pageSize: pagesPerPage
|
|
97
|
+
})
|
|
98
|
+
}, [currentPage, pagesPerPage, totalPages])
|
|
99
|
+
|
|
87
100
|
return (
|
|
88
101
|
<>
|
|
89
102
|
<StaticPageListContainer>
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import { SearchBar } from '../../Shared'
|
|
22
22
|
import { LanguageTransTable } from '../LanguageTransTable'
|
|
23
23
|
import { LanguageTransSpread } from '../LanguageTransSpread'
|
|
24
|
+
import { removeQueryToUrl } from '../../../utils'
|
|
24
25
|
|
|
25
26
|
const LanguageManagerUI = (props) => {
|
|
26
27
|
const {
|
|
@@ -67,7 +68,10 @@ const LanguageManagerUI = (props) => {
|
|
|
67
68
|
</ViewIconWrapper>
|
|
68
69
|
<ViewIconWrapper
|
|
69
70
|
active={viewMode === 'spread'}
|
|
70
|
-
onClick={() =>
|
|
71
|
+
onClick={() => {
|
|
72
|
+
setViewMode('spread')
|
|
73
|
+
removeQueryToUrl(['page', 'pageSize'])
|
|
74
|
+
}}
|
|
71
75
|
>
|
|
72
76
|
<Table />
|
|
73
77
|
</ViewIconWrapper>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef } from 'react'
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage, LanguageTransTable as LanguageTransTableController } from 'ordering-components-admin-external'
|
|
3
4
|
import Skeleton from 'react-loading-skeleton'
|
|
4
5
|
import { Alert, Pagination } from '../../Shared'
|
|
5
6
|
import { LinkButton } from '../../../styles'
|
|
7
|
+
import { addQueryToUrl } from '../../../utils'
|
|
6
8
|
|
|
7
9
|
import {
|
|
8
10
|
TranslationTableContainer,
|
|
@@ -29,9 +31,12 @@ const LanguageTransTableUI = (props) => {
|
|
|
29
31
|
const [isShowCreation, setIsShowCreation] = useState(false)
|
|
30
32
|
const translationCreateRef = useRef(null)
|
|
31
33
|
|
|
34
|
+
const query = new URLSearchParams(useLocation().search)
|
|
35
|
+
const defaultPage = query.get('page') || 1
|
|
36
|
+
const defaultPageSize = query.get('pageSize') || 10
|
|
32
37
|
// Change page
|
|
33
|
-
const [currentPage, setCurrentPage] = useState(1)
|
|
34
|
-
const [translationPerPage, setTranslationPerPage] = useState(10)
|
|
38
|
+
const [currentPage, setCurrentPage] = useState(Number(defaultPage) || 1)
|
|
39
|
+
const [translationPerPage, setTranslationPerPage] = useState(Number(defaultPageSize) || 10)
|
|
35
40
|
|
|
36
41
|
// Get current products
|
|
37
42
|
const [currentPages, setCurrentPages] = useState([])
|
|
@@ -110,6 +115,14 @@ const LanguageTransTableUI = (props) => {
|
|
|
110
115
|
if (searchValue) setCurrentPage(1)
|
|
111
116
|
}, [searchValue])
|
|
112
117
|
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
if (!currentPage || !translationPerPage || !totalPages) return
|
|
120
|
+
addQueryToUrl({
|
|
121
|
+
page: currentPage,
|
|
122
|
+
pageSize: translationPerPage
|
|
123
|
+
})
|
|
124
|
+
}, [currentPage, translationPerPage, totalPages])
|
|
125
|
+
|
|
113
126
|
return (
|
|
114
127
|
<>
|
|
115
128
|
<TranslationTableContainer>
|
|
@@ -33,8 +33,6 @@ export const SettingsListUI = (props) => {
|
|
|
33
33
|
saveConfig
|
|
34
34
|
} = props
|
|
35
35
|
|
|
36
|
-
const settingsNotAllowed = ['']
|
|
37
|
-
|
|
38
36
|
const [, t] = useLanguage()
|
|
39
37
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
40
38
|
const closeAlert = () => {
|
|
@@ -144,44 +142,89 @@ export const SettingsListUI = (props) => {
|
|
|
144
142
|
<FormContainer>
|
|
145
143
|
{
|
|
146
144
|
configs.length > 0 && configs.map((config, i) => (
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
<div key={i}>
|
|
146
|
+
{
|
|
147
|
+
config.type === 1 && (
|
|
148
|
+
<FormGroupText className='form-group'>
|
|
149
|
+
<label>{config?.name}</label>
|
|
150
|
+
{config?.description && <Description>{config?.description}</Description>}
|
|
151
|
+
<input
|
|
152
|
+
type='text'
|
|
153
|
+
value={config?.value}
|
|
154
|
+
onChange={(e) => handleInputChange(e.target.value, config?.id)}
|
|
155
|
+
onKeyPress={(e) => handleKeyPress(e, config?.key)}
|
|
156
|
+
className='form-control'
|
|
157
|
+
placeholder={config?.name}
|
|
158
|
+
/>
|
|
159
|
+
</FormGroupText>
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
{
|
|
163
|
+
config.type === 2 && (
|
|
164
|
+
config.key === 'country_autocomplete' ? (
|
|
165
|
+
<SettingsCountryFilter
|
|
166
|
+
defaultValue={config?.value}
|
|
167
|
+
handleSelectChange={(value) => handleInputChange(value, config?.id)}
|
|
168
|
+
label={config?.name}
|
|
169
|
+
description={config?.description}
|
|
170
|
+
/>
|
|
171
|
+
) : (
|
|
172
|
+
<SettingsSelectUI
|
|
173
|
+
config={config}
|
|
174
|
+
defaultValue={config?.value}
|
|
175
|
+
handleSelectChange={(value) => handleInputChange(value, config?.id)}
|
|
176
|
+
/>
|
|
177
|
+
)
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
{
|
|
181
|
+
config.type === 3 && (
|
|
182
|
+
<CheckBoxWrapper>
|
|
183
|
+
{config?.name && (
|
|
184
|
+
<label>{config?.name}</label>
|
|
185
|
+
)}
|
|
186
|
+
{config?.description && (
|
|
187
|
+
<p>{config?.description}</p>
|
|
188
|
+
)}
|
|
189
|
+
{
|
|
190
|
+
config?.options?.length > 0 && config?.options?.map((item, j) => (
|
|
191
|
+
<FormGroupWrapper key={j}>
|
|
192
|
+
<FormGroupCheck className='checkbox'>
|
|
193
|
+
<label>
|
|
194
|
+
<input
|
|
195
|
+
type='checkbox'
|
|
196
|
+
name={item?.value}
|
|
197
|
+
data-id={config?.id}
|
|
198
|
+
defaultChecked={config?.value.split('|').includes(item?.value)}
|
|
199
|
+
onChange={(e) => handleCheckBoxChange(e, true, config?.value)}
|
|
200
|
+
/>
|
|
201
|
+
{t(item.text.toUpperCase(), item.text.replace(/_/g, ' ').toLowerCase())}
|
|
202
|
+
</label>
|
|
203
|
+
</FormGroupCheck>
|
|
204
|
+
</FormGroupWrapper>
|
|
205
|
+
))
|
|
206
|
+
}
|
|
207
|
+
{
|
|
208
|
+
!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>
|
|
209
|
+
}
|
|
210
|
+
</CheckBoxWrapper>
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
{
|
|
214
|
+
config.type === 4 && (
|
|
215
|
+
config.key === 'driver_tip_options' ? (
|
|
151
216
|
<FormGroupText className='form-group'>
|
|
152
217
|
<label>{config?.name}</label>
|
|
153
218
|
{config?.description && <Description>{config?.description}</Description>}
|
|
154
219
|
<input
|
|
155
220
|
type='text'
|
|
156
|
-
|
|
221
|
+
defaultValue={formatArray(config?.value)}
|
|
157
222
|
onChange={(e) => handleInputChange(e.target.value, config?.id)}
|
|
158
|
-
onKeyPress={(e) => handleKeyPress(e, config?.key)}
|
|
159
223
|
className='form-control'
|
|
160
|
-
placeholder=
|
|
224
|
+
placeholder='placeholder'
|
|
161
225
|
/>
|
|
162
226
|
</FormGroupText>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
{
|
|
166
|
-
config.type === 2 && (
|
|
167
|
-
config.key === 'country_autocomplete' ? (
|
|
168
|
-
<SettingsCountryFilter
|
|
169
|
-
defaultValue={config?.value}
|
|
170
|
-
handleSelectChange={(value) => handleInputChange(value, config?.id)}
|
|
171
|
-
label={config?.name}
|
|
172
|
-
description={config?.description}
|
|
173
|
-
/>
|
|
174
|
-
) : (
|
|
175
|
-
<SettingsSelectUI
|
|
176
|
-
config={config}
|
|
177
|
-
defaultValue={config?.value}
|
|
178
|
-
handleSelectChange={(value) => handleInputChange(value, config?.id)}
|
|
179
|
-
/>
|
|
180
|
-
)
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
{
|
|
184
|
-
config.type === 3 && (
|
|
227
|
+
) : (
|
|
185
228
|
<CheckBoxWrapper>
|
|
186
229
|
{config?.name && (
|
|
187
230
|
<label>{config?.name}</label>
|
|
@@ -198,75 +241,29 @@ export const SettingsListUI = (props) => {
|
|
|
198
241
|
type='checkbox'
|
|
199
242
|
name={item?.value}
|
|
200
243
|
data-id={config?.id}
|
|
201
|
-
defaultChecked={config?.value
|
|
202
|
-
onChange={(e) => handleCheckBoxChange(e,
|
|
244
|
+
defaultChecked={JSON.parse(config?.value).includes(parseInt(item?.value))}
|
|
245
|
+
onChange={(e) => handleCheckBoxChange(e, false, config?.value)}
|
|
203
246
|
/>
|
|
204
|
-
{
|
|
247
|
+
{item.text}
|
|
205
248
|
</label>
|
|
206
249
|
</FormGroupCheck>
|
|
207
250
|
</FormGroupWrapper>
|
|
208
251
|
))
|
|
209
252
|
}
|
|
210
|
-
{
|
|
211
|
-
!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>
|
|
212
|
-
}
|
|
253
|
+
{!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>}
|
|
213
254
|
</CheckBoxWrapper>
|
|
214
255
|
)
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
className='form-control'
|
|
227
|
-
placeholder='placeholder'
|
|
228
|
-
/>
|
|
229
|
-
</FormGroupText>
|
|
230
|
-
) : (
|
|
231
|
-
<CheckBoxWrapper>
|
|
232
|
-
{config?.name && (
|
|
233
|
-
<label>{config?.name}</label>
|
|
234
|
-
)}
|
|
235
|
-
{config?.description && (
|
|
236
|
-
<p>{config?.description}</p>
|
|
237
|
-
)}
|
|
238
|
-
{
|
|
239
|
-
config?.options?.length > 0 && config?.options?.map((item, j) => (
|
|
240
|
-
<FormGroupWrapper key={j}>
|
|
241
|
-
<FormGroupCheck className='checkbox'>
|
|
242
|
-
<label>
|
|
243
|
-
<input
|
|
244
|
-
type='checkbox'
|
|
245
|
-
name={item?.value}
|
|
246
|
-
data-id={config?.id}
|
|
247
|
-
defaultChecked={JSON.parse(config?.value).includes(parseInt(item?.value))}
|
|
248
|
-
onChange={(e) => handleCheckBoxChange(e, false, config?.value)}
|
|
249
|
-
/>
|
|
250
|
-
{item.text}
|
|
251
|
-
</label>
|
|
252
|
-
</FormGroupCheck>
|
|
253
|
-
</FormGroupWrapper>
|
|
254
|
-
))
|
|
255
|
-
}
|
|
256
|
-
{!config?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>}
|
|
257
|
-
</CheckBoxWrapper>
|
|
258
|
-
)
|
|
259
|
-
)
|
|
260
|
-
}
|
|
261
|
-
{
|
|
262
|
-
config.type === 5 && (
|
|
263
|
-
<SettingsImage
|
|
264
|
-
config={config}
|
|
265
|
-
saveConfig={saveConfig}
|
|
266
|
-
/>
|
|
267
|
-
)
|
|
268
|
-
}
|
|
269
|
-
{/* {config.type === 6 && (
|
|
256
|
+
)
|
|
257
|
+
}
|
|
258
|
+
{
|
|
259
|
+
config.type === 5 && (
|
|
260
|
+
<SettingsImage
|
|
261
|
+
config={config}
|
|
262
|
+
saveConfig={saveConfig}
|
|
263
|
+
/>
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
{/* {config.type === 6 && (
|
|
270
267
|
<>
|
|
271
268
|
<FormGroupText className='form-group'>
|
|
272
269
|
<label>{config?.name}</label>
|
|
@@ -289,8 +286,7 @@ export const SettingsListUI = (props) => {
|
|
|
289
286
|
</FormGroupText>
|
|
290
287
|
</>
|
|
291
288
|
)} */}
|
|
292
|
-
|
|
293
|
-
)
|
|
289
|
+
</div>
|
|
294
290
|
))
|
|
295
291
|
}
|
|
296
292
|
</FormContainer>
|
|
@@ -6,7 +6,7 @@ import { Option } from './styles'
|
|
|
6
6
|
export const WebhookDelaySelector = (props) => {
|
|
7
7
|
const {
|
|
8
8
|
defaultValue,
|
|
9
|
-
handleChangeDelay
|
|
9
|
+
handleChangeDelay
|
|
10
10
|
} = props
|
|
11
11
|
|
|
12
12
|
const [, t] = useLanguage()
|
|
@@ -17,7 +17,8 @@ export const WebhookDelaySelector = (props) => {
|
|
|
17
17
|
{ value: '600', content: <Option>10 {t('MINUTES', 'Minutes')}</Option> },
|
|
18
18
|
{ value: '900', content: <Option>15 {t('MINUTES', 'Minutes')}</Option> },
|
|
19
19
|
{ value: 'delivery_time', content: <Option>{t('DELIVERY_TIME', 'Delivery time')}</Option> },
|
|
20
|
-
{ value: 'pickup_time', content: <Option>{t('PICKUP_TIME', 'Pickup time')}</Option> }
|
|
20
|
+
{ value: 'pickup_time', content: <Option>{t('PICKUP_TIME', 'Pickup time')}</Option> },
|
|
21
|
+
{ value: 'preparation_time', content: <Option>{t('PREPARATION_TIME', 'Preparation time')}</Option> },
|
|
21
22
|
]
|
|
22
23
|
return (
|
|
23
24
|
<>
|
|
@@ -27,6 +27,7 @@ export const WebhookListSelector = (props) => {
|
|
|
27
27
|
{ value: 'orders_pickup_failed_driver', content: <Option>{t('ORDERS_PICKUP_FAILED_DRIVER', 'Order pickup failed by driver')}</Option> },
|
|
28
28
|
{ value: 'orders_delivery_completed_driver', content: <Option>{t('ORDERS_DELIVERY_COMPLETED_DRIVER', 'Order delivery completed by driver')}</Option> },
|
|
29
29
|
{ value: 'orders_delivery_failed_driver', content: <Option>{t('ORDERS_DELIVERY_FAILED_DRIVER', 'Order delivery failed by driver')}</Option> },
|
|
30
|
+
{ value: 'orders_unassigned_driver', content: <Option>{t('ORDERS_UNASSIGNED_DRIVER', 'Order unassigned driver')}</Option> },
|
|
30
31
|
{ value: 'preorder_updated', content: <Option>{t('PREORDER_UPDATED', 'Preorder updated')}</Option> },
|
|
31
32
|
{ value: 'drivers_changes', content: <Option>{t('DRIVERS_CHANGES', 'Driver changes')}</Option> }
|
|
32
33
|
]
|
|
@@ -79,7 +79,7 @@ export const Pagination = (props) => {
|
|
|
79
79
|
setActivePage(currentPage)
|
|
80
80
|
const _visiblePages = getVisiblePages(currentPage, totalPages)
|
|
81
81
|
setVisiblePages(filterPages(_visiblePages, totalPages))
|
|
82
|
-
}, [currentPage])
|
|
82
|
+
}, [currentPage, totalPages])
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
85
|
<PaginationContainer>
|