@weareconceptstudio/account 0.5.3 → 0.5.4
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/dist/components/TotalCheckout/BalanceComp/index.d.ts +1 -3
- package/dist/components/TotalCheckout/BalanceComp/index.js +9 -13
- package/dist/components/TotalCheckout/CommentComp/index.d.ts +3 -1
- package/dist/components/TotalCheckout/CommentComp/index.js +4 -4
- package/dist/components/TotalCheckout/PromoCodeComp/index.d.ts +1 -3
- package/dist/components/TotalCheckout/PromoCodeComp/index.js +6 -11
- package/dist/components/TotalCheckout/index.js +9 -40
- package/dist/components/TotalCheckout/style.js +9 -5
- package/dist/modules/cart/{SimpleItems → CartItems}/Item/index.js +19 -19
- package/dist/modules/cart/CartItems/ItemMobile/index.js +38 -0
- package/dist/modules/cart/{SimpleItems → CartItems}/index.js +7 -9
- package/dist/modules/cart/{SimpleItems → CartItems}/style.js +25 -68
- package/dist/modules/cart/CartTemplate/Skeleton/SkeletonItem/index.js +1 -2
- package/dist/modules/cart/CartTemplate/Skeleton/index.js +3 -6
- package/dist/modules/cart/CartTemplate/Skeleton/style.js +11 -10
- package/dist/modules/cart/CartTemplate/index.js +3 -3
- package/dist/modules/cart/index.d.ts +1 -1
- package/dist/modules/cart/index.js +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js +2 -2
- package/dist/modules/order/OrderDetails/index.js +15 -6
- package/dist/modules/order/OrderedItems/Item/index.d.ts +3 -0
- package/dist/modules/order/OrderedItems/Item/index.js +37 -0
- package/dist/modules/order/OrderedItems/ItemMobile/index.d.ts +3 -0
- package/dist/modules/order/OrderedItems/ItemMobile/index.js +39 -0
- package/dist/modules/order/OrderedItems/index.d.ts +1 -2
- package/dist/modules/order/OrderedItems/index.js +7 -59
- package/dist/modules/order/OrderedItems/style.js +67 -8
- package/dist/modules/order/OrderedItems/util.d.ts +2 -0
- package/dist/modules/order/OrderedItems/util.js +3 -0
- package/dist/modules/order/OrdersList/{OrderItem → Item}/index.js +4 -2
- package/dist/modules/order/OrdersList/ItemMobile/index.d.ts +3 -0
- package/dist/modules/order/OrdersList/ItemMobile/index.js +39 -0
- package/dist/modules/order/OrdersList/index.js +10 -41
- package/dist/translations/en.d.ts +1 -0
- package/dist/translations/en.js +1 -0
- package/dist/translations/hy.d.ts +1 -0
- package/dist/translations/hy.js +2 -1
- package/dist/translations/index.d.ts +3 -0
- package/dist/translations/ru.d.ts +1 -0
- package/dist/translations/ru.js +1 -0
- package/package.json +1 -1
- package/dist/modules/cart/SimpleItems/ItemMobile/index.js +0 -41
- /package/dist/modules/cart/{SimpleItems → CartItems}/Item/index.d.ts +0 -0
- /package/dist/modules/cart/{SimpleItems → CartItems}/ItemMobile/index.d.ts +0 -0
- /package/dist/modules/cart/{SimpleItems → CartItems}/index.d.ts +0 -0
- /package/dist/modules/cart/{SimpleItems → CartItems}/style.d.ts +0 -0
- /package/dist/modules/cart/{SimpleItems → CartItems}/util.d.ts +0 -0
- /package/dist/modules/cart/{SimpleItems → CartItems}/util.js +0 -0
- /package/dist/modules/order/OrdersList/{OrderItem → Item}/index.d.ts +0 -0
|
@@ -40,6 +40,16 @@ const OrderedItemsStyle = styled.div `
|
|
|
40
40
|
--account_swiperItemWidth: 18.05vw;
|
|
41
41
|
--account_proportion: 126.1%;
|
|
42
42
|
--account_verticalLineDistance: var(--sp4x);
|
|
43
|
+
--account_imageBorderRadius: var(--sp1x);
|
|
44
|
+
|
|
45
|
+
--account_giftIconDistanceIconPTB: var(--sp0-5x);
|
|
46
|
+
--account_giftIconDistanceIconPLR: var(--sp0-5x);
|
|
47
|
+
--account_giftIconDistanceIconMTB: var(--sp0-5x);
|
|
48
|
+
--account_giftIconDistanceIconMLR: var(--sp0-5x);
|
|
49
|
+
--account_giftWrapperBorder: calc(var(--sp0-5x) + var(--sp0-5x) / 2);
|
|
50
|
+
--account_giftSizeIcon: var(--sp2x);
|
|
51
|
+
--account_giftButtonTB: calc(var(--sp2x) - var(--sp0-5x) / 2);
|
|
52
|
+
--account_giftButtonLR: var(--sp2x);
|
|
43
53
|
|
|
44
54
|
margin-top: var(--account_orderItemsMarginTop);
|
|
45
55
|
|
|
@@ -89,10 +99,6 @@ const OrderedItemsStyle = styled.div `
|
|
|
89
99
|
width: var(--account_col1Width);
|
|
90
100
|
padding-left: calc(var(--account_col1Distance) / 2);
|
|
91
101
|
padding-right: calc(var(--account_col1Distance) / 2);
|
|
92
|
-
|
|
93
|
-
img {
|
|
94
|
-
object-fit: contain;
|
|
95
|
-
}
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
.tl-col-2 {
|
|
@@ -122,6 +128,7 @@ const OrderedItemsStyle = styled.div `
|
|
|
122
128
|
|
|
123
129
|
.col-item {
|
|
124
130
|
.image-wrapper {
|
|
131
|
+
position: relative;
|
|
125
132
|
overflow: hidden;
|
|
126
133
|
max-width: var(--account_imageWidth);
|
|
127
134
|
width: 100%;
|
|
@@ -341,6 +348,24 @@ const OrderedItemsStyle = styled.div `
|
|
|
341
348
|
}
|
|
342
349
|
}
|
|
343
350
|
|
|
351
|
+
.wrapper-gift-icon {
|
|
352
|
+
padding: var(--account_giftIconDistanceIconPTB) var(--account_giftIconDistanceIconPLR);
|
|
353
|
+
margin: var(--account_giftIconDistanceIconMTB) var(--account_giftIconDistanceIconMLR);
|
|
354
|
+
position: absolute;
|
|
355
|
+
z-index: 1;
|
|
356
|
+
width: fit-content;
|
|
357
|
+
height: fit-content;
|
|
358
|
+
display: flex;
|
|
359
|
+
top: 0;
|
|
360
|
+
background-color: var(--account_secondaryColor9);
|
|
361
|
+
border-radius: var(--account_giftWrapperBorder);
|
|
362
|
+
|
|
363
|
+
svg {
|
|
364
|
+
width: var(--account_giftSizeIcon);
|
|
365
|
+
height: auto;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
344
369
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
345
370
|
--account_orderItemsMarginTop: var(--sp11x);
|
|
346
371
|
--account_spaceLineMarginTop: var(--sp2x);
|
|
@@ -379,6 +404,10 @@ const OrderedItemsStyle = styled.div `
|
|
|
379
404
|
--account_verticalLineDistance: var(--sp3x);
|
|
380
405
|
|
|
381
406
|
--account_imageWidth: 4.2vw;
|
|
407
|
+
|
|
408
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
409
|
+
--account_giftButtonTB: var(--sp1x);
|
|
410
|
+
--account_giftButtonLR: var(--sp2x);
|
|
382
411
|
}
|
|
383
412
|
|
|
384
413
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
@@ -419,6 +448,10 @@ const OrderedItemsStyle = styled.div `
|
|
|
419
448
|
--account_swiperItemWidth: 17.89vw;
|
|
420
449
|
|
|
421
450
|
--account_imageWidth: 4.8vw;
|
|
451
|
+
|
|
452
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
453
|
+
--account_giftButtonTB: var(--sp1x);
|
|
454
|
+
--account_giftButtonLR: var(--sp2x);
|
|
422
455
|
}
|
|
423
456
|
|
|
424
457
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
@@ -459,6 +492,10 @@ const OrderedItemsStyle = styled.div `
|
|
|
459
492
|
--account_swiperItemWidth: 17.99vw;
|
|
460
493
|
|
|
461
494
|
--account_imageWidth: 4.5vw;
|
|
495
|
+
|
|
496
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
497
|
+
--account_giftButtonTB: var(--sp1x);
|
|
498
|
+
--account_giftButtonLR: var(--sp2x);
|
|
462
499
|
}
|
|
463
500
|
|
|
464
501
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
@@ -500,6 +537,10 @@ const OrderedItemsStyle = styled.div `
|
|
|
500
537
|
--account_swiperItemWidth: 18.43vw;
|
|
501
538
|
|
|
502
539
|
--account_imageWidth: 4.4vw;
|
|
540
|
+
|
|
541
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
542
|
+
--account_giftButtonTB: var(--sp1x);
|
|
543
|
+
--account_giftButtonLR: var(--sp2x);
|
|
503
544
|
}
|
|
504
545
|
|
|
505
546
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
@@ -541,6 +582,13 @@ const OrderedItemsStyle = styled.div `
|
|
|
541
582
|
--account_swiperItemWidth: 18.26vw;
|
|
542
583
|
|
|
543
584
|
--account_imageWidth: 3.92vw;
|
|
585
|
+
|
|
586
|
+
--account_giftSizeIcon: calc(var(--sp2x) - var(--sp0-5x) / 2);
|
|
587
|
+
--account_giftIconDistanceIconPTB: calc(var(--sp0-5x) / 2);
|
|
588
|
+
--account_giftIconDistanceIconPLR: calc(var(--sp0-5x) / 2);
|
|
589
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
590
|
+
--account_giftButtonTB: var(--sp1x);
|
|
591
|
+
--account_giftButtonLR: var(--sp2x);
|
|
544
592
|
}
|
|
545
593
|
|
|
546
594
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
@@ -582,6 +630,13 @@ const OrderedItemsStyle = styled.div `
|
|
|
582
630
|
--account_swiperItemWidth: 17.83vw;
|
|
583
631
|
|
|
584
632
|
--account_imageWidth: 7.4vw;
|
|
633
|
+
|
|
634
|
+
--account_giftSizeIcon: calc(var(--sp2x) - var(--sp0-5x) / 2);
|
|
635
|
+
--account_giftIconDistanceIconPTB: calc(var(--sp0-5x) / 2);
|
|
636
|
+
--account_giftIconDistanceIconPLR: calc(var(--sp0-5x) / 2);
|
|
637
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
638
|
+
--account_giftButtonTB: var(--sp1x);
|
|
639
|
+
--account_giftButtonLR: var(--sp2x);
|
|
585
640
|
}
|
|
586
641
|
|
|
587
642
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
@@ -601,6 +656,13 @@ const OrderedItemsStyle = styled.div `
|
|
|
601
656
|
--account_swiperItemWidth: 67.15vw;
|
|
602
657
|
--account_proportion: 131.9%;
|
|
603
658
|
|
|
659
|
+
--account_giftSizeIcon: calc(var(--sp2x) - var(--sp0-5x) / 2);
|
|
660
|
+
--account_giftIconDistanceIconPTB: calc(var(--sp0-5x) / 2);
|
|
661
|
+
--account_giftIconDistanceIconPLR: calc(var(--sp0-5x) / 2);
|
|
662
|
+
--account_giftWrapperBorder: var(--sp0-5x);
|
|
663
|
+
--account_giftButtonTB: var(--sp1x);
|
|
664
|
+
--account_giftButtonLR: var(--sp2x);
|
|
665
|
+
|
|
604
666
|
.order-items-table-wrap {
|
|
605
667
|
.titles-wrap {
|
|
606
668
|
display: none;
|
|
@@ -620,6 +682,7 @@ const OrderedItemsStyle = styled.div `
|
|
|
620
682
|
display: flex;
|
|
621
683
|
|
|
622
684
|
.mobile-image-wrap {
|
|
685
|
+
position: relative;
|
|
623
686
|
overflow: hidden;
|
|
624
687
|
border-radius: var(--sp1x);
|
|
625
688
|
isolation: isolate;
|
|
@@ -630,10 +693,6 @@ const OrderedItemsStyle = styled.div `
|
|
|
630
693
|
.image-cont {
|
|
631
694
|
/* padding-top: 125% !important; */
|
|
632
695
|
padding-top: 100% !important;
|
|
633
|
-
|
|
634
|
-
img {
|
|
635
|
-
object-fit: contain;
|
|
636
|
-
}
|
|
637
696
|
}
|
|
638
697
|
}
|
|
639
698
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const defaultIconGift = (React.createElement("svg", { width: '14', height: '14', fill: 'none', viewBox: '0 0 14 14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
3
|
+
React.createElement("path", { d: 'M7.78672 13.4663H11.846C12.1064 13.2066 12.252 13.061 12.5117 12.8006V7.95381H7.78672V13.4663ZM1.48672 7.95381V12.8006C1.74642 13.061 1.89202 13.2066 2.15242 13.4663H6.21172V7.95381H1.48672ZM9.55842 1.71471C10.418 1.71471 11.0186 2.81441 10.033 3.68381H7.75452L8.61202 2.22571C8.79752 1.90931 9.13772 1.71471 9.50452 1.71471H9.55842ZM2.33932 2.16341C2.20492 2.71431 2.28612 3.24281 2.51012 3.68381H1.36492C1.10452 3.94351 0.958919 4.08911 0.699219 4.34881V6.16811C0.958919 6.42781 1.10452 6.57341 1.36492 6.83381H12.6335C12.8939 6.57341 13.0395 6.42781 13.2992 6.16811V4.34881C13.0395 4.08911 12.8939 3.94351 12.6335 3.68381H11.4883C11.7123 3.24281 11.7935 2.71431 11.6591 2.16341C11.4211 1.19041 10.5076 0.53381 9.50662 0.53381H9.50452C8.71912 0.53381 7.99112 0.94961 7.59212 1.62651L6.99922 2.63731L6.40632 1.62861C6.00732 0.950311 5.27932 0.53381 4.49182 0.53381C3.49082 0.53381 2.57732 1.19041 2.33932 2.16341ZM5.38712 2.22641L6.24392 3.68381H3.96542C2.97982 2.81441 3.58042 1.71471 4.44002 1.71471H4.49392C4.86072 1.71471 5.20302 1.90931 5.38712 2.22641Z' })));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import React, { memo
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
2
|
import { handlePriceCheckFunc, Text } from '@weareconceptstudio/core';
|
|
3
|
+
import { useAccountContext } from '../../../../AccountProvider';
|
|
3
4
|
import { AccountButton } from '../../../../components';
|
|
4
5
|
import OrderStatus from '../../OrderStatus';
|
|
5
|
-
const OrderItem =
|
|
6
|
+
const OrderItem = memo(({ data }) => {
|
|
7
|
+
const { currency } = useAccountContext();
|
|
6
8
|
return (React.createElement("div", { className: `order-table-item-wrap` },
|
|
7
9
|
React.createElement("div", { className: `col-item od-col-1 nowrap` },
|
|
8
10
|
React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: data.date })),
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { handlePriceCheckFunc, Text, useTranslation } from '@weareconceptstudio/core';
|
|
3
|
+
import { useAccountContext } from '../../../../AccountProvider';
|
|
4
|
+
import { AccountButton } from '../../../../components';
|
|
5
|
+
import OrderStatus from '../../OrderStatus';
|
|
6
|
+
const ItemMobile = memo(({ data }) => {
|
|
7
|
+
const { currency } = useAccountContext();
|
|
8
|
+
const { translate } = useTranslation();
|
|
9
|
+
return (React.createElement("div", { className: `mobile-order-item-wrap` },
|
|
10
|
+
React.createElement("div", { className: `first-col-wrap` },
|
|
11
|
+
React.createElement("div", { className: `left-wrap` },
|
|
12
|
+
React.createElement("div", { className: `left-item-wrap` },
|
|
13
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
14
|
+
translate('account.order_management.orderDate'),
|
|
15
|
+
":"),
|
|
16
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: data.date })),
|
|
17
|
+
React.createElement("div", { className: `left-item-wrap last` },
|
|
18
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
19
|
+
translate('account.order_management.orderNumber'),
|
|
20
|
+
":"),
|
|
21
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: `ID ${data.orderNumber}` }))),
|
|
22
|
+
React.createElement("div", { className: `right-wrap` },
|
|
23
|
+
React.createElement(OrderStatus, { status: data.status }))),
|
|
24
|
+
React.createElement("div", { className: `last-col-wrap` },
|
|
25
|
+
React.createElement("div", { className: `left-wrap` },
|
|
26
|
+
React.createElement("div", { className: `left-item-wrap` },
|
|
27
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
28
|
+
translate('account.order_management.totalItems'),
|
|
29
|
+
":"),
|
|
30
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: data.itemsCount })),
|
|
31
|
+
React.createElement("div", { className: `left-item-wrap last` },
|
|
32
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
33
|
+
translate('account.order_management.totalPrice'),
|
|
34
|
+
":"),
|
|
35
|
+
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: handlePriceCheckFunc(data.total, currency) }))),
|
|
36
|
+
React.createElement("div", { className: `right-wrap` },
|
|
37
|
+
React.createElement(AccountButton, { btnType: `green-small-text`, url: `/account/order-history/${data.id}`, text: 'account.order_management.viewOrder' })))));
|
|
38
|
+
});
|
|
39
|
+
export default ItemMobile;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import React, { useMemo, useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import { Text,
|
|
3
|
-
import { useAccountContext } from '../../../AccountProvider';
|
|
2
|
+
import { Text, useUi, api } from '@weareconceptstudio/core';
|
|
4
3
|
//* Components
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import Item from './Item';
|
|
5
|
+
import ItemMobile from './ItemMobile';
|
|
7
6
|
import EmptyOrders from '../EmptyOrders';
|
|
8
|
-
import
|
|
7
|
+
import { Pagination } from '../../../components';
|
|
9
8
|
//* Style
|
|
10
9
|
import OrdersListStyle from './style';
|
|
11
10
|
const OrdersList = () => {
|
|
12
|
-
const { translate } = useTranslation();
|
|
13
11
|
const { winWidth } = useUi();
|
|
14
|
-
const { currency } = useAccountContext();
|
|
15
12
|
const [loading, setLoading] = useState(true);
|
|
16
13
|
const [data, setData] = useState([]);
|
|
17
14
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -44,41 +41,13 @@ const OrdersList = () => {
|
|
|
44
41
|
React.createElement("div", { className: `order-table-title-wrap od-col-5` },
|
|
45
42
|
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1 nowrap align-right`, text: `account.order_management.totalPrice` })),
|
|
46
43
|
React.createElement("div", { className: `order-table-title-wrap od-col-6` })),
|
|
47
|
-
React.createElement("div", { className: `order-table-items-wrap` }, data.map((item, index) => {
|
|
48
|
-
return (React.createElement(
|
|
49
|
-
})))) : (React.createElement("div", { className: `mobile-orders-wrap` }, data.map((item, index) => {
|
|
50
|
-
return (React.createElement(
|
|
51
|
-
|
|
52
|
-
React.createElement("div", { className: `left-wrap` },
|
|
53
|
-
React.createElement("div", { className: `left-item-wrap` },
|
|
54
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
55
|
-
translate('account.order_management.orderDate'),
|
|
56
|
-
":"),
|
|
57
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: item.date })),
|
|
58
|
-
React.createElement("div", { className: `left-item-wrap last` },
|
|
59
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
60
|
-
translate('account.order_management.orderNumber'),
|
|
61
|
-
":"),
|
|
62
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: `ID ${item.orderNumber}` }))),
|
|
63
|
-
React.createElement("div", { className: `right-wrap` },
|
|
64
|
-
React.createElement(OrderStatus, { status: item.status }))),
|
|
65
|
-
React.createElement("div", { className: `last-col-wrap` },
|
|
66
|
-
React.createElement("div", { className: `left-wrap` },
|
|
67
|
-
React.createElement("div", { className: `left-item-wrap` },
|
|
68
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
69
|
-
translate('account.order_management.totalItems'),
|
|
70
|
-
":"),
|
|
71
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: item.itemsCount })),
|
|
72
|
-
React.createElement("div", { className: `left-item-wrap last` },
|
|
73
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1` },
|
|
74
|
-
translate('account.order_management.totalPrice'),
|
|
75
|
-
":"),
|
|
76
|
-
React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: handlePriceCheckFunc(item.total, currency) }))),
|
|
77
|
-
React.createElement("div", { className: `right-wrap` },
|
|
78
|
-
React.createElement(AccountButton, { text: 'account.order_management.viewOrder', btnType: `green-small-text`, url: `/account/order-history/${item.id}` })))));
|
|
79
|
-
})));
|
|
44
|
+
data?.length > 0 ? (React.createElement("div", { className: `order-table-items-wrap` }, data.map((item, index) => {
|
|
45
|
+
return (React.createElement(Item, { key: index, data: item }));
|
|
46
|
+
}))) : null)) : data?.length > 0 ? (React.createElement("div", { className: `mobile-orders-wrap` }, data.map((item, index) => {
|
|
47
|
+
return (React.createElement(ItemMobile, { key: index, data: item }));
|
|
48
|
+
}))) : null;
|
|
80
49
|
}, [winWidth, data]);
|
|
81
|
-
return !loading && data
|
|
50
|
+
return !loading && data?.length > 0 ? (React.createElement(OrdersListStyle, null,
|
|
82
51
|
React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: 'account.account_info.orderHistory' }),
|
|
83
52
|
React.createElement("div", { className: `order-history-line` }),
|
|
84
53
|
listStore,
|
package/dist/translations/en.js
CHANGED
package/dist/translations/hy.js
CHANGED
|
@@ -147,6 +147,7 @@ export default {
|
|
|
147
147
|
size: 'Չափ',
|
|
148
148
|
restore: 'Վերականգնել',
|
|
149
149
|
free: 'Անվճար',
|
|
150
|
+
outOfStock: 'Պահեստում չկա',
|
|
150
151
|
},
|
|
151
152
|
user_status: {
|
|
152
153
|
tourist: 'տուրիստ',
|
|
@@ -198,7 +199,7 @@ export default {
|
|
|
198
199
|
shippedTo: 'Առաքվել է հասցեով',
|
|
199
200
|
addNewAdd: 'Ավելացնել նոր հասցե',
|
|
200
201
|
quantity: 'Քանակ',
|
|
201
|
-
free: '
|
|
202
|
+
free: 'Անվճար',
|
|
202
203
|
shippingCost: 'Առաքման արժեք',
|
|
203
204
|
item: 'Ապրանք',
|
|
204
205
|
price: 'Գին',
|
|
@@ -148,6 +148,7 @@ declare const _default: {
|
|
|
148
148
|
size: string;
|
|
149
149
|
restore: string;
|
|
150
150
|
free: string;
|
|
151
|
+
outOfStock: string;
|
|
151
152
|
};
|
|
152
153
|
user_status: {
|
|
153
154
|
tourist: string;
|
|
@@ -386,6 +387,7 @@ declare const _default: {
|
|
|
386
387
|
size: string;
|
|
387
388
|
restore: string;
|
|
388
389
|
free: string;
|
|
390
|
+
outOfStock: string;
|
|
389
391
|
};
|
|
390
392
|
user_status: {
|
|
391
393
|
tourist: string;
|
|
@@ -625,6 +627,7 @@ declare const _default: {
|
|
|
625
627
|
size: string;
|
|
626
628
|
restore: string;
|
|
627
629
|
free: string;
|
|
630
|
+
outOfStock: string;
|
|
628
631
|
};
|
|
629
632
|
user_status: {
|
|
630
633
|
tourist: string;
|
package/dist/translations/ru.js
CHANGED
package/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React, { memo } from 'react';
|
|
2
|
-
import { handlePriceCheckFunc, Image, Text, useTranslation } from '@weareconceptstudio/core';
|
|
3
|
-
import { AccountButton, AccountCounter } from '../../../../components';
|
|
4
|
-
import { useAccountContext } from '../../../../AccountProvider';
|
|
5
|
-
import { useCheckoutContext } from '../../../checkout';
|
|
6
|
-
import { defaultIconGift } from '../util';
|
|
7
|
-
const ItemMobile = memo(({ data, select, currency, isGift, giftIcon }) => {
|
|
8
|
-
const { handleProductClick } = useAccountContext();
|
|
9
|
-
const { translate } = useTranslation();
|
|
10
|
-
const { checkoutData, setCheckGift } = useCheckoutContext();
|
|
11
|
-
return (React.createElement(React.Fragment, null,
|
|
12
|
-
React.createElement("div", { className: `${isGift ? 'mobile-order-item-gift-wrap' : 'mobile-order-item-wrap'} user-select-none` },
|
|
13
|
-
React.createElement("div", { className: `${isGift ? 'mobile-order-item-gift-inner-wrap' : 'mobile-order-item-inner-wrap'}` },
|
|
14
|
-
React.createElement("div", { className: `mobile-image-wrap` },
|
|
15
|
-
isGift ? giftIcon || React.createElement("div", { className: 'wrapper-gift-icon' }, defaultIconGift) : null,
|
|
16
|
-
React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
|
|
17
|
-
React.createElement("div", { className: `mobile-info-wrap` },
|
|
18
|
-
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, className: `capitalize mobile-info-wrap-title`, onClick: () => handleProductClick(data.product) }),
|
|
19
|
-
React.createElement("div", { className: 'mobile-info-item' },
|
|
20
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 mobile-short-info1`, text: data.product.short_info_1 })),
|
|
21
|
-
React.createElement("div", { className: `mobile-total-price-wrap nowrap flex-box` },
|
|
22
|
-
data.product?.sale_price && !isGift ? (React.createElement("div", { className: 'mobile-total-price-flex-block' },
|
|
23
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 mobile-total-discounted-price`, text: `${data.sale_total} ${currency}` }),
|
|
24
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through mobile-total-price`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-total-price2`, text: `${isGift ? 0 : data.total} ${currency}` })),
|
|
25
|
-
select ? (React.createElement("div", { className: `inner-container` }, !data.product?.out_of_stock && !isGift ? (React.createElement(AccountCounter, { productId: data?.product.id })) : isGift ? null : (React.createElement("div", { className: `in-block` },
|
|
26
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity-with-symbol` },
|
|
27
|
-
translate('account.order_balance.quantity'),
|
|
28
|
-
":"),
|
|
29
|
-
"\u00A0",
|
|
30
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity`, text: data.qty }))))) : (React.createElement("div", { className: `in-block` },
|
|
31
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity-with-symbol2` },
|
|
32
|
-
translate('account.order_balance.quantity'),
|
|
33
|
-
":"),
|
|
34
|
-
"\u00A0",
|
|
35
|
-
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity2`, text: data.qty }))),
|
|
36
|
-
isGift ? (React.createElement("div", { className: 'wrapper-gift-button' }, checkoutData.checkGift ? (React.createElement(AccountCounter, { isGift: isGift, productId: -1, maxQty: 1 })) : (React.createElement(AccountButton, { text: 'account.general_actions.restore', className: `capitalize button-gift`, onClick: () => {
|
|
37
|
-
setCheckGift();
|
|
38
|
-
} })))) : null)))),
|
|
39
|
-
React.createElement("div", { className: 'line' })));
|
|
40
|
-
});
|
|
41
|
-
export default ItemMobile;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|