contentoh-components-library 21.4.62 → 21.4.63
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/assets/fonts/roboto/LICENSE.txt +202 -0
- package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +90 -0
- package/dist/components/atoms/ImageCarousel/index.js +120 -0
- package/dist/components/atoms/ImageCarousel/styles.js +18 -0
- package/dist/components/atoms/PercentTag/PercentTag.stories.js +31 -0
- package/dist/components/atoms/PercentTag/index.js +23 -0
- package/dist/components/atoms/PercentTag/styles.js +22 -0
- package/dist/components/atoms/RatingStars/RatingStars.stories.js +30 -0
- package/dist/components/atoms/RatingStars/index.js +53 -0
- package/dist/components/atoms/RatingStars/styles.js +18 -0
- package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +48 -0
- package/dist/components/atoms/RetailerCatalog/index.js +69 -0
- package/dist/components/atoms/RetailerCatalog/styles.js +20 -0
- package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +33 -0
- package/dist/components/atoms/RetailerOption/index.js +62 -0
- package/dist/components/atoms/RetailerOption/styles.js +20 -0
- package/dist/components/atoms/RetailersList/RetailersList.stories.js +45 -0
- package/dist/components/atoms/RetailersList/index.js +46 -0
- package/dist/components/atoms/RetailersList/styles.js +18 -0
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +73 -0
- package/dist/components/atoms/UserCatalog/index.js +101 -0
- package/dist/components/atoms/UserCatalog/styles.js +18 -0
- package/dist/components/atoms/UserOption/UserOption.stories.js +40 -0
- package/dist/components/atoms/UserOption/index.js +130 -0
- package/dist/components/atoms/UserOption/styles.js +20 -0
- package/dist/components/atoms/UserSelector/UserSelector.stories.js +40 -0
- package/dist/components/atoms/UserSelector/index.js +98 -0
- package/dist/components/atoms/UserSelector/styles.js +32 -0
- package/dist/components/molecules/GridItem/GridItem.stories.js +123 -0
- package/dist/components/molecules/GridItem/index.js +152 -0
- package/dist/components/molecules/GridItem/styles.js +20 -0
- package/dist/components/molecules/HeaderItem/ColumnItem.js +23 -0
- package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +70 -0
- package/dist/components/molecules/HeaderItem/index.js +42 -0
- package/dist/components/molecules/HeaderItem/styles.js +30 -0
- package/dist/components/molecules/RowItem/ColumnItem.js +23 -0
- package/dist/components/molecules/RowItem/RowItem.stories.js +5242 -0
- package/dist/components/molecules/RowItem/index.js +58 -0
- package/dist/components/molecules/RowItem/styles.js +30 -0
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +5097 -0
- package/dist/components/organisms/GridProducts/index.js +63 -0
- package/dist/components/organisms/GridProducts/styles.js +18 -0
- package/dist/components/organisms/GridProducts/utils.js +149 -0
- package/dist/components/pages/RetailerProductEdition/index.js +3 -3
- package/package.json +1 -1
- package/src/components/pages/RetailerProductEdition/index.js +3 -3
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GridProducts = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _GridItem = require("../../molecules/GridItem");
|
|
11
|
+
|
|
12
|
+
var _HeaderItem = require("../../molecules/HeaderItem");
|
|
13
|
+
|
|
14
|
+
var _RowItem = require("../../molecules/RowItem");
|
|
15
|
+
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
18
|
+
var GridProducts = function GridProducts(_ref) {
|
|
19
|
+
var _ref$products = _ref.products,
|
|
20
|
+
products = _ref$products === void 0 ? [] : _ref$products,
|
|
21
|
+
_ref$columnsArray = _ref.columnsArray,
|
|
22
|
+
columnsArray = _ref$columnsArray === void 0 ? [] : _ref$columnsArray,
|
|
23
|
+
_ref$gridView = _ref.gridView,
|
|
24
|
+
gridView = _ref$gridView === void 0 ? true : _ref$gridView,
|
|
25
|
+
chkOnChange = _ref.chkOnChange,
|
|
26
|
+
_ref$selected = _ref.selected,
|
|
27
|
+
selected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
28
|
+
chkChecked = _ref.chkChecked,
|
|
29
|
+
checkAll = _ref.checkAll,
|
|
30
|
+
chkCheckedAll = _ref.chkCheckedAll,
|
|
31
|
+
onGridClick = _ref.onGridClick;
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
33
|
+
children: !gridView ? products === null || products === void 0 ? void 0 : products.map(function (_ref2, i) {
|
|
34
|
+
var gridElement = _ref2.gridElement,
|
|
35
|
+
product = _ref2.product,
|
|
36
|
+
id = _ref2.id;
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridItem.GridItem, {
|
|
38
|
+
id: id,
|
|
39
|
+
index: i,
|
|
40
|
+
product: product,
|
|
41
|
+
gridElement: gridElement,
|
|
42
|
+
chkOnChange: chkOnChange,
|
|
43
|
+
onGridClick: onGridClick,
|
|
44
|
+
selected: selected,
|
|
45
|
+
chkChecked: chkChecked
|
|
46
|
+
}, i);
|
|
47
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
48
|
+
className: "table-view",
|
|
49
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderItem.HeaderItem, {
|
|
50
|
+
columnsArray: columnsArray,
|
|
51
|
+
checkAll: checkAll,
|
|
52
|
+
chkCheckedAll: chkCheckedAll
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowItem.RowItem, {
|
|
54
|
+
productsArray: products,
|
|
55
|
+
chkOnChange: chkOnChange,
|
|
56
|
+
onGridClick: onGridClick,
|
|
57
|
+
chkChecked: chkChecked
|
|
58
|
+
})]
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
exports.GridProducts = GridProducts;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n height: calc(100% - 100px);\n overflow: auto;\n\n .table-view {\n height: 100%;\n width: 100%;\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getProductsToTable = void 0;
|
|
7
|
+
|
|
8
|
+
var _RetailerCatalog = require("../../atoms/RetailerCatalog");
|
|
9
|
+
|
|
10
|
+
var _UserCatalog = require("../../atoms/UserCatalog");
|
|
11
|
+
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
14
|
+
var getProductsToTable = function getProductsToTable() {
|
|
15
|
+
var products = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
16
|
+
var textSpecialists = arguments.length > 1 ? arguments[1] : undefined;
|
|
17
|
+
var imagesSpecialists = arguments.length > 2 ? arguments[2] : undefined;
|
|
18
|
+
var auditors = arguments.length > 3 ? arguments[3] : undefined;
|
|
19
|
+
var images = arguments.length > 4 ? arguments[4] : undefined;
|
|
20
|
+
var onAssign = arguments.length > 5 ? arguments[5] : undefined;
|
|
21
|
+
var productsTableArray = [];
|
|
22
|
+
products.forEach(function (product) {
|
|
23
|
+
var article = product.article,
|
|
24
|
+
orderId = product.orderId,
|
|
25
|
+
upc = product.upc,
|
|
26
|
+
status = product.status,
|
|
27
|
+
version = product.version;
|
|
28
|
+
var id = (article === null || article === void 0 ? void 0 : article.id_article) + "-" + orderId;
|
|
29
|
+
var imgArray = images[(article === null || article === void 0 ? void 0 : article.id_article) + "-" + version];
|
|
30
|
+
var element = {
|
|
31
|
+
id: id,
|
|
32
|
+
cols: [{
|
|
33
|
+
name: (article === null || article === void 0 ? void 0 : article.country) || "-",
|
|
34
|
+
flex: 1,
|
|
35
|
+
minWidth: 100
|
|
36
|
+
}, {
|
|
37
|
+
name: orderId || "-",
|
|
38
|
+
flex: 1,
|
|
39
|
+
minWidth: 100
|
|
40
|
+
}, {
|
|
41
|
+
name: upc || "-",
|
|
42
|
+
flex: 1,
|
|
43
|
+
minWidth: 100
|
|
44
|
+
}, {
|
|
45
|
+
name: (article === null || article === void 0 ? void 0 : article.name) || "-",
|
|
46
|
+
flex: 1,
|
|
47
|
+
minWidth: 200
|
|
48
|
+
}, {
|
|
49
|
+
name: "S/M" || "-",
|
|
50
|
+
flex: 1,
|
|
51
|
+
minWidth: 100
|
|
52
|
+
}, {
|
|
53
|
+
name: status || "-",
|
|
54
|
+
flex: 1,
|
|
55
|
+
minWidth: 100
|
|
56
|
+
}, {
|
|
57
|
+
name: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
|
|
58
|
+
id: "retailers-" + id,
|
|
59
|
+
article: product,
|
|
60
|
+
retailers: product.retailers
|
|
61
|
+
}),
|
|
62
|
+
flex: 1,
|
|
63
|
+
minWidth: 100
|
|
64
|
+
}, {
|
|
65
|
+
name: product.prio,
|
|
66
|
+
flex: 1,
|
|
67
|
+
minWidth: 100
|
|
68
|
+
}, {
|
|
69
|
+
name: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
|
|
70
|
+
datasheet: article.id_datasheet_especialist,
|
|
71
|
+
description: article.id_description_especialist,
|
|
72
|
+
images: article.id_images_especialist,
|
|
73
|
+
auditor: article.id_auditor,
|
|
74
|
+
textSpecialists: textSpecialists,
|
|
75
|
+
imagesSpecialists: imagesSpecialists,
|
|
76
|
+
auditors: auditors,
|
|
77
|
+
id: "users-" + id,
|
|
78
|
+
product: product,
|
|
79
|
+
onAssign: onAssign
|
|
80
|
+
}),
|
|
81
|
+
flex: 1,
|
|
82
|
+
minWidth: 100
|
|
83
|
+
}, {
|
|
84
|
+
name: "Cont.",
|
|
85
|
+
flex: 1,
|
|
86
|
+
minWidth: 100
|
|
87
|
+
}],
|
|
88
|
+
gridElement: {
|
|
89
|
+
images: imgArray,
|
|
90
|
+
info: [{
|
|
91
|
+
title: "name",
|
|
92
|
+
value: (article === null || article === void 0 ? void 0 : article.name) || "-"
|
|
93
|
+
}, {
|
|
94
|
+
title: "order",
|
|
95
|
+
value: orderId || "-"
|
|
96
|
+
}, {
|
|
97
|
+
title: "category",
|
|
98
|
+
value: (article === null || article === void 0 ? void 0 : article.category) || "-"
|
|
99
|
+
}, {
|
|
100
|
+
title: "company",
|
|
101
|
+
value: (article === null || article === void 0 ? void 0 : article.company_name) || "-"
|
|
102
|
+
}, {
|
|
103
|
+
title: "price",
|
|
104
|
+
value: (article === null || article === void 0 ? void 0 : article.price) || "-"
|
|
105
|
+
}],
|
|
106
|
+
status: [{
|
|
107
|
+
title: "datasheet",
|
|
108
|
+
value: product === null || product === void 0 ? void 0 : product.datasheet_status,
|
|
109
|
+
percent: 80
|
|
110
|
+
}, {
|
|
111
|
+
title: "description",
|
|
112
|
+
value: product === null || product === void 0 ? void 0 : product.description_status,
|
|
113
|
+
percent: 80
|
|
114
|
+
}, {
|
|
115
|
+
title: "images",
|
|
116
|
+
value: product === null || product === void 0 ? void 0 : product.images_status,
|
|
117
|
+
percent: 80
|
|
118
|
+
}],
|
|
119
|
+
catalogs: {
|
|
120
|
+
leftSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerCatalog.RetailerCatalog, {
|
|
121
|
+
id: "retailers-" + id,
|
|
122
|
+
limit: 2,
|
|
123
|
+
article: product,
|
|
124
|
+
retailers: product.retailers
|
|
125
|
+
}),
|
|
126
|
+
rightSide: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserCatalog.UserCatalog, {
|
|
127
|
+
datasheet: article.id_datasheet_especialist,
|
|
128
|
+
description: article.id_description_especialist,
|
|
129
|
+
images: article.id_images_especialist,
|
|
130
|
+
auditor: article.id_auditor,
|
|
131
|
+
textSpecialists: textSpecialists,
|
|
132
|
+
imagesSpecialists: imagesSpecialists,
|
|
133
|
+
auditors: auditors,
|
|
134
|
+
id: "users-" + id,
|
|
135
|
+
product: product,
|
|
136
|
+
onAssign: onAssign
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
showBottom: true,
|
|
141
|
+
product: product,
|
|
142
|
+
article: article
|
|
143
|
+
};
|
|
144
|
+
productsTableArray.push(element);
|
|
145
|
+
});
|
|
146
|
+
return productsTableArray;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
exports.getProductsToTable = getProductsToTable;
|
|
@@ -1351,7 +1351,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1351
1351
|
|
|
1352
1352
|
body.isAproved = result === "A";
|
|
1353
1353
|
_context11.next = 12;
|
|
1354
|
-
return _axios.default.
|
|
1354
|
+
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), body, {
|
|
1355
1355
|
headers: {
|
|
1356
1356
|
Authorization: token
|
|
1357
1357
|
}
|
|
@@ -1376,7 +1376,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
1378
|
_context11.next = 21;
|
|
1379
|
-
return _axios.default.
|
|
1379
|
+
return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), body, {
|
|
1380
1380
|
headers: {
|
|
1381
1381
|
Authorization: token
|
|
1382
1382
|
}
|
|
@@ -1839,7 +1839,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
|
|
|
1839
1839
|
};
|
|
1840
1840
|
conceptArray.forEach(function (concept) {
|
|
1841
1841
|
body.service = concept;
|
|
1842
|
-
evaluationArray.push(_axios.default.
|
|
1842
|
+
evaluationArray.push(_axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), body, {
|
|
1843
1843
|
headers: {
|
|
1844
1844
|
Authorization: token
|
|
1845
1845
|
}
|
package/package.json
CHANGED
|
@@ -829,7 +829,7 @@ export const RetailerProductEdition = ({
|
|
|
829
829
|
let message;
|
|
830
830
|
if (result) {
|
|
831
831
|
body.isAproved = result === "A";
|
|
832
|
-
res = await axios.
|
|
832
|
+
res = await axios.put(
|
|
833
833
|
`${process.env.REACT_APP_EVALUATION_ENDPOINT}`,
|
|
834
834
|
body,
|
|
835
835
|
{
|
|
@@ -850,7 +850,7 @@ export const RetailerProductEdition = ({
|
|
|
850
850
|
message = "Evaluación enviada";
|
|
851
851
|
getSectionIcon();
|
|
852
852
|
}
|
|
853
|
-
res = await axios.
|
|
853
|
+
res = await axios.put(
|
|
854
854
|
`${process.env.REACT_APP_EVALUATION_ENDPOINT}`,
|
|
855
855
|
body,
|
|
856
856
|
{
|
|
@@ -1235,7 +1235,7 @@ export const RetailerProductEdition = ({
|
|
|
1235
1235
|
conceptArray.forEach((concept) => {
|
|
1236
1236
|
body.service = concept;
|
|
1237
1237
|
evaluationArray.push(
|
|
1238
|
-
axios.
|
|
1238
|
+
axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, body, {
|
|
1239
1239
|
headers: {
|
|
1240
1240
|
Authorization: token,
|
|
1241
1241
|
},
|