ordering-ui-admin-external 1.3.2 → 1.3.3

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.
Files changed (67) hide show
  1. package/_bundles/{ordering-ui-admin.6adfe91f3f26eaebf7f8.js → ordering-ui-admin.7b1ded1d480e937548f3.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.6adfe91f3f26eaebf7f8.js.LICENSE.txt → ordering-ui-admin.7b1ded1d480e937548f3.js.LICENSE.txt} +0 -0
  3. package/_modules/components/BusinessIntelligence/Reports/index.js +3 -27
  4. package/_modules/components/BusinessIntelligence/Reports/styles.js +2 -9
  5. package/_modules/components/Loyalty/RewardsPrograms/index.js +12 -38
  6. package/_modules/components/Loyalty/RewardsPrograms/styles.js +6 -13
  7. package/_modules/components/Marketing/CampaignHeader/index.js +2 -5
  8. package/_modules/components/Marketing/CampaignHeader/styles.js +4 -7
  9. package/_modules/components/Marketing/CampaignList/index.js +4 -8
  10. package/_modules/components/Marketing/CampaignList/styles.js +22 -30
  11. package/_modules/components/Marketing/CampaignListing/index.js +3 -29
  12. package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +4 -2
  13. package/_modules/components/Settings/PluginList/index.js +31 -1
  14. package/_modules/components/Settings/SettingsDetail/index.js +3 -40
  15. package/_modules/components/Settings/SettingsDetail/styles.js +13 -26
  16. package/_modules/components/Settings/SettingsList/index.js +6 -43
  17. package/_modules/components/SidebarMenu/index.js +17 -20
  18. package/_modules/components/Stores/BusinessMenu/index.js +5 -36
  19. package/_modules/components/Stores/BusinessMenu/styles.js +19 -27
  20. package/_modules/components/Stores/BusinessPaymentMethods/index.js +16 -53
  21. package/_modules/components/Stores/BusinessProductAddForm/index.js +4 -2
  22. package/_modules/components/Stores/BusinessesListingHeader/index.js +7 -1
  23. package/_modules/components/Stores/ImportersList/index.js +2 -5
  24. package/_modules/components/Stores/ImportersList/styles.js +15 -18
  25. package/_modules/components/Stores/ImportersListing/index.js +4 -31
  26. package/_modules/components/Stores/PaymentOption/index.js +7 -12
  27. package/_modules/components/Stores/PaymentOptionMethods/index.js +4 -9
  28. package/_modules/components/Stores/PaymentOptionPaypal/index.js +4 -9
  29. package/_modules/components/Stores/PaymentOptionSquare/index.js +4 -9
  30. package/_modules/components/Stores/PaymentOptionStripeDirect/index.js +5 -10
  31. package/_modules/components/Stores/PaymentOptionStripeDirect/styles.js +5 -10
  32. package/_modules/components/Stores/PaymethodOptionPaypalExpress/index.js +4 -9
  33. package/_modules/components/Stores/PaymethodOptionStripeConnect/index.js +4 -9
  34. package/_modules/components/Stores/PaymethodOptionStripeRedirect/index.js +4 -9
  35. package/package.json +1 -1
  36. package/src/components/BusinessIntelligence/Reports/index.js +4 -18
  37. package/src/components/BusinessIntelligence/Reports/styles.js +0 -11
  38. package/src/components/Loyalty/RewardsPrograms/index.js +5 -18
  39. package/src/components/Loyalty/RewardsPrograms/styles.js +0 -10
  40. package/src/components/Marketing/CampaignHeader/index.js +2 -3
  41. package/src/components/Marketing/CampaignHeader/styles.js +0 -8
  42. package/src/components/Marketing/CampaignList/index.js +3 -5
  43. package/src/components/Marketing/CampaignList/styles.js +0 -16
  44. package/src/components/Marketing/CampaignListing/index.js +2 -18
  45. package/src/components/OrderingProducts/OrderingProductDetails/index.js +1 -1
  46. package/src/components/Settings/PluginList/index.js +2 -2
  47. package/src/components/Settings/SettingsDetail/index.js +2 -23
  48. package/src/components/Settings/SettingsDetail/styles.js +13 -8
  49. package/src/components/Settings/SettingsList/index.js +1 -24
  50. package/src/components/SidebarMenu/index.js +17 -17
  51. package/src/components/Stores/BusinessMenu/index.js +3 -21
  52. package/src/components/Stores/BusinessMenu/styles.js +0 -15
  53. package/src/components/Stores/BusinessPaymentMethods/index.js +32 -62
  54. package/src/components/Stores/BusinessProductAddForm/index.js +1 -1
  55. package/src/components/Stores/BusinessesListingHeader/index.js +2 -2
  56. package/src/components/Stores/ImportersList/index.js +2 -3
  57. package/src/components/Stores/ImportersList/styles.js +1 -9
  58. package/src/components/Stores/ImportersListing/index.js +0 -19
  59. package/src/components/Stores/PaymentOption/index.js +4 -9
  60. package/src/components/Stores/PaymentOptionMethods/index.js +3 -8
  61. package/src/components/Stores/PaymentOptionPaypal/index.js +3 -8
  62. package/src/components/Stores/PaymentOptionSquare/index.js +3 -8
  63. package/src/components/Stores/PaymentOptionStripeDirect/index.js +3 -8
  64. package/src/components/Stores/PaymentOptionStripeDirect/styles.js +0 -8
  65. package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +3 -8
  66. package/src/components/Stores/PaymethodOptionStripeConnect/index.js +3 -8
  67. package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +3 -8
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
2
2
  import { XLg, LifePreserver } from 'react-bootstrap-icons'
