ordering-ui-admin-external 1.6.2 → 1.6.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.
- package/_bundles/main.css +134 -129
- package/_bundles/{ordering-ui-admin.488bdda58ba73188d3b5.js → ordering-ui-admin.3ebe4d4f772eaeb4f851.js} +2 -2
- package/_bundles/{ordering-ui-admin.488bdda58ba73188d3b5.js.LICENSE.txt → ordering-ui-admin.3ebe4d4f772eaeb4f851.js.LICENSE.txt} +4 -4
- package/_modules/components/BusinessIntelligence/Reports/index.js +1 -1
- package/_modules/components/CartRecovery/OpenCartsFilterGroup/index.js +1 -1
- package/_modules/components/CartRecovery/RecoveryActionHeader/index.js +1 -1
- package/_modules/components/Delivery/AddressForm/index.js +1 -1
- package/_modules/components/Delivery/DriversCompaniesListing/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupLogs/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupsListing/index.js +1 -1
- package/_modules/components/Home/HomePage/index.js +29 -6
- package/_modules/components/Home/HomePage/styles.js +27 -5
- package/_modules/components/LanguageSelector/index.js +1 -1
- package/_modules/components/Login/LoginForm/index.js +119 -20
- package/_modules/components/Login/LoginForm/styles.js +60 -30
- package/_modules/components/Loyalty/RewardsPrograms/index.js +1 -1
- package/_modules/components/Marketing/CampaignSignUpOption/index.js +1 -1
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +1 -1
- package/_modules/components/Messages/MessagesListing/styles.js +1 -1
- package/_modules/components/MyProducts/AppLayout/index.js +75 -0
- package/_modules/components/MyProducts/AppLayout/styles.js +41 -0
- package/_modules/components/MyProducts/CallCenterApp/index.js +42 -0
- package/_modules/components/MyProducts/ContentForm/index.js +236 -0
- package/_modules/components/MyProducts/ContentForm/styles.js +32 -0
- package/_modules/components/MyProducts/CustomerApp/index.js +18 -25
- package/_modules/components/MyProducts/DriverApp/index.js +18 -45
- package/_modules/components/MyProducts/KioskApp/index.js +42 -0
- package/_modules/components/MyProducts/OrderingWebsite/index.js +351 -3
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +54 -3
- package/_modules/components/MyProducts/PosApp/index.js +42 -0
- package/_modules/components/MyProducts/StoreApp/index.js +18 -45
- package/_modules/components/MyProducts/index.js +22 -1
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +6 -8
- package/_modules/components/OrderingProducts/SiteTheme/index.js +13 -4
- package/_modules/components/Orders/DeliveriesManager/index.js +6 -0
- package/_modules/components/Orders/DriversManager/index.js +7 -1
- package/_modules/components/Orders/GoogleMapsApiKeySettingButton/index.js +110 -0
- package/_modules/components/{MyProducts/CustomerApp/styles.js → Orders/GoogleMapsApiKeySettingButton/style.js} +9 -13
- package/_modules/components/Orders/Messages/styles.js +3 -3
- package/_modules/components/Orders/OrderContactInformation/index.js +7 -7
- package/_modules/components/Orders/OrdersContentHeader/index.js +4 -2
- package/_modules/components/Orders/OrdersManager/index.js +3 -2
- package/_modules/components/Profile/ProfilePage/index.js +2 -1
- package/_modules/components/Profile/ProfilePage/styles.js +2 -2
- package/_modules/components/Profile/Sessions/index.js +209 -0
- package/_modules/components/Profile/Sessions/styles.js +46 -0
- package/_modules/components/Profile/index.js +8 -1
- package/_modules/components/Settings/EmailSetting/index.js +2 -29
- package/_modules/components/Settings/PageForm/index.js +6 -1
- package/_modules/components/Settings/Settings/index.js +0 -62
- package/_modules/components/Shared/CitySelector/index.js +9 -1
- package/_modules/components/Shared/Modal/index.js +5 -3
- package/_modules/components/Shared/Modal/styles.js +25 -23
- package/_modules/components/SidebarMenu/index.js +132 -76
- package/_modules/components/SidebarMenu/styles.js +4 -2
- package/_modules/components/Stores/AddBusinessForm/index.js +22 -8
- package/_modules/components/Stores/BusinessBrandGENDetail/index.js +6 -1
- package/_modules/components/Stores/BusinessProductList/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductsCategories/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +6 -1
- package/_modules/components/Stores/BusinessProductsListing/index.js +35 -8
- package/_modules/components/Stores/BusinessProductsListing/styles.js +6 -4
- package/_modules/components/Stores/BusinessSelectHeader/index.js +17 -9
- package/_modules/components/Stores/BusinessSelectHeader/styles.js +1 -1
- package/_modules/components/Stores/BusinessSummary/index.js +21 -8
- package/_modules/components/Stores/BusinessSummary/styles.js +5 -3
- package/_modules/components/Stores/BusinessSync/index.js +6 -2
- package/_modules/components/Stores/BusinessSyncItsaCheckmate/index.js +52 -0
- package/_modules/components/Stores/BusinessSyncItsaCheckmate/styles.js +31 -0
- package/_modules/components/Support/index.js +1 -1
- package/_modules/hooks/useCountdownTimer.js +40 -0
- package/_modules/index.js +18 -0
- package/_modules/utils/index.js +65 -4
- package/index-template.js +49 -8
- package/package.json +3 -2
- package/src/components/BusinessIntelligence/Reports/index.js +1 -1
- package/src/components/CartRecovery/OpenCartsFilterGroup/index.js +1 -1
- package/src/components/CartRecovery/RecoveryActionHeader/index.js +1 -1
- package/src/components/Delivery/AddressForm/index.js +1 -1
- package/src/components/Delivery/DriversCompaniesListing/index.js +1 -1
- package/src/components/Delivery/DriversGroupLogs/index.js +1 -1
- package/src/components/Delivery/DriversGroupsListing/index.js +1 -1
- package/src/components/Home/HomePage/index.js +62 -6
- package/src/components/Home/HomePage/styles.js +48 -1
- package/src/components/LanguageSelector/index.js +1 -1
- package/src/components/Login/LoginForm/index.js +211 -94
- package/src/components/Login/LoginForm/styles.js +74 -8
- package/src/components/Loyalty/RewardsPrograms/index.js +1 -1
- package/src/components/Marketing/CampaignSignUpOption/index.js +1 -1
- package/src/components/Marketing/EnterprisePromotionListing/index.js +1 -1
- package/src/components/Messages/MessagesListing/styles.js +3 -5
- package/src/components/MyProducts/AppLayout/index.js +97 -0
- package/src/components/MyProducts/AppLayout/styles.js +145 -0
- package/src/components/MyProducts/CallCenterApp/index.js +29 -0
- package/src/components/MyProducts/ContentForm/index.js +230 -0
- package/src/components/MyProducts/ContentForm/styles.js +67 -0
- package/src/components/MyProducts/CustomerApp/index.js +17 -41
- package/src/components/MyProducts/DriverApp/index.js +16 -70
- package/src/components/MyProducts/KioskApp/index.js +29 -0
- package/src/components/MyProducts/OrderingWebsite/index.js +452 -25
- package/src/components/MyProducts/OrderingWebsite/styles.js +244 -0
- package/src/components/MyProducts/PosApp/index.js +29 -0
- package/src/components/MyProducts/StoreApp/index.js +16 -70
- package/src/components/MyProducts/index.js +7 -1
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +4 -4
- package/src/components/OrderingProducts/SiteTheme/index.js +8 -0
- package/src/components/Orders/DeliveriesManager/index.js +5 -1
- package/src/components/Orders/DriversManager/index.js +7 -1
- package/src/components/Orders/GoogleMapsApiKeySettingButton/index.js +94 -0
- package/src/components/Orders/GoogleMapsApiKeySettingButton/style.js +38 -0
- package/src/components/Orders/Messages/styles.js +6 -0
- package/src/components/Orders/OrderContactInformation/index.js +1 -1
- package/src/components/Orders/OrdersContentHeader/index.js +6 -1
- package/src/components/Orders/OrdersManager/index.js +2 -1
- package/src/components/Profile/ProfilePage/index.js +2 -0
- package/src/components/Profile/ProfilePage/styles.js +2 -1
- package/src/components/Profile/Sessions/index.js +209 -0
- package/src/components/Profile/Sessions/styles.js +132 -0
- package/src/components/Profile/index.js +3 -1
- package/src/components/Settings/EmailSetting/index.js +0 -32
- package/src/components/Settings/PageForm/index.js +3 -0
- package/src/components/Settings/Settings/index.js +0 -65
- package/src/components/Shared/CitySelector/index.js +8 -0
- package/src/components/Shared/Modal/index.js +32 -26
- package/src/components/Shared/Modal/styles.js +11 -3
- package/src/components/SidebarMenu/index.js +92 -70
- package/src/components/SidebarMenu/styles.js +8 -1
- package/src/components/Stores/AddBusinessForm/index.js +10 -8
- package/src/components/Stores/BusinessBrandGENDetail/index.js +3 -0
- package/src/components/Stores/BusinessProductList/styles.js +1 -1
- package/src/components/Stores/BusinessProductsCategories/styles.js +1 -1
- package/src/components/Stores/BusinessProductsCategoyInfo/index.js +3 -0
- package/src/components/Stores/BusinessProductsListing/index.js +35 -1
- package/src/components/Stores/BusinessProductsListing/styles.js +9 -1
- package/src/components/Stores/BusinessSelectHeader/index.js +14 -2
- package/src/components/Stores/BusinessSelectHeader/styles.js +5 -0
- package/src/components/Stores/BusinessSummary/index.js +27 -10
- package/src/components/Stores/BusinessSummary/styles.js +7 -0
- package/src/components/Stores/BusinessSync/index.js +7 -2
- package/src/components/Stores/BusinessSyncItsaCheckmate/index.js +63 -0
- package/src/components/Stores/BusinessSyncItsaCheckmate/styles.js +88 -0
- package/src/components/Support/index.js +1 -1
- package/src/hooks/useCountdownTimer.js +26 -0
- package/src/index.js +7 -1
- package/src/utils/index.js +61 -0
- package/template/app.js +14 -12
- package/template/assets/images/ItsaCheckmateLogo.png +0 -0
- package/template/assets/images/door-dash.png +0 -0
- package/template/assets/images/myProducts/driver-app-brand.png +0 -0
- package/template/assets/images/myProducts/driver-app-free.png +0 -0
- package/template/assets/images/myProducts/multi-store-customer-app.png +0 -0
- package/template/assets/images/myProducts/my-callcenter-app-brand.png +0 -0
- package/template/assets/images/myProducts/my-callcenter-app-live.png +0 -0
- package/template/assets/images/myProducts/my-kiosk-app-brand.png +0 -0
- package/template/assets/images/myProducts/my-kiosk-app-live.png +0 -0
- package/template/assets/images/myProducts/my-pos-app-brand.png +0 -0
- package/template/assets/images/myProducts/my-pos-app-live.png +0 -0
- package/template/assets/images/myProducts/single-store-customer-app.png +0 -0
- package/template/assets/images/myProducts/store-app-brand.png +0 -0
- package/template/assets/images/myProducts/store-app-free.png +0 -0
- package/template/assets/images/projectStatuses/project-active.png +0 -0
- package/template/assets/images/projectStatuses/project-past-due-payment.png +0 -0
- package/template/components/AutologinParams/index.js +79 -0
- package/template/components/ListenPageChanges/index.js +3 -2
- package/template/config.json +1 -0
- package/template/helmetdata.json +21 -0
- package/template/pages/CallCenterApp/index.js +12 -0
- package/template/pages/KioskApp/index.js +12 -0
- package/template/pages/PosApp/index.js +12 -0
- package/template/theme.json +3 -0
- package/_modules/components/MyProducts/DriverApp/styles.js +0 -29
- package/_modules/components/MyProducts/StoreApp/styles.js +0 -29
- package/src/components/MyProducts/CustomerApp/styles.js +0 -59
- package/src/components/MyProducts/DriverApp/styles.js +0 -104
- package/src/components/MyProducts/StoreApp/styles.js +0 -104
|
@@ -1,41 +1,468 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useLanguage } from 'ordering-components-admin-external'
|
|
1
|
+
import React, { useRef, useState } from 'react'
|
|
2
|
+
import { useLanguage, ExamineClick, DragAndDrop, useApi, OrderingWebsite as OrderingWebsiteController } from 'ordering-components-admin-external'
|
|
3
3
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
4
|
-
import { IconButton } from '../../../styles'
|
|
5
|
-
import {
|
|
4
|
+
import { Button, IconButton, Input, TextArea } from '../../../styles'
|
|
5
|
+
import {
|
|
6
|
+
List as MenuIcon,
|
|
7
|
+
Image as DumyPhoto,
|
|
8
|
+
CheckSquareFill as CheckedIcon,
|
|
9
|
+
Square as UnCheckedIcon
|
|
10
|
+
} from 'react-bootstrap-icons'
|
|
6
11
|
import { useTheme } from 'styled-components'
|
|
12
|
+
import { Alert, Modal, ImageCrop, ColorPicker } from '../../Shared'
|
|
13
|
+
import { ContentForm } from '../ContentForm'
|
|
14
|
+
import { bytesConverter } from '../../../utils'
|
|
7
15
|
import {
|
|
8
16
|
Container,
|
|
9
17
|
HeaderTitleContainer,
|
|
10
18
|
WebsiteWrapper,
|
|
11
|
-
InfoWrapper
|
|
19
|
+
InfoWrapper,
|
|
20
|
+
MoreSettingsHeader,
|
|
21
|
+
FormWrapper,
|
|
22
|
+
InputFormWrapper,
|
|
23
|
+
FormGroup,
|
|
24
|
+
InnerBlock,
|
|
25
|
+
FormControl,
|
|
26
|
+
ImageFormGroup,
|
|
27
|
+
LogoImage,
|
|
28
|
+
UploadImageIconContainer,
|
|
29
|
+
UploadImageIcon,
|
|
30
|
+
ImgInfoWrapper,
|
|
31
|
+
BackgroundImage,
|
|
32
|
+
CheckBoxWrapper,
|
|
33
|
+
ColorPickerWrapper,
|
|
34
|
+
ContentWrapper
|
|
12
35
|
} from './styles'
|
|
36
|
+
import Skeleton from 'react-loading-skeleton'
|
|
37
|
+
|
|
38
|
+
const OrderingWebsiteUI = (props) => {
|
|
39
|
+
const {
|
|
40
|
+
themeValues,
|
|
41
|
+
orderingTheme,
|
|
42
|
+
setThemeValues,
|
|
43
|
+
handleUpdateSiteTheme
|
|
44
|
+
} = props
|
|
13
45
|
|
|
14
|
-
export const OrderingWebsite = () => {
|
|
15
46
|
const [, t] = useLanguage()
|
|
16
47
|
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
17
48
|
const theme = useTheme()
|
|
49
|
+
const [ordering] = useApi()
|
|
50
|
+
|
|
51
|
+
const logoRef = useRef(null)
|
|
52
|
+
const backgrooundRef = useRef(null)
|
|
53
|
+
|
|
54
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
55
|
+
const [cropState, setCropState] = useState({ name: null, data: null, open: false })
|
|
56
|
+
const [homePageContent, setHomePageContent] = useState(false)
|
|
57
|
+
const [footerContent, setFooterContent] = useState(false)
|
|
58
|
+
|
|
59
|
+
const handleClickImage = (type) => {
|
|
60
|
+
if (type === 'logo') {
|
|
61
|
+
logoRef.current.click()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (type === 'homepage_background') {
|
|
65
|
+
backgrooundRef.current.click()
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const closeAlert = () => {
|
|
70
|
+
setAlertState({
|
|
71
|
+
open: false,
|
|
72
|
+
content: []
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const handleChangePhoto = (croppedImg) => {
|
|
77
|
+
handleChangeValue(croppedImg, 'images', `${cropState?.name}.components.image`)
|
|
78
|
+
setCropState({ name: null, data: null, open: false })
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const handleFiles = (files, name) => {
|
|
82
|
+
if (files.length === 1) {
|
|
83
|
+
const type = files[0].type.split('/')[0]
|
|
84
|
+
if (type !== 'image') {
|
|
85
|
+
setAlertState({
|
|
86
|
+
open: true,
|
|
87
|
+
content: [t('ERROR_ONLY_IMAGES', 'Only images can be accepted')]
|
|
88
|
+
})
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (bytesConverter(files[0]?.size) > 2048) {
|
|
93
|
+
setAlertState({
|
|
94
|
+
open: true,
|
|
95
|
+
content: [t('IMAGE_MAXIMUM_SIZE', 'The maximum image size is 2 megabytes')]
|
|
96
|
+
})
|
|
97
|
+
return
|
|
98
|
+
}
|
|
99
|
+
const reader = new window.FileReader()
|
|
100
|
+
reader.readAsDataURL(files[0])
|
|
101
|
+
reader.onload = () => {
|
|
102
|
+
setCropState({ name: name, data: reader.result, open: true })
|
|
103
|
+
}
|
|
104
|
+
reader.onerror = error => console.log(error)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const updateObject = (object, newValue, path) => {
|
|
109
|
+
const stack = path.split('.')
|
|
110
|
+
while (stack.length > 1) {
|
|
111
|
+
object = object[stack.shift()]
|
|
112
|
+
}
|
|
113
|
+
object[stack.shift()] = newValue
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const handleChangeValue = (value, section, block) => {
|
|
117
|
+
const _themeValues = JSON.parse(JSON.stringify(themeValues))
|
|
118
|
+
const path = [section, 'components', block].join('.')
|
|
119
|
+
updateObject(_themeValues, value, path)
|
|
120
|
+
setThemeValues(_themeValues)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const handleChangeSiteSettings = (e) => {
|
|
124
|
+
handleChangeValue(e.target.value, 'website_settings', `values.${e.target.name}`)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const handleChangeContent = (type, content) => {
|
|
128
|
+
handleChangeValue(content, 'theme_settings', `values.${type}`)
|
|
129
|
+
}
|
|
18
130
|
|
|
19
131
|
return (
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
132
|
+
<>
|
|
133
|
+
<Container>
|
|
134
|
+
<HeaderTitleContainer>
|
|
135
|
+
{isCollapse && (
|
|
136
|
+
<IconButton
|
|
137
|
+
color='black'
|
|
138
|
+
onClick={() => handleMenuCollapse(false)}
|
|
139
|
+
>
|
|
140
|
+
<MenuIcon />
|
|
141
|
+
</IconButton>
|
|
142
|
+
)}
|
|
143
|
+
<h1>{t('MY_PRODUCTS', 'My products')}</h1>
|
|
144
|
+
</HeaderTitleContainer>
|
|
145
|
+
<WebsiteWrapper>
|
|
146
|
+
<InfoWrapper>
|
|
147
|
+
<h1>{t('ORDERING_WEBSITE', 'Ordering website')}</h1>
|
|
148
|
+
<p>{t('ORDERING_WEBSITE_DESC', 'This product is included in your project by default.')}</p>
|
|
149
|
+
</InfoWrapper>
|
|
150
|
+
<img src={theme.images.myProducts.orderingWebsite} alt='ordering-website' />
|
|
151
|
+
</WebsiteWrapper>
|
|
152
|
+
<MoreSettingsHeader>
|
|
153
|
+
<h2>{t('MORE_SETTINGS_FOR_YOUR', 'More settings for your')} <span>{t('WEBSITE_ORIGINAL', 'website')}</span></h2>
|
|
154
|
+
<p>{t('MORE_SETTINGS_YOUR_WEBSITE_DESC', 'Change background, colors, fonts, style, branding and all the essentials of your brand.')}</p>
|
|
155
|
+
</MoreSettingsHeader>
|
|
156
|
+
<FormWrapper>
|
|
157
|
+
<InputFormWrapper>
|
|
158
|
+
<InnerBlock>
|
|
159
|
+
<h4>{t('WEBSITE_SETTINGS', 'Website settings')}</h4>
|
|
160
|
+
<FormGroup>
|
|
161
|
+
<label>
|
|
162
|
+
{orderingTheme?.loading ? (
|
|
163
|
+
<Skeleton height={20} width={150} />
|
|
164
|
+
) : (
|
|
165
|
+
<>
|
|
166
|
+
{t('NAME', 'Name')}
|
|
167
|
+
</>
|
|
168
|
+
)}
|
|
169
|
+
</label>
|
|
170
|
+
{orderingTheme?.loading ? (
|
|
171
|
+
<Skeleton height={40} style={{ width: '100%' }} />
|
|
172
|
+
) : (
|
|
173
|
+
<Input
|
|
174
|
+
name='name'
|
|
175
|
+
placeholder={t('SOURCE_DEMO_WEBSITE', 'Source demo website')}
|
|
176
|
+
value={themeValues?.website_settings?.components?.values?.name || ''}
|
|
177
|
+
onChange={handleChangeSiteSettings}
|
|
178
|
+
/>
|
|
179
|
+
)}
|
|
180
|
+
</FormGroup>
|
|
181
|
+
<FormGroup>
|
|
182
|
+
<label>
|
|
183
|
+
{orderingTheme?.loading ? (
|
|
184
|
+
<Skeleton height={20} width={150} />
|
|
185
|
+
) : (
|
|
186
|
+
<>
|
|
187
|
+
{t('DESCRIPTION', 'Decription')}
|
|
188
|
+
</>
|
|
189
|
+
)}
|
|
190
|
+
</label>
|
|
191
|
+
{orderingTheme?.loading ? (
|
|
192
|
+
<Skeleton height={65} style={{ width: '100%' }} />
|
|
193
|
+
) : (
|
|
194
|
+
<TextArea
|
|
195
|
+
name='description'
|
|
196
|
+
placeholder={t('DESCRIPTION', 'Decription')}
|
|
197
|
+
value={themeValues?.website_settings?.components?.values?.description || ''}
|
|
198
|
+
onChange={handleChangeSiteSettings}
|
|
199
|
+
/>
|
|
200
|
+
)}
|
|
201
|
+
</FormGroup>
|
|
202
|
+
<FormGroup>
|
|
203
|
+
<label>
|
|
204
|
+
{orderingTheme?.loading ? (
|
|
205
|
+
<Skeleton height={20} width={150} />
|
|
206
|
+
) : (
|
|
207
|
+
<>
|
|
208
|
+
{t('TEMPORAL_DOMAIN', 'Temporal domain')}
|
|
209
|
+
</>
|
|
210
|
+
)}
|
|
211
|
+
</label>
|
|
212
|
+
{orderingTheme?.loading ? (
|
|
213
|
+
<Skeleton height={40} style={{ width: '100%' }} />
|
|
214
|
+
) : (
|
|
215
|
+
<FormControl>
|
|
216
|
+
<div className='before'>https://</div>
|
|
217
|
+
<Input
|
|
218
|
+
name='default_domain'
|
|
219
|
+
placeholder={t('NAME', 'Name')}
|
|
220
|
+
disabled
|
|
221
|
+
defaultValue={ordering.project}
|
|
222
|
+
/>
|
|
223
|
+
<div className='after'>.tryordering.com</div>
|
|
224
|
+
</FormControl>
|
|
225
|
+
)}
|
|
226
|
+
</FormGroup>
|
|
227
|
+
<FormGroup>
|
|
228
|
+
<label>
|
|
229
|
+
{orderingTheme?.loading ? (
|
|
230
|
+
<Skeleton height={20} width={150} />
|
|
231
|
+
) : (
|
|
232
|
+
<>
|
|
233
|
+
{t('CUSTOM_DOMAIN', 'Custom domain')}
|
|
234
|
+
</>
|
|
235
|
+
)}
|
|
236
|
+
</label>
|
|
237
|
+
{orderingTheme?.loading ? (
|
|
238
|
+
<Skeleton height={40} style={{ width: '100%' }} />
|
|
239
|
+
) : (
|
|
240
|
+
<Button
|
|
241
|
+
color='primary'
|
|
242
|
+
outline
|
|
243
|
+
borderRadius='8px'
|
|
244
|
+
onClick={() => window.open('https://www.ordering.co/custom-domain-change', '_blank')}
|
|
245
|
+
>
|
|
246
|
+
{t('REQUEST_CUSTOM_DOMAIN', 'Request custom domain')}
|
|
247
|
+
</Button>
|
|
248
|
+
)}
|
|
249
|
+
</FormGroup>
|
|
250
|
+
</InnerBlock>
|
|
251
|
+
</InputFormWrapper>
|
|
252
|
+
<InputFormWrapper>
|
|
253
|
+
<h4>{t('IMAGES', 'Images')}</h4>
|
|
254
|
+
<InnerBlock>
|
|
255
|
+
{orderingTheme?.loading ? (
|
|
256
|
+
<>
|
|
257
|
+
<Skeleton height={100} width={100} style={{ marginBottom: '15px' }} />
|
|
258
|
+
<Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
|
|
259
|
+
</>
|
|
260
|
+
) : (
|
|
261
|
+
<ImageFormGroup>
|
|
262
|
+
<LogoImage
|
|
263
|
+
onClick={() => handleClickImage('logo')}
|
|
264
|
+
>
|
|
265
|
+
<ExamineClick
|
|
266
|
+
onFiles={files => handleFiles(files, 'logo')}
|
|
267
|
+
childRef={(e) => { logoRef.current = e }}
|
|
268
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
269
|
+
>
|
|
270
|
+
<DragAndDrop
|
|
271
|
+
onDrop={dataTransfer => handleFiles(dataTransfer.files, 'logo')}
|
|
272
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
273
|
+
disabled={orderingTheme.loading}
|
|
274
|
+
>
|
|
275
|
+
{themeValues?.images?.components?.logo?.components?.image
|
|
276
|
+
? <img src={themeValues?.images?.components?.logo?.components?.image} alt='logo image' loading='lazy' />
|
|
277
|
+
: (
|
|
278
|
+
<UploadImageIconContainer>
|
|
279
|
+
<UploadImageIcon>
|
|
280
|
+
<DumyPhoto />
|
|
281
|
+
<span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
|
|
282
|
+
</UploadImageIcon>
|
|
283
|
+
</UploadImageIconContainer>
|
|
284
|
+
)}
|
|
285
|
+
</DragAndDrop>
|
|
286
|
+
</ExamineClick>
|
|
287
|
+
</LogoImage>
|
|
288
|
+
<ImgInfoWrapper>
|
|
289
|
+
<h4>{t('HEADER_LOGO', 'Header logo')}</h4>
|
|
290
|
+
<p>900 x 200 px</p>
|
|
291
|
+
<p>{t('FORMAT', 'Format')}: PNG</p>
|
|
292
|
+
</ImgInfoWrapper>
|
|
293
|
+
</ImageFormGroup>
|
|
294
|
+
)}
|
|
295
|
+
{orderingTheme?.loading ? (
|
|
296
|
+
<>
|
|
297
|
+
<Skeleton height={100} style={{ marginBottom: '15px', width: '100%' }} />
|
|
298
|
+
<Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
|
|
299
|
+
</>
|
|
300
|
+
) : (
|
|
301
|
+
<ImageFormGroup>
|
|
302
|
+
<BackgroundImage
|
|
303
|
+
onClick={() => handleClickImage('homepage_background')}
|
|
304
|
+
>
|
|
305
|
+
<ExamineClick
|
|
306
|
+
onFiles={files => handleFiles(files, 'homepage_background')}
|
|
307
|
+
childRef={(e) => { backgrooundRef.current = e }}
|
|
308
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
309
|
+
>
|
|
310
|
+
<DragAndDrop
|
|
311
|
+
onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_background')}
|
|
312
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
313
|
+
disabled={orderingTheme.loading}
|
|
314
|
+
>
|
|
315
|
+
{themeValues?.images?.components?.homepage_background?.components?.image
|
|
316
|
+
? <img src={themeValues?.images?.components?.homepage_background?.components?.image} alt='backgrond image' loading='lazy' />
|
|
317
|
+
: (
|
|
318
|
+
<UploadImageIconContainer>
|
|
319
|
+
<UploadImageIcon>
|
|
320
|
+
<DumyPhoto />
|
|
321
|
+
<span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
|
|
322
|
+
</UploadImageIcon>
|
|
323
|
+
</UploadImageIconContainer>
|
|
324
|
+
)}
|
|
325
|
+
</DragAndDrop>
|
|
326
|
+
</ExamineClick>
|
|
327
|
+
</BackgroundImage>
|
|
328
|
+
<ImgInfoWrapper>
|
|
329
|
+
<h4>{t('HOMEPAGE_BACKGROUND', 'Homepage background')}</h4>
|
|
330
|
+
<p>1920 x 1280 px</p>
|
|
331
|
+
<p>{t('FORMAT', 'Format')}: PNG</p>
|
|
332
|
+
</ImgInfoWrapper>
|
|
333
|
+
</ImageFormGroup>
|
|
334
|
+
)}
|
|
335
|
+
{orderingTheme?.loading ? (
|
|
336
|
+
<Skeleton width={200} height={20} />
|
|
337
|
+
) : (
|
|
338
|
+
<CheckBoxWrapper
|
|
339
|
+
onClick={() => handleChangeValue(!themeValues?.images?.components?.homepage_image_fullscreen, 'images', 'homepage_image_fullscreen')}
|
|
340
|
+
>
|
|
341
|
+
{themeValues?.images?.components?.homepage_image_fullscreen ? (
|
|
342
|
+
<CheckedIcon className='active' />
|
|
343
|
+
) : (
|
|
344
|
+
<UnCheckedIcon />
|
|
345
|
+
)}
|
|
346
|
+
<span>{t('HOMEPAGE_IMAGE_FULLSCREEN', 'Homepage image fullscreen')}</span>
|
|
347
|
+
</CheckBoxWrapper>
|
|
348
|
+
)}
|
|
349
|
+
</InnerBlock>
|
|
350
|
+
</InputFormWrapper>
|
|
351
|
+
{!orderingTheme?.loading && (
|
|
352
|
+
<InputFormWrapper>
|
|
353
|
+
<h4>{t('THEME_SETTINGS', 'Theme Settings')}</h4>
|
|
354
|
+
<InnerBlock>
|
|
355
|
+
<ColorPickerWrapper>
|
|
356
|
+
<div>
|
|
357
|
+
<p>{t('PRIMARY_COLOR_BUTTONS', 'Primary Color for Buttons')}</p>
|
|
358
|
+
<ColorPicker
|
|
359
|
+
defaultColor={themeValues?.theme_settings?.components?.style?.primary_btn_color}
|
|
360
|
+
onChangeColor={(color) => handleChangeValue(color, 'theme_settings', 'style.primary_btn_color')}
|
|
361
|
+
/>
|
|
362
|
+
</div>
|
|
363
|
+
<div>
|
|
364
|
+
<p>{t('PRIMARY_COLOR_LINKS', 'Primary Color for Links')}</p>
|
|
365
|
+
<ColorPicker
|
|
366
|
+
defaultColor={themeValues?.theme_settings?.components?.style?.primary_link_color}
|
|
367
|
+
onChangeColor={(color) => handleChangeValue(color, 'theme_settings', 'style.primary_link_color')}
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
</ColorPickerWrapper>
|
|
371
|
+
<ContentWrapper>
|
|
372
|
+
<div>
|
|
373
|
+
<p>{t('HOMEPAGE_CONTENT', 'Homepage Content')}</p>
|
|
374
|
+
<Button
|
|
375
|
+
color='primary'
|
|
376
|
+
borderRadius='8px'
|
|
377
|
+
outline
|
|
378
|
+
onClick={() => setHomePageContent(true)}
|
|
379
|
+
>
|
|
380
|
+
{t('HOMEPAGE_CONTENT', 'Homepage content')}
|
|
381
|
+
</Button>
|
|
382
|
+
</div>
|
|
383
|
+
<div>
|
|
384
|
+
<p>{t('FOOTER_CONTENT', 'Footer Content')}</p>
|
|
385
|
+
<Button
|
|
386
|
+
color='primary'
|
|
387
|
+
borderRadius='8px'
|
|
388
|
+
outline
|
|
389
|
+
onClick={() => setFooterContent(true)}
|
|
390
|
+
>
|
|
391
|
+
{t('FOOTER_CONTENT', 'Footer content')}
|
|
392
|
+
</Button>
|
|
393
|
+
</div>
|
|
394
|
+
</ContentWrapper>
|
|
395
|
+
</InnerBlock>
|
|
396
|
+
</InputFormWrapper>
|
|
397
|
+
)}
|
|
398
|
+
|
|
399
|
+
<Button
|
|
400
|
+
color='primary'
|
|
401
|
+
borderRadius='8px'
|
|
402
|
+
onClick={() => handleUpdateSiteTheme()}
|
|
403
|
+
disabled={orderingTheme?.loading}
|
|
26
404
|
>
|
|
27
|
-
|
|
28
|
-
</
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
405
|
+
{t('SAVE', 'Save')}
|
|
406
|
+
</Button>
|
|
407
|
+
</FormWrapper>
|
|
408
|
+
</Container>
|
|
409
|
+
<Alert
|
|
410
|
+
title={t('BUSINESS', 'Business')}
|
|
411
|
+
content={alertState.content}
|
|
412
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
413
|
+
open={alertState.open}
|
|
414
|
+
onClose={() => closeAlert()}
|
|
415
|
+
onAccept={() => closeAlert()}
|
|
416
|
+
closeOnBackdrop={false}
|
|
417
|
+
/>
|
|
418
|
+
<Modal
|
|
419
|
+
width='700px'
|
|
420
|
+
height='80vh'
|
|
421
|
+
padding='30px'
|
|
422
|
+
title={t('IMAGE_CROP', 'Image crop')}
|
|
423
|
+
open={cropState?.open}
|
|
424
|
+
onClose={() => setCropState({ ...cropState, open: false })}
|
|
425
|
+
>
|
|
426
|
+
<ImageCrop
|
|
427
|
+
photo={cropState?.data}
|
|
428
|
+
handleChangePhoto={handleChangePhoto}
|
|
429
|
+
/>
|
|
430
|
+
</Modal>
|
|
431
|
+
<Modal
|
|
432
|
+
width='70%'
|
|
433
|
+
open={homePageContent}
|
|
434
|
+
onClose={() => setHomePageContent(false)}
|
|
435
|
+
>
|
|
436
|
+
<ContentForm
|
|
437
|
+
title={t('HOME_PAGE_CONTENT', 'Home Page Content')}
|
|
438
|
+
content={themeValues?.theme_settings?.components?.values?.homepage_content}
|
|
439
|
+
onClose={() => setHomePageContent(false)}
|
|
440
|
+
handleChangeContent={handleChangeContent}
|
|
441
|
+
type='homepage_content'
|
|
442
|
+
/>
|
|
443
|
+
</Modal>
|
|
444
|
+
<Modal
|
|
445
|
+
width='70%'
|
|
446
|
+
open={footerContent}
|
|
447
|
+
onClose={() => setFooterContent(false)}
|
|
448
|
+
>
|
|
449
|
+
<ContentForm
|
|
450
|
+
title={t('FOOTER', 'Footer')}
|
|
451
|
+
content={themeValues?.theme_settings?.components?.values?.footer_content}
|
|
452
|
+
onClose={() => setFooterContent(false)}
|
|
453
|
+
handleChangeContent={handleChangeContent}
|
|
454
|
+
type='footer_content'
|
|
455
|
+
/>
|
|
456
|
+
</Modal>
|
|
457
|
+
</>
|
|
40
458
|
)
|
|
41
459
|
}
|
|
460
|
+
|
|
461
|
+
export const OrderingWebsite = (props) => {
|
|
462
|
+
const orderingWebsiteProps = {
|
|
463
|
+
...props,
|
|
464
|
+
UIComponent: OrderingWebsiteUI,
|
|
465
|
+
appId: 'orderingwebreact'
|
|
466
|
+
}
|
|
467
|
+
return <OrderingWebsiteController {...orderingWebsiteProps} />
|
|
468
|
+
}
|