ordering-ui-admin-external 1.6.2 → 1.6.4
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.e16bb3bc2dee43d1cf23.js} +2 -2
- package/_bundles/{ordering-ui-admin.488bdda58ba73188d3b5.js.LICENSE.txt → ordering-ui-admin.e16bb3bc2dee43d1cf23.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 +38 -6
- package/_modules/components/Home/HomePage/styles.js +31 -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 +245 -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 +352 -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 +74 -7
- package/src/components/Home/HomePage/styles.js +62 -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 +240 -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 +455 -25
- package/src/components/MyProducts/OrderingWebsite/styles.js +235 -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,83 +1,29 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
-
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
4
|
-
import { Button, IconButton } from '../../../styles'
|
|
5
|
-
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
6
3
|
import { useTheme } from 'styled-components'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
Container,
|
|
10
|
-
HeaderTitleContainer,
|
|
11
|
-
ContentWrapper,
|
|
12
|
-
FreeBtnWrapper,
|
|
13
|
-
BrandedBtnWrapper
|
|
14
|
-
} from './styles'
|
|
4
|
+
import { AppLayout } from '../AppLayout'
|
|
15
5
|
|
|
16
6
|
export const DriverApp = () => {
|
|
17
7
|
const [, t] = useLanguage()
|
|
18
8
|
const theme = useTheme()
|
|
19
|
-
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
20
9
|
|
|
21
|
-
const
|
|
22
|
-
|
|
10
|
+
const appInfo = {
|
|
11
|
+
title: t('DRIVER_APP', 'Driver App'),
|
|
12
|
+
description: t('DRIVER_APP_DESCRIPTION', 'Your fleet\'s best companion gives drivers a tool to receive orders, follow optimal routes, add delivery evidence, set orders\' timing, and control their busy times.'),
|
|
13
|
+
images: {
|
|
14
|
+
live: theme.images.myProducts.driverAppFree,
|
|
15
|
+
brand: theme.images.myProducts.driverAppBrand
|
|
16
|
+
},
|
|
17
|
+
live_title: t('FREE_TO_USE', 'Free to use'),
|
|
18
|
+
live_description: t('FREE_TO_USE_DESCRIPTION', 'This is a branded Ordering.co product. use it with your project, email, and password for free. features might be limited.'),
|
|
19
|
+
apple_store_link: 'https://apps.apple.com/us/app/driver-app-2-0/id1606257815',
|
|
20
|
+
google_play_link: 'https://play.google.com/store/apps/details?id=com.ordering.deliveryv5',
|
|
21
|
+
brand_title: t('YOUR_BRANDED_APP', 'Your Branded App'),
|
|
22
|
+
brand_description: t('BRANDED_APP_DESCRIPTION', 'This App is delivered in less than five working days, fully branded with your guidelines, removing all ordering.co presence to give your brand more awareness.'),
|
|
23
|
+
purchase_link: 'https://www.ordering.co/ordering-sales'
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
|
-
<
|
|
27
|
-
<HeaderTitleContainer>
|
|
28
|
-
{isCollapse && (
|
|
29
|
-
<IconButton
|
|
30
|
-
color='black'
|
|
31
|
-
onClick={() => handleMenuCollapse(false)}
|
|
32
|
-
>
|
|
33
|
-
<MenuIcon />
|
|
34
|
-
</IconButton>
|
|
35
|
-
)}
|
|
36
|
-
<h1>{t('MY_PRODUCTS', 'My products')}</h1>
|
|
37
|
-
</HeaderTitleContainer>
|
|
38
|
-
<ContentWrapper>
|
|
39
|
-
<h1>{t('DRIVER_APP', 'Driver app')}</h1>
|
|
40
|
-
<p>{t('DRIVER_APP_DESC', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.')}</p>
|
|
41
|
-
<BoxLayout
|
|
42
|
-
title={t('FREE_TO_USE', 'Free to use')}
|
|
43
|
-
description={t('FREE_TO_USE_DESC', 'This app can be used by your fleet with the ordering.co logo.')}
|
|
44
|
-
photo={theme.images.myProducts.driverApp}
|
|
45
|
-
>
|
|
46
|
-
<FreeBtnWrapper>
|
|
47
|
-
<Button
|
|
48
|
-
color='primary'
|
|
49
|
-
borderRadius='8px'
|
|
50
|
-
outline
|
|
51
|
-
onClick={() => handleOpenURL('https://apps.apple.com/us/app/driver-app-2-0/id1606257815')}
|
|
52
|
-
>
|
|
53
|
-
{t('DOWNLOAD_APPLE', 'Download apple')}
|
|
54
|
-
</Button>
|
|
55
|
-
<Button
|
|
56
|
-
color='primary'
|
|
57
|
-
borderRadius='8px'
|
|
58
|
-
outline
|
|
59
|
-
onClick={() => handleOpenURL('https://play.google.com/store/apps/details?id=com.ordering.deliveryv5')}
|
|
60
|
-
>
|
|
61
|
-
{t('DOWNLOAD_GOOGLE', 'Download google')}
|
|
62
|
-
</Button>
|
|
63
|
-
</FreeBtnWrapper>
|
|
64
|
-
</BoxLayout>
|
|
65
|
-
<BoxLayout
|
|
66
|
-
title={t('BRANDED_BY_YOU', 'Branded by you')}
|
|
67
|
-
description={t('BRANDED_BY_YOU_DESC', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Id mi quam aenean in faucibus ac integer libero. Eu egestas sit imperdiet at sit adipiscing ullamcorper sed sit.')}
|
|
68
|
-
photo={theme.images.myProducts.driverApp}
|
|
69
|
-
>
|
|
70
|
-
<BrandedBtnWrapper>
|
|
71
|
-
<Button
|
|
72
|
-
color='primary'
|
|
73
|
-
borderRadius='8px'
|
|
74
|
-
onClick={() => handleOpenURL('https://www.ordering.co/ordering-sales')}
|
|
75
|
-
>
|
|
76
|
-
{t('REQUEST_APP_NOW', 'Request app now')}
|
|
77
|
-
</Button>
|
|
78
|
-
</BrandedBtnWrapper>
|
|
79
|
-
</BoxLayout>
|
|
80
|
-
</ContentWrapper>
|
|
81
|
-
</Container>
|
|
27
|
+
<AppLayout appInfo={appInfo} />
|
|
82
28
|
)
|
|
83
29
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
4
|
+
import { AppLayout } from '../AppLayout'
|
|
5
|
+
|
|
6
|
+
export const KioskApp = () => {
|
|
7
|
+
const [, t] = useLanguage()
|
|
8
|
+
const theme = useTheme()
|
|
9
|
+
|
|
10
|
+
const appInfo = {
|
|
11
|
+
title: t('ORDERING_SELF_KIOSK', 'Ordering Self Ordering Kiosk'),
|
|
12
|
+
description: t('KIOS_DESCRIPTION', 'This tool will help your store complete that final step on each sale with innovative and intuitive software and hardware inside your locations.'),
|
|
13
|
+
images: {
|
|
14
|
+
live: theme.images.myProducts.myKioskAppLive,
|
|
15
|
+
brand: theme.images.myProducts.myKioskAppBrand
|
|
16
|
+
},
|
|
17
|
+
live_title: t('LIVE_DEMO', 'Live Demo'),
|
|
18
|
+
live_description: t('APP_LIVE_DEMO_DESCRIPTION', 'This is a branded Ordering.co product. play with it and understand how it works'),
|
|
19
|
+
apple_store_link: 'https://apps.apple.com/us/app/ordering-kiosk-2-0/id1609314960',
|
|
20
|
+
google_play_link: 'https://play.google.com/store/apps/details?id=com.ordering.orderingkioskv5&hl=en&gl=US',
|
|
21
|
+
brand_title: t('YOUR_BRANDED_KIOSK', 'Your Branded Kiosk'),
|
|
22
|
+
brand_description: t('KIOSK_BRANDED_DESCRIPTION', 'This App is delivered in less than five working days, fully branded with your guidelines, and ready to be used on any tablet you add it to.'),
|
|
23
|
+
purchase_link: 'https://www.ordering.co/ordering-sales'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<AppLayout appInfo={appInfo} />
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -1,41 +1,471 @@
|
|
|
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
|
+
TemporalDomail,
|
|
26
|
+
ImageFormGroup,
|
|
27
|
+
LogoImage,
|
|
28
|
+
UploadImageIconContainer,
|
|
29
|
+
UploadImageIcon,
|
|
30
|
+
ImgInfoWrapper,
|
|
31
|
+
BackgroundImage,
|
|
32
|
+
CheckBoxWrapper,
|
|
33
|
+
ColorPickerWrapper,
|
|
34
|
+
ContentWrapper,
|
|
35
|
+
WebsiteButtonWrapper
|
|
12
36
|
} from './styles'
|
|
37
|
+
import Skeleton from 'react-loading-skeleton'
|
|
38
|
+
|
|
39
|
+
const OrderingWebsiteUI = (props) => {
|
|
40
|
+
const {
|
|
41
|
+
themeValues,
|
|
42
|
+
orderingTheme,
|
|
43
|
+
setThemeValues,
|
|
44
|
+
handleUpdateSiteTheme
|
|
45
|
+
} = props
|
|
13
46
|
|
|
14
|
-
export const OrderingWebsite = () => {
|
|
15
47
|
const [, t] = useLanguage()
|
|
16
48
|
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
17
49
|
const theme = useTheme()
|
|
50
|
+
const [ordering] = useApi()
|
|
51
|
+
|
|
52
|
+
const logoRef = useRef(null)
|
|
53
|
+
const backgrooundRef = useRef(null)
|
|
54
|
+
|
|
55
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
56
|
+
const [cropState, setCropState] = useState({ name: null, data: null, open: false })
|
|
57
|
+
const [homePageContent, setHomePageContent] = useState(false)
|
|
58
|
+
const [footerContent, setFooterContent] = useState(false)
|
|
59
|
+
|
|
60
|
+
const handleClickImage = (type) => {
|
|
61
|
+
if (type === 'logo') {
|
|
62
|
+
logoRef.current.click()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (type === 'homepage_background') {
|
|
66
|
+
backgrooundRef.current.click()
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const closeAlert = () => {
|
|
71
|
+
setAlertState({
|
|
72
|
+
open: false,
|
|
73
|
+
content: []
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const handleChangePhoto = (croppedImg) => {
|
|
78
|
+
handleChangeValue(croppedImg, 'images', `${cropState?.name}.components.image`)
|
|
79
|
+
setCropState({ name: null, data: null, open: false })
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const handleFiles = (files, name) => {
|
|
83
|
+
if (files.length === 1) {
|
|
84
|
+
const type = files[0].type.split('/')[0]
|
|
85
|
+
if (type !== 'image') {
|
|
86
|
+
setAlertState({
|
|
87
|
+
open: true,
|
|
88
|
+
content: [t('ERROR_ONLY_IMAGES', 'Only images can be accepted')]
|
|
89
|
+
})
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (bytesConverter(files[0]?.size) > 2048) {
|
|
94
|
+
setAlertState({
|
|
95
|
+
open: true,
|
|
96
|
+
content: [t('IMAGE_MAXIMUM_SIZE', 'The maximum image size is 2 megabytes')]
|
|
97
|
+
})
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
const reader = new window.FileReader()
|
|
101
|
+
reader.readAsDataURL(files[0])
|
|
102
|
+
reader.onload = () => {
|
|
103
|
+
setCropState({ name: name, data: reader.result, open: true })
|
|
104
|
+
}
|
|
105
|
+
reader.onerror = error => console.log(error)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const updateObject = (object, newValue, path) => {
|
|
110
|
+
const stack = path.split('.')
|
|
111
|
+
while (stack.length > 1) {
|
|
112
|
+
object = object[stack.shift()]
|
|
113
|
+
}
|
|
114
|
+
object[stack.shift()] = newValue
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const handleChangeValue = (value, section, block) => {
|
|
118
|
+
const _themeValues = JSON.parse(JSON.stringify(themeValues))
|
|
119
|
+
const path = [section, 'components', block].join('.')
|
|
120
|
+
updateObject(_themeValues, value, path)
|
|
121
|
+
setThemeValues(_themeValues)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const handleChangeSiteSettings = (e) => {
|
|
125
|
+
handleChangeValue(e.target.value, 'website_settings', `values.${e.target.name}`)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const handleChangeContent = (type, content) => {
|
|
129
|
+
handleChangeValue(content, 'theme_settings', `values.${type}`)
|
|
130
|
+
}
|
|
18
131
|
|
|
19
132
|
return (
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
133
|
+
<>
|
|
134
|
+
<Container>
|
|
135
|
+
<HeaderTitleContainer>
|
|
136
|
+
{isCollapse && (
|
|
137
|
+
<IconButton
|
|
138
|
+
color='black'
|
|
139
|
+
onClick={() => handleMenuCollapse(false)}
|
|
140
|
+
>
|
|
141
|
+
<MenuIcon />
|
|
142
|
+
</IconButton>
|
|
143
|
+
)}
|
|
144
|
+
<h1>{t('MY_PRODUCTS', 'My products')}</h1>
|
|
145
|
+
</HeaderTitleContainer>
|
|
146
|
+
<WebsiteWrapper>
|
|
147
|
+
<InfoWrapper>
|
|
148
|
+
<h1>{t('ORDERING_WEBSITE', 'Ordering website')}</h1>
|
|
149
|
+
<p>{t('ORDERING_WEBSITE_DESC', 'This product is included in your project by default.')}</p>
|
|
150
|
+
</InfoWrapper>
|
|
151
|
+
<img src={theme.images.myProducts.orderingWebsite} alt='ordering-website' />
|
|
152
|
+
</WebsiteWrapper>
|
|
153
|
+
<MoreSettingsHeader>
|
|
154
|
+
<h2>{t('MORE_SETTINGS_FOR_YOUR', 'More settings for your')} <span>{t('WEBSITE_ORIGINAL', 'website')}</span></h2>
|
|
155
|
+
<p>{t('MORE_SETTINGS_YOUR_WEBSITE_DESC', 'Change background, colors, fonts, style, branding and all the essentials of your brand.')}</p>
|
|
156
|
+
</MoreSettingsHeader>
|
|
157
|
+
<WebsiteButtonWrapper>
|
|
158
|
+
<Button
|
|
159
|
+
color='primary'
|
|
160
|
+
borderRadius='8px'
|
|
161
|
+
onClick={() => window.open(`https://${ordering?.project}.tryordering.com`, '_blank')}
|
|
26
162
|
>
|
|
27
|
-
|
|
28
|
-
</
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
163
|
+
{t('VISIT_MY_WEBSITE', 'Visit My Website')}
|
|
164
|
+
</Button>
|
|
165
|
+
</WebsiteButtonWrapper>
|
|
166
|
+
<FormWrapper>
|
|
167
|
+
<InputFormWrapper>
|
|
168
|
+
<InnerBlock>
|
|
169
|
+
<h4>{t('WEBSITE_SETTINGS', 'Website settings')}</h4>
|
|
170
|
+
<FormGroup>
|
|
171
|
+
<label>
|
|
172
|
+
{orderingTheme?.loading ? (
|
|
173
|
+
<Skeleton height={20} width={150} />
|
|
174
|
+
) : (
|
|
175
|
+
<>
|
|
176
|
+
{t('NAME', 'Name')}
|
|
177
|
+
</>
|
|
178
|
+
)}
|
|
179
|
+
</label>
|
|
180
|
+
{orderingTheme?.loading ? (
|
|
181
|
+
<Skeleton height={40} style={{ width: '100%' }} />
|
|
182
|
+
) : (
|
|
183
|
+
<Input
|
|
184
|
+
name='name'
|
|
185
|
+
placeholder={t('SOURCE_DEMO_WEBSITE', 'Source demo website')}
|
|
186
|
+
value={themeValues?.website_settings?.components?.values?.name || ''}
|
|
187
|
+
onChange={handleChangeSiteSettings}
|
|
188
|
+
/>
|
|
189
|
+
)}
|
|
190
|
+
</FormGroup>
|
|
191
|
+
<FormGroup>
|
|
192
|
+
<label>
|
|
193
|
+
{orderingTheme?.loading ? (
|
|
194
|
+
<Skeleton height={20} width={150} />
|
|
195
|
+
) : (
|
|
196
|
+
<>
|
|
197
|
+
{t('DESCRIPTION', 'Decription')}
|
|
198
|
+
</>
|
|
199
|
+
)}
|
|
200
|
+
</label>
|
|
201
|
+
{orderingTheme?.loading ? (
|
|
202
|
+
<Skeleton height={65} style={{ width: '100%' }} />
|
|
203
|
+
) : (
|
|
204
|
+
<TextArea
|
|
205
|
+
name='description'
|
|
206
|
+
placeholder={t('DESCRIPTION', 'Decription')}
|
|
207
|
+
value={themeValues?.website_settings?.components?.values?.description || ''}
|
|
208
|
+
onChange={handleChangeSiteSettings}
|
|
209
|
+
/>
|
|
210
|
+
)}
|
|
211
|
+
</FormGroup>
|
|
212
|
+
<FormGroup>
|
|
213
|
+
<label>
|
|
214
|
+
{orderingTheme?.loading ? (
|
|
215
|
+
<Skeleton height={20} width={150} />
|
|
216
|
+
) : (
|
|
217
|
+
<>
|
|
218
|
+
{t('TEMPORAL_DOMAIN', 'Temporal domain')}
|
|
219
|
+
</>
|
|
220
|
+
)}
|
|
221
|
+
</label>
|
|
222
|
+
{orderingTheme?.loading ? (
|
|
223
|
+
<Skeleton height={20} style={{ width: '100%' }} />
|
|
224
|
+
) : (
|
|
225
|
+
<TemporalDomail>
|
|
226
|
+
{t('VISIT', 'Visit')}: <a href={`https://${ordering?.project}.tryordering.com`} rel='noopener noreferrer' target='_blank'>https://{ordering?.project}.tryordering.com</a>
|
|
227
|
+
</TemporalDomail>
|
|
228
|
+
)}
|
|
229
|
+
</FormGroup>
|
|
230
|
+
<FormGroup>
|
|
231
|
+
<label>
|
|
232
|
+
{orderingTheme?.loading ? (
|
|
233
|
+
<Skeleton height={20} width={150} />
|
|
234
|
+
) : (
|
|
235
|
+
<>
|
|
236
|
+
{t('CUSTOM_DOMAIN', 'Custom domain')}
|
|
237
|
+
</>
|
|
238
|
+
)}
|
|
239
|
+
</label>
|
|
240
|
+
{orderingTheme?.loading ? (
|
|
241
|
+
<Skeleton height={40} style={{ width: '100%' }} />
|
|
242
|
+
) : (
|
|
243
|
+
<Button
|
|
244
|
+
color='primary'
|
|
245
|
+
outline
|
|
246
|
+
borderRadius='8px'
|
|
247
|
+
onClick={() => window.open('https://www.ordering.co/custom-domain-change', '_blank')}
|
|
248
|
+
>
|
|
249
|
+
{t('REQUEST_CUSTOM_DOMAIN', 'Request custom domain')}
|
|
250
|
+
</Button>
|
|
251
|
+
)}
|
|
252
|
+
</FormGroup>
|
|
253
|
+
</InnerBlock>
|
|
254
|
+
</InputFormWrapper>
|
|
255
|
+
<InputFormWrapper>
|
|
256
|
+
<h4>{t('IMAGES', 'Images')}</h4>
|
|
257
|
+
<InnerBlock>
|
|
258
|
+
{orderingTheme?.loading ? (
|
|
259
|
+
<>
|
|
260
|
+
<Skeleton height={100} width={100} style={{ marginBottom: '15px' }} />
|
|
261
|
+
<Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
|
|
262
|
+
</>
|
|
263
|
+
) : (
|
|
264
|
+
<ImageFormGroup>
|
|
265
|
+
<LogoImage
|
|
266
|
+
onClick={() => handleClickImage('logo')}
|
|
267
|
+
>
|
|
268
|
+
<ExamineClick
|
|
269
|
+
onFiles={files => handleFiles(files, 'logo')}
|
|
270
|
+
childRef={(e) => { logoRef.current = e }}
|
|
271
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
272
|
+
>
|
|
273
|
+
<DragAndDrop
|
|
274
|
+
onDrop={dataTransfer => handleFiles(dataTransfer.files, 'logo')}
|
|
275
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
276
|
+
disabled={orderingTheme.loading}
|
|
277
|
+
>
|
|
278
|
+
{themeValues?.images?.components?.logo?.components?.image
|
|
279
|
+
? <img src={themeValues?.images?.components?.logo?.components?.image} alt='logo image' loading='lazy' />
|
|
280
|
+
: (
|
|
281
|
+
<UploadImageIconContainer>
|
|
282
|
+
<UploadImageIcon>
|
|
283
|
+
<DumyPhoto />
|
|
284
|
+
<span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
|
|
285
|
+
</UploadImageIcon>
|
|
286
|
+
</UploadImageIconContainer>
|
|
287
|
+
)}
|
|
288
|
+
</DragAndDrop>
|
|
289
|
+
</ExamineClick>
|
|
290
|
+
</LogoImage>
|
|
291
|
+
<ImgInfoWrapper>
|
|
292
|
+
<h4>{t('HEADER_LOGO', 'Header logo')}</h4>
|
|
293
|
+
<p>900 x 200 px</p>
|
|
294
|
+
<p>{t('FORMAT', 'Format')}: PNG</p>
|
|
295
|
+
</ImgInfoWrapper>
|
|
296
|
+
</ImageFormGroup>
|
|
297
|
+
)}
|
|
298
|
+
{orderingTheme?.loading ? (
|
|
299
|
+
<>
|
|
300
|
+
<Skeleton height={100} style={{ marginBottom: '15px', width: '100%' }} />
|
|
301
|
+
<Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
|
|
302
|
+
</>
|
|
303
|
+
) : (
|
|
304
|
+
<ImageFormGroup>
|
|
305
|
+
<BackgroundImage
|
|
306
|
+
onClick={() => handleClickImage('homepage_background')}
|
|
307
|
+
>
|
|
308
|
+
<ExamineClick
|
|
309
|
+
onFiles={files => handleFiles(files, 'homepage_background')}
|
|
310
|
+
childRef={(e) => { backgrooundRef.current = e }}
|
|
311
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
312
|
+
>
|
|
313
|
+
<DragAndDrop
|
|
314
|
+
onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_background')}
|
|
315
|
+
accept='image/png, image/jpeg, image/jpg'
|
|
316
|
+
disabled={orderingTheme.loading}
|
|
317
|
+
>
|
|
318
|
+
{themeValues?.images?.components?.homepage_background?.components?.image
|
|
319
|
+
? <img src={themeValues?.images?.components?.homepage_background?.components?.image} alt='backgrond image' loading='lazy' />
|
|
320
|
+
: (
|
|
321
|
+
<UploadImageIconContainer>
|
|
322
|
+
<UploadImageIcon>
|
|
323
|
+
<DumyPhoto />
|
|
324
|
+
<span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
|
|
325
|
+
</UploadImageIcon>
|
|
326
|
+
</UploadImageIconContainer>
|
|
327
|
+
)}
|
|
328
|
+
</DragAndDrop>
|
|
329
|
+
</ExamineClick>
|
|
330
|
+
</BackgroundImage>
|
|
331
|
+
<ImgInfoWrapper>
|
|
332
|
+
<h4>{t('HOMEPAGE_BACKGROUND', 'Homepage background')}</h4>
|
|
333
|
+
<p>1920 x 1280 px</p>
|
|
334
|
+
<p>{t('FORMAT', 'Format')}: PNG</p>
|
|
335
|
+
</ImgInfoWrapper>
|
|
336
|
+
</ImageFormGroup>
|
|
337
|
+
)}
|
|
338
|
+
{orderingTheme?.loading ? (
|
|
339
|
+
<Skeleton width={200} height={20} />
|
|
340
|
+
) : (
|
|
341
|
+
<CheckBoxWrapper
|
|
342
|
+
onClick={() => handleChangeValue(!themeValues?.images?.components?.homepage_image_fullscreen, 'images', 'homepage_image_fullscreen')}
|
|
343
|
+
>
|
|
344
|
+
{themeValues?.images?.components?.homepage_image_fullscreen ? (
|
|
345
|
+
<CheckedIcon className='active' />
|
|
346
|
+
) : (
|
|
347
|
+
<UnCheckedIcon />
|
|
348
|
+
)}
|
|
349
|
+
<span>{t('HOMEPAGE_IMAGE_FULLSCREEN', 'Homepage image fullscreen')}</span>
|
|
350
|
+
</CheckBoxWrapper>
|
|
351
|
+
)}
|
|
352
|
+
</InnerBlock>
|
|
353
|
+
</InputFormWrapper>
|
|
354
|
+
{!orderingTheme?.loading && (
|
|
355
|
+
<InputFormWrapper>
|
|
356
|
+
<h4>{t('THEME_SETTINGS', 'Theme Settings')}</h4>
|
|
357
|
+
<InnerBlock>
|
|
358
|
+
<ColorPickerWrapper>
|
|
359
|
+
<div>
|
|
360
|
+
<p>{t('PRIMARY_COLOR_BUTTONS', 'Primary Color for Buttons')}</p>
|
|
361
|
+
<ColorPicker
|
|
362
|
+
defaultColor={themeValues?.theme_settings?.components?.style?.primary_btn_color}
|
|
363
|
+
onChangeColor={(color) => handleChangeValue(color, 'theme_settings', 'style.primary_btn_color')}
|
|
364
|
+
/>
|
|
365
|
+
</div>
|
|
366
|
+
<div>
|
|
367
|
+
<p>{t('PRIMARY_COLOR_LINKS', 'Primary Color for Links')}</p>
|
|
368
|
+
<ColorPicker
|
|
369
|
+
defaultColor={themeValues?.theme_settings?.components?.style?.primary_link_color}
|
|
370
|
+
onChangeColor={(color) => handleChangeValue(color, 'theme_settings', 'style.primary_link_color')}
|
|
371
|
+
/>
|
|
372
|
+
</div>
|
|
373
|
+
</ColorPickerWrapper>
|
|
374
|
+
<ContentWrapper>
|
|
375
|
+
<div>
|
|
376
|
+
<p>{t('HOMEPAGE_CONTENT', 'Homepage Content')}</p>
|
|
377
|
+
<Button
|
|
378
|
+
color='primary'
|
|
379
|
+
borderRadius='8px'
|
|
380
|
+
outline
|
|
381
|
+
onClick={() => setHomePageContent(true)}
|
|
382
|
+
>
|
|
383
|
+
{t('HOMEPAGE_CONTENT', 'Homepage content')}
|
|
384
|
+
</Button>
|
|
385
|
+
</div>
|
|
386
|
+
<div>
|
|
387
|
+
<p>{t('FOOTER_CONTENT', 'Footer Content')}</p>
|
|
388
|
+
<Button
|
|
389
|
+
color='primary'
|
|
390
|
+
borderRadius='8px'
|
|
391
|
+
outline
|
|
392
|
+
onClick={() => setFooterContent(true)}
|
|
393
|
+
>
|
|
394
|
+
{t('FOOTER_CONTENT', 'Footer content')}
|
|
395
|
+
</Button>
|
|
396
|
+
</div>
|
|
397
|
+
</ContentWrapper>
|
|
398
|
+
</InnerBlock>
|
|
399
|
+
</InputFormWrapper>
|
|
400
|
+
)}
|
|
401
|
+
|
|
402
|
+
<Button
|
|
403
|
+
color='primary'
|
|
404
|
+
borderRadius='8px'
|
|
405
|
+
onClick={() => handleUpdateSiteTheme()}
|
|
406
|
+
disabled={orderingTheme?.loading}
|
|
407
|
+
>
|
|
408
|
+
{t('SAVE', 'Save')}
|
|
409
|
+
</Button>
|
|
410
|
+
</FormWrapper>
|
|
411
|
+
</Container>
|
|
412
|
+
<Alert
|
|
413
|
+
title={t('BUSINESS', 'Business')}
|
|
414
|
+
content={alertState.content}
|
|
415
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
416
|
+
open={alertState.open}
|
|
417
|
+
onClose={() => closeAlert()}
|
|
418
|
+
onAccept={() => closeAlert()}
|
|
419
|
+
closeOnBackdrop={false}
|
|
420
|
+
/>
|
|
421
|
+
<Modal
|
|
422
|
+
width='700px'
|
|
423
|
+
height='80vh'
|
|
424
|
+
padding='30px'
|
|
425
|
+
title={t('IMAGE_CROP', 'Image crop')}
|
|
426
|
+
open={cropState?.open}
|
|
427
|
+
onClose={() => setCropState({ ...cropState, open: false })}
|
|
428
|
+
>
|
|
429
|
+
<ImageCrop
|
|
430
|
+
photo={cropState?.data}
|
|
431
|
+
handleChangePhoto={handleChangePhoto}
|
|
432
|
+
/>
|
|
433
|
+
</Modal>
|
|
434
|
+
<Modal
|
|
435
|
+
width='70%'
|
|
436
|
+
open={homePageContent}
|
|
437
|
+
onClose={() => setHomePageContent(false)}
|
|
438
|
+
>
|
|
439
|
+
<ContentForm
|
|
440
|
+
title={t('HOME_PAGE_CONTENT', 'Home Page Content')}
|
|
441
|
+
content={themeValues?.theme_settings?.components?.values?.homepage_content}
|
|
442
|
+
onClose={() => setHomePageContent(false)}
|
|
443
|
+
handleChangeContent={handleChangeContent}
|
|
444
|
+
type='homepage_content'
|
|
445
|
+
/>
|
|
446
|
+
</Modal>
|
|
447
|
+
<Modal
|
|
448
|
+
width='70%'
|
|
449
|
+
open={footerContent}
|
|
450
|
+
onClose={() => setFooterContent(false)}
|
|
451
|
+
>
|
|
452
|
+
<ContentForm
|
|
453
|
+
title={t('FOOTER', 'Footer')}
|
|
454
|
+
content={themeValues?.theme_settings?.components?.values?.footer_content}
|
|
455
|
+
onClose={() => setFooterContent(false)}
|
|
456
|
+
handleChangeContent={handleChangeContent}
|
|
457
|
+
type='footer_content'
|
|
458
|
+
/>
|
|
459
|
+
</Modal>
|
|
460
|
+
</>
|
|
40
461
|
)
|
|
41
462
|
}
|
|
463
|
+
|
|
464
|
+
export const OrderingWebsite = (props) => {
|
|
465
|
+
const orderingWebsiteProps = {
|
|
466
|
+
...props,
|
|
467
|
+
UIComponent: OrderingWebsiteUI,
|
|
468
|
+
appId: 'website'
|
|
469
|
+
}
|
|
470
|
+
return <OrderingWebsiteController {...orderingWebsiteProps} />
|
|
471
|
+
}
|