ordering-ui-admin-external 1.25.1 → 1.26.1
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 +1829 -1829
- package/_bundles/{ordering-ui-admin.bb3d2f1a6bc2f5d19b6c.js → ordering-ui-admin.45097ebbca4f4a7d30b7.js} +2 -2
- package/_modules/components/BusinessIntelligence/AnalyticsCalendar/index.js +8 -1
- package/_modules/components/Delivery/DriversCompanyAddForm/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/index.js +68 -0
- package/_modules/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/styles.js +42 -0
- package/_modules/components/Delivery/DriversGroupAddForm/BusinessesForm/index.js +89 -0
- package/_modules/components/Delivery/DriversGroupAddForm/BusinessesForm/styles.js +47 -0
- package/_modules/components/Delivery/DriversGroupAddForm/GeneralForm/index.js +106 -0
- package/_modules/components/Delivery/DriversGroupAddForm/GeneralForm/styles.js +16 -0
- package/_modules/components/Delivery/DriversGroupAddForm/PaymethodsForm/index.js +87 -0
- package/_modules/components/Delivery/DriversGroupAddForm/PaymethodsForm/styles.js +33 -0
- package/_modules/components/Delivery/DriversGroupAddForm/index.js +132 -0
- package/_modules/components/Delivery/DriversGroupAddForm/styles.js +18 -0
- package/_modules/components/Delivery/DriversGroupCompanies/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupDrivers/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupOrders/index.js +5 -5
- package/_modules/components/Delivery/DriversGroupsList/styles.js +1 -1
- package/_modules/components/Delivery/DriversGroupsListing/index.js +28 -7
- package/_modules/components/Delivery/DriversGroupsListing/styles.js +2 -2
- package/_modules/components/Delivery/UserAddForm/index.js +39 -6
- package/_modules/components/Delivery/UserAddForm/styles.js +28 -21
- package/_modules/components/Delivery/UserDetails/index.js +2 -2
- package/_modules/components/Home/HomePage/index.js +71 -3
- package/_modules/components/Home/HomePage/styles.js +27 -5
- package/_modules/components/Login/LoginForm/index.js +0 -5
- package/_modules/components/MyProducts/AdvancedLayouts/LayoutStyleGroup.js +46 -0
- package/_modules/components/MyProducts/AdvancedLayouts/index.js +213 -0
- package/_modules/components/MyProducts/AdvancedLayouts/styles.js +146 -0
- package/_modules/components/MyProducts/AdvancedSettings/index.js +12 -0
- package/_modules/components/MyProducts/CustomDomain/index.js +6 -4
- package/_modules/components/MyProducts/CustomDomain/styles.js +27 -9
- package/_modules/components/MyProducts/OrderingWebsite/index.js +94 -17
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +20 -11
- package/_modules/components/Orders/AllInOne/DriversManager/index.js +128 -0
- package/_modules/components/Orders/AllInOne/DriversManager/styles.js +27 -0
- package/_modules/components/Orders/AllInOne/index.js +337 -0
- package/_modules/components/Orders/AllInOne/styles.js +67 -0
- package/_modules/components/Orders/CompanySelector/index.js +259 -0
- package/_modules/components/Orders/CompanySelector/styles.js +86 -0
- package/_modules/components/Orders/DriversBusyStatusFilter/styles.js +6 -3
- package/_modules/components/Orders/DriversList/index.js +3 -2
- package/_modules/components/Orders/DriversList/styles.js +2 -2
- package/_modules/components/Orders/DriversManager/index.js +2 -1
- package/_modules/components/Orders/DriversOnlineOfflineFilter/styles.js +5 -2
- package/_modules/components/Orders/OrderBill/RefundToWallet.js +1 -1
- package/_modules/components/Orders/OrderBill/index.js +17 -18
- package/_modules/components/Orders/OrderContactInformation/index.js +14 -3
- package/_modules/components/Orders/OrderDetails/index.js +1 -1
- package/_modules/components/Orders/OrderStatusSubFilter/styles.js +1 -1
- package/_modules/components/Orders/OrderToPrint/index.js +2 -1
- package/_modules/components/Orders/OrderToPrintTicket/index.js +4 -2
- package/_modules/components/Orders/OrdersContentHeader/index.js +2 -1
- package/_modules/components/Orders/OrdersListing/index.js +3 -1
- package/_modules/components/Orders/OrdersManager/index.js +5 -1
- package/_modules/components/Orders/OrdersTable/index.js +11 -10
- package/_modules/components/Orders/ProductItemAccordion/index.js +5 -9
- package/_modules/components/Orders/WebsocketStatus/index.js +119 -0
- package/_modules/components/Orders/WebsocketStatus/styles.js +65 -0
- package/_modules/components/Orders/index.js +7 -0
- package/_modules/components/Settings/IntegrationListing/Analytics.js +130 -0
- package/_modules/components/Settings/IntegrationListing/PaymentGateway.js +130 -0
- package/_modules/components/Settings/IntegrationListing/index.js +174 -31
- package/_modules/components/Settings/IntegrationListing/styles.js +42 -11
- package/_modules/components/Settings/NotificationSetting/index.js +25 -4
- package/_modules/components/Settings/NotificationSetting/styles.js +5 -3
- package/_modules/components/Settings/SettingsSelectUI/index.js +3 -2
- package/_modules/components/Shared/RangeCalendar/index.js +9 -1
- package/_modules/components/Shared/SearchBar/index.js +11 -6
- package/_modules/components/Shared/SearchBar/styles.js +9 -15
- package/_modules/components/SidebarMenu/index.js +19 -10
- package/_modules/components/Users/UserDetails/index.js +2 -2
- package/_modules/config/currency.js +1017 -0
- package/_modules/index.js +6 -0
- package/_modules/utils/index.js +26 -3
- package/index-template.js +10 -0
- package/package.json +3 -2
- package/src/components/BusinessIntelligence/AnalyticsCalendar/index.js +7 -1
- package/src/components/Delivery/DriversCompanyAddForm/styles.js +0 -1
- package/src/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/index.js +113 -0
- package/src/components/Delivery/DriversGroupAddForm/AdvancedLogisticsForm/styles.js +72 -0
- package/src/components/Delivery/DriversGroupAddForm/BusinessesForm/index.js +87 -0
- package/src/components/Delivery/DriversGroupAddForm/BusinessesForm/styles.js +87 -0
- package/src/components/Delivery/DriversGroupAddForm/GeneralForm/index.js +104 -0
- package/src/components/Delivery/DriversGroupAddForm/GeneralForm/styles.js +31 -0
- package/src/components/Delivery/DriversGroupAddForm/PaymethodsForm/index.js +82 -0
- package/src/components/Delivery/DriversGroupAddForm/PaymethodsForm/styles.js +46 -0
- package/src/components/Delivery/DriversGroupAddForm/index.js +130 -0
- package/src/components/Delivery/DriversGroupAddForm/styles.js +38 -0
- package/src/components/Delivery/DriversGroupCompanies/styles.js +1 -0
- package/src/components/Delivery/DriversGroupDrivers/styles.js +1 -0
- package/src/components/Delivery/DriversGroupOrders/index.js +2 -2
- package/src/components/Delivery/DriversGroupsList/styles.js +1 -1
- package/src/components/Delivery/DriversGroupsListing/index.js +35 -13
- package/src/components/Delivery/DriversGroupsListing/styles.js +1 -1
- package/src/components/Delivery/UserAddForm/index.js +34 -2
- package/src/components/Delivery/UserAddForm/styles.js +25 -0
- package/src/components/Delivery/UserDetails/index.js +1 -1
- package/src/components/Home/HomePage/index.js +215 -142
- package/src/components/Home/HomePage/styles.js +105 -1
- package/src/components/Login/LoginForm/index.js +0 -7
- package/src/components/MyProducts/AdvancedLayouts/LayoutStyleGroup.js +37 -0
- package/src/components/MyProducts/AdvancedLayouts/index.js +240 -0
- package/src/components/MyProducts/AdvancedLayouts/styles.js +388 -0
- package/src/components/MyProducts/AdvancedSettings/index.js +5 -2
- package/src/components/MyProducts/CustomDomain/index.js +35 -16
- package/src/components/MyProducts/CustomDomain/styles.js +73 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +147 -79
- package/src/components/MyProducts/OrderingWebsite/styles.js +38 -0
- package/src/components/Orders/AllInOne/DriversManager/index.js +137 -0
- package/src/components/Orders/AllInOne/DriversManager/styles.js +51 -0
- package/src/components/Orders/AllInOne/index.js +339 -0
- package/src/components/Orders/AllInOne/styles.js +144 -0
- package/src/components/Orders/CompanySelector/index.js +250 -0
- package/src/components/Orders/CompanySelector/styles.js +142 -0
- package/src/components/Orders/DriversBusyStatusFilter/styles.js +7 -1
- package/src/components/Orders/DriversList/index.js +7 -4
- package/src/components/Orders/DriversList/styles.js +2 -1
- package/src/components/Orders/DriversManager/index.js +2 -0
- package/src/components/Orders/DriversOnlineOfflineFilter/styles.js +8 -1
- package/src/components/Orders/OrderBill/RefundToWallet.js +12 -10
- package/src/components/Orders/OrderBill/index.js +18 -18
- package/src/components/Orders/OrderContactInformation/index.js +20 -1
- package/src/components/Orders/OrderDetails/index.js +8 -8
- package/src/components/Orders/OrderStatusSubFilter/styles.js +1 -1
- package/src/components/Orders/OrderToPrint/index.js +2 -1
- package/src/components/Orders/OrderToPrintTicket/index.js +160 -173
- package/src/components/Orders/OrdersContentHeader/index.js +2 -0
- package/src/components/Orders/OrdersListing/index.js +2 -0
- package/src/components/Orders/OrdersManager/index.js +2 -2
- package/src/components/Orders/OrdersTable/index.js +39 -25
- package/src/components/Orders/ProductItemAccordion/index.js +3 -3
- package/src/components/Orders/WebsocketStatus/index.js +138 -0
- package/src/components/Orders/WebsocketStatus/styles.js +171 -0
- package/src/components/Orders/index.js +2 -0
- package/src/components/Settings/IntegrationListing/Analytics.js +127 -0
- package/src/components/Settings/IntegrationListing/PaymentGateway.js +126 -0
- package/src/components/Settings/IntegrationListing/index.js +189 -96
- package/src/components/Settings/IntegrationListing/styles.js +90 -1
- package/src/components/Settings/NotificationSetting/index.js +73 -10
- package/src/components/Settings/NotificationSetting/styles.js +19 -0
- package/src/components/Settings/SettingsSelectUI/index.js +12 -9
- package/src/components/Shared/RangeCalendar/index.js +7 -1
- package/src/components/Shared/SearchBar/index.js +14 -5
- package/src/components/Shared/SearchBar/styles.js +19 -32
- package/src/components/SidebarMenu/index.js +15 -8
- package/src/components/Users/UserDetails/index.js +1 -1
- package/src/config/currency.js +1010 -0
- package/src/index.js +2 -0
- package/src/utils/index.js +21 -0
- package/template/app.js +4 -0
- package/template/assets/images/preview/franchise.png +0 -0
- package/template/assets/images/preview/marketplace.png +0 -0
- package/template/assets/images/preview/single-store.png +0 -0
- package/template/components/AutologinParams/index.js +1 -3
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/AllInOne/index.js +23 -0
- /package/_bundles/{ordering-ui-admin.bb3d2f1a6bc2f5d19b6c.js.LICENSE.txt → ordering-ui-admin.45097ebbca4f4a7d30b7.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage, useEvent, Settings as SettingsController } from 'ordering-components-admin-external'
|
|
3
|
+
import { GearFill } from 'react-bootstrap-icons'
|
|
4
|
+
import { SettingsDetail } from '../SettingsDetail'
|
|
5
|
+
import Skeleton from 'react-loading-skeleton'
|
|
6
|
+
import { useHistory, useLocation } from 'react-router-dom'
|
|
7
|
+
import {
|
|
8
|
+
CategorySection,
|
|
9
|
+
SettingList,
|
|
10
|
+
SettingItemContainer,
|
|
11
|
+
IconWrapper,
|
|
12
|
+
SettingItemContent
|
|
13
|
+
} from './styles'
|
|
14
|
+
|
|
15
|
+
const PaymentGatewayUI = (props) => {
|
|
16
|
+
const {
|
|
17
|
+
categoryList
|
|
18
|
+
} = props
|
|
19
|
+
|
|
20
|
+
const [, t] = useLanguage()
|
|
21
|
+
const [events] = useEvent()
|
|
22
|
+
|
|
23
|
+
const history = useHistory()
|
|
24
|
+
const query = new URLSearchParams(useLocation().search)
|
|
25
|
+
const allowOptions = ['stripe', 'stripe_connect']
|
|
26
|
+
|
|
27
|
+
const [selectedCategory, setSelectedCategory] = useState(null)
|
|
28
|
+
const [showDetail, setShowDetail] = useState(false)
|
|
29
|
+
|
|
30
|
+
const handleBackRedirect = () => {
|
|
31
|
+
setShowDetail(false)
|
|
32
|
+
setSelectedCategory(null)
|
|
33
|
+
history.replace(`${location.pathname}`)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const onBasicSettingsRedirect = ({ category }) => {
|
|
37
|
+
if (!category) {
|
|
38
|
+
return events.emit('go_to_page', { page: 'integrations', replace: true })
|
|
39
|
+
}
|
|
40
|
+
if (category) {
|
|
41
|
+
events.emit('go_to_page', {
|
|
42
|
+
page: 'integrations',
|
|
43
|
+
search: `?category=${category}`,
|
|
44
|
+
replace: true
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const handleOpenSetting = (category, initialRender) => {
|
|
50
|
+
setSelectedCategory(category)
|
|
51
|
+
setShowDetail(true)
|
|
52
|
+
if (!initialRender) {
|
|
53
|
+
history.replace(`${location.pathname}?category=${category?.id}`)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (categoryList.loading) return
|
|
59
|
+
const categoryId = query.get('category')
|
|
60
|
+
if (categoryId) {
|
|
61
|
+
const categorySelected = categoryList?.categories.find(item => item?.id === parseInt(categoryId))
|
|
62
|
+
if (categorySelected) {
|
|
63
|
+
handleOpenSetting(categorySelected, true)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, [categoryList.loading])
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<CategorySection>
|
|
70
|
+
<h2>{t('PAYMENT_GETWAYS', 'Payment Gateways')}</h2>
|
|
71
|
+
{!categoryList?.loading && (
|
|
72
|
+
<SettingList>
|
|
73
|
+
{categoryList?.categories?.filter(item => allowOptions.includes(item.key)).map(setting => (
|
|
74
|
+
<SettingItemContainer
|
|
75
|
+
key={setting?.id}
|
|
76
|
+
onClick={() => handleOpenSetting(setting)}
|
|
77
|
+
>
|
|
78
|
+
<IconWrapper>
|
|
79
|
+
<GearFill />
|
|
80
|
+
</IconWrapper>
|
|
81
|
+
<SettingItemContent>
|
|
82
|
+
<h5>{setting?.name}</h5>
|
|
83
|
+
<p>{setting?.description}</p>
|
|
84
|
+
</SettingItemContent>
|
|
85
|
+
</SettingItemContainer>
|
|
86
|
+
))}
|
|
87
|
+
</SettingList>
|
|
88
|
+
)}
|
|
89
|
+
{categoryList?.loading && (
|
|
90
|
+
<SettingList>
|
|
91
|
+
{[...Array(2).keys()].map(i => (
|
|
92
|
+
<SettingItemContainer
|
|
93
|
+
key={i}
|
|
94
|
+
>
|
|
95
|
+
<IconWrapper>
|
|
96
|
+
<Skeleton width={24} height={24} />
|
|
97
|
+
</IconWrapper>
|
|
98
|
+
<SettingItemContent>
|
|
99
|
+
<h5><Skeleton height={18} width={120} /></h5>
|
|
100
|
+
<p><Skeleton height={13} count={2} /></p>
|
|
101
|
+
</SettingItemContent>
|
|
102
|
+
</SettingItemContainer>
|
|
103
|
+
))}
|
|
104
|
+
</SettingList>
|
|
105
|
+
)}
|
|
106
|
+
{showDetail && (
|
|
107
|
+
<SettingsDetail
|
|
108
|
+
{...props}
|
|
109
|
+
open={showDetail}
|
|
110
|
+
category={selectedCategory}
|
|
111
|
+
onClose={handleBackRedirect}
|
|
112
|
+
onBasicSettingsRedirect={onBasicSettingsRedirect}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
</CategorySection>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const PaymentGateway = (props) => {
|
|
120
|
+
const paymentGatewayProps = {
|
|
121
|
+
...props,
|
|
122
|
+
UIComponent: PaymentGatewayUI,
|
|
123
|
+
settingsType: 'key_basic'
|
|
124
|
+
}
|
|
125
|
+
return <SettingsController {...paymentGatewayProps} />
|
|
126
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useLanguage, useEvent } from 'ordering-components-admin-external'
|
|
3
|
-
import { IconButton } from '../../../styles'
|
|
3
|
+
import { Button, IconButton } from '../../../styles'
|
|
4
4
|
import { useLocation } from 'react-router-dom'
|
|
5
5
|
import { List as MenuIcon, PuzzleFill, Display, KeyFill } from 'react-bootstrap-icons'
|
|
6
6
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
7
|
-
import { SideBar } from '../../Shared'
|
|
7
|
+
import { SideBar, Modal } from '../../Shared'
|
|
8
8
|
import { PluginList } from '../PluginList'
|
|
9
9
|
import { WebhookList } from '../WebhookList'
|
|
10
10
|
import { ApiKeysList } from '../ApiKeysList'
|
|
@@ -13,24 +13,60 @@ import { useTheme } from 'styled-components'
|
|
|
13
13
|
import { LalaMoveConnect } from '../LalaMoveConnect'
|
|
14
14
|
import { Deliverect } from '../Deliverect'
|
|
15
15
|
import { ItsaCheckmate } from '../ItsaCheckmate'
|
|
16
|
-
|
|
16
|
+
import HubspotForm from 'react-hubspot-form'
|
|
17
|
+
import Skeleton from 'react-loading-skeleton'
|
|
18
|
+
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
19
|
+
import { PickerExpress } from '../PickerExpress'
|
|
20
|
+
import { PaymentGateway } from './PaymentGateway'
|
|
21
|
+
import { Analytics } from './Analytics'
|
|
17
22
|
import {
|
|
18
23
|
IntegrationsContainer,
|
|
19
24
|
Header,
|
|
20
|
-
SettingListContainer,
|
|
21
25
|
SettingItemContainer,
|
|
22
26
|
IconWrapper,
|
|
23
|
-
SettingItemContent
|
|
27
|
+
SettingItemContent,
|
|
28
|
+
CategorySection,
|
|
29
|
+
CategorGroup,
|
|
30
|
+
SettingList,
|
|
31
|
+
SpecialPartnerWrapper,
|
|
32
|
+
CloseButtonWrapper,
|
|
33
|
+
HubspotFormWrapper,
|
|
34
|
+
TabWrapper,
|
|
35
|
+
Tabs,
|
|
36
|
+
Tab
|
|
24
37
|
} from './styles'
|
|
25
|
-
import { PickerExpress } from '../PickerExpress'
|
|
26
38
|
|
|
27
39
|
export const IntegrationListing = (props) => {
|
|
28
40
|
const [, t] = useLanguage()
|
|
29
41
|
const { search } = useLocation()
|
|
30
42
|
const [events] = useEvent()
|
|
31
43
|
const theme = useTheme()
|
|
44
|
+
const { width } = useWindowSize()
|
|
32
45
|
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
33
46
|
const [showOption, setShowOption] = useState(null)
|
|
47
|
+
const [showForm, setShowForm] = useState(false)
|
|
48
|
+
const [isSubmitted, setIsSubmitted] = useState(false)
|
|
49
|
+
const [selectedTab, setSelectedTab] = useState(2)
|
|
50
|
+
|
|
51
|
+
const deliveryPlatformList = [
|
|
52
|
+
{ key: 'doordash', title: t('CONNECT_WITH_DOORDASH', 'Connect with Doordash'), icon: <img src={theme.images.general.doordash} />, description: t('CONNECT_DOORDASH_DESCRIPTION', 'Send orders directly to your driver in Doordash and keep customers happy with their deliveries.') },
|
|
53
|
+
{ key: 'lalamove', title: t('CONNECT_WITH_LALAMOVE', 'Connect with Lalamove'), icon: <img src={theme.images.general.lalamove} />, description: t('CONNECT_LALAMOVE_DESCRIPTION', 'Send orders directly to your drivers in LalaMove and keep customers happy with their deliveries.') },
|
|
54
|
+
{ key: 'picker_express', title: t('CONNECT_WITH_PICKER_EXPRESS', 'Connect with Picker Express'), icon: <img src={theme.images.general.pickerExpress} />, description: t('CONNECT_PICKER_EXPRESS_DESCRIPTION', 'Picker express connect you with +200 hundred thousand driver from +10 delivery companies from your city.') }
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
const orderingDevelopers = [
|
|
58
|
+
{ key: 'plugins', title: t('PLUGINS', 'Plugins'), icon: <PuzzleFill />, description: t('PLUGIN_DESCRIPTION', 'This functionality serves to extend the Ordering API functionalities to anything you want without any restriction.') },
|
|
59
|
+
{ key: 'webhooks', title: t('WEBHOOKS', 'Webhooks'), icon: <Display />, description: t('WEBHOOK_DESCRIPTION', 'Unlike business webhooks, global webhooks listen to the events of the entire project.') },
|
|
60
|
+
{ key: 'apiKeys', title: t('KEYS', 'Api Keys'), icon: <KeyFill />, description: t('APIKEYS_DESCRIPTION', 'These keys serve to obtain a direct connection to the API without the need for authentication.') }
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
const tabList = [
|
|
64
|
+
{ key: 2, name: t('ORDERING_DEVELOPERS', 'Ordering developers') },
|
|
65
|
+
{ key: 3, name: t('DELIVERY_PLATFORM', 'Delivery Platform') },
|
|
66
|
+
{ key: 4, name: t('POS_INTEGRATIONS', 'POS Integrations') },
|
|
67
|
+
{ key: 5, name: t('PAYMENT_GETWAYS', 'Payment Gateways') },
|
|
68
|
+
{ key: 6, name: t('ANALYTICS', 'Analytics') }
|
|
69
|
+
]
|
|
34
70
|
|
|
35
71
|
let settingParams
|
|
36
72
|
|
|
@@ -71,6 +107,22 @@ export const IntegrationListing = (props) => {
|
|
|
71
107
|
}
|
|
72
108
|
}, [])
|
|
73
109
|
|
|
110
|
+
const FormLoading = () => {
|
|
111
|
+
return (
|
|
112
|
+
<div>
|
|
113
|
+
<div>
|
|
114
|
+
<Skeleton height={20} width={300} style={{ marginBottom: 20 }} />
|
|
115
|
+
</div>
|
|
116
|
+
{[...Array(4).keys()].map(key => (
|
|
117
|
+
<React.Fragment key={key}>
|
|
118
|
+
<Skeleton height={15} width={300} style={{ marginBottom: 10 }} />
|
|
119
|
+
<Skeleton height={35} style={{ marginBottom: 30 }} />
|
|
120
|
+
</React.Fragment>
|
|
121
|
+
))}
|
|
122
|
+
</div>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
|
|
74
126
|
return (
|
|
75
127
|
<>
|
|
76
128
|
<IntegrationsContainer>
|
|
@@ -85,96 +137,102 @@ export const IntegrationListing = (props) => {
|
|
|
85
137
|
)}
|
|
86
138
|
<h1>{t('INTEGRATIONS', 'Integrations')}</h1>
|
|
87
139
|
</Header>
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
</
|
|
176
|
-
</
|
|
177
|
-
|
|
140
|
+
{width > 768 && (
|
|
141
|
+
<TabWrapper>
|
|
142
|
+
<Tabs>
|
|
143
|
+
{tabList.map(tab => (
|
|
144
|
+
<Tab
|
|
145
|
+
key={tab.key}
|
|
146
|
+
active={tab.key === selectedTab}
|
|
147
|
+
onClick={() => setSelectedTab(tab.key)}
|
|
148
|
+
>
|
|
149
|
+
{tab.name}
|
|
150
|
+
</Tab>
|
|
151
|
+
))}
|
|
152
|
+
</Tabs>
|
|
153
|
+
</TabWrapper>
|
|
154
|
+
)}
|
|
155
|
+
<CategorGroup>
|
|
156
|
+
<CategorySection style={{ order: selectedTab === 2 ? 1 : selectedTab }}>
|
|
157
|
+
<h2>{t('ORDERING_DEVELOPERS', 'Ordering developers')}</h2>
|
|
158
|
+
<SettingList>
|
|
159
|
+
{orderingDevelopers.map((item, i) => (
|
|
160
|
+
<SettingItemContainer
|
|
161
|
+
key={i}
|
|
162
|
+
onClick={() => handleOpenSetting(item.key)}
|
|
163
|
+
>
|
|
164
|
+
<IconWrapper>
|
|
165
|
+
{item?.icon}
|
|
166
|
+
</IconWrapper>
|
|
167
|
+
<SettingItemContent>
|
|
168
|
+
<h5>{item?.title}</h5>
|
|
169
|
+
<p>{item?.description}</p>
|
|
170
|
+
</SettingItemContent>
|
|
171
|
+
</SettingItemContainer>
|
|
172
|
+
))}
|
|
173
|
+
</SettingList>
|
|
174
|
+
</CategorySection>
|
|
175
|
+
<CategorySection style={{ order: selectedTab === 3 ? 1 : selectedTab }}>
|
|
176
|
+
<h2>{t('DELIVERY_PLATFORM', 'Delivery Platform')}</h2>
|
|
177
|
+
<SpecialPartnerWrapper>
|
|
178
|
+
<Button
|
|
179
|
+
color='primary'
|
|
180
|
+
onClick={() => setShowForm(true)}
|
|
181
|
+
>
|
|
182
|
+
{t('LOOKING_FOR_SPECIFIC_PARTNER', 'Looking for a specific partner?')}
|
|
183
|
+
</Button>
|
|
184
|
+
</SpecialPartnerWrapper>
|
|
185
|
+
<SettingList>
|
|
186
|
+
{deliveryPlatformList.map((item, i) => (
|
|
187
|
+
<SettingItemContainer
|
|
188
|
+
key={i}
|
|
189
|
+
onClick={() => handleOpenSetting(item.key)}
|
|
190
|
+
>
|
|
191
|
+
<IconWrapper>
|
|
192
|
+
{item?.icon}
|
|
193
|
+
</IconWrapper>
|
|
194
|
+
<SettingItemContent>
|
|
195
|
+
<h5>{item?.title}</h5>
|
|
196
|
+
<p>{item?.description}</p>
|
|
197
|
+
</SettingItemContent>
|
|
198
|
+
</SettingItemContainer>
|
|
199
|
+
))}
|
|
200
|
+
</SettingList>
|
|
201
|
+
</CategorySection>
|
|
202
|
+
<CategorySection style={{ order: selectedTab === 4 ? 1 : selectedTab }}>
|
|
203
|
+
<h2>{t('POS_INTEGRATIONS', 'POS Integrations')}</h2>
|
|
204
|
+
<SettingList>
|
|
205
|
+
<SettingItemContainer
|
|
206
|
+
onClick={() => handleOpenSetting('deliverect')}
|
|
207
|
+
>
|
|
208
|
+
<IconWrapper>
|
|
209
|
+
<img src={theme.images.general.deliverect} />
|
|
210
|
+
</IconWrapper>
|
|
211
|
+
<SettingItemContent>
|
|
212
|
+
<h5>{t('DELIVERECT', 'Deliverect')}</h5>
|
|
213
|
+
<p>{t('SYNC_DEC_FIRST', 'The easiest way to manage all your online orders.')}</p>
|
|
214
|
+
</SettingItemContent>
|
|
215
|
+
</SettingItemContainer>
|
|
216
|
+
<SettingItemContainer
|
|
217
|
+
onClick={() => handleOpenSetting('itsacheckmate')}
|
|
218
|
+
>
|
|
219
|
+
<IconWrapper>
|
|
220
|
+
<img src={theme.images.general.ItsaCheckmateLogo} />
|
|
221
|
+
</IconWrapper>
|
|
222
|
+
<SettingItemContent>
|
|
223
|
+
<h5>{t('ITSACHECKMATE', 'ItsaCheckmate')}</h5>
|
|
224
|
+
<p dangerouslySetInnerHTML={{ __html: t('ITSACHECKMATE_SUB_HEADER', 'Take control of all your <strong>Ordering Platform Menus</strong> in one place!') }} />
|
|
225
|
+
</SettingItemContent>
|
|
226
|
+
</SettingItemContainer>
|
|
227
|
+
</SettingList>
|
|
228
|
+
</CategorySection>
|
|
229
|
+
<div style={{ order: selectedTab === 5 ? 1 : selectedTab }}>
|
|
230
|
+
<PaymentGateway />
|
|
231
|
+
</div>
|
|
232
|
+
<div style={{ order: selectedTab === 6 ? 1 : selectedTab }}>
|
|
233
|
+
<Analytics />
|
|
234
|
+
</div>
|
|
235
|
+
</CategorGroup>
|
|
178
236
|
</IntegrationsContainer>
|
|
179
237
|
|
|
180
238
|
{showOption === 'plugins' && (
|
|
@@ -222,6 +280,41 @@ export const IntegrationListing = (props) => {
|
|
|
222
280
|
{showOption === 'deliverect' && <Deliverect onClose={() => handleCloseSettings()} />}
|
|
223
281
|
|
|
224
282
|
{showOption === 'itsacheckmate' && <ItsaCheckmate onClose={() => handleCloseSettings()} />}
|
|
283
|
+
|
|
284
|
+
<Modal
|
|
285
|
+
width='769px'
|
|
286
|
+
padding='30px'
|
|
287
|
+
title={t('LOOKING_FOR_SPECIFIC_PARTNER', 'Looking for a specific partner?')}
|
|
288
|
+
open={showForm}
|
|
289
|
+
onClose={() => {
|
|
290
|
+
setIsSubmitted(false)
|
|
291
|
+
setShowForm(false)
|
|
292
|
+
}}
|
|
293
|
+
>
|
|
294
|
+
<HubspotFormWrapper>
|
|
295
|
+
<HubspotForm
|
|
296
|
+
region='na1'
|
|
297
|
+
portalId='6130635'
|
|
298
|
+
formId='cb51d3cb-f9ed-4162-9479-d4cf164c391d'
|
|
299
|
+
onFormSubmitted={() => setIsSubmitted(true)}
|
|
300
|
+
onReady={(form) => console.log('Form ready!')}
|
|
301
|
+
loading={<FormLoading />}
|
|
302
|
+
/>
|
|
303
|
+
{isSubmitted && (
|
|
304
|
+
<CloseButtonWrapper>
|
|
305
|
+
<Button
|
|
306
|
+
color='primary'
|
|
307
|
+
onClick={() => {
|
|
308
|
+
setIsSubmitted(false)
|
|
309
|
+
setShowForm(false)
|
|
310
|
+
}}
|
|
311
|
+
>
|
|
312
|
+
{t('CLOSE', 'Close')}
|
|
313
|
+
</Button>
|
|
314
|
+
</CloseButtonWrapper>
|
|
315
|
+
)}
|
|
316
|
+
</HubspotFormWrapper>
|
|
317
|
+
</Modal>
|
|
225
318
|
</>
|
|
226
319
|
)
|
|
227
320
|
}
|
|
@@ -21,10 +21,12 @@ export const Header = styled.div`
|
|
|
21
21
|
`}
|
|
22
22
|
|
|
23
23
|
h1 {
|
|
24
|
+
flex: 1;
|
|
24
25
|
font-size: 20px;
|
|
25
26
|
font-weight: 700;
|
|
26
27
|
margin: 0px;
|
|
27
28
|
line-height: 35px;
|
|
29
|
+
text-align: center;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
> button {
|
|
@@ -43,9 +45,36 @@ export const Header = styled.div`
|
|
|
43
45
|
}
|
|
44
46
|
`
|
|
45
47
|
|
|
46
|
-
export const
|
|
48
|
+
export const CategorGroup = styled.div`
|
|
49
|
+
margin-top: 50px;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
`
|
|
53
|
+
|
|
54
|
+
export const CategorySection = styled.div`
|
|
55
|
+
h2 {
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
line-height: 24px;
|
|
59
|
+
margin: 0;
|
|
60
|
+
margin-left: 20px;
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
|
|
64
|
+
export const SettingList = styled.div`
|
|
47
65
|
display: flex;
|
|
48
66
|
flex-wrap: wrap;
|
|
67
|
+
margin-top: 20px;
|
|
68
|
+
margin-bottom: 35px;
|
|
69
|
+
`
|
|
70
|
+
|
|
71
|
+
export const SpecialPartnerWrapper = styled.div`
|
|
72
|
+
margin-top: 14px;
|
|
73
|
+
margin-left: 20px;
|
|
74
|
+
button {
|
|
75
|
+
height: 44px;
|
|
76
|
+
border-radius: 8px;
|
|
77
|
+
}
|
|
49
78
|
`
|
|
50
79
|
|
|
51
80
|
export const SettingItemContainer = styled.div`
|
|
@@ -116,3 +145,63 @@ export const SettingItemContent = styled.div`
|
|
|
116
145
|
overflow: hidden;
|
|
117
146
|
}
|
|
118
147
|
`
|
|
148
|
+
|
|
149
|
+
export const CloseButtonWrapper = styled.div`
|
|
150
|
+
position: sticky;
|
|
151
|
+
top: 100%;
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
margin-top: 20px;
|
|
155
|
+
|
|
156
|
+
button {
|
|
157
|
+
height: 44px;
|
|
158
|
+
border-radius: 8px;
|
|
159
|
+
width: 100%;
|
|
160
|
+
}
|
|
161
|
+
`
|
|
162
|
+
|
|
163
|
+
export const HubspotFormWrapper = styled.div`
|
|
164
|
+
min-height: 445px;
|
|
165
|
+
position: relative;
|
|
166
|
+
`
|
|
167
|
+
|
|
168
|
+
export const TabWrapper = styled.div`
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
`
|
|
172
|
+
|
|
173
|
+
export const Tabs = styled.div`
|
|
174
|
+
display: flex;
|
|
175
|
+
border-bottom: 1px solid ${props => props.theme.colors.borderColor};
|
|
176
|
+
`
|
|
177
|
+
|
|
178
|
+
export const Tab = styled.div`
|
|
179
|
+
font-weight: 400;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
line-height: 18px;
|
|
182
|
+
padding-bottom: 14px;
|
|
183
|
+
color: ${props => props.theme.colors.lightGray};
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
&:not(:last-child) {
|
|
186
|
+
margin-right: 16px;
|
|
187
|
+
${props => props.theme.rtl && css`
|
|
188
|
+
margin-right: 0;
|
|
189
|
+
margin-left: 16px;
|
|
190
|
+
`}
|
|
191
|
+
}
|
|
192
|
+
${({ active }) => active && css`
|
|
193
|
+
font-weight: 600;
|
|
194
|
+
color: ${props => props.theme.colors.headingColor};
|
|
195
|
+
border-bottom: 1px solid ${props => props.theme.colors.headingColor};
|
|
196
|
+
`}
|
|
197
|
+
|
|
198
|
+
@media (min-width: 1024px) {
|
|
199
|
+
&:not(:last-child) {
|
|
200
|
+
margin-right: 32px;
|
|
201
|
+
${props => props.theme.rtl && css`
|
|
202
|
+
margin-right: 0;
|
|
203
|
+
margin-left: 32px;
|
|
204
|
+
`}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
`
|