ordering-ui-admin-external 1.8.5 → 1.10.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.
Files changed (158) hide show
  1. package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js → ordering-ui-admin.e741ec718656ba6908ef.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js.LICENSE.txt → ordering-ui-admin.e741ec718656ba6908ef.js.LICENSE.txt} +0 -0
  3. package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +2 -1
  4. package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +2 -1
  5. package/_modules/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +23 -5
  6. package/_modules/components/Delivery/DriversGroupDetails/index.js +6 -9
  7. package/_modules/components/Delivery/UsersList/index.js +2 -1
  8. package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
  9. package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +2 -1
  10. package/_modules/components/Orders/OrderBill/index.js +17 -17
  11. package/_modules/components/Profile/ProfilePage/index.js +3 -1
  12. package/_modules/components/Profile/ProfilePage/styles.js +23 -6
  13. package/_modules/components/Settings/Deliverect/index.js +103 -0
  14. package/_modules/components/Settings/Deliverect/styles.js +115 -0
  15. package/_modules/components/Settings/DoordashConnect/index.js +1 -1
  16. package/_modules/components/Settings/IntegrationListing/index.js +41 -2
  17. package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
  18. package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
  19. package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
  20. package/_modules/components/Settings/PickerExpress/index.js +178 -0
  21. package/_modules/components/Settings/PickerExpress/styles.js +111 -0
  22. package/_modules/components/Settings/index.js +8 -1
  23. package/_modules/components/Shared/Modal/styles.js +1 -1
  24. package/_modules/components/SidebarMenu/index.js +14 -1
  25. package/_modules/components/SidebarMenu/styles.js +9 -3
  26. package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
  27. package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
  28. package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
  29. package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
  30. package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
  31. package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
  32. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
  33. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
  34. package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
  35. package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
  36. package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
  37. package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
  38. package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
  39. package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
  40. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
  41. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
  42. package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
  43. package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  44. package/_modules/components/Stores/BusinessAdd/index.js +170 -0
  45. package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
  46. package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
  47. package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
  48. package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
  49. package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
  50. package/_modules/components/Stores/BusinessProductAddForm/index.js +5 -5
  51. package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
  52. package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
  53. package/_modules/components/Stores/BusinessesList/index.js +5 -3
  54. package/_modules/components/Stores/BusinessesListing/index.js +51 -26
  55. package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
  56. package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
  57. package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
  58. package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
  59. package/_modules/components/Stores/ProductStep/index.js +92 -0
  60. package/_modules/components/Stores/ProductStep/styles.js +18 -0
  61. package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
  62. package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
  63. package/_modules/components/Stores/index.js +36 -1
  64. package/_modules/components/Users/ProfessionalAddForm/index.js +16 -3
  65. package/_modules/components/Users/ProfessionalList/index.js +2 -1
  66. package/_modules/components/Users/ProfessionalListing/index.js +2 -0
  67. package/_modules/components/Users/ProfessionalSchedule/Schedule/index.js +36 -0
  68. package/_modules/components/Users/ProfessionalSchedule/index.js +10 -120
  69. package/_modules/components/Users/ProfessionalSchedule/styles.js +4 -16
  70. package/_modules/components/Users/UserFormDetails/index.js +1 -1
  71. package/_modules/components/Users/UsersList/index.js +5 -4
  72. package/_modules/components/Users/UsersListingHeader/index.js +5 -2
  73. package/_modules/components/Users/UsersListingHeader/styles.js +18 -3
  74. package/_modules/index.js +36 -0
  75. package/index-template.js +64 -2
  76. package/package.json +2 -2
  77. package/src/components/BusinessIntelligence/BusinessReviewList/index.js +1 -0
  78. package/src/components/BusinessIntelligence/UsersReviewList/index.js +1 -0
  79. package/src/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +20 -0
  80. package/src/components/Delivery/DriversGroupDetails/index.js +7 -7
  81. package/src/components/Delivery/DriversGroupsDeliveryZoneDetails/index.js +1 -1
  82. package/src/components/Delivery/UsersList/index.js +1 -0
  83. package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
  84. package/src/components/OrderingProducts/OrderingProductsListing/index.js +1 -0
  85. package/src/components/Orders/OrderBill/index.js +20 -22
  86. package/src/components/Profile/ProfilePage/index.js +16 -2
  87. package/src/components/Profile/ProfilePage/styles.js +67 -1
  88. package/src/components/Settings/Deliverect/index.js +149 -0
  89. package/src/components/Settings/Deliverect/styles.js +344 -0
  90. package/src/components/Settings/DoordashConnect/index.js +1 -1
  91. package/src/components/Settings/IntegrationListing/index.js +47 -13
  92. package/src/components/Settings/IntegrationListing/styles.js +7 -1
  93. package/src/components/Settings/ItsaCheckmate/index.js +170 -0
  94. package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
  95. package/src/components/Settings/PickerExpress/index.js +222 -0
  96. package/src/components/Settings/PickerExpress/styles.js +330 -0
  97. package/src/components/Settings/index.js +3 -1
  98. package/src/components/Shared/Modal/styles.js +1 -1
  99. package/src/components/SidebarMenu/index.js +21 -3
  100. package/src/components/SidebarMenu/styles.js +26 -0
  101. package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
  102. package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
  103. package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
  104. package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
  105. package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
  106. package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
  107. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
  108. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
  109. package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
  110. package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
  111. package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
  112. package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
  113. package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
  114. package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
  115. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
  116. package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
  117. package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
  118. package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  119. package/src/components/Stores/BusinessAdd/index.js +184 -0
  120. package/src/components/Stores/BusinessAdd/styles.js +85 -0
  121. package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
  122. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
  123. package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
  124. package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
  125. package/src/components/Stores/BusinessProductAddForm/index.js +13 -11
  126. package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
  127. package/src/components/Stores/BusinessProductsListing/index.js +20 -0
  128. package/src/components/Stores/BusinessesList/index.js +4 -2
  129. package/src/components/Stores/BusinessesListing/index.js +101 -67
  130. package/src/components/Stores/BusinessesListing/styles.js +36 -0
  131. package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
  132. package/src/components/Stores/ProductStartGuide/index.js +60 -0
  133. package/src/components/Stores/ProductStartGuide/styles.js +62 -0
  134. package/src/components/Stores/ProductStep/index.js +84 -0
  135. package/src/components/Stores/ProductStep/styles.js +29 -0
  136. package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
  137. package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
  138. package/src/components/Stores/index.js +11 -1
  139. package/src/components/Users/ProfessionalAddForm/index.js +11 -1
  140. package/src/components/Users/ProfessionalList/index.js +1 -0
  141. package/src/components/Users/ProfessionalListing/index.js +2 -0
  142. package/src/components/Users/ProfessionalSchedule/Schedule/index.js +32 -0
  143. package/src/components/Users/ProfessionalSchedule/index.js +9 -49
  144. package/src/components/Users/ProfessionalSchedule/styles.js +0 -49
  145. package/src/components/Users/UserFormDetails/index.js +1 -1
  146. package/src/components/Users/UsersList/index.js +4 -2
  147. package/src/components/Users/UsersListingHeader/index.js +17 -2
  148. package/src/components/Users/UsersListingHeader/styles.js +59 -0
  149. package/src/index.js +14 -2
  150. package/template/app.js +4 -0
  151. package/template/assets/images/dummies/no-businesses.png +0 -0
  152. package/template/assets/images/import-menu.png +0 -0
  153. package/template/assets/images/imported-menu.png +0 -0
  154. package/template/assets/images/picker-express.png +0 -0
  155. package/template/components/ListenPageChanges/index.js +1 -0
  156. package/template/config.json +1 -1
  157. package/template/helmetdata.json +7 -0
  158. package/template/pages/BusinessAdd/index.js +11 -0