3
3
  import Skeleton from 'react-loading-skeleton'
4
4
  import { useWindowSize } from '../../../hooks/useWindowSize'
5
- import { useLanguage, useConfig, useSession } from 'ordering-components-admin-external'
5
+ import { useLanguage } from 'ordering-components-admin-external'
6
6
  import { IconButton } from '../../../styles'
7
7
  import { Modal, NotFoundSource } from '../../Shared'
8
8
  import MdcPlayCircle from '@meronex/icons/mdc/MdcPlayCircle'
@@ -10,7 +10,6 @@ import BsArrowRight from '@meronex/icons/bs/BsArrowRight'
10
10
  import { EmailSetting } from '../EmailSetting'
11
11
  import { NotificationSetting } from '../NotificationSetting'
12
12
  import { SettingsList } from '../SettingsList'
13
- import { DisabledFeatureAlert } from '../../DisabledFeatureAlert'
14
13
  import {
15
14
  Container,
16
15
  DescriptionContent,
@@ -43,9 +42,6 @@ export const SettingsDetail = (props) => {
43
42
  const [isMenuOpen, setIsMenuOpen] = useState(false)
44
43
  const [extraInfoOpen, setExtraInfoOpen] = useState(false)
45
44
  const [extraSubCatOpen, setExtraSubCatOpen] = useState(false)
46
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
47
- const [{ configs }] = useConfig()
48
- const [{ user }] = useSession()
49
45
  const actionSidebar = (value) => {
50
46
  setIsMenuOpen(value)
51
47
 
@@ -132,22 +128,6 @@ export const SettingsDetail = (props) => {
132
128
  return () => document.removeEventListener('keydown', onCloseSidebar)
133
129
  }, [open])
134
130
 
135
- useEffect(() => {
136
- if (configs && Object.keys(configs).length > 0 && user && category) {
137
- const featureList = { wallet: 'cash_wallet' }
138
-
139
- if (Object.keys(featureList).every(feature => feature !== category?.key)) {
140
- setIsDisabledFeature(false)
141
- return
142
- }
143
- if (!Object.keys(configs).includes(featureList[category?.key]) && user?.level === 0) {
144
- setIsDisabledFeature(true)
145
- return
146
- }
147
- setIsDisabledFeature(false)
148
- }
149
- }, [configs, category])
150
-
151
131
  return (
152
132
  <Container
153
133
  id='catDescription'
@@ -197,14 +177,13 @@ export const SettingsDetail = (props) => {
197
177
  </video>
198
178
  </VideoContainer>
199
179
  )}
200
- <AllSetting onClick={() => !isDisabledFeature && handleExtraOpen(false)} isDisabledFeature={isDisabledFeature}>
180
+ <AllSetting onClick={() => handleExtraOpen(false)}>
201
181
  <span>{t('SETTINGS', 'All settings')}</span>
202
182
  <BsArrowRight />
203
183
  </AllSetting>
204
184
  </Content>
205
185
  )}
