contentoh-components-library 21.4.63 → 21.4.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Avatar/index.js +3 -2
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/BoxAttribute/index.js +3 -3
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +0 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +68 -11
- package/dist/components/molecules/SignInLogin/index.js +36 -28
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/DashboardMetric/index.js +12 -6
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +1 -10
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/Dashboard/Dashboard.stories.js +33 -36
- package/dist/components/pages/Dashboard/index.js +34 -8
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +3 -3
- package/dist/components/pages/ProviderProductEdition/index.js +120 -144
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +7 -3
- package/dist/components/pages/RetailerProductEdition/index.js +279 -277
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/global-files/data.js +11 -3
- package/dist/global-files/variables.js +5 -1
- package/dist/index.js +201 -58
- package/package.json +2 -1
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/CheckBox/styles.js +2 -0
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- package/src/components/atoms/InputFormatter/styles.js +2 -1
- package/src/components/atoms/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -0
- package/src/components/atoms/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -0
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/TabSection/styles.js +1 -1
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -0
- package/src/components/molecules/BoxAttribute/index.js +32 -25
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +23 -22
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -0
- package/src/components/molecules/GridItem/styles.js +104 -0
- package/src/components/molecules/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -0
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/src/components/molecules/TagAndInput/index.js +6 -5
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/DashboardMetric/index.js +6 -3
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/GridProducts/GridProducts.stories.js +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/InputGroup/index.js +131 -119
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/pages/Dashboard/Dashboard.stories.js +33 -38
- package/src/components/pages/Dashboard/index.js +31 -5
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +100 -83
- package/src/components/pages/ProviderProductEdition/index.js +100 -131
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +6 -2
- package/src/components/pages/RetailerProductEdition/index.js +114 -145
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/global-files/data.js +7 -13
- package/src/global-files/variables.js +4 -0
- package/src/index.js +11 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { GridItem } from "../../molecules/GridItem";
|
|
3
|
+
import { HeaderItem } from "../../molecules/HeaderItem";
|
|
4
|
+
import { RowItem } from "../../molecules/RowItem";
|
|
5
|
+
|
|
6
|
+
export const GridProducts = ({
|
|
7
|
+
products = [],
|
|
8
|
+
columnsArray = [],
|
|
9
|
+
gridView = true,
|
|
10
|
+
chkOnChange,
|
|
11
|
+
selected = [],
|
|
12
|
+
chkChecked,
|
|
13
|
+
checkAll,
|
|
14
|
+
chkCheckedAll,
|
|
15
|
+
onGridClick,
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<Container>
|
|
19
|
+
{!gridView ? (
|
|
20
|
+
products?.map(({ gridElement, product, id }, i) => (
|
|
21
|
+
<GridItem
|
|
22
|
+
key={i}
|
|
23
|
+
id={id}
|
|
24
|
+
index={i}
|
|
25
|
+
product={product}
|
|
26
|
+
gridElement={gridElement}
|
|
27
|
+
chkOnChange={chkOnChange}
|
|
28
|
+
onGridClick={onGridClick}
|
|
29
|
+
selected={selected}
|
|
30
|
+
chkChecked={chkChecked}
|
|
31
|
+
/>
|
|
32
|
+
))
|
|
33
|
+
) : (
|
|
34
|
+
<div className="table-view">
|
|
35
|
+
<HeaderItem
|
|
36
|
+
columnsArray={columnsArray}
|
|
37
|
+
checkAll={checkAll}
|
|
38
|
+
chkCheckedAll={chkCheckedAll}
|
|
39
|
+
/>
|
|
40
|
+
<RowItem
|
|
41
|
+
productsArray={products}
|
|
42
|
+
chkOnChange={chkOnChange}
|
|
43
|
+
onGridClick={onGridClick}
|
|
44
|
+
chkChecked={chkChecked}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
</Container>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { RetailerCatalog } from "../../atoms/RetailerCatalog";
|
|
2
|
+
import { UserCatalog } from "../../atoms/UserCatalog";
|
|
3
|
+
|
|
4
|
+
export const getProductsToTable = (
|
|
5
|
+
products = [],
|
|
6
|
+
textSpecialists,
|
|
7
|
+
imagesSpecialists,
|
|
8
|
+
auditors,
|
|
9
|
+
images,
|
|
10
|
+
onAssign
|
|
11
|
+
) => {
|
|
12
|
+
const productsTableArray = [];
|
|
13
|
+
|
|
14
|
+
products.forEach((product) => {
|
|
15
|
+
const { article, orderId, upc, status, version } = product;
|
|
16
|
+
const id = article?.id_article + "-" + orderId;
|
|
17
|
+
const imgArray = images[article?.id_article + "-" + version];
|
|
18
|
+
const element = {
|
|
19
|
+
id,
|
|
20
|
+
cols: [
|
|
21
|
+
{ name: article?.country || "-", flex: 1, minWidth: 100 },
|
|
22
|
+
{ name: orderId || "-", flex: 1, minWidth: 100 },
|
|
23
|
+
{ name: upc || "-", flex: 1, minWidth: 100 },
|
|
24
|
+
{ name: article?.name || "-", flex: 1, minWidth: 200 },
|
|
25
|
+
{ name: "S/M" || "-", flex: 1, minWidth: 100 },
|
|
26
|
+
{ name: status || "-", flex: 1, minWidth: 100 },
|
|
27
|
+
{
|
|
28
|
+
name: (
|
|
29
|
+
<RetailerCatalog
|
|
30
|
+
id={"retailers-" + id}
|
|
31
|
+
article={product}
|
|
32
|
+
retailers={product.retailers}
|
|
33
|
+
/>
|
|
34
|
+
),
|
|
35
|
+
flex: 1,
|
|
36
|
+
minWidth: 100,
|
|
37
|
+
},
|
|
38
|
+
{ name: product.prio, flex: 1, minWidth: 100 },
|
|
39
|
+
{
|
|
40
|
+
name: (
|
|
41
|
+
<UserCatalog
|
|
42
|
+
datasheet={article.id_datasheet_especialist}
|
|
43
|
+
description={article.id_description_especialist}
|
|
44
|
+
images={article.id_images_especialist}
|
|
45
|
+
auditor={article.id_auditor}
|
|
46
|
+
textSpecialists={textSpecialists}
|
|
47
|
+
imagesSpecialists={imagesSpecialists}
|
|
48
|
+
auditors={auditors}
|
|
49
|
+
id={"users-" + id}
|
|
50
|
+
product={product}
|
|
51
|
+
onAssign={onAssign}
|
|
52
|
+
/>
|
|
53
|
+
),
|
|
54
|
+
flex: 1,
|
|
55
|
+
minWidth: 100,
|
|
56
|
+
},
|
|
57
|
+
{ name: "Cont.", flex: 1, minWidth: 100 },
|
|
58
|
+
],
|
|
59
|
+
gridElement: {
|
|
60
|
+
images: imgArray,
|
|
61
|
+
info: [
|
|
62
|
+
{ title: "name", value: article?.name || "-" },
|
|
63
|
+
{ title: "order", value: orderId || "-" },
|
|
64
|
+
{ title: "category", value: article?.category || "-" },
|
|
65
|
+
{ title: "company", value: article?.company_name || "-" },
|
|
66
|
+
{ title: "price", value: article?.price || "-" },
|
|
67
|
+
],
|
|
68
|
+
status: [
|
|
69
|
+
{ title: "datasheet", value: product?.datasheet_status, percent: 80 },
|
|
70
|
+
{
|
|
71
|
+
title: "description",
|
|
72
|
+
value: product?.description_status,
|
|
73
|
+
percent: 80,
|
|
74
|
+
},
|
|
75
|
+
{ title: "images", value: product?.images_status, percent: 80 },
|
|
76
|
+
],
|
|
77
|
+
catalogs: {
|
|
78
|
+
leftSide: (
|
|
79
|
+
<RetailerCatalog
|
|
80
|
+
id={"retailers-" + id}
|
|
81
|
+
limit={2}
|
|
82
|
+
article={product}
|
|
83
|
+
retailers={product.retailers}
|
|
84
|
+
/>
|
|
85
|
+
),
|
|
86
|
+
rightSide: (
|
|
87
|
+
<UserCatalog
|
|
88
|
+
datasheet={article.id_datasheet_especialist}
|
|
89
|
+
description={article.id_description_especialist}
|
|
90
|
+
images={article.id_images_especialist}
|
|
91
|
+
auditor={article.id_auditor}
|
|
92
|
+
textSpecialists={textSpecialists}
|
|
93
|
+
imagesSpecialists={imagesSpecialists}
|
|
94
|
+
auditors={auditors}
|
|
95
|
+
id={"users-" + id}
|
|
96
|
+
product={product}
|
|
97
|
+
onAssign={onAssign}
|
|
98
|
+
/>
|
|
99
|
+
),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
showBottom: true,
|
|
103
|
+
product,
|
|
104
|
+
article,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
productsTableArray.push(element);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return productsTableArray;
|
|
111
|
+
};
|
|
@@ -21,7 +21,7 @@ export const InputGroup = ({
|
|
|
21
21
|
compare,
|
|
22
22
|
groupData = [],
|
|
23
23
|
setUpdatedBoxData,
|
|
24
|
-
activeRetailer
|
|
24
|
+
activeRetailer,
|
|
25
25
|
}) => {
|
|
26
26
|
const inputTypeValue = (type) => {
|
|
27
27
|
switch (type) {
|
|
@@ -41,7 +41,11 @@ export const InputGroup = ({
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
useEffect(() => {
|
|
44
|
-
if (
|
|
44
|
+
if (
|
|
45
|
+
inputGroup.groupId === "16" &&
|
|
46
|
+
activeRetailer &&
|
|
47
|
+
activeRetailer?.retailer?.id
|
|
48
|
+
) {
|
|
45
49
|
if (activeRetailer?.retailer?.id === 68) {
|
|
46
50
|
setShowBox(true);
|
|
47
51
|
} else {
|
|
@@ -50,127 +54,127 @@ export const InputGroup = ({
|
|
|
50
54
|
}
|
|
51
55
|
}, [activeRetailer, inputGroup.groupId]);
|
|
52
56
|
|
|
53
|
-
// useEffect(() => {
|
|
54
|
-
// if (showBox) {
|
|
55
|
-
// // Realiza la acción que deseas cuando showBox es true
|
|
56
|
-
// console.log("showBox es true");
|
|
57
|
-
// } else {
|
|
58
|
-
// // Realiza la acción que deseas cuando showBox es false
|
|
59
|
-
// console.log("showBox es false");
|
|
60
|
-
// }
|
|
61
|
-
// }, [showBox]);
|
|
62
|
-
|
|
63
57
|
return (
|
|
64
58
|
<>
|
|
65
59
|
{inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 68 && (
|
|
66
60
|
<Container
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/>
|
|
78
|
-
</Container>
|
|
79
|
-
)}
|
|
80
|
-
{(inputGroup.groupId !== "16") && (
|
|
81
|
-
<Container
|
|
82
|
-
className={
|
|
83
|
-
activeSection === "Ficha técnica"
|
|
84
|
-
? "datasheets-layout"
|
|
85
|
-
: "descriptions-layout"
|
|
86
|
-
}
|
|
87
|
-
>
|
|
88
|
-
{inputGroup?.dataGroup && (
|
|
89
|
-
<ScreenHeader
|
|
90
|
-
headerType={"retailer-name-header"}
|
|
91
|
-
text={`${inputGroup?.dataGroup}`}
|
|
61
|
+
className={
|
|
62
|
+
activeSection === "Ficha técnica"
|
|
63
|
+
? "datasheets-layout"
|
|
64
|
+
: "descriptions-layout"
|
|
65
|
+
}
|
|
66
|
+
>
|
|
67
|
+
<Box
|
|
68
|
+
inputGroup={inputGroup}
|
|
69
|
+
dataInputs={dataInputs}
|
|
70
|
+
onChange={setUpdatedBoxData}
|
|
92
71
|
/>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
//disabled={input === 40001}
|
|
109
|
-
disabled={false}
|
|
110
|
-
inputId={dataInputs[input]?.id}
|
|
111
|
-
version={version}
|
|
112
|
-
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
113
|
-
label={
|
|
114
|
-
dataInputs[input]?.name +
|
|
115
|
-
(dataInputs[input]?.required ? "*" : "")
|
|
116
|
-
}
|
|
117
|
-
value={
|
|
118
|
-
compare ? auditInputs[input]?.value : dataInputs[input]?.value
|
|
119
|
-
}
|
|
120
|
-
inputPlaceHolder={input?.placeholder}
|
|
121
|
-
articleId={articleId}
|
|
122
|
-
isRequired={dataInputs[input]?.required}
|
|
123
|
-
updatedDatasheets={updatedDatasheets}
|
|
124
|
-
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
125
|
-
maxChar={
|
|
126
|
-
dataInputs[input]?.max_chars
|
|
127
|
-
? dataInputs[input]?.max_chars
|
|
128
|
-
: 999
|
|
129
|
-
}
|
|
130
|
-
optionList={dataInputs[input]?.option_list}
|
|
131
|
-
description={dataInputs[input]?.description}
|
|
132
|
-
showTooltip={true}
|
|
133
|
-
auditClass={
|
|
134
|
-
compare &&
|
|
135
|
-
!isEquals(dataInputs[input].value, auditInputs[input].value)
|
|
136
|
-
? "audit-class"
|
|
137
|
-
: ""
|
|
138
|
-
}
|
|
139
|
-
/>
|
|
140
|
-
</>
|
|
141
|
-
) : (
|
|
142
|
-
<TagAndInput
|
|
143
|
-
key={index + "-" + input?.value + "-" + compare}
|
|
144
|
-
inputId={input.id}
|
|
145
|
-
index={index}
|
|
146
|
-
inputType={"textarea"}
|
|
147
|
-
label={input?.name + (input.required ? "*" : "")}
|
|
148
|
-
value={
|
|
149
|
-
compare ? auditInputGroup?.inputs[index]?.value : input?.value
|
|
150
|
-
}
|
|
151
|
-
isRequired={input.required}
|
|
152
|
-
maxChar={input.max_chars}
|
|
153
|
-
inputPlaceHolder={input?.placeholder}
|
|
154
|
-
updatedDescriptions={updatedDescriptions}
|
|
155
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
156
|
-
articleId={articleId}
|
|
157
|
-
version={version}
|
|
158
|
-
dinamicHeight={dinamicHeight}
|
|
159
|
-
description={input?.description}
|
|
160
|
-
showTooltip={true}
|
|
161
|
-
auditClass={
|
|
162
|
-
compare &&
|
|
163
|
-
!isEquals(input?.value, auditInputGroup?.inputs[index]?.value)
|
|
164
|
-
? "audit-class"
|
|
165
|
-
: ""
|
|
166
|
-
}
|
|
167
|
-
/>
|
|
168
|
-
)
|
|
72
|
+
</Container>
|
|
73
|
+
)}
|
|
74
|
+
{inputGroup.groupId !== "16" && (
|
|
75
|
+
<Container
|
|
76
|
+
className={
|
|
77
|
+
activeSection === "Ficha técnica"
|
|
78
|
+
? "datasheets-layout"
|
|
79
|
+
: "descriptions-layout"
|
|
80
|
+
}
|
|
81
|
+
>
|
|
82
|
+
{inputGroup?.dataGroup && (
|
|
83
|
+
<ScreenHeader
|
|
84
|
+
headerType={"retailer-name-header"}
|
|
85
|
+
text={`${inputGroup?.dataGroup}`}
|
|
86
|
+
/>
|
|
169
87
|
)}
|
|
170
|
-
|
|
171
|
-
|
|
88
|
+
<div className="inputs-container">
|
|
89
|
+
{inputGroup?.inputs?.map((input, index) =>
|
|
90
|
+
activeSection === "Ficha técnica" ? (
|
|
91
|
+
<>
|
|
92
|
+
<TagAndInput
|
|
93
|
+
key={
|
|
94
|
+
index +
|
|
95
|
+
"-" +
|
|
96
|
+
dataInputs[input]?.value +
|
|
97
|
+
"-" +
|
|
98
|
+
dataInputs[input]?.id +
|
|
99
|
+
"-" +
|
|
100
|
+
compare
|
|
101
|
+
}
|
|
102
|
+
//disabled={input === 40001}
|
|
103
|
+
disabled={false}
|
|
104
|
+
inputId={dataInputs[input]?.id}
|
|
105
|
+
version={version}
|
|
106
|
+
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
107
|
+
label={
|
|
108
|
+
dataInputs[input]?.name +
|
|
109
|
+
(dataInputs[input]?.required ? "*" : "")
|
|
110
|
+
}
|
|
111
|
+
value={
|
|
112
|
+
compare
|
|
113
|
+
? auditInputs[input]?.value
|
|
114
|
+
: dataInputs[input]?.value
|
|
115
|
+
}
|
|
116
|
+
inputPlaceHolder={input?.placeholder}
|
|
117
|
+
articleId={articleId}
|
|
118
|
+
isRequired={dataInputs[input]?.required}
|
|
119
|
+
updatedDatasheets={updatedDatasheets}
|
|
120
|
+
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
121
|
+
maxChar={
|
|
122
|
+
dataInputs[input]?.max_chars
|
|
123
|
+
? dataInputs[input]?.max_chars
|
|
124
|
+
: 999
|
|
125
|
+
}
|
|
126
|
+
optionList={dataInputs[input]?.option_list}
|
|
127
|
+
description={dataInputs[input]?.description}
|
|
128
|
+
showTooltip={true}
|
|
129
|
+
auditClass={
|
|
130
|
+
compare &&
|
|
131
|
+
!isEquals(
|
|
132
|
+
dataInputs[input].value,
|
|
133
|
+
auditInputs[input].value
|
|
134
|
+
)
|
|
135
|
+
? "audit-class"
|
|
136
|
+
: ""
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
139
|
+
</>
|
|
140
|
+
) : (
|
|
141
|
+
<TagAndInput
|
|
142
|
+
key={index + "-" + input?.value + "-" + compare}
|
|
143
|
+
inputId={input.id}
|
|
144
|
+
index={index}
|
|
145
|
+
inputType={"textarea"}
|
|
146
|
+
label={input?.name + (input.required ? "*" : "")}
|
|
147
|
+
value={
|
|
148
|
+
compare
|
|
149
|
+
? auditInputGroup?.inputs[index]?.value
|
|
150
|
+
: input?.value
|
|
151
|
+
}
|
|
152
|
+
isRequired={input.required}
|
|
153
|
+
maxChar={input.max_chars}
|
|
154
|
+
inputPlaceHolder={input?.placeholder}
|
|
155
|
+
updatedDescriptions={updatedDescriptions}
|
|
156
|
+
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
157
|
+
articleId={articleId}
|
|
158
|
+
version={version}
|
|
159
|
+
dinamicHeight={dinamicHeight}
|
|
160
|
+
description={input?.description}
|
|
161
|
+
showTooltip={true}
|
|
162
|
+
auditClass={
|
|
163
|
+
compare &&
|
|
164
|
+
!isEquals(
|
|
165
|
+
input?.value,
|
|
166
|
+
auditInputGroup?.inputs[index]?.value
|
|
167
|
+
)
|
|
168
|
+
? "audit-class"
|
|
169
|
+
: ""
|
|
170
|
+
}
|
|
171
|
+
/>
|
|
172
|
+
)
|
|
173
|
+
)}
|
|
174
|
+
</div>
|
|
175
|
+
</Container>
|
|
172
176
|
)}
|
|
173
|
-
|
|
177
|
+
{inputGroup.groupId === "16" && activeRetailer?.retailer?.id === 74 && (
|
|
174
178
|
<Container
|
|
175
179
|
className={
|
|
176
180
|
activeSection === "Ficha técnica"
|
|
@@ -230,7 +234,10 @@ export const InputGroup = ({
|
|
|
230
234
|
onChange={setUpdatedBoxData}
|
|
231
235
|
auditClass={
|
|
232
236
|
compare &&
|
|
233
|
-
!isEquals(
|
|
237
|
+
!isEquals(
|
|
238
|
+
dataInputs[input].value,
|
|
239
|
+
auditInputs[input].value
|
|
240
|
+
)
|
|
234
241
|
? "audit-class"
|
|
235
242
|
: ""
|
|
236
243
|
}
|
|
@@ -244,7 +251,9 @@ export const InputGroup = ({
|
|
|
244
251
|
inputType={"textarea"}
|
|
245
252
|
label={input?.name + (input.required ? "*" : "")}
|
|
246
253
|
value={
|
|
247
|
-
compare
|
|
254
|
+
compare
|
|
255
|
+
? auditInputGroup?.inputs[index]?.value
|
|
256
|
+
: input?.value
|
|
248
257
|
}
|
|
249
258
|
isRequired={input.required}
|
|
250
259
|
maxChar={input.max_chars}
|
|
@@ -258,7 +267,10 @@ export const InputGroup = ({
|
|
|
258
267
|
showTooltip={true}
|
|
259
268
|
auditClass={
|
|
260
269
|
compare &&
|
|
261
|
-
!isEquals(
|
|
270
|
+
!isEquals(
|
|
271
|
+
input?.value,
|
|
272
|
+
auditInputGroup?.inputs[index]?.value
|
|
273
|
+
)
|
|
262
274
|
? "audit-class"
|
|
263
275
|
: ""
|
|
264
276
|
}
|
|
@@ -31,7 +31,6 @@ export const ContainerModal = styled.div`
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: flex-start;
|
|
33
33
|
gap: 6px;
|
|
34
|
-
margin-bottom: 20px;
|
|
35
34
|
|
|
36
35
|
.label-title {
|
|
37
36
|
width: 100%;
|
|
@@ -42,6 +41,10 @@ export const ContainerModal = styled.div`
|
|
|
42
41
|
color: #262626;
|
|
43
42
|
white-space: pre-wrap;
|
|
44
43
|
}
|
|
44
|
+
|
|
45
|
+
& + * {
|
|
46
|
+
margin-top: 20px;
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
.iconModal {
|
|
@@ -1,41 +1,31 @@
|
|
|
1
1
|
export const servicesCodeIcon = {
|
|
2
2
|
datasheet: (
|
|
3
3
|
<div key="datasheet" className="tooltip">
|
|
4
|
-
<span className="material-icons small">
|
|
5
|
-

|
|
6
|
-
</span>
|
|
4
|
+
<span className="material-icons small"></span>
|
|
7
5
|
<span className="tooltiptext">Ficha Técnica</span>
|
|
8
6
|
</div>
|
|
9
7
|
),
|
|
10
8
|
description: (
|
|
11
9
|
<div key="description" className="tooltip">
|
|
12
|
-
<span className="material-icons small">
|
|
13
|
-

|
|
14
|
-
</span>
|
|
10
|
+
<span className="material-icons small"></span>
|
|
15
11
|
<span className="tooltiptext">Descripción</span>
|
|
16
12
|
</div>
|
|
17
13
|
),
|
|
18
14
|
image: (
|
|
19
15
|
<div key="image" className="tooltip">
|
|
20
|
-
<span className="material-icons small">
|
|
21
|
-

|
|
22
|
-
</span>
|
|
16
|
+
<span className="material-icons small"></span>
|
|
23
17
|
<span className="tooltiptext">Imagen</span>
|
|
24
18
|
</div>
|
|
25
19
|
),
|
|
26
20
|
translate: (
|
|
27
21
|
<div key="translate" className="tooltip">
|
|
28
|
-
<span className="material-icons small">
|
|
29
|
-

|
|
30
|
-
</span>
|
|
22
|
+
<span className="material-icons small"></span>
|
|
31
23
|
<span className="tooltiptext">Traducción</span>
|
|
32
24
|
</div>
|
|
33
25
|
),
|
|
34
26
|
build: (
|
|
35
|
-
<div key="build"
|
|
36
|
-
<span className="material-icons small">
|
|
37
|
-

|
|
38
|
-
</span>
|
|
27
|
+
<div key="build" className="tooltip">
|
|
28
|
+
<span className="material-icons small"></span>
|
|
39
29
|
<span className="tooltiptext">Construcción</span>
|
|
40
30
|
</div>
|
|
41
31
|
),
|
|
@@ -9,59 +9,54 @@ const Template = (args) => <Dashboard {...args} />;
|
|
|
9
9
|
export const DashboardDeafult = Template.bind({});
|
|
10
10
|
DashboardDeafult.args = {
|
|
11
11
|
user: {
|
|
12
|
-
id_user:
|
|
13
|
-
name: "
|
|
14
|
-
last_name: "
|
|
15
|
-
email: "
|
|
16
|
-
position: "
|
|
17
|
-
telephone: "",
|
|
12
|
+
id_user: 343,
|
|
13
|
+
name: "Jair",
|
|
14
|
+
last_name: "León",
|
|
15
|
+
email: "hleon@contentoh.com",
|
|
16
|
+
position: "Test States",
|
|
17
|
+
telephone: "+525555555555",
|
|
18
18
|
country: "México",
|
|
19
|
-
id_company:
|
|
20
|
-
id_cognito: "
|
|
19
|
+
id_company: 234,
|
|
20
|
+
id_cognito: "4512b5a5-366a-4bb5-916e-aafe05402992",
|
|
21
21
|
birth_Date: null,
|
|
22
22
|
about_me: "",
|
|
23
23
|
zip_code: "",
|
|
24
24
|
address: "",
|
|
25
25
|
job: "",
|
|
26
|
-
id_stripe: "",
|
|
27
|
-
id_role:
|
|
26
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
27
|
+
id_role: 0,
|
|
28
28
|
active: 1,
|
|
29
29
|
is_retailer: 0,
|
|
30
|
-
email_notify:
|
|
31
|
-
is_user_tech:
|
|
30
|
+
email_notify: 0,
|
|
31
|
+
is_user_tech: "ADMIN-AS",
|
|
32
32
|
membership: {
|
|
33
|
-
id:
|
|
34
|
-
start_date: "
|
|
35
|
-
end_date: "
|
|
36
|
-
planID:
|
|
37
|
-
plan: "
|
|
38
|
-
name: "Plan
|
|
39
|
-
user_limit: "
|
|
40
|
-
products_limit: "
|
|
41
|
-
type: "
|
|
33
|
+
id: 139,
|
|
34
|
+
start_date: "2023-10-04T15:46:14.000Z",
|
|
35
|
+
end_date: "2024-10-04T08:46:09.000Z",
|
|
36
|
+
planID: 9,
|
|
37
|
+
plan: "prod_KtlkzZVGq6bRTO",
|
|
38
|
+
name: "Plan Enterprise Full",
|
|
39
|
+
user_limit: "30",
|
|
40
|
+
products_limit: "10000",
|
|
41
|
+
type: "Enterprise",
|
|
42
42
|
},
|
|
43
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
43
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-343/343.png?1699640943284",
|
|
44
44
|
},
|
|
45
45
|
company: {
|
|
46
|
-
id_company:
|
|
47
|
-
trade_name: "
|
|
48
|
-
company_name: "
|
|
46
|
+
id_company: 234,
|
|
47
|
+
trade_name: "L'ORÉAL",
|
|
48
|
+
company_name: "L'ORÉAL",
|
|
49
49
|
rfc: "XAXX010101000",
|
|
50
50
|
adress: "AA",
|
|
51
|
-
about_company: "",
|
|
52
|
-
telephone: "",
|
|
53
|
-
web_site: "",
|
|
54
|
-
zip_code: "",
|
|
51
|
+
about_company: " ",
|
|
52
|
+
telephone: " ",
|
|
53
|
+
web_site: " ",
|
|
54
|
+
zip_code: " ",
|
|
55
55
|
email: null,
|
|
56
|
-
social_link: "",
|
|
56
|
+
social_link: " ",
|
|
57
57
|
is_retailer: 0,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
id: null,
|
|
61
|
-
name: null,
|
|
62
|
-
country: null,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
58
|
+
financedRetailers: [],
|
|
59
|
+
retailers: [],
|
|
65
60
|
},
|
|
66
|
-
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
61
|
+
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI0NTEyYjVhNS0zNjZhLTRiYjUtOTE2ZS1hYWZlMDU0MDI5OTIiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjQ1MTJiNWE1LTM2NmEtNGJiNS05MTZlLWFhZmUwNTQwMjk5MiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI4YTJhOTE3ZS0xZWU2LTQ5ODAtODZiZS0yZTEzMGI4ZTcyMmIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5OTY0MDk0MSwibmFtZSI6IkphaXIgTGXDs24iLCJwaG9uZV9udW1iZXIiOiIrNTI1NTU1NTU1NTU1IiwiZXhwIjoxNjk5NjQ0NTQxLCJpYXQiOjE2OTk2NDA5NDEsImVtYWlsIjoiaGxlb25AY29udGVudG9oLmNvbSJ9.YrLhtF5cee0S_iWX1gXBTJPxF8zls25SMK9GfCWoCpAabGRy9HtGSZ9KUuZlXICz13TTvgOfxFIv5duwS2vxYIlE1ZuLPHXSm2L4FuwJHcppedxssPNgfmxmVu-4B0SaMNWynjIWwbt_wumb2spwe3ONTcuRI-UgmJo_Rfa_cKUOiL-oNCQwkX6KhuWRGcfcpoUkfhi6tfOAgkA8VT5D8h-Dgawg5ibRnbjRMQejfNg1vVh_d2MpYhX9ve5SM9r1JdRCowgxMjb3ii6eXnng_UqjRdrB4008wkG8iZbz2C_NVJjJGrt1B454MZZmRvHbRogs-uu6U1JUsDW09qhcCg",
|
|
67
62
|
};
|