@plurix/ecom-components 1.6.0-commerce.2 → 1.6.0-commerce.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/dist/packages/ChangeOrderModal/ChangeOrderModal.d.ts +5 -1
- package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +63 -49
- package/dist/packages/ChangeOrderModal/api/getOrderForm.d.ts +1 -0
- package/dist/packages/ChangeOrderModal/api/getOrderForm.js +19 -0
- package/dist/packages/ChangeOrderModal/api/getProductsSimilars.js +16 -13
- package/dist/packages/ChangeOrderModal/components/ProductSelected.js +25 -28
- package/dist/packages/ChangeOrderModal/components/SimilarProductList.d.ts +2 -2
- package/dist/packages/ChangeOrderModal/components/SimilarProductList.js +34 -36
- package/dist/packages/ChangeOrderModal/components/SimilarProducts.d.ts +2 -2
- package/dist/packages/ChangeOrderModal/components/SimilarProducts.js +15 -15
- package/dist/packages/Coupons/components/CouponCard.js +12 -12
- package/dist/packages/Coupons/views/CouponsView.js +1 -1
- package/dist/packages/Modal/Modal.js +1 -1
- package/dist/styles/change-order-modal.global.css +1 -1
- package/dist/styles/coupons.global.css +1 -1
- package/dist/types/ChangeOrderModal.d.ts +18 -18
- package/dist/types/OrderForm.d.ts +16 -0
- package/dist/types/OrderForm.js +1 -0
- package/package.json +1 -1
|
@@ -9,6 +9,10 @@ export interface ChangeOrderModalProps {
|
|
|
9
9
|
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
|
10
10
|
environment: 'io' | 'faststore';
|
|
11
11
|
isClubClient?: boolean;
|
|
12
|
+
orderFormId: string;
|
|
12
13
|
saveSelectedSimilarProduct?: (similarProduct: SimilarProductsProps | undefined) => void;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export interface idSubstitutionCriteriasProps {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChangeOrderModal: ({ selectedItem, postalCode, orderFormId, isClubClient, isOpen, environment, setIsOpen, saveSelectedSimilarProduct }: ChangeOrderModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,72 +1,86 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { ProductSelected as
|
|
5
|
-
import { SimilarProducts as
|
|
6
|
-
import { ModalFooter as
|
|
7
|
-
/* empty css */import { Skeleton as
|
|
8
|
-
import { getProductsSimilars as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsx as n, jsxs as j, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useEffect as w } from "react";
|
|
3
|
+
import { Modal as M } from "../Modal/Modal.js";
|
|
4
|
+
import { ProductSelected as k } from "./components/ProductSelected.js";
|
|
5
|
+
import { SimilarProducts as v } from "./components/SimilarProducts.js";
|
|
6
|
+
import { ModalFooter as A } from "./components/ModalFooter.js";
|
|
7
|
+
/* empty css */import { Skeleton as E } from "@acctglobal/skeleton";
|
|
8
|
+
import { getProductsSimilars as N } from "./api/getProductsSimilars.js";
|
|
9
|
+
import _ from "../../hooks/useAnalitcsEvents.js";
|
|
10
|
+
import { getOrderForm as J } from "./api/getOrderForm.js";
|
|
11
|
+
const Y = ({
|
|
12
|
+
selectedItem: o,
|
|
13
|
+
postalCode: p,
|
|
14
|
+
orderFormId: g,
|
|
15
|
+
isClubClient: S,
|
|
16
|
+
isOpen: h,
|
|
17
|
+
environment: y,
|
|
18
|
+
setIsOpen: m,
|
|
19
|
+
saveSelectedSimilarProduct: s
|
|
18
20
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
return
|
|
21
|
+
const [b, F] = c(), [O, a] = c(!1), d = y === "io", { genericTaggingEvent: P } = _(), [r, e] = c({ productId: "" });
|
|
22
|
+
return w(() => {
|
|
21
23
|
(async () => {
|
|
22
|
-
|
|
24
|
+
a(!0);
|
|
23
25
|
try {
|
|
24
|
-
const
|
|
25
|
-
postalCode:
|
|
26
|
-
selectedItem:
|
|
27
|
-
isIO:
|
|
26
|
+
const t = await N({
|
|
27
|
+
postalCode: p,
|
|
28
|
+
selectedItem: o,
|
|
29
|
+
isIO: d
|
|
28
30
|
});
|
|
29
|
-
|
|
31
|
+
F(t == null ? void 0 : t.products);
|
|
30
32
|
} finally {
|
|
31
|
-
|
|
33
|
+
a(!1);
|
|
34
|
+
}
|
|
35
|
+
})(), (async () => {
|
|
36
|
+
var t, l;
|
|
37
|
+
a(!0);
|
|
38
|
+
try {
|
|
39
|
+
const u = await J(g), i = ((l = (t = u == null ? void 0 : u.customData) == null ? void 0 : t.customApps) == null ? void 0 : l.find((C) => C.id === "janis")) || null;
|
|
40
|
+
let f = {};
|
|
41
|
+
i != null && i.fields.idSubstitutionCriterias && (f = JSON.parse(i == null ? void 0 : i.fields.idSubstitutionCriterias));
|
|
42
|
+
const x = o == null ? void 0 : o.productOriginId;
|
|
43
|
+
e({ productId: `${f[x]}` });
|
|
44
|
+
} finally {
|
|
45
|
+
a(!1);
|
|
32
46
|
}
|
|
33
47
|
})();
|
|
34
|
-
}, []), /* @__PURE__ */
|
|
35
|
-
|
|
48
|
+
}, []), /* @__PURE__ */ n(
|
|
49
|
+
M,
|
|
36
50
|
{
|
|
37
|
-
isOpen:
|
|
38
|
-
setIsOpen:
|
|
51
|
+
isOpen: h,
|
|
52
|
+
setIsOpen: m,
|
|
39
53
|
className: "change-order-modal",
|
|
40
54
|
title: "Produto com estoque baixo",
|
|
41
|
-
Footer: /* @__PURE__ */
|
|
42
|
-
|
|
55
|
+
Footer: /* @__PURE__ */ n(
|
|
56
|
+
A,
|
|
43
57
|
{
|
|
44
58
|
saveSelectedSimilarProduct: () => {
|
|
45
|
-
|
|
46
|
-
name:
|
|
47
|
-
replacement_item:
|
|
48
|
-
})),
|
|
59
|
+
r && (s == null || s(r), P("salvar_substituto", {
|
|
60
|
+
name: o.name,
|
|
61
|
+
replacement_item: r == null ? void 0 : r.name
|
|
62
|
+
})), m(!1);
|
|
49
63
|
}
|
|
50
64
|
}
|
|
51
65
|
),
|
|
52
|
-
children:
|
|
53
|
-
|
|
66
|
+
children: O ? /* @__PURE__ */ n(
|
|
67
|
+
E,
|
|
54
68
|
{
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
69
|
+
width: d ? "100%" : "90%",
|
|
70
|
+
height: d ? 600 : 425,
|
|
57
71
|
backgroundColor: "var(--color-grayScale-faded)",
|
|
58
72
|
margin: "auto",
|
|
59
73
|
animation: !0
|
|
60
74
|
}
|
|
61
|
-
) : /* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
75
|
+
) : /* @__PURE__ */ j(q, { children: [
|
|
76
|
+
o && /* @__PURE__ */ n(k, { selectedItem: o }),
|
|
77
|
+
/* @__PURE__ */ n(
|
|
78
|
+
v,
|
|
65
79
|
{
|
|
66
|
-
isClubClient:
|
|
67
|
-
similarProductSelect:
|
|
68
|
-
setSimilarProductSelect:
|
|
69
|
-
products:
|
|
80
|
+
isClubClient: S,
|
|
81
|
+
similarProductSelect: r,
|
|
82
|
+
setSimilarProductSelect: e,
|
|
83
|
+
products: b
|
|
70
84
|
}
|
|
71
85
|
)
|
|
72
86
|
] })
|
|
@@ -74,5 +88,5 @@ const G = ({
|
|
|
74
88
|
);
|
|
75
89
|
};
|
|
76
90
|
export {
|
|
77
|
-
|
|
91
|
+
Y as ChangeOrderModal
|
|
78
92
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getOrderForm: (orderFormId: string) => Promise<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import t from "axios";
|
|
2
|
+
const e = async (o) => {
|
|
3
|
+
try {
|
|
4
|
+
const { data: r } = await t.post("http://localhost:8000/api/proxy", {
|
|
5
|
+
targetUrl: `/api/checkout/pub/orderForm/${o}`,
|
|
6
|
+
method: "GET",
|
|
7
|
+
headers: {
|
|
8
|
+
"Content-Type": "application/json",
|
|
9
|
+
Accept: "application/json"
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return r;
|
|
13
|
+
} catch (r) {
|
|
14
|
+
console.error("Error in Change Order Modal", r);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as getOrderForm
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import n from "axios";
|
|
2
|
-
const
|
|
2
|
+
const h = async ({
|
|
3
3
|
postalCode: a,
|
|
4
4
|
isIO: s,
|
|
5
5
|
selectedItem: r
|
|
@@ -7,20 +7,23 @@ const O = async ({
|
|
|
7
7
|
try {
|
|
8
8
|
if (s) {
|
|
9
9
|
const { data: o } = await n.get(
|
|
10
|
-
|
|
11
|
-
), { similarProducts:
|
|
12
|
-
return
|
|
13
|
-
(
|
|
10
|
+
`https://smrholding.myvtex.com/_v/commerce/products/productsSimilar?postalCode=${a}&skus=${r == null ? void 0 : r.productOriginId}&field=sku`
|
|
11
|
+
), { similarProducts: c } = o;
|
|
12
|
+
return c.find(
|
|
13
|
+
(t) => t.productOrigin === (r == null ? void 0 : r.productOriginId)
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
const { data: i } = await n.post(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const { data: i } = await n.post(
|
|
17
|
+
"http://localhost:8000/api/proxy",
|
|
18
|
+
{
|
|
19
|
+
targetUrl: `/_v/commerce/products/productsSimilar?postalCode=${a}&skus=${r == null ? void 0 : r.productOriginId}&field=sku`,
|
|
20
|
+
method: "GET",
|
|
21
|
+
headers: {
|
|
22
|
+
"Content-Type": "application/json",
|
|
23
|
+
Accept: "application/json"
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
|
-
|
|
26
|
+
), { similarProducts: p } = i;
|
|
24
27
|
return p.find(
|
|
25
28
|
(o) => o.productOrigin === r.productOriginId
|
|
26
29
|
);
|
|
@@ -29,5 +32,5 @@ const O = async ({
|
|
|
29
32
|
}
|
|
30
33
|
};
|
|
31
34
|
export {
|
|
32
|
-
|
|
35
|
+
h as getProductsSimilars
|
|
33
36
|
};
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { isMobile as
|
|
4
|
-
import { formatedQty as
|
|
5
|
-
const P = ({ selectedItem:
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as d } from "react";
|
|
3
|
+
import { isMobile as p } from "../../../constants/index.js";
|
|
4
|
+
import { formatedQty as h, formatBrazilianPrice as u } from "../../../utils/changerOrderModal.js";
|
|
5
|
+
const P = ({ selectedItem: n }) => {
|
|
6
6
|
const {
|
|
7
|
-
imageUrl:
|
|
8
|
-
name:
|
|
9
|
-
quantity:
|
|
7
|
+
imageUrl: t,
|
|
8
|
+
name: i,
|
|
9
|
+
quantity: a,
|
|
10
10
|
sellingPrice: o,
|
|
11
|
-
measurementUnit:
|
|
12
|
-
unitMultiplier:
|
|
13
|
-
} =
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
11
|
+
measurementUnit: s,
|
|
12
|
+
unitMultiplier: l
|
|
13
|
+
} = n || {}, c = d(() => p ? 48 : 80, []), m = t == null ? void 0 : t.replace("-55-55", "-80-80");
|
|
14
|
+
return /* @__PURE__ */ r("section", { className: "change-order-pre-content", children: [
|
|
15
|
+
/* @__PURE__ */ e(
|
|
16
16
|
"img",
|
|
17
17
|
{
|
|
18
|
-
height:
|
|
19
|
-
width:
|
|
18
|
+
height: c,
|
|
19
|
+
width: c,
|
|
20
20
|
style: { objectFit: "contain", width: "20%" },
|
|
21
|
-
src:
|
|
22
|
-
alt:
|
|
21
|
+
src: m,
|
|
22
|
+
alt: i,
|
|
23
23
|
className: "change-order-pre-content-img"
|
|
24
24
|
}
|
|
25
25
|
),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
/* @__PURE__ */ r("div", { className: "change-order-pre-content-infos", children: [
|
|
27
|
+
/* @__PURE__ */ e("h3", { className: "product-name", children: i }),
|
|
28
|
+
/* @__PURE__ */ r("div", { className: "product-details", children: [
|
|
29
|
+
/* @__PURE__ */ e("p", { className: "quantity", children: h(
|
|
30
|
+
s || "",
|
|
31
|
+
l || 0,
|
|
32
|
+
a || 0
|
|
33
33
|
) }),
|
|
34
|
-
/* @__PURE__ */ e("p", { className: "sellingPrice", children:
|
|
35
|
-
h(o || 0),
|
|
36
|
-
/* @__PURE__ */ i("span", { className: "sellingPrice-multiply", children: u(r || "", c || 0) })
|
|
37
|
-
] })
|
|
34
|
+
/* @__PURE__ */ e("p", { className: "sellingPrice", children: u(o || 0) })
|
|
38
35
|
] })
|
|
39
36
|
] })
|
|
40
37
|
] });
|
|
@@ -2,8 +2,8 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
2
2
|
import { SimilarProducts } from '../../../types/ChangeOrderModal';
|
|
3
3
|
|
|
4
4
|
export declare const SimilarProductItem: ({ similarProduct, similarProductSelect, setSimilarProductSelect, isClubClient }: {
|
|
5
|
-
similarProductSelect: SimilarProducts
|
|
6
|
-
setSimilarProductSelect: Dispatch<SetStateAction<SimilarProducts
|
|
5
|
+
similarProductSelect: SimilarProducts;
|
|
6
|
+
setSimilarProductSelect: Dispatch<SetStateAction<SimilarProducts>>;
|
|
7
7
|
similarProduct: SimilarProducts;
|
|
8
8
|
isClubClient?: boolean;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,88 +1,86 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { formatEspecifications as
|
|
4
|
-
import { Icons as
|
|
5
|
-
import { isMobile as
|
|
2
|
+
import { useMemo as l } from "react";
|
|
3
|
+
import { formatEspecifications as U, formatBrazilianPrice as f, formatedMultiply as w } from "../../../utils/changerOrderModal.js";
|
|
4
|
+
import { Icons as z } from "../assets/icons.js";
|
|
5
|
+
import { isMobile as S } from "../../../constants/index.js";
|
|
6
6
|
const H = ({
|
|
7
|
-
similarProduct:
|
|
7
|
+
similarProduct: d,
|
|
8
8
|
similarProductSelect: r,
|
|
9
|
-
setSimilarProductSelect:
|
|
10
|
-
isClubClient:
|
|
9
|
+
setSimilarProductSelect: v,
|
|
10
|
+
isClubClient: N
|
|
11
11
|
}) => {
|
|
12
12
|
const {
|
|
13
|
-
images:
|
|
14
|
-
name:
|
|
13
|
+
images: t,
|
|
14
|
+
name: h,
|
|
15
15
|
productId: m,
|
|
16
|
-
sellingPrice:
|
|
16
|
+
sellingPrice: o,
|
|
17
17
|
measurementUnit: y,
|
|
18
18
|
unitMultiplier: b,
|
|
19
19
|
hasDiscount: C,
|
|
20
|
-
listPrice:
|
|
20
|
+
listPrice: n,
|
|
21
21
|
isClub: I,
|
|
22
|
-
skuSpecifications:
|
|
23
|
-
} =
|
|
22
|
+
skuSpecifications: p
|
|
23
|
+
} = d, M = t == null ? void 0 : t[0].imageUrl, i = l(() => 58, []), g = l(
|
|
24
24
|
() => m === (r == null ? void 0 : r.productId),
|
|
25
25
|
[r]
|
|
26
|
-
),
|
|
26
|
+
), c = l(() => U(p || []), [p]), {
|
|
27
27
|
discountPorcent: k,
|
|
28
28
|
frontLstPrice: L,
|
|
29
29
|
frontSellingPrice: P,
|
|
30
30
|
frontPriceMultiply: j
|
|
31
|
-
} =
|
|
32
|
-
discountPorcent: Math.round(n
|
|
33
|
-
frontLstPrice:
|
|
34
|
-
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
frontPriceMultiply: z(y, b)
|
|
38
|
-
}, [n, o]), x = {
|
|
31
|
+
} = l(() => !o || !n ? {} : {
|
|
32
|
+
discountPorcent: Math.round((n - o) / n * 100) * -1,
|
|
33
|
+
frontLstPrice: f(n || 0),
|
|
34
|
+
frontSellingPrice: f(o || 0),
|
|
35
|
+
frontPriceMultiply: w(y || "", b || 0)
|
|
36
|
+
}, [o, n]), x = {
|
|
39
37
|
Vegano: "var(--color-seals-veg)",
|
|
40
38
|
Orgânico: "var(--color-seals-org)",
|
|
41
39
|
"Sem Glúten": "var(--color-seals-gluten-free)",
|
|
42
40
|
"Sem Lactose": "var(--color-seals-lactose-free)",
|
|
43
41
|
"Sem Açúcar": "var(--color-seals-sugar-free)"
|
|
44
|
-
},
|
|
42
|
+
}, u = g ? "var(--color-main)" : "var(--color-grayScale-lightest)";
|
|
45
43
|
return /* @__PURE__ */ s(
|
|
46
44
|
"div",
|
|
47
45
|
{
|
|
48
46
|
className: "similar-product-list-item",
|
|
49
47
|
onClick: () => {
|
|
50
|
-
m !== (r == null ? void 0 : r.productId) &&
|
|
48
|
+
m !== (r == null ? void 0 : r.productId) && v(d);
|
|
51
49
|
},
|
|
52
50
|
style: {
|
|
53
|
-
borderColor:
|
|
51
|
+
borderColor: u
|
|
54
52
|
},
|
|
55
53
|
children: [
|
|
56
|
-
/* @__PURE__ */ e("div", { style: { width:
|
|
54
|
+
/* @__PURE__ */ e("div", { style: { width: i, height: i }, children: /* @__PURE__ */ e(
|
|
57
55
|
"img",
|
|
58
56
|
{
|
|
59
|
-
height:
|
|
60
|
-
width:
|
|
57
|
+
height: i,
|
|
58
|
+
width: i,
|
|
61
59
|
src: M,
|
|
62
|
-
alt:
|
|
60
|
+
alt: h,
|
|
63
61
|
style: { objectFit: "contain" }
|
|
64
62
|
}
|
|
65
63
|
) }),
|
|
66
64
|
/* @__PURE__ */ s("div", { className: "infos", children: [
|
|
67
65
|
/* @__PURE__ */ s("div", { className: "description", children: [
|
|
68
|
-
/* @__PURE__ */ e("h4", { className: "product-name", children:
|
|
66
|
+
/* @__PURE__ */ e("h4", { className: "product-name", children: h }),
|
|
69
67
|
/* @__PURE__ */ e(
|
|
70
68
|
"span",
|
|
71
69
|
{
|
|
72
70
|
className: "choose-icon",
|
|
73
71
|
style: {
|
|
74
|
-
backgroundColor:
|
|
72
|
+
backgroundColor: u
|
|
75
73
|
},
|
|
76
|
-
children:
|
|
74
|
+
children: g && /* @__PURE__ */ e(z, { iconId: "Check" })
|
|
77
75
|
}
|
|
78
76
|
)
|
|
79
77
|
] }),
|
|
80
|
-
!!(
|
|
78
|
+
!!(c != null && c.length) && /* @__PURE__ */ e("div", { className: "seal-container", children: c.map((a) => /* @__PURE__ */ e(
|
|
81
79
|
"span",
|
|
82
80
|
{
|
|
83
81
|
className: "seal",
|
|
84
|
-
style: { backgroundColor: x[
|
|
85
|
-
children:
|
|
82
|
+
style: { backgroundColor: x[a] },
|
|
83
|
+
children: a
|
|
86
84
|
}
|
|
87
85
|
)) }),
|
|
88
86
|
/* @__PURE__ */ s("div", { className: "prices", children: [
|
|
@@ -96,7 +94,7 @@ const H = ({
|
|
|
96
94
|
/* @__PURE__ */ s("p", { className: "sellingPrice", children: [
|
|
97
95
|
P,
|
|
98
96
|
/* @__PURE__ */ e("span", { className: "sellingPrice-multiply", children: j }),
|
|
99
|
-
I &&
|
|
97
|
+
I && N && /* @__PURE__ */ e("span", { className: "badge", children: "Clube" })
|
|
100
98
|
] })
|
|
101
99
|
] })
|
|
102
100
|
] })
|
|
@@ -3,8 +3,8 @@ import { SimilarProducts as SimilarProductProps } from '../../../types/ChangeOrd
|
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
products?: SimilarProductProps[];
|
|
6
|
-
similarProductSelect
|
|
7
|
-
setSimilarProductSelect: Dispatch<SetStateAction<SimilarProductProps
|
|
6
|
+
similarProductSelect: SimilarProductProps;
|
|
7
|
+
setSimilarProductSelect: Dispatch<SetStateAction<SimilarProductProps>>;
|
|
8
8
|
isClubClient?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const SimilarProducts: ({ products, isClubClient, similarProductSelect, setSimilarProductSelect }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Icons as h } from "../assets/icons.js";
|
|
3
|
-
import { SimilarProductItem as
|
|
4
|
-
const
|
|
3
|
+
import { SimilarProductItem as t } from "./SimilarProductList.js";
|
|
4
|
+
const I = ({
|
|
5
5
|
products: n,
|
|
6
6
|
isClubClient: s,
|
|
7
|
-
similarProductSelect:
|
|
8
|
-
setSimilarProductSelect:
|
|
9
|
-
}) => n != null && n.length ? /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
7
|
+
similarProductSelect: r,
|
|
8
|
+
setSimilarProductSelect: m
|
|
9
|
+
}) => n != null && n.length ? /* @__PURE__ */ i("section", { className: "change-order-similar-products", children: [
|
|
10
|
+
/* @__PURE__ */ o("h3", { className: "title", children: "Na falta substitua por:" }),
|
|
11
|
+
/* @__PURE__ */ o("div", { className: "similar-product-list", children: n.map((a) => /* @__PURE__ */ o(
|
|
12
|
+
t,
|
|
13
13
|
{
|
|
14
14
|
isClubClient: s,
|
|
15
|
-
similarProductSelect:
|
|
16
|
-
setSimilarProductSelect:
|
|
15
|
+
similarProductSelect: r,
|
|
16
|
+
setSimilarProductSelect: m,
|
|
17
17
|
similarProduct: a
|
|
18
18
|
},
|
|
19
19
|
a.itemId
|
|
20
20
|
)) }),
|
|
21
|
-
|
|
21
|
+
r && /* @__PURE__ */ i(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
|
-
onClick: () =>
|
|
24
|
+
onClick: () => m == null ? void 0 : m({ productId: "" }),
|
|
25
25
|
className: "remove-buttom",
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ o(h, { iconId: "Trash" }),
|
|
28
28
|
" Remover substituto"
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
32
|
] }) : null;
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
I as SimilarProducts
|
|
35
35
|
};
|
|
@@ -12,7 +12,7 @@ const X = ({
|
|
|
12
12
|
item: l,
|
|
13
13
|
firstCouponName: c,
|
|
14
14
|
secondCouponName: d,
|
|
15
|
-
replaceCoupon:
|
|
15
|
+
replaceCoupon: f,
|
|
16
16
|
setView: j,
|
|
17
17
|
setActiveRule: N,
|
|
18
18
|
setDataItem: i,
|
|
@@ -24,15 +24,15 @@ const X = ({
|
|
|
24
24
|
setIsCloseModalEmpty: k,
|
|
25
25
|
genericTaggingEvent: o
|
|
26
26
|
}) => {
|
|
27
|
-
const [b, r] = z(!1), [A,
|
|
27
|
+
const [b, r] = z(!1), [A, h] = z(!1);
|
|
28
28
|
q(() => {
|
|
29
|
-
d.toLowerCase() !== l.couponName.toLowerCase() && r(!1), c && !d && c.toLowerCase() === l.couponName.toLowerCase() && r(!0), c && d &&
|
|
30
|
-
}, [c, d,
|
|
29
|
+
d.toLowerCase() !== l.couponName.toLowerCase() && r(!1), c && !d && c.toLowerCase() === l.couponName.toLowerCase() && r(!0), c && d && f && d.toLowerCase() === l.couponName.toLowerCase() && R(d);
|
|
30
|
+
}, [c, d, f]);
|
|
31
31
|
const R = async (a) => {
|
|
32
32
|
if (x)
|
|
33
33
|
try {
|
|
34
|
-
if (!c || c &&
|
|
35
|
-
|
|
34
|
+
if (!c || c && f) {
|
|
35
|
+
h(!0);
|
|
36
36
|
const V = await B(L, _, a);
|
|
37
37
|
y(!1), t(a), w(""), V.error.length <= 0 ? (o == null || o("discount_coupon", {
|
|
38
38
|
name: "cupom aplicado",
|
|
@@ -50,7 +50,7 @@ const X = ({
|
|
|
50
50
|
cupomName: a
|
|
51
51
|
}), r(!1), p("error"), m(!0);
|
|
52
52
|
} finally {
|
|
53
|
-
|
|
53
|
+
h(!1);
|
|
54
54
|
}
|
|
55
55
|
else
|
|
56
56
|
o == null || o("discount_coupon", {
|
|
@@ -59,7 +59,7 @@ const X = ({
|
|
|
59
59
|
}, M = async () => {
|
|
60
60
|
if (x)
|
|
61
61
|
try {
|
|
62
|
-
|
|
62
|
+
h(!0), y(!1);
|
|
63
63
|
const a = await G(L, _);
|
|
64
64
|
a.error.length <= 0 ? (o == null || o("discount_coupon", {
|
|
65
65
|
name: "cupom removido com sucesso",
|
|
@@ -75,7 +75,7 @@ const X = ({
|
|
|
75
75
|
cupomName: c
|
|
76
76
|
}), p("error"), r(!0), m(!0);
|
|
77
77
|
} finally {
|
|
78
|
-
|
|
78
|
+
h(!1);
|
|
79
79
|
}
|
|
80
80
|
else
|
|
81
81
|
o == null || o("discount_coupon", {
|
|
@@ -88,14 +88,14 @@ const X = ({
|
|
|
88
88
|
/* @__PURE__ */ u("div", { className: "text-container", children: [
|
|
89
89
|
/* @__PURE__ */ u("div", { className: "container-title", children: [
|
|
90
90
|
/* @__PURE__ */ s(H, { width: 20, height: 16 }),
|
|
91
|
-
/* @__PURE__ */ s("
|
|
91
|
+
/* @__PURE__ */ s("h3", { className: "title", children: l.couponName })
|
|
92
92
|
] }),
|
|
93
93
|
l.couponValue && /* @__PURE__ */ u("p", { className: "price-badge", children: [
|
|
94
94
|
"- ",
|
|
95
95
|
l.couponValue
|
|
96
96
|
] }),
|
|
97
|
-
l.couponDescription && /* @__PURE__ */ s("
|
|
98
|
-
l.couponExpirationDate && /* @__PURE__ */ u("
|
|
97
|
+
l.couponDescription && /* @__PURE__ */ s("h4", { className: "subtitle", children: l.couponDescription }),
|
|
98
|
+
l.couponExpirationDate && /* @__PURE__ */ u("h4", { className: "subtitle", children: [
|
|
99
99
|
"Válido até ",
|
|
100
100
|
l.couponExpirationDate
|
|
101
101
|
] })
|
|
@@ -80,7 +80,7 @@ const E = ({
|
|
|
80
80
|
"Para adicionar um cupom é necessário que você adicione pelo menos 1 produto no carrinho"
|
|
81
81
|
] }) }),
|
|
82
82
|
/* @__PURE__ */ o("div", { className: "container-title-coupons", children: c.length > 0 ? /* @__PURE__ */ e(N, { children: [
|
|
83
|
-
/* @__PURE__ */ o("
|
|
83
|
+
/* @__PURE__ */ o("h2", { children: "Cupons disponíveis" }),
|
|
84
84
|
/* @__PURE__ */ o("div", { className: "container-coupons", children: c.map((l) => /* @__PURE__ */ o(
|
|
85
85
|
Q,
|
|
86
86
|
{
|
|
@@ -51,7 +51,7 @@ import { HAS_WINDOW as v } from "../../constants/index.js";
|
|
|
51
51
|
/* @__PURE__ */ o("button", { onClick: f, className: "modal-close", children: /* @__PURE__ */ o(k, { color: "var(--color-main)" }) })
|
|
52
52
|
] }),
|
|
53
53
|
!!u && u,
|
|
54
|
-
/* @__PURE__ */ o("div", {
|
|
54
|
+
/* @__PURE__ */ o("div", { ref: t, children: L }),
|
|
55
55
|
m && /* @__PURE__ */ o("footer", { className: "modal-footer", ref: n, children: m })
|
|
56
56
|
] }) })
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.change-order-modal p{margin:0;padding:0}.change-order-modal #modal-content-container{width:100%}.change-order-modal #modal-content-container #modal-content{display:flex;flex-direction:column;background-color:var(--color-grayScale-white);border-radius:16px 16px 0 0}.change-order-modal #modal-content-container #modal-content #modal-scroll{flex:1}.change-order-modal #modal-content-container #modal-
|
|
1
|
+
.change-order-modal p{margin:0;padding:0}.change-order-modal #modal-content-container{width:100%}.change-order-modal #modal-content-container #modal-content{display:flex;flex-direction:column;background-color:var(--color-grayScale-white);border-radius:16px 16px 0 0}.change-order-modal #modal-content-container #modal-content #modal-scroll{flex:1}.change-order-modal #modal-content-container #modal-pre-content{padding:16px}.change-order-modal #modal-content-container #modal-content header{width:100%;display:flex;justify-content:space-between;padding:24px 16px 16px;align-items:center}.change-order-modal #modal-content-container #modal-content header .modal-title{font-size:24px;font-weight:700;line-height:28px;color:var(--color-grayScale)}.change-order-modal .modal-close{background:none;border:none;cursor:pointer}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content{border-radius:16px}.change-order-modal header .modal-title{font-size:24px;line-height:28px}}.change-order-modal #modal-content-container #modal-content .change-order-pre-content{display:flex;margin:16px}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos{width:100%;margin-left:8px}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details{display:flex;justify-content:space-between;align-items:center}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .quantity{color:var(--color-grayScale);font-size:14px;line-height:18px;font-weight:700}.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .sellingPrice-multiply{font-weight:400}.change-order-modal #modal-content-container{max-height:675px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .change-order-pre-content .change-order-pre-content-infos .product-details .quantity{font-size:16px;line-height:20px}.change-order-modal #modal-content-container{max-height:716px}}.change-order-modal #modal-content-container #modal-content .change-order-similar-products{overflow-y:auto;margin:0 8px;padding:8px;height:80%}.change-order-modal #modal-content-container #modal-content .change-order-similar-products::-webkit-scrollbar{width:4px;background-color:var(--color-main-faded)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products::-webkit-scrollbar-thumb{width:3px;padding-top:16px;background-color:var(--color-main);max-height:34px;border-radius:20px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .remove-buttom{color:var(--color-negativeFeedback);background-color:transparent;border:none;font-weight:700;font-size:14px;line-height:18px;display:flex;align-items:center;justify-content:center;margin:22px 0;column-gap:4px;text-decoration:underline;cursor:pointer}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .title{font-size:14px;line-height:18px;font-weight:700;color:var(--color-grayScale);margin-bottom:16px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .change-order-similar-products .remove-buttom{margin:16px 0}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .title{font-size:20px;line-height:24px}}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list{display:flex;row-gap:16px;flex-direction:column}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item{display:flex;border-style:solid;border-width:1px;border-radius:8px;padding:8px;width:100%}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item{display:flex;cursor:pointer;background-color:var(--color-grayScale-white)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos{width:100%;margin-left:8px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .description{width:100%;display:flex;justify-content:space-between}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .seal-container{display:flex;gap:4px;flex-wrap:wrap;margin:4px 0}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .seal{color:var(--color-grayScale-white);font-size:9px;list-style:16px;text-align:center;padding:4px;border-radius:2px}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .description .choose-icon{width:16px;height:16px;border-radius:100%;display:flex;align-items:center;justify-content:center}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount .list-price{font-size:12px;line-height:16px;font-weight:400;color:var(--color-grayScale-dark);text-decoration:line-through}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount{display:flex;column-gap:4px;align-items:center}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices .discount .badge{width:46px;height:17px;justify-content:center;display:flex;align-items:center;padding:4px;color:var(--color-main);border-radius:16px;font-size:12px;font-weight:700;background-color:var(--color-secondary)}.change-order-modal #modal-content-container #modal-content .change-order-similar-products .similar-product-list .similar-product-list-item .infos .prices{display:flex;flex-direction:column;row-gap:5px}.change-order-modal #modal-content-container .modal-footer{border-radius:0 0 16px 16px;padding:16px}.change-order-modal .change-order-moda-footer .change-order-save-buttom{width:100%;height:34px;background-color:var(--color-main);border-color:transparent;border-radius:2px;color:var(--color-assistant-main);font-size:14px;line-height:18px;font-weight:500;cursor:pointer}.change-order-modal #modal-content-container #modal-content .product-name{font-size:16px;line-height:20px;font-weight:400;color:var(--color-grayScale);margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:start}.change-order-modal #modal-content-container #modal-content .badge{padding:1px 4px;color:var(--color-main);border-radius:16px;font-size:12px;font-weight:700;background-color:var(--color-secondary)}.change-order-modal #modal-content-container #modal-content .sellingPrice{color:var(--color-main);font-size:20px;line-height:24px;font-weight:600;display:flex;align-items:center;column-gap:1px}@media (min-width: 768px){.change-order-modal #modal-content-container #modal-content .sellingPrice{font-size:20px;line-height:24px}}@media (max-width: 992px){.change-order-modal .choose-icon{flex:0 0 16px;margin-left:8px}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.coupons-container *{box-sizing:border-box;font-family:DM Sans,sans-serif}.coupons-container h1,.coupons-container h3,.coupons-container p{margin:0}.coupons-container ul{list-style:none;margin:0;padding:0}.coupons-container .modal-title-container{display:flex;align-items:center;justify-content:space-between}.coupons-container .modal-title{margin:0;color:var(--color-grayScale);font-size:16px;font-weight:700;line-height:20px}@media (min-width: 640px){.coupons-container .modal-title{font-size:24px;line-height:28px}}.coupons-container .modal-close-icon{display:flex;outline:0;border:0;margin-left:10px;padding:0;background-color:transparent;cursor:pointer}@media (min-width: 640px){.coupons-container .modal-close-icon{margin-left:16px}}.coupons-container .breadcrumb-container{margin-top:16px;margin-bottom:8px}.coupons-container .breadcrumb-container .breadcrumb-content-container{align-items:center;display:flex;margin-bottom:16px;font-size:14px;line-height:18px}.coupons-container .breadcrumb-container .breadcrumb-content-container button{outline:0;border:0;background-color:transparent;color:var(--color-grayScale-darkest);font-size:14px;line-height:18px;cursor:pointer}.coupons-container .breadcrumb-container .breadcrumb-content-container svg{margin:0 10px}.coupons-container .breadcrumb-container .breadcrumb-content-container span{color:var(--color-main);font-weight:700}.coupons-container .breadcrumb-container .breadcrumb-back-button{display:flex;justify-content:center;align-items:center;outline:0;border:0;background-color:transparent;cursor:pointer;color:var(--color-support-links);font-size:14px;line-height:18px;text-decoration:underline}.coupons-container .breadcrumb-container .breadcrumb-back-button svg{margin-right:10px}.coupons-container .modal-footer-container{margin-top:24px;background-color:var(--color-grayScale-white)}.coupons-container .modal-footer-container.floating{box-shadow:0 -4px 4px 0 var(--color-support-shadow);position:absolute;bottom:0;left:0;width:100%;padding:16px}.coupons-container .modal-confirm-button{display:flex;justify-content:center;width:100%;outline:0;border:1px solid var(--color-main);border-radius:2px;margin-bottom:16px;padding:8px 16px;background-color:var(--color-main);cursor:pointer;color:var(--color-assistant-main);font-size:16px;font-weight:500;line-height:20px}.redirection-club-button{margin-top:16px;margin-bottom:0!important}.coupons-container .modal-cancel-button{display:flex;justify-content:center;width:100%;outline:0;border:1px solid var(--color-main);border-radius:2px;padding:8px 16px;background-color:transparent;cursor:pointer;color:var(--color-main);font-size:16px;font-weight:500;line-height:20px}.coupons-container .form-coupons form{display:flex;flex-direction:column;margin:24px 0}.coupons-container .form-coupons input{padding:8px;margin-bottom:8px;border-radius:2px;border:1px solid var(--color-grayScale-light);background:var(--color-grayScale-white);font-size:16px;line-height:20px}.coupons-container .form-coupons button{display:flex;justify-content:center;padding:8px;font-weight:500;line-height:20px;cursor:pointer;color:var(--color-grayScale-dark);border:1px solid var(--color-grayScale-dark);background-color:var(--color-grayScale-white)}.coupons-container .form-coupons button:disabled{cursor:wait;color:var(--color-grayScale-lightest);background-color:var(--color-grayScale-darkest)}.coupons-container .cart-empty-coupons-label{max-width:500px;margin:1rem 0rem}.coupons-container .cart-empty-coupons-label span{margin-right:16px}.coupons-container .cart-empty-coupons-label p{display:flex;flex-direction:row;padding:8px 16px;margin-top:24px;border-radius:4px;line-height:1rem;font-size:16px;color:var(--color-infoFeedback-dark);background-color:var(--color-infoFeedback-faded)}.coupons-container .container-title-coupons
|
|
1
|
+
.coupons-container *{box-sizing:border-box;font-family:DM Sans,sans-serif}.coupons-container h1,.coupons-container h3,.coupons-container h4,.coupons-container p{margin:0}.coupons-container ul{list-style:none;margin:0;padding:0}.coupons-container .modal-title-container{display:flex;align-items:center;justify-content:space-between}.coupons-container .modal-title{margin:0;color:var(--color-grayScale);font-size:16px;font-weight:700;line-height:20px}@media (min-width: 640px){.coupons-container .modal-title{font-size:24px;line-height:28px}}.coupons-container .modal-close-icon{display:flex;outline:0;border:0;margin-left:10px;padding:0;background-color:transparent;cursor:pointer}@media (min-width: 640px){.coupons-container .modal-close-icon{margin-left:16px}}.coupons-container .breadcrumb-container{margin-top:16px;margin-bottom:8px}.coupons-container .breadcrumb-container .breadcrumb-content-container{align-items:center;display:flex;margin-bottom:16px;font-size:14px;line-height:18px}.coupons-container .breadcrumb-container .breadcrumb-content-container button{outline:0;border:0;background-color:transparent;color:var(--color-grayScale-darkest);font-size:14px;line-height:18px;cursor:pointer}.coupons-container .breadcrumb-container .breadcrumb-content-container svg{margin:0 10px}.coupons-container .breadcrumb-container .breadcrumb-content-container span{color:var(--color-main);font-weight:700}.coupons-container .breadcrumb-container .breadcrumb-back-button{display:flex;justify-content:center;align-items:center;outline:0;border:0;background-color:transparent;cursor:pointer;color:var(--color-support-links);font-size:14px;line-height:18px;text-decoration:underline}.coupons-container .breadcrumb-container .breadcrumb-back-button svg{margin-right:10px}.coupons-container .modal-footer-container{margin-top:24px;background-color:var(--color-grayScale-white)}.coupons-container .modal-footer-container.floating{box-shadow:0 -4px 4px 0 var(--color-support-shadow);position:absolute;bottom:0;left:0;width:100%;padding:16px}.coupons-container .modal-confirm-button{display:flex;justify-content:center;width:100%;outline:0;border:1px solid var(--color-main);border-radius:2px;margin-bottom:16px;padding:8px 16px;background-color:var(--color-main);cursor:pointer;color:var(--color-assistant-main);font-size:16px;font-weight:500;line-height:20px}.redirection-club-button{margin-top:16px;margin-bottom:0!important}.coupons-container .modal-cancel-button{display:flex;justify-content:center;width:100%;outline:0;border:1px solid var(--color-main);border-radius:2px;padding:8px 16px;background-color:transparent;cursor:pointer;color:var(--color-main);font-size:16px;font-weight:500;line-height:20px}.coupons-container .form-coupons form{display:flex;flex-direction:column;margin:24px 0}.coupons-container .form-coupons input{padding:8px;margin-bottom:8px;border-radius:2px;border:1px solid var(--color-grayScale-light);background:var(--color-grayScale-white);font-size:16px;line-height:20px}.coupons-container .form-coupons button{display:flex;justify-content:center;padding:8px;font-weight:500;line-height:20px;cursor:pointer;color:var(--color-grayScale-dark);border:1px solid var(--color-grayScale-dark);background-color:var(--color-grayScale-white)}.coupons-container .form-coupons button:disabled{cursor:wait;color:var(--color-grayScale-lightest);background-color:var(--color-grayScale-darkest)}.coupons-container .cart-empty-coupons-label{max-width:500px;margin:1rem 0rem}.coupons-container .cart-empty-coupons-label span{margin-right:16px}.coupons-container .cart-empty-coupons-label p{display:flex;flex-direction:row;padding:8px 16px;margin-top:24px;border-radius:4px;line-height:1rem;font-size:16px;color:var(--color-infoFeedback-dark);background-color:var(--color-infoFeedback-faded)}.coupons-container .container-title-coupons h2{margin-bottom:16px;color:var(--color-grayScale);font-size:16px;font-weight:700;line-height:20px}.coupons-container .container-title-coupons .container-coupons{width:100%;display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:16px}.coupons-container .container-card-coupon{width:100%;display:flex;flex-direction:row;justify-content:space-between;padding:1rem;gap:8px;border-radius:8px;border:1px solid var(--color-grayScale-faded);background:var(--color-grayScale-white);box-shadow:4px 4px 8px 0 var(--color-support-shadow)}.coupons-container .container-card-coupon.active{border:1.5px solid var(--color-positiveFeedback)}.coupons-container .container-card-coupon .text-container{flex:1;display:flex;flex-direction:column;align-self:center;align-items:flex-start;gap:8px}.coupons-container .container-card-coupon .text-container .container-title{display:flex;flex-direction:row}.coupons-container .container-card-coupon .text-container .container-title .title{margin-left:.5rem;line-height:20px;font-weight:700;color:var(--color-grayScale);font-size:16px}.coupons-container .container-card-coupon .text-container .price-badge{border-radius:2rem;padding:.25rem 1rem;font-weight:700;font-size:20px;color:var(--color-badge-secondary);background-color:var(--color-badge-main)}.coupons-container .container-card-coupon .text-container .subtitle{font-weight:400;line-height:20px;font-size:16px;color:var(--color-grayScale-darkest)}.coupons-container .container-card-coupon .vertical-line{border-right:2px dashed var(--color-grayScale-light)}.coupons-container .container-card-coupon .buttons-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.coupons-container .container-card-coupon .buttons-container .applied-coupon{display:flex;align-items:center;width:110px;height:34px;padding:16px 8px;border:unset;border-radius:2px;line-height:20px;font-weight:500;font-size:16px;color:var(--color-main);background:var(--color-positiveFeedback-faded)}.coupons-container .container-card-coupon .buttons-container .applied-coupon span,.coupons-container .container-card-coupon .buttons-container .success-icon{margin-right:8px}.coupons-container .container-card-coupon .buttons-container .apply-coupon{width:110px;height:34px;padding:8px 16px;border:unset;border-radius:2px;color:var(--color-assistant-main);background:var(--color-main);cursor:pointer}.coupons-container .container-card-coupon .buttons-container .apply-coupon:disabled{cursor:wait;color:var(--color-grayScale-lightest);background-color:var(--color-grayScale-darkest)}.coupons-container .container-card-coupon .buttons-container .remove-coupon{width:110px;height:34px;margin-top:16px;padding:8px 16px;border-radius:2px;font-weight:500;line-height:20px;color:var(--color-main);border:1px solid var(--color-main);background:var(--color-grayScale-white);cursor:pointer}.coupons-container .container-card-coupon .buttons-container a{width:110px;margin-top:16px;text-decoration-line:underline;text-align:center;font-weight:400;line-height:20px;font-size:16px;color:var(--color-support-links);cursor:pointer}.coupons-container .modal-rule-coupon-external .modal-rule-coupon-internal .cartEmptyCoupon-h3{font-size:16px;font-weight:700;line-height:20px;color:#1c1c1c;margin:1.5rem 0rem}.coupons-container .modal-rule-coupon-external .modal-rule-coupon-internal #cartEmptyCoupon-p{line-height:1rem}.coupons-container .modal-rule-coupon-external .modal-rule-coupon-internal .cartEmptyCoupon-svg{display:flex;justify-content:center}.coupons-container .modal-rule-coupon-external .modal-rule-coupon-internal .modal-rule-coupon-children span{margin-right:16px}.coupons-container .modal-rule-coupon-external .modal-rule-coupon-internal .modal-rule-coupon-children p{display:flex;flex-direction:row;padding:8px 16px;border-radius:4px;line-height:2.5rem;font-size:16px;color:var(--color-infoFeedback-dark);background-color:var(--color-infoFeedback-faded)}.coupons-container .applied-coupon-badge{display:flex;position:fixed;width:fit-content;justify-content:flex-start;align-items:center;padding:1rem;z-index:10;bottom:40px;left:50%;transform:translate(-50%);border-radius:4px;box-shadow:4px 4px 8px var(--color-support-shadow)}.coupons-container .applied-coupon-badge span{margin-right:8px}.coupons-container .error-coupon{background-color:var(--color-negativeFeedback-faded)}.coupons-container .success-coupon{background-color:var(--color-positiveFeedback-faded)}.coupons-container .noCoupons{display:flex;flex-direction:column;align-items:center}.coupons-container .noCoupons .noCoupons-h1{font-weight:700}.coupons-container .noCoupons .noCoupons-p{margin-bottom:24px;color:var(--color-grayScale-darkest)}
|
|
@@ -18,26 +18,26 @@ export interface SKUSpecification {
|
|
|
18
18
|
}
|
|
19
19
|
export interface SimilarProducts {
|
|
20
20
|
productId: string;
|
|
21
|
-
itemId
|
|
22
|
-
name
|
|
23
|
-
images
|
|
24
|
-
measurementUnit
|
|
25
|
-
isWeighed
|
|
26
|
-
unitMultiplier
|
|
27
|
-
isClub
|
|
28
|
-
isValid
|
|
29
|
-
listPrice
|
|
30
|
-
sellingPrice
|
|
31
|
-
kgPrice
|
|
32
|
-
hasDiscount
|
|
33
|
-
percentageDiscount
|
|
34
|
-
brand
|
|
35
|
-
description
|
|
36
|
-
categoryTree
|
|
21
|
+
itemId?: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
images?: SKUImages[] | undefined;
|
|
24
|
+
measurementUnit?: string;
|
|
25
|
+
isWeighed?: boolean;
|
|
26
|
+
unitMultiplier?: number;
|
|
27
|
+
isClub?: boolean;
|
|
28
|
+
isValid?: boolean;
|
|
29
|
+
listPrice?: number | null;
|
|
30
|
+
sellingPrice?: number | null;
|
|
31
|
+
kgPrice?: number | null;
|
|
32
|
+
hasDiscount?: boolean;
|
|
33
|
+
percentageDiscount?: string;
|
|
34
|
+
brand?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
categoryTree?: {
|
|
37
37
|
name: string;
|
|
38
38
|
}[];
|
|
39
|
-
sellerId
|
|
40
|
-
skuSpecifications
|
|
39
|
+
sellerId?: string;
|
|
40
|
+
skuSpecifications?: SKUSpecification[] | null;
|
|
41
41
|
clubPrice?: {
|
|
42
42
|
listPrice?: number | null;
|
|
43
43
|
sellingPrice?: number | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface OrderFormProps {
|
|
2
|
+
orderFormId: string;
|
|
3
|
+
customData: CustomData;
|
|
4
|
+
}
|
|
5
|
+
export interface CustomData {
|
|
6
|
+
customApps: CustomApp[];
|
|
7
|
+
}
|
|
8
|
+
export interface CustomApp {
|
|
9
|
+
fields: Fields;
|
|
10
|
+
id: string;
|
|
11
|
+
major: number;
|
|
12
|
+
}
|
|
13
|
+
export interface Fields {
|
|
14
|
+
idSubstitutionCriterias?: string;
|
|
15
|
+
substitutionCriterias: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|