contentoh-components-library 21.0.91 → 21.0.96
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/InputFormatter/index.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +44 -114
- package/dist/components/pages/ProviderProductEdition/index.js +18 -16
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +23 -35
- package/dist/components/pages/RetailerProductEdition/index.js +172 -188
- package/package.json +1 -1
- package/src/components/atoms/InputFormatter/index.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +48 -133
- package/src/components/pages/ProviderProductEdition/index.js +16 -14
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +23 -37
- package/src/components/pages/RetailerProductEdition/index.js +17 -15
package/package.json
CHANGED
|
@@ -60,7 +60,7 @@ export const InputFormatter = ({
|
|
|
60
60
|
value = valueFormater(value);
|
|
61
61
|
|
|
62
62
|
let idInput = inputId;
|
|
63
|
-
let dataSave = updatedDescriptions
|
|
63
|
+
let dataSave = updatedDescriptions?.slice();
|
|
64
64
|
if (dataSave.length > 0) {
|
|
65
65
|
if (dataSave.filter((e) => e.attributeId === idInput).length > 0) {
|
|
66
66
|
dataSave.forEach((e) => {
|
|
@@ -21,147 +21,62 @@ ProviderProductEditionDefault.args = {
|
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
id_category: "
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
datasheet: 33,
|
|
35
|
-
descriptions: 14,
|
|
36
|
-
images: 3,
|
|
37
|
-
},
|
|
38
|
-
article: {
|
|
39
|
-
category: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
|
|
40
|
-
company_name: "COMPANY DEV",
|
|
41
|
-
id_category: "684",
|
|
42
|
-
id_article: 33249,
|
|
43
|
-
name: "Crema dental ",
|
|
44
|
-
timestamp: "2022-06-14T23:24:08.000Z",
|
|
45
|
-
upc: "232435",
|
|
46
|
-
},
|
|
47
|
-
retailers: [
|
|
48
|
-
{
|
|
49
|
-
id: 4,
|
|
50
|
-
name: "Walmart Super y Superama",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: 9,
|
|
54
|
-
name: "Amazon",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 1013,
|
|
58
|
-
name: "Cencosud Colombia",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: 2005,
|
|
62
|
-
name: "ClubCo",
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
services: {
|
|
66
|
-
datasheets: 1,
|
|
67
|
-
descriptions: 1,
|
|
68
|
-
images: 1,
|
|
69
|
-
},
|
|
24
|
+
id_article: 35319,
|
|
25
|
+
id_category: "2146",
|
|
26
|
+
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
27
|
+
upc: "120873",
|
|
28
|
+
timestamp: "2022-06-14T15:31:50.000Z",
|
|
29
|
+
status: "NULL",
|
|
30
|
+
categoryName: "ILUMINACIÓN|FOCOS|LEDS",
|
|
31
|
+
asignations: [],
|
|
32
|
+
version: 2,
|
|
33
|
+
version_status: "AA",
|
|
70
34
|
retailersAvailable: [
|
|
71
35
|
{
|
|
72
|
-
id:
|
|
73
|
-
name: "
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
name: "Amazon",
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: 1013,
|
|
81
|
-
name: "Cencosud Colombia",
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
id: 2005,
|
|
85
|
-
name: "ClubCo",
|
|
36
|
+
id: 58,
|
|
37
|
+
name: "The Home Depot Golden",
|
|
38
|
+
country: "México",
|
|
39
|
+
id_region: 1,
|
|
40
|
+
active: 1,
|
|
86
41
|
},
|
|
87
42
|
],
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
43
|
+
missing: {
|
|
44
|
+
datasheet: 33,
|
|
45
|
+
description: 0,
|
|
46
|
+
image: 23,
|
|
47
|
+
},
|
|
91
48
|
},
|
|
92
49
|
productToEdit: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
product:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
id: 4,
|
|
122
|
-
name: "Walmart Super y Superama",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: 9,
|
|
126
|
-
name: "Amazon",
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
id: 1013,
|
|
130
|
-
name: "Cencosud Colombia",
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: 2005,
|
|
134
|
-
name: "ClubCo",
|
|
50
|
+
idCategory: "2146",
|
|
51
|
+
ArticleId: 35319,
|
|
52
|
+
product: [
|
|
53
|
+
{
|
|
54
|
+
id_article: 35319,
|
|
55
|
+
id_category: "2146",
|
|
56
|
+
name: "FOCO LED A19 (60W) LUZ AMARILLA",
|
|
57
|
+
upc: "120873",
|
|
58
|
+
timestamp: "2022-06-14T15:31:50.000Z",
|
|
59
|
+
status: "NULL",
|
|
60
|
+
categoryName: "ILUMINACIÓN|FOCOS|LEDS",
|
|
61
|
+
asignations: [],
|
|
62
|
+
version: 2,
|
|
63
|
+
version_status: "AA",
|
|
64
|
+
retailersAvailable: [
|
|
65
|
+
{
|
|
66
|
+
id: 58,
|
|
67
|
+
name: "The Home Depot Golden",
|
|
68
|
+
country: "México",
|
|
69
|
+
id_region: 1,
|
|
70
|
+
active: 1,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
missing: {
|
|
74
|
+
datasheet: 33,
|
|
75
|
+
description: 0,
|
|
76
|
+
image: 23,
|
|
135
77
|
},
|
|
136
|
-
],
|
|
137
|
-
services: {
|
|
138
|
-
datasheets: 1,
|
|
139
|
-
descriptions: 1,
|
|
140
|
-
images: 1,
|
|
141
78
|
},
|
|
142
|
-
|
|
143
|
-
{
|
|
144
|
-
id: 4,
|
|
145
|
-
name: "Walmart Super y Superama",
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: 9,
|
|
149
|
-
name: "Amazon",
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
id: 1013,
|
|
153
|
-
name: "Cencosud Colombia",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
id: 2005,
|
|
157
|
-
name: "ClubCo",
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
id_article: 33249,
|
|
161
|
-
categoryName:
|
|
162
|
-
"SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
|
|
163
|
-
version_status: "RECEPTION",
|
|
164
|
-
},
|
|
79
|
+
],
|
|
165
80
|
},
|
|
166
81
|
location: {
|
|
167
82
|
product: { articleId: 109485, versionId: 3 },
|
|
@@ -99,19 +99,21 @@ export const ProviderProductEdition = ({
|
|
|
99
99
|
const ext = e.srcElement.fileName.split(".");
|
|
100
100
|
const img = new Image();
|
|
101
101
|
img.src = e.target.result;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
setTimeout(() => {
|
|
103
|
+
const width = img.width;
|
|
104
|
+
const height = img.height;
|
|
105
|
+
const newImg = {
|
|
106
|
+
action: "addImg",
|
|
107
|
+
img: {
|
|
108
|
+
src: e.target.result,
|
|
109
|
+
name: e.target.fileName,
|
|
110
|
+
ext: ext[ext.length - 1],
|
|
111
|
+
width: width,
|
|
112
|
+
height: height,
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
setImages(newImg);
|
|
116
|
+
}, 500);
|
|
115
117
|
};
|
|
116
118
|
reader.onerror = function (error) {
|
|
117
119
|
console.log("dropzoneError: ", error);
|
|
@@ -359,7 +361,7 @@ export const ProviderProductEdition = ({
|
|
|
359
361
|
}, [activeRetailer, services]);
|
|
360
362
|
|
|
361
363
|
const thumbs = () => {
|
|
362
|
-
const imageInputs = socketType
|
|
364
|
+
const imageInputs = socketType?.slice();
|
|
363
365
|
const imageType = images?.imageType?.map((e) => ({
|
|
364
366
|
value: e?.id,
|
|
365
367
|
name: e?.name,
|
|
@@ -26,71 +26,57 @@ RetailerProductEditionDefault.args = {
|
|
|
26
26
|
descriptions: 1,
|
|
27
27
|
images: 1,
|
|
28
28
|
},
|
|
29
|
-
orderId:
|
|
30
|
-
status: "
|
|
31
|
-
datasheet_status: "
|
|
29
|
+
orderId: 13,
|
|
30
|
+
status: "IN_PROGRESS",
|
|
31
|
+
datasheet_status: "IN_PROGRESS",
|
|
32
32
|
prio: "none",
|
|
33
33
|
version: 2,
|
|
34
|
-
description_status: "
|
|
35
|
-
images_status: "
|
|
34
|
+
description_status: "IN_PROGRESS",
|
|
35
|
+
images_status: "IN_PROGRESS",
|
|
36
36
|
article: {
|
|
37
|
-
id_article:
|
|
38
|
-
id_category: "
|
|
39
|
-
name: "
|
|
40
|
-
upc: "
|
|
41
|
-
timestamp: "2022-06-
|
|
42
|
-
id_user:
|
|
37
|
+
id_article: 35703,
|
|
38
|
+
id_category: "4",
|
|
39
|
+
name: "Manzana",
|
|
40
|
+
upc: "89898989",
|
|
41
|
+
timestamp: "2022-06-15T22:16:56.000Z",
|
|
42
|
+
id_user: 28,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
45
|
company_id: 1,
|
|
46
|
-
company_name: "
|
|
46
|
+
company_name: "COMPANY DEV",
|
|
47
47
|
country: "México",
|
|
48
|
-
id_order:
|
|
48
|
+
id_order: 13,
|
|
49
49
|
id_datasheet_especialist: 54,
|
|
50
50
|
id_datasheet_facilitator: 52,
|
|
51
51
|
id_description_especialist: 54,
|
|
52
52
|
id_description_facilitator: 52,
|
|
53
53
|
id_images_especialist: 55,
|
|
54
54
|
id_images_facilitator: 53,
|
|
55
|
-
id_auditor:
|
|
55
|
+
id_auditor: null,
|
|
56
56
|
id_recepcionist: null,
|
|
57
|
-
category: "
|
|
58
|
-
missingAttributes:
|
|
59
|
-
missingDescriptions:
|
|
60
|
-
missingImages:
|
|
57
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
58
|
+
missingAttributes: -4,
|
|
59
|
+
missingDescriptions: 2,
|
|
60
|
+
missingImages: 2,
|
|
61
61
|
},
|
|
62
62
|
retailers: [
|
|
63
63
|
{
|
|
64
|
-
id:
|
|
65
|
-
name: "
|
|
64
|
+
id: 3,
|
|
65
|
+
name: "Sam´s Club",
|
|
66
66
|
country: "México",
|
|
67
67
|
id_region: 1,
|
|
68
68
|
active: 1,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
72
|
-
name: "
|
|
73
|
-
country: "México",
|
|
74
|
-
id_region: 1,
|
|
75
|
-
active: 1,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
id: 60,
|
|
79
|
-
name: "The Home Depot Resizing",
|
|
80
|
-
country: "México",
|
|
81
|
-
id_region: 1,
|
|
82
|
-
active: 1,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 61,
|
|
86
|
-
name: "Home Depot TAB",
|
|
71
|
+
id: 9,
|
|
72
|
+
name: "Amazon",
|
|
87
73
|
country: "México",
|
|
88
74
|
id_region: 1,
|
|
89
75
|
active: 1,
|
|
90
76
|
},
|
|
91
77
|
],
|
|
92
78
|
country: "México",
|
|
93
|
-
upc: "
|
|
79
|
+
upc: "89898989",
|
|
94
80
|
},
|
|
95
81
|
location: {
|
|
96
82
|
product: { articleId: 109485, versionId: 3 },
|
|
@@ -88,23 +88,25 @@ export const RetailerProductEdition = ({
|
|
|
88
88
|
acceptedFiles.map((file) => {
|
|
89
89
|
const reader = new FileReader();
|
|
90
90
|
reader.fileName = file.name;
|
|
91
|
-
reader.onload =
|
|
91
|
+
reader.onload = function (e) {
|
|
92
92
|
const ext = e.srcElement.fileName.split(".");
|
|
93
93
|
const img = new Image();
|
|
94
94
|
img.src = e.target.result;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
setTimeout(() => {
|
|
96
|
+
const width = img.width;
|
|
97
|
+
const height = img.height;
|
|
98
|
+
const newImg = {
|
|
99
|
+
action: "addImg",
|
|
100
|
+
img: {
|
|
101
|
+
src: e.target.result,
|
|
102
|
+
name: e.target.fileName,
|
|
103
|
+
ext: ext[ext.length - 1],
|
|
104
|
+
width: width,
|
|
105
|
+
height: height,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
setImages(newImg);
|
|
109
|
+
}, 500);
|
|
108
110
|
};
|
|
109
111
|
reader.onerror = function (error) {
|
|
110
112
|
console.log("dropzoneError: ", error);
|
|
@@ -1079,7 +1081,7 @@ export const RetailerProductEdition = ({
|
|
|
1079
1081
|
service.id_retailer === activeRetailer?.id &&
|
|
1080
1082
|
service.service === concept
|
|
1081
1083
|
);
|
|
1082
|
-
return retailerService ? retailerService.status : "
|
|
1084
|
+
return retailerService ? retailerService.status : "NS";
|
|
1083
1085
|
};
|
|
1084
1086
|
|
|
1085
1087
|
useEffect(() => {
|