contentoh-components-library 21.0.4 → 21.0.5
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/InputGroup/index.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +24 -12
- package/dist/components/pages/RetailerProductEdition/index.js +13 -10
- package/package.json +1 -1
- package/src/components/organisms/InputGroup/index.js +6 -4
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +26 -13
- package/src/components/pages/RetailerProductEdition/index.js +6 -3
|
@@ -44,7 +44,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
44
44
|
|
|
45
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
46
46
|
className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
|
|
47
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
47
|
+
children: [(inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
48
48
|
headerType: "retailer-name-header",
|
|
49
49
|
text: inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup
|
|
50
50
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -78,26 +78,26 @@ RetailerProductEditionDefault.args = {
|
|
|
78
78
|
descriptions: 1,
|
|
79
79
|
images: 1
|
|
80
80
|
},
|
|
81
|
-
orderId:
|
|
82
|
-
status: "
|
|
83
|
-
datasheet_status: "
|
|
81
|
+
orderId: 113,
|
|
82
|
+
status: "IN_PROGRESS",
|
|
83
|
+
datasheet_status: "IN_PROGRESS",
|
|
84
84
|
prio: "none",
|
|
85
85
|
version: 2,
|
|
86
|
-
description_status: "
|
|
87
|
-
images_status: "
|
|
86
|
+
description_status: "IN_PROGRESS",
|
|
87
|
+
images_status: "IN_PROGRESS",
|
|
88
88
|
article: {
|
|
89
|
-
id_article:
|
|
90
|
-
id_category: "
|
|
91
|
-
name: "
|
|
92
|
-
upc: "
|
|
93
|
-
timestamp: "2022-
|
|
89
|
+
id_article: 324,
|
|
90
|
+
id_category: "684",
|
|
91
|
+
name: "Crema dental ",
|
|
92
|
+
upc: "154161",
|
|
93
|
+
timestamp: "2022-04-12T14:46:42.000Z",
|
|
94
94
|
id_user: 28,
|
|
95
95
|
status: "NULL",
|
|
96
96
|
active: 1,
|
|
97
97
|
company_id: 1,
|
|
98
98
|
company_name: "COMPANY DEV",
|
|
99
99
|
country: "Colombia",
|
|
100
|
-
id_order:
|
|
100
|
+
id_order: 113,
|
|
101
101
|
id_datasheet_especialist: 36,
|
|
102
102
|
id_datasheet_facilitator: 52,
|
|
103
103
|
id_description_especialist: 36,
|
|
@@ -106,7 +106,7 @@ RetailerProductEditionDefault.args = {
|
|
|
106
106
|
id_images_facilitator: 53,
|
|
107
107
|
id_auditor: 30,
|
|
108
108
|
id_recepcionist: null,
|
|
109
|
-
category: "SALUD Y BELLEZA|CUIDADO
|
|
109
|
+
category: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
|
|
110
110
|
missingAttributes: null,
|
|
111
111
|
missingDescriptions: null,
|
|
112
112
|
missingImages: null
|
|
@@ -117,12 +117,24 @@ RetailerProductEditionDefault.args = {
|
|
|
117
117
|
country: "México",
|
|
118
118
|
id_region: 1,
|
|
119
119
|
active: 1
|
|
120
|
+
}, {
|
|
121
|
+
id: 5,
|
|
122
|
+
name: "Chedraui",
|
|
123
|
+
country: "México",
|
|
124
|
+
id_region: 1,
|
|
125
|
+
active: 1
|
|
120
126
|
}, {
|
|
121
127
|
id: 6,
|
|
122
128
|
name: "HEB",
|
|
123
129
|
country: "México",
|
|
124
130
|
id_region: 1,
|
|
125
131
|
active: 1
|
|
132
|
+
}, {
|
|
133
|
+
id: 12,
|
|
134
|
+
name: "La Comer",
|
|
135
|
+
country: "México",
|
|
136
|
+
id_region: 1,
|
|
137
|
+
active: 1
|
|
126
138
|
}],
|
|
127
139
|
country: "Colombia",
|
|
128
140
|
modal: false,
|
|
@@ -378,9 +378,14 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
378
378
|
});
|
|
379
379
|
if (((_services$ = services[2]) === null || _services$ === void 0 ? void 0 : (_services$$values = _services$.values) === null || _services$$values === void 0 ? void 0 : _services$$values.length) > 0) setActiveImage(0);
|
|
380
380
|
setProduct(productSelected);
|
|
381
|
+
(0, _data2.getPercentage)({
|
|
382
|
+
data: [productSelected]
|
|
383
|
+
}).then(function (res) {
|
|
384
|
+
return setPercentages(res);
|
|
385
|
+
});
|
|
381
386
|
setLoading(false);
|
|
382
387
|
|
|
383
|
-
case
|
|
388
|
+
case 10:
|
|
384
389
|
case "end":
|
|
385
390
|
return _context2.stop();
|
|
386
391
|
}
|
|
@@ -501,23 +506,21 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
501
506
|
while (1) {
|
|
502
507
|
switch (_context5.prev = _context5.next) {
|
|
503
508
|
case 0:
|
|
504
|
-
loadData();
|
|
505
|
-
(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return setPercentages(res);
|
|
509
|
-
});
|
|
509
|
+
loadData(); // getPercentage({ data: [productSelected] }).then((res) =>
|
|
510
|
+
// setPercentages(res)
|
|
511
|
+
// );
|
|
512
|
+
|
|
510
513
|
getServices();
|
|
511
514
|
getComments();
|
|
512
515
|
_context5.t0 = setUserGroups;
|
|
513
|
-
_context5.next =
|
|
516
|
+
_context5.next = 6;
|
|
514
517
|
return (0, _data2.fetchUsers)(token);
|
|
515
518
|
|
|
516
|
-
case
|
|
519
|
+
case 6:
|
|
517
520
|
_context5.t1 = _context5.sent;
|
|
518
521
|
(0, _context5.t0)(_context5.t1);
|
|
519
522
|
|
|
520
|
-
case
|
|
523
|
+
case 8:
|
|
521
524
|
case "end":
|
|
522
525
|
return _context5.stop();
|
|
523
526
|
}
|
package/package.json
CHANGED
|
@@ -32,10 +32,12 @@ export const InputGroup = ({
|
|
|
32
32
|
: "descriptions-layout"
|
|
33
33
|
}
|
|
34
34
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
{inputGroup?.dataGroup && (
|
|
36
|
+
<ScreenHeader
|
|
37
|
+
headerType={"retailer-name-header"}
|
|
38
|
+
text={inputGroup?.dataGroup}
|
|
39
|
+
/>
|
|
40
|
+
)}
|
|
39
41
|
<div className="inputs-container">
|
|
40
42
|
{inputGroup?.inputs?.map((input, index) =>
|
|
41
43
|
activeSection === "Ficha técnica" ? (
|
|
@@ -54,26 +54,26 @@ RetailerProductEditionDefault.args = {
|
|
|
54
54
|
descriptions: 1,
|
|
55
55
|
images: 1,
|
|
56
56
|
},
|
|
57
|
-
orderId:
|
|
58
|
-
status: "
|
|
59
|
-
datasheet_status: "
|
|
57
|
+
orderId: 113,
|
|
58
|
+
status: "IN_PROGRESS",
|
|
59
|
+
datasheet_status: "IN_PROGRESS",
|
|
60
60
|
prio: "none",
|
|
61
61
|
version: 2,
|
|
62
|
-
description_status: "
|
|
63
|
-
images_status: "
|
|
62
|
+
description_status: "IN_PROGRESS",
|
|
63
|
+
images_status: "IN_PROGRESS",
|
|
64
64
|
article: {
|
|
65
|
-
id_article:
|
|
66
|
-
id_category: "
|
|
67
|
-
name: "
|
|
68
|
-
upc: "
|
|
69
|
-
timestamp: "2022-
|
|
65
|
+
id_article: 324,
|
|
66
|
+
id_category: "684",
|
|
67
|
+
name: "Crema dental ",
|
|
68
|
+
upc: "154161",
|
|
69
|
+
timestamp: "2022-04-12T14:46:42.000Z",
|
|
70
70
|
id_user: 28,
|
|
71
71
|
status: "NULL",
|
|
72
72
|
active: 1,
|
|
73
73
|
company_id: 1,
|
|
74
74
|
company_name: "COMPANY DEV",
|
|
75
75
|
country: "Colombia",
|
|
76
|
-
id_order:
|
|
76
|
+
id_order: 113,
|
|
77
77
|
id_datasheet_especialist: 36,
|
|
78
78
|
id_datasheet_facilitator: 52,
|
|
79
79
|
id_description_especialist: 36,
|
|
@@ -82,8 +82,7 @@ RetailerProductEditionDefault.args = {
|
|
|
82
82
|
id_images_facilitator: 53,
|
|
83
83
|
id_auditor: 30,
|
|
84
84
|
id_recepcionist: null,
|
|
85
|
-
category:
|
|
86
|
-
"SALUD Y BELLEZA|CUIDADO DEL CABELLO|SHAMPOOS Y ACONDICIONADORES",
|
|
85
|
+
category: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
|
|
87
86
|
missingAttributes: null,
|
|
88
87
|
missingDescriptions: null,
|
|
89
88
|
missingImages: null,
|
|
@@ -96,6 +95,13 @@ RetailerProductEditionDefault.args = {
|
|
|
96
95
|
id_region: 1,
|
|
97
96
|
active: 1,
|
|
98
97
|
},
|
|
98
|
+
{
|
|
99
|
+
id: 5,
|
|
100
|
+
name: "Chedraui",
|
|
101
|
+
country: "México",
|
|
102
|
+
id_region: 1,
|
|
103
|
+
active: 1,
|
|
104
|
+
},
|
|
99
105
|
{
|
|
100
106
|
id: 6,
|
|
101
107
|
name: "HEB",
|
|
@@ -103,6 +109,13 @@ RetailerProductEditionDefault.args = {
|
|
|
103
109
|
id_region: 1,
|
|
104
110
|
active: 1,
|
|
105
111
|
},
|
|
112
|
+
{
|
|
113
|
+
id: 12,
|
|
114
|
+
name: "La Comer",
|
|
115
|
+
country: "México",
|
|
116
|
+
id_region: 1,
|
|
117
|
+
active: 1,
|
|
118
|
+
},
|
|
106
119
|
],
|
|
107
120
|
country: "Colombia",
|
|
108
121
|
modal: false,
|
|
@@ -158,6 +158,9 @@ export const RetailerProductEdition = ({
|
|
|
158
158
|
});
|
|
159
159
|
if (services[2]?.values?.length > 0) setActiveImage(0);
|
|
160
160
|
setProduct(productSelected);
|
|
161
|
+
getPercentage({ data: [productSelected] }).then((res) =>
|
|
162
|
+
setPercentages(res)
|
|
163
|
+
);
|
|
161
164
|
setLoading(false);
|
|
162
165
|
};
|
|
163
166
|
|
|
@@ -221,9 +224,9 @@ export const RetailerProductEdition = ({
|
|
|
221
224
|
|
|
222
225
|
useEffect(async () => {
|
|
223
226
|
loadData();
|
|
224
|
-
getPercentage({ data: [productSelected] }).then((res) =>
|
|
225
|
-
|
|
226
|
-
);
|
|
227
|
+
// getPercentage({ data: [productSelected] }).then((res) =>
|
|
228
|
+
// setPercentages(res)
|
|
229
|
+
// );
|
|
227
230
|
getServices();
|
|
228
231
|
getComments();
|
|
229
232
|
setUserGroups(await fetchUsers(token));
|