ordering-ui-admin-external 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/main.css +134 -129
- package/_bundles/{ordering-ui-admin.47d189a0568d6b5734d5.js → ordering-ui-admin.3ebe4d4f772eaeb4f851.js} +2 -2
- package/_bundles/{ordering-ui-admin.47d189a0568d6b5734d5.js.LICENSE.txt → ordering-ui-admin.3ebe4d4f772eaeb4f851.js.LICENSE.txt} +4 -4
- package/_modules/components/BusinessIntelligence/Reports/index.js +1 -1
- package/_modules/components/CartRecovery/OpenCartsFilterGroup/index.js +1 -1
- package/_modules/components/CartRecovery/RecoveryActionHeader/index.js +1 -1
- package/_modules/components/Delivery/AddressForm/index.js +1 -1
- package/_modules/components/Delivery/DriversCompaniesListing/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupLogs/index.js +2 -2
- package/_modules/components/Delivery/DriversGroupsListing/index.js +1 -1
- package/_modules/components/Home/HomePage/index.js +29 -6
- package/_modules/components/Home/HomePage/styles.js +27 -5
- package/_modules/components/LanguageSelector/index.js +1 -1
- package/_modules/components/Login/LoginForm/index.js +119 -20
- package/_modules/components/Login/LoginForm/styles.js +60 -30
- package/_modules/components/Loyalty/RewardsPrograms/index.js +1 -1
- package/_modules/components/Marketing/CampaignSignUpOption/index.js +1 -1
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +1 -1
- package/_modules/components/Messages/MessagesListing/styles.js +1 -1
- package/_modules/components/MyProducts/AppLayout/index.js +75 -0
- package/_modules/components/MyProducts/AppLayout/styles.js +41 -0
- package/_modules/components/MyProducts/CallCenterApp/index.js +42 -0
- package/_modules/components/MyProducts/ContentForm/index.js +236 -0
- package/_modules/components/MyProducts/ContentForm/styles.js +32 -0
- package/_modules/components/MyProducts/CustomerApp/index.js +18 -25
- package/_modules/components/MyProducts/DriverApp/index.js +18 -45
- package/_modules/components/MyProducts/KioskApp/index.js +42 -0
- package/_modules/components/MyProducts/OrderingWebsite/index.js +351 -3
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +54 -3
- package/_modules/components/MyProducts/PosApp/index.js +42 -0
- package/_modules/components/MyProducts/StoreApp/index.js +18 -45
- package/_modules/components/MyProducts/index.js +22 -1
- package/_modules/components/OrderingProducts/OrderingProductDetails/index.js +6 -8
- package/_modules/components/OrderingProducts/SiteTheme/index.js +13 -4
- package/_modules/components/Orders/DeliveriesManager/index.js +6 -0
- package/_modules/components/Orders/DriversManager/index.js +7 -1
- package/_modules/components/Orders/GoogleMapsApiKeySettingButton/index.js +110 -0
- package/_modules/components/{MyProducts/CustomerApp/styles.js → Orders/GoogleMapsApiKeySettingButton/style.js} +9 -13
- package/_modules/components/Orders/Messages/styles.js +3 -3
- package/_modules/components/Orders/OrderContactInformation/index.js +7 -7
- package/_modules/components/Orders/OrdersContentHeader/index.js +4 -2
- package/_modules/components/Orders/OrdersManager/index.js +3 -2
- package/_modules/components/Profile/ProfilePage/index.js +2 -1
- package/_modules/components/Profile/ProfilePage/styles.js +2 -2
- package/_modules/components/Profile/Sessions/index.js +209 -0
- package/_modules/components/Profile/Sessions/styles.js +46 -0
- package/_modules/components/Profile/index.js +8 -1
- package/_modules/components/Settings/EmailSetting/index.js +2 -29
- package/_modules/components/Settings/PageForm/index.js +6 -1
- package/_modules/components/Settings/Settings/index.js +0 -62
- package/_modules/components/Shared/CitySelector/index.js +9 -1
- package/_modules/components/Shared/Modal/index.js +5 -3
- package/_modules/components/Shared/Modal/styles.js +25 -23
- package/_modules/components/SidebarMenu/index.js +117 -76
- package/_modules/components/SidebarMenu/styles.js +4 -2
- package/_modules/components/Stores/AddBusinessForm/index.js +22 -8
- package/_modules/components/Stores/BusinessBrandGENDetail/index.js +6 -1
- package/_modules/components/Stores/BusinessProductList/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductsCategories/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +6 -1
- package/_modules/components/Stores/BusinessProductsListing/index.js +35 -8
- package/_modules/components/Stores/BusinessProductsListing/styles.js +6 -4
- package/_modules/components/Stores/BusinessSelectHeader/index.js +17 -9
- package/_modules/components/Stores/BusinessSelectHeader/styles.js +1 -1
- package/_modules/components/Stores/BusinessSummary/index.js +21 -8
- package/_modules/components/Stores/BusinessSummary/styles.js +5 -3
- package/_modules/components/Stores/BusinessSync/index.js +6 -2
- package/_modules/components/Stores/BusinessSyncItsaCheckmate/index.js +52 -0
- package/_modules/components/Stores/BusinessSyncItsaCheckmate/styles.js +31 -0
- package/_modules/components/Support/index.js +1 -1
- package/_modules/hooks/useCountdownTimer.js +40 -0
- package/_modules/index.js +18 -0
- package/_modules/utils/index.js +65 -4
- package/index-template.js +49 -8
- package/package.json +3 -2
- package/src/components/BusinessIntelligence/Reports/index.js +1 -1
- package/src/components/CartRecovery/OpenCartsFilterGroup/index.js +1 -1
- package/src/components/CartRecovery/RecoveryActionHeader/index.js +1 -1
- package/src/components/Delivery/AddressForm/index.js +1 -1
- package/src/components/Delivery/DriversCompaniesListing/index.js +1 -1
- package/src/components/Delivery/DriversGroupLogs/index.js +1 -1
- package/src/components/Delivery/DriversGroupsListing/index.js +1 -1
- package/src/components/Home/HomePage/index.js +62 -6
- package/src/components/Home/HomePage/styles.js +48 -1
- package/src/components/LanguageSelector/index.js +1 -1
- package/src/components/Login/LoginForm/index.js +211 -94
- package/src/components/Login/LoginForm/styles.js +74 -8
- package/src/components/Loyalty/RewardsPrograms/index.js +1 -1
- package/src/components/Marketing/CampaignSignUpOption/index.js +1 -1
- package/src/components/Marketing/EnterprisePromotionListing/index.js +1 -1
- package/src/components/Messages/MessagesListing/styles.js +3 -5
- package/src/components/MyProducts/AppLayout/index.js +97 -0
- package/src/components/MyProducts/AppLayout/styles.js +145 -0
- package/src/components/MyProducts/CallCenterApp/index.js +29 -0
- package/src/components/MyProducts/ContentForm/index.js +230 -0
- package/src/components/MyProducts/ContentForm/styles.js +67 -0
- package/src/components/MyProducts/CustomerApp/index.js +17 -41
- package/src/components/MyProducts/DriverApp/index.js +16 -70
- package/src/components/MyProducts/KioskApp/index.js +29 -0
- package/src/components/MyProducts/OrderingWebsite/index.js +452 -25
- package/src/components/MyProducts/OrderingWebsite/styles.js +244 -0
- package/src/components/MyProducts/PosApp/index.js +29 -0
- package/src/components/MyProducts/StoreApp/index.js +16 -70
- package/src/components/MyProducts/index.js +7 -1
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +4 -4
- package/src/components/OrderingProducts/SiteTheme/index.js +8 -0
- package/src/components/Orders/DeliveriesManager/index.js +5 -1
- package/src/components/Orders/DriversManager/index.js +7 -1
- package/src/components/Orders/GoogleMapsApiKeySettingButton/index.js +94 -0
- package/src/components/Orders/GoogleMapsApiKeySettingButton/style.js +38 -0
- package/src/components/Orders/Messages/styles.js +6 -0
- package/src/components/Orders/OrderContactInformation/index.js +1 -1
- package/src/components/Orders/OrdersContentHeader/index.js +6 -1
- package/src/components/Orders/OrdersManager/index.js +2 -1
- package/src/components/Profile/ProfilePage/index.js +2 -0
- package/src/components/Profile/ProfilePage/styles.js +2 -1
- package/src/components/Profile/Sessions/index.js +209 -0
- package/src/components/Profile/Sessions/styles.js +132 -0
- package/src/components/Profile/index.js +3 -1
- package/src/components/Settings/EmailSetting/index.js +0 -32
- package/src/components/Settings/PageForm/index.js +3 -0
- package/src/components/Settings/Settings/index.js +0 -65
- package/src/components/Shared/CitySelector/index.js +8 -0
- package/src/components/Shared/Modal/index.js +32 -26
- package/src/components/Shared/Modal/styles.js +11 -3
- package/src/components/SidebarMenu/index.js +90 -68
- 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
|
@@ -166,7 +166,7 @@ const OrdersManagerUI = (props) => {
|
|
|
166
166
|
<OrdersContentHeader
|
|
167
167
|
isDisableTitle={isSelectedOrders}
|
|
168
168
|
isDisableControl={isSelectedOrders}
|
|
169
|
-
title={t('
|
|
169
|
+
title={t('ORDERS_LIST', 'Orders list')}
|
|
170
170
|
searchValue={searchValue}
|
|
171
171
|
driverGroupList={driverGroupList}
|
|
172
172
|
driversList={driversList}
|
|
@@ -252,6 +252,7 @@ const OrdersManagerUI = (props) => {
|
|
|
252
252
|
isTourFlag={isTourFlag}
|
|
253
253
|
setIsTourFlag={setIsTourFlag}
|
|
254
254
|
setIsTourOpen={setIsTourOpen}
|
|
255
|
+
drivers={driversList.drivers}
|
|
255
256
|
/>
|
|
256
257
|
)}
|
|
257
258
|
|
|
@@ -8,6 +8,7 @@ import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
|
8
8
|
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
9
9
|
import { IconButton, Button } from '../../../styles'
|
|
10
10
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
11
|
+
import { Sessions } from '../Sessions'
|
|
11
12
|
|
|
12
13
|
import {
|
|
13
14
|
Container,
|
|
@@ -66,6 +67,7 @@ const ProfilePageUI = (props) => {
|
|
|
66
67
|
</ButtonsGroup>
|
|
67
68
|
</UserInfoWrapper>
|
|
68
69
|
</UserInfoContainer>
|
|
70
|
+
<Sessions />
|
|
69
71
|
</Container>
|
|
70
72
|
)
|
|
71
73
|
}
|
|
@@ -20,6 +20,7 @@ export const HeaderContainer = styled.div`
|
|
|
20
20
|
export const UserInfoContainer = styled.div`
|
|
21
21
|
padding-top: 30px;
|
|
22
22
|
display: flex;
|
|
23
|
+
margin-bottom: 40px;
|
|
23
24
|
`
|
|
24
25
|
export const UserImage = styled.div`
|
|
25
26
|
border-radius: 8px;
|
|
@@ -29,7 +30,7 @@ export const UserImage = styled.div`
|
|
|
29
30
|
img {
|
|
30
31
|
width: 100%;
|
|
31
32
|
height: 100%;
|
|
32
|
-
object-fit:
|
|
33
|
+
object-fit: cover;
|
|
33
34
|
border-radius: 8px;
|
|
34
35
|
}
|
|
35
36
|
`
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage, useSession, useUtils, Sessions as SessionsController } from 'ordering-components-admin-external'
|
|
3
|
+
import Skeleton from 'react-loading-skeleton'
|
|
4
|
+
import moment from 'moment'
|
|
5
|
+
import { Button } from '../../../styles'
|
|
6
|
+
import { Confirm, Alert, Modal } from '../../Shared'
|
|
7
|
+
import { X as Close, ArrowRight } from 'react-bootstrap-icons'
|
|
8
|
+
import {
|
|
9
|
+
Container,
|
|
10
|
+
NoSessionsContainer,
|
|
11
|
+
NoMessage,
|
|
12
|
+
SessionItem,
|
|
13
|
+
SessionsWrapper,
|
|
14
|
+
DurationWrapper,
|
|
15
|
+
SeessionDelete,
|
|
16
|
+
MoreInfoWrapper,
|
|
17
|
+
ButtonsGroup,
|
|
18
|
+
ButtonGroupWrapper
|
|
19
|
+
} from './styles'
|
|
20
|
+
|
|
21
|
+
export const SessionsUI = (props) => {
|
|
22
|
+
const {
|
|
23
|
+
sessionsList,
|
|
24
|
+
actionState,
|
|
25
|
+
handleDeleteSession,
|
|
26
|
+
handleDeleteAllSessions
|
|
27
|
+
} = props
|
|
28
|
+
|
|
29
|
+
const [, t] = useLanguage()
|
|
30
|
+
const [{ user }] = useSession()
|
|
31
|
+
const [{ parseDate }] = useUtils()
|
|
32
|
+
|
|
33
|
+
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
34
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
35
|
+
const [isMoreInfo, setIsMoreInfo] = useState(false)
|
|
36
|
+
|
|
37
|
+
const onDeleteSession = (session) => {
|
|
38
|
+
setConfirm({
|
|
39
|
+
open: true,
|
|
40
|
+
content: t('QUESTION_DELETE_SESSION', 'Are you sure to delete this session?'),
|
|
41
|
+
handleOnAccept: () => {
|
|
42
|
+
handleDeleteSession(session)
|
|
43
|
+
setConfirm({ ...confirm, open: false })
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const onDeleteAllSessions = (isOldUser, deleteCurrent) => {
|
|
49
|
+
setConfirm({
|
|
50
|
+
open: true,
|
|
51
|
+
content:
|
|
52
|
+
isOldUser
|
|
53
|
+
? t('QUESTION_ENABLE_ALL_SESSIONS', 'Are you sure to enable all sessions?')
|
|
54
|
+
: deleteCurrent
|
|
55
|
+
? t('QUESTION_DELETE_ALL_SESSIONS', 'Are you sure that you want to delete all sessions?')
|
|
56
|
+
: t('QUESTION_DELETE_ALL_SESSIONS_EXCEPT_CURRENT', 'Are you sure that you want to delete all sessions except current?'),
|
|
57
|
+
handleOnAccept: () => {
|
|
58
|
+
handleDeleteAllSessions(deleteCurrent)
|
|
59
|
+
setConfirm({ ...confirm, open: false })
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (actionState.error) {
|
|
66
|
+
setAlertState({
|
|
67
|
+
open: true,
|
|
68
|
+
content: actionState.error
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
}, [actionState.error])
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<>
|
|
75
|
+
<Container>
|
|
76
|
+
<h2>{t('SESSIONS', 'Sessions')}</h2>
|
|
77
|
+
{user?.session_strategy === 'jwt_session' ? (
|
|
78
|
+
<>
|
|
79
|
+
{sessionsList.loading ? (
|
|
80
|
+
[...Array(5).keys()].map(i => (
|
|
81
|
+
<SessionItem key={i}>
|
|
82
|
+
<Skeleton width={200} height={16} />
|
|
83
|
+
<Skeleton width={16} height={16} />
|
|
84
|
+
</SessionItem>
|
|
85
|
+
))
|
|
86
|
+
) : (
|
|
87
|
+
sessionsList.sessions.length > 0 ? (
|
|
88
|
+
<SessionsWrapper>
|
|
89
|
+
{sessionsList.sessions.sort((a, b) => moment(b?.created_at).valueOf() - moment(a?.created_at).valueOf()).slice(0, 2).map(session => (
|
|
90
|
+
<SessionItem key={session.id}>
|
|
91
|
+
<DurationWrapper>
|
|
92
|
+
<p>{parseDate(session.created_at, { outputFormat: 'MM/DD/YY · hh:mm A' })}</p>
|
|
93
|
+
<span>-</span>
|
|
94
|
+
<p>{parseDate(session.valid_thru, { outputFormat: 'MM/DD/YY · hh:mm A' })}</p>
|
|
95
|
+
</DurationWrapper>
|
|
96
|
+
{session.current && (
|
|
97
|
+
<p className='current'>({t('CURRENT', 'Current')})</p>
|
|
98
|
+
)}
|
|
99
|
+
<SeessionDelete
|
|
100
|
+
onClick={() => onDeleteSession(session)}
|
|
101
|
+
>
|
|
102
|
+
<Close />
|
|
103
|
+
</SeessionDelete>
|
|
104
|
+
</SessionItem>
|
|
105
|
+
))}
|
|
106
|
+
<MoreInfoWrapper>
|
|
107
|
+
<span onClick={() => setIsMoreInfo(true)}>
|
|
108
|
+
{t('MORE_INFO', 'More info')}
|
|
109
|
+
<ArrowRight />
|
|
110
|
+
</span>
|
|
111
|
+
</MoreInfoWrapper>
|
|
112
|
+
<ButtonGroupWrapper>
|
|
113
|
+
<ButtonsGroup>
|
|
114
|
+
<Button
|
|
115
|
+
color='primary'
|
|
116
|
+
disabled={actionState.loading}
|
|
117
|
+
onClick={() => onDeleteAllSessions(false, true)}
|
|
118
|
+
>
|
|
119
|
+
{t('DELETE_ALL_SESSIONS', 'Delete all sessions')}
|
|
120
|
+
</Button>
|
|
121
|
+
<Button
|
|
122
|
+
color='primary'
|
|
123
|
+
disabled={actionState.loading}
|
|
124
|
+
onClick={() => onDeleteAllSessions(false, false)}
|
|
125
|
+
>
|
|
126
|
+
{t('DELETE_ALL_SESSIONS_EXCEPT_CURRENT', 'Delete all sessions except current')}
|
|
127
|
+
</Button>
|
|
128
|
+
</ButtonsGroup>
|
|
129
|
+
</ButtonGroupWrapper>
|
|
130
|
+
</SessionsWrapper>
|
|
131
|
+
) : (
|
|
132
|
+
<NoMessage>
|
|
133
|
+
{t('YOU_DONT_HAVE_ANY_SESSIONS', 'You don\'t have any sessions')}
|
|
134
|
+
</NoMessage>
|
|
135
|
+
)
|
|
136
|
+
)}
|
|
137
|
+
</>
|
|
138
|
+
) : (
|
|
139
|
+
<NoSessionsContainer>
|
|
140
|
+
<NoMessage>
|
|
141
|
+
{t('YOU_DONT_HAVE_ENABLED_THE_SESSIONS', 'You don\'t have enabled the sessions, please active them to have a better control of your sessions.')}
|
|
142
|
+
</NoMessage>
|
|
143
|
+
<Button
|
|
144
|
+
color='primary'
|
|
145
|
+
onClick={() => onDeleteAllSessions(true, false)}
|
|
146
|
+
>
|
|
147
|
+
{t('ACTIVE_SESSIONS', 'Active sessions')}
|
|
148
|
+
</Button>
|
|
149
|
+
</NoSessionsContainer>
|
|
150
|
+
)}
|
|
151
|
+
</Container>
|
|
152
|
+
<Confirm
|
|
153
|
+
title={t('WEB_APPNAME', 'Ordering')}
|
|
154
|
+
content={confirm.content}
|
|
155
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
156
|
+
open={confirm.open}
|
|
157
|
+
onClose={() => setConfirm({ ...confirm, open: false })}
|
|
158
|
+
onCancel={() => setConfirm({ ...confirm, open: false })}
|
|
159
|
+
onAccept={confirm.handleOnAccept}
|
|
160
|
+
closeOnBackdrop={false}
|
|
161
|
+
/>
|
|
162
|
+
<Alert
|
|
163
|
+
title={t('WEB_APPNAME', 'Ordering')}
|
|
164
|
+
content={alertState.content}
|
|
165
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
166
|
+
open={alertState.open}
|
|
167
|
+
onClose={() => setAlertState({ open: false, content: [] })}
|
|
168
|
+
onAccept={() => setAlertState({ open: false, content: [] })}
|
|
169
|
+
closeOnBackdrop={false}
|
|
170
|
+
/>
|
|
171
|
+
<Modal
|
|
172
|
+
width='760px'
|
|
173
|
+
height='80vh'
|
|
174
|
+
padding='30px 24px'
|
|
175
|
+
title={t('SESSIONS', 'Sessions')}
|
|
176
|
+
open={isMoreInfo}
|
|
177
|
+
onClose={() => setIsMoreInfo(false)}
|
|
178
|
+
>
|
|
179
|
+
<>
|
|
180
|
+
{sessionsList.sessions.sort((a, b) => moment(b?.created_at).valueOf() - moment(a?.created_at).valueOf()).map(session => (
|
|
181
|
+
<SessionItem key={session.id}>
|
|
182
|
+
<DurationWrapper>
|
|
183
|
+
<p>{parseDate(session.created_at)}</p>
|
|
184
|
+
<span>-</span>
|
|
185
|
+
<p>{parseDate(session.valid_thru)}</p>
|
|
186
|
+
</DurationWrapper>
|
|
187
|
+
{session.current && (
|
|
188
|
+
<p className='current'>({t('CURRENT', 'Current')})</p>
|
|
189
|
+
)}
|
|
190
|
+
<SeessionDelete
|
|
191
|
+
onClick={() => onDeleteSession(session)}
|
|
192
|
+
>
|
|
193
|
+
<Close />
|
|
194
|
+
</SeessionDelete>
|
|
195
|
+
</SessionItem>
|
|
196
|
+
))}
|
|
197
|
+
</>
|
|
198
|
+
</Modal>
|
|
199
|
+
</>
|
|
200
|
+
)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export const Sessions = (props) => {
|
|
204
|
+
const sessionsProps = {
|
|
205
|
+
...props,
|
|
206
|
+
UIComponent: SessionsUI
|
|
207
|
+
}
|
|
208
|
+
return <SessionsController {...sessionsProps} />
|
|
209
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
border: 1px solid ${props => props.theme.colors.secundaryDarkContrast};
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
padding: 18px 24px;
|
|
7
|
+
|
|
8
|
+
> h2 {
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
line-height: 24px;
|
|
12
|
+
margin: 0px;
|
|
13
|
+
padding-bottom: 12px;
|
|
14
|
+
border-bottom: 1px solid ${props => props.theme.colors.borderColor};
|
|
15
|
+
}
|
|
16
|
+
`
|
|
17
|
+
|
|
18
|
+
export const NoSessionsContainer = styled.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
|
|
23
|
+
> button {
|
|
24
|
+
height: 44px;
|
|
25
|
+
border-radius: 8px;
|
|
26
|
+
}
|
|
27
|
+
`
|
|
28
|
+
|
|
29
|
+
export const NoMessage = styled.p`
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
text-align: center;
|
|
33
|
+
`
|
|
34
|
+
|
|
35
|
+
export const SessionItem = styled.div`
|
|
36
|
+
display: flex;
|
|
37
|
+
padding: 18px 0px;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
border-bottom: 1px solid ${props => props.theme.colors.borderColor};
|
|
41
|
+
|
|
42
|
+
> p.current {
|
|
43
|
+
flex: 1;
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
margin: 0 15px;
|
|
47
|
+
}
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export const MoreInfoWrapper = styled.div`
|
|
51
|
+
span {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
color: ${props => props.theme.colors.primary};
|
|
55
|
+
height: 24px;
|
|
56
|
+
padding: 0px;
|
|
57
|
+
border-radius: 0px;
|
|
58
|
+
margin-top: 18px;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
text-transform: capitalize;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
svg {
|
|
63
|
+
margin-left: 10px;
|
|
64
|
+
${props => props.theme.rtl && css`
|
|
65
|
+
margin-right: 10px;
|
|
66
|
+
margin-left: 0px;
|
|
67
|
+
`}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`
|
|
71
|
+
|
|
72
|
+
export const SessionsWrapper = styled.div``
|
|
73
|
+
|
|
74
|
+
export const DurationWrapper = styled.div`
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
p {
|
|
78
|
+
margin: 0;
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
}
|
|
81
|
+
> span {
|
|
82
|
+
display: none;
|
|
83
|
+
margin: 0 10px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (min-width: 768px) {
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
align-items: center;
|
|
89
|
+
> span {
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`
|
|
94
|
+
|
|
95
|
+
export const SeessionDelete = styled.div`
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
padding: 3px;
|
|
101
|
+
svg {
|
|
102
|
+
font-size: 20px;
|
|
103
|
+
color: ${props => props.theme.colors.headingColor};
|
|
104
|
+
}
|
|
105
|
+
&:hover {
|
|
106
|
+
background-color: ${props => props.theme.colors.secundary};
|
|
107
|
+
}
|
|
108
|
+
`
|
|
109
|
+
|
|
110
|
+
export const ButtonGroupWrapper = styled.div`
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
`
|
|
114
|
+
|
|
115
|
+
export const ButtonsGroup = styled.div`
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
width: 100%;
|
|
119
|
+
max-width: 600px;
|
|
120
|
+
|
|
121
|
+
> button {
|
|
122
|
+
height: 44px;
|
|
123
|
+
margin: 10px 0;
|
|
124
|
+
border-radius: 8px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (min-width: 768px) {
|
|
128
|
+
flex-direction: row;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: space-around;
|
|
131
|
+
}
|
|
132
|
+
`
|
|
@@ -45,7 +45,6 @@ const EmailSettingUI = (props) => {
|
|
|
45
45
|
const [superAdmin, setSuperAdmin] = useState(null)
|
|
46
46
|
const [business, setBusiness] = useState(null)
|
|
47
47
|
const [customer, setCustomer] = useState(null)
|
|
48
|
-
const [cityManager, setCityManager] = useState(null)
|
|
49
48
|
|
|
50
49
|
const closeAlert = () => {
|
|
51
50
|
setAlertState({
|
|
@@ -60,12 +59,10 @@ const EmailSettingUI = (props) => {
|
|
|
60
59
|
const _superAdmin = configs.find(config => config.key === 'email_superadmin_states')
|
|
61
60
|
const _business = configs.find(config => config.key === 'email_business_states')
|
|
62
61
|
const _customer = configs.find(config => config.key === 'email_customer_states')
|
|
63
|
-
const _cityManager = configs.find(config => config.key === 'email_city_manager_states')
|
|
64
62
|
setGeneral([..._general])
|
|
65
63
|
setSuperAdmin({ ..._superAdmin })
|
|
66
64
|
setBusiness({ ..._business })
|
|
67
65
|
setCustomer({ ..._customer })
|
|
68
|
-
setCityManager({ ..._cityManager })
|
|
69
66
|
}, [configs])
|
|
70
67
|
|
|
71
68
|
useEffect(() => {
|
|
@@ -208,35 +205,6 @@ const EmailSettingUI = (props) => {
|
|
|
208
205
|
}
|
|
209
206
|
</CheckBoxWrapper>
|
|
210
207
|
</Accordion.Collapse>
|
|
211
|
-
<ContextAwareToggle eventKey='4' as='div'>
|
|
212
|
-
<AccordionTitle>{t('CITY_MANAGER', 'City manager')}</AccordionTitle>
|
|
213
|
-
</ContextAwareToggle>
|
|
214
|
-
<Accordion.Collapse eventKey='4'>
|
|
215
|
-
<CheckBoxWrapper>
|
|
216
|
-
{cityManager?.description && <p>{cityManager?.description}</p>}
|
|
217
|
-
{
|
|
218
|
-
cityManager?.options?.length > 0 && cityManager?.options?.map((item, j) => (
|
|
219
|
-
<FormGroupWrapper key={j}>
|
|
220
|
-
<FormGroupCheck className='checkbox'>
|
|
221
|
-
<label>
|
|
222
|
-
<input
|
|
223
|
-
type='checkbox'
|
|
224
|
-
name={item?.value}
|
|
225
|
-
data-id={cityManager?.id}
|
|
226
|
-
defaultChecked={cityManager?.value.split('|').includes(item?.value)}
|
|
227
|
-
onChange={(e) => handleCheckBoxChange(e, true, cityManager?.value)}
|
|
228
|
-
/>
|
|
229
|
-
{item.text}
|
|
230
|
-
</label>
|
|
231
|
-
</FormGroupCheck>
|
|
232
|
-
</FormGroupWrapper>
|
|
233
|
-
))
|
|
234
|
-
}
|
|
235
|
-
{
|
|
236
|
-
!cityManager?.options && <OptionsError>{t('NO_OPTIONS_VALUE', 'There is no options value')}</OptionsError>
|
|
237
|
-
}
|
|
238
|
-
</CheckBoxWrapper>
|
|
239
|
-
</Accordion.Collapse>
|
|
240
208
|
</Accordion>
|
|
241
209
|
{
|
|
242
210
|
settingsState?.changes?.length > 0 && (
|
|
@@ -162,6 +162,9 @@ const PageFormUI = (props) => {
|
|
|
162
162
|
defaultValue={formState.changes?.slug ?? pageState.page?.slug ?? ''}
|
|
163
163
|
onChange={e => handleChangeFormState('slug', e.target.value.replace(/\s/g, ''))}
|
|
164
164
|
placeholder={t('Slug', 'Slug')}
|
|
165
|
+
onKeyPress={e => {
|
|
166
|
+
if (e.which === 32) { e.preventDefault() }
|
|
167
|
+
}}
|
|
165
168
|
/>
|
|
166
169
|
</InputWrapper>
|
|
167
170
|
</InputGroup>
|
|
@@ -11,8 +11,6 @@ import { SideBar } from '../../Shared'
|
|
|
11
11
|
import { CheckoutFieldsSetting } from '../CheckoutFieldsSetting'
|
|
12
12
|
import { AddressFieldsSetting } from '../AddressFieldsSetting'
|
|
13
13
|
import { LanguageSetting } from '../LanguageSetting'
|
|
14
|
-
import { SitesAuthSettings } from '../SitesAuthSettings'
|
|
15
|
-
import { MultiCountrySettings } from '../MultiCountrySettings'
|
|
16
14
|
|
|
17
15
|
import {
|
|
18
16
|
BasicSettingsContainer,
|
|
@@ -40,9 +38,6 @@ const SettingsUI = (props) => {
|
|
|
40
38
|
const [isOpenDescription, setIsOpenDescription] = useState(false)
|
|
41
39
|
const [selectedCategory, setSelectedCategory] = useState(null)
|
|
42
40
|
const [isOpenSettingDetails, setIsOpenSettingDetails] = useState(null)
|
|
43
|
-
const [openSitesAuthSettings, setOpenSitesAuthSettings] = useState(false)
|
|
44
|
-
const [openMultiCountrySettings, setOpenMultiCountrySettings] = useState(false)
|
|
45
|
-
const [moveDistance, setMoveDistance] = useState(0)
|
|
46
41
|
|
|
47
42
|
let category
|
|
48
43
|
|
|
@@ -75,8 +70,6 @@ const SettingsUI = (props) => {
|
|
|
75
70
|
|
|
76
71
|
const handleOpenDescription = (category) => {
|
|
77
72
|
setIsOpenSettingDetails(null)
|
|
78
|
-
setOpenSitesAuthSettings(false)
|
|
79
|
-
setOpenMultiCountrySettings(false)
|
|
80
73
|
setIsOpenDescription(true)
|
|
81
74
|
setSelectedCategory(category)
|
|
82
75
|
onBasicSettingsRedirect({ category: category?.id })
|
|
@@ -85,8 +78,6 @@ const SettingsUI = (props) => {
|
|
|
85
78
|
|
|
86
79
|
const handleOpenSettingDetails = (item) => {
|
|
87
80
|
setIsOpenDescription(false)
|
|
88
|
-
setOpenSitesAuthSettings(false)
|
|
89
|
-
setOpenMultiCountrySettings(false)
|
|
90
81
|
setSelectedCategory(null)
|
|
91
82
|
setIsOpenSettingDetails(item)
|
|
92
83
|
}
|
|
@@ -181,36 +172,6 @@ const SettingsUI = (props) => {
|
|
|
181
172
|
active={isOpenSettingDetails === 'address'}
|
|
182
173
|
/>
|
|
183
174
|
</SettingItemWrapper>
|
|
184
|
-
<SettingItemWrapper
|
|
185
|
-
className='col-md-4 col-sm-6'
|
|
186
|
-
onClick={() => {
|
|
187
|
-
setIsOpenDescription(false)
|
|
188
|
-
setIsOpenSettingDetails(null)
|
|
189
|
-
setOpenSitesAuthSettings(true)
|
|
190
|
-
}}
|
|
191
|
-
>
|
|
192
|
-
<SettingItemUI
|
|
193
|
-
title={t('SITES_LOGIN_SIGNUP_SETTINGS', 'Sites Login/Signup Settings')}
|
|
194
|
-
description={t('SITES_LOGIN_SIGNUP_SETTINGS_DESC', 'Advanced sites login/sign up settings')}
|
|
195
|
-
icon={<GearFill />}
|
|
196
|
-
active={openSitesAuthSettings}
|
|
197
|
-
/>
|
|
198
|
-
</SettingItemWrapper>
|
|
199
|
-
<SettingItemWrapper
|
|
200
|
-
className='col-md-4 col-sm-6'
|
|
201
|
-
onClick={() => {
|
|
202
|
-
setIsOpenDescription(false)
|
|
203
|
-
setIsOpenSettingDetails(null)
|
|
204
|
-
setOpenMultiCountrySettings(true)
|
|
205
|
-
}}
|
|
206
|
-
>
|
|
207
|
-
<SettingItemUI
|
|
208
|
-
title={t('MULTI_COUNTRY_SETTINGS', 'Multi country settings')}
|
|
209
|
-
description={t('MULTI_COUNTRY_SETTINGS_DESC', 'Settings according country')}
|
|
210
|
-
icon={<GearFill />}
|
|
211
|
-
active={openMultiCountrySettings}
|
|
212
|
-
/>
|
|
213
|
-
</SettingItemWrapper>
|
|
214
175
|
</>
|
|
215
176
|
)}
|
|
216
177
|
{
|
|
@@ -259,32 +220,6 @@ const SettingsUI = (props) => {
|
|
|
259
220
|
/>
|
|
260
221
|
)
|
|
261
222
|
}
|
|
262
|
-
{openSitesAuthSettings && (
|
|
263
|
-
<SideBar
|
|
264
|
-
defaultSideBarWidth={500 + moveDistance}
|
|
265
|
-
moveDistance={moveDistance}
|
|
266
|
-
open={openSitesAuthSettings}
|
|
267
|
-
onClose={() => {
|
|
268
|
-
setMoveDistance(0)
|
|
269
|
-
setOpenSitesAuthSettings(false)
|
|
270
|
-
}}
|
|
271
|
-
>
|
|
272
|
-
<SitesAuthSettings setMoveDistance={setMoveDistance} />
|
|
273
|
-
</SideBar>
|
|
274
|
-
)}
|
|
275
|
-
{openMultiCountrySettings && (
|
|
276
|
-
<SideBar
|
|
277
|
-
defaultSideBarWidth={500 + moveDistance}
|
|
278
|
-
moveDistance={moveDistance}
|
|
279
|
-
open={openMultiCountrySettings}
|
|
280
|
-
onClose={() => {
|
|
281
|
-
setMoveDistance(0)
|
|
282
|
-
setOpenMultiCountrySettings(false)
|
|
283
|
-
}}
|
|
284
|
-
>
|
|
285
|
-
<MultiCountrySettings setMoveDistance={setMoveDistance} />
|
|
286
|
-
</SideBar>
|
|
287
|
-
)}
|
|
288
223
|
{
|
|
289
224
|
isOpenSettingDetails && (
|
|
290
225
|
<SideBar
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
const CitySelectorUI = (props) => {
|
|
12
12
|
const {
|
|
13
|
+
isAddMode,
|
|
13
14
|
citiesList,
|
|
14
15
|
isDefault,
|
|
15
16
|
filterValues,
|
|
@@ -35,6 +36,13 @@ const CitySelectorUI = (props) => {
|
|
|
35
36
|
setCityOptions(_cityOptions)
|
|
36
37
|
}, [citiesList, isDefault])
|
|
37
38
|
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (!isAddMode) return
|
|
41
|
+
if (cityOptions.length === 1) {
|
|
42
|
+
handleChangeCity(citiesList?.cities[0]?.id)
|
|
43
|
+
}
|
|
44
|
+
}, [cityOptions, isAddMode])
|
|
45
|
+
|
|
38
46
|
return (
|
|
39
47
|
<>
|
|
40
48
|
{citiesList?.loading ? (
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
ModalActions,
|
|
8
8
|
ModalTitle,
|
|
9
9
|
ModalIcon,
|
|
10
|
-
ModalHeader
|
|
10
|
+
ModalHeader,
|
|
11
|
+
ModalDialogInnerContainer
|
|
11
12
|
} from './styles'
|
|
12
13
|
|
|
13
14
|
const ModalUI = (props) => {
|
|
@@ -41,33 +42,38 @@ const ModalUI = (props) => {
|
|
|
41
42
|
className={`popup-dialog ${className || ''}`}
|
|
42
43
|
height={props.height}
|
|
43
44
|
width={props.width}
|
|
44
|
-
padding={props.padding}
|
|
45
|
-
overflow={props.overflow}
|
|
46
|
-
isTransparent={isTransparent}
|
|
47
45
|
>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</
|
|
46
|
+
<ModalDialogInnerContainer
|
|
47
|
+
padding={props.padding}
|
|
48
|
+
isTransparent={isTransparent}
|
|
49
|
+
overflow={props.overflow}
|
|
50
|
+
className='dialog-inner'
|
|
51
|
+
>
|
|
52
|
+
{!hideCloseDefault && (
|
|
53
|
+
<ModalIcon className='modal-close-icon'>
|
|
54
|
+
<IconButton
|
|
55
|
+
color='black'
|
|
56
|
+
onClick={() => onClose()}
|
|
57
|
+
>
|
|
58
|
+
<XLg />
|
|
59
|
+
</IconButton>
|
|
60
|
+
</ModalIcon>
|
|
63
61
|
)}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</
|
|
62
|
+
<ModalHeader>
|
|
63
|
+
{title && (
|
|
64
|
+
<ModalTitle>
|
|
65
|
+
{title}
|
|
66
|
+
</ModalTitle>
|
|
67
|
+
)}
|
|
68
|
+
</ModalHeader>
|
|
69
|
+
{children}
|
|
70
|
+
{(onCancel || onAccept) && (
|
|
71
|
+
<ModalActions>
|
|
72
|
+
{onAccept && <Button color='darkBlue' onClick={() => onAccept()}>{acceptText || t('ACCEPT')}</Button>}
|
|
73
|
+
{onCancel && <Button color='primary' onClick={() => onCancel()}>{cancelText || t('CANCEL')}</Button>}
|
|
74
|
+
</ModalActions>)}
|
|
75
|
+
</ModalDialogInnerContainer>
|
|
76
|
+
|
|
71
77
|
</ModalDialog>
|
|
72
78
|
)
|
|
73
79
|
}
|