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,6 +1,9 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
4
|
import { AutoScroll } from '../../Shared'
|
|
5
|
+
import { addQueryToUrl } from '../../../utils'
|
|
6
|
+
|
|
4
7
|
import {
|
|
5
8
|
ActiveStateFilterContainer,
|
|
6
9
|
InnerContainer,
|
|
@@ -10,10 +13,27 @@ import {
|
|
|
10
13
|
export const BusinessActiveStateFilter = (props) => {
|
|
11
14
|
const {
|
|
12
15
|
selectedBusinessActiveState,
|
|
13
|
-
handleChangeBusinessActiveState
|
|
16
|
+
handleChangeBusinessActiveState,
|
|
17
|
+
isUseQuery
|
|
14
18
|
} = props
|
|
15
19
|
|
|
16
20
|
const [, t] = useLanguage()
|
|
21
|
+
const query = new URLSearchParams(useLocation().search)
|
|
22
|
+
const defaultActive = query.get('active')
|
|
23
|
+
|
|
24
|
+
const handleClickTab = (active) => {
|
|
25
|
+
handleChangeBusinessActiveState(active)
|
|
26
|
+
addQueryToUrl({ active: active })
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!isUseQuery) return
|
|
31
|
+
if (defaultActive) {
|
|
32
|
+
handleChangeBusinessActiveState(defaultActive === 'true')
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
addQueryToUrl({ active: 'true' })
|
|
36
|
+
}, [])
|
|
17
37
|
|
|
18
38
|
return (
|
|
19
39
|
<>
|
|
@@ -22,13 +42,13 @@ export const BusinessActiveStateFilter = (props) => {
|
|
|
22
42
|
<AutoScroll innerScroll scrollId='userActiveState'>
|
|
23
43
|
<Tab
|
|
24
44
|
active={selectedBusinessActiveState}
|
|
25
|
-
onClick={() =>
|
|
45
|
+
onClick={() => handleClickTab(true)}
|
|
26
46
|
>
|
|
27
47
|
{t('ACTIVE', 'Active')}
|
|
28
48
|
</Tab>
|
|
29
49
|
<Tab
|
|
30
50
|
active={!selectedBusinessActiveState}
|
|
31
|
-
onClick={() =>
|
|
51
|
+
onClick={() => handleClickTab(false)}
|
|
32
52
|
>
|
|
33
53
|
{t('INACTIVE', 'Inactive')}
|
|
34
54
|
</Tab>
|
|
@@ -81,7 +81,7 @@ export const BusinessDetails = (props) => {
|
|
|
81
81
|
apiKey={configs?.google_maps_api_key?.value}
|
|
82
82
|
location={formState?.changes?.location ?? defaultPosition}
|
|
83
83
|
mapControls={googleMapsControls}
|
|
84
|
-
handleChangeCenter={handleChangeCenter}
|
|
84
|
+
// handleChangeCenter={handleChangeCenter}
|
|
85
85
|
isFitCenter
|
|
86
86
|
/>
|
|
87
87
|
</WrapperMap>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useLanguage } from 'ordering-components-admin-external'
|
|
2
|
+
import { useLanguage, useConfig } from 'ordering-components-admin-external'
|
|
3
3
|
import { RecordCircleFill, Circle } from 'react-bootstrap-icons'
|
|
4
4
|
import {
|
|
5
5
|
Container,
|
|
@@ -11,14 +11,17 @@ import {
|
|
|
11
11
|
export const OrderTypePriceLevel = (props) => {
|
|
12
12
|
const { formState, changeFormState } = props
|
|
13
13
|
|
|
14
|
+
const [{ configs }] = useConfig()
|
|
14
15
|
const [, t] = useLanguage()
|
|
15
16
|
|
|
17
|
+
const priceSymbol = configs?.format_number_currency?.value?.trim()
|
|
18
|
+
|
|
16
19
|
const priceList = [
|
|
17
|
-
{ key: '1', value:
|
|
18
|
-
{ key: '2', value: '
|
|
19
|
-
{ key: '3', value: '
|
|
20
|
-
{ key: '4', value: '
|
|
21
|
-
{ key: '5', value: '
|
|
20
|
+
{ key: '1', value: `${priceSymbol}` },
|
|
21
|
+
{ key: '2', value: `${Array(2).fill(priceSymbol).join('')}` },
|
|
22
|
+
{ key: '3', value: `${Array(3).fill(priceSymbol).join('')}` },
|
|
23
|
+
{ key: '4', value: `${Array(4).fill(priceSymbol).join('')}` },
|
|
24
|
+
{ key: '5', value: `${Array(5).fill(priceSymbol).join('')}` }
|
|
22
25
|
]
|
|
23
26
|
|
|
24
27
|
return (
|
|
@@ -36,7 +36,7 @@ export const PaymentMethods = (props) => {
|
|
|
36
36
|
{!paymethodsList?.loading && paymethodsList?.paymethods.map((paymethod, idx) => (
|
|
37
37
|
<PaymethodItem key={paymethod?.id} isBorderTop={idx === 0} onClick={() => handleChangeIds(paymethod.id)}>
|
|
38
38
|
{paymethodIds.includes(paymethod?.id) ? <CheckSquareFill className='enabled' /> : <Square />}
|
|
39
|
-
<span>{paymethod?.name}</span>
|
|
39
|
+
<span>{t(paymethod?.gateway?.toUpperCase(), paymethod?.name)}</span>
|
|
40
40
|
</PaymethodItem>
|
|
41
41
|
))}
|
|
42
42
|
</ContentWrapper>
|
|
@@ -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
|
useUtils,
|
|
@@ -13,6 +13,8 @@ import { useTheme } from 'styled-components'
|
|
|
13
13
|
import { Alert, SearchBar, SideBar } from '../../Shared'
|
|
14
14
|
import { BusinessBrandGENDetail } from '../BusinessBrandGENDetail'
|
|
15
15
|
import { BusinessBrandBUSIDetail } from '../BusinessBrandBUSIDetail'
|
|
16
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
17
|
+
|
|
16
18
|
import {
|
|
17
19
|
BrandListingContainer,
|
|
18
20
|
HeaderContainer,
|
|
@@ -48,7 +50,6 @@ const BusinessBrandListingUI = (props) => {
|
|
|
48
50
|
setOpenDetail
|
|
49
51
|
} = props
|
|
50
52
|
|
|
51
|
-
const history = useHistory()
|
|
52
53
|
const query = new URLSearchParams(useLocation().search)
|
|
53
54
|
const [, t] = useLanguage()
|
|
54
55
|
const theme = useTheme()
|
|
@@ -67,7 +68,7 @@ const BusinessBrandListingUI = (props) => {
|
|
|
67
68
|
const handleCloseSidebar = () => {
|
|
68
69
|
setOpenDetail(false)
|
|
69
70
|
setSelectedBrand(null)
|
|
70
|
-
|
|
71
|
+
removeQueryToUrl(['id', 'tab'])
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
const handleOpenSideBar = (id) => {
|
|
@@ -93,7 +94,7 @@ const BusinessBrandListingUI = (props) => {
|
|
|
93
94
|
if (isInvalid) return
|
|
94
95
|
handleOpenSideBar(brandId)
|
|
95
96
|
if (!isInitialRender) {
|
|
96
|
-
|
|
97
|
+
addQueryToUrl({ id: brandId })
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
|
|
@@ -144,8 +145,7 @@ const BusinessBrandListingUI = (props) => {
|
|
|
144
145
|
const handleTabClick = (tab, isInitialRender) => {
|
|
145
146
|
setSelectedType(tab)
|
|
146
147
|
if (!isInitialRender) {
|
|
147
|
-
|
|
148
|
-
history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
|
|
148
|
+
addQueryToUrl({ tab: tab })
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
4
4
|
import { BusinessDeliveryDetails } from '../BusinessDeliveryDetails'
|
|
5
5
|
import { BusinessPickupDetails } from '../BusinessPickupDetails'
|
|
6
6
|
import { BusinessEta } from '../BusinessEta'
|
|
7
7
|
import { DragScroll } from '../../Shared'
|
|
8
|
+
import { addQueryToUrl } from '../../../utils'
|
|
8
9
|
|
|
9
10
|
import {
|
|
10
11
|
Container,
|
|
@@ -18,7 +19,6 @@ export const BusinessDeliveryPickupMore = (props) => {
|
|
|
18
19
|
setIsExtendExtraOpen
|
|
19
20
|
} = props
|
|
20
21
|
|
|
21
|
-
const history = useHistory()
|
|
22
22
|
const query = new URLSearchParams(useLocation().search)
|
|
23
23
|
const [, t] = useLanguage()
|
|
24
24
|
const [selectedTab, setSelectedTab] = useState('delivery')
|
|
@@ -37,9 +37,7 @@ export const BusinessDeliveryPickupMore = (props) => {
|
|
|
37
37
|
const handleTabClick = (tab, isInitialRender) => {
|
|
38
38
|
setSelectedTab(tab)
|
|
39
39
|
if (!isInitialRender) {
|
|
40
|
-
|
|
41
|
-
const section = query.get('section')
|
|
42
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}`)
|
|
40
|
+
addQueryToUrl({ tab: tab })
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
|
|
@@ -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
|
BusinessDeliveryZone as BusinessDeliveryZoneController
|
|
@@ -10,6 +10,7 @@ import { ThreeDots } from 'react-bootstrap-icons'
|
|
|
10
10
|
import { Dropdown, DropdownButton } from 'react-bootstrap'
|
|
11
11
|
import { useTheme } from 'styled-components'
|
|
12
12
|
import { Confirm } from '../../Shared'
|
|
13
|
+
import { addQueryToUrl } from '../../../utils'
|
|
13
14
|
|
|
14
15
|
import {
|
|
15
16
|
Container,
|
|
@@ -35,7 +36,6 @@ const BusinessDeliveryZoneDetailsUI = (props) => {
|
|
|
35
36
|
handleSuccessUpdate
|
|
36
37
|
} = props
|
|
37
38
|
|
|
38
|
-
const history = useHistory()
|
|
39
39
|
const query = new URLSearchParams(useLocation().search)
|
|
40
40
|
const theme = useTheme()
|
|
41
41
|
const [, t] = useLanguage()
|
|
@@ -61,11 +61,7 @@ const BusinessDeliveryZoneDetailsUI = (props) => {
|
|
|
61
61
|
const handleTabClick = (zoneTab, isInitialRender) => {
|
|
62
62
|
setSelectedMenuOption(zoneTab)
|
|
63
63
|
if (!isInitialRender) {
|
|
64
|
-
|
|
65
|
-
const section = query.get('section')
|
|
66
|
-
const tab = query.get('tab')
|
|
67
|
-
const zone = query.get('zone')
|
|
68
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}&zone=${zone}&zone_tab=${zoneTab}`)
|
|
64
|
+
addQueryToUrl({ zone_tab: zoneTab })
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
4
4
|
import { BusinessDeliveryZoneDetails } from '../BusinessDeliveryZoneDetails'
|
|
5
5
|
import { SideBar } from '../../Shared'
|
|
6
6
|
import { ChevronRight } from 'react-bootstrap-icons'
|
|
7
7
|
import { Checkbox, LinkButton } from '../../../styles'
|
|
8
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
8
9
|
|
|
9
10
|
import {
|
|
10
11
|
ZoneContainer,
|
|
@@ -24,7 +25,6 @@ export const BusinessDeliveryZoneList = (props) => {
|
|
|
24
25
|
handleChangeAllZoneState
|
|
25
26
|
} = props
|
|
26
27
|
|
|
27
|
-
const history = useHistory()
|
|
28
28
|
const query = new URLSearchParams(useLocation().search)
|
|
29
29
|
const [, t] = useLanguage()
|
|
30
30
|
const [isOpenDetails, setIsOpenDetails] = useState(false)
|
|
@@ -34,11 +34,7 @@ export const BusinessDeliveryZoneList = (props) => {
|
|
|
34
34
|
setIsOpenDetails(false)
|
|
35
35
|
setIsExtendExtraOpen(false)
|
|
36
36
|
setCurZone(null)
|
|
37
|
-
|
|
38
|
-
const businessId = query.get('id')
|
|
39
|
-
const section = query.get('section')
|
|
40
|
-
const tab = query.get('tab')
|
|
41
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}`)
|
|
37
|
+
removeQueryToUrl(['zone', 'zone_tab'])
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
const handleOpenZone = (e, zone, isInitialRender) => {
|
|
@@ -49,10 +45,7 @@ export const BusinessDeliveryZoneList = (props) => {
|
|
|
49
45
|
setIsOpenDetails(true)
|
|
50
46
|
|
|
51
47
|
if (!isInitialRender) {
|
|
52
|
-
|
|
53
|
-
const section = query.get('section')
|
|
54
|
-
const tab = query.get('tab')
|
|
55
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}&zone=${zone?.id}`)
|
|
48
|
+
addQueryToUrl({ zone: zone?.id })
|
|
56
49
|
}
|
|
57
50
|
}
|
|
58
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
-
import {
|
|
3
|
+
import { useLocation } from 'react-router-dom'
|
|
4
4
|
import { BusinessInfoSettingList } from '../BusinessInfoSettingList'
|
|
5
5
|
import { BusinessOwners } from '../BusinessOwners'
|
|
6
6
|
import { BusinessTypes } from '../BusinessTypes'
|
|
@@ -9,6 +9,8 @@ import { BusinessImages } from '../BusinessImages'
|
|
|
9
9
|
import { BusinessVideos } from '../BusinessVideos'
|
|
10
10
|
import { SeoOptions } from '../SeoOptions'
|
|
11
11
|
import { BusinessInformation } from '../BusinessInformation'
|
|
12
|
+
import { addQueryToUrl } from '../../../utils'
|
|
13
|
+
|
|
12
14
|
import {
|
|
13
15
|
InfoConatiner,
|
|
14
16
|
Container
|
|
@@ -32,16 +34,13 @@ export const BusinessDetail = (props) => {
|
|
|
32
34
|
handleUpdateBusinessState
|
|
33
35
|
} = props
|
|
34
36
|
|
|
35
|
-
const history = useHistory()
|
|
36
37
|
const query = new URLSearchParams(useLocation().search)
|
|
37
38
|
const [, t] = useLanguage()
|
|
38
39
|
const [selectedInfoItem, setSelctedInfoItem] = useState('information')
|
|
39
40
|
|
|
40
41
|
const handleSelectInfoItem = (tab) => {
|
|
41
42
|
setSelctedInfoItem(tab)
|
|
42
|
-
|
|
43
|
-
const section = query.get('section')
|
|
44
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}`)
|
|
43
|
+
addQueryToUrl({ tab: tab })
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useSession, useLanguage, BusinessDetails as BusinessDetailsController } from 'ordering-components-admin-external'
|
|
4
4
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
5
5
|
import { BusinessSummary } from '../BusinessSummary'
|
|
@@ -22,6 +22,7 @@ import { BusinessPlaceGroupList } from '../BusinessPlaceGroupList'
|
|
|
22
22
|
import { SpoonityApiKey } from '../SpoonityApiKey'
|
|
23
23
|
|
|
24
24
|
import { MoreSidebarLayout, Personalization, Alert } from '../../Shared'
|
|
25
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
25
26
|
|
|
26
27
|
import {
|
|
27
28
|
BarContainer
|
|
@@ -55,7 +56,6 @@ export const BusinessDetailsUI = (props) => {
|
|
|
55
56
|
siteState
|
|
56
57
|
} = props
|
|
57
58
|
|
|
58
|
-
const history = useHistory()
|
|
59
59
|
const query = new URLSearchParams(useLocation().search)
|
|
60
60
|
const [, t] = useLanguage()
|
|
61
61
|
const { width } = useWindowSize()
|
|
@@ -101,8 +101,7 @@ export const BusinessDetailsUI = (props) => {
|
|
|
101
101
|
setSelectedItem(item)
|
|
102
102
|
setExtraOpen(true)
|
|
103
103
|
if (!isInitialRender) {
|
|
104
|
-
|
|
105
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${item}`)
|
|
104
|
+
addQueryToUrl({ section: item })
|
|
106
105
|
}
|
|
107
106
|
}
|
|
108
107
|
|
|
@@ -110,8 +109,7 @@ export const BusinessDetailsUI = (props) => {
|
|
|
110
109
|
setIsExtendExtraOpen(false)
|
|
111
110
|
setExtraOpen(false)
|
|
112
111
|
setSelectedItem(null)
|
|
113
|
-
|
|
114
|
-
history.replace(`${location.pathname}?id=${businessId}`)
|
|
112
|
+
removeQueryToUrl(['section', 'tab', 'business_type', 'paymethod', 'payemthod_tab', 'setting_tab', 'menu', 'zone', 'zone_tab', 'wallet'])
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
useEffect(() => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import { useHistory } from 'react-router-dom'
|
|
3
2
|
import {
|
|
4
3
|
useLanguage,
|
|
5
4
|
useUtils,
|
|
@@ -11,6 +10,8 @@ import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
|
11
10
|
import { Button, IconButton, LinkButton } from '../../../styles'
|
|
12
11
|
import { useTheme } from 'styled-components'
|
|
13
12
|
import { Alert, SearchBar, SideBar, ColumnAllowSettingPopover } from '../../Shared'
|
|
13
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
14
|
+
|
|
14
15
|
import {
|
|
15
16
|
BrandListingContainer,
|
|
16
17
|
HeaderContainer,
|
|
@@ -35,7 +36,6 @@ const BusinessDeviceListingUI = (props) => {
|
|
|
35
36
|
handleUpdateDeviceList
|
|
36
37
|
} = props
|
|
37
38
|
|
|
38
|
-
const history = useHistory()
|
|
39
39
|
const [, t] = useLanguage()
|
|
40
40
|
const theme = useTheme()
|
|
41
41
|
const [{ optimizeImage }] = useUtils()
|
|
@@ -63,7 +63,7 @@ const BusinessDeviceListingUI = (props) => {
|
|
|
63
63
|
const handleCloseSidebar = () => {
|
|
64
64
|
setIsOpen(false)
|
|
65
65
|
setSelectedDevice(null)
|
|
66
|
-
|
|
66
|
+
removeQueryToUrl(['id'])
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
const handleOpenSideBar = (id) => {
|
|
@@ -88,7 +88,7 @@ const BusinessDeviceListingUI = (props) => {
|
|
|
88
88
|
if (isInvalid) return
|
|
89
89
|
handleOpenSideBar(brandId)
|
|
90
90
|
if (!isInitialRender) {
|
|
91
|
-
|
|
91
|
+
addQueryToUrl({ id: brandId })
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from 'react'
|
|
2
2
|
import { useForm } from 'react-hook-form'
|
|
3
|
-
import { useLanguage, DragAndDrop, ExamineClick, BusinessFormDetails as BusinessFormDetailsController } from 'ordering-components-admin-external'
|
|
3
|
+
import { useLanguage, DragAndDrop, ExamineClick, BusinessFormDetails as BusinessFormDetailsController, useConfig } from 'ordering-components-admin-external'
|
|
4
4
|
import Skeleton from 'react-loading-skeleton'
|
|
5
5
|
import { Alert, Modal, ImageCrop, ColorPicker } from '../../Shared'
|
|
6
6
|
import { bytesConverter, shape, ribbonValues } from '../../../utils'
|
|
@@ -47,17 +47,19 @@ const BusinessInformationUI = (props) => {
|
|
|
47
47
|
|
|
48
48
|
const formMethods = useForm()
|
|
49
49
|
const [, t] = useLanguage()
|
|
50
|
+
const [{ configs }] = useConfig()
|
|
50
51
|
const headerImageInputRef = useRef(null)
|
|
51
52
|
const logoImageInputRef = useRef(null)
|
|
52
53
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
53
54
|
const [cropState, setCropState] = useState({ name: null, data: null, open: false })
|
|
55
|
+
const priceSymbol = configs?.format_number_currency?.value?.trim()
|
|
54
56
|
|
|
55
57
|
const priceList = [
|
|
56
|
-
{ key: '1', value:
|
|
57
|
-
{ key: '2', value: '
|
|
58
|
-
{ key: '3', value: '
|
|
59
|
-
{ key: '4', value: '
|
|
60
|
-
{ key: '5', value: '
|
|
58
|
+
{ key: '1', value: `${priceSymbol}` },
|
|
59
|
+
{ key: '2', value: `${Array(2).fill(priceSymbol).join('')}` },
|
|
60
|
+
{ key: '3', value: `${Array(3).fill(priceSymbol).join('')}` },
|
|
61
|
+
{ key: '4', value: `${Array(4).fill(priceSymbol).join('')}` },
|
|
62
|
+
{ key: '5', value: `${Array(5).fill(priceSymbol).join('')}` }
|
|
61
63
|
]
|
|
62
64
|
|
|
63
65
|
const socialOriginalURL = {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage, BusinessMenu as BusinessMenuController } from 'ordering-components-admin-external'
|
|
4
4
|
import { BusinessMenuOptions } from '../BusinessMenuOptions'
|
|
5
5
|
import { Confirm, Modal, SearchBar } from '../../Shared'
|
|
6
6
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
7
7
|
import { Button, Checkbox, LinkButton } from '../../../styles'
|
|
8
8
|
import { ChevronRight } from 'react-bootstrap-icons'
|
|
9
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
9
10
|
|
|
10
11
|
import {
|
|
11
12
|
MainContainer,
|
|
@@ -33,7 +34,6 @@ const BusinessMenuUI = (props) => {
|
|
|
33
34
|
sitesState
|
|
34
35
|
} = props
|
|
35
36
|
|
|
36
|
-
const history = useHistory()
|
|
37
37
|
const query = new URLSearchParams(useLocation().search)
|
|
38
38
|
const [, t] = useLanguage()
|
|
39
39
|
const { width } = useWindowSize()
|
|
@@ -59,10 +59,7 @@ const BusinessMenuUI = (props) => {
|
|
|
59
59
|
setCurrentMenu(null)
|
|
60
60
|
if (!isTab) {
|
|
61
61
|
setInitMenuId(null)
|
|
62
|
-
|
|
63
|
-
const section = query.get('section')
|
|
64
|
-
const tab = isSelectedSharedMenus ? 'shared_menus' : 'menu'
|
|
65
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}`)
|
|
62
|
+
removeQueryToUrl(['menu', 'product'])
|
|
66
63
|
}
|
|
67
64
|
}
|
|
68
65
|
|
|
@@ -71,10 +68,7 @@ const BusinessMenuUI = (props) => {
|
|
|
71
68
|
if (isInvalid) return
|
|
72
69
|
handleOpenOptions('option', menu)
|
|
73
70
|
if (!isInitialRender) {
|
|
74
|
-
|
|
75
|
-
const section = query.get('section')
|
|
76
|
-
const tab = isSelectedSharedMenus ? 'shared_menus' : 'menu'
|
|
77
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}&menu=${menu.id}`)
|
|
71
|
+
addQueryToUrl({ menu: menu.id })
|
|
78
72
|
}
|
|
79
73
|
}
|
|
80
74
|
|
|
@@ -88,10 +82,8 @@ const BusinessMenuUI = (props) => {
|
|
|
88
82
|
handleCloseOption(true)
|
|
89
83
|
setIsSelectedSharedMenus(isShared)
|
|
90
84
|
if (!isInitialRender) {
|
|
91
|
-
const businessId = query.get('id')
|
|
92
|
-
const section = query.get('section')
|
|
93
85
|
const tab = isShared ? 'shared_menus' : 'menu'
|
|
94
|
-
|
|
86
|
+
addQueryToUrl({ tab: tab })
|
|
95
87
|
}
|
|
96
88
|
}
|
|
97
89
|
|
|
@@ -28,7 +28,6 @@ export const BusinessMenuBasicOptions = (props) => {
|
|
|
28
28
|
selectedProducts,
|
|
29
29
|
setSelectedProducts,
|
|
30
30
|
handleChangeScheduleState,
|
|
31
|
-
|
|
32
31
|
subCategoriesList
|
|
33
32
|
} = props
|
|
34
33
|
const [, t] = useLanguage()
|
|
@@ -40,7 +39,9 @@ export const BusinessMenuBasicOptions = (props) => {
|
|
|
40
39
|
{ value: 2, key: 'pickup', content: t('PICKUP', 'Pickup') },
|
|
41
40
|
{ value: 3, key: 'eatin', content: t('EAT_IN', 'Eat in') },
|
|
42
41
|
{ value: 4, key: 'curbside', content: t('CURBSIDE', 'Curbside') },
|
|
43
|
-
{ value: 5, key: 'driver_thru', content: t('DRIVE_THRU', 'Drive thru') }
|
|
42
|
+
{ value: 5, key: 'driver_thru', content: t('DRIVE_THRU', 'Drive thru') },
|
|
43
|
+
{ value: 7, key: 'catering_delivery', content: t('CATERING_DELIVERY', 'Catering delivery') },
|
|
44
|
+
{ value: 8, key: 'catering_pickup', content: t('CATERING_PICKUP', 'Catering pickup') }
|
|
44
45
|
]
|
|
45
46
|
|
|
46
47
|
const closeAlert = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import {
|
|
4
4
|
useLanguage,
|
|
5
5
|
BusinessMenuOptions as BusinessMenuOptionsController
|
|
@@ -15,6 +15,7 @@ import { BusinessMenuBasicOptions } from '../BusinessMenuBasicOptions'
|
|
|
15
15
|
import { BusinessMenuCustomFields } from '../BusinessMenuCustomFields'
|
|
16
16
|
import { BusinessSharedMenuProducts } from '../BusinessSharedMenuProducts'
|
|
17
17
|
import { BusinessMenuChannels } from '../BusinessMenuChannels'
|
|
18
|
+
import { addQueryToUrl } from '../../../utils'
|
|
18
19
|
|
|
19
20
|
import {
|
|
20
21
|
Container,
|
|
@@ -39,7 +40,6 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
39
40
|
sitesState
|
|
40
41
|
} = props
|
|
41
42
|
|
|
42
|
-
const history = useHistory()
|
|
43
43
|
const query = new URLSearchParams(useLocation().search)
|
|
44
44
|
const theme = useTheme()
|
|
45
45
|
const [, t] = useLanguage()
|
|
@@ -93,11 +93,7 @@ const BusinessMenuOptionsUI = (props) => {
|
|
|
93
93
|
|
|
94
94
|
const handleTabClick = (settingTab) => {
|
|
95
95
|
setSelectedMenuOption(settingTab)
|
|
96
|
-
|
|
97
|
-
const section = query.get('section')
|
|
98
|
-
const tab = isSelectedSharedMenus ? 'shared_menus' : 'menu'
|
|
99
|
-
const menu = query.get('menu')
|
|
100
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}&menu=${menu}&setting_tab=${settingTab}`)
|
|
96
|
+
addQueryToUrl({ setting_tab: settingTab })
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
useEffect(() => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
4
4
|
import { Button, Input } from '../../../styles'
|
|
5
5
|
import { Alert } from '../../Shared'
|
|
6
|
+
import { addQueryToUrl } from '../../../utils'
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
BusinessOrderingChannelsContainer,
|
|
@@ -23,7 +24,6 @@ export const BusinessOrderingChannels = (props) => {
|
|
|
23
24
|
setFormState
|
|
24
25
|
} = props
|
|
25
26
|
|
|
26
|
-
const history = useHistory()
|
|
27
27
|
const query = new URLSearchParams(useLocation().search)
|
|
28
28
|
const [, t] = useLanguage()
|
|
29
29
|
const [slug, setSlug] = useState('')
|
|
@@ -61,9 +61,7 @@ export const BusinessOrderingChannels = (props) => {
|
|
|
61
61
|
const handleChangeOption = (tab, isInitialRender) => {
|
|
62
62
|
setSelectedOption(tab)
|
|
63
63
|
if (!isInitialRender) {
|
|
64
|
-
|
|
65
|
-
const section = query.get('section')
|
|
66
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&tab=${tab}`)
|
|
64
|
+
addQueryToUrl({ tab: tab })
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom'
|
|
3
3
|
import Skeleton from 'react-loading-skeleton'
|
|
4
4
|
import {
|
|
5
5
|
useLanguage,
|
|
@@ -21,6 +21,7 @@ import { PaymentOptionPaypal } from '../PaymentOptionPaypal'
|
|
|
21
21
|
import { PaymentOptionSquare } from '../PaymentOptionSquare'
|
|
22
22
|
import { PaymentOptionMethods } from '../PaymentOptionMethods'
|
|
23
23
|
import { BusinessWalletsList } from '../BusinessWalletsList'
|
|
24
|
+
import { addQueryToUrl, removeQueryToUrl } from '../../../utils'
|
|
24
25
|
|
|
25
26
|
import {
|
|
26
27
|
MainContainer,
|
|
@@ -65,7 +66,6 @@ const BusinessPaymentMethodsUI = (props) => {
|
|
|
65
66
|
handleTutorialContinue
|
|
66
67
|
} = props
|
|
67
68
|
|
|
68
|
-
const history = useHistory()
|
|
69
69
|
const query = new URLSearchParams(useLocation().search)
|
|
70
70
|
const [, t] = useLanguage()
|
|
71
71
|
const [{ configs }] = useConfig()
|
|
@@ -83,7 +83,9 @@ const BusinessPaymentMethodsUI = (props) => {
|
|
|
83
83
|
{ value: 2, text: t('PICKUP', 'Pickup') },
|
|
84
84
|
{ value: 3, text: t('EATIN', 'Eatin') },
|
|
85
85
|
{ value: 4, text: t('CURBSIDE', 'Curbside') },
|
|
86
|
-
{ value: 5, text: t('DRIVER_THRU', 'Driver thru') }
|
|
86
|
+
{ value: 5, text: t('DRIVER_THRU', 'Driver thru') },
|
|
87
|
+
{ value: 7, text: t('CATERING_DELIVERY', 'Catering delivery') },
|
|
88
|
+
{ value: 8, text: t('CATERING_PICKUP', 'Catering pickup') }
|
|
87
89
|
]
|
|
88
90
|
|
|
89
91
|
const methodsPay = ['google_pay', 'apple_pay']
|
|
@@ -120,9 +122,7 @@ const BusinessPaymentMethodsUI = (props) => {
|
|
|
120
122
|
setIsExtendExtraOpen(true)
|
|
121
123
|
}
|
|
122
124
|
if (!isInitialRender) {
|
|
123
|
-
|
|
124
|
-
const section = query.get('section')
|
|
125
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}&paymethod=${paymethodId}`)
|
|
125
|
+
addQueryToUrl({ paymethod: paymethodId })
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -148,9 +148,7 @@ const BusinessPaymentMethodsUI = (props) => {
|
|
|
148
148
|
setIsEdit(false)
|
|
149
149
|
setSelectedBusinessPaymethod(null)
|
|
150
150
|
setIsSuccessDeleted(false)
|
|
151
|
-
|
|
152
|
-
const section = query.get('section')
|
|
153
|
-
history.replace(`${location.pathname}?id=${businessId}§ion=${section}`)
|
|
151
|
+
removeQueryToUrl(['paymethod'])
|
|
154
152
|
}
|
|
155
153
|
|
|
156
154
|
useEffect(() => {
|