ordering-ui-admin-external 1.24.2 → 1.25.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/main.css +12158 -12158
- package/_bundles/{ordering-ui-admin.0c354f3e7da49f56465b.js → ordering-ui-admin.f2522b983a000252b407.js} +2 -2
- package/_modules/components/CartRecovery/RecoveryActionAdd/index.js +16 -3
- package/_modules/components/CartRecovery/RecoveryActionAdd/styles.js +65 -0
- package/_modules/components/CartRecovery/RecoveryActionList/index.js +1 -1
- package/_modules/components/CartRecovery/RecoveryActionList/styles.js +3 -7
- package/_modules/components/CartRecovery/RecoveryActionListing/index.js +21 -2
- package/_modules/components/CartRecovery/RecoveryActionListing/styles.js +1 -1
- package/_modules/components/CartRecovery/RecoveryNotificationList/index.js +6 -2
- package/_modules/components/CartRecovery/RecoveryNotificationList/styles.js +3 -7
- package/_modules/components/CartRecovery/SingleRecoveryNotification/index.js +67 -21
- package/_modules/components/CartRecovery/SingleRecoveryNotification/styles.js +1 -1
- package/_modules/components/CartRecovery/index.js +8 -1
- package/_modules/components/Delivery/DriversCompaniesList/index.js +1 -1
- package/_modules/components/Delivery/DriversCompaniesList/styles.js +3 -7
- package/_modules/components/Delivery/DriversGroupsList/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupsList/styles.js +3 -10
- package/_modules/components/Delivery/UsersList/index.js +1 -1
- package/_modules/components/Delivery/UsersList/styles.js +8 -15
- package/_modules/components/Marketing/CampaignList/index.js +1 -1
- package/_modules/components/Marketing/CampaignList/styles.js +3 -7
- package/_modules/components/Marketing/EnterprisePromotionDetails/index.js +1 -0
- package/_modules/components/Marketing/EnterprisePromotionList/index.js +1 -1
- package/_modules/components/Marketing/EnterprisePromotionList/styles.js +4 -8
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +9 -1
- package/_modules/components/Marketing/EnterprisePromotionRules/index.js +7 -2
- package/_modules/components/Messages/MessagesListing/index.js +8 -2
- package/_modules/components/MyProducts/ContentForm/index.js +0 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +1 -1
- package/_modules/components/OrderingProducts/OrderingProductsListing/styles.js +7 -11
- package/_modules/components/Orders/DeliveriesManager/index.js +1 -0
- package/_modules/components/Orders/DriversList/index.js +10 -9
- package/_modules/components/Orders/DriversList/styles.js +9 -16
- package/_modules/components/Orders/Logistics/index.js +15 -7
- package/_modules/components/Orders/Logistics/styles.js +1 -1
- package/_modules/components/Orders/OrderDetails/index.js +15 -13
- package/_modules/components/Orders/OrderDetailsHeader/index.js +7 -12
- package/_modules/components/Orders/OrderNotification/index.js +33 -1
- package/_modules/components/Orders/OrdersCards/index.js +11 -10
- package/_modules/components/Orders/OrdersCards/styles.js +1 -1
- package/_modules/components/Orders/OrdersTable/index.js +10 -9
- package/_modules/components/Settings/Cms/index.js +1 -1
- package/_modules/components/Settings/Cms/styles.js +3 -7
- package/_modules/components/Settings/CountriesList/index.js +1 -1
- package/_modules/components/Settings/CountriesList/styles.js +3 -7
- package/_modules/components/Settings/DropdownOptionList/index.js +1 -1
- package/_modules/components/Settings/DropdownOptionList/styles.js +3 -7
- package/_modules/components/Settings/LanguageTransTable/index.js +7 -6
- package/_modules/components/Settings/LanguageTransTable/styles.js +3 -7
- package/_modules/components/Settings/PlaceListing/index.js +1 -1
- package/_modules/components/Settings/PlaceListing/styles.js +3 -7
- package/_modules/components/Settings/SettingsList/index.js +1 -1
- package/_modules/components/Shared/HtmlEditor/InsertImage/index.js +202 -0
- package/_modules/components/Shared/HtmlEditor/InsertImage/styles.js +36 -0
- package/_modules/components/Shared/HtmlEditor/InsertLink/index.js +75 -0
- package/_modules/components/Shared/HtmlEditor/InsertLink/styles.js +16 -0
- package/_modules/components/Shared/HtmlEditor/InsertVideo/index.js +56 -0
- package/_modules/components/Shared/HtmlEditor/InsertVideo/styles.js +14 -0
- package/_modules/components/Shared/HtmlEditor/index.js +181 -0
- package/_modules/components/Shared/HtmlEditor/styles.js +18 -0
- package/_modules/components/Shared/index.js +7 -0
- package/_modules/components/Stores/BusinessBrandListing/index.js +1 -1
- package/_modules/components/Stores/BusinessBrandListing/styles.js +3 -6
- package/_modules/components/Stores/BusinessDeliveryPickupMore/styles.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryZoneList/index.js +2 -2
- package/_modules/components/Stores/BusinessDeliveryZoneList/styles.js +4 -8
- package/_modules/components/Stores/BusinessDetail/styles.js +2 -2
- package/_modules/components/Stores/BusinessDetails/index.js +24 -25
- package/_modules/components/Stores/BusinessDeviceListing/index.js +1 -1
- package/_modules/components/Stores/BusinessDeviceListing/styles.js +1 -4
- package/_modules/components/Stores/BusinessMenu/index.js +2 -2
- package/_modules/components/Stores/BusinessMenu/styles.js +3 -5
- package/_modules/components/Stores/BusinessPlaceGroup/index.js +2 -2
- package/_modules/components/Stores/BusinessPlaceGroup/styles.js +3 -7
- package/_modules/components/Stores/BusinessPlaceGroupList/index.js +2 -2
- package/_modules/components/Stores/BusinessPlaceGroupList/styles.js +3 -7
- package/_modules/components/Stores/BusinessProductList/index.js +7 -6
- package/_modules/components/Stores/BusinessProductList/styles.js +3 -5
- package/_modules/components/Stores/BusinessProductsCategories/index.js +6 -5
- package/_modules/components/Stores/BusinessProductsCategories/styles.js +3 -6
- package/_modules/components/Stores/BusinessProductsListing/index.js +9 -6
- package/_modules/components/Stores/BusinessPromotionList/index.js +2 -2
- package/_modules/components/Stores/BusinessPromotionList/styles.js +3 -5
- package/_modules/components/Stores/BusinessSummary/index.js +7 -12
- package/_modules/components/Stores/BusinessesList/index.js +7 -4
- package/_modules/components/Stores/BusinessesList/styles.js +12 -16
- package/_modules/components/Stores/BusinessesListing/index.js +4 -2
- package/_modules/components/Stores/ImportersButton/index.js +2 -0
- package/_modules/components/Stores/ImportersList/index.js +1 -1
- package/_modules/components/Stores/ImportersList/styles.js +4 -9
- package/_modules/components/Stores/ProductDetails/index.js +19 -20
- package/_modules/components/Stores/ProductExtraOptionDetails/index.js +1 -1
- package/_modules/components/Stores/ProductExtraOptionDetails/styles.js +1 -5
- package/_modules/components/Stores/ProductExtras/index.js +2 -2
- package/_modules/components/Stores/ProductExtras/styles.js +3 -7
- package/_modules/components/Stores/ProductIngredient/index.js +2 -2
- package/_modules/components/Stores/ProductIngredient/styles.js +3 -7
- package/_modules/components/Stores/ProductStep/index.js +13 -7
- package/_modules/components/Stores/ProductSummary/index.js +2 -8
- package/_modules/components/Stores/ProductTagsList/index.js +2 -2
- package/_modules/components/Stores/ProductTagsList/styles.js +1 -5
- package/_modules/components/Stores/RestaurantSelectGuide/index.js +18 -9
- package/_modules/components/Stores/SeoOptions/index.js +25 -10
- package/_modules/components/Stores/SingleBusiness/index.js +18 -11
- package/_modules/components/Users/CustomerDetails/index.js +6 -7
- package/_modules/components/Users/CustomersListing/index.js +10 -4
- package/_modules/components/Users/ProfessionalList/index.js +1 -1
- package/_modules/components/Users/ProfessionalList/styles.js +8 -12
- package/_modules/components/Users/UsersList/index.js +1 -1
- package/_modules/components/Users/UsersList/styles.js +11 -15
- package/_modules/index.js +6 -0
- package/_modules/styles/Buttons/index.js +11 -4
- package/_modules/styles/index.js +6 -0
- package/index-template.js +1 -1
- package/package.json +2 -2
- package/src/components/CartRecovery/RecoveryActionAdd/index.js +13 -3
- package/src/components/CartRecovery/RecoveryActionAdd/styles.js +179 -0
- package/src/components/CartRecovery/RecoveryActionList/index.js +4 -5
- package/src/components/CartRecovery/RecoveryActionList/styles.js +0 -6
- package/src/components/CartRecovery/RecoveryActionListing/index.js +25 -6
- package/src/components/CartRecovery/RecoveryActionListing/styles.js +2 -1
- package/src/components/CartRecovery/RecoveryNotificationList/index.js +7 -3
- package/src/components/CartRecovery/RecoveryNotificationList/styles.js +5 -13
- package/src/components/CartRecovery/SingleRecoveryNotification/index.js +91 -42
- package/src/components/CartRecovery/SingleRecoveryNotification/styles.js +2 -2
- package/src/components/CartRecovery/index.js +3 -1
- package/src/components/Delivery/DriversCompaniesList/index.js +3 -4
- package/src/components/Delivery/DriversCompaniesList/styles.js +0 -6
- package/src/components/Delivery/DriversGroupsList/index.js +3 -4
- package/src/components/Delivery/DriversGroupsList/styles.js +0 -12
- package/src/components/Delivery/UsersList/index.js +3 -4
- package/src/components/Delivery/UsersList/styles.js +0 -12
- package/src/components/Marketing/CampaignList/index.js +3 -4
- package/src/components/Marketing/CampaignList/styles.js +0 -6
- package/src/components/Marketing/EnterprisePromotionDetails/index.js +1 -0
- package/src/components/Marketing/EnterprisePromotionList/index.js +3 -4
- package/src/components/Marketing/EnterprisePromotionList/styles.js +0 -7
- package/src/components/Marketing/EnterprisePromotionListing/index.js +6 -1
- package/src/components/Marketing/EnterprisePromotionRules/index.js +7 -2
- package/src/components/Messages/MessagesListing/index.js +3 -0
- package/src/components/MyProducts/ContentForm/index.js +0 -1
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +3 -4
- package/src/components/OrderingProducts/OrderingProductsListing/styles.js +0 -7
- package/src/components/Orders/DeliveriesManager/index.js +1 -0
- package/src/components/Orders/DriversList/index.js +4 -4
- package/src/components/Orders/DriversList/styles.js +0 -10
- package/src/components/Orders/Logistics/index.js +10 -1
- package/src/components/Orders/Logistics/styles.js +6 -0
- package/src/components/Orders/OrderDetails/index.js +11 -13
- package/src/components/Orders/OrderDetailsHeader/index.js +40 -43
- package/src/components/Orders/OrderNotification/index.js +19 -1
- package/src/components/Orders/OrdersCards/index.js +7 -7
- package/src/components/Orders/OrdersCards/styles.js +3 -1
- package/src/components/Orders/OrdersTable/index.js +8 -8
- package/src/components/Settings/Cms/index.js +4 -5
- package/src/components/Settings/Cms/styles.js +0 -6
- package/src/components/Settings/CountriesList/index.js +4 -5
- package/src/components/Settings/CountriesList/styles.js +0 -6
- package/src/components/Settings/DropdownOptionList/index.js +4 -5
- package/src/components/Settings/DropdownOptionList/styles.js +0 -6
- package/src/components/Settings/LanguageTransTable/index.js +4 -4
- package/src/components/Settings/LanguageTransTable/styles.js +0 -6
- package/src/components/Settings/PlaceListing/index.js +4 -5
- package/src/components/Settings/PlaceListing/styles.js +0 -6
- package/src/components/Settings/SettingsList/index.js +88 -88
- package/src/components/Shared/HtmlEditor/InsertImage/index.js +172 -0
- package/src/components/Shared/HtmlEditor/InsertImage/styles.js +136 -0
- package/src/components/Shared/HtmlEditor/InsertLink/index.js +73 -0
- package/src/components/Shared/HtmlEditor/InsertLink/styles.js +34 -0
- package/src/components/Shared/HtmlEditor/InsertVideo/index.js +51 -0
- package/src/components/Shared/HtmlEditor/InsertVideo/styles.js +23 -0
- package/src/components/Shared/HtmlEditor/index.js +172 -0
- package/src/components/Shared/HtmlEditor/styles.js +30 -0
- package/src/components/Shared/index.js +3 -1
- package/src/components/Stores/BusinessBrandListing/index.js +2 -2
- package/src/components/Stores/BusinessBrandListing/styles.js +0 -7
- package/src/components/Stores/BusinessDeliveryPickupMore/styles.js +0 -4
- package/src/components/Stores/BusinessDeliveryZoneList/index.js +9 -7
- package/src/components/Stores/BusinessDeliveryZoneList/styles.js +1 -11
- package/src/components/Stores/BusinessDetail/styles.js +1 -4
- package/src/components/Stores/BusinessDetails/index.js +12 -17
- package/src/components/Stores/BusinessDeviceListing/index.js +2 -2
- package/src/components/Stores/BusinessDeviceListing/styles.js +0 -7
- package/src/components/Stores/BusinessMenu/index.js +9 -7
- package/src/components/Stores/BusinessMenu/styles.js +1 -6
- package/src/components/Stores/BusinessPlaceGroup/index.js +7 -3
- package/src/components/Stores/BusinessPlaceGroup/styles.js +1 -12
- package/src/components/Stores/BusinessPlaceGroupList/index.js +5 -3
- package/src/components/Stores/BusinessPlaceGroupList/styles.js +1 -12
- package/src/components/Stores/BusinessProductList/index.js +9 -6
- package/src/components/Stores/BusinessProductList/styles.js +1 -6
- package/src/components/Stores/BusinessProductsCategories/index.js +10 -7
- package/src/components/Stores/BusinessProductsCategories/styles.js +1 -6
- package/src/components/Stores/BusinessProductsListing/index.js +5 -2
- package/src/components/Stores/BusinessPromotionList/index.js +7 -5
- package/src/components/Stores/BusinessPromotionList/styles.js +1 -5
- package/src/components/Stores/BusinessSummary/index.js +4 -7
- package/src/components/Stores/BusinessesList/index.js +7 -5
- package/src/components/Stores/BusinessesList/styles.js +0 -8
- package/src/components/Stores/BusinessesListing/index.js +3 -1
- package/src/components/Stores/ImportersButton/index.js +2 -0
- package/src/components/Stores/ImportersList/index.js +3 -4
- package/src/components/Stores/ImportersList/styles.js +1 -13
- package/src/components/Stores/ProductDetails/index.js +12 -16
- package/src/components/Stores/ProductExtraOptionDetails/index.js +3 -3
- package/src/components/Stores/ProductExtraOptionDetails/styles.js +0 -9
- package/src/components/Stores/ProductExtras/index.js +9 -7
- package/src/components/Stores/ProductExtras/styles.js +1 -8
- package/src/components/Stores/ProductIngredient/index.js +9 -7
- package/src/components/Stores/ProductIngredient/styles.js +1 -8
- package/src/components/Stores/ProductStep/index.js +25 -4
- package/src/components/Stores/ProductSummary/index.js +3 -7
- package/src/components/Stores/ProductTagsList/index.js +7 -5
- package/src/components/Stores/ProductTagsList/styles.js +0 -7
- package/src/components/Stores/RestaurantSelectGuide/index.js +54 -24
- package/src/components/Stores/SeoOptions/index.js +15 -1
- package/src/components/Stores/SingleBusiness/index.js +9 -3
- package/src/components/Users/CustomerDetails/index.js +6 -8
- package/src/components/Users/CustomersListing/index.js +4 -1
- package/src/components/Users/ProfessionalList/index.js +3 -4
- package/src/components/Users/ProfessionalList/styles.js +0 -7
- package/src/components/Users/UsersList/index.js +3 -4
- package/src/components/Users/UsersList/styles.js +0 -7
- package/src/index.js +2 -1
- package/src/styles/Buttons/index.js +15 -1
- package/src/styles/index.js +2 -1
- package/template/pages/Login/index.js +2 -4
- /package/_bundles/{ordering-ui-admin.0c354f3e7da49f56465b.js.LICENSE.txt → ordering-ui-admin.f2522b983a000252b407.js.LICENSE.txt} +0 -0
|
@@ -45,6 +45,7 @@ const ProductDetailsUI = (props) => {
|
|
|
45
45
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
46
46
|
const [extraOpen, setExtraOpen] = useState(false)
|
|
47
47
|
const [isExtendExtraOpen, setIsExtendExtraOpen] = useState(false)
|
|
48
|
+
const [isExpand, setIsExpand] = useState(false)
|
|
48
49
|
const [showOption, setShowOption] = useState(null)
|
|
49
50
|
|
|
50
51
|
const handleShowOption = (option, isInitialRender) => {
|
|
@@ -80,20 +81,18 @@ const ProductDetailsUI = (props) => {
|
|
|
80
81
|
if (width <= 500) {
|
|
81
82
|
document.getElementById('product_details').style.width = '100vw'
|
|
82
83
|
} else {
|
|
83
|
-
if (
|
|
84
|
-
document.getElementById('product_details').style.width = '
|
|
84
|
+
if (isExpand) {
|
|
85
|
+
document.getElementById('product_details').style.width = '100vw'
|
|
85
86
|
} else {
|
|
86
|
-
|
|
87
|
+
if (extraOpen && width >= 1000) {
|
|
88
|
+
document.getElementById('product_details').style.width = '1000px'
|
|
89
|
+
} else {
|
|
90
|
+
document.getElementById('product_details').style.width = '500px'
|
|
91
|
+
}
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
|
-
useEffect(() => {
|
|
92
|
-
// if (width > 1000) {
|
|
93
|
-
// setIsExtendExtraOpen(false)
|
|
94
|
-
// }
|
|
95
|
-
toggleMainContent()
|
|
96
|
-
}, [width])
|
|
97
96
|
|
|
98
97
|
useEffect(() => {
|
|
99
98
|
if (!open) return
|
|
@@ -101,13 +100,8 @@ const ProductDetailsUI = (props) => {
|
|
|
101
100
|
}, [open])
|
|
102
101
|
|
|
103
102
|
useEffect(() => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
document.getElementById('product_details').style.width = '1000px'
|
|
107
|
-
} else {
|
|
108
|
-
toggleMainContent()
|
|
109
|
-
}
|
|
110
|
-
}, [extraOpen])
|
|
103
|
+
toggleMainContent()
|
|
104
|
+
}, [extraOpen, isExpand, width])
|
|
111
105
|
|
|
112
106
|
useEffect(() => {
|
|
113
107
|
setExtraOpen(false)
|
|
@@ -142,6 +136,8 @@ const ProductDetailsUI = (props) => {
|
|
|
142
136
|
showOption={showOption}
|
|
143
137
|
handleShowOption={handleShowOption}
|
|
144
138
|
extraOpen={extraOpen}
|
|
139
|
+
isExpand={isExpand}
|
|
140
|
+
setIsExpand={setIsExpand}
|
|
145
141
|
/>
|
|
146
142
|
)}
|
|
147
143
|
{extraOpen && (
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ProductExtraOptionDetails as ProductExtraOptionDetailsController
|
|
7
7
|
} from 'ordering-components-admin-external'
|
|
8
8
|
import BiImage from '@meronex/icons/bi/BiImage'
|
|
9
|
-
import { IconButton, Input } from '../../../styles'
|
|
9
|
+
import { IconButton, Input, LinkButton } from '../../../styles'
|
|
10
10
|
import { DropdownButton, Dropdown } from 'react-bootstrap'
|
|
11
11
|
import { useTheme } from 'styled-components'
|
|
12
12
|
import { bytesConverter } from '../../../utils'
|
|
@@ -400,12 +400,12 @@ const ProductExtraOptionDetailsUI = (props) => {
|
|
|
400
400
|
)}
|
|
401
401
|
{!isAddForm && (
|
|
402
402
|
<AddNewOptionButton>
|
|
403
|
-
<
|
|
403
|
+
<LinkButton
|
|
404
404
|
className='add-option-btn'
|
|
405
405
|
onClick={() => setIsAddForm(true)}
|
|
406
406
|
>
|
|
407
407
|
{t('ADD_SUBOPTION', 'Add suboption')}
|
|
408
|
-
</
|
|
408
|
+
</LinkButton>
|
|
409
409
|
</AddNewOptionButton>
|
|
410
410
|
)}
|
|
411
411
|
</ModifierOptionsContainer>
|
|
@@ -287,13 +287,4 @@ export const AdddSubOptionForm = styled.form`
|
|
|
287
287
|
|
|
288
288
|
export const AddNewOptionButton = styled.div`
|
|
289
289
|
margin-top: 15px;
|
|
290
|
-
font-size: 14px;
|
|
291
|
-
color: ${props => props.theme.colors.lightGray};
|
|
292
|
-
span {
|
|
293
|
-
cursor: pointer;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
&:hover {
|
|
297
|
-
color: ${props => props.theme.colors.primary};
|
|
298
|
-
}
|
|
299
290
|
`
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react'
|
|
|
2
2
|
import { useHistory, useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage, ProductExtras as ProductExtrasController } from 'ordering-components-admin-external'
|
|
4
4
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
5
|
-
import { Button, Checkbox } from '../../../styles'
|
|
5
|
+
import { Button, Checkbox, LinkButton } from '../../../styles'
|
|
6
6
|
import { Alert, Confirm, Modal } from '../../Shared'
|
|
7
7
|
import { ProductExtraOptions } from '../ProductExtraOptions'
|
|
8
8
|
import { ChevronRight } from 'react-bootstrap-icons'
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
MoreContainer,
|
|
18
18
|
Details,
|
|
19
19
|
ExtraAddForm,
|
|
20
|
-
|
|
20
|
+
AddButtonWrapper,
|
|
21
21
|
DragImageWrapper
|
|
22
22
|
} from './styles'
|
|
23
23
|
|
|
@@ -201,11 +201,13 @@ const ProductExtrasUI = (props) => {
|
|
|
201
201
|
/>
|
|
202
202
|
</ExtraAddForm>
|
|
203
203
|
)}
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
<AddButtonWrapper>
|
|
205
|
+
<LinkButton
|
|
206
|
+
onClick={() => handleOpenAddForm()}
|
|
207
|
+
>
|
|
208
|
+
{t('ADD_PRODUCT_OPTION', 'Add product option')}
|
|
209
|
+
</LinkButton>
|
|
210
|
+
</AddButtonWrapper>
|
|
209
211
|
</ProductExtrasContainer>
|
|
210
212
|
{width >= 1000 ? (
|
|
211
213
|
<>
|
|
@@ -99,15 +99,8 @@ export const Details = styled.div`
|
|
|
99
99
|
}
|
|
100
100
|
`
|
|
101
101
|
|
|
102
|
-
export const
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
font-size: 14px;
|
|
102
|
+
export const AddButtonWrapper = styled.div`
|
|
105
103
|
padding: 12px 0;
|
|
106
|
-
color: ${props => props.theme.colors.lightGray};
|
|
107
|
-
|
|
108
|
-
&:hover {
|
|
109
|
-
color: ${props => props.theme.colors.primary};
|
|
110
|
-
}
|
|
111
104
|
`
|
|
112
105
|
|
|
113
106
|
export const ExtraAddForm = styled.form`
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
|
|
|
2
2
|
import { useHistory, useLocation } from 'react-router-dom'
|
|
3
3
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
4
4
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
5
|
-
import { Button } from '../../../styles'
|
|
5
|
+
import { Button, LinkButton } from '../../../styles'
|
|
6
6
|
import { ProductIngredientDetails } from '../ProductIngredientDetails'
|
|
7
7
|
import { Modal } from '../../Shared'
|
|
8
8
|
import { ChevronRight } from 'react-bootstrap-icons'
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
IngredientContainer,
|
|
13
13
|
Header,
|
|
14
14
|
IngredientOption,
|
|
15
|
-
|
|
15
|
+
AddIngredientButtonWrapper
|
|
16
16
|
} from './styles'
|
|
17
17
|
|
|
18
18
|
export const ProductIngredient = (props) => {
|
|
@@ -81,11 +81,13 @@ export const ProductIngredient = (props) => {
|
|
|
81
81
|
<ChevronRight />
|
|
82
82
|
</IngredientOption>
|
|
83
83
|
))}
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
<AddIngredientButtonWrapper>
|
|
85
|
+
<LinkButton
|
|
86
|
+
onClick={() => handleOpenIngredient(null)}
|
|
87
|
+
>
|
|
88
|
+
{t('ADD_INGREDIENT', 'Add ingredient')}
|
|
89
|
+
</LinkButton>
|
|
90
|
+
</AddIngredientButtonWrapper>
|
|
89
91
|
</IngredientContainer>
|
|
90
92
|
|
|
91
93
|
{width >= 1000 ? (
|
|
@@ -64,13 +64,6 @@ export const IngredientOption = styled.div`
|
|
|
64
64
|
border-bottom: 1px solid ${props => props.theme.colors.primary};
|
|
65
65
|
`}
|
|
66
66
|
`
|
|
67
|
-
export const
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
font-size: 14px;
|
|
67
|
+
export const AddIngredientButtonWrapper = styled.div`
|
|
70
68
|
padding: 12px 0;
|
|
71
|
-
color: ${props => props.theme.colors.lightGray};
|
|
72
|
-
|
|
73
|
-
&:hover {
|
|
74
|
-
color: ${props => props.theme.colors.primary};
|
|
75
|
-
}
|
|
76
69
|
`
|
|
@@ -16,13 +16,12 @@ import { SelectPosGuide } from '../SelectPosGuide'
|
|
|
16
16
|
const ProductStepUI = (props) => {
|
|
17
17
|
const {
|
|
18
18
|
onClose,
|
|
19
|
-
|
|
19
|
+
businessListState,
|
|
20
20
|
setBusiness,
|
|
21
21
|
actionState,
|
|
22
22
|
handleImport,
|
|
23
23
|
handleChangeAddress,
|
|
24
24
|
business,
|
|
25
|
-
isLoading,
|
|
26
25
|
orderingBusiness,
|
|
27
26
|
countriesState,
|
|
28
27
|
handleOpenCategoryDetails
|
|
@@ -53,12 +52,11 @@ const ProductStepUI = (props) => {
|
|
|
53
52
|
setBusiness={setBusiness}
|
|
54
53
|
setStep={setStep}
|
|
55
54
|
onClose={onClose}
|
|
56
|
-
|
|
55
|
+
businessListState={businessListState}
|
|
57
56
|
handleImport={handleImport}
|
|
58
57
|
handleChangeAddress={handleChangeAddress}
|
|
59
58
|
orderingBusiness={orderingBusiness}
|
|
60
59
|
business={business}
|
|
61
|
-
isLoading={isLoading}
|
|
62
60
|
/>
|
|
63
61
|
)}
|
|
64
62
|
{step === 3 && option === 2 && actionState?.loading && (
|
|
@@ -91,6 +89,29 @@ const ProductStepUI = (props) => {
|
|
|
91
89
|
</ButtonWrapper>
|
|
92
90
|
</ImportMenuContainer>
|
|
93
91
|
)}
|
|
92
|
+
{step === 3 && option === 2 && !actionState?.loading && actionState?.error && (
|
|
93
|
+
<ImportMenuContainer>
|
|
94
|
+
<h2>{t('ERROR', 'Error')}</h2>
|
|
95
|
+
{actionState.error && typeof actionState.error === 'string' && actionState.error}
|
|
96
|
+
{actionState.error && typeof actionState.error === 'object' && Array.isArray(actionState.error) && (
|
|
97
|
+
<ul>
|
|
98
|
+
{actionState.error.map((item, i) => (
|
|
99
|
+
<React.Fragment key={i}>
|
|
100
|
+
{Array.isArray(item) ? (
|
|
101
|
+
item.map((err, index) => (
|
|
102
|
+
typeof err === 'string' && (
|
|
103
|
+
<li key={index}>{t(err.toUpperCase(), err)}</li>
|
|
104
|
+
)
|
|
105
|
+
))
|
|
106
|
+
) : (
|
|
107
|
+
typeof item === 'string' && <li>{t(item.toUpperCase(), item)}</li>
|
|
108
|
+
)}
|
|
109
|
+
</React.Fragment>
|
|
110
|
+
))}
|
|
111
|
+
</ul>
|
|
112
|
+
)}
|
|
113
|
+
</ImportMenuContainer>
|
|
114
|
+
)}
|
|
94
115
|
{step === 2 && option === 3 && (
|
|
95
116
|
<UploadMenuGuide
|
|
96
117
|
handleBack={() => setStep(1)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
2
|
import { useLanguage, useUtils } from 'ordering-components-admin-external'
|
|
3
3
|
import BsChevronRight from '@meronex/icons/bs/BsChevronRight'
|
|
4
4
|
import BiImage from '@meronex/icons/bi/BiImage'
|
|
@@ -43,7 +43,8 @@ export const ProductSummary = (props) => {
|
|
|
43
43
|
productCart,
|
|
44
44
|
handleDeleteProduct,
|
|
45
45
|
showProductOption,
|
|
46
|
-
|
|
46
|
+
isExpand,
|
|
47
|
+
setIsExpand
|
|
47
48
|
} = props
|
|
48
49
|
|
|
49
50
|
const [, t] = useLanguage()
|
|
@@ -54,7 +55,6 @@ export const ProductSummary = (props) => {
|
|
|
54
55
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
55
56
|
const [isProductPreview, setIsProductPreview] = useState(false)
|
|
56
57
|
const [selectedView, setSelectedView] = useState('desktop')
|
|
57
|
-
const [isExpand, setIsExpand] = useState(false)
|
|
58
58
|
|
|
59
59
|
const productConfigOptions = [
|
|
60
60
|
{
|
|
@@ -138,10 +138,6 @@ export const ProductSummary = (props) => {
|
|
|
138
138
|
setIsExpand(prev => !prev)
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
useEffect(() => {
|
|
142
|
-
if (extraOpen) setIsExpand(false)
|
|
143
|
-
}, [extraOpen])
|
|
144
|
-
|
|
145
141
|
return (
|
|
146
142
|
<>
|
|
147
143
|
<ProductDetailsContainer disabled={productState.loading}>
|
|
@@ -3,7 +3,7 @@ import { useHistory, useLocation } from 'react-router-dom'
|
|
|
3
3
|
import { useLanguage, ProductTagsList as ProductTagsController } from 'ordering-components-admin-external'
|
|
4
4
|
import Skeleton from 'react-loading-skeleton'
|
|
5
5
|
import { SearchBar, SideBar } from '../../Shared'
|
|
6
|
-
import { Button, Checkbox } from '../../../styles'
|
|
6
|
+
import { Button, Checkbox, LinkButton } from '../../../styles'
|
|
7
7
|
import { ChevronRight, Image as ImageIcon } from 'react-bootstrap-icons'
|
|
8
8
|
import { ProductTagDetails } from '../ProductTagDetails'
|
|
9
9
|
|
|
@@ -147,10 +147,12 @@ const ProductTagsListUI = (props) => {
|
|
|
147
147
|
)}
|
|
148
148
|
|
|
149
149
|
{!tagsState.loading && (
|
|
150
|
-
<AddNewLabel
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
<AddNewLabel>
|
|
151
|
+
<LinkButton
|
|
152
|
+
onClick={e => handleOpenProductTagDetail(e, null)}
|
|
153
|
+
>
|
|
154
|
+
{t('ADD_NEW_LABEL', 'Add new label')}
|
|
155
|
+
</LinkButton>
|
|
154
156
|
</AddNewLabel>
|
|
155
157
|
)}
|
|
156
158
|
</TagsListContainer>
|
|
@@ -74,12 +74,5 @@ export const TagImageWrapper = styled.div`
|
|
|
74
74
|
}
|
|
75
75
|
`
|
|
76
76
|
export const AddNewLabel = styled.div`
|
|
77
|
-
width: fit-content;
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
font-size: 14px;
|
|
80
|
-
color: ${props => props.theme.colors.lightGray};
|
|
81
77
|
margin: 15px 0;
|
|
82
|
-
&:hover {
|
|
83
|
-
color: ${props => props.theme.colors.primary};
|
|
84
|
-
}
|
|
85
78
|
`
|
|
@@ -16,13 +16,12 @@ import {
|
|
|
16
16
|
export const RestaurantSelectGuide = (props) => {
|
|
17
17
|
const {
|
|
18
18
|
setBusiness,
|
|
19
|
-
|
|
19
|
+
businessListState,
|
|
20
20
|
setStep,
|
|
21
21
|
onClose,
|
|
22
22
|
handleImport,
|
|
23
23
|
handleChangeAddress,
|
|
24
24
|
orderingBusiness,
|
|
25
|
-
isLoading,
|
|
26
25
|
business
|
|
27
26
|
} = props
|
|
28
27
|
|
|
@@ -38,12 +37,12 @@ export const RestaurantSelectGuide = (props) => {
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
const handleSelectBusiness = (id) => {
|
|
41
|
-
const _business =
|
|
40
|
+
const _business = businessListState.businesses?.find(item => item._id === id)
|
|
42
41
|
setBusiness(_business)
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
useEffect(() => {
|
|
46
|
-
const _options =
|
|
45
|
+
const _options = businessListState.businesses?.map(item => {
|
|
47
46
|
return {
|
|
48
47
|
value: item._id,
|
|
49
48
|
content: (
|
|
@@ -56,7 +55,7 @@ export const RestaurantSelectGuide = (props) => {
|
|
|
56
55
|
}
|
|
57
56
|
})
|
|
58
57
|
setOptions(_options)
|
|
59
|
-
}, [
|
|
58
|
+
}, [businessListState?.businesses])
|
|
60
59
|
|
|
61
60
|
return (
|
|
62
61
|
<Container>
|
|
@@ -76,7 +75,7 @@ export const RestaurantSelectGuide = (props) => {
|
|
|
76
75
|
countryCode={configs?.country_autocomplete?.value || '*'}
|
|
77
76
|
/>
|
|
78
77
|
</SearchWrapper>
|
|
79
|
-
{
|
|
78
|
+
{businessListState.loading && (
|
|
80
79
|
<SelectWrapper>
|
|
81
80
|
<label>
|
|
82
81
|
<Skeleton height={15} width={100} />
|
|
@@ -84,24 +83,55 @@ export const RestaurantSelectGuide = (props) => {
|
|
|
84
83
|
<Skeleton height={44} />
|
|
85
84
|
</SelectWrapper>
|
|
86
85
|
)}
|
|
87
|
-
{!
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
86
|
+
{!businessListState.loading && (
|
|
87
|
+
<>
|
|
88
|
+
{!businessListState.error ? (
|
|
89
|
+
<>
|
|
90
|
+
{options?.length > 0 && (
|
|
91
|
+
<SelectWrapper>
|
|
92
|
+
<label>{t('SELECT_YOUR_RESTAURANT', 'Select your restaurant')}</label>
|
|
93
|
+
<Select
|
|
94
|
+
options={options}
|
|
95
|
+
className='select'
|
|
96
|
+
defaultValue={business?._id || ''}
|
|
97
|
+
placeholder={t('SELECT_BUSINESS', 'Select a Business')}
|
|
98
|
+
onChange={(value) => handleSelectBusiness(value)}
|
|
99
|
+
searchBarIsCustomLayout
|
|
100
|
+
searchBarIsNotLazyLoad
|
|
101
|
+
/>
|
|
102
|
+
</SelectWrapper>
|
|
103
|
+
)}
|
|
104
|
+
{options.length === 0 && (
|
|
105
|
+
<EmptyData>
|
|
106
|
+
{t('NO_RESULT', 'There are no results')}
|
|
107
|
+
</EmptyData>
|
|
108
|
+
)}
|
|
109
|
+
</>
|
|
110
|
+
) : (
|
|
111
|
+
<>
|
|
112
|
+
<EmptyData>
|
|
113
|
+
{businessListState.error && typeof businessListState.error === 'string' && businessListState.error}
|
|
114
|
+
{businessListState.error && typeof businessListState.error === 'object' && Array.isArray(businessListState.error) && (
|
|
115
|
+
<ul>
|
|
116
|
+
{businessListState.error.map((item, i) => (
|
|
117
|
+
<React.Fragment key={i}>
|
|
118
|
+
{Array.isArray(item) ? (
|
|
119
|
+
item.map((err, index) => (
|
|
120
|
+
typeof err === 'string' && (
|
|
121
|
+
<li key={index}>{t(err.toUpperCase(), err)}</li>
|
|
122
|
+
)
|
|
123
|
+
))
|
|
124
|
+
) : (
|
|
125
|
+
typeof item === 'string' && <li>{t(item.toUpperCase(), item)}</li>
|
|
126
|
+
)}
|
|
127
|
+
</React.Fragment>
|
|
128
|
+
))}
|
|
129
|
+
</ul>
|
|
130
|
+
)}
|
|
131
|
+
</EmptyData>
|
|
132
|
+
</>
|
|
133
|
+
)}
|
|
134
|
+
</>
|
|
105
135
|
)}
|
|
106
136
|
<ButtonWrapper>
|
|
107
137
|
<span onClick={() => onClose()}>{t('SKIP', 'Skip')}</span>
|
|
@@ -138,6 +138,20 @@ export const SeoOptions = (props) => {
|
|
|
138
138
|
descriptionRef.current.value = data?.description
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
const onUpdateClick = () => {
|
|
142
|
+
if (formState?.changes?.slug) {
|
|
143
|
+
const format = /[ `!@#$%^&*()+\-=[\]{};':"\\|,.<>/?~]/
|
|
144
|
+
if (format.test(formState?.changes?.slug)) {
|
|
145
|
+
setAlertState({
|
|
146
|
+
open: true,
|
|
147
|
+
content: [t('SLUG_NOT_ALLOWED_SPECIAL_CHARACTERS', 'The slug is not allowed special characters.')]
|
|
148
|
+
})
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
handleUpdateClick()
|
|
153
|
+
}
|
|
154
|
+
|
|
141
155
|
useEffect(() => {
|
|
142
156
|
titleRef.current.value = data?.seo_title ?? ''
|
|
143
157
|
descriptionRef.current.value = data?.seo_description ?? ''
|
|
@@ -268,7 +282,7 @@ export const SeoOptions = (props) => {
|
|
|
268
282
|
color='primary'
|
|
269
283
|
borderRadius='5px'
|
|
270
284
|
disabled={formState.loading || Object.keys(formState?.changes).length === 0}
|
|
271
|
-
onClick={() =>
|
|
285
|
+
onClick={() => onUpdateClick()}
|
|
272
286
|
>
|
|
273
287
|
{formState.loading ? t('UPDATING', 'Updating') : t('SAVE', 'Save')}
|
|
274
288
|
</Button>
|
|
@@ -33,7 +33,8 @@ const SingleBusinessUI = (props) => {
|
|
|
33
33
|
handleOpenBusinessDetails,
|
|
34
34
|
detailsBusinessId,
|
|
35
35
|
businessIds,
|
|
36
|
-
handleChangeBusinessIds
|
|
36
|
+
handleChangeBusinessIds,
|
|
37
|
+
citiesList
|
|
37
38
|
} = props
|
|
38
39
|
|
|
39
40
|
const [, t] = useLanguage()
|
|
@@ -49,6 +50,11 @@ const SingleBusinessUI = (props) => {
|
|
|
49
50
|
handleOpenBusinessDetails(businessState?.business)
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
const getCityName = (id) => {
|
|
54
|
+
const found = citiesList?.find(city => city.id === id)
|
|
55
|
+
return found?.name || ''
|
|
56
|
+
}
|
|
57
|
+
|
|
52
58
|
return (
|
|
53
59
|
<>
|
|
54
60
|
{viewMethod === 'list' && (
|
|
@@ -125,7 +131,7 @@ const SingleBusinessUI = (props) => {
|
|
|
125
131
|
</WrapperImage>
|
|
126
132
|
<InfoBlock>
|
|
127
133
|
<p className='bold'>{businessState?.business?.name}</p>
|
|
128
|
-
<p>{businessState?.business?.
|
|
134
|
+
<p>{getCityName(businessState?.business?.city_id)}</p>
|
|
129
135
|
</InfoBlock>
|
|
130
136
|
</BusinessGeneralInfo>
|
|
131
137
|
</td>
|
|
@@ -201,7 +207,7 @@ const SingleBusinessUI = (props) => {
|
|
|
201
207
|
</BusinessHeader>
|
|
202
208
|
<BusinessContent>
|
|
203
209
|
<h1>{businessState?.business?.name}</h1>
|
|
204
|
-
<p>{businessState?.business?.
|
|
210
|
+
<p>{getCityName(businessState?.business?.city_id)}</p>
|
|
205
211
|
<BusinessActionContainer>
|
|
206
212
|
<span>{t('ID', 'ID')} {businessState?.business?.id}</span>
|
|
207
213
|
<BusinessEnableWrapper className='business_enable_control'>
|
|
@@ -35,7 +35,8 @@ const CustomerDetailsUI = (props) => {
|
|
|
35
35
|
userState,
|
|
36
36
|
handleDeleteUser,
|
|
37
37
|
handleParentSidebarMove,
|
|
38
|
-
handleChangeActiveUser
|
|
38
|
+
handleChangeActiveUser,
|
|
39
|
+
setSideBarWidth
|
|
39
40
|
} = props
|
|
40
41
|
|
|
41
42
|
const history = useHistory()
|
|
@@ -72,7 +73,8 @@ const CustomerDetailsUI = (props) => {
|
|
|
72
73
|
|
|
73
74
|
const handleClickMenu = (key, isInitialRender) => {
|
|
74
75
|
setShowOption(key)
|
|
75
|
-
|
|
76
|
+
setSideBarWidth(isExpand ? width : 1000)
|
|
77
|
+
handleParentSidebarMove(isExpand ? width / 2 : 500)
|
|
76
78
|
setIsOpenMenu(true)
|
|
77
79
|
if (!isInitialRender) {
|
|
78
80
|
const enabled = query.get('enabled')
|
|
@@ -82,6 +84,7 @@ const CustomerDetailsUI = (props) => {
|
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
const handleCloseMenu = () => {
|
|
87
|
+
setSideBarWidth(isExpand ? width : 500)
|
|
85
88
|
handleParentSidebarMove(0)
|
|
86
89
|
setShowOption(null)
|
|
87
90
|
setIsOpenMenu(false)
|
|
@@ -104,10 +107,6 @@ const CustomerDetailsUI = (props) => {
|
|
|
104
107
|
setShowOption(null)
|
|
105
108
|
}, [userState?.user?.id])
|
|
106
109
|
|
|
107
|
-
useEffect(() => {
|
|
108
|
-
if (isOpenMenu) setIsExpand(false)
|
|
109
|
-
}, [isOpenMenu])
|
|
110
|
-
|
|
111
110
|
useEffect(() => {
|
|
112
111
|
if (userState.loading) return
|
|
113
112
|
const section = query.get('section')
|
|
@@ -216,11 +215,10 @@ const CustomerDetailsUI = (props) => {
|
|
|
216
215
|
|
|
217
216
|
{isOpenMenu && (
|
|
218
217
|
<SideBar
|
|
219
|
-
sidebarId='customer_details_menu'
|
|
220
218
|
open={isOpenMenu}
|
|
221
219
|
onClose={() => handleCloseMenu()}
|
|
222
220
|
isBorderShow
|
|
223
|
-
defaultSideBarWidth={500 + menuMoveDistance}
|
|
221
|
+
defaultSideBarWidth={isExpand ? width / 2 : 500 + menuMoveDistance}
|
|
224
222
|
moveDistance={menuMoveDistance}
|
|
225
223
|
>
|
|
226
224
|
{showOption === 'user_details' && (
|
|
@@ -61,6 +61,7 @@ const CustomersListingUI = (props) => {
|
|
|
61
61
|
const [isOpenUserDetails, setIsOpenUserDetails] = useState(false)
|
|
62
62
|
const [openUser, setOpenUser] = useState(null)
|
|
63
63
|
const [openUserAddForm, setOpenUserAddForm] = useState(false)
|
|
64
|
+
const [sideBarWidth, setSideBarWidth] = useState(500)
|
|
64
65
|
const [moveDistance, setMoveDistance] = useState(0)
|
|
65
66
|
|
|
66
67
|
const orderList = [
|
|
@@ -73,6 +74,7 @@ const CustomersListingUI = (props) => {
|
|
|
73
74
|
setIsOpenUserDetails(false)
|
|
74
75
|
setOpenUser(null)
|
|
75
76
|
setQueryId(null)
|
|
77
|
+
setSideBarWidth(500)
|
|
76
78
|
moveDistance && setMoveDistance(0)
|
|
77
79
|
const enabled = selectedUserActiveState ? 'active' : 'inactive'
|
|
78
80
|
history.replace(`${location.pathname}?enabled=${enabled}`)
|
|
@@ -187,7 +189,7 @@ const CustomersListingUI = (props) => {
|
|
|
187
189
|
sidebarId='customer_details'
|
|
188
190
|
open={isOpenUserDetails}
|
|
189
191
|
onClose={() => handleBackRedirect()}
|
|
190
|
-
defaultSideBarWidth={
|
|
192
|
+
defaultSideBarWidth={sideBarWidth}
|
|
191
193
|
moveDistance={moveDistance}
|
|
192
194
|
>
|
|
193
195
|
<CustomerDetails
|
|
@@ -197,6 +199,7 @@ const CustomersListingUI = (props) => {
|
|
|
197
199
|
handleSuccessDeleteUser={handleSuccessDeleteUser}
|
|
198
200
|
onClose={() => handleBackRedirect()}
|
|
199
201
|
handleParentSidebarMove={val => setMoveDistance(val)}
|
|
202
|
+
setSideBarWidth={setSideBarWidth}
|
|
200
203
|
handleChangeActiveUser={handleChangeActiveUser}
|
|
201
204
|
/>
|
|
202
205
|
</SideBar>
|
|
@@ -4,7 +4,7 @@ import { useLanguage, useUtils } from 'ordering-components-admin-external'
|
|
|
4
4
|
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
5
5
|
|
|
6
6
|
import { Envelope, Phone, CheckSquareFill, Square } from 'react-bootstrap-icons'
|
|
7
|
-
import { Switch } from '../../../styles'
|
|
7
|
+
import { Switch, LinkButton } from '../../../styles'
|
|
8
8
|
import { ConfirmAdmin, Pagination, ColumnAllowSettingPopover } from '../../Shared'
|
|
9
9
|
|
|
10
10
|
import {
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
UserTypeWrapper,
|
|
20
20
|
UserEnableWrapper,
|
|
21
21
|
WrapperPagination,
|
|
22
|
-
AddNewUserButton,
|
|
23
22
|
UsersBottomContainer,
|
|
24
23
|
VerifiedItemsContainer,
|
|
25
24
|
VerifiedItem,
|
|
@@ -311,9 +310,9 @@ export const ProfessionalList = (props) => {
|
|
|
311
310
|
</UsersTable>
|
|
312
311
|
</UserTableWrapper>
|
|
313
312
|
<UsersBottomContainer>
|
|
314
|
-
<
|
|
313
|
+
<LinkButton onClick={() => handleOpenUserAddForm()}>
|
|
315
314
|
{t('ADD_NEW_USER', 'Add new user')}
|
|
316
|
-
</
|
|
315
|
+
</LinkButton>
|
|
317
316
|
{usersList?.users.length > 0 && (
|
|
318
317
|
<WrapperPagination>
|
|
319
318
|
<Pagination
|
|
@@ -189,13 +189,6 @@ export const WrapperPagination = styled.div`
|
|
|
189
189
|
align-items: center;
|
|
190
190
|
`
|
|
191
191
|
|
|
192
|
-
export const AddNewUserButton = styled.div`
|
|
193
|
-
cursor: pointer;
|
|
194
|
-
color: ${props => props.theme.colors.primary};
|
|
195
|
-
width: fit-content;
|
|
196
|
-
font-size: 14px;
|
|
197
|
-
`
|
|
198
|
-
|
|
199
192
|
export const UsersBottomContainer = styled.div`
|
|
200
193
|
display: flex;
|
|
201
194
|
flex-wrap: wrap;
|