contentoh-components-library 21.1.46 → 21.1.47
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/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +75 -69
- package/dist/components/pages/ProviderProductEdition/index.js +380 -328
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -41
- package/dist/components/pages/RetailerProductEdition/index.js +210 -197
- package/dist/global-files/data.js +10 -9
- package/package.json +2 -2
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +66 -68
- package/src/components/pages/ProviderProductEdition/index.js +218 -208
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +87 -38
- package/src/components/pages/RetailerProductEdition/index.js +140 -165
- package/src/global-files/data.js +10 -9
- package/src/components/atoms/StatusTag/index.js +0 -37
- package/src/components/atoms/StatusTag/styles.js +0 -76
|
@@ -280,20 +280,21 @@ var getNewStatus = function getNewStatus(statusArray) {
|
|
|
280
280
|
statusArray.forEach(function (element) {
|
|
281
281
|
return lookupString += element + "/";
|
|
282
282
|
});
|
|
283
|
-
if (lookupString.includes("
|
|
283
|
+
if (lookupString.includes("RCA")) return "RCA";
|
|
284
|
+
if (lookupString.includes("RC")) return "RC";
|
|
284
285
|
if (lookupString.includes("RA")) return "RA";
|
|
285
286
|
if (lookupString.includes("RP")) return "RP";
|
|
286
|
-
if (lookupString.includes("
|
|
287
|
-
if (lookupString.includes("UNASSIGNED")) return "
|
|
288
|
-
if (lookupString.includes("
|
|
289
|
-
if (lookupString.includes("
|
|
290
|
-
if (lookupString.includes("
|
|
287
|
+
if (lookupString.includes("ACA")) return "ACA";
|
|
288
|
+
if (lookupString.includes("UNASSIGNED")) return "CA";
|
|
289
|
+
if (lookupString.includes("CA")) return "CA";
|
|
290
|
+
if (lookupString.includes("IE")) return "IE";
|
|
291
|
+
if (lookupString.includes("AC")) return "AC";
|
|
291
292
|
if (lookupString.includes("AA")) return "AA";
|
|
292
293
|
if (lookupString.includes("AP")) return "AP";
|
|
293
|
-
if (lookupString.includes("
|
|
294
|
-
if (lookupString.includes("RECEIVED")) return "RECEIVED";
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.47",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"start": "start-storybook -p 6006",
|
|
37
|
-
"build": "cross-env BABEL_ENV=production babel src -d dist",
|
|
37
|
+
"build": "cross-env BABEL_ENV=production babel src -d dist && cp -a src/assets dist/ && cp -a src/global-files/*.css dist/global-files",
|
|
38
38
|
"chromatic": "npx chromatic --project-token=d7bb0c8ba831",
|
|
39
39
|
"release": "auto shipit --base-branch=main"
|
|
40
40
|
},
|
|
@@ -70,7 +70,7 @@ export const StatusAsignationInfo = ({
|
|
|
70
70
|
slidefront={slidefront}
|
|
71
71
|
iconSize={"medium-image"}
|
|
72
72
|
slidePosition={"bottom-slide"}
|
|
73
|
-
|
|
73
|
+
/>
|
|
74
74
|
{status !== "-" && <StatusTag statusType={status} ovalForm={true} />}
|
|
75
75
|
{showSaveButton && (
|
|
76
76
|
<Button
|
|
@@ -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
|
});
|
|
@@ -12,48 +12,42 @@ export const ProviderProductEditionDefault = Template.bind({});
|
|
|
12
12
|
ProviderProductEditionDefault.args = {
|
|
13
13
|
tabsSections: {
|
|
14
14
|
Descripción: true,
|
|
15
|
-
"Ficha técnica":
|
|
16
|
-
Imágenes:
|
|
15
|
+
"Ficha técnica": true,
|
|
16
|
+
Imágenes: true,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
20
|
-
articleId:
|
|
21
|
-
category:
|
|
22
|
-
version:
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJjMTc1OGQ2ZC04NWQ3LTQwNmMtOWFhMi0zMzhkYTJkYmU5Y2IiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NzA2OTM3OCwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU3MDcyOTc4LCJpYXQiOjE2NTcwNjkzNzgsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.QHohzTWK9lmbszn-WfeNjf1y01q3LOdMDwCK4-Vp4D-BW5b-ZfSGMCoA4lWTw_ES98LJsOSqvnqq_G-lQim56UbhgQ-85cphHxci24IO-cCkz6a9-OoBHOccF9O0LiKszKbTZajjum3z1-rpEg2SdIXqqbk92kanWlC9F2Y-0U-POlY9i97Dlb_ISF2UTmaWneceMNz3p3WVpKomIFx_njMxORr7Ufl_WO-yRHMq1hNE0a2tUpQ_QUbwaYpwUE5YTfasml_UpoNJSCDcgn29O4O55wxD2vVE0Mni6vbhDftsOWbsCjyU9A8d1Zubb9jVVnamRWxxLW28ZGYue_UlSg",
|
|
20
|
+
articleId: 55154,
|
|
21
|
+
category: 2568,
|
|
22
|
+
version: 3,
|
|
23
23
|
productSelected: {
|
|
24
|
-
orderId:
|
|
24
|
+
orderId: 96,
|
|
25
25
|
article_status: "AP",
|
|
26
|
-
datasheet_status: "
|
|
27
|
-
description_status: "
|
|
28
|
-
images_status: "
|
|
26
|
+
datasheet_status: "ACA",
|
|
27
|
+
description_status: "ACA",
|
|
28
|
+
images_status: "ACA",
|
|
29
29
|
prio: "none",
|
|
30
|
-
version:
|
|
30
|
+
version: 3,
|
|
31
31
|
brand: null,
|
|
32
32
|
article: {
|
|
33
|
-
category: "
|
|
34
|
-
company_name: "
|
|
33
|
+
category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
34
|
+
company_name: "COMPANY DEV",
|
|
35
35
|
country: "México",
|
|
36
|
-
id_category: "
|
|
37
|
-
id_article:
|
|
38
|
-
name: "
|
|
39
|
-
upc: "
|
|
36
|
+
id_category: "2568",
|
|
37
|
+
id_article: 55154,
|
|
38
|
+
name: "Prueba 12312",
|
|
39
|
+
upc: "977812",
|
|
40
40
|
},
|
|
41
41
|
retailers: [
|
|
42
42
|
{
|
|
43
43
|
id: 58,
|
|
44
44
|
name: "The Home Depot Golden",
|
|
45
|
+
services: ["ACA", "ACA", "ACA", "NA"],
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
48
|
id: 59,
|
|
48
49
|
name: "The Home Depot Platinum",
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
id: 60,
|
|
52
|
-
name: "The Home Depot Resizing",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: 61,
|
|
56
|
-
name: "Home Depot TAB",
|
|
50
|
+
services: ["NA", "NA", "NA", "AP"],
|
|
57
51
|
},
|
|
58
52
|
],
|
|
59
53
|
services: {
|
|
@@ -61,63 +55,62 @@ ProviderProductEditionDefault.args = {
|
|
|
61
55
|
descriptions: 1,
|
|
62
56
|
images: 1,
|
|
63
57
|
},
|
|
64
|
-
|
|
58
|
+
statusByRetailer: {
|
|
59
|
+
58: {
|
|
60
|
+
datasheet: "ACA",
|
|
61
|
+
description: "ACA",
|
|
62
|
+
images: "ACA",
|
|
63
|
+
},
|
|
64
|
+
59: {
|
|
65
|
+
images: "ACA",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
id_article: 55154,
|
|
65
69
|
retailersAvailable: [
|
|
66
70
|
{
|
|
67
71
|
id: 58,
|
|
68
72
|
name: "The Home Depot Golden",
|
|
73
|
+
percentage: 100,
|
|
69
74
|
},
|
|
70
75
|
{
|
|
71
76
|
id: 59,
|
|
72
77
|
name: "The Home Depot Platinum",
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
id: 60,
|
|
76
|
-
name: "The Home Depot Resizing",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 61,
|
|
80
|
-
name: "Home Depot TAB",
|
|
78
|
+
percentage: 100,
|
|
81
79
|
},
|
|
82
80
|
],
|
|
81
|
+
status: "ACA",
|
|
83
82
|
},
|
|
84
83
|
productToEdit: {
|
|
85
|
-
ArticleId:
|
|
86
|
-
idCategory: "
|
|
84
|
+
ArticleId: 55154,
|
|
85
|
+
idCategory: "2568",
|
|
87
86
|
product: {
|
|
88
|
-
orderId:
|
|
87
|
+
orderId: 96,
|
|
89
88
|
article_status: "AP",
|
|
90
|
-
datasheet_status: "
|
|
91
|
-
description_status: "
|
|
92
|
-
images_status: "
|
|
89
|
+
datasheet_status: "ACA",
|
|
90
|
+
description_status: "ACA",
|
|
91
|
+
images_status: "ACA",
|
|
93
92
|
prio: "none",
|
|
94
|
-
version:
|
|
93
|
+
version: 3,
|
|
95
94
|
brand: null,
|
|
96
95
|
article: {
|
|
97
|
-
category: "
|
|
98
|
-
company_name: "
|
|
96
|
+
category: "SEGURIDAD|BATERÍAS Y PILAS|BATERÍAS Y PILAS",
|
|
97
|
+
company_name: "COMPANY DEV",
|
|
99
98
|
country: "México",
|
|
100
|
-
id_category: "
|
|
101
|
-
id_article:
|
|
102
|
-
name: "
|
|
103
|
-
upc: "
|
|
99
|
+
id_category: "2568",
|
|
100
|
+
id_article: 55154,
|
|
101
|
+
name: "Prueba 12312",
|
|
102
|
+
upc: "977812",
|
|
104
103
|
},
|
|
105
104
|
retailers: [
|
|
106
105
|
{
|
|
107
106
|
id: 58,
|
|
108
107
|
name: "The Home Depot Golden",
|
|
108
|
+
services: ["ACA", "ACA", "ACA", "NA"],
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
id: 59,
|
|
112
112
|
name: "The Home Depot Platinum",
|
|
113
|
-
|
|
114
|
-
{
|
|
115
|
-
id: 60,
|
|
116
|
-
name: "The Home Depot Resizing",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 61,
|
|
120
|
-
name: "Home Depot TAB",
|
|
113
|
+
services: ["NA", "NA", "NA", "AP"],
|
|
121
114
|
},
|
|
122
115
|
],
|
|
123
116
|
services: {
|
|
@@ -125,29 +118,34 @@ ProviderProductEditionDefault.args = {
|
|
|
125
118
|
descriptions: 1,
|
|
126
119
|
images: 1,
|
|
127
120
|
},
|
|
128
|
-
|
|
121
|
+
statusByRetailer: {
|
|
122
|
+
58: {
|
|
123
|
+
datasheet: "ACA",
|
|
124
|
+
description: "ACA",
|
|
125
|
+
images: "ACA",
|
|
126
|
+
},
|
|
127
|
+
59: {
|
|
128
|
+
images: "ACA",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
id_article: 55154,
|
|
129
132
|
retailersAvailable: [
|
|
130
133
|
{
|
|
131
134
|
id: 58,
|
|
132
135
|
name: "The Home Depot Golden",
|
|
136
|
+
percentage: 100,
|
|
133
137
|
},
|
|
134
138
|
{
|
|
135
139
|
id: 59,
|
|
136
140
|
name: "The Home Depot Platinum",
|
|
137
|
-
|
|
138
|
-
{
|
|
139
|
-
id: 60,
|
|
140
|
-
name: "The Home Depot Resizing",
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
id: 61,
|
|
144
|
-
name: "Home Depot TAB",
|
|
141
|
+
percentage: 100,
|
|
145
142
|
},
|
|
146
143
|
],
|
|
144
|
+
status: "ACA",
|
|
147
145
|
},
|
|
148
146
|
},
|
|
149
147
|
location: {
|
|
150
|
-
product: { articleId:
|
|
148
|
+
product: { articleId: 55157, versionId: 3 },
|
|
151
149
|
state: { origin: "Contentoh" },
|
|
152
150
|
},
|
|
153
151
|
user: {
|
|
@@ -168,7 +166,7 @@ ProviderProductEditionDefault.args = {
|
|
|
168
166
|
id_stripe: "",
|
|
169
167
|
id_role: 0,
|
|
170
168
|
active: 1,
|
|
171
|
-
is_retailer:
|
|
169
|
+
is_retailer: 1,
|
|
172
170
|
email_notify: 1,
|
|
173
171
|
membership: {
|
|
174
172
|
id: 24,
|
|
@@ -181,6 +179,6 @@ ProviderProductEditionDefault.args = {
|
|
|
181
179
|
products_limit: "10000",
|
|
182
180
|
type: "Enterprise",
|
|
183
181
|
},
|
|
184
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?
|
|
182
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1657069378649",
|
|
185
183
|
},
|
|
186
|
-
};
|
|
184
|
+
};
|