@@ -0,0 +1,184 @@
1
+ import React, { useState, useEffect, useCallback } from 'react'
2
+ import { BusinessDetails } from './BusinessDetails'
3
+ import { useLanguage, useOrder, useEvent, BusinessAdd as BusinessAddController } from 'ordering-components-admin-external'
4
+ import { List as MenuIcon } from 'react-bootstrap-icons'
5
+ import { Images } from './Images'
6
+ import { Schedule } from './Schedule'
7
+ import { Photos } from './Photos'
8
+ import { OrderTypePriceLevel } from './OrderTypePriceLevel'
9
+ import { PaymentMethods } from './PaymentMethods'
10
+ import { ReceiveOrders } from './ReceiveOrders'
11
+ import { useInfoShare } from '../../../contexts/InfoShareContext'
12
+ import { Button, IconButton } from '../../../styles'
13
+ import { DeliveryZone } from './DeliveryZone'
14
+ import { useHistory } from 'react-router-dom'
15
+ import { Alert } from '../../Shared'
16
+ import {
17
+ AddNewBusinessContainer,
18
+ BoxLayout,
19
+ ButtonWrapper,
20
+ HeaderTitleContainer
21
+ } from './styles'
22
+
23
+ const BusinessAddUI = (props) => {
24
+ const {
25
+ formState,
26
+ handleChangeAddress,
27
+ handleChangeInput,
28
+ handleChangeCenter,
29
+ handleChangeSwtich,
30
+ handleChangeGallery,
31
+ changeFormState,
32
+ paymethodsList,
33
+ handleAddBusiness,
34
+ kmlData,
35
+ handleUploadKmlFiles,
36
+ zoneState,
37
+ handleChangeZoneState,
38
+ gallery,
39
+ handleChangePaymethodIds,
40
+ paymethodIds,
41
+ handleChangeSchedule
42
+ } = props
43
+
44
+ const [, t] = useLanguage()
45
+ const [orderStatus] = useOrder()
46
+ const [events] = useEvent()
47
+ const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
48
+ const [alertState, setAlertState] = useState({ open: false, content: [] })
49
+
50
+ const handleSubmit = () => {
51
+ handleAddBusiness()
52
+ }
53
+
54
+ const handleGoToBusinessList = () => {
55
+ events.emit('go_to_page', { page: 'businesses' })
56
+ }
57
+
58
+ const closeAlert = () => {
59
+ setAlertState({
60
+ open: false,
61
+ content: []
62
+ })
63
+ }
64
+
65
+ useEffect(() => {
66
+ if (!formState?.loading && formState?.result?.error) {
67
+ setAlertState({
68
+ open: true,
69
+ content: formState?.result?.result
70
+ })
71
+ }
72
+ }, [formState?.result])
73
+
74
+ const changeSchedule = useCallback((e) => handleChangeSchedule(e), [])
75
+
76
+ return (
77
+ <>
78
+ <AddNewBusinessContainer>
79
+ <HeaderTitleContainer>
80
+ {isCollapse && (
81
+ <IconButton
82
+ color='black'
83
+ onClick={() => handleMenuCollapse(false)}
84
+ >
85
+ <MenuIcon />
86
+ </IconButton>
87
+ )}
88
+ <h1>{t('NEW_BUSINESS', 'New business')}</h1>
89
+ </HeaderTitleContainer>
90
+ <BoxLayout>
91
+ <BusinessDetails
92
+ formState={formState}
93
+ handleChangeAddress={handleChangeAddress}
94
+ handleChangeInput={handleChangeInput}
95
+ handleChangeCenter={handleChangeCenter}
96
+ />
97
+ </BoxLayout>
98
+ <BoxLayout>
99
+ <Images
100
+ formState={formState}
101
+ handleChangeSwtich={handleChangeSwtich}
102
+ />
103
+ </BoxLayout>
104
+ <BoxLayout>
105
+ <Schedule
106
+ handleChangeSchedule={changeSchedule}
107
+ />
108
+ </BoxLayout>
109
+ <BoxLayout>
110
+ <Photos
111
+ gallery={gallery}
112
+ handleChangeGallery={handleChangeGallery}
113
+ />
114
+ </BoxLayout>
115
+ <BoxLayout>
116
+ <OrderTypePriceLevel
117
+ formState={formState}
118
+ changeFormState={changeFormState}
119
+ />
120
+ </BoxLayout>
121
+ {orderStatus?.options?.type === 1 && (
122
+ <BoxLayout>
123
+ <DeliveryZone
124
+ kmlData={kmlData}
125
+ zoneState={zoneState}
126
+ formState={formState}
127
+ handleChangeZoneState={handleChangeZoneState}
128
+ handleUploadKmlFiles={handleUploadKmlFiles}
129
+ />
130
+ </BoxLayout>
131
+ )}
132
+ <BoxLayout>
133
+ <PaymentMethods
134
+ handleChangePaymethodIds={handleChangePaymethodIds}
135
+ paymethodIds={paymethodIds}
136
+ paymethodsList={paymethodsList}
137
+ />
138
+ </BoxLayout>
139
+ <BoxLayout>
140
+ <ReceiveOrders
141
+ formState={formState}
142
+ handleChangeInput={handleChangeInput}
143
+ changeFormState={changeFormState}
144
+ />
145
+ </BoxLayout>
146
+ <ButtonWrapper>
147
+ <Button
148
+ color='primary'
149
+ outline
150
+ onClick={handleGoToBusinessList}
151
+ >
152
+ {t('Cancel', 'Cancel')}
153
+ </Button>
154
+ <Button
155
+ color='primary'
156
+ onClick={handleSubmit}
157
+ disabled={formState?.loading}
158
+ >
159
+ {t('CONFIRM', 'Confirm')}
160
+ </Button>
161
+ </ButtonWrapper>
162
+ </AddNewBusinessContainer>
163
+ <Alert
164
+ title={t('WEB_APPNAME', 'Ordering')}
165
+ content={alertState.content}
166
+ acceptText={t('ACCEPT', 'Accept')}
167
+ open={alertState.open}
168
+ onClose={() => closeAlert()}
169
+ onAccept={() => closeAlert()}
170
+ closeOnBackdrop={false}
171
+ />
172
+ </>
173
+ )
174
+ }
175
+
176
+ export const BusinessAdd = (props) => {
177
+ const history = useHistory()
178
+ const addNewBusinessProps = {
179
+ ...props,
180
+ UIComponent: BusinessAddUI,
181
+ handleOpenCategory: (slug) => history.push(`/stores/products/${slug}`)
182
+ }
183
+ return <BusinessAddController {...addNewBusinessProps} />
184
+ }
@@ -0,0 +1,85 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const AddNewBusinessContainer = styled.div`
4
+ flex: 1;
5
+ padding: 20px;
6
+ box-sizing: border-box;
7
+ transition: all 0.5s;
8
+ max-height: 100vh;
9
+ overflow: auto;
10
+
11
+ @media print {
12
+ display: none;
13
+ }
14
+ `
15
+
16
+ export const HeaderTitleContainer = styled.div`
17
+ display: flex;
18
+ align-items: center;
19
+ padding: 0px 10px;
20
+ margin-bottom: 25px;
21
+
22
+ > h1 {
23
+ font-weight: 700;
24
+ font-size: 20px;
25
+ color: ${props => props.theme.colors.headingColor};
26
+ margin: 0px;
27
+ line-height: 32px;
28
+ }
29
+
30
+ > button {
31
+ ${props => props.theme?.rtl ? css`
32
+ margin-left: 8px;
33
+ margin-right: -8px;
34
+ ` : css`
35
+ margin-right: 8px;
36
+ margin-left: -8px;
37
+ `}
38
+
39
+ svg {
40
+ width: 25px;
41
+ height: 25px;
42
+ }
43
+ }
44
+ `
45
+
46
+ export const BoxLayout = styled.div`
47
+ background: ${props => props.theme.colors.white};
48
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
49
+ border-radius: 7.6px;
50
+ padding: 25px 35px;
51
+ margin-bottom: 35px;
52
+ > div {
53
+ width: 100%;
54
+ max-width: 558px;
55
+ }
56
+ `
57
+
58
+ export const ButtonWrapper = styled.div`
59
+ display: flex;
60
+ justify-content: flex-end;
61
+ flex-direction: column;
62
+ padding-bottom: 30px;
63
+ button {
64
+ height: 44px;
65
+ border-radius: 8px;
66
+ width: 100%;
67
+ margin-left: 0;
68
+ margin-right: 0;
69
+ margin-top: 30px;
70
+ }
71
+
72
+ @media (min-width: 576px) {
73
+ flex-direction: row;
74
+ button {
75
+ width: 200px;
76
+ &:first-child {
77
+ margin-right: 30px;
78
+ ${props => props.theme.rtl && css`
79
+ margin-right: 0;
80
+ margin-left: 30px;
81
+ `}
82
+ }
83
+ }
84
+ }
85
+ `
@@ -37,6 +37,7 @@ export const TimeBlock = styled.div`
37
37
  border: none;
38
38
  outline: none;
39
39
  color: ${props => props.theme.colors.secundaryLight};
40
+ background: transparent;
40
41
 
41
42
  -moz-appearance: none;
42
43
  -webkit-appearance: none;
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react'
1
+ import React, { useState, useEffect } from 'react'
2
2
  import { useLanguage } from 'ordering-components-admin-external'
3
3
  import { BusinessDeliveryDetails } from '../BusinessDeliveryDetails'
4
4
  import { BusinessPickupDetails } from '../BusinessPickupDetails'
@@ -11,6 +11,10 @@ import {
11
11
  import { DriversGroupsListingDetails } from '../BusinessDeliveryGroupsDetails'
12
12
 
13
13
  export const BusinessDeliveryPickupMore = (props) => {
14
+ const {
15
+ setIsExtendExtraOpen
16
+ } = props
17
+
14
18
  const [, t] = useLanguage()
15
19
  const [selectedTab, setSelectedTab] = useState('delivery')
16
20
 
@@ -20,6 +24,10 @@ export const BusinessDeliveryPickupMore = (props) => {
20
24
  { key: 'driver_delivery_group', content: t('DRIVER_DELIVERY_GROUP', 'Driver Delivery Group') }
21
25
  ]
22
26
 
27
+ useEffect(() => {
28
+ setIsExtendExtraOpen(false)
29
+ }, [selectedTab])
30
+
23
31
  return (
24
32
  <Container>
25
33
  <h1>{t('DELIVERY_PICKUP_MORE', 'Delivery, pickup & more')}</h1>
@@ -217,7 +217,7 @@ export const BusinessDeliveryZoneInformation = (props) => {
217
217
  maxLength={2}
218
218
  value={formState.changes?.data?.distance ?? zone?.data?.distance ?? ''}
219
219
  onInput={(e) => {
220
- e.target.value = e.target.value.match("^[1-9]{1,2}$")
220
+ e.target.value = e.target.value.match('^[1-9]{1,2}$')
221
221
  }}
222
222
  onChange={e => handleChangeInput(e, configState?.configs?.distance_unit?.value)}
223
223
  ref={register({
@@ -225,8 +225,7 @@ export const BusinessDeliveryZoneInformation = (props) => {
225
225
  })}
226
226
  />
227
227
  </FormControl>
228
- </Row>
229
- }
228
+ </Row>}
230
229
  <FormControl>
231
230
  <label>{t('BUSINESS_ADDRESS', 'Business address')}</label>
232
231
  <Input
@@ -240,13 +239,12 @@ export const BusinessDeliveryZoneInformation = (props) => {
240
239
  <WrapperMap>
241
240
  {zoneType !== 5 &&
242
241
  isMyZone &&
243
- <button
244
- type='button'
245
- onClick={() => setClearState(true)}
246
- >
247
- {t('CLEAR', 'Clear')}
248
- </button>
249
- }
242
+ <button
243
+ type='button'
244
+ onClick={() => setClearState(true)}
245
+ >
246
+ {t('CLEAR', 'Clear')}
247
+ </button>}
250
248
  <BusinessZoneGoogleMaps
251
249
  distance={formState.changes?.data?.distance}
252
250
  disabled={isMyZone}
@@ -39,6 +39,7 @@ export const TimeBlock = styled.div`
39
39
  border: none;
