ordering-ui-external 2.0.4 → 2.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/{0.ordering-ui.a228aa8797d9d0fc5a6c.js → 0.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{1.ordering-ui.a228aa8797d9d0fc5a6c.js → 1.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{2.ordering-ui.a228aa8797d9d0fc5a6c.js → 2.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{4.ordering-ui.a228aa8797d9d0fc5a6c.js → 4.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{5.ordering-ui.a228aa8797d9d0fc5a6c.js → 5.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{6.ordering-ui.a228aa8797d9d0fc5a6c.js → 6.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{7.ordering-ui.a228aa8797d9d0fc5a6c.js → 7.ordering-ui.3861d1cf52cf041c74c5.js} +1 -1
- package/_bundles/{7.ordering-ui.a228aa8797d9d0fc5a6c.js.LICENSE.txt → 7.ordering-ui.3861d1cf52cf041c74c5.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.a228aa8797d9d0fc5a6c.js → 8.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{9.ordering-ui.a228aa8797d9d0fc5a6c.js → 9.ordering-ui.3861d1cf52cf041c74c5.js} +0 -0
- package/_bundles/{ordering-ui.a228aa8797d9d0fc5a6c.js → ordering-ui.3861d1cf52cf041c74c5.js} +2 -2
- package/_bundles/{ordering-ui.a228aa8797d9d0fc5a6c.js.LICENSE.txt → ordering-ui.3861d1cf52cf041c74c5.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +36 -28
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -34
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +2 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/_modules/themes/five/src/components/Cart/index.js +73 -25
- package/_modules/themes/five/src/components/CartContent/index.js +3 -1
- package/_modules/themes/five/src/components/Checkout/index.js +25 -15
- package/_modules/themes/five/src/components/DriverTips/index.js +26 -15
- package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +63 -0
- package/_modules/themes/five/src/components/GiftCard/GiftCardUI/styles.js +27 -0
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +69 -0
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +29 -0
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +123 -0
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/styles.js +20 -0
- package/_modules/themes/five/src/components/GiftCard/SendGiftCard/index.js +114 -0
- package/_modules/themes/five/src/components/GiftCard/SendGiftCard/styles.js +14 -0
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +8 -56
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/LoginForm/index.js +6 -0
- package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +69 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +84 -76
- package/_modules/themes/five/src/components/OrderDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +3 -3
- package/_modules/themes/five/src/components/OrderProgress/index.js +5 -14
- package/_modules/themes/five/src/components/PageBanner/index.js +120 -6
- package/_modules/themes/five/src/components/PaymentOptions/index.js +22 -8
- package/_modules/themes/five/src/components/PaymentOptions/styles.js +9 -7
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +20 -14
- package/_modules/themes/five/src/components/ProfessionalFilter/index.js +23 -25
- package/_modules/themes/five/src/components/ProfessionalFilter/styles.js +6 -32
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +38 -22
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +3 -9
- package/_modules/themes/five/src/components/ServiceForm/index.js +10 -4
- package/_modules/themes/five/src/components/ServiceForm/styles.js +23 -25
- package/_modules/themes/five/src/components/SignUpForm/index.js +6 -0
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +22 -16
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -2
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +73 -51
- package/_modules/themes/five/src/components/SingleProfessionalCard/index.js +23 -7
- package/_modules/themes/five/src/components/SingleProfessionalCard/styles.js +29 -10
- package/_modules/themes/five/src/components/Wallets/index.js +2 -1
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +49 -35
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +26 -4
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -1
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +2 -2
- package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/src/themes/five/src/components/Cart/index.js +44 -14
- package/src/themes/five/src/components/CartContent/index.js +1 -0
- package/src/themes/five/src/components/Checkout/index.js +67 -51
- package/src/themes/five/src/components/DriverTips/index.js +52 -40
- package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +59 -0
- package/src/themes/five/src/components/GiftCard/GiftCardUI/styles.js +41 -0
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +70 -0
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +52 -0
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +122 -0
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/styles.js +41 -0
- package/src/themes/five/src/components/GiftCard/SendGiftCard/index.js +103 -0
- package/src/themes/five/src/components/GiftCard/SendGiftCard/styles.js +27 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +33 -79
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +0 -1
- package/src/themes/five/src/components/LoginForm/index.js +7 -0
- package/src/themes/five/src/components/OrderDetails/OrderEta.js +59 -0
- package/src/themes/five/src/components/OrderDetails/index.js +141 -133
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -1
- package/src/themes/five/src/components/OrderItAgain/styles.js +6 -6
- package/src/themes/five/src/components/OrderProgress/index.js +3 -12
- package/src/themes/five/src/components/PageBanner/index.js +96 -4
- package/src/themes/five/src/components/PaymentOptions/index.js +26 -5
- package/src/themes/five/src/components/PaymentOptions/styles.js +4 -0
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +24 -4
- package/src/themes/five/src/components/ProfessionalFilter/index.js +18 -30
- package/src/themes/five/src/components/ProfessionalFilter/styles.js +1 -57
- package/src/themes/five/src/components/RenderProductsLayout/index.js +33 -17
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +0 -18
- package/src/themes/five/src/components/ServiceForm/index.js +11 -5
- package/src/themes/five/src/components/ServiceForm/styles.js +1 -9
- package/src/themes/five/src/components/SignUpForm/index.js +7 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +43 -26
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +12 -2
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +51 -4
- package/src/themes/five/src/components/SingleProfessionalCard/index.js +17 -6
- package/src/themes/five/src/components/SingleProfessionalCard/styles.js +33 -6
- package/src/themes/five/src/components/Wallets/index.js +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { useLanguage, useUtils, useConfig, useOrder,
|
|
2
|
+
import { useLanguage, useUtils, useConfig, useOrder, SingleOrderCard as SingleOrderCardController } from 'ordering-components-external'
|
|
3
3
|
import { Heart as DisLike, HeartFill as Like } from 'react-bootstrap-icons'
|
|
4
4
|
import { ReviewOrder } from '../ReviewOrder'
|
|
5
5
|
import { ReviewProduct } from '../ReviewProduct'
|
|
@@ -12,6 +12,7 @@ import { Button } from '../../styles/Buttons'
|
|
|
12
12
|
import Skeleton from 'react-loading-skeleton'
|
|
13
13
|
import { Modal } from '../Modal'
|
|
14
14
|
import { Confirm } from '../Confirm'
|
|
15
|
+
import { OrderEta } from '../OrderDetails/OrderEta'
|
|
15
16
|
import {
|
|
16
17
|
Container,
|
|
17
18
|
Content,
|
|
@@ -51,7 +52,6 @@ const SingleOrderCardUI = (props) => {
|
|
|
51
52
|
const [{ carts }] = useOrder()
|
|
52
53
|
const [{ parsePrice, parseDate, optimizeImage }] = useUtils()
|
|
53
54
|
const [{ configs }] = useConfig()
|
|
54
|
-
const [orderingTheme] = useOrderingTheme()
|
|
55
55
|
const [isReviewOpen, setIsReviewOpen] = useState(false)
|
|
56
56
|
const [reviewStatus, setReviewStatus] = useState({ order: false, product: false, driver: false })
|
|
57
57
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
@@ -128,8 +128,14 @@ const SingleOrderCardUI = (props) => {
|
|
|
128
128
|
handleReorder(order.id)
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
const
|
|
132
|
-
const
|
|
131
|
+
const hideBusinessLogo = theme?.orders?.components?.business_logo?.hidden
|
|
132
|
+
const hideDate = theme?.orders?.components?.date?.hidden
|
|
133
|
+
const hideBusinessName = theme?.orders?.components?.business_name?.hidden
|
|
134
|
+
const hideOrderNumber = theme?.orders?.components?.order_number?.hidden
|
|
135
|
+
const hideReviewOrderButton = theme?.orders?.components?.review_order_button?.hidden
|
|
136
|
+
const hideReorderButton = theme?.orders?.components?.reorder_button?.hidden
|
|
137
|
+
const hideFavorite = theme?.orders?.components?.favorite?.hidden
|
|
138
|
+
const hideOrderStatus = theme?.orders?.components?.order_status?.hidden
|
|
133
139
|
|
|
134
140
|
return (
|
|
135
141
|
<>
|
|
@@ -151,7 +157,7 @@ const SingleOrderCardUI = (props) => {
|
|
|
151
157
|
<Skeleton width={60} height={60} />
|
|
152
158
|
) : (
|
|
153
159
|
<>
|
|
154
|
-
{!isCustomerMode &&
|
|
160
|
+
{!isCustomerMode && !hideBusinessLogo && (
|
|
155
161
|
<>
|
|
156
162
|
{order?.business?.length > 1 ? (
|
|
157
163
|
<MultiLogosContainer>
|
|
@@ -173,7 +179,7 @@ const SingleOrderCardUI = (props) => {
|
|
|
173
179
|
)}
|
|
174
180
|
</>
|
|
175
181
|
)}
|
|
176
|
-
{isCustomerMode &&
|
|
182
|
+
{isCustomerMode && !hideBusinessLogo && (
|
|
177
183
|
<>
|
|
178
184
|
{(order.business?.logo || theme.images?.dummies?.businessLogo) && (
|
|
179
185
|
<Logo>
|
|
@@ -186,17 +192,21 @@ const SingleOrderCardUI = (props) => {
|
|
|
186
192
|
)}
|
|
187
193
|
|
|
188
194
|
<BusinessInformation activeOrders isMultiCart={order?.business?.length > 1}>
|
|
189
|
-
{
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
{!hideBusinessName && (
|
|
196
|
+
<>
|
|
197
|
+
{isCustomerMode ? (
|
|
198
|
+
<TitleContainer>
|
|
199
|
+
<h2>{isSkeleton ? <Skeleton width={120} /> : order.business?.name}</h2>
|
|
200
|
+
<Price isBusinessesPage={isBusinessesPage} isCustomerMode={isCustomerMode}>
|
|
201
|
+
<h2>
|
|
202
|
+
{isSkeleton ? <Skeleton width={50} /> : parsePrice(order?.summary?.total || order?.total)}
|
|
203
|
+
</h2>
|
|
204
|
+
</Price>
|
|
205
|
+
</TitleContainer>
|
|
206
|
+
) : (
|
|
207
|
+
<h2>{isSkeleton ? <Skeleton width={120} /> : order?.business?.length > 1 ? `${t('GROUP_ORDER', 'Group Order')} ${t('No', 'No')}. ${order?.cart_group_id}` : order.business?.name}</h2>
|
|
208
|
+
)}
|
|
209
|
+
</>
|
|
200
210
|
)}
|
|
201
211
|
{
|
|
202
212
|
isSkeleton ? (
|
|
@@ -205,18 +215,23 @@ const SingleOrderCardUI = (props) => {
|
|
|
205
215
|
</div>
|
|
206
216
|
) : (
|
|
207
217
|
<div className='orders-detail'>
|
|
208
|
-
{order?.id && (
|
|
218
|
+
{order?.id && !hideOrderNumber && (
|
|
209
219
|
<>
|
|
210
220
|
<BsDot />
|
|
211
221
|
<p name='order_number'>{order?.business?.length > 1 ? `${order?.business?.length} ${t('ORDERS', 'orders')}` : `${t('ORDER_NUM', 'Order No.')} ${order.id}`}</p>
|
|
212
222
|
</>
|
|
213
223
|
)}
|
|
214
|
-
{
|
|
224
|
+
{!hideDate && (
|
|
215
225
|
<>
|
|
216
226
|
<BsDot />
|
|
217
|
-
<p>
|
|
218
|
-
|
|
219
|
-
|
|
227
|
+
<p>
|
|
228
|
+
{
|
|
229
|
+
pastOrders
|
|
230
|
+
? order?.delivery_datetime_utc
|
|
231
|
+
? parseDate(order?.delivery_datetime_utc, { outputFormat: 'MM/DD/YY hh:mm A' })
|
|
232
|
+
: parseDate(order?.delivery_datetime, { utc: false })
|
|
233
|
+
: <OrderEta order={order} />
|
|
234
|
+
}
|
|
220
235
|
</p>
|
|
221
236
|
</>
|
|
222
237
|
|
|
@@ -224,7 +239,9 @@ const SingleOrderCardUI = (props) => {
|
|
|
224
239
|
</div>
|
|
225
240
|
)
|
|
226
241
|
}
|
|
227
|
-
|
|
242
|
+
{!hideOrderStatus && (
|
|
243
|
+
<p className='order-status'>{isSkeleton ? <Skeleton width={80} /> : getOrderStatus(order.status)?.value}</p>
|
|
244
|
+
)}
|
|
228
245
|
</BusinessInformation>
|
|
229
246
|
{!isCustomerMode && (
|
|
230
247
|
<Price isBusinessesPage={isBusinessesPage}>
|
|
@@ -239,7 +256,7 @@ const SingleOrderCardUI = (props) => {
|
|
|
239
256
|
)}
|
|
240
257
|
{pastOrders && !isCustomerMode && (
|
|
241
258
|
<ButtonWrapper>
|
|
242
|
-
{!isOrderReviewed && !isFavorite && (!order?.review || (order.driver && !order?.user_review)) && (
|
|
259
|
+
{!isOrderReviewed && !isFavorite && (!order?.review || (order.driver && !order?.user_review)) && !hideReviewOrderButton && (
|
|
243
260
|
<Button
|
|
244
261
|
outline
|
|
245
262
|
color='primary'
|
|
@@ -249,14 +266,14 @@ const SingleOrderCardUI = (props) => {
|
|
|
249
266
|
{t('REVIEW', 'Review')}
|
|
250
267
|
</Button>
|
|
251
268
|
)}
|
|
252
|
-
{order.cart && (
|
|
269
|
+
{order.cart && !hideReorderButton && (
|
|
253
270
|
<Button color='primary' className='reorder' outline onClick={() => handleClickReorder(order)}>
|
|
254
271
|
{cartState?.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder')}
|
|
255
272
|
</Button>
|
|
256
273
|
)}
|
|
257
274
|
</ButtonWrapper>
|
|
258
275
|
)}
|
|
259
|
-
{!order?.business?.length && (
|
|
276
|
+
{!order?.business?.length && !hideFavorite && (
|
|
260
277
|
<FavoriteWrapper onClick={() => handleChangeFavorite(order)} className='favorite'>
|
|
261
278
|
{isSkeleton ? <Skeleton width={20} height={20} /> : (
|
|
262
279
|
<>
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
CardContainer,
|
|
16
16
|
CardInfo,
|
|
17
17
|
WrapLogo,
|
|
18
|
+
WrapTags,
|
|
18
19
|
CardLogo,
|
|
19
20
|
SoldOut,
|
|
20
21
|
PriceWrapper,
|
|
@@ -167,11 +168,20 @@ const SingleProductCardUI = (props) => {
|
|
|
167
168
|
)}
|
|
168
169
|
</TitleWrapper>
|
|
169
170
|
{!isSkeleton ? (
|
|
170
|
-
<PriceWrapper>
|
|
171
|
-
<span>{product?.price ? parsePrice(product?.price) : ''}</span>
|
|
171
|
+
<PriceWrapper isOffPrice={product?.offer_price && product?.in_offer}>
|
|
172
|
+
<span className='current-price'>{product?.price ? parsePrice(product?.price) : ''}</span>
|
|
172
173
|
{!(isSoldOut || maxProductQuantity <= 0) && (
|
|
173
174
|
<span className='off-price'>{product?.offer_price && product?.in_offer ? parsePrice(product?.offer_price) : ''}</span>
|
|
174
175
|
)}
|
|
176
|
+
{product?.tags && product?.tags.length > 0 && (
|
|
177
|
+
<WrapTags>
|
|
178
|
+
{product?.tags.map((tag, i) => (
|
|
179
|
+
<div key={i}>
|
|
180
|
+
<img src={tag.image ?? ''}></img>
|
|
181
|
+
</div>
|
|
182
|
+
))}
|
|
183
|
+
</WrapTags>
|
|
184
|
+
)}
|
|
175
185
|
</PriceWrapper>
|
|
176
186
|
) : (
|
|
177
187
|
<Skeleton width={100} />
|
|
@@ -18,6 +18,14 @@ export const CardContainer = styled.div`
|
|
|
18
18
|
> div {
|
|
19
19
|
display: flex;
|
|
20
20
|
justify-content: space-between;
|
|
21
|
+
${({ theme }) => theme?.business_view?.components?.products?.components?.product?.components?.image?.position === 'right'
|
|
22
|
+
? css`
|
|
23
|
+
flex-direction: row-reverse;
|
|
24
|
+
`
|
|
25
|
+
: css`
|
|
26
|
+
flex-direction: row;
|
|
27
|
+
`
|
|
28
|
+
}
|
|
21
29
|
align-items: center;
|
|
22
30
|
width: 100%;
|
|
23
31
|
}
|
|
@@ -31,7 +39,7 @@ export const CardContainer = styled.div`
|
|
|
31
39
|
margin: 10px;
|
|
32
40
|
` : css`
|
|
33
41
|
width: 100%;
|
|
34
|
-
margin: 10px
|
|
42
|
+
margin: 10px;
|
|
35
43
|
@media (min-width: 576px) {
|
|
36
44
|
margin: 10px;
|
|
37
45
|
width: calc(100% - 20px);
|
|
@@ -133,13 +141,45 @@ export const WrapLogo = styled.div`
|
|
|
133
141
|
${({ isBgimage }) => isBgimage && css`
|
|
134
142
|
width: 86px;
|
|
135
143
|
`}
|
|
136
|
-
|
|
144
|
+
${({ theme }) => theme?.business_view?.components?.products?.components?.product?.components?.image?.position === 'right'
|
|
145
|
+
? css`
|
|
146
|
+
margin-left: 5px;
|
|
147
|
+
`
|
|
148
|
+
: css`
|
|
149
|
+
margin-right: 5px;
|
|
150
|
+
`}
|
|
137
151
|
${props => props.theme?.rtl && css`
|
|
138
152
|
margin-right: 5px;
|
|
139
153
|
margin-left: 0px;
|
|
140
154
|
`}
|
|
141
155
|
`
|
|
142
156
|
|
|
157
|
+
export const WrapTags = styled.div`
|
|
158
|
+
display: flex;
|
|
159
|
+
margin-left: 10px;
|
|
160
|
+
margin-right: 10px;
|
|
161
|
+
overflow-x: auto;
|
|
162
|
+
${({ isBgimage }) => isBgimage && css`
|
|
163
|
+
width: 50px;
|
|
164
|
+
`}
|
|
165
|
+
${props => props.theme?.rtl && css`
|
|
166
|
+
margin-right: 5px;
|
|
167
|
+
margin-left: 0px;
|
|
168
|
+
`}
|
|
169
|
+
div {
|
|
170
|
+
display: flex;
|
|
171
|
+
margin: auto;
|
|
172
|
+
}
|
|
173
|
+
::-webkit-scrollbar {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
|
176
|
+
img {
|
|
177
|
+
width: 30px;
|
|
178
|
+
height: 30px;
|
|
179
|
+
margin-right: 5px;
|
|
180
|
+
}
|
|
181
|
+
`
|
|
182
|
+
|
|
143
183
|
const CardLogoStyled = styled.div`
|
|
144
184
|
box-sizing: border-box;
|
|
145
185
|
position: relative;
|
|
@@ -168,17 +208,26 @@ export const CardLogo = (props) => {
|
|
|
168
208
|
export const PriceWrapper = styled.div`
|
|
169
209
|
display: flex;
|
|
170
210
|
align-items: center;
|
|
211
|
+
.current-price {
|
|
212
|
+
min-width: 64px
|
|
213
|
+
}
|
|
171
214
|
.off-price {
|
|
172
215
|
font-size: 10px;
|
|
173
216
|
color: #909BA9;
|
|
174
217
|
margin-left: 5px;
|
|
175
218
|
text-decoration: line-through;
|
|
219
|
+
${({ isOffPrice }) => isOffPrice && css`
|
|
220
|
+
min-width: 46px;
|
|
221
|
+
`}
|
|
176
222
|
${props => props.theme.rtl && css`
|
|
177
223
|
margin-right: 5px;
|
|
178
224
|
margin-left: 0;
|
|
179
225
|
`}
|
|
180
226
|
@media (min-width: 1024px) {
|
|
181
227
|
font-size: 13px;
|
|
228
|
+
${({ isOffPrice }) => isOffPrice && css`
|
|
229
|
+
min-width: 64px;
|
|
230
|
+
`}
|
|
182
231
|
}
|
|
183
232
|
}
|
|
184
233
|
`
|
|
@@ -194,7 +243,6 @@ export const QuantityContainer = styled.div`
|
|
|
194
243
|
text-align: center;
|
|
195
244
|
border-radius: 50%;
|
|
196
245
|
transform: translate(-20px, 50%);
|
|
197
|
-
|
|
198
246
|
@media (min-width: 768px) {
|
|
199
247
|
transform: translate(-50%, 50%);
|
|
200
248
|
}
|
|
@@ -218,7 +266,6 @@ export const RibbonBox = styled.div`
|
|
|
218
266
|
overflow: hidden;
|
|
219
267
|
max-width: 70px;
|
|
220
268
|
word-break: break-all;
|
|
221
|
-
|
|
222
269
|
${props => props.theme.rtl && css`
|
|
223
270
|
left: -3px;
|
|
224
271
|
right: initial;
|
|
@@ -4,18 +4,23 @@ import { useSession, SingleProfessionalCard as SingleProfessionalCardController
|
|
|
4
4
|
import Skeleton from 'react-loading-skeleton'
|
|
5
5
|
import { ProfessionalInfo } from '../ProfessionalInfo'
|
|
6
6
|
import { Modal } from '../Modal'
|
|
7
|
+
import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
|
|
7
8
|
import {
|
|
8
9
|
Container,
|
|
9
10
|
UserPhoto,
|
|
10
11
|
InfoWrapper,
|
|
11
|
-
ActionWrapper
|
|
12
|
+
ActionWrapper,
|
|
13
|
+
UserDummyAvatarWrapper
|
|
12
14
|
} from './styles'
|
|
13
15
|
|
|
14
16
|
const SingleProfessionalCardUI = (props) => {
|
|
15
17
|
const {
|
|
16
18
|
professional,
|
|
17
19
|
isSkeleton,
|
|
18
|
-
handleFavoriteProfessional
|
|
20
|
+
handleFavoriteProfessional,
|
|
21
|
+
isSmallPhoto,
|
|
22
|
+
active,
|
|
23
|
+
handleProfessionalClick
|
|
19
24
|
} = props
|
|
20
25
|
|
|
21
26
|
const [{ auth }] = useSession()
|
|
@@ -33,16 +38,22 @@ const SingleProfessionalCardUI = (props) => {
|
|
|
33
38
|
|
|
34
39
|
return (
|
|
35
40
|
<>
|
|
36
|
-
<Container
|
|
41
|
+
<Container
|
|
42
|
+
active={active}
|
|
43
|
+
isCursor={!!handleProfessionalClick}
|
|
44
|
+
onClick={e => handleProfessionalClick && handleProfessionalClick(e, professional)}
|
|
45
|
+
>
|
|
37
46
|
{isSkeleton ? (
|
|
38
47
|
<Skeleton style={{ width: '86px', height: '86px' }} />
|
|
39
48
|
) : (
|
|
40
|
-
|
|
49
|
+
professional?.photo
|
|
50
|
+
? <UserPhoto bgimage={professional?.photo} isSmallPhoto={isSmallPhoto} />
|
|
51
|
+
: <UserDummyAvatarWrapper isSmallPhoto={isSmallPhoto}><FaUserAlt /></UserDummyAvatarWrapper>
|
|
41
52
|
)}
|
|
42
53
|
<InfoWrapper>
|
|
43
54
|
<h4>{isSkeleton ? <Skeleton height={18} width={120} /> : <>{professional?.name} {professional?.last_name}</>}</h4>
|
|
44
55
|
{isSkeleton ? <Skeleton height={15} width={80} /> : <>{professional?.occupation?.name && <p>{professional?.occupation?.name}</p>}</>}
|
|
45
|
-
<ActionWrapper>
|
|
56
|
+
<ActionWrapper isSmallPhoto={isSmallPhoto}>
|
|
46
57
|
{isSkeleton ? (
|
|
47
58
|
<>
|
|
48
59
|
<Skeleton width={16} height={16} />
|
|
@@ -51,7 +62,7 @@ const SingleProfessionalCardUI = (props) => {
|
|
|
51
62
|
) : (
|
|
52
63
|
<>
|
|
53
64
|
<InfoCircle className='info' onClick={() => handleOpenProfileInfo()} />
|
|
54
|
-
<span onClick={() => handleChangeFavorite()}>
|
|
65
|
+
<span onClick={() => handleChangeFavorite()} className='favorite'>
|
|
55
66
|
{professional?.favorite ? <Like /> : <DisLike />}
|
|
56
67
|
</span>
|
|
57
68
|
</>
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
export const Container = styled.div`
|
|
5
5
|
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
|
|
6
|
-
border-radius:
|
|
6
|
+
border-radius: 7.6px;
|
|
7
7
|
padding: 12px 14px;
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
@@ -11,6 +11,13 @@ export const Container = styled.div`
|
|
|
11
11
|
border: 1px solid ${props => props.theme.colors.gray200};
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
margin: 10px;
|
|
14
|
+
min-width: 205px;
|
|
15
|
+
${({ active }) => active && css`
|
|
16
|
+
border: 1px solid ${props => props.theme.colors.primary};
|
|
17
|
+
`}
|
|
18
|
+
${({ isCursor }) => isCursor && css`
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
`}
|
|
14
21
|
`
|
|
15
22
|
|
|
16
23
|
const UserPhotoStyled = styled.div`
|
|
@@ -20,11 +27,18 @@ const UserPhotoStyled = styled.div`
|
|
|
20
27
|
background-size: cover;
|
|
21
28
|
background-position: center;
|
|
22
29
|
object-fit: cover;
|
|
23
|
-
min-height: 86px;
|
|
24
|
-
width: 86px;
|
|
25
|
-
height: 86px;
|
|
26
30
|
border-radius: 4px;
|
|
27
31
|
|
|
32
|
+
${({ isSmallPhoto }) => isSmallPhoto ? css`
|
|
33
|
+
min-height: 42px;
|
|
34
|
+
width: 42px;
|
|
35
|
+
height: 42px;
|
|
36
|
+
` : css`
|
|
37
|
+
min-height: 86px;
|
|
38
|
+
width: 86px;
|
|
39
|
+
height: 86px;
|
|
40
|
+
`}
|
|
41
|
+
|
|
28
42
|
${({ isSkeleton }) => isSkeleton && css`
|
|
29
43
|
background-color: ${props => props.theme.colors.gray200};
|
|
30
44
|
`}
|
|
@@ -40,9 +54,20 @@ export const UserPhoto = (props) => {
|
|
|
40
54
|
</UserPhotoStyled>
|
|
41
55
|
)
|
|
42
56
|
}
|
|
57
|
+
export const UserDummyAvatarWrapper = styled.div`
|
|
58
|
+
svg {
|
|
59
|
+
${({ isSmallPhoto }) => isSmallPhoto ? css`
|
|
60
|
+
width: 42px;
|
|
61
|
+
height: 42px;
|
|
62
|
+
` : css`
|
|
63
|
+
width: 86px;
|
|
64
|
+
height: 86px;
|
|
65
|
+
`}
|
|
66
|
+
}
|
|
67
|
+
`
|
|
43
68
|
|
|
44
69
|
export const InfoWrapper = styled.div`
|
|
45
|
-
width: calc(100% -
|
|
70
|
+
width: calc(100% - 60px);
|
|
46
71
|
margin-left: 20px;
|
|
47
72
|
${props => props.theme.rtl && css`
|
|
48
73
|
margin-left: 0px;
|
|
@@ -66,7 +91,9 @@ export const InfoWrapper = styled.div`
|
|
|
66
91
|
`
|
|
67
92
|
|
|
68
93
|
export const ActionWrapper = styled.div`
|
|
69
|
-
|
|
94
|
+
${({ isSmallPhoto }) => !isSmallPhoto && css`
|
|
95
|
+
margin-top: 15px;
|
|
96
|
+
`}
|
|
70
97
|
display: flex;
|
|
71
98
|
align-items: center;
|
|
72
99
|
> .info {
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
import { WalletTransactionItem } from '../WalletTransactionItem'
|
|
23
23
|
import { NotFoundSource } from '../../../../../components/NotFoundSource'
|
|
24
24
|
import { Tabs, Tab } from '../../styles/Tabs'
|
|
25
|
+
import { GiftCardUI } from '../GiftCard/GiftCardUI'
|
|
25
26
|
|
|
26
27
|
const WalletsUI = (props) => {
|
|
27
28
|
const {
|
|
@@ -102,7 +103,7 @@ const WalletsUI = (props) => {
|
|
|
102
103
|
</span>
|
|
103
104
|
</BalanceElement>
|
|
104
105
|
</SectionWrapper>
|
|
105
|
-
|
|
106
|
+
<GiftCardUI />
|
|
106
107
|
<div className='transactions_list'>
|
|
107
108
|
{!transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length > 0 && (
|
|
108
109
|
<>
|