206
186
  </DescriptionContent>
207
- {isDisabledFeature && (<DisabledFeatureAlert />)}
208
187
  {extraInfoOpen && category.support_url && (
209
188
  <>
210
189
  {width >= 1000 ? (
@@ -141,21 +141,26 @@ export const AllSetting = styled.div`
141
141
  user-select: none;
142
142
  cursor: pointer;
143
143
  margin-top: 36px;
144
- ${({ isDisabledFeature }) => css`
145
- cursor: ${props => isDisabledFeature ? 'not-allowed' : 'pointer'};
146
- `}
144
+ cursor: pointer;
147
145
  span {
148
146
  font-weight: 600;
149
147
  font-size: 14px;
150
- ${({ isDisabledFeature }) => css`
151
- color: ${props => isDisabledFeature ? props.theme.colors?.disabled : '#03459E'};
152
- `}
148
+ color: ${props => props.theme.colors.primary};
153
149
  }
154
150
  svg {
155
- ${({ isDisabledFeature }) => css`
156
- color: ${props => isDisabledFeature ? props.theme.colors?.disabled : '#03459E'};
151
+ color: ${props => props.theme.colors.primary};
152
+ margin-left: 5px;
153
+ transition: 0.2s linear;
154
+ ${props => props.theme.rtl && css`
155
+ margin-right: 5px;
156
+ margin-left: 0px;
157
157
  `}
158
158
  }
159
+ &:hover {
160
+ svg {
161
+ transform: translateX(3px);
162
+ }
163
+ }
159
164
  `
160
165
 
161
166
  export const MoreInfo = styled.span`
@@ -1,12 +1,11 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import { useLanguage, useConfig, useSession, SettingsList as SettingsListController } from 'ordering-components-admin-external'
2
+ import { useLanguage, SettingsList as SettingsListController } from 'ordering-components-admin-external'
3
3
  import Skeleton from 'react-loading-skeleton'
4
4
  import { Alert, NotFoundSource } from '../../Shared'
5
5
  import { Button } from '../../../styles'
6
6
  import { SettingsSelectUI } from '../SettingsSelectUI'
7
7
  import { SettingsCountryFilter } from '../SettingsCountryFilter'
8
8
  import { SettingsImage } from '../SettingsImage'
9
- import { DisabledFeatureAlert } from '../../DisabledFeatureAlert'
10
9
  import {
11
10
  SettingsListContainer,
12
11
  GeneralContainer,
@@ -26,7 +25,6 @@ export const SettingsListUI = (props) => {
26
25
  const {
27
26
  settingsState,
28
27
  configs,
29
- category,
30
28
  formState,
31
29
  onCloseSettingsList,
32
30
  handleCheckBoxChange,
@@ -36,11 +34,7 @@ export const SettingsListUI = (props) => {
36
34
  } = props
37
35
 
38
36
  const [, t] = useLanguage()
39
- const [configState] = useConfig()
40
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
41
37
  const [alertState, setAlertState] = useState({ open: false, content: [] })
42
- const [{ user }] = useSession()
43
- const featureName = 'advanced_logistics'
44
38
  const closeAlert = () => {
45
39
  setAlertState({
46
40
  open: false,
@@ -103,21 +97,6 @@ export const SettingsListUI = (props) => {
103
97
  }
104
98
  }, [settingsState?.result])
105
99
 
106
- useEffect(() => {
107
- if (category?.key === 'autoassign' && !configState?.loading &&
108
- Object.keys(configState?.configs).length > 0 && !formState?.loading &&
109
- formState?.finalResult.length > 0 && user) {
110
- const autoassignType = formState?.changes?.find(change => change?.key === 'autoassign_type')?.value ||
111
- formState?.finalResult?.find(re => re?.key === 'autoassign_type')?.value
112
- if (!Object.keys(configState?.configs).includes(featureName) &&
113
- user?.level === 0 && autoassignType === 'enterprise') {
114
- setIsDisabledFeature(true)
115
- return
116
- }
117
- setIsDisabledFeature(false)
118
- }
119
- }, [configState, formState])
120
-
121
100
  return (
122
101
  <>
123
102
  <SettingsListContainer>
@@ -280,14 +259,12 @@ export const SettingsListUI = (props) => {
280
259
  )
281
260
  }
282
261
  </SettingsListContainer>
283
- {isDisabledFeature && (<DisabledFeatureAlert />)}
284
262
  {
285
263
  settingsState?.changes?.length > 0 && (
286
264
  <SubmitBtnWrapper>
287
265
  <Button
288
266
  color='primary'
289
267
  onClick={handleSubmit}
290
- disabled={isDisabledFeature}
291
268
  >
292
269
  {t('SAVE', 'Save')}
293
270
  </Button>
@@ -64,12 +64,12 @@ export const SidebarMenu = (props) => {
64
64
  id: 3,
65
65
  title: t('DRIVERS_DASHBOARD', 'Drivers Dashboard'),
66
66
  pageName: 'drivers'
67
+ },
68
+ {
69
+ id: 4,
70
+ title: t('APPOINTMENTS', 'Appointments'),
71
+ pageName: 'appointments'
67
72
  }
68
- // {
69
- // id: 4,
70
- // title: t('APPOINTMENTS', 'Appointments'),
71
- // pageName: 'appointments'
72
- // }
73
73
  ]
74
74
 
75
75
  const loyaltySubMenus = [
@@ -141,13 +141,13 @@ export const SidebarMenu = (props) => {
141
141
  title: t('MANAGERS', 'Managers'),
142
142
  pageName: 'managers',
143
143
  url: '/users/managers'
144
+ },
145
+ {
146
+ id: 3,
147
+ title: t('PROFESSIONALS', 'Professionals'),
148
+ pageName: 'professionals',
149
+ url: '/users/professionals'
144
150
  }
145
- // {
146
- // id: 3,
147
- // title: t('PROFESSIONALS', 'Professionals'),
148
- // pageName: 'professionals',
149
- // url: '/users/professionals'
150
- // }
151
151
  ]
152
152
 
153
153
  const settingsSubMenus = [
@@ -272,13 +272,13 @@ export const SidebarMenu = (props) => {
272
272
  title: t('PROMOTIONS_ENTERPRISE', 'Promotions enterprise'),
273
273
  pageName: 'enterprise_promotions',
274
274
  url: '/marketing/promotions-enterprise'
275
+ },
276
+ {
277
+ id: 2,
278
+ title: t('CAMPAIGN', 'Campaign'),
279
+ pageName: 'campaign',
280
+ url: '/marketing/campaign'
275
281
  }
276
- // {
277
- // id: 2,
278
- // title: t('CAMPAIGN', 'Campaign'),
279
- // pageName: 'campaign',
280
- // url: '/marketing/campaign'
281
- // }
282
282
  ]
283
283
 
284
284
  const downloadsSubMenus = [
@@ -1,11 +1,10 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import { useLanguage, useConfig, useSession, BusinessMenu as BusinessMenuController } from 'ordering-components-admin-external'
2
+ import { useLanguage, BusinessMenu as BusinessMenuController } from 'ordering-components-admin-external'
3
3
  import { BusinessMenuOptions } from '../BusinessMenuOptions'
4
4
  import { Confirm, Modal, SearchBar } from '../../Shared'
5
5
  import { useWindowSize } from '../../../hooks/useWindowSize'
6
6
  import { Button, Checkbox } from '../../../styles'
7
7
  import { ChevronRight } from 'react-bootstrap-icons'
8
- import { DisabledFeatureAlert } from '../../DisabledFeatureAlert'
9
8
 
10
9
  import {
11
10
  MainContainer,
@@ -33,8 +32,6 @@ const BusinessMenuUI = (props) => {
33
32
  sitesState
34
33
  } = props
35
34
  const [, t] = useLanguage()
36
- const [{ configs }] = useConfig()
37
- const [{ user }] = useSession()
38
35
  const { width } = useWindowSize()
39
36
 
40
37
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
@@ -43,8 +40,6 @@ const BusinessMenuUI = (props) => {
43
40
  const [isOpenSharedProduct, setIsOpenSharedProduct] = useState(false)
44
41
  const [searchValue, setSearchValue] = useState('')
45
42
  const [menuList, setMenuList] = useState([])
46
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
47
- const featureName = 'shared_menus'
48
43
 
49
44
  const handleOpenOptions = (name, menu) => {
50
45
  setCurrentMenu(menu)
@@ -71,16 +66,6 @@ const BusinessMenuUI = (props) => {
71
66
  setMenuList(filteredMenus)
72
67
  }, [JSON.stringify(businessMenusState.menus), JSON.stringify(businessMenusState.menusShared), searchValue, isSelectedSharedMenus])
73
68
 
74
- useEffect(() => {
75
- if (configs && Object.keys(configs).length > 0 && user) {
76
- if (!Object.keys(configs).includes(featureName) && user?.level === 0 && isSelectedSharedMenus) {
77
- setIsDisabledFeature(true)
78
- return
79
- }
80
- setIsDisabledFeature(false)
81
- }
82
- }, [configs, isSelectedSharedMenus])
83
-
84
69
  return (
85
70
  <MainContainer>
86
71
  <MenuContainer isHide={isOpenSharedProduct}>
@@ -90,7 +75,6 @@ const BusinessMenuUI = (props) => {
90
75
  borderRadius='8px'
91
76
  color='lightPrimary'
92
77
  onClick={() => handleOpenOptions('option', {})}
93
- disabled={isDisabledFeature}
94
78
  >
95
79
  {t('ADD_MENU', 'Add menu')}
96
80
  </Button>
@@ -116,7 +100,7 @@ const BusinessMenuUI = (props) => {
116
100
  {t('SHARED_MENUS', 'Shared menus')}
117
101
  </Tab>
118
102
  </TabsContainer>
119
- <SearchBarWrapper isDisabledFeature={isDisabledFeature}>
103
+ <SearchBarWrapper>
120
104
  <SearchBar
121
105
  isCustomLayout
122
106
  lazyLoad
@@ -145,8 +129,7 @@ const BusinessMenuUI = (props) => {
145
129
  key={menu.id}
146
130
  isBorderTop={index === 0}
147
131
  active={menu.id === currentMenu?.id}
148
- onClick={(e) => !isDisabledFeature && handleOpenEdit(e, menu)}
149
- isDisabledFeature={isDisabledFeature}
132
+ onClick={(e) => handleOpenEdit(e, menu)}
150
133
  >
151
134
  <CheckboxWrapper
152
135
  className='business_checkbox_control'
@@ -168,7 +151,6 @@ const BusinessMenuUI = (props) => {
168
151
  </AddMenuButton>
169
152
  )}
170
153
  </MenuContainer>
171
- {isDisabledFeature && (<DisabledFeatureAlert />)}
172
154
  {width >= 1000 ? (
173
155
  <>
174
156
  {showOption === 'option' && (
@@ -73,14 +73,6 @@ export const MeunItem = styled.div`
73
73
  margin: 0 3px;
74
74
  font-size: 13px;
75
75
  }
76
-
77
- ${({ isDisabledFeature }) => isDisabledFeature && css`
78
- cursor: not-allowed;
79
- opacity: 0.4;
80
- &:hover {
81
- background-color: ${props => props.theme.colors.white};
82
- }
83
- `}
84
76
  `
85
77
 
86
78
  export const MenuName = styled.span`
@@ -140,13 +132,6 @@ export const Tab = styled.div`
140
132
 
141
133
  export const SearchBarWrapper = styled.div`
142
134
  margin-bottom: 15px;
143
- ${({ isDisabledFeature }) => isDisabledFeature && css`
144
- cursor: not-allowed;
145
- > div {
146
- pointer-events: none;
147
- opacity: 0.4;
148
- }
149
- `}
150
135
  `
151
136
  export const SelectButtonGroup = styled.div`
152
137
  display: flex;
@@ -3,7 +3,6 @@ import Skeleton from 'react-loading-skeleton'
3
3
  import {
4
4
  useLanguage,
5
5
  useConfig,
6
- useSession,
7
6
  BusinessPaymethods as BusinessPaymentMethodsController
8
7
  } from 'ordering-components-admin-external'
9
8
  import RiCheckboxBlankLine from '@meronex/icons/ri/RiCheckboxBlankLine'
@@ -67,7 +66,6 @@ const BusinessPaymentMethodsUI = (props) => {
67
66
 
68
67
  const [, t] = useLanguage()
69
68
  const [{ configs }] = useConfig()
70
- const [{ user }] = useSession()
71
69
  const { width } = useWindowSize()
72
70
  const [isEdit, setIsEdit] = useState(false)
73
71
  const [selectedBusinessPaymethod, setSelectedBusinessPaymethod] = useState(null)
@@ -75,8 +73,6 @@ const BusinessPaymentMethodsUI = (props) => {
75
73
  const [searchValue, setSearchValue] = useState('')
76
74
  const [alertState, setAlertState] = useState({ open: false, content: [] })
77
75
  const [isOpenWalletDetails, setIsOpenWalletDetails] = useState(false)
78
- const featureName = 'payments_advanced'
79
- const [isDisabledFeature, setIsDisabledFeature] = useState(false)
80
76
  const isWalletCashEnabled = configs?.wallet_enabled?.value === '1'
81
77
 
82
78
  const orderTypes = [
@@ -157,16 +153,6 @@ const BusinessPaymentMethodsUI = (props) => {
157
153
  setSelectedBusinessPaymethod(updatedPaymethod)
158
154
  }, [businessPaymethodsState?.paymethods, selectedBusinessPaymethod])
159
155
 
160
- useEffect(() => {
161
- if (configs && Object.keys(configs).length > 0 && user) {
162
- if (!Object.keys(configs).includes(featureName) && user?.level === 0) {
163
- setIsDisabledFeature(true)
164
- return
165
- }
166
- setIsDisabledFeature(false)
167
- }
168
- }, [configs])
169
-
170
156
  return (
171
157
  <MainContainer>
172
158
  <PaymentMethodsContainer isOpenWalletDetails={isOpenWalletDetails}>
@@ -267,23 +253,22 @@ const BusinessPaymentMethodsUI = (props) => {
267
253
  'square',
268
254
  ...methodsPay
269
255
  ].includes(selectedPaymethodGateway) && (
270
- <PaymentOption
271
- sitesState={sitesState}
272
- open={isEdit}
273
- onClose={() => handleCloseEdit()}
274
- businessPaymethod={selectedBusinessPaymethod}
275
- changesState={changesState}
276
- orderTypes={orderTypes}
277
- handleChangeBusinessPaymentState={handleChangeBusinessPaymentState}
278
- cleanChangesState={cleanChangesState}
279
- actionState={actionState}
280
- handleChangeSandbox={handleChangeSandbox}
281
- handleChangeInput={handleChangeInput}
282
- handleSaveClick={handleSaveClick}
283
- handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
284
- isDisabledFeature={isDisabledFeature}
285
- />
286
- )}
256
+ <PaymentOption
257
+ sitesState={sitesState}
258
+ open={isEdit}
259
+ onClose={() => handleCloseEdit()}
260
+ businessPaymethod={selectedBusinessPaymethod}
261
+ changesState={changesState}
262
+ orderTypes={orderTypes}
263
+ handleChangeBusinessPaymentState={handleChangeBusinessPaymentState}
264
+ cleanChangesState={cleanChangesState}
265
+ actionState={actionState}
266
+ handleChangeSandbox={handleChangeSandbox}
267
+ handleChangeInput={handleChangeInput}
268
+ handleSaveClick={handleSaveClick}
269
+ handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
270
+ />
271
+ )}
287
272
  {selectedPaymethodGateway === 'apple_pay' && (
288
273
  <PaymentOptionMethods
289
274
  sitesState={sitesState}
@@ -301,7 +286,6 @@ const BusinessPaymentMethodsUI = (props) => {
301
286
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
302
287
  id={selectedPaymethodGateway}
303
288
  title='Apple pay'
304
- isDisabledFeature={isDisabledFeature}
305
289
  />
306
290
  )}
307
291
  {selectedPaymethodGateway === 'google_pay' && (
@@ -321,7 +305,6 @@ const BusinessPaymentMethodsUI = (props) => {
321
305
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
322
306
  id={selectedPaymethodGateway}
323
307
  title='Google pay'
324
- isDisabledFeature={isDisabledFeature}
325
308
  />
326
309
  )}
327
310
  {selectedPaymethodGateway === 'stripe_direct' && (
@@ -339,7 +322,6 @@ const BusinessPaymentMethodsUI = (props) => {
339
322
  handleChangeInput={handleChangeInput}
340
323
  handleSaveClick={handleSaveClick}
341
324
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
342
- isDisabledFeature={isDisabledFeature}
343
325
  />
344
326
  )}
345
327
  {selectedPaymethodGateway === 'paypal' && (
@@ -357,7 +339,6 @@ const BusinessPaymentMethodsUI = (props) => {
357
339
  handleChangeInput={handleChangeInput}
358
340
  handleSaveClick={handleSaveClick}
359
341
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
360
- isDisabledFeature={isDisabledFeature}
361
342
  />
362
343
  )}
363
344
  {selectedPaymethodGateway === 'paypal_express' && (
@@ -375,7 +356,6 @@ const BusinessPaymentMethodsUI = (props) => {
375
356
  handleChangeInput={handleChangeInput}
376
357
  handleSaveClick={handleSaveClick}
377
358
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
378
- isDisabledFeature={isDisabledFeature}
379
359
  />
380
360
  )}
381
361
  {selectedPaymethodGateway === 'stripe_redirect' && (
@@ -393,7 +373,6 @@ const BusinessPaymentMethodsUI = (props) => {
393
373
  handleChangeInput={handleChangeInput}
394
374
  handleSaveClick={handleSaveClick}
395
375
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
396
- isDisabledFeature={isDisabledFeature}
397
376
  />
398
377
  )}
399
378
  {selectedPaymethodGateway === 'stripe_connect' && (
@@ -411,7 +390,6 @@ const BusinessPaymentMethodsUI = (props) => {
411
390
  handleChangeStripeInput={handleChangeStripeInput}
412
391
  handleStripeSave={handleStripeSave}
413
392
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
414
- isDisabledFeature={isDisabledFeature}
415
393
  />
416
394
  )}
417
395
  {selectedPaymethodGateway === 'square' && (
@@ -427,7 +405,6 @@ const BusinessPaymentMethodsUI = (props) => {
427
405
  handleChangeBusinessPaymentState={handleChangeBusinessPaymentState}
428
406
  businessPaymethods={businessPaymethodsState?.paymethods}
429
407
  handleSuccessPaymethodUpdate={handleSuccessPaymethodUpdate}
430
- isDisabledFeature={isDisabledFeature}
431
408
  />
432
409
  )}
433
410
  </>
@@ -448,23 +425,22 @@ const BusinessPaymentMethodsUI = (props) => {
448
425
  'stripe_redirect',
449
426
  'stripe_connect'
450
427
  ].includes(selectedPaymethodGateway) && (
451
- <PaymentOption
452
- sitesState={sitesState}
453
- open={isEdit}
454
- onClose={() => handleCloseEdit()}
455
- businessPaymethod={selectedBusinessPaymethod}
456
- changesState={changesState}
457
- orderTypes={orderTypes}
458
- handleChangeBusinessPaymentState={handleChangeBusinessPaymentState}
459
- cleanChangesState={cleanChangesState}
460
- actionState={actionState}
461
- handleChangeSandbox={handleChangeSandbox}
462
- handleChangeInput={handleChangeInput}
463
- handleSaveClick={handleSaveClick}
464
- handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
465
- isDisabledFeature={isDisabledFeature}
466
- />
467
- )}
428
+ <PaymentOption
429
+ sitesState={sitesState}
430
+ open={isEdit}
431
+ onClose={() => handleCloseEdit()}
432
+ businessPaymethod={selectedBusinessPaymethod}
433
+ changesState={changesState}
434
+ orderTypes={orderTypes}
435
+ handleChangeBusinessPaymentState={handleChangeBusinessPaymentState}
436
+ cleanChangesState={cleanChangesState}
437
+ actionState={actionState}
438
+ handleChangeSandbox={handleChangeSandbox}
439
+ handleChangeInput={handleChangeInput}
440
+ handleSaveClick={handleSaveClick}
441
+ handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
442
+ />
443
+ )}
468
444
  {selectedPaymethodGateway === 'stripe_direct' && (
469
445
  <PaymentOptionStripeDirect
470
446
  sitesState={sitesState}
@@ -480,7 +456,6 @@ const BusinessPaymentMethodsUI = (props) => {
480
456
  handleChangeInput={handleChangeInput}
481
457
  handleSaveClick={handleSaveClick}
482
458
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
483
- isDisabledFeature={isDisabledFeature}
484
459
  />
485
460
  )}
486
461
  {selectedPaymethodGateway === 'paypal' && (
@@ -498,7 +473,6 @@ const BusinessPaymentMethodsUI = (props) => {
498
473
  handleChangeInput={handleChangeInput}
499
474
  handleSaveClick={handleSaveClick}
500
475
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
501
- isDisabledFeature={isDisabledFeature}
502
476
  />
503
477
  )}
504
478
  {selectedPaymethodGateway === 'paypal_express' && (
@@ -516,7 +490,6 @@ const BusinessPaymentMethodsUI = (props) => {
516
490
  handleChangeInput={handleChangeInput}
517
491
  handleSaveClick={handleSaveClick}
518
492
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
519
- isDisabledFeature={isDisabledFeature}
520
493
  />
521
494
  )}
522
495
  {selectedPaymethodGateway === 'stripe_redirect' && (
@@ -534,7 +507,6 @@ const BusinessPaymentMethodsUI = (props) => {
534
507
  handleChangeInput={handleChangeInput}
535
508
  handleSaveClick={handleSaveClick}
536
509
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
537
- isDisabledFeature={isDisabledFeature}
538
510
  />
539
511
  )}
540
512
  {selectedPaymethodGateway === 'stripe_connect' && (
@@ -553,7 +525,6 @@ const BusinessPaymentMethodsUI = (props) => {
553
525
  handleChangeStripeInput={handleChangeStripeInput}
554
526
  handleStripeSave={handleStripeSave}
555
527
  handleDeletePaymethod={handleDeleteBusinessPaymethodOption}
556
- isDisabledFeature={isDisabledFeature}
557
528
  />
558
529
  )}
559
530
  {selectedPaymethodGateway === 'square' && (
@@ -569,7 +540,6 @@ const BusinessPaymentMethodsUI = (props) => {
569
540
  handleChangeBusinessPaymentState={handleChangeBusinessPaymentState}
570
541
  businessPaymethods={businessPaymethodsState?.paymethods}
571
542
  handleSuccessPaymethodUpdate={handleSuccessPaymethodUpdate}
572
- isDisabledFeature={isDisabledFeature}
573
543
  />
574
544
  )}
575
545
  </Modal>
@@ -52,7 +52,7 @@ const BusinessProductAddFormUI = (props) => {
52
52
 
53
53
  const typeList = [
54
54
  { value: 'item', content: <Option>{t('ITEM', 'Item')}</Option> },
55
- // { value: 'service', content: <Option>{t('SERVICE', 'Service')}</Option> }
55
+ { value: 'service', content: <Option>{t('SERVICE', 'Service')}</Option> }
56
56
  ]
57
57
 
58
58
  const durationList = [
@@ -73,13 +73,13 @@ export const BusinessesListingHeader = (props) => {
73
73
  >
74
74
  {t('ADD_NEW_STORE', 'Add new store')}
75
75
  </Button>
76
- {/* <Button
76
+ <Button
77
77
  color='lightPrimary'
78
78
  borderRadius='8px'
79
79
  onClick={() => handleOpenSync()}
80
80
  >
81
81
  {t('SYNC', 'Sync')}
82
- </Button> */}
82
+ </Button>
83
83
  <SearchBar
84
84
  isCustomLayout
85
85
  lazyLoad
@@ -27,8 +27,7 @@ export const ImportersList = (props) => {
27
27
  handleDeleteImporter,
28
28
  selectedImporter,
29
29
  setSelectedImporter,
30
- handleEditImporter,
31
- isDisabledFeature
30
+ handleEditImporter
32
31
  } = props
33
32
  const [, t] = useLanguage()
34
33
  const theme = useTheme()
@@ -47,7 +46,7 @@ export const ImportersList = (props) => {
47
46
  }
48
47
 
49
48
  return (
50
- <ImportListContainer isDisabledFeature={isDisabledFeature}>
49
+ <ImportListContainer>
51
50
  <ImportersTableWrapper>
52
51
  <ImpotersTable>
53
52
  <thead>
@@ -1,15 +1,7 @@
1
1
  import styled, { css } from 'styled-components'
2
2
  import { darken } from 'polished'
3
3
 
4
- export const ImportListContainer = styled.div`
5
- ${({ isDisabledFeature }) => isDisabledFeature && css`
6
- cursor: not-allowed;
7
- opacity: 0.5;
8
- > div {
9
- pointer-events: none;
10
- }
11
- `}
12
- `
4
+ export const ImportListContainer = styled.div``
13
5
  export const ImportersTableWrapper = styled.div`
14
6
  `
15
7