contentoh-components-library 21.1.55 → 21.1.59
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/GeneralInput/index.js +1 -0
- package/dist/components/molecules/HeaderTop/index.js +1 -4
- package/dist/components/molecules/RetailerSelector/index.js +0 -32
- package/dist/components/molecules/StatusAsignationInfo/index.js +2 -3
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/organisms/FullTabsMenu/index.js +1 -3
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +64 -122
- package/dist/components/pages/ProviderProductEdition/index.js +348 -330
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -41
- package/dist/components/pages/RetailerProductEdition/index.js +210 -198
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +2 -1
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +1 -0
- package/src/components/atoms/ValidationPanel/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +1 -6
- package/src/components/molecules/RetailerSelector/index.js +0 -15
- package/src/components/molecules/StatusAsignationInfo/index.js +2 -3
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/FullTabsMenu/index.js +0 -2
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +70 -140
- package/src/components/pages/ProviderProductEdition/index.js +170 -172
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +87 -38
- package/src/components/pages/RetailerProductEdition/index.js +140 -166
- package/src/components/pages/RetailerProductEdition/styles.js +1 -1
- package/src/global-files/data.js +2 -1
|
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width:
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n overflow: auto;\n\n .data-container {\n display: flex;\n flex: 0%;\n height: calc(100% - ", "px);\n .image-data-panel {\n width: 340px;\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .product-information {\n width: 100%;\n display: flex;\n flex-direction: column;\n\n .services-information-container {\n height: 100%;\n overflow: auto;\n }\n\n .image-services {\n aside {\n display: grid;\n grid-template-columns: repeat(auto-fill, 179px);\n column-gap: 15px;\n row-gap: 15px;\n padding: 20px;\n }\n }\n\n .commentary-box {\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n padding: 10px;\n padding-left: 0;\n\n .commentary {\n display: flex;\n align-items: flex-end;\n\n .input-container {\n width: 500px;\n\n .quill {\n height: 100px;\n }\n\n & + * {\n margin-left: 5px;\n }\n }\n\n .buttons-box {\n display: flex;\n width: 210px;\n flex-wrap: wrap;\n\n .general-transparent-button {\n & + * {\n margin-top: 5px;\n }\n }\n\n .general-transparent-button,\n .general-green-button,\n .general-button-disabled {\n width: fit-content;\n min-width: 201px;\n height: 40px;\n }\n }\n }\n }\n\n .feedback-box {\n display: flex;\n }\n }\n }\n .container {\n width: 100%;\n height: 100%;\n .dropzone {\n height: 100%;\n width: 100%;\n }\n }\n"])), function (_ref) {
|
|
17
17
|
var headerTop = _ref.headerTop;
|
|
18
18
|
return headerTop;
|
|
19
19
|
});
|
|
@@ -293,7 +293,8 @@ var getNewStatus = function getNewStatus(statusArray) {
|
|
|
293
293
|
if (lookupString.includes("AP")) return "AP";
|
|
294
294
|
if (lookupString.includes("R")) return "R";
|
|
295
295
|
if (lookupString.includes("NA")) return "NA";
|
|
296
|
-
|
|
296
|
+
console.log("Status not found");
|
|
297
|
+
return "NA";
|
|
297
298
|
};
|
|
298
299
|
|
|
299
300
|
exports.getNewStatus = getNewStatus;
|
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@ export const GeneralInput = ({
|
|
|
42
42
|
if (optionList?.length > 0) {
|
|
43
43
|
let index = evt.target.selectedIndex;
|
|
44
44
|
let valueSelected = evt.target.value;
|
|
45
|
+
console.log(valueSelected);
|
|
45
46
|
generalValue = valueSelected;
|
|
46
47
|
setTextValue({ value: generalValue });
|
|
47
48
|
} else {
|
|
@@ -13,12 +13,7 @@ export const HeaderTop = ({ setHeaderTop }) => {
|
|
|
13
13
|
return (
|
|
14
14
|
<Container ref={headerTop}>
|
|
15
15
|
<ScreenHeader text="Edición de producto" />
|
|
16
|
-
<Button
|
|
17
|
-
buttonType="close-button"
|
|
18
|
-
onClick={() => {
|
|
19
|
-
window.location.href = `/products`;
|
|
20
|
-
}}
|
|
21
|
-
/>
|
|
16
|
+
<Button buttonType="close-button" />
|
|
22
17
|
</Container>
|
|
23
18
|
);
|
|
24
19
|
};
|
|
@@ -19,27 +19,12 @@ export const RetailerSelector = ({
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const getRetailerImage = async () => {
|
|
23
|
-
console.log(
|
|
24
|
-
`https://content-management-images.s3.amazonaws.com/retailers/${activeRetailer.id}.png`
|
|
25
|
-
);
|
|
26
|
-
activeRetailer.image = `https://content-management-images.s3.amazonaws.com/retailers/${activeRetailer.id}.png`;
|
|
27
|
-
retailers.forEach(
|
|
28
|
-
(retailer) =>
|
|
29
|
-
(retailer.image = `https://content-management-images.s3.amazonaws.com/retailers/${retailer.id}.png`)
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
22
|
useEffect(() => {
|
|
34
23
|
if (retailersPanel) {
|
|
35
24
|
document.addEventListener("click", closeRetailersPanel, false);
|
|
36
25
|
}
|
|
37
26
|
}, [retailersPanel]);
|
|
38
27
|
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
getRetailerImage();
|
|
41
|
-
}, [activeRetailer]);
|
|
42
|
-
|
|
43
28
|
return (
|
|
44
29
|
<Container id="retailers-assignation">
|
|
45
30
|
<Avatar
|
|
@@ -25,7 +25,6 @@ export const StatusAsignationInfo = ({
|
|
|
25
25
|
id = "default-id",
|
|
26
26
|
onClickSave,
|
|
27
27
|
showSaveButton,
|
|
28
|
-
canAssign,
|
|
29
28
|
}) => {
|
|
30
29
|
const [showAsignationPanel, setShowAsignationPanel] = useState(false);
|
|
31
30
|
const [layout, setLayout] = useState(false);
|
|
@@ -71,7 +70,7 @@ export const StatusAsignationInfo = ({
|
|
|
71
70
|
slidefront={slidefront}
|
|
72
71
|
iconSize={"medium-image"}
|
|
73
72
|
slidePosition={"bottom-slide"}
|
|
74
|
-
|
|
73
|
+
/>
|
|
75
74
|
{status !== "-" && <StatusTag statusType={status} ovalForm={true} />}
|
|
76
75
|
{showSaveButton && (
|
|
77
76
|
<Button
|
|
@@ -124,7 +123,7 @@ export const StatusAsignationInfo = ({
|
|
|
124
123
|
fontFamily={"Avenir Next"}
|
|
125
124
|
headerType={"input-name-header"}
|
|
126
125
|
/>
|
|
127
|
-
{showAsignationPanel &&
|
|
126
|
+
{showAsignationPanel && (
|
|
128
127
|
<div className="asignation-panel">
|
|
129
128
|
<div className="asignation-header">
|
|
130
129
|
<div className="asignation-status">
|
|
@@ -26,7 +26,7 @@ export const FullProductNameHeader = ({
|
|
|
26
26
|
const element = [];
|
|
27
27
|
servicesData.forEach((sd) => {
|
|
28
28
|
if (sd.id_retailer === rt.id) {
|
|
29
|
-
element.push(sd.status ? sd.status : "
|
|
29
|
+
element.push(sd.status ? sd.status : "R");
|
|
30
30
|
} else element.push("NA");
|
|
31
31
|
rt["services"] = element;
|
|
32
32
|
});
|
|
@@ -16,7 +16,6 @@ export const FullTabsMenu = ({
|
|
|
16
16
|
askToDeleteImages,
|
|
17
17
|
onClickSave,
|
|
18
18
|
showSaveButton,
|
|
19
|
-
canAssign,
|
|
20
19
|
}) => {
|
|
21
20
|
const [imagesSection, setImagesSection] = useState(false);
|
|
22
21
|
|
|
@@ -28,7 +27,6 @@ export const FullTabsMenu = ({
|
|
|
28
27
|
setActiveTab={setActiveTab}
|
|
29
28
|
/>
|
|
30
29
|
<StatusAsignationInfo
|
|
31
|
-
canAssign={canAssign}
|
|
32
30
|
status={status}
|
|
33
31
|
activeTab={activeTab}
|
|
34
32
|
setImageLayout={setImageLayout}
|
|
@@ -16,179 +16,109 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJiNmYyMTUyNi05Y2M1LTQwZTYtYjY5Yi1lNDljZDk1MWNlMzUiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1ODE5MTg4MSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTgxOTU0ODEsImlhdCI6MTY1ODE5MTg4MSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.Ng3EvhD6fMIoHcpQW-K_KOoVqsBfK6zZ5iVOa8UbFtBEjFnhhvJ76xxpDfpsZ7ywTdIN0618qA-GlG99sbmnG0es_2gwADB9awSyRL0-zEJyNmlPeUcrK59RI6VVQGey8mzUUvBbebeV_4NfkAt_wvBuYcVUMMSadnbw86l4fbHX9k3um_00hhwJd4wS8OYRGW2b8QsiRl7S9ocxuLwVdGRxcGEK2xFjJwIW2YPMe9IMY8euK59-Gl2rLFo2TgkR9lQMpSJOhd9Ujl-8zbsqY-Pc2wK9OmndhzlQaw2upmitFapGi2SStvT4DWP4NxvGsAZX8nmqWhf5iXeM7OSbCg",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
id_article: 76125,
|
|
25
|
+
id_category: "682",
|
|
26
|
+
name: "prueba 11",
|
|
27
|
+
upc: "35646655",
|
|
28
|
+
timestamp: "2022-07-01T16:21:23.000Z",
|
|
29
|
+
status: "NULL",
|
|
30
|
+
categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
|
|
31
|
+
asignations: [],
|
|
30
32
|
version: 2,
|
|
31
|
-
|
|
32
|
-
article: {
|
|
33
|
-
category: "ILUMINACIÓN|FOCOS|FOCOS",
|
|
34
|
-
company_name: "THD Proveedor",
|
|
35
|
-
country: "México",
|
|
36
|
-
id_category: "2143",
|
|
37
|
-
id_article: 55118,
|
|
38
|
-
name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
|
|
39
|
-
upc: "145582",
|
|
40
|
-
},
|
|
41
|
-
retailers: [
|
|
42
|
-
{
|
|
43
|
-
id: 58,
|
|
44
|
-
name: "The Home Depot Golden",
|
|
45
|
-
services: ["AA", "AA", "AA", "AA"],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 59,
|
|
49
|
-
name: "The Home Depot Platinum",
|
|
50
|
-
services: ["NA", "NA", "NA", "AA"],
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: 60,
|
|
54
|
-
name: "The Home Depot Resizing",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 61,
|
|
58
|
-
name: "Home Depot TAB",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
services: {
|
|
62
|
-
datasheets: 1,
|
|
63
|
-
descriptions: 1,
|
|
64
|
-
images: 1,
|
|
65
|
-
},
|
|
66
|
-
id_article: 55118,
|
|
33
|
+
version_status: "R",
|
|
67
34
|
retailersAvailable: [
|
|
68
35
|
{
|
|
69
|
-
id:
|
|
70
|
-
name: "
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
id: 59,
|
|
75
|
-
name: "The Home Depot Platinum",
|
|
76
|
-
percentage: 100,
|
|
36
|
+
id: 2,
|
|
37
|
+
name: "Walmart Mercancías Generales",
|
|
38
|
+
country: "México",
|
|
39
|
+
id_region: 1,
|
|
40
|
+
active: 1,
|
|
77
41
|
},
|
|
78
42
|
{
|
|
79
|
-
id:
|
|
80
|
-
name: "
|
|
43
|
+
id: 3,
|
|
44
|
+
name: "Sam´s Club",
|
|
45
|
+
country: "México",
|
|
46
|
+
id_region: 1,
|
|
47
|
+
active: 1,
|
|
81
48
|
},
|
|
82
49
|
{
|
|
83
|
-
id:
|
|
84
|
-
name: "
|
|
50
|
+
id: 5,
|
|
51
|
+
name: "Chedraui",
|
|
52
|
+
country: "México",
|
|
53
|
+
id_region: 1,
|
|
54
|
+
active: 1,
|
|
85
55
|
},
|
|
86
56
|
],
|
|
57
|
+
missing: {},
|
|
87
58
|
},
|
|
88
59
|
productToEdit: {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
product:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
services: ["AA", "AA", "AA", "NA"],
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
id: 59,
|
|
117
|
-
name: "The Home Depot Platinum",
|
|
118
|
-
services: ["NA", "NA", "NA", "AA"],
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: 60,
|
|
122
|
-
name: "The Home Depot Resizing",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: 61,
|
|
126
|
-
name: "Home Depot TAB",
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
services: {
|
|
130
|
-
datasheets: 1,
|
|
131
|
-
descriptions: 1,
|
|
132
|
-
images: 1,
|
|
60
|
+
idCategory: "3028",
|
|
61
|
+
ArticleId: 76175,
|
|
62
|
+
product: [
|
|
63
|
+
{
|
|
64
|
+
id_article: 76175,
|
|
65
|
+
id_category: "3028",
|
|
66
|
+
name: "Producto 1 C",
|
|
67
|
+
upc: "18072021",
|
|
68
|
+
timestamp: "2022-07-18T19:25:34.000Z",
|
|
69
|
+
status: "NULL",
|
|
70
|
+
categoryName: "Eléctrico|Casa Inteligente|Asistentes Inteligentes",
|
|
71
|
+
asignations: [],
|
|
72
|
+
version: 1,
|
|
73
|
+
version_status: null,
|
|
74
|
+
retailersAvailable: [
|
|
75
|
+
{
|
|
76
|
+
id: 58,
|
|
77
|
+
name: "The Home Depot Golden",
|
|
78
|
+
country: "México",
|
|
79
|
+
id_region: 1,
|
|
80
|
+
active: 1,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
missing: {},
|
|
133
84
|
},
|
|
134
|
-
|
|
135
|
-
retailersAvailable: [
|
|
136
|
-
{
|
|
137
|
-
id: 58,
|
|
138
|
-
name: "The Home Depot Golden",
|
|
139
|
-
percentage: 100,
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: 59,
|
|
143
|
-
name: "The Home Depot Platinum",
|
|
144
|
-
percentage: 100,
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: 60,
|
|
148
|
-
name: "The Home Depot Resizing",
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
id: 61,
|
|
152
|
-
name: "Home Depot TAB",
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
},
|
|
85
|
+
],
|
|
156
86
|
},
|
|
157
87
|
location: {
|
|
158
88
|
product: { articleId: 109485, versionId: 3 },
|
|
159
|
-
state: { origin: "
|
|
89
|
+
state: { origin: "RequestWithContentoh" },
|
|
160
90
|
},
|
|
161
91
|
user: {
|
|
162
|
-
id_user:
|
|
163
|
-
name: "
|
|
164
|
-
last_name: "
|
|
165
|
-
email: "
|
|
166
|
-
position: "Admin",
|
|
92
|
+
id_user: 28,
|
|
93
|
+
name: "Proveedor",
|
|
94
|
+
last_name: "Colgate",
|
|
95
|
+
email: "ilopez@contentoh.com",
|
|
96
|
+
position: "Prueba Admin",
|
|
167
97
|
telephone: "+523111366336",
|
|
168
98
|
country: "México",
|
|
169
|
-
id_company:
|
|
170
|
-
id_cognito: "
|
|
99
|
+
id_company: 1,
|
|
100
|
+
id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
|
|
171
101
|
birth_Date: null,
|
|
172
102
|
about_me: null,
|
|
173
103
|
zip_code: null,
|
|
174
104
|
address: null,
|
|
175
105
|
job: null,
|
|
176
|
-
id_stripe: "",
|
|
106
|
+
id_stripe: "cus_KuEt6R6vwmN09f",
|
|
177
107
|
id_role: 0,
|
|
178
108
|
active: 1,
|
|
179
109
|
is_retailer: 0,
|
|
180
|
-
email_notify:
|
|
110
|
+
email_notify: 0,
|
|
181
111
|
membership: {
|
|
182
|
-
id:
|
|
183
|
-
start_date: "
|
|
184
|
-
end_date: "
|
|
185
|
-
planID:
|
|
186
|
-
plan: "
|
|
187
|
-
name: "Plan
|
|
188
|
-
user_limit: "
|
|
189
|
-
products_limit: "
|
|
112
|
+
id: 76,
|
|
113
|
+
start_date: "2022-01-18T17:25:35.000Z",
|
|
114
|
+
end_date: "2023-01-18T17:25:35.000Z",
|
|
115
|
+
planID: 8,
|
|
116
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
117
|
+
name: "Plan Pro",
|
|
118
|
+
user_limit: "20",
|
|
119
|
+
products_limit: "5000",
|
|
190
120
|
type: "Enterprise",
|
|
191
121
|
},
|
|
192
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
122
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1658189942624",
|
|
193
123
|
},
|
|
194
124
|
};
|