ordering-ui-admin-external 1.14.3 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{ordering-ui-admin.e2a58dcc95d6a983dfc0.js → ordering-ui-admin.7c0f4e22698e5dbd9b25.js} +2 -2
- package/_modules/components/BusinessIntelligence/BusinessReviewDetails/index.js +5 -5
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +29 -4
- package/_modules/components/BusinessIntelligence/InvoiceBusinessManager/index.js +16 -1
- package/_modules/components/BusinessIntelligence/InvoiceDriverManager/index.js +16 -1
- package/_modules/components/BusinessIntelligence/InvoiceManager/index.js +14 -1
- package/_modules/components/BusinessIntelligence/InvoiceOrdertype/styles.js +1 -1
- package/_modules/components/BusinessIntelligence/ProductReviewDetails/index.js +4 -3
- package/_modules/components/BusinessIntelligence/Reports/index.js +14 -1
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +52 -16
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +32 -4
- package/_modules/components/BusinessIntelligence/UserReviewDetails/index.js +4 -3
- package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +35 -10
- package/_modules/components/CartRecovery/RecoveryActionDetail/index.js +21 -2
- package/_modules/components/CartRecovery/RecoveryActionListing/index.js +22 -2
- package/_modules/components/Delivery/DeliveryUsersListing/index.js +2 -0
- package/_modules/components/Delivery/DriversCompaniesListing/index.js +36 -13
- package/_modules/components/Delivery/DriversCompanyDetailsForm/index.js +31 -6
- package/_modules/components/Delivery/DriversGroupDetails/index.js +29 -2
- package/_modules/components/Delivery/DriversGroupLogistics/index.js +16 -2
- package/_modules/components/Delivery/DriversGroupsListing/index.js +28 -11
- package/_modules/components/Delivery/UserDetails/index.js +24 -1
- package/_modules/components/Loyalty/GiftCardDetail/styles.js +68 -0
- package/_modules/components/Loyalty/GiftCards/index.js +23 -2
- package/_modules/components/Loyalty/PointsWalletBusinessList/index.js +26 -1
- package/_modules/components/Loyalty/PointsWalletLevels/index.js +22 -1
- package/_modules/components/Loyalty/RewardsPrograms/index.js +34 -4
- package/_modules/components/Loyalty/Wallet/index.js +20 -1
- package/_modules/components/Marketing/AdBannersListing/index.js +24 -5
- package/_modules/components/Marketing/BannerImageDetails/index.js +2 -1
- package/_modules/components/Marketing/CampaignDetail/index.js +19 -1
- package/_modules/components/Marketing/CampaignEmail/styles.js +5 -3
- package/_modules/components/Marketing/CampaignListing/index.js +19 -0
- package/_modules/components/Marketing/CampaignNotification/styles.js +5 -3
- package/_modules/components/Marketing/CampaignSMS/styles.js +5 -3
- package/_modules/components/Marketing/EnterprisePromotionGeneralDetails/index.js +2 -1
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +24 -4
- package/_modules/components/Marketing/PageBanner/index.js +27 -3
- package/_modules/components/Messages/MessagesListing/index.js +18 -1
- package/_modules/components/MyProducts/AdvancedSettings/FontStyleGroup.js +85 -0
- package/_modules/components/MyProducts/AdvancedSettings/OrderType.js +45 -0
- package/_modules/components/MyProducts/AdvancedSettings/SettingComponent.js +91 -0
- package/_modules/components/MyProducts/AdvancedSettings/index.js +626 -0
- package/_modules/components/MyProducts/AdvancedSettings/styles.js +146 -0
- package/_modules/components/MyProducts/AppLayout/index.js +9 -1
- package/_modules/components/MyProducts/AppLayout/styles.js +20 -3
- package/_modules/components/MyProducts/CallCenterApp/index.js +1 -1
- package/_modules/components/MyProducts/CustomerApp/index.js +2 -2
- package/_modules/components/MyProducts/DriverApp/index.js +2 -2
- package/_modules/components/MyProducts/KioskApp/index.js +1 -1
- package/_modules/components/MyProducts/OrderingWebsite/index.js +37 -6
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +39 -5
- package/_modules/components/MyProducts/PosApp/index.js +1 -1
- package/_modules/components/MyProducts/StoreApp/index.js +2 -2
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +21 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +18 -1
- package/_modules/components/Orders/DeliveriesManager/index.js +0 -1
- package/_modules/components/Orders/Messages/index.js +32 -29
- package/_modules/components/Orders/OrderDetails/index.js +38 -22
- package/_modules/components/Orders/OrderDetailsHeader/index.js +2 -3
- package/_modules/components/Orders/OrdersContentHeader/index.js +2 -2
- package/_modules/components/Orders/OrdersFilterGroup/index.js +112 -9
- package/_modules/components/Orders/OrdersFilterGroup/styles.js +11 -3
- package/_modules/components/Orders/OrdersManager/index.js +0 -1
- package/_modules/components/Settings/CountriesList/index.js +27 -4
- package/_modules/components/Settings/Deliverect/index.js +23 -2
- package/_modules/components/Settings/DoordashConnect/index.js +23 -2
- package/_modules/components/Settings/DropdownOptionList/index.js +27 -4
- package/_modules/components/Settings/IntegrationListing/index.js +3 -3
- package/_modules/components/Settings/ItsaCheckmate/index.js +23 -2
- package/_modules/components/Settings/LalamoveConnect/index.js +23 -2
- package/_modules/components/Settings/PickerExpress/index.js +23 -2
- package/_modules/components/Settings/PlaceListing/index.js +40 -4
- package/_modules/components/Settings/Settings/index.js +86 -45
- package/_modules/components/Settings/SettingsDetail/index.js +14 -1
- package/_modules/components/Settings/SitesAuthSettings/index.js +17 -1
- package/_modules/components/SidebarMenu/index.js +0 -1
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +4 -9
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +3 -1
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +13 -4
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +16 -10
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +11 -3
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +3 -1
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +17 -6
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +3 -1
- package/_modules/components/Stores/BusinessAdd/index.js +38 -8
- package/_modules/components/Stores/BusinessAdd/styles.js +8 -4
- package/_modules/components/Stores/BusinessAddStore/index.js +1 -1
- package/_modules/components/Stores/BusinessBrandListing/index.js +37 -4
- package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +20 -1
- package/_modules/components/Stores/BusinessDeliveryZoneDetails/index.js +22 -1
- package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +32 -4
- package/_modules/components/Stores/BusinessDetail/index.js +18 -1
- package/_modules/components/Stores/BusinessDetails/index.js +17 -1
- package/_modules/components/Stores/BusinessFrontLayout/index.js +8 -1
- package/_modules/components/Stores/BusinessFrontLayout/styles.js +5 -3
- package/_modules/components/Stores/BusinessMenu/index.js +58 -7
- package/_modules/components/Stores/BusinessMenuOptions/index.js +24 -3
- package/_modules/components/Stores/BusinessOrderingChannels/index.js +18 -2
- package/_modules/components/Stores/BusinessPaymentMethods/index.js +26 -2
- package/_modules/components/Stores/BusinessPlaceGroupList/index.js +183 -0
- package/_modules/components/Stores/BusinessPlaceGroupList/styles.js +66 -0
- package/_modules/components/Stores/BusinessProductsCategoyDetails/index.js +21 -1
- package/_modules/components/Stores/BusinessProductsListing/index.js +74 -22
- package/_modules/components/Stores/BusinessPromotionGeneralForm/index.js +2 -2
- package/_modules/components/Stores/BusinessSharedMenuProducts/index.js +29 -2
- package/_modules/components/Stores/BusinessSync/index.js +16 -1
- package/_modules/components/Stores/BusinessTypes/index.js +27 -4
- package/_modules/components/Stores/BusinessWalletsList/index.js +24 -1
- package/_modules/components/Stores/BusinessesListing/index.js +9 -1
- package/_modules/components/Stores/ImportersButton/index.js +19 -6
- package/_modules/components/Stores/PaymentOption/index.js +29 -9
- package/_modules/components/Stores/PaymentOptionMethods/index.js +23 -3
- package/_modules/components/Stores/PaymentOptionPaypal/index.js +23 -3
- package/_modules/components/Stores/PaymentOptionSquare/index.js +23 -3
- package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +23 -3
- package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +23 -3
- package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +23 -3
- package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +23 -3
- package/_modules/components/Stores/ProductDetails/index.js +18 -1
- package/_modules/components/Stores/ProductExtras/index.js +25 -2
- package/_modules/components/Stores/ProductIngredient/index.js +23 -1
- package/_modules/components/Stores/ProductMainDetails/index.js +18 -1
- package/_modules/components/Stores/ProductTagsList/index.js +28 -2
- package/_modules/components/Users/CustomerCashWallet/index.js +22 -2
- package/_modules/components/Users/CustomerDetails/index.js +19 -1
- package/_modules/components/Users/CustomerPointsWallet/index.js +22 -2
- package/_modules/components/Users/CustomersListing/index.js +8 -3
- package/_modules/components/Users/ProfessionalDetail/index.js +25 -1
- package/_modules/components/Users/ProfessionalListing/index.js +8 -3
- package/_modules/components/Users/UserActiveStateFilter/index.js +18 -4
- package/_modules/components/Users/UserDetails/index.js +27 -1
- package/_modules/components/Users/UsersListing/index.js +8 -3
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +4 -4
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +29 -6
- package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +17 -1
- package/src/components/BusinessIntelligence/InvoiceDriverManager/index.js +17 -1
- package/src/components/BusinessIntelligence/InvoiceManager/index.js +16 -2
- package/src/components/BusinessIntelligence/InvoiceOrdertype/styles.js +1 -0
- package/src/components/BusinessIntelligence/ProductReviewDetails/index.js +4 -4
- package/src/components/BusinessIntelligence/Reports/index.js +16 -2
- package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +34 -6
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +31 -5
- package/src/components/BusinessIntelligence/UserReviewDetails/index.js +4 -4
- package/src/components/BusinessIntelligence/UsersReviewList/index.js +32 -11
- package/src/components/CartRecovery/RecoveryActionDetail/index.js +19 -1
- package/src/components/CartRecovery/RecoveryActionListing/index.js +21 -3
- package/src/components/Delivery/DeliveryUsersListing/index.js +3 -1
- package/src/components/Delivery/DriversCompaniesListing/index.js +27 -9
- package/src/components/Delivery/DriversCompanyDetailsForm/index.js +37 -8
- package/src/components/Delivery/DriversGroupDetails/index.js +36 -4
- package/src/components/Delivery/DriversGroupLogistics/index.js +18 -2
- package/src/components/Delivery/DriversGroupsListing/index.js +20 -6
- package/src/components/Delivery/UserDetails/index.js +26 -1
- package/src/components/Loyalty/GiftCardDetail/styles.js +192 -0
- package/src/components/Loyalty/GiftCards/index.js +22 -2
- package/src/components/Loyalty/PointsWalletBusinessList/index.js +24 -1
- package/src/components/Loyalty/PointsWalletLevels/index.js +21 -1
- package/src/components/Loyalty/RewardsPrograms/index.js +30 -3
- package/src/components/Loyalty/Wallet/index.js +22 -1
- package/src/components/Marketing/AdBannersListing/index.js +25 -8
- package/src/components/Marketing/BannerImageDetails/index.js +2 -1
- package/src/components/Marketing/CampaignDetail/index.js +22 -1
- package/src/components/Marketing/CampaignEmail/styles.js +3 -0
- package/src/components/Marketing/CampaignListing/index.js +18 -1
- package/src/components/Marketing/CampaignNotification/styles.js +3 -0
- package/src/components/Marketing/CampaignSMS/styles.js +3 -0
- package/src/components/Marketing/EnterprisePromotionGeneralDetails/index.js +2 -1
- package/src/components/Marketing/EnterprisePromotionListing/index.js +19 -1
- package/src/components/Marketing/PageBanner/index.js +26 -3
- package/src/components/Messages/MessagesListing/index.js +17 -0
- package/src/components/MyProducts/AdvancedSettings/FontStyleGroup.js +64 -0
- package/src/components/MyProducts/AdvancedSettings/OrderType.js +40 -0
- package/src/components/MyProducts/AdvancedSettings/SettingComponent.js +104 -0
- package/src/components/MyProducts/AdvancedSettings/index.js +541 -0
- package/src/components/MyProducts/AdvancedSettings/styles.js +388 -0
- package/src/components/MyProducts/AppLayout/index.js +19 -2
- package/src/components/MyProducts/AppLayout/styles.js +65 -0
- package/src/components/MyProducts/CallCenterApp/index.js +1 -1
- package/src/components/MyProducts/CustomerApp/index.js +2 -2
- package/src/components/MyProducts/DriverApp/index.js +2 -2
- package/src/components/MyProducts/KioskApp/index.js +1 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +309 -255
- package/src/components/MyProducts/OrderingWebsite/styles.js +99 -2
- package/src/components/MyProducts/PosApp/index.js +1 -1
- package/src/components/MyProducts/StoreApp/index.js +2 -2
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +24 -2
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +17 -1
- package/src/components/Orders/DeliveriesManager/index.js +0 -1
- package/src/components/Orders/Messages/index.js +31 -11
- package/src/components/Orders/OrderDetails/index.js +34 -20
- package/src/components/Orders/OrderDetailsHeader/index.js +2 -3
- package/src/components/Orders/OrdersContentHeader/index.js +1 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +111 -13
- package/src/components/Orders/OrdersFilterGroup/styles.js +26 -0
- package/src/components/Orders/OrdersManager/index.js +0 -1
- package/src/components/Settings/CountriesList/index.js +26 -6
- package/src/components/Settings/Deliverect/index.js +26 -2
- package/src/components/Settings/DoordashConnect/index.js +26 -2
- package/src/components/Settings/DropdownOptionList/index.js +27 -6
- package/src/components/Settings/IntegrationListing/index.js +3 -3
- package/src/components/Settings/ItsaCheckmate/index.js +26 -2
- package/src/components/Settings/LalamoveConnect/index.js +26 -2
- package/src/components/Settings/PickerExpress/index.js +26 -2
- package/src/components/Settings/PlaceListing/index.js +38 -6
- package/src/components/Settings/Settings/index.js +79 -37
- package/src/components/Settings/SettingsDetail/index.js +15 -1
- package/src/components/Settings/SitesAuthSettings/index.js +18 -1
- package/src/components/SidebarMenu/index.js +0 -2
- package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +1 -10
- package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +4 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +120 -109
- package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +22 -1
- package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +8 -2
- package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +4 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +11 -6
- package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +4 -0
- package/src/components/Stores/BusinessAdd/index.js +47 -16
- package/src/components/Stores/BusinessAdd/styles.js +27 -1
- package/src/components/Stores/BusinessAddStore/index.js +1 -1
- package/src/components/Stores/BusinessBrandListing/index.js +37 -4
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +22 -1
- package/src/components/Stores/BusinessDeliveryZoneDetails/index.js +25 -2
- package/src/components/Stores/BusinessDeliveryZoneList/index.js +30 -3
- package/src/components/Stores/BusinessDetail/index.js +20 -1
- package/src/components/Stores/BusinessDetails/index.js +18 -1
- package/src/components/Stores/BusinessFrontLayout/index.js +13 -1
- package/src/components/Stores/BusinessFrontLayout/styles.js +11 -0
- package/src/components/Stores/BusinessMenu/index.js +56 -11
- package/src/components/Stores/BusinessMenuOptions/index.js +28 -3
- package/src/components/Stores/BusinessOrderingChannels/index.js +19 -2
- package/src/components/Stores/BusinessPaymentMethods/index.js +24 -2
- package/src/components/Stores/BusinessPlaceGroupList/index.js +193 -0
- package/src/components/Stores/BusinessPlaceGroupList/styles.js +143 -0
- package/src/components/Stores/BusinessProductsCategoyDetails/index.js +21 -1
- package/src/components/Stores/BusinessProductsListing/index.js +49 -8
- package/src/components/Stores/BusinessPromotionGeneralForm/index.js +2 -2
- package/src/components/Stores/BusinessSharedMenuProducts/index.js +29 -3
- package/src/components/Stores/BusinessSync/index.js +18 -2
- package/src/components/Stores/BusinessTypes/index.js +26 -4
- package/src/components/Stores/BusinessWalletsList/index.js +23 -1
- package/src/components/Stores/BusinessesListing/index.js +11 -2
- package/src/components/Stores/ImportersButton/index.js +24 -3
- package/src/components/Stores/PaymentOption/index.js +29 -8
- package/src/components/Stores/PaymentOptionMethods/index.js +25 -3
- package/src/components/Stores/PaymentOptionPaypal/index.js +25 -3
- package/src/components/Stores/PaymentOptionSquare/index.js +25 -3
- package/src/components/Stores/PaymentOptionStripeDirect/index.js +25 -3
- package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +25 -3
- package/src/components/Stores/PaymethodOptionStripeConnect/index.js +25 -3
- package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +25 -3
- package/src/components/Stores/ProductDetails/index.js +19 -1
- package/src/components/Stores/ProductExtras/index.js +23 -2
- package/src/components/Stores/ProductIngredient/index.js +23 -2
- package/src/components/Stores/ProductMainDetails/index.js +20 -2
- package/src/components/Stores/ProductTagsList/index.js +28 -3
- package/src/components/Users/CustomerCashWallet/index.js +25 -3
- package/src/components/Users/CustomerDetails/index.js +20 -1
- package/src/components/Users/CustomerPointsWallet/index.js +25 -3
- package/src/components/Users/CustomersListing/index.js +9 -4
- package/src/components/Users/ProfessionalDetail/index.js +27 -1
- package/src/components/Users/ProfessionalListing/index.js +9 -4
- package/src/components/Users/UserActiveStateFilter/index.js +16 -3
- package/src/components/Users/UserDetails/index.js +27 -1
- package/src/components/Users/UsersListing/index.js +9 -4
- package/template/pages/BusinessProductsList/index.js +1 -1
- /package/_bundles/{ordering-ui-admin.e2a58dcc95d6a983dfc0.js.LICENSE.txt → ordering-ui-admin.7c0f4e22698e5dbd9b25.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
import { darken } from 'polished'
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-height: calc(var(--vh, 1vh) * 100 - 150px);
|
|
7
|
+
padding: 20px;
|
|
8
|
+
`
|
|
9
|
+
|
|
10
|
+
export const DetailsHeader = styled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
`
|
|
15
|
+
|
|
16
|
+
export const LevelName = styled.h1`
|
|
17
|
+
color: ${props => props.theme.colors.headingColor};
|
|
18
|
+
font-size: 20px;
|
|
19
|
+
margin: 0px;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
|
|
22
|
+
${props => props.theme?.rtl ? css`
|
|
23
|
+
margin-left: 10px;
|
|
24
|
+
` : css`
|
|
25
|
+
margin-right: 10px;
|
|
26
|
+
`}
|
|
27
|
+
`
|
|
28
|
+
|
|
29
|
+
export const LeftHeader = styled.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
margin-bottom: 24px;
|
|
33
|
+
${props => props.theme?.rtl ? css`
|
|
34
|
+
margin-left: 10px;
|
|
35
|
+
` : css`
|
|
36
|
+
margin-right: 10px;
|
|
37
|
+
`}
|
|
38
|
+
`
|
|
39
|
+
|
|
40
|
+
export const RightHeader = styled.div`
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
margin-top: 3px;
|
|
44
|
+
margin-bottom: 24px;
|
|
45
|
+
`
|
|
46
|
+
|
|
47
|
+
export const ActionSelectorWrapper = styled.div`
|
|
48
|
+
padding-right: 35px;
|
|
49
|
+
|
|
50
|
+
${props => props.theme.rtl && css`
|
|
51
|
+
padding-left: 35px;
|
|
52
|
+
padding-right: 0px;
|
|
53
|
+
`}
|
|
54
|
+
|
|
55
|
+
button {
|
|
56
|
+
background: transparent !important;
|
|
57
|
+
border: none;
|
|
58
|
+
padding: 0px 5px;
|
|
59
|
+
&:active,
|
|
60
|
+
&:focus {
|
|
61
|
+
border-color: unset !important;
|
|
62
|
+
box-shadow: none !important;
|
|
63
|
+
}
|
|
64
|
+
svg {
|
|
65
|
+
color: ${props => props.theme.colors.headingColor};
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:after {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background: ${props => darken(0.04, props.theme.colors.secundary)} !important;
|
|
75
|
+
}
|
|
76
|
+
&:active {
|
|
77
|
+
background: ${props => darken(0.1, props.theme.colors.secundary)} !important;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.show {
|
|
82
|
+
button {
|
|
83
|
+
background: ${props => darken(0.04, props.theme.colors.secundary)} !important;
|
|
84
|
+
}
|
|
85
|
+
>div {
|
|
86
|
+
border: 1px solid ${props => props.theme.colors.borderColor};
|
|
87
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
> div {
|
|
92
|
+
> div {
|
|
93
|
+
border-radius: 8px;
|
|
94
|
+
.dropdown-item {
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
padding: 6px 20px;
|
|
97
|
+
color: ${props => props.theme.colors.headingColor};
|
|
98
|
+
&:active {
|
|
99
|
+
background: ${props => darken(0.1, props.theme.colors.secundary)} !important;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.dropdown-item:last-child {
|
|
103
|
+
color: #E63757;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`
|
|
108
|
+
|
|
109
|
+
export const Content = styled.form`
|
|
110
|
+
height: calc(100% - 70px);
|
|
111
|
+
`
|
|
112
|
+
|
|
113
|
+
export const FormController = styled.div`
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
margin-top: 40px;
|
|
117
|
+
|
|
118
|
+
label {
|
|
119
|
+
color: ${props => props.theme.colors.headingColor};
|
|
120
|
+
margin-bottom: 10px;
|
|
121
|
+
font-size: 14px;
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
input,
|
|
126
|
+
textarea {
|
|
127
|
+
color: ${props => props.theme.colors.headingColor};
|
|
128
|
+
}
|
|
129
|
+
`
|
|
130
|
+
|
|
131
|
+
export const ButtonWrapper = styled.div`
|
|
132
|
+
position: sticky;
|
|
133
|
+
top: 100%;
|
|
134
|
+
padding: 20px 0;
|
|
135
|
+
|
|
136
|
+
button {
|
|
137
|
+
height: 44px;
|
|
138
|
+
border-radius: 8px;
|
|
139
|
+
}
|
|
140
|
+
`
|
|
141
|
+
|
|
142
|
+
export const LoyaltyImage = styled.div`
|
|
143
|
+
width: 200px;
|
|
144
|
+
height: 200px;
|
|
145
|
+
border-radius: 8px;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
cursor: -webkit-grab;
|
|
148
|
+
cursor: grab;
|
|
149
|
+
filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.1));
|
|
150
|
+
|
|
151
|
+
img,
|
|
152
|
+
div {
|
|
153
|
+
width: 100%;
|
|
154
|
+
border-radius: 8px;
|
|
155
|
+
height: 100%;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
img{
|
|
160
|
+
object-fit: cover;
|
|
161
|
+
}
|
|
162
|
+
`
|
|
163
|
+
|
|
164
|
+
export const UploadImageIconContainer = styled.div`
|
|
165
|
+
position: absolute;
|
|
166
|
+
top: 0px;
|
|
167
|
+
background: rgba(0,0,0,0.2);
|
|
168
|
+
${({ small }) => small ? css`
|
|
169
|
+
padding: 4px;
|
|
170
|
+
` : css`
|
|
171
|
+
padding: 8px;
|
|
172
|
+
`}
|
|
173
|
+
`
|
|
174
|
+
|
|
175
|
+
export const UploadImageIcon = styled.div`
|
|
176
|
+
display: flex;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
align-items: center;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
color: #FFF;
|
|
181
|
+
border: 1px dashed #fff;
|
|
182
|
+
span {
|
|
183
|
+
margin: 0;
|
|
184
|
+
text-align: center;
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
svg {
|
|
189
|
+
width: 45px;
|
|
190
|
+
height: 45px;
|
|
191
|
+
}
|
|
192
|
+
`
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage, useUtils, PlatformProductsList as PlatformProductsListController } from 'ordering-components-admin-external'
|
|
3
4
|
import { Alert, NotFoundSource, SideBar, Modal } from '../../Shared'
|
|
4
5
|
// import { Switch } from '../../../styles'
|
|
@@ -34,6 +35,8 @@ const GiftCardsUI = (props) => {
|
|
|
34
35
|
handleSuccessAddProduct
|
|
35
36
|
} = props
|
|
36
37
|
|
|
38
|
+
const history = useHistory()
|
|
39
|
+
const query = new URLSearchParams(useLocation().search)
|
|
37
40
|
const [, t] = useLanguage()
|
|
38
41
|
const theme = useTheme()
|
|
39
42
|
const [{ optimizeImage, parsePrice }] = useUtils()
|
|
@@ -50,18 +53,24 @@ const GiftCardsUI = (props) => {
|
|
|
50
53
|
})
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
const handleOpenDetail = (
|
|
54
|
-
setSelectedProduct(
|
|
56
|
+
const handleOpenDetail = (product, isInitialRender) => {
|
|
57
|
+
setSelectedProduct(product)
|
|
55
58
|
setExtraOpen(true)
|
|
56
59
|
if (width >= 1100) {
|
|
57
60
|
handleParentSidebarMove(550)
|
|
58
61
|
}
|
|
62
|
+
if (product && !isInitialRender) {
|
|
63
|
+
const id = query.get('id')
|
|
64
|
+
history.replace(`${location.pathname}?id=${id}&product=${product.id}`)
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
const handleGiftDetail = () => {
|
|
62
69
|
setExtraOpen(false)
|
|
63
70
|
setSelectedProduct(null)
|
|
64
71
|
handleParentSidebarMove(0)
|
|
72
|
+
const id = query.get('id')
|
|
73
|
+
history.replace(`${location.pathname}?id=${id}`)
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
useEffect(() => {
|
|
@@ -72,6 +81,17 @@ const GiftCardsUI = (props) => {
|
|
|
72
81
|
}
|
|
73
82
|
}, [width, extraOpen])
|
|
74
83
|
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (platformProductsListState.loading) return
|
|
86
|
+
const productId = query.get('product')
|
|
87
|
+
if (productId) {
|
|
88
|
+
const initProduct = platformProductsListState?.products.find(product => product.id === Number(productId))
|
|
89
|
+
if (initProduct) {
|
|
90
|
+
handleOpenDetail(initProduct, true)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, [platformProductsListState.loading])
|
|
94
|
+
|
|
75
95
|
return (
|
|
76
96
|
<Container>
|
|
77
97
|
<HeaderContainer>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage, useUtils, PointsWalletBusinessList as PointsWalletBusinessListController } from 'ordering-components-admin-external'
|
|
3
4
|
import Skeleton from 'react-loading-skeleton'
|
|
4
5
|
import { useTheme } from 'styled-components'
|
|
@@ -34,6 +35,8 @@ const PointsWalletBusinessListUI = (props) => {
|
|
|
34
35
|
isCloseBusinessDetails
|
|
35
36
|
} = props
|
|
36
37
|
|
|
38
|
+
const history = useHistory()
|
|
39
|
+
const query = new URLSearchParams(useLocation().search)
|
|
37
40
|
const [, t] = useLanguage()
|
|
38
41
|
const [{ optimizeImage }] = useUtils()
|
|
39
42
|
const theme = useTheme()
|
|
@@ -69,7 +72,7 @@ const PointsWalletBusinessListUI = (props) => {
|
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
const handleClickBusiness = (business, e) => {
|
|
72
|
-
if (e
|
|
75
|
+
if (e?.target?.closest('.accumulates') || e?.target?.closest('.redeems') || e?.target?.closest('.wallet_enabled')) return
|
|
73
76
|
if (!pointWallet) {
|
|
74
77
|
setAlertState({ open: true, content: [t('YOU_MUST_CREATE_LOYALTY_PLAN', 'You must create a loyalty plan')] })
|
|
75
78
|
return
|
|
@@ -80,6 +83,9 @@ const PointsWalletBusinessListUI = (props) => {
|
|
|
80
83
|
}
|
|
81
84
|
setSelectedBusiness(business)
|
|
82
85
|
setExtraOpen(true)
|
|
86
|
+
const id = query.get('id')
|
|
87
|
+
const tab = query.get('tab')
|
|
88
|
+
history.replace(`${location.pathname}?id=${id}&tab=${tab}&business_id=${business?.id}`)
|
|
83
89
|
if (width >= 1100) {
|
|
84
90
|
handleParentSidebarMove(550)
|
|
85
91
|
}
|
|
@@ -89,6 +95,9 @@ const PointsWalletBusinessListUI = (props) => {
|
|
|
89
95
|
setExtraOpen(false)
|
|
90
96
|
setSelectedBusiness(null)
|
|
91
97
|
handleParentSidebarMove(0)
|
|
98
|
+
const id = query.get('id')
|
|
99
|
+
const tab = query.get('tab')
|
|
100
|
+
history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
const updateBusinessList = (changes) => {
|
|
@@ -136,8 +145,22 @@ const PointsWalletBusinessListUI = (props) => {
|
|
|
136
145
|
if (!isCloseBusinessDetails) return
|
|
137
146
|
setExtraOpen(false)
|
|
138
147
|
setSelectedBusiness(null)
|
|
148
|
+
const id = query.get('id')
|
|
149
|
+
const tab = query.get('tab')
|
|
150
|
+
history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
|
|
139
151
|
}, [isCloseBusinessDetails])
|
|
140
152
|
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
if (businessList.loading) return
|
|
155
|
+
const businessId = query.get('business_id')
|
|
156
|
+
if (businessId) {
|
|
157
|
+
const business = businessList.businesses.find(item => item.id === Number(businessId))
|
|
158
|
+
if (business) {
|
|
159
|
+
handleClickBusiness(business)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}, [businessList])
|
|
163
|
+
|
|
141
164
|
return (
|
|
142
165
|
<Container>
|
|
143
166
|
<SearchWrapper>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage, useUtils, PointsWalletLevels as PointsWalletLevelsController } from 'ordering-components-admin-external'
|
|
3
4
|
import { Alert, SideBar, Modal } from '../../Shared'
|
|
4
5
|
import { ChevronRight } from 'react-bootstrap-icons'
|
|
@@ -29,6 +30,8 @@ const PointsWalletLevelsUI = (props) => {
|
|
|
29
30
|
handleParentSidebarMove
|
|
30
31
|
} = props
|
|
31
32
|
|
|
33
|
+
const history = useHistory()
|
|
34
|
+
const query = new URLSearchParams(useLocation().search)
|
|
32
35
|
const [, t] = useLanguage()
|
|
33
36
|
const theme = useTheme()
|
|
34
37
|
const [{ optimizeImage }] = useUtils()
|
|
@@ -45,18 +48,24 @@ const PointsWalletLevelsUI = (props) => {
|
|
|
45
48
|
})
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
const handleOpenDetail = (level) => {
|
|
51
|
+
const handleOpenDetail = (level, isInitialRender) => {
|
|
49
52
|
setSelectedLevel(level)
|
|
50
53
|
setExtraOpen(true)
|
|
51
54
|
if (width >= 1100) {
|
|
52
55
|
handleParentSidebarMove(550)
|
|
53
56
|
}
|
|
57
|
+
if (level && !isInitialRender) {
|
|
58
|
+
const id = query.get('id')
|
|
59
|
+
history.replace(`${location.pathname}?id=${id}&level=${level.id}`)
|
|
60
|
+
}
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
const handleCloseLevelDetail = () => {
|
|
57
64
|
setExtraOpen(false)
|
|
58
65
|
setSelectedLevel(null)
|
|
59
66
|
handleParentSidebarMove(0)
|
|
67
|
+
const id = query.get('id')
|
|
68
|
+
history.replace(`${location.pathname}?id=${id}`)
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
useEffect(() => {
|
|
@@ -67,6 +76,17 @@ const PointsWalletLevelsUI = (props) => {
|
|
|
67
76
|
}
|
|
68
77
|
}, [width, extraOpen])
|
|
69
78
|
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (levelList.loading) return
|
|
81
|
+
const levelId = query.get('level')
|
|
82
|
+
if (levelId) {
|
|
83
|
+
const initLevel = levelList?.levels.find(level => level.id === Number(levelId))
|
|
84
|
+
if (initLevel) {
|
|
85
|
+
handleOpenDetail(initLevel, true)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, [levelList.loading])
|
|
89
|
+
|
|
70
90
|
return (
|
|
71
91
|
<Container>
|
|
72
92
|
<Title>{t('LEVELS', 'Levels')}</Title>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { List as MenuIcon, BarChartSteps, Gift, Wallet as Cash, InfoCircle } from 'react-bootstrap-icons'
|
|
3
4
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
4
5
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
@@ -6,6 +7,7 @@ import { IconButton } from '../../../styles'
|
|
|
6
7
|
import { SideBar } from '../../Shared'
|
|
7
8
|
import { Wallet } from '../Wallet'
|
|
8
9
|
import { PointsWalletLevels } from '../PointsWalletLevels'
|
|
10
|
+
import { GiftCards } from '../GiftCards'
|
|
9
11
|
|
|
10
12
|
import {
|
|
11
13
|
Container,
|
|
@@ -19,30 +21,55 @@ import {
|
|
|
19
21
|
} from './styles'
|
|
20
22
|
|
|
21
23
|
export const RewardsPrograms = () => {
|
|
24
|
+
const history = useHistory()
|
|
25
|
+
const query = new URLSearchParams(useLocation().search)
|
|
22
26
|
const [, t] = useLanguage()
|
|
23
27
|
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
24
28
|
|
|
25
29
|
const [showOption, setShowOption] = useState(null)
|
|
26
30
|
const [moveDistance, setMoveDistance] = useState(0)
|
|
27
31
|
const [levelMoveDistance, setLevelMoveDistance] = useState(0)
|
|
32
|
+
const [giftCardMoveDistance, setGiftCardMoveDistance] = useState(0)
|
|
28
33
|
|
|
29
34
|
const walletList = [
|
|
30
35
|
{ key: 'credit_point', name: t('POINTS_WALLET', 'Points wallet'), description: t('POINTS_WALLET_DESCRIPTION', 'Points wallet general and per business setup.'), icon: <Cash /> },
|
|
31
36
|
{ key: 'levels', name: t('LEVELS', 'Levels'), description: t('LEVELS_DESCRIPTION', 'Setup different loyalty levels for your users.'), icon: <BarChartSteps /> },
|
|
32
|
-
|
|
37
|
+
{ key: 'gift_card', name: t('GIFT_CARD', 'Gift Card'), description: t('GIFT_CARD_DESCRIPTION', 'Setup different gift cards for your customers.'), icon: <Gift /> },
|
|
33
38
|
{ key: 'cashback', name: t('CASH_WALLET', 'Cash wallet'), description: t('CASH_WALLET_DESCRIPTION', 'Cash wallet general and per business setup.'), icon: <Cash /> }
|
|
34
39
|
]
|
|
35
40
|
|
|
36
41
|
const hanldeClosePointsWallet = () => {
|
|
37
42
|
setMoveDistance(0)
|
|
38
43
|
setShowOption(null)
|
|
44
|
+
history.replace(`${location.pathname}`)
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
const handleCloseLevel = () => {
|
|
42
48
|
setLevelMoveDistance(0)
|
|
43
49
|
setShowOption(null)
|
|
50
|
+
history.replace(`${location.pathname}`)
|
|
44
51
|
}
|
|
45
52
|
|
|
53
|
+
const handleCloseGiftCard = () => {
|
|
54
|
+
setGiftCardMoveDistance(0)
|
|
55
|
+
setShowOption(null)
|
|
56
|
+
history.replace(`${location.pathname}`)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const handleOptionClick = (key, isInitialRender) => {
|
|
60
|
+
setShowOption(key)
|
|
61
|
+
if (!isInitialRender) {
|
|
62
|
+
history.replace(`${location.pathname}?id=${key}`)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const id = query.get('id')
|
|
68
|
+
if (id) {
|
|
69
|
+
handleOptionClick(id, true)
|
|
70
|
+
}
|
|
71
|
+
}, [])
|
|
72
|
+
|
|
46
73
|
return (
|
|
47
74
|
<>
|
|
48
75
|
<Container>
|
|
@@ -72,7 +99,7 @@ export const RewardsPrograms = () => {
|
|
|
72
99
|
{walletList.map(item => (
|
|
73
100
|
<LoyaltyItemWrapper
|
|
74
101
|
key={item.key}
|
|
75
|
-
onClick={() =>
|
|
102
|
+
onClick={() => handleOptionClick(item.key)}
|
|
76
103
|
>
|
|
77
104
|
<IconWrapper>
|
|
78
105
|
{item.icon}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage, RewardsPrograms as RewardsProgramsController } from 'ordering-components-admin-external'
|
|
3
4
|
import { PointsWalletBusinessDetail } from '../PointsWalletBusinessDetail'
|
|
4
5
|
import { PointsWalletBusinessList } from '../PointsWalletBusinessList'
|
|
@@ -25,6 +26,8 @@ const WalletUI = (props) => {
|
|
|
25
26
|
title
|
|
26
27
|
} = props
|
|
27
28
|
|
|
29
|
+
const history = useHistory()
|
|
30
|
+
const query = new URLSearchParams(useLocation().search)
|
|
28
31
|
const [, t] = useLanguage()
|
|
29
32
|
const { width } = useWindowSize()
|
|
30
33
|
|
|
@@ -48,6 +51,24 @@ const WalletUI = (props) => {
|
|
|
48
51
|
if (selectedOption !== 'business') handleParentSidebarMove(0)
|
|
49
52
|
}, [selectedOption])
|
|
50
53
|
|
|
54
|
+
const handleTabClick = (tab, isInitialRender) => {
|
|
55
|
+
setSelectedOption(tab)
|
|
56
|
+
if (!isInitialRender) {
|
|
57
|
+
const id = query.get('id')
|
|
58
|
+
history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (loyaltyPlanList?.loading) return
|
|
64
|
+
const tab = query.get('tab')
|
|
65
|
+
if (tab) {
|
|
66
|
+
handleTabClick(tab, true)
|
|
67
|
+
} else {
|
|
68
|
+
handleTabClick(selectedOption)
|
|
69
|
+
}
|
|
70
|
+
}, [loyaltyPlanList?.loading])
|
|
71
|
+
|
|
51
72
|
return (
|
|
52
73
|
<Container>
|
|
53
74
|
<Header>
|
|
@@ -66,7 +87,7 @@ const WalletUI = (props) => {
|
|
|
66
87
|
<Tab
|
|
67
88
|
key={option.key}
|
|
68
89
|
active={selectedOption === option.key}
|
|
69
|
-
onClick={() =>
|
|
90
|
+
onClick={() => handleTabClick(option.key)}
|
|
70
91
|
>
|
|
71
92
|
{option.name}
|
|
72
93
|
</Tab>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
4
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
4
5
|
import { IconButton } from '../../../styles'
|
|
@@ -16,6 +17,8 @@ import {
|
|
|
16
17
|
} from './styles'
|
|
17
18
|
|
|
18
19
|
export const AdBannersListing = (props) => {
|
|
20
|
+
const history = useHistory()
|
|
21
|
+
const query = new URLSearchParams(useLocation().search)
|
|
19
22
|
const [, t] = useLanguage()
|
|
20
23
|
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
21
24
|
const [openPositionDetail, setOpenPositionDetail] = useState(null)
|
|
@@ -69,10 +72,27 @@ export const AdBannersListing = (props) => {
|
|
|
69
72
|
}
|
|
70
73
|
]
|
|
71
74
|
|
|
72
|
-
const handleSelectBannerPosition = (
|
|
73
|
-
|
|
75
|
+
const handleSelectBannerPosition = (key, isInitialRender) => {
|
|
76
|
+
const selectedItem = bannerPositions.find(item => item.key === key)
|
|
77
|
+
setOpenPositionDetail(selectedItem)
|
|
78
|
+
if (!isInitialRender) {
|
|
79
|
+
history.replace(`${location.pathname}?position=${key}`)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const handleCloseDetails = () => {
|
|
84
|
+
setOpenPositionDetail(null)
|
|
85
|
+
setMoveDistance(0)
|
|
86
|
+
history.replace(`${location.pathname}`)
|
|
74
87
|
}
|
|
75
88
|
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
const position = query.get('position')
|
|
91
|
+
if (position) {
|
|
92
|
+
handleSelectBannerPosition(position, true)
|
|
93
|
+
}
|
|
94
|
+
}, [])
|
|
95
|
+
|
|
76
96
|
return (
|
|
77
97
|
<>
|
|
78
98
|
<AdBannersListingContainer>
|
|
@@ -104,7 +124,7 @@ export const AdBannersListing = (props) => {
|
|
|
104
124
|
title={item.title}
|
|
105
125
|
description={item.description}
|
|
106
126
|
icon={item.icon}
|
|
107
|
-
onClick={() => handleSelectBannerPosition(item)}
|
|
127
|
+
onClick={() => handleSelectBannerPosition(item.key)}
|
|
108
128
|
/>
|
|
109
129
|
</div>
|
|
110
130
|
))}
|
|
@@ -114,10 +134,7 @@ export const AdBannersListing = (props) => {
|
|
|
114
134
|
{openPositionDetail && (
|
|
115
135
|
<SideBar
|
|
116
136
|
open={openPositionDetail}
|
|
117
|
-
onClose={() =>
|
|
118
|
-
setOpenPositionDetail(null)
|
|
119
|
-
setMoveDistance(0)
|
|
120
|
-
}}
|
|
137
|
+
onClose={() => handleCloseDetails()}
|
|
121
138
|
defaultSideBarWidth={500 + moveDistance}
|
|
122
139
|
moveDistance={moveDistance}
|
|
123
140
|
>
|
|
@@ -231,7 +231,8 @@ const BannerImageDetailsUI = (props) => {
|
|
|
231
231
|
export const BannerImageDetails = (props) => {
|
|
232
232
|
const linkProps = {
|
|
233
233
|
...props,
|
|
234
|
-
UIComponent: BannerImageDetailsUI
|
|
234
|
+
UIComponent: BannerImageDetailsUI,
|
|
235
|
+
isSearchByName: true
|
|
235
236
|
}
|
|
236
237
|
return <BannerImageDetailsController {...linkProps} />
|
|
237
238
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { useTheme } from 'styled-components'
|
|
3
4
|
import { Dropdown, DropdownButton } from 'react-bootstrap'
|
|
4
5
|
import { useLanguage, CampaignDetail as CampaignDetailController } from 'ordering-components-admin-external'
|
|
@@ -28,6 +29,8 @@ const CampaignDetailUI = (props) => {
|
|
|
28
29
|
handleDeleteCampaign
|
|
29
30
|
} = props
|
|
30
31
|
|
|
32
|
+
const history = useHistory()
|
|
33
|
+
const query = new URLSearchParams(useLocation().search)
|
|
31
34
|
const theme = useTheme()
|
|
32
35
|
const [, t] = useLanguage()
|
|
33
36
|
const { width } = useWindowSize()
|
|
@@ -76,6 +79,24 @@ const CampaignDetailUI = (props) => {
|
|
|
76
79
|
})
|
|
77
80
|
}, [formState?.error])
|
|
78
81
|
|
|
82
|
+
const handleTabClick = (tab, isInitialRender) => {
|
|
83
|
+
setSelectedOption(tab)
|
|
84
|
+
|
|
85
|
+
if (!isInitialRender) {
|
|
86
|
+
const id = query.get('id')
|
|
87
|
+
history.replace(`${location.pathname}?id=${id}&tab=${tab}`)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
const tab = query.get('tab')
|
|
93
|
+
if (tab) {
|
|
94
|
+
handleTabClick(tab, true)
|
|
95
|
+
} else {
|
|
96
|
+
handleTabClick(selectedOption)
|
|
97
|
+
}
|
|
98
|
+
}, [])
|
|
99
|
+
|
|
79
100
|
return (
|
|
80
101
|
<>
|
|
81
102
|
<CampaignDetailContainer>
|
|
@@ -117,7 +138,7 @@ const CampaignDetailUI = (props) => {
|
|
|
117
138
|
<Tab
|
|
118
139
|
key={option.key}
|
|
119
140
|
active={selectedOption === option.key}
|
|
120
|
-
onClick={() =>
|
|
141
|
+
onClick={() => handleTabClick(option.key)}
|
|
121
142
|
>
|
|
122
143
|
{option.name}
|
|
123
144
|
</Tab>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
2
3
|
import { SideBar } from '../../Shared'
|
|
3
4
|
import { CampaignDetail } from '../CampaignDetail'
|
|
4
5
|
import { CampaignHeader } from '../CampaignHeader'
|
|
@@ -9,19 +10,34 @@ import {
|
|
|
9
10
|
} from './styles'
|
|
10
11
|
|
|
11
12
|
export const CampaignListingUI = (props) => {
|
|
13
|
+
const history = useHistory()
|
|
14
|
+
const query = new URLSearchParams(useLocation().search)
|
|
12
15
|
const [isOpenDetail, setIsOpenDetail] = useState(false)
|
|
13
16
|
const [selectedCampaign, setSelectedCampaign] = useState(null)
|
|
17
|
+
const [selectedCampaignId, setSelectedCampaignId] = useState(null)
|
|
14
18
|
|
|
15
19
|
const handleOpenDetail = (action) => {
|
|
16
20
|
setSelectedCampaign(action)
|
|
21
|
+
setSelectedCampaignId(action?.id)
|
|
17
22
|
setIsOpenDetail(true)
|
|
23
|
+
action && history.replace(`${location.pathname}?id=${action?.id}`)
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
const handleCloseDetail = () => {
|
|
21
27
|
setIsOpenDetail(false)
|
|
22
28
|
setSelectedCampaign(null)
|
|
29
|
+
history.replace(`${location.pathname}`)
|
|
23
30
|
}
|
|
24
31
|
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const id = query.get('id')
|
|
34
|
+
if (id) {
|
|
35
|
+
setSelectedCampaign({})
|
|
36
|
+
setSelectedCampaignId(Number(id))
|
|
37
|
+
setIsOpenDetail(true)
|
|
38
|
+
}
|
|
39
|
+
}, [])
|
|
40
|
+
|
|
25
41
|
return (
|
|
26
42
|
<>
|
|
27
43
|
<CampaignListingContainer>
|
|
@@ -46,6 +62,7 @@ export const CampaignListingUI = (props) => {
|
|
|
46
62
|
<CampaignDetail
|
|
47
63
|
{...props}
|
|
48
64
|
campaign={selectedCampaign}
|
|
65
|
+
campaignId={selectedCampaignId}
|
|
49
66
|
onClose={() => handleCloseDetail()}
|
|
50
67
|
/>
|
|
51
68
|
</SideBar>
|