ordering-ui-admin-external 1.0.0 → 1.1.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/{ordering-ui-admin.2c8f8ba23ef8c37422f3.js → ordering-ui-admin.2a3c1a73c2eac0c338db.js} +2 -2
- package/_bundles/{ordering-ui-admin.2c8f8ba23ef8c37422f3.js.LICENSE.txt → ordering-ui-admin.2a3c1a73c2eac0c338db.js.LICENSE.txt} +0 -0
- package/_modules/components/Delivery/UserDetails/index.js +40 -11
- package/_modules/components/Delivery/UserDetails/styles.js +15 -3
- package/_modules/components/Delivery/UserDetailsMenu/index.js +3 -0
- package/_modules/components/Downloads/FreeProductsList/index.js +10 -10
- package/_modules/components/Downloads/PurchasedProductsList/index.js +10 -10
- package/_modules/components/LanguageSelector/index.js +1 -1
- package/_modules/components/Orders/DriversList/styles.js +1 -1
- package/_modules/components/Orders/OrdersTable/index.js +11 -11
- package/_modules/components/Settings/LanguageSetting/index.js +4 -4
- package/_modules/components/Settings/Settings/index.js +40 -9
- package/_modules/components/Settings/SettingsList/index.js +0 -4
- package/_modules/components/Settings/SiteSettingDetails/index.js +85 -0
- package/_modules/components/Settings/SiteSettingDetails/styles.js +46 -0
- package/_modules/components/Settings/SitesAuthSettings/index.js +154 -0
- package/_modules/components/Settings/SitesAuthSettings/styles.js +49 -0
- package/_modules/components/SidebarMenu/index.js +15 -7
- package/_modules/components/Stores/BusinessSelectHeader/index.js +18 -67
- package/_modules/components/Stores/BusinessSelectHeader/styles.js +5 -5
- package/package.json +2 -2
- package/src/components/Delivery/UserDetails/index.js +40 -7
- package/src/components/Delivery/UserDetails/styles.js +11 -0
- package/src/components/Delivery/UserDetailsMenu/index.js +2 -1
- package/src/components/Downloads/FreeProductsList/index.js +10 -10
- package/src/components/Downloads/PurchasedProductsList/index.js +10 -10
- package/src/components/LanguageSelector/index.js +1 -1
- package/src/components/Orders/DriversList/styles.js +1 -0
- package/src/components/Orders/OrdersTable/index.js +7 -12
- package/src/components/Settings/LanguageSetting/index.js +2 -2
- package/src/components/Settings/PlaceListing/index.js +1 -0
- package/src/components/Settings/Settings/index.js +35 -3
- package/src/components/Settings/SettingsList/index.js +0 -3
- package/src/components/Settings/SiteSettingDetails/index.js +86 -0
- package/src/components/Settings/SiteSettingDetails/styles.js +58 -0
- package/src/components/Settings/SitesAuthSettings/index.js +107 -0
- package/src/components/Settings/SitesAuthSettings/styles.js +52 -0
- package/src/components/SidebarMenu/index.js +2 -2
- package/src/components/Stores/BusinessSelectHeader/index.js +25 -56
- package/src/components/Stores/BusinessSelectHeader/styles.js +17 -12
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import Skeleton from 'react-loading-skeleton'
|
|
3
3
|
import { useTheme } from 'styled-components'
|
|
4
|
+
import { Dropdown, DropdownButton } from 'react-bootstrap'
|
|
4
5
|
import { useLanguage, UserDetails as UserDetailsController } from 'ordering-components-admin-external'
|
|
5
6
|
import { OrdersManager } from '../../Orders'
|
|
6
7
|
import { AddressList } from '../AddressList'
|
|
7
|
-
import { Personalization, Modal } from '../../Shared'
|
|
8
|
+
import { Personalization, Modal, Schedule } from '../../Shared'
|
|
8
9
|
import { UserDetailsMenu } from '../UserDetailsMenu'
|
|
9
10
|
import { UserProfileForm } from '../UserProfileForm'
|
|
10
11
|
import { UserMetaFields } from '../../Users'
|
|
11
12
|
import { DriverGroupSetting } from '../DriverGroupSetting'
|
|
12
13
|
import { ThreeDots } from 'react-bootstrap-icons'
|
|
13
|
-
import { Switch } from '../../../styles'
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import { Switch, Button } from '../../../styles'
|
|
15
|
+
import { ActionsForm } from '../UserFormDetails/styles'
|
|
16
16
|
import {
|
|
17
17
|
UserName,
|
|
18
18
|
SavedPlaces,
|
|
19
|
+
ScheduleSection,
|
|
19
20
|
PersonalizationWrapper,
|
|
20
21
|
DetailsHeader,
|
|
21
|
-
ActionSelectorWrapper
|
|
22
|
+
ActionSelectorWrapper,
|
|
23
|
+
DriverScheduleWraper,
|
|
24
|
+
DriverSchedule
|
|
22
25
|
} from './styles'
|
|
23
26
|
|
|
24
27
|
export const UserDetailsUI = (props) => {
|
|
@@ -29,15 +32,18 @@ export const UserDetailsUI = (props) => {
|
|
|
29
32
|
setExtraOpen,
|
|
30
33
|
handleSuccessUserUpdate,
|
|
31
34
|
handleDeleteUser,
|
|
32
|
-
handleChangeActiveUser
|
|
35
|
+
handleChangeActiveUser,
|
|
36
|
+
scheduleState,
|
|
37
|
+
handleScheduleState,
|
|
38
|
+
handleScheduleUpdateUser
|
|
33
39
|
} = props
|
|
34
40
|
|
|
35
41
|
const theme = useTheme()
|
|
36
42
|
const [, t] = useLanguage()
|
|
37
|
-
|
|
38
43
|
const [currentMenuSelected, setCurrentMenuSelected] = useState('profile')
|
|
39
44
|
const [isCustomField, setIsCustomField] = useState(false)
|
|
40
45
|
const [isPersonalization, setIsPersonalization] = useState(false)
|
|
46
|
+
const [isDriverSchedule, setIsDriverSchedule] = useState(true)
|
|
41
47
|
|
|
42
48
|
useEffect(() => {
|
|
43
49
|
setExtraOpen(false)
|
|
@@ -122,6 +128,33 @@ export const UserDetailsUI = (props) => {
|
|
|
122
128
|
)}
|
|
123
129
|
</>
|
|
124
130
|
)}
|
|
131
|
+
{currentMenuSelected === 'schedule' && (
|
|
132
|
+
<ScheduleSection>
|
|
133
|
+
<DriverScheduleWraper>
|
|
134
|
+
<DriverSchedule>{t('DRIVER_SCHEDULES', 'Driver schedules')}</DriverSchedule>
|
|
135
|
+
<Switch
|
|
136
|
+
defaultChecked={isDriverSchedule}
|
|
137
|
+
onChange={enabled => setIsDriverSchedule(enabled)}
|
|
138
|
+
/>
|
|
139
|
+
</DriverScheduleWraper>
|
|
140
|
+
<Schedule
|
|
141
|
+
scheduleList={userState?.user?.schedule}
|
|
142
|
+
handleChangeScheduleState={handleScheduleState}
|
|
143
|
+
/>
|
|
144
|
+
<ActionsForm>
|
|
145
|
+
<Button
|
|
146
|
+
id='form-btn'
|
|
147
|
+
color='primary'
|
|
148
|
+
borderRadius='5px'
|
|
149
|
+
disabled={scheduleState.loading || scheduleState?.change?.length === 0}
|
|
150
|
+
style={{ marginTop: 20 }}
|
|
151
|
+
onClick={() => handleScheduleUpdateUser()}
|
|
152
|
+
>
|
|
153
|
+
{scheduleState.loading ? t('UPDATING', 'Updating...') : t('UPDATE', 'Update')}
|
|
154
|
+
</Button>
|
|
155
|
+
</ActionsForm>
|
|
156
|
+
</ScheduleSection>
|
|
157
|
+
)}
|
|
125
158
|
{currentMenuSelected === 'orders' && (
|
|
126
159
|
<OrdersManager
|
|
127
160
|
isSelectedOrders
|
|
@@ -138,3 +138,14 @@ export const ActionSelectorWrapper = styled.div`
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
`
|
|
141
|
+
export const ScheduleSection = styled.div`
|
|
142
|
+
margin-top: 30px;
|
|
143
|
+
overflow: auto;
|
|
144
|
+
`
|
|
145
|
+
export const DriverScheduleWraper = styled.div`
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
`
|
|
149
|
+
export const DriverSchedule = styled.span`
|
|
150
|
+
padding-right: 10px;
|
|
151
|
+
`
|
|
@@ -18,7 +18,8 @@ export const UserDetailsMenu = (props) => {
|
|
|
18
18
|
const menuItems = isDriverMenu ? [
|
|
19
19
|
{ key: 'profile', content: t('PROFILE', 'Profile') },
|
|
20
20
|
{ key: 'driver_group', content: t('DRIVER_GROUP', 'Driver group') },
|
|
21
|
-
{ key: 'saved_places', content: t('SAVED_PLACES', 'Saved places') }
|
|
21
|
+
{ key: 'saved_places', content: t('SAVED_PLACES', 'Saved places') },
|
|
22
|
+
{ key: 'schedule', content: t('SCHEDULE', 'Schedule') }
|
|
22
23
|
// { key: 'metafields', content: t('METAFIELDS', 'Metafields') },
|
|
23
24
|
// { key: 'personalization', content: t('PERSONALIZATION', 'Personalization') }
|
|
24
25
|
] : [
|
|
@@ -32,8 +32,8 @@ export const FreeProductsList = (props) => {
|
|
|
32
32
|
key: 'store_app',
|
|
33
33
|
type: 1,
|
|
34
34
|
title: t('ORDERING_STORE_APP', 'Store App _version_').replace('_version_', '2.0'),
|
|
35
|
-
short_description: t('
|
|
36
|
-
long_description: t('
|
|
35
|
+
short_description: t('STORE_APP_FREE_SHORT_DESCRIPTION', 'Give your business owners or managers a tool to manage their whole businesses incoming orders on the go by installing a branded app on any mobile device they have.'),
|
|
36
|
+
long_description: t('STORE_APP_FREE_LONG_DESCRIPTION', 'Give your business owners or managers a tool to manage their whole businesses incoming orders on the go by installing a branded app on any mobile device they have.<br /><sub>This is a branded Ordering.co product; use it with your project, email, and password for free; features might be limited.</sub>'),
|
|
37
37
|
icon: <CartPlusFill />,
|
|
38
38
|
image: theme.images.apps.storeApp,
|
|
39
39
|
app_store: 'https://apps.apple.com/us/app/store-app-2-0/id1608192050',
|
|
@@ -43,8 +43,8 @@ export const FreeProductsList = (props) => {
|
|
|
43
43
|
key: 'driver_app',
|
|
44
44
|
type: 1,
|
|
45
45
|
title: t('ORDERING_DRIVER_APP', 'Driver App _version_').replace('_version_', '2.0'),
|
|
46
|
-
short_description: t('
|
|
47
|
-
long_description: t('
|
|
46
|
+
short_description: t('DRIVER_APP_FREE_SHORT_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.'),
|
|
47
|
+
long_description: t('DRIVER_APP_FREE_LONG_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.<br /><sub>This is a branded Ordering.co product; use it with your project, email, and password for free; features might be limited.</sub>'),
|
|
48
48
|
icon: <img src={theme.images.icons.delivery} alt='delivery app icon' />,
|
|
49
49
|
image: theme.images.apps.driverApp,
|
|
50
50
|
app_store: 'https://apps.apple.com/us/app/driver-app-2-0/id1606257815',
|
|
@@ -54,8 +54,8 @@ export const FreeProductsList = (props) => {
|
|
|
54
54
|
key: 'pos_app',
|
|
55
55
|
type: 1,
|
|
56
56
|
title: t('ORDERING_POS', 'POS _version_').replace('_version_', '2.0'),
|
|
57
|
-
short_description: t('
|
|
58
|
-
long_description: t('
|
|
57
|
+
short_description: t('POS_APP_FREE_SHORT_DESCRIPTION', 'Create a loyal and returning community by offering the best customer experience; customer service is always the definite factor for users to keep returning; this fast software will help you understand customers, save their numbers, and order quickly.'),
|
|
58
|
+
long_description: t('POS_APP_FREE_LONG_DESCRIPTION', 'Create a loyal and returning community by offering the best customer experience; customer service is always the definite factor for users to keep returning; this fast software will help you understand customers, save their numbers, and order quickly.<br /><sub>This is a branded Ordering.co product; use it with your project, email, and password for free; features might be limited.</sub>'),
|
|
59
59
|
icon: <img src={theme.images.icons.posTerminal} alt='pos app icon' />,
|
|
60
60
|
image: theme.images.apps.posApp,
|
|
61
61
|
app_store: 'https://apps.apple.com/us/app/ordering-pos-2-0/id1609520468',
|
|
@@ -65,8 +65,8 @@ export const FreeProductsList = (props) => {
|
|
|
65
65
|
key: 'kiosk_app',
|
|
66
66
|
type: 1,
|
|
67
67
|
title: t('ORDERING_KIOSK', 'Ordering Kiosk _version_').replace('_version_', '2.0'),
|
|
68
|
-
short_description: t('
|
|
69
|
-
long_description: t('
|
|
68
|
+
short_description: t('KIOSK_APP_FREE_SHORT_DESCRIPTION', 'Simplify the ordering process inside your store. Allow your customers to select what they want to purchase products and pay directly in this kiosk—made with the highest tech, intuitive, and modern.'),
|
|
69
|
+
long_description: t('KIOSK_APP_FREE_LONG_DESCRIPTION', 'Simplify the ordering process inside your store. Allow your customers to select what they want to purchase products and pay directly in this kiosk—made with the highest tech, intuitive, and modern.<br /><sub>This is a branded Ordering.co product; use it with your project, email, and password for free; features might be limited.</sub>'),
|
|
70
70
|
icon: <img src={theme.images.icons.poster} alt='kiosk app icon' />,
|
|
71
71
|
image: theme.images.apps.kioskApp,
|
|
72
72
|
app_store: 'https://apps.apple.com/us/app/ordering-kiosk-2-0/id1609314960',
|
|
@@ -76,8 +76,8 @@ export const FreeProductsList = (props) => {
|
|
|
76
76
|
key: 'call_center',
|
|
77
77
|
type: 2,
|
|
78
78
|
title: t('ORDERING_CALL_CENTER', 'Call Center _version_').replace('_version_', '2.0'),
|
|
79
|
-
short_description: t('
|
|
80
|
-
long_description: t('
|
|
79
|
+
short_description: t('CALL_CENTER_FREE_SHORT_DESCRIPTION', 'Take orders over the phone, too; agents will take orders over the phone and create the order for your customers in just a few minutes, using this friendly and intuitive software.'),
|
|
80
|
+
long_description: t('CALL_CENTER_FREE_LONG_DESCRIPTION', 'Take orders over the phone, too; agents will take orders over the phone and create the order for your customers in just a few minutes, using this friendly and intuitive software.<br /><sub>This is a branded Ordering.co product; use it with your project, email, and password for free; features might be limited.</sub>'),
|
|
81
81
|
icon: <Headset />,
|
|
82
82
|
image: theme.images.apps.callCenterApp,
|
|
83
83
|
web_url: 'https://callcenter.tryordering.com/search'
|
|
@@ -33,8 +33,8 @@ export const PurchasedProductsList = (props) => {
|
|
|
33
33
|
key: 'store_app',
|
|
34
34
|
type: 1,
|
|
35
35
|
title: t('ORDERING_STORE_APP', 'Store App _version_').replace('_version_', '2.0'),
|
|
36
|
-
short_description: t('
|
|
37
|
-
long_description: t('
|
|
36
|
+
short_description: t('STORE_APP_PURCHASE_SHORT_DESCRIPTION', 'Give your business owners or managers a tool to manage their whole business´s incoming orders on the go by installing a branded app on any mobile device they have.'),
|
|
37
|
+
long_description: t('STORE_APP_PURCHASE_LONG_DESCRIPTION', 'Give your business owners or managers a tool to manage their whole business´s incoming orders on the go by installing a branded app on any mobile device they have.<br /><sub>This App is delivered in less than 5 working days, fully branded with your guidelines.</sub>'),
|
|
38
38
|
icon: <CartPlusFill />,
|
|
39
39
|
image: theme.images.apps.storeApp,
|
|
40
40
|
app_store: 'https://apps.tryordering.com/store/marketplace?category=306&product=1717',
|
|
@@ -44,8 +44,8 @@ export const PurchasedProductsList = (props) => {
|
|
|
44
44
|
key: 'driver_app',
|
|
45
45
|
type: 1,
|
|
46
46
|
title: t('ORDERING_DRIVER_APP', 'Driver App _version_').replace('_version_', '2.0'),
|
|
47
|
-
short_description: t('
|
|
48
|
-
long_description: t('
|
|
47
|
+
short_description: t('DRIVER_APP_PURCHASE_SHORT_DESCRIPTION', 'Your fleets best companion gives drivers a tool to receive orders, follow optimal routes, add delivery evidence, set orders timing, and control their busy times.'),
|
|
48
|
+
long_description: t('DRIVER_APP_PURCHASE_LONG_DESCRIPTION', 'Your fleets best companion gives drivers a tool to receive orders, follow optimal routes, add delivery evidence, set orders timing, and control their busy times.<br /><sub>This App is delivered in less than 5 working days, fully branded with your guidelines.</sub>'),
|
|
49
49
|
icon: <img src={theme.images.icons.delivery} alt='delivery app icon' />,
|
|
50
50
|
image: theme.images.apps.driverApp,
|
|
51
51
|
app_store: 'https://apps.tryordering.com/store/marketplace?category=306&product=1718',
|
|
@@ -55,8 +55,8 @@ export const PurchasedProductsList = (props) => {
|
|
|
55
55
|
key: 'pos_app',
|
|
56
56
|
type: 1,
|
|
57
57
|
title: t('ORDERING_POS', 'POS _version_').replace('_version_', '2.0'),
|
|
58
|
-
short_description: t('
|
|
59
|
-
long_description: t('
|
|
58
|
+
short_description: t('POS_APP_PURCHASE_SHORT_DESCRIPTION', 'Create a loyal and returning community by offering the best customer experience; customer service is always the definite factor for users to keep returning; this fast software will help you understand customers, save their numbers, and order quickly.'),
|
|
59
|
+
long_description: t('POS_APP_PURCHASE_LONG_DESCRIPTION', 'Create a loyal and returning community by offering the best customer experience; customer service is always the definite factor for users to keep returning; this fast software will help you understand customers, save their numbers, and order quickly.<br /><sub>This App is delivered in less than 5 working days, fully branded with your guidelines.</sub>'),
|
|
60
60
|
icon: <img src={theme.images.icons.posTerminal} alt='pos app icon' />,
|
|
61
61
|
image: theme.images.apps.posApp,
|
|
62
62
|
app_store: 'https://apps.tryordering.com/store/marketplace?category=306&product=1793',
|
|
@@ -66,8 +66,8 @@ export const PurchasedProductsList = (props) => {
|
|
|
66
66
|
key: 'kiosk_app',
|
|
67
67
|
type: 1,
|
|
68
68
|
title: t('ORDERING_KIOSK', 'Ordering Kiosk _version_').replace('_version_', '2.0'),
|
|
69
|
-
short_description: t('
|
|
70
|
-
long_description: t('
|
|
69
|
+
short_description: t('KIOSK_APP_PURCHASE_SHORT_DESCRIPTION', 'Simplify the ordering process inside your store. Allow your customers to select what they want to purchase products and pay directly in this kiosk—made with the highest tech, intuitive, and modern.'),
|
|
70
|
+
long_description: t('KIOSK_APP_PURCHASE_LONG_DESCRIPTION', 'Simplify the ordering process inside your store. Allow your customers to select what they want to purchase products and pay directly in this kiosk—made with the highest tech, intuitive, and modern.<br /><sub>This App is delivered in less than 5 working days, fully branded with your guidelines.</sub>'),
|
|
71
71
|
icon: <img src={theme.images.icons.poster} alt='kiosk app icon' />,
|
|
72
72
|
image: theme.images.apps.kioskApp,
|
|
73
73
|
app_store: 'https://apps.tryordering.com/store/marketplace?category=306&product=1794',
|
|
@@ -77,8 +77,8 @@ export const PurchasedProductsList = (props) => {
|
|
|
77
77
|
key: 'call_center',
|
|
78
78
|
type: 2,
|
|
79
79
|
title: t('ORDERING_CALL_CENTER', 'Call Center _version_').replace('_version_', '2.0'),
|
|
80
|
-
short_description: t('
|
|
81
|
-
long_description: t('
|
|
80
|
+
short_description: t('CALL_CENTER_PURCHASE_SHORT_DESCRIPTION', 'Take orders over the phone, too; agents will take orders over the phone and create the order for your customers in just a few minutes, using this friendly and intuitive software.'),
|
|
81
|
+
long_description: t('CALL_CENTER_PURCHASE_LONG_DESCRIPTION', 'Take orders over the phone, too; agents will take orders over the phone and create the order for your customers in just a few minutes, using this friendly and intuitive software.<br /><sub>This App is delivered in less than 5 working days, fully branded with your guidelines.</sub>'),
|
|
82
82
|
icon: <Headset />,
|
|
83
83
|
image: theme.images.apps.callCenterApp,
|
|
84
84
|
web_url: 'https://apps.tryordering.com/store/marketplace?category=306&product=1792'
|
|
@@ -33,7 +33,7 @@ const LanguageSelectorUI = (props) => {
|
|
|
33
33
|
optionInnerMaxHeight='60vh'
|
|
34
34
|
options={languagesState?.loading ? defaultLanguages : _languages}
|
|
35
35
|
defaultValue={languagesState?.loading ? defaultCurrentLanguage : currentLanguage}
|
|
36
|
-
onChange={(languageId) => handleChangeLanguage(languageId)}
|
|
36
|
+
onChange={(languageId) => handleChangeLanguage(languageId, true)}
|
|
37
37
|
notReload={notReload}
|
|
38
38
|
minWidth='200px'
|
|
39
39
|
/>
|
|
@@ -72,8 +72,8 @@ export const OrdersTable = (props) => {
|
|
|
72
72
|
customer: true,
|
|
73
73
|
driver: true,
|
|
74
74
|
advanced: true,
|
|
75
|
-
timer:
|
|
76
|
-
slaBar:
|
|
75
|
+
timer: configState?.configs?.order_deadlines_enabled?.value === '1',
|
|
76
|
+
slaBar: configState?.configs?.order_deadlines_enabled?.value === '1',
|
|
77
77
|
total: true
|
|
78
78
|
})
|
|
79
79
|
|
|
@@ -340,7 +340,7 @@ export const OrdersTable = (props) => {
|
|
|
340
340
|
{allowColumns?.advanced && (
|
|
341
341
|
<th colSpan='3' className='advanced'>{t('ADVANCED_LOGISTICS', 'Advanced logistics')}</th>
|
|
342
342
|
)}
|
|
343
|
-
{allowColumns?.timer && (
|
|
343
|
+
{(allowColumns?.timer && (groupStatus === 'pending' || groupStatus === 'inProgress')) && (
|
|
344
344
|
<th colSpan='2' className='timer'>{t('SLA_TIMER', 'SLA’s timer')}</th>
|
|
345
345
|
)}
|
|
346
346
|
<th className='orderPrice'>
|
|
@@ -615,18 +615,13 @@ export const OrdersTable = (props) => {
|
|
|
615
615
|
</div>
|
|
616
616
|
</td>
|
|
617
617
|
)}
|
|
618
|
-
{allowColumns?.timer && (
|
|
618
|
+
{(allowColumns?.timer && (groupStatus === 'pending' || groupStatus === 'inProgress')) && (
|
|
619
619
|
<td className='timer'>
|
|
620
620
|
<Timer>
|
|
621
|
-
{
|
|
622
|
-
|
|
623
|
-
<p className='bold'>{t('TIMER', 'Timer')}</p>
|
|
624
|
-
<p className={getStatusClassName(getDelayMinutes(order))}>{displayDelayedTime(order)}</p>
|
|
625
|
-
</>
|
|
626
|
-
)}
|
|
621
|
+
<p className='bold'>{t('TIMER', 'Timer')}</p>
|
|
622
|
+
<p className={getStatusClassName(getDelayMinutes(order))}>{displayDelayedTime(order)}</p>
|
|
627
623
|
</Timer>
|
|
628
|
-
</td>
|
|
629
|
-
)}
|
|
624
|
+
</td>)}
|
|
630
625
|
<td className='orderPrice'>
|
|
631
626
|
<div className='info'>
|
|
632
627
|
{allowColumns?.total && (
|
|
@@ -47,10 +47,10 @@ const LanguageSettingUI = (props) => {
|
|
|
47
47
|
<FieldContainer key={field.id}>
|
|
48
48
|
<div className='name'>{field.name}</div>
|
|
49
49
|
<div
|
|
50
|
-
className={
|
|
50
|
+
className={field.default ? 'checked default' : 'default'}
|
|
51
51
|
onClick={() => setLanguage(field)}
|
|
52
52
|
>
|
|
53
|
-
{(
|
|
53
|
+
{(field.default) ? <RecordCircle /> : <Circle />}
|
|
54
54
|
</div>
|
|
55
55
|
<div className='status'>
|
|
56
56
|
<Switch
|
|
@@ -10,6 +10,7 @@ import { SideBar } from '../../Shared'
|
|
|
10
10
|
import { CheckoutFieldsSetting } from '../CheckoutFieldsSetting'
|
|
11
11
|
import { AddressFieldsSetting } from '../AddressFieldsSetting'
|
|
12
12
|
import { LanguageSetting } from '../LanguageSetting'
|
|
13
|
+
import { SitesAuthSettings } from '../SitesAuthSettings'
|
|
13
14
|
import { MultiCountrySettings } from '../MultiCountrySettings'
|
|
14
15
|
|
|
15
16
|
import {
|
|
@@ -28,13 +29,14 @@ const SettingsUI = (props) => {
|
|
|
28
29
|
|
|
29
30
|
const [, t] = useLanguage()
|
|
30
31
|
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
32
|
+
const { search } = useLocation()
|
|
31
33
|
|
|
32
34
|
const [isOpenDescription, setIsOpenDescription] = useState(false)
|
|
33
35
|
const [selectedCategory, setSelectedCategory] = useState(null)
|
|
34
36
|
const [isOpenSettingDetails, setIsOpenSettingDetails] = useState(null)
|
|
37
|
+
const [openSitesAuthSettings, setOpenSitesAuthSettings] = useState(false)
|
|
35
38
|
const [openMultiCountrySettings, setOpenMultiCountrySettings] = useState(false)
|
|
36
39
|
const [moveDistance, setMoveDistance] = useState(0)
|
|
37
|
-
const { search } = useLocation()
|
|
38
40
|
|
|
39
41
|
let category
|
|
40
42
|
|
|
@@ -62,17 +64,19 @@ const SettingsUI = (props) => {
|
|
|
62
64
|
|
|
63
65
|
const handleOpenDescription = (category) => {
|
|
64
66
|
setIsOpenSettingDetails(null)
|
|
67
|
+
setOpenSitesAuthSettings(false)
|
|
68
|
+
setOpenMultiCountrySettings(false)
|
|
65
69
|
setIsOpenDescription(true)
|
|
66
70
|
setSelectedCategory(category)
|
|
67
|
-
setOpenMultiCountrySettings(false)
|
|
68
71
|
onBasicSettingsRedirect({ category: category?.id })
|
|
69
72
|
handChangeConfig && handChangeConfig(false)
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
const handleOpenSettingDetails = (item) => {
|
|
73
76
|
setIsOpenDescription(false)
|
|
74
|
-
|
|
77
|
+
setOpenSitesAuthSettings(false)
|
|
75
78
|
setOpenMultiCountrySettings(false)
|
|
79
|
+
setSelectedCategory(null)
|
|
76
80
|
setIsOpenSettingDetails(item)
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -161,6 +165,21 @@ const SettingsUI = (props) => {
|
|
|
161
165
|
active={isOpenSettingDetails === 'address'}
|
|
162
166
|
/>
|
|
163
167
|
</SettingItemWrapper>
|
|
168
|
+
<SettingItemWrapper
|
|
169
|
+
className='col-md-4 col-sm-6'
|
|
170
|
+
onClick={() => {
|
|
171
|
+
setIsOpenDescription(false)
|
|
172
|
+
setIsOpenSettingDetails(null)
|
|
173
|
+
setOpenSitesAuthSettings(true)
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
<SettingItemUI
|
|
177
|
+
title={t('SITES_LOGIN_SIGNUP_SETTINGS', 'Sites Login/Signup Settings')}
|
|
178
|
+
description={t('SITES_LOGIN_SIGNUP_SETTINGS_DESC', 'Advanced sites login/sign up settings')}
|
|
179
|
+
icon={<GearFill />}
|
|
180
|
+
active={openSitesAuthSettings}
|
|
181
|
+
/>
|
|
182
|
+
</SettingItemWrapper>
|
|
164
183
|
<SettingItemWrapper
|
|
165
184
|
className='col-md-4 col-sm-6'
|
|
166
185
|
onClick={() => {
|
|
@@ -216,6 +235,19 @@ const SettingsUI = (props) => {
|
|
|
216
235
|
/>
|
|
217
236
|
)
|
|
218
237
|
}
|
|
238
|
+
{openSitesAuthSettings && (
|
|
239
|
+
<SideBar
|
|
240
|
+
defaultSideBarWidth={500 + moveDistance}
|
|
241
|
+
moveDistance={moveDistance}
|
|
242
|
+
open={openSitesAuthSettings}
|
|
243
|
+
onClose={() => {
|
|
244
|
+
setMoveDistance(0)
|
|
245
|
+
setOpenSitesAuthSettings(false)
|
|
246
|
+
}}
|
|
247
|
+
>
|
|
248
|
+
<SitesAuthSettings setMoveDistance={setMoveDistance} />
|
|
249
|
+
</SideBar>
|
|
250
|
+
)}
|
|
219
251
|
{openMultiCountrySettings && (
|
|
220
252
|
<SideBar
|
|
221
253
|
defaultSideBarWidth={500 + moveDistance}
|
|
@@ -64,9 +64,6 @@ export const SettingsListUI = (props) => {
|
|
|
64
64
|
if (isNaN(Number(item?.value))) {
|
|
65
65
|
invalidMessageList.push(t('VALIDATION_ERROR_NUMERIC', `The ${item?.name} must be a number.`).replace('_attribute_', item?.name))
|
|
66
66
|
}
|
|
67
|
-
if (isNaN(Number(item?.value)) || Number(item?.value) <= 0) {
|
|
68
|
-
invalidMessageList.push(t('VALIDATION_MUST_BIGGER_ZERO', `${item?.name} must be bigger than zero`).replace('_attribute_', item?.name))
|
|
69
|
-
}
|
|
70
67
|
if (item?.key === 'platform_fee_percentage' && Number(item?.value) > 100) {
|
|
71
68
|
invalidMessageList.push(t('VALIDATION_MUST_SMALLER_HUNDRED', `${item?.name} must be not bigger than 100`).replace('_attribute_', item?.name))
|
|
72
69
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import Skeleton from 'react-loading-skeleton'
|
|
4
|
+
import { NotFoundSource } from '../../Shared'
|
|
5
|
+
import { SettingsSelectUI } from '../SettingsSelectUI'
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
SettingsListContainer,
|
|
9
|
+
GeneralContainer,
|
|
10
|
+
GeneralTitle,
|
|
11
|
+
FormContainer,
|
|
12
|
+
FormGroupText,
|
|
13
|
+
SkeletonWrapper
|
|
14
|
+
} from './styles'
|
|
15
|
+
|
|
16
|
+
export const SiteSettingDetails = (props) => {
|
|
17
|
+
const {
|
|
18
|
+
selectedSiteId,
|
|
19
|
+
siteConfigsState,
|
|
20
|
+
handleChangeConfig
|
|
21
|
+
} = props
|
|
22
|
+
|
|
23
|
+
const [, t] = useLanguage()
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<SettingsListContainer>
|
|
27
|
+
<GeneralTitle>
|
|
28
|
+
<p>{t('SETTINGS', 'All Settings')}</p>
|
|
29
|
+
</GeneralTitle>
|
|
30
|
+
{
|
|
31
|
+
siteConfigsState.loading ? (
|
|
32
|
+
<SkeletonWrapper>
|
|
33
|
+
{[...Array(6).keys()].map(i => (
|
|
34
|
+
<div key={i}>
|
|
35
|
+
<Skeleton height={14} width={200} />
|
|
36
|
+
<Skeleton height={30} />
|
|
37
|
+
</div>
|
|
38
|
+
))}
|
|
39
|
+
</SkeletonWrapper>
|
|
40
|
+
) : (
|
|
41
|
+
<GeneralContainer>
|
|
42
|
+
<FormContainer>
|
|
43
|
+
{
|
|
44
|
+
siteConfigsState.configs.length > 0 && siteConfigsState.configs.map((config, i) => (
|
|
45
|
+
<div key={i}>
|
|
46
|
+
{
|
|
47
|
+
config.type === 1 && (
|
|
48
|
+
<FormGroupText className='form-group'>
|
|
49
|
+
<label>{config?.name}</label>
|
|
50
|
+
<input
|
|
51
|
+
type='text'
|
|
52
|
+
defaultValue={config?.value}
|
|
53
|
+
onChange={(e) => handleChangeConfig(e.target.value, selectedSiteId, config?.id)}
|
|
54
|
+
className='form-control'
|
|
55
|
+
placeholder={config?.name}
|
|
56
|
+
/>
|
|
57
|
+
</FormGroupText>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
{
|
|
61
|
+
config.type === 2 && (
|
|
62
|
+
<SettingsSelectUI
|
|
63
|
+
config={config}
|
|
64
|
+
defaultValue={config?.value}
|
|
65
|
+
handleSelectChange={(value) => handleChangeConfig(value, selectedSiteId, config?.id)}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
</div>
|
|
70
|
+
))
|
|
71
|
+
}
|
|
72
|
+
</FormContainer>
|
|
73
|
+
</GeneralContainer>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
{
|
|
77
|
+
!siteConfigsState.loading && siteConfigsState.error && (
|
|
78
|
+
<NotFoundSource
|
|
79
|
+
content={t('NOT_FOUND_CONFIG', 'Sorry, we couldn\'t find the config.')}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
</SettingsListContainer>
|
|
84
|
+
</>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const SettingsListContainer = styled.div`
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding: 26px 20px;
|
|
6
|
+
overflow-x: hidden;
|
|
7
|
+
`
|
|
8
|
+
|
|
9
|
+
export const GeneralContainer = styled.div``
|
|
10
|
+
|
|
11
|
+
export const GeneralTitle = styled.div`
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
|
|
15
|
+
p {
|
|
16
|
+
font-weight: bold;
|
|
17
|
+
font-size: 20px;
|
|
18
|
+
color: ${props => props.theme.colors.headingColor};
|
|
19
|
+
margin-bottom: 6px;
|
|
20
|
+
}
|
|
21
|
+
`
|
|
22
|
+
|
|
23
|
+
export const FormContainer = styled.div`
|
|
24
|
+
margin-top: 20px;
|
|
25
|
+
`
|
|
26
|
+
|
|
27
|
+
export const FormGroupText = styled.div`
|
|
28
|
+
margin-bottom: 20px;
|
|
29
|
+
|
|
30
|
+
label {
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
margin-bottom: 10px;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
color: ${props => props.theme.colors.headingColor};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
input[type='text'] {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
height: 44px;
|
|
40
|
+
border: 1px solid #DEE2E6;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
border-radius: 7.6px;
|
|
43
|
+
}
|
|
44
|
+
`
|
|
45
|
+
|
|
46
|
+
export const Required = styled.span`
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
font-size: 10px;
|
|
49
|
+
color: #E63757;
|
|
50
|
+
`
|
|
51
|
+
|
|
52
|
+
export const SkeletonWrapper = styled.div`
|
|
53
|
+
margin-top: 20px;
|
|
54
|
+
|
|
55
|
+
div {
|
|
56
|
+
margin-bottom: 15px;
|
|
57
|
+
}
|
|
58
|
+
`
|