ordering-ui-admin-external 1.12.5 → 1.13.0
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.d53a7ee886aee7937e13.js → ordering-ui-admin.05ac04aa1fd8fa5d0ac3.js} +2 -2
- package/_bundles/{ordering-ui-admin.d53a7ee886aee7937e13.js.LICENSE.txt → ordering-ui-admin.05ac04aa1fd8fa5d0ac3.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessIntelligence/BusinessReviewDetails/index.js +2 -12
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +5 -3
- package/_modules/components/BusinessIntelligence/BusinessReviewList/styles.js +1 -1
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +31 -49
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/styles.js +20 -33
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +54 -7
- package/_modules/components/BusinessIntelligence/ReviewsListing/styles.js +7 -3
- package/_modules/components/Delivery/DriversGroupGeneralForm/index.js +14 -14
- package/_modules/components/Loyalty/GiftCards/index.js +168 -0
- package/_modules/components/Loyalty/GiftCards/styles.js +80 -0
- package/_modules/components/Loyalty/PointsWalletLevels/index.js +5 -2
- package/_modules/components/Marketing/PageBanner/index.js +3 -1
- package/_modules/components/Marketing/PageBanner/styles.js +1 -1
- package/_modules/components/MyProducts/CustomProject/index.js +49 -0
- package/_modules/components/MyProducts/CustomProject/styles.js +27 -0
- package/_modules/components/MyProducts/index.js +8 -1
- package/_modules/components/Orders/OrderDetailsHeader/index.js +4 -4
- package/_modules/components/Settings/ApiKeysList/index.js +3 -1
- package/_modules/components/Settings/ApiKeysList/styles.js +4 -10
- package/_modules/components/Settings/Deliverect/index.js +4 -1
- package/_modules/components/Settings/Deliverect/styles.js +33 -31
- package/_modules/components/Settings/DoordashConnect/index.js +4 -1
- package/_modules/components/Settings/DoordashConnect/styles.js +31 -29
- package/_modules/components/Settings/ItsaCheckmate/index.js +4 -1
- package/_modules/components/Settings/ItsaCheckmate/styles.js +33 -39
- package/_modules/components/Settings/LalamoveConnect/index.js +4 -1
- package/_modules/components/Settings/LalamoveConnect/styles.js +32 -30
- package/_modules/components/Settings/LanguageTransTable/index.js +9 -2
- package/_modules/components/Settings/PickerExpress/index.js +4 -1
- package/_modules/components/Settings/PickerExpress/styles.js +32 -30
- package/_modules/components/Settings/PluginList/index.js +3 -1
- package/_modules/components/Settings/PluginList/styles.js +4 -8
- package/_modules/components/Settings/SettingsDetail/index.js +4 -1
- package/_modules/components/Settings/SettingsDetail/styles.js +15 -21
- package/_modules/components/Settings/SettingsList/index.js +16 -0
- package/_modules/components/Settings/SettingsList/styles.js +4 -1
- package/_modules/components/Settings/WebhookList/index.js +4 -2
- package/_modules/components/Settings/WebhookList/styles.js +4 -8
- package/_modules/components/Shared/ImageCrop/index.js +4 -2
- package/_modules/components/SidebarMenu/index.js +6 -1
- package/_modules/components/Stores/BusinessCateringDelivery/index.js +215 -0
- package/_modules/components/Stores/BusinessCateringDelivery/styles.js +20 -0
- package/_modules/components/Stores/BusinessDetails/index.js +5 -2
- package/_modules/components/Stores/BusinessPreorderDetails/index.js +18 -4
- package/_modules/components/Stores/BusinessPreorderDetails/styles.js +7 -5
- package/_modules/components/Stores/BusinessSummary/index.js +1 -1
- package/_modules/components/Stores/BusinessesListing/index.js +14 -14
- package/_modules/components/Stores/BusinessesListing/styles.js +1 -3
- package/_modules/components/Stores/ProductTagDetails/styles.js +1 -1
- package/_modules/components/Stores/SeoOptions/styles.js +1 -1
- package/_modules/index.js +6 -0
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +3 -7
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +13 -9
- package/src/components/BusinessIntelligence/BusinessReviewList/styles.js +2 -1
- package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +33 -55
- package/src/components/BusinessIntelligence/ReviewProductsListing/styles.js +3 -53
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +59 -8
- package/src/components/BusinessIntelligence/ReviewsListing/styles.js +19 -0
- package/src/components/Delivery/DriversGroupGeneralForm/index.js +14 -14
- package/src/components/Loyalty/GiftCards/index.js +200 -0
- package/src/components/Loyalty/GiftCards/styles.js +147 -0
- package/src/components/Loyalty/PointsWalletLevels/index.js +9 -12
- package/src/components/Marketing/PageBanner/index.js +4 -3
- package/src/components/Marketing/PageBanner/styles.js +5 -0
- package/src/components/MyProducts/CustomProject/index.js +56 -0
- package/src/components/MyProducts/CustomProject/styles.js +108 -0
- package/src/components/MyProducts/index.js +3 -1
- package/src/components/Orders/OrderDetailsHeader/index.js +2 -2
- package/src/components/Settings/ApiKeysList/index.js +5 -4
- package/src/components/Settings/ApiKeysList/styles.js +5 -11
- package/src/components/Settings/Deliverect/index.js +2 -3
- package/src/components/Settings/Deliverect/styles.js +23 -0
- package/src/components/Settings/DoordashConnect/index.js +2 -3
- package/src/components/Settings/DoordashConnect/styles.js +23 -0
- package/src/components/Settings/ItsaCheckmate/index.js +2 -3
- package/src/components/Settings/ItsaCheckmate/styles.js +23 -26
- package/src/components/Settings/LalamoveConnect/index.js +2 -3
- package/src/components/Settings/LalamoveConnect/styles.js +23 -0
- package/src/components/Settings/LanguageTransTable/index.js +12 -2
- package/src/components/Settings/PickerExpress/index.js +2 -3
- package/src/components/Settings/PickerExpress/styles.js +23 -0
- package/src/components/Settings/PluginList/index.js +4 -3
- package/src/components/Settings/PluginList/styles.js +3 -6
- package/src/components/Settings/SettingsDetail/index.js +3 -4
- package/src/components/Settings/SettingsDetail/styles.js +24 -27
- package/src/components/Settings/SettingsList/index.js +43 -0
- package/src/components/Settings/SettingsList/styles.js +1 -1
- package/src/components/Settings/WebhookList/index.js +5 -4
- package/src/components/Settings/WebhookList/styles.js +3 -5
- package/src/components/Shared/ImageCrop/index.js +4 -2
- package/src/components/SidebarMenu/index.js +8 -1
- package/src/components/Stores/BusinessCateringDelivery/index.js +174 -0
- package/src/components/Stores/BusinessCateringDelivery/styles.js +53 -0
- package/src/components/Stores/BusinessDetails/index.js +5 -2
- package/src/components/Stores/BusinessPreorderDetails/index.js +38 -11
- package/src/components/Stores/BusinessPreorderDetails/styles.js +9 -1
- package/src/components/Stores/BusinessSummary/index.js +1 -1
- package/src/components/Stores/BusinessesListing/index.js +57 -56
- package/src/components/Stores/BusinessesListing/styles.js +3 -11
- package/src/components/Stores/ProductTagDetails/styles.js +1 -0
- package/src/components/Stores/SeoOptions/styles.js +1 -0
- package/src/index.js +3 -1
- package/template/app.js +4 -4
- package/template/assets/images/myProducts/custom-project.png +0 -0
- package/template/components/ListenPageChanges/index.js +1 -1
- package/template/helmetdata.json +7 -7
- package/template/pages/CustomProject/index.js +12 -0
- package/template/pages/ReviewProducts/index.js +0 -22
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage, useUtils, PlatformProductsList as PlatformProductsListController } from 'ordering-components-admin-external'
|
|
3
|
+
import { Alert, NotFoundSource, SideBar, Modal } from '../../Shared'
|
|
4
|
+
// import { Switch } from '../../../styles'
|
|
5
|
+
import { ChevronRight } from 'react-bootstrap-icons'
|
|
6
|
+
import { useTheme } from 'styled-components'
|
|
7
|
+
import Skeleton from 'react-loading-skeleton'
|
|
8
|
+
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
9
|
+
import { GiftCardDetail } from '../GiftCardDetail'
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Container,
|
|
13
|
+
Title,
|
|
14
|
+
ProductContainer,
|
|
15
|
+
ItemContainer,
|
|
16
|
+
InfoWrapper,
|
|
17
|
+
WrapperImage,
|
|
18
|
+
ProductName,
|
|
19
|
+
Image,
|
|
20
|
+
BottomContainer,
|
|
21
|
+
NotFoundSourceWrapper,
|
|
22
|
+
PriceWrapper,
|
|
23
|
+
HeaderContainer,
|
|
24
|
+
RequireDescription
|
|
25
|
+
} from './styles'
|
|
26
|
+
import { Button } from '../../../styles'
|
|
27
|
+
|
|
28
|
+
const GiftCardsUI = (props) => {
|
|
29
|
+
const {
|
|
30
|
+
platformProductsListState,
|
|
31
|
+
handleParentSidebarMove,
|
|
32
|
+
handleSuccessDeleteProduct,
|
|
33
|
+
handleSuccessUpdateProduct,
|
|
34
|
+
handleSuccessAddProduct
|
|
35
|
+
} = props
|
|
36
|
+
|
|
37
|
+
const [, t] = useLanguage()
|
|
38
|
+
const theme = useTheme()
|
|
39
|
+
const [{ optimizeImage, parsePrice }] = useUtils()
|
|
40
|
+
const { width } = useWindowSize()
|
|
41
|
+
|
|
42
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
43
|
+
const [extraOpen, setExtraOpen] = useState(false)
|
|
44
|
+
const [selectedProduct, setSelectedProduct] = useState(null)
|
|
45
|
+
|
|
46
|
+
const closeAlert = () => {
|
|
47
|
+
setAlertState({
|
|
48
|
+
open: false,
|
|
49
|
+
content: []
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const handleOpenDetail = (level) => {
|
|
54
|
+
setSelectedProduct(level)
|
|
55
|
+
setExtraOpen(true)
|
|
56
|
+
if (width >= 1100) {
|
|
57
|
+
handleParentSidebarMove(550)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const handleGiftDetail = () => {
|
|
62
|
+
setExtraOpen(false)
|
|
63
|
+
setSelectedProduct(null)
|
|
64
|
+
handleParentSidebarMove(0)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (width < 1100) {
|
|
69
|
+
handleParentSidebarMove(0)
|
|
70
|
+
} else {
|
|
71
|
+
if (extraOpen) handleParentSidebarMove(550)
|
|
72
|
+
}
|
|
73
|
+
}, [width, extraOpen])
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Container>
|
|
77
|
+
<HeaderContainer>
|
|
78
|
+
<Title>{t('GIFT_CARD', 'Gift Card')}</Title>
|
|
79
|
+
{/* <Switch
|
|
80
|
+
defaultChecked={review?.enabled}
|
|
81
|
+
onChange={val => handleChangeEnabled(val)}
|
|
82
|
+
/> */}
|
|
83
|
+
</HeaderContainer>
|
|
84
|
+
<RequireDescription>
|
|
85
|
+
<b>{t('', 'Stripe activation is required.')}</b> <i>{t('', 'Compatible only with Wallet.')}</i>
|
|
86
|
+
</RequireDescription>
|
|
87
|
+
<ProductContainer>
|
|
88
|
+
{platformProductsListState?.loading ? (
|
|
89
|
+
<>
|
|
90
|
+
{
|
|
91
|
+
[...Array(5).keys()].map(i => (
|
|
92
|
+
<ItemContainer key={i}>
|
|
93
|
+
<InfoWrapper>
|
|
94
|
+
<WrapperImage>
|
|
95
|
+
<Skeleton className='d-flex h-100' />
|
|
96
|
+
</WrapperImage>
|
|
97
|
+
<ProductName>
|
|
98
|
+
<Skeleton width={100} />
|
|
99
|
+
</ProductName>
|
|
100
|
+
</InfoWrapper>
|
|
101
|
+
<Skeleton width={16} height={16} />
|
|
102
|
+
</ItemContainer>
|
|
103
|
+
))
|
|
104
|
+
}
|
|
105
|
+
</>
|
|
106
|
+
) : (
|
|
107
|
+
<>
|
|
108
|
+
{platformProductsListState?.products?.length > 0 ? platformProductsListState?.products.map(product => (
|
|
109
|
+
<ItemContainer
|
|
110
|
+
key={product.id}
|
|
111
|
+
onClick={() => handleOpenDetail(product)}
|
|
112
|
+
active={product?.id === selectedProduct?.id}
|
|
113
|
+
>
|
|
114
|
+
<InfoWrapper>
|
|
115
|
+
<WrapperImage>
|
|
116
|
+
<Image bgimage={optimizeImage(product?.image || theme.images?.dummies?.product)} />
|
|
117
|
+
</WrapperImage>
|
|
118
|
+
<ProductName>{product?.name}</ProductName>
|
|
119
|
+
</InfoWrapper>
|
|
120
|
+
<PriceWrapper>
|
|
121
|
+
<span>{parsePrice(product?.price)}</span>
|
|
122
|
+
<ChevronRight />
|
|
123
|
+
</PriceWrapper>
|
|
124
|
+
</ItemContainer>
|
|
125
|
+
)) : (
|
|
126
|
+
<NotFoundSourceWrapper>
|
|
127
|
+
<NotFoundSource />
|
|
128
|
+
</NotFoundSourceWrapper>
|
|
129
|
+
)}
|
|
130
|
+
</>
|
|
131
|
+
)}
|
|
132
|
+
</ProductContainer>
|
|
133
|
+
<BottomContainer>
|
|
134
|
+
<Button
|
|
135
|
+
color='primary'
|
|
136
|
+
borderRadius='8px'
|
|
137
|
+
onClick={() => handleOpenDetail({})}
|
|
138
|
+
>
|
|
139
|
+
{t('ADD_NEW_GIFT_CARD', 'Add new gift card')}
|
|
140
|
+
</Button>
|
|
141
|
+
</BottomContainer>
|
|
142
|
+
{extraOpen && (
|
|
143
|
+
<>
|
|
144
|
+
{width >= 1100 ? (
|
|
145
|
+
<SideBar
|
|
146
|
+
isBorderShow
|
|
147
|
+
open={extraOpen}
|
|
148
|
+
defaultSideBarWidth={550}
|
|
149
|
+
sidebarId='loyaltyLevel'
|
|
150
|
+
onClose={handleGiftDetail}
|
|
151
|
+
>
|
|
152
|
+
<GiftCardDetail
|
|
153
|
+
product={selectedProduct}
|
|
154
|
+
handleSuccessDeleteProduct={handleSuccessDeleteProduct}
|
|
155
|
+
handleSuccessUpdateProduct={handleSuccessUpdateProduct}
|
|
156
|
+
handleSuccessAddProduct={handleSuccessAddProduct}
|
|
157
|
+
setSelectedProduct={setSelectedProduct}
|
|
158
|
+
onClose={handleGiftDetail}
|
|
159
|
+
/>
|
|
160
|
+
</SideBar>
|
|
161
|
+
) : (
|
|
162
|
+
<Modal
|
|
163
|
+
width='70%'
|
|
164
|
+
height='90vh'
|
|
165
|
+
padding='0px'
|
|
166
|
+
open={extraOpen}
|
|
167
|
+
onClose={handleGiftDetail}
|
|
168
|
+
>
|
|
169
|
+
<GiftCardDetail
|
|
170
|
+
product={selectedProduct}
|
|
171
|
+
handleSuccessDeleteProduct={handleSuccessDeleteProduct}
|
|
172
|
+
handleSuccessUpdateProduct={handleSuccessUpdateProduct}
|
|
173
|
+
handleSuccessAddProduct={handleSuccessAddProduct}
|
|
174
|
+
setSelectedProduct={setSelectedProduct}
|
|
175
|
+
onClose={handleGiftDetail}
|
|
176
|
+
/>
|
|
177
|
+
</Modal>
|
|
178
|
+
)}
|
|
179
|
+
</>
|
|
180
|
+
)}
|
|
181
|
+
<Alert
|
|
182
|
+
title={t('LEVELS', 'Levels')}
|
|
183
|
+
content={alertState.content}
|
|
184
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
185
|
+
open={alertState.open}
|
|
186
|
+
onClose={() => closeAlert()}
|
|
187
|
+
onAccept={() => closeAlert()}
|
|
188
|
+
closeOnBackdrop={false}
|
|
189
|
+
/>
|
|
190
|
+
</Container>
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export const GiftCards = (props) => {
|
|
195
|
+
const giftCardsProps = {
|
|
196
|
+
...props,
|
|
197
|
+
UIComponent: GiftCardsUI
|
|
198
|
+
}
|
|
199
|
+
return <PlatformProductsListController {...giftCardsProps} />
|
|
200
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
`
|
|
9
|
+
|
|
10
|
+
export const Title = styled.h1`
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
font-size: 20px;
|
|
13
|
+
line-height: 30px;
|
|
14
|
+
margin: 0;
|
|
15
|
+
${props => props.theme?.rtl ? css`
|
|
16
|
+
margin-left: 30px;
|
|
17
|
+
` : css`
|
|
18
|
+
margin-right: 30px;
|
|
19
|
+
`}
|
|
20
|
+
`
|
|
21
|
+
export const ProductContainer = styled.div`
|
|
22
|
+
border-top: 1px solid ${props => props.theme.colors.borderColor};
|
|
23
|
+
`
|
|
24
|
+
|
|
25
|
+
export const ItemContainer = styled.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
padding: 10px 0;
|
|
29
|
+
border-bottom: 1px solid ${props => props.theme.colors.borderColor};
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
transition: all 0.3s linear;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
background: ${props => props.theme.colors.secundary};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
${({ active }) => active && css`
|
|
39
|
+
background: ${props => props.theme.colors.backgroundInfo};
|
|
40
|
+
border-top: 1px solid ${props => props.theme.colors.primary};
|
|
41
|
+
border-bottom: 1px solid ${props => props.theme.colors.primary};
|
|
42
|
+
`}
|
|
43
|
+
|
|
44
|
+
> svg {
|
|
45
|
+
font-size: 18px;
|
|
46
|
+
color: ${props => props.theme.colors.secundaryLight};
|
|
47
|
+
}
|
|
48
|
+
`
|
|
49
|
+
|
|
50
|
+
export const InfoWrapper = styled.div`
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
`
|
|
54
|
+
|
|
55
|
+
export const WrapperImage = styled.div`
|
|
56
|
+
max-width: 38px;
|
|
57
|
+
max-height: 38px;
|
|
58
|
+
height: 38px;
|
|
59
|
+
width: 38px;
|
|
60
|
+
${({ isSkeleton }) => !isSkeleton && css`
|
|
61
|
+
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
|
|
62
|
+
`}
|
|
63
|
+
border-radius: 7.6px;
|
|
64
|
+
|
|
65
|
+
${props => props.theme?.rtl ? css`
|
|
66
|
+
margin-right: 1px;
|
|
67
|
+
` : css`
|
|
68
|
+
margin-left: 1px;
|
|
69
|
+
`}
|
|
70
|
+
`
|
|
71
|
+
|
|
72
|
+
const ImageStyled = styled.div`
|
|
73
|
+
display: flex;
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
position: relative;
|
|
78
|
+
background-repeat: no-repeat, repeat;
|
|
79
|
+
background-size: cover;
|
|
80
|
+
object-fit: cover;
|
|
81
|
+
background-position: center;
|
|
82
|
+
border-radius: 7.6px;
|
|
83
|
+
`
|
|
84
|
+
export const Image = (props) => {
|
|
85
|
+
return (
|
|
86
|
+
<ImageStyled
|
|
87
|
+
{...props}
|
|
88
|
+
style={{ backgroundImage: `url(${props.bgimage})` }}
|
|
89
|
+
>
|
|
90
|
+
{props.children}
|
|
91
|
+
</ImageStyled>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const ProductName = styled.span`
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
font-weight: 500;
|
|
98
|
+
${props => props.theme?.rtl ? css`
|
|
99
|
+
margin-right: 25px;
|
|
100
|
+
` : css`
|
|
101
|
+
margin-left: 25px;
|
|
102
|
+
`}
|
|
103
|
+
`
|
|
104
|
+
|
|
105
|
+
export const BottomContainer = styled.div`
|
|
106
|
+
width: calc(100% - 10px);
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
align-items: center;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
margin: 20px 0;
|
|
112
|
+
|
|
113
|
+
button {
|
|
114
|
+
height: 44px;
|
|
115
|
+
}
|
|
116
|
+
`
|
|
117
|
+
|
|
118
|
+
export const NotFoundSourceWrapper = styled.div`
|
|
119
|
+
> div {
|
|
120
|
+
height: initial;
|
|
121
|
+
padding: 20px;
|
|
122
|
+
}
|
|
123
|
+
`
|
|
124
|
+
export const PriceWrapper = styled.div`
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
span {
|
|
128
|
+
margin: 0 10px;
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
}
|
|
132
|
+
`
|
|
133
|
+
export const HeaderContainer = styled.div`
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
${props => props.theme?.rtl ? css`
|
|
137
|
+
margin-left: 40px;
|
|
138
|
+
` : css`
|
|
139
|
+
margin-right: 40px;
|
|
140
|
+
`}
|
|
141
|
+
`
|
|
142
|
+
export const RequireDescription = styled.p`
|
|
143
|
+
margin-top: 2px;
|
|
144
|
+
line-height: 21px;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
margin-bottom: 30px;
|
|
147
|
+
`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useLanguage, useUtils, PointsWalletLevels as PointsWalletLevelsController } from 'ordering-components-admin-external'
|
|
3
|
-
import { Alert,
|
|
3
|
+
import { Alert, SideBar, Modal } from '../../Shared'
|
|
4
4
|
import { ChevronRight } from 'react-bootstrap-icons'
|
|
5
5
|
import { useTheme } from 'styled-components'
|
|
6
6
|
import Skeleton from 'react-loading-skeleton'
|
|
@@ -15,11 +15,10 @@ import {
|
|
|
15
15
|
WrapperImage,
|
|
16
16
|
LevelName,
|
|
17
17
|
Image,
|
|
18
|
-
|
|
19
|
-
LevelBottomContainer,
|
|
20
|
-
NotFoundSourceWrapper
|
|
18
|
+
LevelBottomContainer
|
|
21
19
|
} from './styles'
|
|
22
20
|
import { LoyaltyLevelDetail } from '../LoyaltyLevelDetail'
|
|
21
|
+
import { Button } from '../../../styles'
|
|
23
22
|
|
|
24
23
|
const PointsWalletLevelsUI = (props) => {
|
|
25
24
|
const {
|
|
@@ -92,7 +91,7 @@ const PointsWalletLevelsUI = (props) => {
|
|
|
92
91
|
</>
|
|
93
92
|
) : (
|
|
94
93
|
<>
|
|
95
|
-
{levelList?.levels?.length > 0
|
|
94
|
+
{levelList?.levels?.length > 0 && levelList?.levels.map((level, i) => (
|
|
96
95
|
<LevelItemContainer
|
|
97
96
|
key={i}
|
|
98
97
|
onClick={() => handleOpenDetail(level)}
|
|
@@ -106,20 +105,18 @@ const PointsWalletLevelsUI = (props) => {
|
|
|
106
105
|
</InfoWrapper>
|
|
107
106
|
<ChevronRight />
|
|
108
107
|
</LevelItemContainer>
|
|
109
|
-
))
|
|
110
|
-
<NotFoundSourceWrapper>
|
|
111
|
-
<NotFoundSource />
|
|
112
|
-
</NotFoundSourceWrapper>
|
|
113
|
-
)}
|
|
108
|
+
))}
|
|
114
109
|
</>
|
|
115
110
|
)}
|
|
116
111
|
</LevelContainer>
|
|
117
112
|
<LevelBottomContainer>
|
|
118
|
-
<
|
|
113
|
+
<Button
|
|
114
|
+
color='primary'
|
|
115
|
+
borderRadius='8px'
|
|
119
116
|
onClick={() => handleOpenDetail({})}
|
|
120
117
|
>
|
|
121
118
|
{t('ADD_NEW_LEVEL', 'Add new level')}
|
|
122
|
-
</
|
|
119
|
+
</Button>
|
|
123
120
|
</LevelBottomContainer>
|
|
124
121
|
{extraOpen && (
|
|
125
122
|
<>
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
BannerTitleConatiner,
|
|
15
15
|
BannerActionsWrapper,
|
|
16
16
|
EnableWrapper,
|
|
17
|
-
AddNewBanner,
|
|
18
17
|
InfoWrapper,
|
|
19
18
|
InfoContent,
|
|
20
19
|
SearchBarWrapper
|
|
@@ -149,11 +148,13 @@ const PageBannersUI = (props) => {
|
|
|
149
148
|
)}
|
|
150
149
|
</BannersListWrapper>
|
|
151
150
|
{!bannersListState.loading && (
|
|
152
|
-
<
|
|
151
|
+
<Button
|
|
152
|
+
color='primary'
|
|
153
|
+
borderRadius='8px'
|
|
153
154
|
onClick={e => handleOpenBannerItemsDetail(e, {})}
|
|
154
155
|
>
|
|
155
156
|
{t('ADD_BANNER', 'Add banner')}
|
|
156
|
-
</
|
|
157
|
+
</Button>
|
|
157
158
|
)}
|
|
158
159
|
</Container>
|
|
159
160
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import { Button, IconButton } from '../../../styles'
|
|
4
|
+
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
5
|
+
import { useTheme } from 'styled-components'
|
|
6
|
+
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
7
|
+
import {
|
|
8
|
+
Container,
|
|
9
|
+
HeaderTitleContainer,
|
|
10
|
+
ContentLayout,
|
|
11
|
+
TextWrapper,
|
|
12
|
+
ImageBlock
|
|
13
|
+
} from './styles'
|
|
14
|
+
|
|
15
|
+
export const CustomProject = () => {
|
|
16
|
+
const [, t] = useLanguage()
|
|
17
|
+
const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
|
|
18
|
+
const theme = useTheme()
|
|
19
|
+
|
|
20
|
+
const showMessage = (message) => {
|
|
21
|
+
window.Intercom && window.Intercom('showNewMessage', message)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Container>
|
|
26
|
+
<HeaderTitleContainer>
|
|
27
|
+
{isCollapse && (
|
|
28
|
+
<IconButton
|
|
29
|
+
color='black'
|
|
30
|
+
onClick={() => handleMenuCollapse(false)}
|
|
31
|
+
>
|
|
32
|
+
<MenuIcon />
|
|
33
|
+
</IconButton>
|
|
34
|
+
)}
|
|
35
|
+
<h1>{t('CUSTOM_PROJECT', 'Custom Project')}</h1>
|
|
36
|
+
</HeaderTitleContainer>
|
|
37
|
+
<ContentLayout>
|
|
38
|
+
<TextWrapper>
|
|
39
|
+
<h2>{t('CUSTOM_PROJECT', 'Custom Project')}</h2>
|
|
40
|
+
<h4>{t('CREATE_TAILOR_MODE', 'Create the tailor-made solution your business requires.')}</h4>
|
|
41
|
+
<p>{t('CUSTOM_PROJECT_DESC', 'Change the design of your Ordering Products, improve current functionality, or even create new software for your business, it\'s your call.')}</p>
|
|
42
|
+
<Button
|
|
43
|
+
color='primary'
|
|
44
|
+
borderRadius='8px'
|
|
45
|
+
onClick={() => showMessage('I\'m interested in a custom project, can you please provide more information?')}
|
|
46
|
+
>
|
|
47
|
+
{t('CONTACT_US', 'Contact us')}
|
|
48
|
+
</Button>
|
|
49
|
+
</TextWrapper>
|
|
50
|
+
<ImageBlock>
|
|
51
|
+
<img src={theme.images.myProducts.customProject} alt='' />
|
|
52
|
+
</ImageBlock>
|
|
53
|
+
</ContentLayout>
|
|
54
|
+
</Container>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
flex: 1;
|
|
5
|
+
padding: 25px 20px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
transition: all 0.5s;
|
|
8
|
+
max-height: 100vh;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
`
|
|
11
|
+
|
|
12
|
+
export const HeaderTitleContainer = styled.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
margin-bottom: 40px;
|
|
16
|
+
|
|
17
|
+
> h1 {
|
|
18
|
+
font-weight: 700;
|
|
19
|
+
font-size: 20px;
|
|
20
|
+
color: ${props => props.theme.colors.headingColor};
|
|
21
|
+
margin: 0px;
|
|
22
|
+
line-height: 32px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> button {
|
|
26
|
+
${props => props.theme?.rtl ? css`
|
|
27
|
+
margin-left: 8px;
|
|
28
|
+
margin-right: -8px;
|
|
29
|
+
` : css`
|
|
30
|
+
margin-right: 8px;
|
|
31
|
+
margin-left: -8px;
|
|
32
|
+
`}
|
|
33
|
+
|
|
34
|
+
svg {
|
|
35
|
+
width: 25px;
|
|
36
|
+
height: 25px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`
|
|
40
|
+
|
|
41
|
+
export const ContentLayout = styled.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
|
|
46
|
+
border-radius: 7.6px;
|
|
47
|
+
padding: 20px 25px;
|
|
48
|
+
|
|
49
|
+
@media (min-width: 576px) {
|
|
50
|
+
padding: 38px 40px;
|
|
51
|
+
}
|
|
52
|
+
@media (min-width: 768px) {
|
|
53
|
+
flex-direction: row;
|
|
54
|
+
}
|
|
55
|
+
`
|
|
56
|
+
|
|
57
|
+
export const TextWrapper = styled.div`
|
|
58
|
+
width: 100%;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
margin-bottom: 35px;
|
|
62
|
+
|
|
63
|
+
> h2 {
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
font-size: 32px;
|
|
66
|
+
line-height: 48px;
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
margin-bottom: 10px;
|
|
69
|
+
}
|
|
70
|
+
> h4 {
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
font-size: 16px;
|
|
73
|
+
line-height: 24px;
|
|
74
|
+
margin-top: 0;
|
|
75
|
+
margin-bottom: 4px;
|
|
76
|
+
}
|
|
77
|
+
> p {
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
line-height: 24px;
|
|
81
|
+
margin: 0;
|
|
82
|
+
}
|
|
83
|
+
button {
|
|
84
|
+
height: 44px;
|
|
85
|
+
margin-top: 45px;
|
|
86
|
+
width: fit-content;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (min-width: 768px) {
|
|
90
|
+
width: 50%;
|
|
91
|
+
margin-bottom: 0;
|
|
92
|
+
}
|
|
93
|
+
`
|
|
94
|
+
|
|
95
|
+
export const ImageBlock = styled.div`
|
|
96
|
+
width: 100%;
|
|
97
|
+
display: flex;
|
|
98
|
+
img {
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
@media (min-width: 768px) {
|
|
102
|
+
width: 50%;
|
|
103
|
+
justify-content: flex-end;
|
|
104
|
+
img {
|
|
105
|
+
max-width: 650px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`
|
|
@@ -5,6 +5,7 @@ import { DriverApp } from './DriverApp'
|
|
|
5
5
|
import { PosApp } from './PosApp'
|
|
6
6
|
import { CallCenterApp } from './CallCenterApp'
|
|
7
7
|
import { KioskApp } from './KioskApp'
|
|
8
|
+
import { CustomProject } from './CustomProject'
|
|
8
9
|
|
|
9
10
|
export {
|
|
10
11
|
OrderingWebsite,
|
|
@@ -13,5 +14,6 @@ export {
|
|
|
13
14
|
DriverApp,
|
|
14
15
|
PosApp,
|
|
15
16
|
CallCenterApp,
|
|
16
|
-
KioskApp
|
|
17
|
+
KioskApp,
|
|
18
|
+
CustomProject
|
|
17
19
|
}
|
|
@@ -118,10 +118,10 @@ export const OrderDetailsHeader = (props) => {
|
|
|
118
118
|
? walletName[event?.wallet_event?.wallet?.type]?.name
|
|
119
119
|
: event?.paymethod?.name}
|
|
120
120
|
</span>
|
|
121
|
-
{stripePaymethods.includes(event?.data?.gateway) && (
|
|
121
|
+
{stripePaymethods.includes(event?.data?.gateway || event?.paymethod?.gateway) && (
|
|
122
122
|
<>
|
|
123
123
|
<span> (</span>
|
|
124
|
-
<StripeLink href={`https://dashboard.stripe.com/payments/${event?.data?.result?.pay_data}`} target='_blank'>{event?.data?.result?.pay_data}</StripeLink>
|
|
124
|
+
<StripeLink href={`https://dashboard.stripe.com/payments/${event?.data?.result?.pay_data || event?.data?.extra?.pay_data}`} target='_blank'>{event?.data?.result?.pay_data || event?.data?.extra?.pay_data}</StripeLink>
|
|
125
125
|
<span>) </span>
|
|
126
126
|
<span> ({order?.refund_data ? t('REFUNDED', 'Refunded') : t('MOBILE_SUCCESS', 'Success')}) </span>
|
|
127
127
|
</>
|
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
ApiKeysListContainer,
|
|
12
12
|
Header,
|
|
13
13
|
ApiKeysListTable,
|
|
14
|
-
DropdownButtonWrapper
|
|
15
|
-
AddNewButton
|
|
14
|
+
DropdownButtonWrapper
|
|
16
15
|
} from './styles'
|
|
17
16
|
|
|
18
17
|
const ApiKeysListUI = (props) => {
|
|
@@ -106,11 +105,13 @@ const ApiKeysListUI = (props) => {
|
|
|
106
105
|
))
|
|
107
106
|
)}
|
|
108
107
|
</ApiKeysListTable>
|
|
109
|
-
<
|
|
108
|
+
<Button
|
|
109
|
+
color='primary'
|
|
110
|
+
borderRadius='8px'
|
|
110
111
|
onClick={() => handleAddApiKey()}
|
|
111
112
|
>
|
|
112
113
|
{t('ADD_API_KEY', 'Add API Key')}
|
|
113
|
-
</
|
|
114
|
+
</Button>
|
|
114
115
|
</ApiKeysListContainer>
|
|
115
116
|
<Alert
|
|
116
117
|
title={t('WEB_APPNAME', 'Ordering')}
|
|
@@ -4,6 +4,11 @@ export const ApiKeysListContainer = styled.div`
|
|
|
4
4
|
width: 100%;
|
|
5
5
|
padding: 20px;
|
|
6
6
|
box-sizing: border-box;
|
|
7
|
+
|
|
8
|
+
> button {
|
|
9
|
+
height: 44px;
|
|
10
|
+
margin: 20px 0;
|
|
11
|
+
}
|
|
7
12
|
`
|
|
8
13
|
|
|
9
14
|
export const Header = styled.div`
|
|
@@ -126,14 +131,3 @@ export const DropdownButtonWrapper = styled.div`
|
|
|
126
131
|
}
|
|
127
132
|
}
|
|
128
133
|
`
|
|
129
|
-
export const AddNewButton = styled.div`
|
|
130
|
-
cursor: pointer;
|
|
131
|
-
font-size: 12px;
|
|
132
|
-
color: ${props => props.theme.colors.lightGray};
|
|
133
|
-
margin: 20px 0;
|
|
134
|
-
width: fit-content;
|
|
135
|
-
|
|
136
|
-
&:hover {
|
|
137
|
-
color: ${props => props.theme.colors.primary};
|
|
138
|
-
}
|
|
139
|
-
`
|