@plurix/ecom-components 1.14.2 → 1.14.3-com2034
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 +3 -3
- package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +80 -82
- package/dist/packages/ChangeOrderModal/components/ModalFooter.d.ts +4 -1
- package/dist/packages/ChangeOrderModal/components/ModalFooter.js +3 -1
- package/dist/packages/ChangeOrderModal/components/SimilarProductList.d.ts +2 -3
- package/dist/packages/ChangeOrderModal/components/SimilarProducts.d.ts +4 -5
- package/dist/packages/ChangeOrderModal/components/SimilarProducts.js +21 -21
- package/dist/packages/ChangeOrderModal/mocks.d.ts +1 -0
- package/dist/packages/ChangeOrderModal/mocks.js +1 -0
- package/dist/packages/Coupons/Coupons.js +38 -38
- package/dist/packages/Coupons/api/addCoupon.d.ts +1 -1
- package/dist/packages/Coupons/api/addCoupon.js +7 -7
- package/dist/packages/Coupons/api/getCoupons.d.ts +1 -1
- package/dist/packages/Coupons/api/getCoupons.js +4 -4
- package/dist/packages/Coupons/api/removeCoupon.d.ts +1 -1
- package/dist/packages/Coupons/api/removeCoupon.js +6 -6
- package/dist/packages/Coupons/components/CouponCard.d.ts +1 -1
- package/dist/packages/Coupons/components/CouponCard.js +40 -41
- package/dist/packages/Coupons/views/CouponsView.js +29 -29
- package/dist/styles/change-order-modal.global.css +1 -1
- package/package.json +1 -1
|
@@ -13,9 +13,9 @@ export interface ChangeOrderModalProps {
|
|
|
13
13
|
isClubClient?: boolean;
|
|
14
14
|
orderFormId: string;
|
|
15
15
|
saveSelectedSimilarProduct?: (similarProduct: SimilarProductsProps | undefined) => void;
|
|
16
|
-
getOrderFormMutation?: (variables:
|
|
17
|
-
getProductsSimilarsMutation?: (variables:
|
|
18
|
-
postChangeOrderMutation?: (variables:
|
|
16
|
+
getOrderFormMutation?: (variables: object) => Promise<CustomDataMutationResponse>;
|
|
17
|
+
getProductsSimilarsMutation?: (variables: object) => Promise<GetProductsSimilarsResponse>;
|
|
18
|
+
postChangeOrderMutation?: (variables: object) => Promise<PostChangeOrderMutationResponse>;
|
|
19
19
|
}
|
|
20
20
|
interface CustomDataMutationResponse {
|
|
21
21
|
getOrderForm: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { ProductSelected as
|
|
5
|
-
import { SimilarProducts as
|
|
1
|
+
import { jsxs as _, jsx as i, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useEffect as v } from "react";
|
|
3
|
+
import { Modal as D } from "../Modal/Modal.js";
|
|
4
|
+
import { ProductSelected as L } from "./components/ProductSelected.js";
|
|
5
|
+
import { SimilarProducts as R } from "./components/SimilarProducts.js";
|
|
6
6
|
import { ModalFooter as T } from "./components/ModalFooter.js";
|
|
7
7
|
/* empty css */import { getProductsSimilars as $ } from "./api/getProductsSimilars.js";
|
|
8
8
|
import z from "../../hooks/useAnalitcsEvents.js";
|
|
@@ -10,107 +10,105 @@ import { NoSimilarProduct as B } from "./components/NoSimilarProduct.js";
|
|
|
10
10
|
import { getOrderForm as G } from "./api/getOrderForm.js";
|
|
11
11
|
import { postChangeOrder as H } from "./api/postChangeOrder.js";
|
|
12
12
|
import { Skeleton as K } from "../Skeleton/index.js";
|
|
13
|
-
const
|
|
14
|
-
selectedItem:
|
|
15
|
-
postalCode:
|
|
16
|
-
orderFormId:
|
|
17
|
-
isClubClient:
|
|
18
|
-
isOpen:
|
|
19
|
-
environment:
|
|
20
|
-
setIsOpen:
|
|
21
|
-
saveSelectedSimilarProduct:
|
|
13
|
+
const no = ({
|
|
14
|
+
selectedItem: t,
|
|
15
|
+
postalCode: C,
|
|
16
|
+
orderFormId: s,
|
|
17
|
+
isClubClient: w,
|
|
18
|
+
isOpen: x,
|
|
19
|
+
environment: N,
|
|
20
|
+
setIsOpen: e,
|
|
21
|
+
saveSelectedSimilarProduct: m,
|
|
22
22
|
getOrderFormMutation: l,
|
|
23
|
-
getProductsSimilarsMutation:
|
|
24
|
-
postChangeOrderMutation:
|
|
23
|
+
getProductsSimilarsMutation: P,
|
|
24
|
+
postChangeOrderMutation: j
|
|
25
25
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
26
|
+
const [a, k] = g(), [A, h] = g(!1), r = N === "io", { genericTaggingEvent: E } = z(), [o, O] = g();
|
|
27
|
+
v(() => {
|
|
28
28
|
(async () => {
|
|
29
|
-
|
|
29
|
+
var S, b;
|
|
30
|
+
h(!0);
|
|
30
31
|
try {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
}) || { getOrderForm: { data: "" } }, e = r ? q : JSON.parse(w.getOrderForm.data), n = ((u = (i = e == null ? void 0 : e.customData) == null ? void 0 : i.customApps) == null ? void 0 : u.find(
|
|
50
|
-
(A) => A.id === "janis"
|
|
32
|
+
const [p, c] = await Promise.all([
|
|
33
|
+
$({
|
|
34
|
+
postalCode: C,
|
|
35
|
+
selectedItem: t,
|
|
36
|
+
isIO: r,
|
|
37
|
+
getProductsSimilarsMutation: P
|
|
38
|
+
}),
|
|
39
|
+
(async () => {
|
|
40
|
+
const d = r && await G(s, r), M = l && await l({
|
|
41
|
+
input: { orderFormId: s }
|
|
42
|
+
}) || { getOrderForm: { data: "" } };
|
|
43
|
+
return r ? d : JSON.parse(M.getOrderForm.data);
|
|
44
|
+
})()
|
|
45
|
+
]), J = (p == null ? void 0 : p.products) || [];
|
|
46
|
+
k(J);
|
|
47
|
+
const n = ((b = (S = c == null ? void 0 : c.customData) == null ? void 0 : S.customApps) == null ? void 0 : b.find(
|
|
48
|
+
(d) => d.id === "janis"
|
|
51
49
|
)) || null;
|
|
52
|
-
let
|
|
53
|
-
n != null && n.fields.idSubstitutionCriterias && (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
g({
|
|
58
|
-
itemId: `${h[k]}`
|
|
50
|
+
let f = {};
|
|
51
|
+
n != null && n.fields.idSubstitutionCriterias && (f = JSON.parse(n.fields.idSubstitutionCriterias));
|
|
52
|
+
const y = t == null ? void 0 : t.productOriginId;
|
|
53
|
+
f[y] && O({
|
|
54
|
+
itemId: `${f[y]}`
|
|
59
55
|
});
|
|
60
56
|
} finally {
|
|
61
|
-
|
|
57
|
+
h(!1);
|
|
62
58
|
}
|
|
63
59
|
})();
|
|
64
60
|
}, []);
|
|
65
|
-
const
|
|
61
|
+
const F = () => {
|
|
62
|
+
var u;
|
|
66
63
|
H(
|
|
67
|
-
|
|
64
|
+
s,
|
|
68
65
|
r,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
),
|
|
73
|
-
name:
|
|
74
|
-
replacement_item:
|
|
75
|
-
})),
|
|
66
|
+
t.productOriginId,
|
|
67
|
+
(u = o == null ? void 0 : o.itemId) != null ? u : "",
|
|
68
|
+
j
|
|
69
|
+
), o && (m == null || m(o), E("salvar_substituto", {
|
|
70
|
+
name: t.name,
|
|
71
|
+
replacement_item: o == null ? void 0 : o.name
|
|
72
|
+
})), e(!1);
|
|
76
73
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
74
|
+
return /* @__PURE__ */ _(
|
|
75
|
+
D,
|
|
79
76
|
{
|
|
80
|
-
isOpen:
|
|
81
|
-
setIsOpen:
|
|
77
|
+
isOpen: x,
|
|
78
|
+
setIsOpen: e,
|
|
82
79
|
className: "change-order-modal",
|
|
83
80
|
title: "Produto com estoque baixo",
|
|
84
|
-
Footer:
|
|
81
|
+
Footer: a && a.length > 0 && /* @__PURE__ */ i(
|
|
85
82
|
T,
|
|
86
83
|
{
|
|
87
|
-
saveSelectedSimilarProduct:
|
|
84
|
+
saveSelectedSimilarProduct: F,
|
|
85
|
+
similarProductSelect: o
|
|
88
86
|
}
|
|
89
87
|
),
|
|
90
|
-
children:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
children: [
|
|
89
|
+
t && /* @__PURE__ */ i(L, { selectedItem: t }),
|
|
90
|
+
A ? /* @__PURE__ */ i(
|
|
91
|
+
K,
|
|
92
|
+
{
|
|
93
|
+
width: r ? "100%" : "90%",
|
|
94
|
+
height: r ? 600 : 425,
|
|
95
|
+
backgroundColor: "var(--color-grayScale-faded)",
|
|
96
|
+
margin: "auto",
|
|
97
|
+
animation: !0
|
|
98
|
+
}
|
|
99
|
+
) : /* @__PURE__ */ i(q, { children: a && a.length > 0 ? /* @__PURE__ */ i(
|
|
100
|
+
R,
|
|
103
101
|
{
|
|
104
|
-
isClubClient:
|
|
105
|
-
similarProductSelect:
|
|
106
|
-
setSimilarProductSelect:
|
|
107
|
-
products:
|
|
102
|
+
isClubClient: w,
|
|
103
|
+
similarProductSelect: o,
|
|
104
|
+
setSimilarProductSelect: O,
|
|
105
|
+
products: a
|
|
108
106
|
}
|
|
109
|
-
) : /* @__PURE__ */
|
|
110
|
-
]
|
|
107
|
+
) : /* @__PURE__ */ i(B, {}) })
|
|
108
|
+
]
|
|
111
109
|
}
|
|
112
110
|
);
|
|
113
111
|
};
|
|
114
112
|
export {
|
|
115
|
-
|
|
113
|
+
no as ChangeOrderModal
|
|
116
114
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { SimilarProducts } from '../../../main';
|
|
2
|
+
|
|
3
|
+
export declare const ModalFooter: ({ saveSelectedSimilarProduct, similarProductSelect }: {
|
|
2
4
|
saveSelectedSimilarProduct?: () => void;
|
|
5
|
+
similarProductSelect: SimilarProducts | undefined;
|
|
3
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
const t = ({
|
|
3
|
-
saveSelectedSimilarProduct: o
|
|
3
|
+
saveSelectedSimilarProduct: o,
|
|
4
|
+
similarProductSelect: r
|
|
4
5
|
}) => /* @__PURE__ */ n("div", { className: "change-order-moda-footer", children: /* @__PURE__ */ n(
|
|
5
6
|
"button",
|
|
6
7
|
{
|
|
7
8
|
onClick: () => o == null ? void 0 : o(),
|
|
8
9
|
className: "change-order-save-buttom",
|
|
10
|
+
disabled: !r,
|
|
9
11
|
children: "Salvar Substituto"
|
|
10
12
|
}
|
|
11
13
|
) });
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { SimilarProducts } from '../../../types/ChangeOrderModal';
|
|
3
2
|
|
|
4
3
|
export declare const SimilarProductItem: ({ similarProduct, similarProductSelect, setSimilarProductSelect, isClubClient }: {
|
|
5
|
-
similarProductSelect: SimilarProducts;
|
|
6
|
-
setSimilarProductSelect:
|
|
4
|
+
similarProductSelect: SimilarProducts | undefined;
|
|
5
|
+
setSimilarProductSelect: (similiarProductSelect: SimilarProducts) => void;
|
|
7
6
|
similarProduct: SimilarProducts;
|
|
8
7
|
isClubClient?: boolean;
|
|
9
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { SimilarProducts as SimilarProductProps } from '../../../types/ChangeOrderModal';
|
|
3
2
|
|
|
4
3
|
interface Props {
|
|
5
|
-
products
|
|
6
|
-
similarProductSelect: SimilarProductProps;
|
|
7
|
-
setSimilarProductSelect:
|
|
4
|
+
products: SimilarProductProps[];
|
|
5
|
+
similarProductSelect: SimilarProductProps | undefined;
|
|
6
|
+
setSimilarProductSelect: (similiarProductSelect: SimilarProductProps | undefined) => void;
|
|
8
7
|
isClubClient?: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare const SimilarProducts: ({ products, isClubClient, similarProductSelect, setSimilarProductSelect }: Props) => import("react/jsx-runtime").JSX.Element
|
|
9
|
+
export declare const SimilarProducts: ({ products, isClubClient, similarProductSelect, setSimilarProductSelect }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Icons as
|
|
3
|
-
import { SimilarProductItem as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Icons as c } from "../assets/icons.js";
|
|
3
|
+
import { SimilarProductItem as e } from "./SimilarProductList.js";
|
|
4
|
+
const u = ({
|
|
5
5
|
products: m,
|
|
6
|
-
isClubClient:
|
|
7
|
-
similarProductSelect:
|
|
8
|
-
setSimilarProductSelect:
|
|
9
|
-
}) =>
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
6
|
+
isClubClient: a,
|
|
7
|
+
similarProductSelect: o,
|
|
8
|
+
setSimilarProductSelect: s
|
|
9
|
+
}) => /* @__PURE__ */ i("section", { className: "change-order-similar-products", children: [
|
|
10
|
+
/* @__PURE__ */ r("h3", { className: "title", children: "Na falta substitua por:" }),
|
|
11
|
+
/* @__PURE__ */ r("div", { className: "similar-product-list", children: m.map((t) => /* @__PURE__ */ r(
|
|
12
|
+
e,
|
|
13
13
|
{
|
|
14
|
-
isClubClient:
|
|
15
|
-
similarProductSelect:
|
|
16
|
-
setSimilarProductSelect:
|
|
17
|
-
similarProduct:
|
|
14
|
+
isClubClient: a,
|
|
15
|
+
similarProductSelect: o,
|
|
16
|
+
setSimilarProductSelect: s,
|
|
17
|
+
similarProduct: t
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
t.itemId
|
|
20
20
|
)) }),
|
|
21
|
-
|
|
21
|
+
o && /* @__PURE__ */ i(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
|
-
onClick: () =>
|
|
24
|
+
onClick: () => s(void 0),
|
|
25
25
|
className: "remove-buttom",
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ r(c, { iconId: "Trash" }),
|
|
28
28
|
" Remover substituto"
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
|
-
] })
|
|
32
|
+
] });
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
u as SimilarProducts
|
|
35
35
|
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as e, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import { useState as t, useEffect as h } from "react";
|
|
3
3
|
import { LoadingView as Q } from "./views/LoadingView.js";
|
|
4
4
|
import { CouponsView as U } from "./views/CouponsView.js";
|
|
5
5
|
import { RulesView as W } from "./views/RulesView.js";
|
|
6
6
|
import { OverwriteView as X } from "./views/OverwriteView.js";
|
|
7
7
|
import { EmptyCartView as Y } from "./views/EmptyCartView.js";
|
|
8
8
|
import { getCoupons as Z } from "./api/getCoupons.js";
|
|
9
|
-
/* empty css */const
|
|
10
|
-
orderFormId:
|
|
9
|
+
/* empty css */const to = ({
|
|
10
|
+
orderFormId: j,
|
|
11
11
|
hasItemsInCart: f,
|
|
12
12
|
builder: l,
|
|
13
|
-
account:
|
|
13
|
+
account: A,
|
|
14
14
|
isIO: o = !1,
|
|
15
15
|
closeIOModal: r,
|
|
16
16
|
activeOrderFormCoupon: n,
|
|
17
17
|
genericTaggingEvent: s,
|
|
18
18
|
disableFirstEmptyModal: J,
|
|
19
19
|
couponsList: p,
|
|
20
|
-
qtdCouponsView:
|
|
20
|
+
qtdCouponsView: w,
|
|
21
21
|
getCouponsMutation: q,
|
|
22
22
|
addCouponMutation: D,
|
|
23
23
|
removeCouponMutation: L
|
|
24
24
|
}) => {
|
|
25
|
-
const [k,
|
|
25
|
+
const [k, C] = t(!0), [z, a] = t([]), [u, c] = t("coupons-view"), [B, N] = t(!1), [d, y] = t(!1), [v, R] = t(""), [m, V] = t(""), [E, S] = t(
|
|
26
26
|
!J
|
|
27
|
-
), [G, H] =
|
|
28
|
-
return
|
|
29
|
-
n &&
|
|
30
|
-
}, [n]),
|
|
27
|
+
), [G, H] = t();
|
|
28
|
+
return h(() => {
|
|
29
|
+
n && R(n);
|
|
30
|
+
}, [n]), h(() => {
|
|
31
31
|
(async () => {
|
|
32
|
-
|
|
32
|
+
C(!0);
|
|
33
33
|
try {
|
|
34
|
-
const i = o ? await Z(
|
|
34
|
+
const i = o ? await Z(l, p) : await q({
|
|
35
35
|
input: {
|
|
36
36
|
builder: l,
|
|
37
37
|
couponsList: p
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
40
|
-
if (
|
|
41
|
-
const K =
|
|
39
|
+
}), x = o ? i : JSON.parse(i.getCoupons.data).coupons;
|
|
40
|
+
if (w) {
|
|
41
|
+
const K = x.slice(0, w);
|
|
42
42
|
a(K);
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
|
-
a(
|
|
45
|
+
a(x);
|
|
46
46
|
return;
|
|
47
47
|
} catch (i) {
|
|
48
48
|
a([]);
|
|
49
49
|
} finally {
|
|
50
|
-
|
|
50
|
+
C(!1);
|
|
51
51
|
}
|
|
52
52
|
})();
|
|
53
|
-
}, [JSON.stringify(p)]), k ? /* @__PURE__ */
|
|
53
|
+
}, [JSON.stringify(p)]), k ? /* @__PURE__ */ e("div", { className: "coupons-container", children: /* @__PURE__ */ e(
|
|
54
54
|
Q,
|
|
55
55
|
{
|
|
56
56
|
isIO: o,
|
|
@@ -58,63 +58,63 @@ import { getCoupons as Z } from "./api/getCoupons.js";
|
|
|
58
58
|
genericTaggingEvent: s
|
|
59
59
|
}
|
|
60
60
|
) }) : /* @__PURE__ */ P("div", { className: "coupons-container", children: [
|
|
61
|
-
(!o || o && u === "coupons-view") && /* @__PURE__ */
|
|
61
|
+
(!o || o && u === "coupons-view") && /* @__PURE__ */ e(
|
|
62
62
|
U,
|
|
63
63
|
{
|
|
64
64
|
removeCouponMutation: L,
|
|
65
65
|
addCouponMutation: D,
|
|
66
|
-
orderFormId:
|
|
66
|
+
orderFormId: j,
|
|
67
67
|
hasItemsInCart: f,
|
|
68
|
-
account:
|
|
68
|
+
account: A,
|
|
69
69
|
isIO: o,
|
|
70
70
|
closeIOModal: r,
|
|
71
71
|
coupons: z,
|
|
72
|
-
firstCouponName:
|
|
72
|
+
firstCouponName: v,
|
|
73
73
|
secondCouponName: m,
|
|
74
|
-
replaceCoupon:
|
|
74
|
+
replaceCoupon: d,
|
|
75
75
|
setView: c,
|
|
76
|
-
setFirstCouponName:
|
|
77
|
-
setSecondCouponName:
|
|
78
|
-
setActiveRule:
|
|
76
|
+
setFirstCouponName: R,
|
|
77
|
+
setSecondCouponName: V,
|
|
78
|
+
setActiveRule: N,
|
|
79
79
|
setDataItem: H,
|
|
80
|
-
setReplaceCoupon:
|
|
81
|
-
setIsCloseModalEmpty:
|
|
80
|
+
setReplaceCoupon: y,
|
|
81
|
+
setIsCloseModalEmpty: S,
|
|
82
82
|
genericTaggingEvent: s
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
(!o || o && u === "rules-view") && B && /* @__PURE__ */
|
|
85
|
+
(!o || o && u === "rules-view") && B && /* @__PURE__ */ e(
|
|
86
86
|
W,
|
|
87
87
|
{
|
|
88
88
|
dataItem: G,
|
|
89
|
-
setActiveRule:
|
|
89
|
+
setActiveRule: N,
|
|
90
90
|
setView: c,
|
|
91
91
|
isIO: o,
|
|
92
92
|
closeIOModal: r,
|
|
93
93
|
genericTaggingEvent: s
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
(!o || o && u === "overwrite-view") && m && !
|
|
96
|
+
(!o || o && u === "overwrite-view") && m && !d && /* @__PURE__ */ e(
|
|
97
97
|
X,
|
|
98
98
|
{
|
|
99
|
-
firstCouponName:
|
|
99
|
+
firstCouponName: v,
|
|
100
100
|
secondCouponName: m,
|
|
101
101
|
setView: c,
|
|
102
|
-
setReplaceCoupon:
|
|
103
|
-
setSecondCouponName:
|
|
102
|
+
setReplaceCoupon: y,
|
|
103
|
+
setSecondCouponName: V,
|
|
104
104
|
isIO: o,
|
|
105
105
|
closeIOModal: r,
|
|
106
106
|
genericTaggingEvent: s
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
|
-
!f && E && /* @__PURE__ */
|
|
109
|
+
!f && E && /* @__PURE__ */ e(
|
|
110
110
|
Y,
|
|
111
111
|
{
|
|
112
|
-
setIsCloseModalEmpty:
|
|
112
|
+
setIsCloseModalEmpty: S,
|
|
113
113
|
genericTaggingEvent: s
|
|
114
114
|
}
|
|
115
115
|
)
|
|
116
116
|
] });
|
|
117
117
|
};
|
|
118
118
|
export {
|
|
119
|
-
|
|
119
|
+
to as Coupons
|
|
120
120
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SetOrderFormCouponResponse } from '../types/SetOrderFormCouponResponse';
|
|
2
2
|
|
|
3
|
-
export declare const addCoupon: (
|
|
3
|
+
export declare const addCoupon: (orderFormId: string, couponId: string) => Promise<SetOrderFormCouponResponse>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import r from "axios";
|
|
2
|
-
const
|
|
3
|
-
const { data:
|
|
4
|
-
|
|
2
|
+
const n = async (o, t) => {
|
|
3
|
+
const { data: a } = await r.post(
|
|
4
|
+
"/_v/faststoreapi/coupon/order",
|
|
5
5
|
{
|
|
6
|
-
orderFormId:
|
|
7
|
-
couponId:
|
|
6
|
+
orderFormId: o,
|
|
7
|
+
couponId: t
|
|
8
8
|
}
|
|
9
9
|
);
|
|
10
|
-
return
|
|
10
|
+
return a;
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
n as addCoupon
|
|
14
14
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CouponType } from '../types/CouponType';
|
|
2
2
|
|
|
3
|
-
export declare const getCoupons: (
|
|
3
|
+
export declare const getCoupons: (builder: 'app' | 'faststore', couponsList?: CouponType[]) => Promise<CouponType[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
import a from "axios";
|
|
2
|
+
const c = async (s, o) => {
|
|
3
|
+
const t = "/_v/faststoreapi/coupon/list", n = Math.random(), { data: r } = o ? await a.post(t, { couponsList: o }) : await a.get(t, { params: { builder: s, random: n } });
|
|
4
4
|
return r.coupons;
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
c as getCoupons
|
|
8
8
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SetOrderFormCouponResponse } from '../types/SetOrderFormCouponResponse';
|
|
2
2
|
|
|
3
|
-
export declare const removeCoupon: (
|
|
3
|
+
export declare const removeCoupon: (orderFormId: string) => Promise<SetOrderFormCouponResponse>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
const r = async (o
|
|
3
|
-
const { data:
|
|
4
|
-
|
|
1
|
+
import a from "axios";
|
|
2
|
+
const r = async (o) => {
|
|
3
|
+
const { data: t } = await a.delete(
|
|
4
|
+
"/_v/faststoreapi/coupon/order",
|
|
5
5
|
{
|
|
6
|
-
data: { orderFormId:
|
|
6
|
+
data: { orderFormId: o }
|
|
7
7
|
}
|
|
8
8
|
);
|
|
9
|
-
return
|
|
9
|
+
return t;
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
12
|
r as removeCoupon
|
|
@@ -24,4 +24,4 @@ export interface CouponCardProps {
|
|
|
24
24
|
addCouponMutation?: any;
|
|
25
25
|
removeCouponMutation?: any;
|
|
26
26
|
}
|
|
27
|
-
export declare const CouponCard: ({
|
|
27
|
+
export declare const CouponCard: ({ orderFormId, hasItemsInCart, isIO, item, firstCouponName, secondCouponName, replaceCoupon, setView, setActiveRule, setDataItem, setFirstCouponName, setSecondCouponName, setReplaceCoupon, setAlert, setType, setIsCloseModalEmpty, genericTaggingEvent, addCouponMutation, removeCouponMutation }: CouponCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
import { jsxs as p, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { addCoupon as
|
|
4
|
-
import { CouponIcon as
|
|
5
|
-
import { SuccessIcon as
|
|
6
|
-
import { removeCoupon as
|
|
7
|
-
const
|
|
8
|
-
account: D,
|
|
2
|
+
import { useState as V, useEffect as q } from "react";
|
|
3
|
+
import { addCoupon as B } from "../api/addCoupon.js";
|
|
4
|
+
import { CouponIcon as G } from "../../../assets/svgs/CouponIcon.js";
|
|
5
|
+
import { SuccessIcon as H } from "../../../assets/svgs/SuccessIcon.js";
|
|
6
|
+
import { removeCoupon as K } from "../api/removeCoupon.js";
|
|
7
|
+
const Z = ({
|
|
9
8
|
orderFormId: t,
|
|
10
|
-
hasItemsInCart:
|
|
9
|
+
hasItemsInCart: D,
|
|
11
10
|
isIO: r = !1,
|
|
12
11
|
item: a,
|
|
13
12
|
firstCouponName: s,
|
|
14
13
|
secondCouponName: d,
|
|
15
14
|
replaceCoupon: b,
|
|
16
|
-
setView:
|
|
17
|
-
setActiveRule:
|
|
18
|
-
setDataItem:
|
|
15
|
+
setView: R,
|
|
16
|
+
setActiveRule: z,
|
|
17
|
+
setDataItem: J,
|
|
19
18
|
setFirstCouponName: L,
|
|
20
19
|
setSecondCouponName: _,
|
|
21
|
-
setReplaceCoupon:
|
|
20
|
+
setReplaceCoupon: j,
|
|
22
21
|
setAlert: f,
|
|
23
22
|
setType: m,
|
|
24
|
-
setIsCloseModalEmpty:
|
|
23
|
+
setIsCloseModalEmpty: y,
|
|
25
24
|
genericTaggingEvent: o,
|
|
26
|
-
addCouponMutation:
|
|
27
|
-
removeCouponMutation:
|
|
25
|
+
addCouponMutation: S,
|
|
26
|
+
removeCouponMutation: i
|
|
28
27
|
}) => {
|
|
29
|
-
const [x, u] =
|
|
30
|
-
|
|
31
|
-
d.toLowerCase() !== a.couponName.toLowerCase() && u(!1), s && !d && s.toLowerCase() === a.couponName.toLowerCase() && u(!0), s && d && b && d.toLowerCase() === a.couponName.toLowerCase() &&
|
|
28
|
+
const [x, u] = V(!1), [k, w] = V(!1);
|
|
29
|
+
q(() => {
|
|
30
|
+
d.toLowerCase() !== a.couponName.toLowerCase() && u(!1), s && !d && s.toLowerCase() === a.couponName.toLowerCase() && u(!0), s && d && b && d.toLowerCase() === a.couponName.toLowerCase() && A(d);
|
|
32
31
|
}, [s, d, b]);
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
32
|
+
const A = async (l) => {
|
|
33
|
+
if (D)
|
|
35
34
|
try {
|
|
36
35
|
if (!s || s && b) {
|
|
37
36
|
w(!0);
|
|
38
|
-
const h = r ? await
|
|
37
|
+
const h = r ? await B(t, l) : await S({
|
|
39
38
|
input: {
|
|
40
39
|
orderFormId: t,
|
|
41
40
|
couponId: l
|
|
42
41
|
}
|
|
43
|
-
}),
|
|
44
|
-
|
|
42
|
+
}), N = r ? h : JSON.parse(h.addCoupon.data);
|
|
43
|
+
j(!1), L(l), _(""), N.error.length <= 0 ? (o == null || o("discount_coupon", {
|
|
45
44
|
name: "cupom aplicado",
|
|
46
45
|
cupomName: l
|
|
47
46
|
}), m("success"), u(!0), r && window.location.reload()) : (o == null || o("discount_coupon", {
|
|
48
47
|
name: "cupom aplicando - cupom incorreto ou expirado",
|
|
49
48
|
cupomName: l,
|
|
50
|
-
objectError:
|
|
49
|
+
objectError: N.error
|
|
51
50
|
}), m("error"), u(!1), L("")), f(!0);
|
|
52
51
|
} else
|
|
53
|
-
_(l),
|
|
52
|
+
_(l), R("overwrite-view");
|
|
54
53
|
} catch (h) {
|
|
55
54
|
o == null || o("discount_coupon", {
|
|
56
55
|
name: "problema na api",
|
|
@@ -62,12 +61,12 @@ const C = ({
|
|
|
62
61
|
else
|
|
63
62
|
o == null || o("discount_coupon", {
|
|
64
63
|
name: "Modal de cart vazio acionado"
|
|
65
|
-
}),
|
|
66
|
-
},
|
|
67
|
-
if (
|
|
64
|
+
}), y(!0);
|
|
65
|
+
}, M = async () => {
|
|
66
|
+
if (D)
|
|
68
67
|
try {
|
|
69
|
-
w(!0),
|
|
70
|
-
const l = r ? await
|
|
68
|
+
w(!0), j(!1);
|
|
69
|
+
const l = r ? await K(t) : await i({
|
|
71
70
|
input: {
|
|
72
71
|
orderFormId: t
|
|
73
72
|
}
|
|
@@ -91,14 +90,14 @@ const C = ({
|
|
|
91
90
|
else
|
|
92
91
|
o == null || o("discount_coupon", {
|
|
93
92
|
name: "Modal de cart vazio acionado"
|
|
94
|
-
}),
|
|
95
|
-
},
|
|
96
|
-
|
|
93
|
+
}), y(!0);
|
|
94
|
+
}, $ = () => {
|
|
95
|
+
z(!0), J(a), R("rules-view");
|
|
97
96
|
};
|
|
98
97
|
return /* @__PURE__ */ p("div", { className: `container-card-coupon ${x ? "active" : ""}`, children: [
|
|
99
98
|
/* @__PURE__ */ p("div", { className: "text-container", children: [
|
|
100
99
|
/* @__PURE__ */ p("div", { className: "container-title", children: [
|
|
101
|
-
/* @__PURE__ */ c(
|
|
100
|
+
/* @__PURE__ */ c(G, { width: 20, height: 16 }),
|
|
102
101
|
/* @__PURE__ */ c("h3", { className: "title", children: a.couponName })
|
|
103
102
|
] }),
|
|
104
103
|
a.couponValue && /* @__PURE__ */ p("p", { className: "price-badge", children: [
|
|
@@ -114,30 +113,30 @@ const C = ({
|
|
|
114
113
|
/* @__PURE__ */ c("div", { className: "vertical-line" }),
|
|
115
114
|
/* @__PURE__ */ p("div", { className: "buttons-container", children: [
|
|
116
115
|
x && /* @__PURE__ */ p("button", { className: "applied-coupon", children: [
|
|
117
|
-
/* @__PURE__ */ c("span", { className: "applied-coupon-span", children: /* @__PURE__ */ c(
|
|
116
|
+
/* @__PURE__ */ c("span", { className: "applied-coupon-span", children: /* @__PURE__ */ c(H, {}) }),
|
|
118
117
|
"Aplicado"
|
|
119
118
|
] }),
|
|
120
119
|
x ? /* @__PURE__ */ c(
|
|
121
120
|
"button",
|
|
122
121
|
{
|
|
123
|
-
onClick:
|
|
122
|
+
onClick: M,
|
|
124
123
|
className: "remove-coupon",
|
|
125
|
-
disabled:
|
|
124
|
+
disabled: k,
|
|
126
125
|
children: "Remover"
|
|
127
126
|
}
|
|
128
127
|
) : /* @__PURE__ */ c(
|
|
129
128
|
"button",
|
|
130
129
|
{
|
|
131
|
-
onClick: () =>
|
|
130
|
+
onClick: () => A(a.couponName),
|
|
132
131
|
className: "apply-coupon",
|
|
133
|
-
disabled:
|
|
132
|
+
disabled: k,
|
|
134
133
|
children: "Aplicar"
|
|
135
134
|
}
|
|
136
135
|
),
|
|
137
|
-
a.couponDescription && /* @__PURE__ */ c("a", { onClick:
|
|
136
|
+
a.couponDescription && /* @__PURE__ */ c("a", { onClick: $, children: "Ver Regras" })
|
|
138
137
|
] })
|
|
139
138
|
] });
|
|
140
139
|
};
|
|
141
140
|
export {
|
|
142
|
-
|
|
141
|
+
Z as CouponCard
|
|
143
142
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, Fragment as S, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l, useEffect as Q } from "react";
|
|
3
3
|
import { ModalHeader as R } from "../components/ModalHeader.js";
|
|
4
4
|
import { ModalFooter as U } from "../components/ModalFooter.js";
|
|
@@ -9,60 +9,60 @@ import { InfoIcon as Y } from "../../../assets/svgs/InfoIcon.js";
|
|
|
9
9
|
import { addCoupon as Z } from "../api/addCoupon.js";
|
|
10
10
|
const to = ({
|
|
11
11
|
addCouponMutation: w,
|
|
12
|
-
removeCouponMutation:
|
|
13
|
-
account:
|
|
14
|
-
orderFormId:
|
|
15
|
-
hasItemsInCart:
|
|
12
|
+
removeCouponMutation: _,
|
|
13
|
+
account: D,
|
|
14
|
+
orderFormId: d,
|
|
15
|
+
hasItemsInCart: x,
|
|
16
16
|
isIO: p,
|
|
17
17
|
closeIOModal: s,
|
|
18
18
|
coupons: n,
|
|
19
19
|
firstCouponName: i,
|
|
20
20
|
secondCouponName: L,
|
|
21
|
-
replaceCoupon:
|
|
22
|
-
setView:
|
|
21
|
+
replaceCoupon: C,
|
|
22
|
+
setView: A,
|
|
23
23
|
setActiveRule: q,
|
|
24
24
|
setDataItem: H,
|
|
25
25
|
setFirstCouponName: m,
|
|
26
26
|
setSecondCouponName: f,
|
|
27
|
-
setReplaceCoupon:
|
|
27
|
+
setReplaceCoupon: B,
|
|
28
28
|
setIsCloseModalEmpty: J,
|
|
29
29
|
genericTaggingEvent: t
|
|
30
30
|
}) => {
|
|
31
|
-
const [r, P] = l(""), [k,
|
|
31
|
+
const [r, P] = l(""), [k, N] = l(!1), [z, u] = l(""), [h, e] = l(!1), [G, y] = l(!1), K = (a) => {
|
|
32
32
|
a.preventDefault(), P(a.target.value);
|
|
33
33
|
}, M = async (a) => {
|
|
34
34
|
a.preventDefault();
|
|
35
35
|
try {
|
|
36
|
-
if (!i || i &&
|
|
37
|
-
|
|
38
|
-
const b = p ? await Z(
|
|
36
|
+
if (!i || i && C) {
|
|
37
|
+
N(!0);
|
|
38
|
+
const b = p ? await Z(d, r) : await w({
|
|
39
39
|
input: {
|
|
40
|
-
orderFormId:
|
|
40
|
+
orderFormId: d,
|
|
41
41
|
couponId: r
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
44
|
-
|
|
43
|
+
}), j = p ? b : JSON.parse(b.addCoupon.data);
|
|
44
|
+
B(!1), f(""), j.error.length <= 0 ? (t == null || t("discount_coupon", {
|
|
45
45
|
name: "Cupom aplicado do input",
|
|
46
46
|
couponName: r
|
|
47
47
|
}), u("success"), y(!0), m(r), p && window.location.reload()) : (t == null || t("discount_coupon", {
|
|
48
48
|
name: "Cupom do input expirado ou invalido",
|
|
49
49
|
couponName: r,
|
|
50
|
-
objectError:
|
|
50
|
+
objectError: j.error
|
|
51
51
|
}), u("error"), y(!1), m("")), e(!0);
|
|
52
52
|
} else
|
|
53
|
-
f(r),
|
|
53
|
+
f(r), A("overwrite-view");
|
|
54
54
|
} catch (b) {
|
|
55
55
|
t == null || t("discount_coupon", {
|
|
56
56
|
name: "Cupom do input - error na api",
|
|
57
57
|
couponName: r
|
|
58
58
|
}), u("error"), y(!1), e(!0);
|
|
59
59
|
} finally {
|
|
60
|
-
|
|
60
|
+
N(!1);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
return Q(() => {
|
|
64
64
|
h && setTimeout(() => e(!1), 5e3);
|
|
65
|
-
}, [G, h]), /* @__PURE__ */
|
|
65
|
+
}, [G, h]), /* @__PURE__ */ c(S, { children: [
|
|
66
66
|
p && s && /* @__PURE__ */ o(
|
|
67
67
|
R,
|
|
68
68
|
{
|
|
@@ -71,7 +71,7 @@ const to = ({
|
|
|
71
71
|
genericTaggingEvent: t
|
|
72
72
|
}
|
|
73
73
|
),
|
|
74
|
-
|
|
74
|
+
x ? /* @__PURE__ */ o("div", { className: "form-coupons", children: /* @__PURE__ */ c("form", { onSubmit: M, children: [
|
|
75
75
|
/* @__PURE__ */ o(
|
|
76
76
|
"input",
|
|
77
77
|
{
|
|
@@ -82,31 +82,31 @@ const to = ({
|
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
84
|
/* @__PURE__ */ o("button", { type: "submit", name: "adicionar", disabled: k, children: "Adicionar" })
|
|
85
|
-
] }) }) : /* @__PURE__ */ o("div", { className: "cart-empty-coupons-label", children: /* @__PURE__ */
|
|
85
|
+
] }) }) : /* @__PURE__ */ o("div", { className: "cart-empty-coupons-label", children: /* @__PURE__ */ c("p", { children: [
|
|
86
86
|
/* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(Y, {}) }),
|
|
87
87
|
"Para adicionar um cupom é necessário que você adicione pelo menos 1 produto no carrinho"
|
|
88
88
|
] }) }),
|
|
89
|
-
/* @__PURE__ */ o("div", { className: "container-title-coupons", children: n.length > 0 ? /* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ o("div", { className: "container-title-coupons", children: n.length > 0 ? /* @__PURE__ */ c(S, { children: [
|
|
90
90
|
/* @__PURE__ */ o("h2", { children: "Cupons disponíveis" }),
|
|
91
91
|
/* @__PURE__ */ o("div", { className: "container-coupons", children: n.map((a) => /* @__PURE__ */ o(
|
|
92
92
|
V,
|
|
93
93
|
{
|
|
94
|
-
removeCouponMutation:
|
|
94
|
+
removeCouponMutation: _,
|
|
95
95
|
addCouponMutation: w,
|
|
96
|
-
account:
|
|
97
|
-
orderFormId:
|
|
98
|
-
hasItemsInCart:
|
|
96
|
+
account: D,
|
|
97
|
+
orderFormId: d,
|
|
98
|
+
hasItemsInCart: x,
|
|
99
99
|
isIO: p,
|
|
100
100
|
item: a,
|
|
101
101
|
firstCouponName: i,
|
|
102
102
|
secondCouponName: L,
|
|
103
|
-
replaceCoupon:
|
|
104
|
-
setView:
|
|
103
|
+
replaceCoupon: C,
|
|
104
|
+
setView: A,
|
|
105
105
|
setFirstCouponName: m,
|
|
106
106
|
setSecondCouponName: f,
|
|
107
107
|
setActiveRule: q,
|
|
108
108
|
setDataItem: H,
|
|
109
|
-
setReplaceCoupon:
|
|
109
|
+
setReplaceCoupon: B,
|
|
110
110
|
setAlert: e,
|
|
111
111
|
setType: u,
|
|
112
112
|
setIsCloseModalEmpty: J,
|
|
@@ -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-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%;&::-webkit-scrollbar{width:4px;background-color:var(--color-main-faded)}&::-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-no-similar-products{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.no-similar-title{font-size:14px;line-height:18px;font-weight:700;color:var(--color-grayScale);margin-bottom:16px;margin-top:16px}.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
|
+
.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%;&::-webkit-scrollbar{width:4px;background-color:var(--color-main-faded)}&::-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-no-similar-products{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.no-similar-title{font-size:14px;line-height:18px;font-weight:700;color:var(--color-grayScale);margin-bottom:16px;margin-top:16px}.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 .change-order-moda-footer .change-order-save-buttom:disabled{background-color:var(--color-grayScale-lightest);color:var(--color-grayScale-dark);cursor:not-allowed}.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}}
|