contentoh-components-library 21.0.90 → 21.0.94
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/molecules/AvatarAndValidation/index.js +3 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +37 -48
- package/dist/components/pages/ProviderProductEdition/index.js +18 -16
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +29 -31
- package/dist/components/pages/RetailerProductEdition/index.js +172 -188
- package/package.json +1 -1
- package/src/components/molecules/AvatarAndValidation/index.js +4 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +39 -52
- package/src/components/pages/ProviderProductEdition/index.js +16 -14
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +27 -30
- package/src/components/pages/RetailerProductEdition/index.js +17 -15
package/package.json
CHANGED
|
@@ -48,7 +48,10 @@ export const AvatarAndValidation = ({
|
|
|
48
48
|
{showValidationButtons && (
|
|
49
49
|
<Button
|
|
50
50
|
buttonType={`circular-button ${buttonType}`}
|
|
51
|
-
onClick={() =>
|
|
51
|
+
onClick={(e) => {
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
setShowValidationPanel(true);
|
|
54
|
+
}}
|
|
52
55
|
/>
|
|
53
56
|
)}
|
|
54
57
|
</div>
|
|
@@ -21,73 +21,60 @@ ProviderProductEditionDefault.args = {
|
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
id_category: "684",
|
|
26
|
-
status: "RECEPTION",
|
|
27
|
-
datasheet_status: null,
|
|
28
|
-
prio: "none",
|
|
29
|
-
version: 4,
|
|
30
|
-
description_status: null,
|
|
31
|
-
images_status: null,
|
|
24
|
+
version: 1,
|
|
32
25
|
brand: null,
|
|
33
26
|
missing: {
|
|
34
|
-
datasheet:
|
|
35
|
-
descriptions:
|
|
36
|
-
images:
|
|
27
|
+
datasheet: null,
|
|
28
|
+
descriptions: null,
|
|
29
|
+
images: null,
|
|
37
30
|
},
|
|
38
31
|
article: {
|
|
39
|
-
category:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
category:
|
|
33
|
+
"ORGANIZADORES Y CLOSETS|ACCESORIOS DE LAVANDERÍA|BURROS DE PLANCHAR",
|
|
34
|
+
company_name: "BROOKLITE MEXICO S DE RL DE CV",
|
|
35
|
+
company_id: 409,
|
|
36
|
+
id_category: "2520",
|
|
37
|
+
id_article: 1,
|
|
38
|
+
name: "SOPORTE PLANCHA-BURRO EN PUERTA",
|
|
39
|
+
upc: "339",
|
|
46
40
|
},
|
|
41
|
+
asignations: [62],
|
|
47
42
|
retailers: [
|
|
48
43
|
{
|
|
49
|
-
id:
|
|
50
|
-
name: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
name: "Amazon",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 1013,
|
|
58
|
-
name: "Cencosud Colombia",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: 2005,
|
|
62
|
-
name: "ClubCo",
|
|
44
|
+
id: 61,
|
|
45
|
+
name: "Home Depot TAB",
|
|
46
|
+
country: "México",
|
|
47
|
+
id_region: 1,
|
|
48
|
+
active: 1,
|
|
63
49
|
},
|
|
64
50
|
],
|
|
65
|
-
|
|
66
|
-
datasheets: 1,
|
|
67
|
-
descriptions: 1,
|
|
68
|
-
images: 1,
|
|
69
|
-
},
|
|
51
|
+
percentage: 0,
|
|
70
52
|
retailersAvailable: [
|
|
71
53
|
{
|
|
72
|
-
id:
|
|
73
|
-
name: "
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
name: "Amazon",
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: 1013,
|
|
81
|
-
name: "Cencosud Colombia",
|
|
54
|
+
id: 61,
|
|
55
|
+
name: "Home Depot TAB",
|
|
56
|
+
country: "México",
|
|
57
|
+
id_region: 1,
|
|
58
|
+
active: 1,
|
|
82
59
|
},
|
|
60
|
+
],
|
|
61
|
+
upc: "339",
|
|
62
|
+
name: "SOPORTE PLANCHA-BURRO EN PUERTA",
|
|
63
|
+
categoryName:
|
|
64
|
+
"ORGANIZADORES Y CLOSETS|ACCESORIOS DE LAVANDERÍA|BURROS DE PLANCHAR",
|
|
65
|
+
id_category: "2520",
|
|
66
|
+
id_article: 1,
|
|
67
|
+
services: [
|
|
83
68
|
{
|
|
84
|
-
|
|
85
|
-
|
|
69
|
+
id_article: 1,
|
|
70
|
+
service: "datasheet",
|
|
71
|
+
quantity: 1,
|
|
72
|
+
price: 0,
|
|
73
|
+
id_user: 59,
|
|
74
|
+
datasheet_common: null,
|
|
75
|
+
discount: null,
|
|
86
76
|
},
|
|
87
77
|
],
|
|
88
|
-
id_article: 33249,
|
|
89
|
-
categoryName: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
|
|
90
|
-
version_status: "RECEPTION",
|
|
91
78
|
},
|
|
92
79
|
productToEdit: {
|
|
93
80
|
ArticleId: 33249,
|
|
@@ -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,81 +26,78 @@ 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-
|
|
37
|
+
id_article: 35703,
|
|
38
|
+
id_category: "4",
|
|
39
|
+
name: "Manzana",
|
|
40
|
+
upc: "89898989",
|
|
41
|
+
timestamp: "2022-06-15T22:16:56.000Z",
|
|
42
42
|
id_user: 28,
|
|
43
43
|
status: "NULL",
|
|
44
44
|
active: 1,
|
|
45
45
|
company_id: 1,
|
|
46
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
missingImages: null,
|
|
57
|
+
category: "ABARROTES|ABARROTES SECOS|ALIMENTOS DESHIDRATADOS",
|
|
58
|
+
missingAttributes: -4,
|
|
59
|
+
missingDescriptions: 2,
|
|
60
|
+
missingImages: 2,
|
|
62
61
|
},
|
|
63
62
|
retailers: [
|
|
64
63
|
{
|
|
65
|
-
id:
|
|
66
|
-
name: "
|
|
64
|
+
id: 3,
|
|
65
|
+
name: "Sam´s Club",
|
|
67
66
|
country: "México",
|
|
68
67
|
id_region: 1,
|
|
69
68
|
active: 1,
|
|
70
|
-
percentage: 100,
|
|
71
69
|
},
|
|
72
70
|
{
|
|
73
|
-
id:
|
|
74
|
-
name: "
|
|
71
|
+
id: 9,
|
|
72
|
+
name: "Amazon",
|
|
75
73
|
country: "México",
|
|
76
74
|
id_region: 1,
|
|
77
75
|
active: 1,
|
|
78
|
-
percentage: 100,
|
|
79
76
|
},
|
|
80
77
|
],
|
|
81
78
|
country: "México",
|
|
82
|
-
upc: "
|
|
79
|
+
upc: "89898989",
|
|
83
80
|
},
|
|
84
81
|
location: {
|
|
85
82
|
product: { articleId: 109485, versionId: 3 },
|
|
86
83
|
},
|
|
87
84
|
user: {
|
|
88
|
-
id_user:
|
|
89
|
-
name: "FACILITADOR
|
|
85
|
+
id_user: 52,
|
|
86
|
+
name: "FACILITADOR TXT PRUEBA",
|
|
90
87
|
last_name: "",
|
|
91
|
-
email: "
|
|
88
|
+
email: "azarate@contentoh.com",
|
|
92
89
|
position: null,
|
|
93
90
|
telephone: null,
|
|
94
91
|
country: null,
|
|
95
92
|
id_company: 2,
|
|
96
|
-
id_cognito: "
|
|
93
|
+
id_cognito: "b2ce5b2a-609c-4e79-9ea9-2f74cff43889",
|
|
97
94
|
birth_Date: null,
|
|
98
95
|
about_me: null,
|
|
99
96
|
zip_code: null,
|
|
100
97
|
address: null,
|
|
101
98
|
job: null,
|
|
102
99
|
id_stripe: null,
|
|
103
|
-
id_role:
|
|
100
|
+
id_role: 4,
|
|
104
101
|
active: 1,
|
|
105
102
|
is_retailer: 0,
|
|
106
103
|
membership: {
|
|
@@ -114,6 +111,6 @@ RetailerProductEditionDefault.args = {
|
|
|
114
111
|
products_limit: "3",
|
|
115
112
|
type: "PyMES",
|
|
116
113
|
},
|
|
117
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
114
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-52/52.png?1655320339846",
|
|
118
115
|
},
|
|
119
116
|
};
|
|
@@ -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(() => {
|