40
40
  outline: none;
41
41
  color: ${props => props.theme.colors.secundaryLight};
42
+ background: transparent;
42
43
 
43
44
  -moz-appearance: none;
44
45
  -webkit-appearance: none;
@@ -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 = [
@@ -202,16 +202,18 @@ const BusinessProductAddFormUI = (props) => {
202
202
  </DragAndDrop>
203
203
  </ExamineClick>
204
204
  </ProductImage>
205
- <SelectWrapper notAllow>
206
- <label>{t('TYPE', 'Type')}</label>
207
- <Select
208
- options={typeList}
209
- className='select'
210
- defaultValue={formState?.changes?.type ?? 'item'}
211
- placeholder={t('SELECT_OPTION', 'Select an option')}
212
- onChange={(value) => handleChangeItem({ type: value })}
213
- />
214
- </SelectWrapper>
205
+ {typeList?.length > 1 && (
206
+ <SelectWrapper notAllow>
207
+ <label>{t('TYPE', 'Type')}</label>
208
+ <Select
209
+ options={typeList}
210
+ className='select'
211
+ defaultValue={formState?.changes?.type ?? 'item'}
212
+ placeholder={t('SELECT_OPTION', 'Select an option')}
213
+ onChange={(value) => handleChangeItem({ type: value })}
214
+ />
215
+ </SelectWrapper>
216
+ )}
215
217
  {(formState?.changes?.type === 'service') && (
216
218
  <FieldRow>
217
219
  <SelectWrapper>
@@ -236,9 +236,9 @@ export const BusinessProductsCategoyInfo = (props) => {
236
236
  ? (<SkeletonImgWrapper><Skeleton /></SkeletonImgWrapper>)
237
237
  : ((!formState.changes?.header || formState.result?.result === 'Network Error' || formState.result.error)
238
238
  ? category?.header &&
239
- (<img src={category?.header} alt='header image' loading='lazy' />)
239
+ (<img src={category?.header} alt='header image' loading='lazy' />)
240
240
  : formState?.changes?.header &&
241
- <img src={formState?.changes?.header} alt='header image' loading='lazy' />
241
+ <img src={formState?.changes?.header} alt='header image' loading='lazy' />
242
242
  )}
243
243
  <UploadImageIconContainer>
244
244
  <UploadImageIcon>
@@ -267,9 +267,9 @@ export const BusinessProductsCategoyInfo = (props) => {
267
267
  ? (<SkeletonImgWrapper><Skeleton /></SkeletonImgWrapper>)
268
268
  : ((!formState.changes?.image || formState.result?.result === 'Network Error' || formState.result.error)
269
269
  ? category?.image &&
270
- (<img src={category?.image} alt='logo image' loading='lazy' />)
270
+ (<img src={category?.image} alt='logo image' loading='lazy' />)
271
271
  : formState?.changes?.image &&
272
- <img src={formState?.changes?.image} alt='logo image' loading='lazy' />
272
+ <img src={formState?.changes?.image} alt='logo image' loading='lazy' />
273
273
  )}
274
274
  <UploadImageIconContainer small>
275
275
  <UploadImageIcon small>
@@ -315,9 +315,6 @@ export const BusinessProductsCategoyInfo = (props) => {
315
315
  value={formState?.changes?.description || ''}
316
316
  onChange={handleChangeInput}
317
317
  autoComplete='off'
318
- onKeyPress={e => {
319
- if (e.which === 32) { e.preventDefault() }
320
- }}
321
318
  />
322
319
  </CategoryNameWrapper>
323
320
  {!isAddMode && (
@@ -25,6 +25,7 @@ import { BusinessDetails } from '../BusinessDetails'
25
25
  import { OverlayTrigger, Tooltip } from 'react-bootstrap'
26
26
  import { ImportersButton } from '../ImportersButton'
27
27
  import { AddBusinessForm } from '../AddBusinessForm'
28
+ import { ProductStep } from '../ProductStep'
28
29
 
29
30
  import {
30
31
  CategoryProductsContainer,
@@ -85,6 +86,7 @@ const BusinessProductsListingUI = (props) => {
85
86
  const categoryListRef = useRef()
86
87
  const [batchImageFormOpen, setBatchImageFormOpen] = useState(false)
87
88
  const [openSidebar, setOpenSidebar] = useState(null)
89
+ const [showPopup, setShowPopup] = useState(false)
88
90
 
89
91
  const [allowSpreadColumns, setAllowSpreadColumns] = useState({
90
92
  id: true,
@@ -221,6 +223,12 @@ const BusinessProductsListingUI = (props) => {
221
223
  }
222
224
  }, [slug])
223
225
 
226
+ useEffect(() => {
227
+ if (businessState?.business && businessState?.business?.categories?.length === 0) {
228
+ setShowPopup(true)
229
+ }
230
+ }, [businessState?.business])
231
+
224
232
  return (
225
233
  <>
226
234
  <CategoryProductsContainer>
@@ -476,6 +484,18 @@ const BusinessProductsListingUI = (props) => {
476
484
  onClose={() => setBatchImageFormOpen(false)}
477
485
  />
478
486
  </Modal>
487
+ <Modal
488
+ width={width > 1440 ? '40%' : '60%'}
489
+ padding='25px'
490
+ open={showPopup}
491
+ onClose={() => setShowPopup(false)}
492
+ >
493
+ <ProductStep
494
+ onClose={() => setShowPopup(false)}
495
+ orderingBusiness={businessState?.business}
496
+ getBusiness={getBusiness}
497
+ />
498
+ </Modal>
479
499
  </>
480
500
  )
481
501
  }
@@ -38,7 +38,8 @@ export const BusinessesList = (props) => {
38
38
  handleChangeBusinessIds,
39
39
  handleEnableAllBusiness,
40
40
  selectedBusinessActiveState,
41
- setBusinessIds
41
+ setBusinessIds,
42
+ handleGotToAdd
42
43
  } = props
43
44
 
44
45
  const theme = useTheme()
@@ -215,7 +216,7 @@ export const BusinessesList = (props) => {
215
216
 
216
217
  <BusinessListBottomContainer>
217
218
  <AddNewButtonLink
218
- onClick={() => handleOpenAddBusiness()}
219
+ onClick={() => handleGotToAdd()}
219
220
  >
220
221
  {t('ADD_NEW_STORE', 'Add new store')}
221
222
  </AddNewButtonLink>
@@ -227,6 +228,7 @@ export const BusinessesList = (props) => {
227
228
  totalPages={Math.ceil(pagination?.total / pagination.pageSize)}
228
229
  handleChangePage={handleChangePage}
229
230
  handleChangePageSize={handleChangePageSize}
231
+ defaultPageSize={pagination?.pageSize}
230
232
  />
231
233
  )}
232
234
  </WrapperPagination>