ordering-ui-admin-external 1.8.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{ordering-ui-admin.ec185d6eb5351ecebfac.js → ordering-ui-admin.46b3298439d9527907e3.js} +2 -2
- package/_bundles/{ordering-ui-admin.ec185d6eb5351ecebfac.js.LICENSE.txt → ordering-ui-admin.46b3298439d9527907e3.js.LICENSE.txt} +0 -0
- package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
- package/_modules/components/Settings/Deliverect/index.js +103 -0
- package/_modules/components/Settings/Deliverect/styles.js +115 -0
- package/_modules/components/Settings/IntegrationListing/index.js +41 -2
- package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
- package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
- package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
- package/_modules/components/Settings/PickerExpress/index.js +178 -0
- package/_modules/components/Settings/PickerExpress/styles.js +111 -0
- package/_modules/components/Settings/PlaceListing/index.js +1 -6
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
- package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
- package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
- package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
- package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
- package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
- package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
- package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
- package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
- package/_modules/components/Stores/BusinessAdd/index.js +170 -0
- package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
- package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
- package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
- package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductAddForm/index.js +4 -4
- package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
- package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
- package/_modules/components/Stores/BusinessesList/index.js +3 -2
- package/_modules/components/Stores/BusinessesListing/index.js +51 -26
- package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
- package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
- package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
- package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
- package/_modules/components/Stores/ProductStep/index.js +92 -0
- package/_modules/components/Stores/ProductStep/styles.js +18 -0
- package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
- package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
- package/_modules/components/Stores/index.js +7 -0
- package/_modules/index.js +6 -0
- package/index-template.js +64 -2
- package/package.json +2 -2
- package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
- package/src/components/Settings/Deliverect/index.js +149 -0
- package/src/components/Settings/Deliverect/styles.js +344 -0
- package/src/components/Settings/IntegrationListing/index.js +46 -12
- package/src/components/Settings/IntegrationListing/styles.js +7 -1
- package/src/components/Settings/ItsaCheckmate/index.js +170 -0
- package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
- package/src/components/Settings/PickerExpress/index.js +222 -0
- package/src/components/Settings/PickerExpress/styles.js +330 -0
- package/src/components/Settings/PlaceListing/index.js +2 -2
- package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
- package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
- package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
- package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
- package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
- package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
- package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
- package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
- package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
- package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
- package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
- package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
- package/src/components/Stores/BusinessAdd/index.js +184 -0
- package/src/components/Stores/BusinessAdd/styles.js +85 -0
- package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
- package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
- package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
- package/src/components/Stores/BusinessProductAddForm/index.js +1 -1
- package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
- package/src/components/Stores/BusinessProductsListing/index.js +20 -0
- package/src/components/Stores/BusinessesList/index.js +3 -2
- package/src/components/Stores/BusinessesListing/index.js +101 -67
- package/src/components/Stores/BusinessesListing/styles.js +36 -0
- package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
- package/src/components/Stores/ProductStartGuide/index.js +60 -0
- package/src/components/Stores/ProductStartGuide/styles.js +62 -0
- package/src/components/Stores/ProductStep/index.js +84 -0
- package/src/components/Stores/ProductStep/styles.js +29 -0
- package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
- package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
- package/src/components/Stores/index.js +2 -0
- package/src/index.js +2 -0
- package/template/app.js +4 -0
- package/template/assets/images/dummies/no-businesses.png +0 -0
- package/template/assets/images/import-menu.png +0 -0
- package/template/assets/images/imported-menu.png +0 -0
- package/template/assets/images/picker-express.png +0 -0
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/BusinessAdd/index.js +11 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage, ApiKeysList as ApiKeysListController } from 'ordering-components-admin-external'
|
|
3
|
+
import { Button, IconButton } from '../../../styles'
|
|
4
|
+
import { Alert, Confirm, DragScroll, Modal } from '../../Shared'
|
|
5
|
+
import BsArrowRight from '@meronex/icons/bs/BsArrowRight'
|
|
6
|
+
import { XLg } from 'react-bootstrap-icons'
|
|
7
|
+
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
Header,
|
|
11
|
+
AllSetting,
|
|
12
|
+
Description,
|
|
13
|
+
CategoryExtraContent,
|
|
14
|
+
Container,
|
|
15
|
+
DescriptionHeader,
|
|
16
|
+
HeaderIcons,
|
|
17
|
+
PickerExpressContainer,
|
|
18
|
+
SettingListConatiner,
|
|
19
|
+
Tab,
|
|
20
|
+
Paragraph,
|
|
21
|
+
PurchaseWrapper
|
|
22
|
+
} from './styles'
|
|
23
|
+
|
|
24
|
+
const PickerExpressUI = (props) => {
|
|
25
|
+
const {
|
|
26
|
+
actionState,
|
|
27
|
+
onClose
|
|
28
|
+
} = props
|
|
29
|
+
|
|
30
|
+
const [, t] = useLanguage()
|
|
31
|
+
const { width } = useWindowSize()
|
|
32
|
+
|
|
33
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
34
|
+
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
35
|
+
const [settingsOpen, setSettingsOpen] = useState(false)
|
|
36
|
+
|
|
37
|
+
const toggleMainContent = () => {
|
|
38
|
+
if (width <= 500) {
|
|
39
|
+
document.getElementById('catDescription').style.width = '100vw'
|
|
40
|
+
} else {
|
|
41
|
+
if ((settingsOpen) && width >= 1000) {
|
|
42
|
+
document.getElementById('catDescription').style.width = '1000px'
|
|
43
|
+
} else {
|
|
44
|
+
document.getElementById('catDescription').style.width = '500px'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const handleGoToLink = (link) => {
|
|
50
|
+
window.open(link, '_blank')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!actionState?.error) return
|
|
55
|
+
setAlertState({
|
|
56
|
+
open: true,
|
|
57
|
+
content: actionState?.error
|
|
58
|
+
})
|
|
59
|
+
}, [actionState?.error])
|
|
60
|
+
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (width < 1000) return
|
|
63
|
+
if (settingsOpen) {
|
|
64
|
+
document.getElementById('catDescription').style.width = '1000px'
|
|
65
|
+
} else {
|
|
66
|
+
toggleMainContent()
|
|
67
|
+
}
|
|
68
|
+
}, [settingsOpen])
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
toggleMainContent()
|
|
72
|
+
}, [width])
|
|
73
|
+
|
|
74
|
+
const LalaMoveConnectDescription = () => {
|
|
75
|
+
return (
|
|
76
|
+
<CategoryExtraContent>
|
|
77
|
+
<IconButton
|
|
78
|
+
color='black'
|
|
79
|
+
onClick={() => setSettingsOpen(false)}
|
|
80
|
+
>
|
|
81
|
+
<XLg />
|
|
82
|
+
</IconButton>
|
|
83
|
+
<div>
|
|
84
|
+
<Header>
|
|
85
|
+
<h1>{t('MORE_INFO', 'More Info')}</h1>
|
|
86
|
+
</Header>
|
|
87
|
+
<SettingListConatiner>
|
|
88
|
+
<DragScroll>
|
|
89
|
+
<Tab
|
|
90
|
+
active
|
|
91
|
+
>
|
|
92
|
+
{t('GENERAL', 'General')}
|
|
93
|
+
</Tab>
|
|
94
|
+
</DragScroll>
|
|
95
|
+
</SettingListConatiner>
|
|
96
|
+
<Paragraph>
|
|
97
|
+
<h2>{t('REQUIREMENTS', 'Requirements')}</h2>
|
|
98
|
+
<p>
|
|
99
|
+
{t('PICKER_EXPRESS_CONNECT_REQUIREMENTS',
|
|
100
|
+
'For this integration to work you need: \n' +
|
|
101
|
+
'1.- Picker Express account. \n' +
|
|
102
|
+
'2.- The advanced logistics module must be active. \n' +
|
|
103
|
+
'3.- Package of Ordering.'
|
|
104
|
+
)}
|
|
105
|
+
</p>
|
|
106
|
+
</Paragraph>
|
|
107
|
+
<Paragraph>
|
|
108
|
+
<h2>{t('ARTICLE', 'Article')}</h2>
|
|
109
|
+
<p>
|
|
110
|
+
{t('PICKER_EXPRESS_CONNECT_ARTICLE', 'To connect with Picker Express, you’ll have to use plugins, put in your Picker Express credentials, connect your Picker Express account, and create a driver company inside this dashboard; follow the next article step by step and get this connected in less than 5 minutes.')}
|
|
111
|
+
</p>
|
|
112
|
+
<a onClick={() => handleGoToLink(t('PICKER_EXPRESS_CONNECT_ARTICLE_LINK', 'https://support.ordering.co/hc/en-us/articles/10673894748941'))}>
|
|
113
|
+
{t('VIEW_ARTICLE', 'View Article')}
|
|
114
|
+
</a>
|
|
115
|
+
</Paragraph>
|
|
116
|
+
<Paragraph>
|
|
117
|
+
<h2>{t('SUPPORT', 'Support')}</h2>
|
|
118
|
+
<p>
|
|
119
|
+
{t('PICKER_EXPRESS_CONNECT_SUPPORT', 'Are you having trouble connecting this?')}
|
|
120
|
+
</p>
|
|
121
|
+
<p>
|
|
122
|
+
<a onClick={() => handleGoToLink(t('PICKER_EXPRESS_CONNECT_SUPPORT_LINK', 'https://www.ordering.co/contact-ordering'))}>{t('CONTACT_US', 'Contact us')}</a>; <span>{t('WE_ARE_HAPPY_TO_HELP', 'we are happy to help.')}</span>
|
|
123
|
+
</p>
|
|
124
|
+
</Paragraph>
|
|
125
|
+
<Paragraph>
|
|
126
|
+
<h2>{t('PRICE_INSTALATION', 'Price and installation time.')}</h2>
|
|
127
|
+
<p>
|
|
128
|
+
<span className='bold'>{t('PICKER_EXPRESS_CONNECT_PRICE', '$99 monthly')}</span> | {t('PICKER_EXPRESS_CONNECT_INSTALLATION', 'less than 24 hrs to get it installed in your project.')}
|
|
129
|
+
</p>
|
|
130
|
+
</Paragraph>
|
|
131
|
+
<PurchaseWrapper>
|
|
132
|
+
<Button
|
|
133
|
+
outline
|
|
134
|
+
color='primary'
|
|
135
|
+
onClick={() => handleGoToLink(t('PURCHASE_INTEGRATION_LINK', 'https://www.ordering.co/ordering-sales'))}
|
|
136
|
+
>
|
|
137
|
+
{t('PURCHASE_INTEGRATION', 'Purchase Integration')}
|
|
138
|
+
</Button>
|
|
139
|
+
</PurchaseWrapper>
|
|
140
|
+
</div>
|
|
141
|
+
</CategoryExtraContent>
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<Container
|
|
147
|
+
id='catDescription'
|
|
148
|
+
>
|
|
149
|
+
<PickerExpressContainer>
|
|
150
|
+
<DescriptionHeader>
|
|
151
|
+
<HeaderIcons>
|
|
152
|
+
<IconButton
|
|
153
|
+
color='black'
|
|
154
|
+
onClick={onClose}
|
|
155
|
+
>
|
|
156
|
+
<XLg />
|
|
157
|
+
</IconButton>
|
|
158
|
+
</HeaderIcons>
|
|
159
|
+
</DescriptionHeader>
|
|
160
|
+
<Header>
|
|
161
|
+
<h1>{t('CONNECT_WITH_PICKER_EXPRESS', 'Connect with Picker Express')}</h1>
|
|
162
|
+
<Button color='lightPrimary'>{t('NEW', 'New')}</Button>
|
|
163
|
+
</Header>
|
|
164
|
+
<Description>
|
|
165
|
+
{t('CONNECT_WITH_PICKER_EXPRESS_DESCRIPTION', 'If you have already worked with Pickerexpress or are running your business with Pickerexpress and Ordering simultaneously, this integration will help you connect both platforms and assign orders through them, making your job easy and automated.')}
|
|
166
|
+
</Description>
|
|
167
|
+
<AllSetting onClick={() => setSettingsOpen(true)}>
|
|
168
|
+
<span>{t('SETTINGS', 'All settings')}</span>
|
|
169
|
+
<BsArrowRight />
|
|
170
|
+
</AllSetting>
|
|
171
|
+
</PickerExpressContainer>
|
|
172
|
+
{settingsOpen && (
|
|
173
|
+
<>
|
|
174
|
+
{width >= 1000 ? (
|
|
175
|
+
<LalaMoveConnectDescription />
|
|
176
|
+
) : (
|
|
177
|
+
<>
|
|
178
|
+
<Modal
|
|
179
|
+
width='70%'
|
|
180
|
+
height='90vh'
|
|
181
|
+
open
|
|
182
|
+
padding='0px'
|
|
183
|
+
onClose={() => setSettingsOpen(false)}
|
|
184
|
+
hideCloseDefault
|
|
185
|
+
>
|
|
186
|
+
<LalaMoveConnectDescription />
|
|
187
|
+
</Modal>
|
|
188
|
+
</>
|
|
189
|
+
)}
|
|
190
|
+
</>
|
|
191
|
+
)}
|
|
192
|
+
<Alert
|
|
193
|
+
title={t('WEB_APPNAME', 'Ordering')}
|
|
194
|
+
content={alertState.content}
|
|
195
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
196
|
+
open={alertState.open}
|
|
197
|
+
onClose={() => setAlertState({ open: false, content: [] })}
|
|
198
|
+
onAccept={() => setAlertState({ open: false, content: [] })}
|
|
199
|
+
closeOnBackdrop={false}
|
|
200
|
+
/>
|
|
201
|
+
<Confirm
|
|
202
|
+
title={t('WEB_APPNAME', 'Ordering')}
|
|
203
|
+
content={confirm.content}
|
|
204
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
205
|
+
open={confirm.open}
|
|
206
|
+
onClose={() => setConfirm({ ...confirm, open: false })}
|
|
207
|
+
onCancel={() => setConfirm({ ...confirm, open: false })}
|
|
208
|
+
onAccept={confirm.handleOnAccept}
|
|
209
|
+
closeOnBackdrop={false}
|
|
210
|
+
/>
|
|
211
|
+
</Container>
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export const PickerExpress = (props) => {
|
|
216
|
+
const apiKeysProps = {
|
|
217
|
+
...props,
|
|
218
|
+
UIComponent: PickerExpressUI
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return <ApiKeysListController {...apiKeysProps} />
|
|
222
|
+
}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const PickerExpressContainer = styled.div`
|
|
4
|
+
padding: 26px 20px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
width: 100%;
|
|
7
|
+
overflow-x: hidden;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
@media (min-width: 768px) {
|
|
11
|
+
padding: 26px 40px;
|
|
12
|
+
}
|
|
13
|
+
`
|
|
14
|
+
|
|
15
|
+
export const Header = styled.div`
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
margin-bottom: 30px;
|
|
19
|
+
|
|
20
|
+
${props => props.theme?.rtl ? css`
|
|
21
|
+
margin-left: 35px;
|
|
22
|
+
` : css`
|
|
23
|
+
margin-right: 35px;
|
|
24
|
+
`}
|
|
25
|
+
|
|
26
|
+
h1 {
|
|
27
|
+
font-size: 20px;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
margin: 0px;
|
|
30
|
+
text-transform: capitalize;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
button {
|
|
34
|
+
line-height: 12px;
|
|
35
|
+
height: 16px;
|
|
36
|
+
font-size: 10px;
|
|
37
|
+
margin-left: 15px;
|
|
38
|
+
padding: 2px 8px;
|
|
39
|
+
border-radius: 50px;
|
|
40
|
+
${props => props.theme.rtl && css`
|
|
41
|
+
margin-right: 15px;
|
|
42
|
+
margin-left: 0px;
|
|
43
|
+
`}
|
|
44
|
+
}
|
|
45
|
+
`
|
|
46
|
+
|
|
47
|
+
export const ApiKeysListTable = styled.table`
|
|
48
|
+
width: 100%;
|
|
49
|
+
margin-top: 25px;
|
|
50
|
+
|
|
51
|
+
thead {
|
|
52
|
+
border-bottom: 1px solid ${props => props.theme.colors.secundaryLight};
|
|
53
|
+
th {
|
|
54
|
+
padding: 10px 0;
|
|
55
|
+
&:last-child {
|
|
56
|
+
padding-left: 20px;
|
|
57
|
+
padding-right: 20px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
tr {
|
|
62
|
+
width: 100%;
|
|
63
|
+
th,
|
|
64
|
+
td {
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
word-break: break-all;
|
|
67
|
+
|
|
68
|
+
&:last-child {
|
|
69
|
+
width: 100px;
|
|
70
|
+
> div {
|
|
71
|
+
padding-left: 20px;
|
|
72
|
+
padding-right: 20px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
tbody {
|
|
79
|
+
border-bottom: 1px solid ${props => props.theme.colors.borderColor};
|
|
80
|
+
td {
|
|
81
|
+
padding-top: 9px;
|
|
82
|
+
padding-bottom: 9px;
|
|
83
|
+
|
|
84
|
+
&:last-child {
|
|
85
|
+
> div {
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: flex-end;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`
|
|
93
|
+
|
|
94
|
+
export const DropdownButtonWrapper = styled.div`
|
|
95
|
+
${props => props?.theme?.rtl ? css`
|
|
96
|
+
border-right: 1px solid ${props => props.theme.colors.borderColor};
|
|
97
|
+
` : css`
|
|
98
|
+
border-left: 1px solid ${props => props.theme.colors.borderColor};
|
|
99
|
+
`}
|
|
100
|
+
padding: 5px 20px;
|
|
101
|
+
button {
|
|
102
|
+
background: transparent !important;
|
|
103
|
+
border: none;
|
|
104
|
+
padding: 0px;
|
|
105
|
+
&:active,
|
|
106
|
+
&:focus {
|
|
107
|
+
border-color: unset !important;
|
|
108
|
+
box-shadow: none !important;
|
|
109
|
+
}
|
|
110
|
+
svg {
|
|
111
|
+
color: ${props => props.theme.colors.headingColor};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:after {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.show {
|
|
120
|
+
button {
|
|
121
|
+
background: ${props => props.theme.colors.secundary} !important;
|
|
122
|
+
border-color: unset !important;
|
|
123
|
+
box-shadow: none !important;
|
|
124
|
+
}
|
|
125
|
+
>div {
|
|
126
|
+
border: 1px solid ${props => props.theme.colors.borderColor};
|
|
127
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
> div {
|
|
132
|
+
> div {
|
|
133
|
+
border-radius: 8px;
|
|
134
|
+
.dropdown-item {
|
|
135
|
+
font-size: 12px;
|
|
136
|
+
color: ${props => props.theme.colors.headingColor};
|
|
137
|
+
}
|
|
138
|
+
.dropdown-item:last-child {
|
|
139
|
+
color: #E63757;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
`
|
|
144
|
+
export const AddNewButton = styled.div`
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
font-size: 12px;
|
|
147
|
+
color: ${props => props.theme.colors.lightGray};
|
|
148
|
+
margin: 20px 0;
|
|
149
|
+
width: fit-content;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
color: ${props => props.theme.colors.primary};
|
|
153
|
+
}
|
|
154
|
+
`
|
|
155
|
+
|
|
156
|
+
export const AllSetting = styled.div`
|
|
157
|
+
user-select: none;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
margin-top: 36px;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
span {
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
color: ${props => props.theme.colors.primary};
|
|
165
|
+
}
|
|
166
|
+
svg {
|
|
167
|
+
color: ${props => props.theme.colors.primary};
|
|
168
|
+
margin-left: 5px;
|
|
169
|
+
transition: 0.2s linear;
|
|
170
|
+
${props => props.theme.rtl && css`
|
|
171
|
+
margin-right: 5px;
|
|
172
|
+
margin-left: 0px;
|
|
173
|
+
`}
|
|
174
|
+
}
|
|
175
|
+
&:hover {
|
|
176
|
+
svg {
|
|
177
|
+
transform: translateX(3px);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
`
|
|
181
|
+
|
|
182
|
+
export const Description = styled.p`
|
|
183
|
+
margin-top: 40px;
|
|
184
|
+
font-size: 14px;
|
|
185
|
+
margin-bottom: 0px;
|
|
186
|
+
text-align: justify;
|
|
187
|
+
|
|
188
|
+
@media (min-width: 768px) {
|
|
189
|
+
text-align: initial;
|
|
190
|
+
}
|
|
191
|
+
`
|
|
192
|
+
|
|
193
|
+
export const CategoryExtraContent = styled.div`
|
|
194
|
+
position: relative;
|
|
195
|
+
padding: 26px 26px 60px 26px;
|
|
196
|
+
box-sizing: border-box;
|
|
197
|
+
width: 100%;
|
|
198
|
+
overflow: auto;
|
|
199
|
+
|
|
200
|
+
${props => props.theme?.rtl ? css`
|
|
201
|
+
border-right: 1px solid #E9ECEF;
|
|
202
|
+
` : css`
|
|
203
|
+
border-left: 1px solid #E9ECEF;
|
|
204
|
+
`}
|
|
205
|
+
|
|
206
|
+
> button {
|
|
207
|
+
z-index: 100;
|
|
208
|
+
position: absolute;
|
|
209
|
+
top: 25px;
|
|
210
|
+
${props => props.theme?.rtl ? css`
|
|
211
|
+
left: 20px;
|
|
212
|
+
` : css`
|
|
213
|
+
right: 20px;
|
|
214
|
+
`}
|
|
215
|
+
}
|
|
216
|
+
`
|
|
217
|
+
|
|
218
|
+
export const Container = styled.div`
|
|
219
|
+
display: flex;
|
|
220
|
+
width: 0;
|
|
221
|
+
position: fixed;
|
|
222
|
+
box-shadow: -4px 0px 7px #ccc;
|
|
223
|
+
|
|
224
|
+
${({ isDriverOrders }) => isDriverOrders && css`
|
|
225
|
+
position: absolute;
|
|
226
|
+
box-shadow: none;
|
|
227
|
+
|
|
228
|
+
${props => props.theme?.rtl ? css`
|
|
229
|
+
border-right: 1px solid #CCC;
|
|
230
|
+
` : css`
|
|
231
|
+
border-left: 1px solid #CCC;
|
|
232
|
+
`}
|
|
233
|
+
`}
|
|
234
|
+
background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
|
|
235
|
+
height: calc(var(--vh, 1vh) * 100);
|
|
236
|
+
top: 0px;
|
|
237
|
+
z-index: 1001;
|
|
238
|
+
overflow-x: hidden;
|
|
239
|
+
transition: 0.3s;
|
|
240
|
+
|
|
241
|
+
${props => props.theme?.rtl ? css`
|
|
242
|
+
left: 0px;
|
|
243
|
+
` : css`
|
|
244
|
+
right: 0px;
|
|
245
|
+
`}
|
|
246
|
+
@media print {
|
|
247
|
+
box-shadow: none;
|
|
248
|
+
}
|
|
249
|
+
`
|
|
250
|
+
|
|
251
|
+
export const DescriptionHeader = styled.div`
|
|
252
|
+
display: flex;
|
|
253
|
+
justify-content: flex-end;
|
|
254
|
+
align-items: center;
|
|
255
|
+
`
|
|
256
|
+
|
|
257
|
+
export const HeaderIcons = styled.div`
|
|
258
|
+
display: flex;
|
|
259
|
+
position: absolute;
|
|
260
|
+
top: 25px;
|
|
261
|
+
right: 20px;
|
|
262
|
+
|
|
263
|
+
> button:first-child {
|
|
264
|
+
${props => props.theme?.rtl ? css`
|
|
265
|
+
margin-left: 8px;
|
|
266
|
+
` : css`
|
|
267
|
+
margin-right: 8px;
|
|
268
|
+
`}
|
|
269
|
+
}
|
|
270
|
+
`
|
|
271
|
+
|
|
272
|
+
export const SettingListConatiner = styled.div`
|
|
273
|
+
width: 100%;
|
|
274
|
+
margin: 20px 0;
|
|
275
|
+
border-bottom: 1px solid #E9ECEF;
|
|
276
|
+
`
|
|
277
|
+
|
|
278
|
+
export const Tab = styled.div`
|
|
279
|
+
user-select: none;
|
|
280
|
+
padding: 10px 0px;
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
color: ${props => props.theme.colors?.headingColor};
|
|
283
|
+
font-size: 14px;
|
|
284
|
+
white-space: nowrap;
|
|
285
|
+
${props => props.theme?.rtl ? css`
|
|
286
|
+
margin-left: 30px;
|
|
287
|
+
` : css`
|
|
288
|
+
margin-right: 30px;
|
|
289
|
+
`}
|
|
290
|
+
|
|
291
|
+
${({ active }) => active && css`
|
|
292
|
+
border-bottom: 2px solid;
|
|
293
|
+
font-weight: 500;
|
|
294
|
+
`}
|
|
295
|
+
|
|
296
|
+
${({ active }) => !active && css`
|
|
297
|
+
color: #909BA9;
|
|
298
|
+
`}
|
|
299
|
+
`
|
|
300
|
+
|
|
301
|
+
export const Paragraph = styled.div`
|
|
302
|
+
margin-top: 20px;
|
|
303
|
+
h2{
|
|
304
|
+
font-size: 16px;
|
|
305
|
+
}
|
|
306
|
+
p{
|
|
307
|
+
white-space: pre-line;
|
|
308
|
+
font-size: 12px;
|
|
309
|
+
margin: 0;
|
|
310
|
+
}
|
|
311
|
+
span {
|
|
312
|
+
font-size: 12px;
|
|
313
|
+
}
|
|
314
|
+
a {
|
|
315
|
+
text-decoration: underline !important;
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
font-size: 12px;
|
|
318
|
+
color: ${props => props.theme.colors.primary} !important;
|
|
319
|
+
}
|
|
320
|
+
.bold {
|
|
321
|
+
font-weight: 600;
|
|
322
|
+
}
|
|
323
|
+
`
|
|
324
|
+
|
|
325
|
+
export const PurchaseWrapper = styled.div`
|
|
326
|
+
button {
|
|
327
|
+
border-radius: 5px;
|
|
328
|
+
}
|
|
329
|
+
margin-top: 15px;
|
|
330
|
+
`
|
|
@@ -246,12 +246,12 @@ const PlaceListingUI = (props) => {
|
|
|
246
246
|
>
|
|
247
247
|
{t('CITIES', 'Cities')}
|
|
248
248
|
</Tab>
|
|
249
|
-
<Tab
|
|
249
|
+
{/* <Tab
|
|
250
250
|
active={showOption === 'zones'}
|
|
251
251
|
onClick={() => setShowOption('zones')}
|
|
252
252
|
>
|
|
253
253
|
{t('DROPDOWN_OPTIONS', 'Zones dropdown options')}
|
|
254
|
-
</Tab>
|
|
254
|
+
</Tab> */}
|
|
255
255
|
</Tabs>
|
|
256
256
|
|
|
257
257
|
{showOption === 'countries' && (
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useLanguage, useConfig, GoogleAutocompleteInput, GoogleMapsMap } from 'ordering-components-admin-external'
|
|
3
|
+
import {
|
|
4
|
+
BusinessDetailsContainer,
|
|
5
|
+
ContentWrapper,
|
|
6
|
+
FormControl,
|
|
7
|
+
WrapperMap,
|
|
8
|
+
GoogleMapContainer
|
|
9
|
+
} from './styles'
|
|
10
|
+
import { Input } from '../../../../styles'
|
|
11
|
+
import { stringToSlug } from '../../../../utils'
|
|
12
|
+
|
|
13
|
+
export const BusinessDetails = (props) => {
|
|
14
|
+
const {
|
|
15
|
+
formState,
|
|
16
|
+
handleChangeAddress,
|
|
17
|
+
handleChangeInput,
|
|
18
|
+
handleChangeCenter
|
|
19
|
+
} = props
|
|
20
|
+
|
|
21
|
+
const [, t] = useLanguage()
|
|
22
|
+
const [{ configs }] = useConfig()
|
|
23
|
+
|
|
24
|
+
const googleMapsApiKey = configs?.google_maps_api_key?.value
|
|
25
|
+
const googleMapsControls = {
|
|
26
|
+
defaultZoom: 15,
|
|
27
|
+
zoomControl: true,
|
|
28
|
+
streetViewControl: false,
|
|
29
|
+
fullscreenControl: false,
|
|
30
|
+
mapTypeId: 'roadmap', // 'roadmap', 'satellite', 'hybrid', 'terrain'
|
|
31
|
+
mapTypeControl: false,
|
|
32
|
+
mapTypeControlOptions: {
|
|
33
|
+
mapTypeIds: ['roadmap', 'satellite']
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const defaultPosition = { lat: 40.77473399999999, lng: -73.9653844 }
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<BusinessDetailsContainer>
|
|
41
|
+
<h2>{t('BUSINESS_DETAILS', 'Business details')}</h2>
|
|
42
|
+
<ContentWrapper>
|
|
43
|
+
<FormControl>
|
|
44
|
+
<label>{t('BUSINESS_NAME', 'Business Name')}</label>
|
|
45
|
+
<Input
|
|
46
|
+
name='name'
|
|
47
|
+
placeholder={t('NAME', 'Name')}
|
|
48
|
+
defaultValue={formState?.changes?.name ?? ''}
|
|
49
|
+
onChange={e => {
|
|
50
|
+
handleChangeInput([{ name: 'name', value: e.target.value }, { name: 'slug', value: stringToSlug(e.target.value) }], true)
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
</FormControl>
|
|
54
|
+
<FormControl>
|
|
55
|
+
<label>{t('ADDRESS', 'Address')}</label>
|
|
56
|
+
<GoogleAutocompleteInput
|
|
57
|
+
name='address'
|
|
58
|
+
className='input-autocomplete'
|
|
59
|
+
apiKey={googleMapsApiKey}
|
|
60
|
+
placeholder={t('ADDRESS', 'Address')}
|
|
61
|
+
onChangeAddress={(e) => {
|
|
62
|
+
handleChangeAddress(e)
|
|
63
|
+
}}
|
|
64
|
+
onChange={(e) => {
|
|
65
|
+
handleChangeInput(e)
|
|
66
|
+
}}
|
|
67
|
+
defaultValue={formState?.changes?.address ?? ''}
|
|
68
|
+
autoComplete='new-password'
|
|
69
|
+
countryCode={configs?.country_autocomplete?.value || '*'}
|
|
70
|
+
/>
|
|
71
|
+
</FormControl>
|
|
72
|
+
<FormControl>
|
|
73
|
+
<label>{t('ZIPCODE', 'Zipcode')}</label>
|
|
74
|
+
<Input
|
|
75
|
+
name='zipcode'
|
|
76
|
+
placeholder={t('ZIPCODE', 'Zipcode')}
|
|
77
|
+
defaultValue={formState?.changes?.zipcode ?? ''}
|
|
78
|
+
onChange={handleChangeInput}
|
|
79
|
+
/>
|
|
80
|
+
</FormControl>
|
|
81
|
+
<GoogleMapContainer>
|
|
82
|
+
<label>{t('GOOGLE_PLACE_ID', 'Google place ID')}</label>
|
|
83
|
+
<p>{googleMapsApiKey}</p>
|
|
84
|
+
<WrapperMap>
|
|
85
|
+
<GoogleMapsMap
|
|
86
|
+
apiKey={configs?.google_maps_api_key?.value}
|
|
87
|
+
location={formState?.changes?.location ?? defaultPosition}
|
|
88
|
+
mapControls={googleMapsControls}
|
|
89
|
+
handleChangeCenter={handleChangeCenter}
|
|
90
|
+
isFitCenter
|
|
91
|
+
/>
|
|
92
|
+
</WrapperMap>
|
|
93
|
+
</GoogleMapContainer>
|
|
94
|
+
<FormControl noBottom>
|
|
95
|
+
<label>{t('INT_NUMBER', 'Int. number')}</label>
|
|
96
|
+
<Input
|
|
97
|
+
name='cellphone'
|
|
98
|
+
placeholder={t('INT_NUMBER', 'Int. number')}
|
|
99
|
+
defaultValue={formState?.changes?.cellphone ?? ''}
|
|
100
|
+
onChange={handleChangeInput}
|
|
101
|
+
/>
|
|
102
|
+
</FormControl>
|
|
103
|
+
</ContentWrapper>
|
|
104
|
+
</BusinessDetailsContainer>
|
|
105
|
+
)
|
|
106
|
+
}
|