contentoh-components-library 21.3.97 → 21.3.99
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/RetailerCatalog/index.js +4 -4
- package/dist/components/atoms/RetailersList/index.js +3 -1
- package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +1 -0
- package/dist/components/atoms/UserCatalog/index.js +23 -9
- package/dist/components/atoms/UserOption/index.js +49 -2
- package/dist/components/atoms/UserOption/styles.js +1 -1
- package/dist/components/atoms/UserSelector/index.js +13 -4
- package/dist/components/molecules/GridItem/index.js +4 -3
- package/dist/components/molecules/GridItem/styles.js +1 -1
- package/dist/components/molecules/HeaderItem/styles.js +1 -1
- package/dist/components/molecules/RowItem/index.js +1 -1
- package/dist/components/organisms/GridProducts/GridProducts.stories.js +7 -3
- package/dist/components/organisms/GridProducts/index.js +1 -6
- package/dist/components/organisms/GridProducts/utils.js +6 -2
- package/dist/index.js +72 -59
- package/package.json +1 -1
- package/src/components/atoms/RetailerCatalog/index.js +3 -4
- package/src/components/atoms/RetailersList/index.js +2 -2
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +1 -0
- package/src/components/atoms/UserCatalog/index.js +21 -2
- package/src/components/atoms/UserOption/index.js +40 -1
- package/src/components/atoms/UserOption/styles.js +8 -1
- package/src/components/atoms/UserSelector/index.js +22 -4
- package/src/components/molecules/GridItem/index.js +2 -1
- package/src/components/molecules/GridItem/styles.js +1 -1
- package/src/components/molecules/HeaderItem/styles.js +2 -0
- package/src/components/molecules/RowItem/index.js +1 -1
- package/src/components/organisms/GridProducts/GridProducts.stories.js +14 -3
- package/src/components/organisms/GridProducts/index.js +1 -4
- package/src/components/organisms/GridProducts/utils.js +5 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/index.js +1 -0
|
@@ -42,11 +42,10 @@ var RetailerCatalog = function RetailerCatalog(_ref) {
|
|
|
42
42
|
|
|
43
43
|
(0, _react.useEffect)(function () {
|
|
44
44
|
setRetLimit(limit);
|
|
45
|
-
console.log("limit");
|
|
46
45
|
}, [retailers]);
|
|
47
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
onClick: function onClick(e) {
|
|
48
|
+
e.stopPropagation();
|
|
50
49
|
setShowRetailers(true);
|
|
51
50
|
},
|
|
52
51
|
children: [retailers.map(function (retailer, i) {
|
|
@@ -62,7 +61,8 @@ var RetailerCatalog = function RetailerCatalog(_ref) {
|
|
|
62
61
|
})
|
|
63
62
|
}), showRetailers && /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailersList.RetailersList, {
|
|
64
63
|
retailers: retailers,
|
|
65
|
-
article: article
|
|
64
|
+
article: article,
|
|
65
|
+
id: id
|
|
66
66
|
})]
|
|
67
67
|
});
|
|
68
68
|
};
|
|
@@ -21,7 +21,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
21
|
|
|
22
22
|
var RetailersList = function RetailersList(_ref) {
|
|
23
23
|
var retailers = _ref.retailers,
|
|
24
|
-
article = _ref.article
|
|
24
|
+
article = _ref.article,
|
|
25
|
+
id = _ref.id;
|
|
25
26
|
|
|
26
27
|
var _useState = (0, _react.useState)({}),
|
|
27
28
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -32,6 +33,7 @@ var RetailersList = function RetailersList(_ref) {
|
|
|
32
33
|
if (article) setServices(article.statusByRetailer);
|
|
33
34
|
}, [article]);
|
|
34
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
36
|
+
id: id,
|
|
35
37
|
children: retailers.map(function (retailer, i) {
|
|
36
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RetailerOption.RetailerOption, {
|
|
37
39
|
retailer: retailer,
|
|
@@ -17,10 +17,10 @@ var _data = require("../../../global-files/data");
|
|
|
17
17
|
|
|
18
18
|
var _UserOption = require("../UserOption");
|
|
19
19
|
|
|
20
|
-
var _react = require("react");
|
|
21
|
-
|
|
22
20
|
var _customHooks = require("../../../global-files/customHooks");
|
|
23
21
|
|
|
22
|
+
var _react = require("react");
|
|
23
|
+
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
26
|
var UserCatalog = function UserCatalog(_ref) {
|
|
@@ -35,7 +35,9 @@ var UserCatalog = function UserCatalog(_ref) {
|
|
|
35
35
|
_ref$imagesSpecialist = _ref.imagesSpecialists,
|
|
36
36
|
imagesSpecialists = _ref$imagesSpecialist === void 0 ? [] : _ref$imagesSpecialist,
|
|
37
37
|
_ref$id = _ref.id,
|
|
38
|
-
id = _ref$id === void 0 ? "list-modal" : _ref$id
|
|
38
|
+
id = _ref$id === void 0 ? "list-modal" : _ref$id,
|
|
39
|
+
onAssign = _ref.onAssign,
|
|
40
|
+
product = _ref.product;
|
|
39
41
|
|
|
40
42
|
var _useCloseModal = (0, _customHooks.useCloseModal)(id),
|
|
41
43
|
_useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
|
|
@@ -43,10 +45,10 @@ var UserCatalog = function UserCatalog(_ref) {
|
|
|
43
45
|
setShowList = _useCloseModal2[1];
|
|
44
46
|
|
|
45
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
48
|
+
id: id,
|
|
46
49
|
onClick: function onClick() {
|
|
47
|
-
|
|
50
|
+
setShowList(true);
|
|
48
51
|
},
|
|
49
|
-
id: id,
|
|
50
52
|
children: [datasheet && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
51
53
|
image: (0, _data.getProfilePicture)(datasheet, 26, 26),
|
|
52
54
|
altText: "datasheet specialist",
|
|
@@ -66,21 +68,33 @@ var UserCatalog = function UserCatalog(_ref) {
|
|
|
66
68
|
}), showList && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
67
69
|
className: "users-assigned-list",
|
|
68
70
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
71
|
+
onAssign: onAssign,
|
|
72
|
+
product: product,
|
|
69
73
|
userId: datasheet,
|
|
70
74
|
usersArray: textSpecialists,
|
|
71
|
-
id: id + "-" + datasheet
|
|
75
|
+
id: id + "-" + datasheet,
|
|
76
|
+
index: "datasheet"
|
|
72
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
78
|
+
onAssign: onAssign,
|
|
79
|
+
product: product,
|
|
73
80
|
userId: description,
|
|
74
81
|
usersArray: textSpecialists,
|
|
75
|
-
id: id + "-" + description
|
|
82
|
+
id: id + "-" + description,
|
|
83
|
+
index: "description"
|
|
76
84
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
85
|
+
onAssign: onAssign,
|
|
86
|
+
product: product,
|
|
77
87
|
userId: images,
|
|
78
88
|
usersArray: imagesSpecialists,
|
|
79
|
-
id: id + "-" + images
|
|
89
|
+
id: id + "-" + images,
|
|
90
|
+
index: "image"
|
|
80
91
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserOption.UserOption, {
|
|
92
|
+
onAssign: onAssign,
|
|
93
|
+
product: product,
|
|
81
94
|
userId: auditor,
|
|
82
95
|
usersArray: auditors,
|
|
83
|
-
id: id + "-" + auditor
|
|
96
|
+
id: id + "-" + auditor,
|
|
97
|
+
index: "auditor"
|
|
84
98
|
})]
|
|
85
99
|
})]
|
|
86
100
|
});
|
|
@@ -29,7 +29,9 @@ var UserOption = function UserOption(_ref) {
|
|
|
29
29
|
var userId = _ref.userId,
|
|
30
30
|
index = _ref.index,
|
|
31
31
|
usersArray = _ref.usersArray,
|
|
32
|
-
id = _ref.id
|
|
32
|
+
id = _ref.id,
|
|
33
|
+
onAssign = _ref.onAssign,
|
|
34
|
+
product = _ref.product;
|
|
33
35
|
|
|
34
36
|
var _useState = (0, _react.useState)({}),
|
|
35
37
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -41,6 +43,21 @@ var UserOption = function UserOption(_ref) {
|
|
|
41
43
|
showSelector = _useCloseModal2[0],
|
|
42
44
|
setShowSelector = _useCloseModal2[1];
|
|
43
45
|
|
|
46
|
+
var _useState3 = (0, _react.useState)(""),
|
|
47
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
48
|
+
assignationTarget = _useState4[0],
|
|
49
|
+
setAssignationTarget = _useState4[1];
|
|
50
|
+
|
|
51
|
+
var _useState5 = (0, _react.useState)(""),
|
|
52
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
53
|
+
concept = _useState6[0],
|
|
54
|
+
setConcept = _useState6[1];
|
|
55
|
+
|
|
56
|
+
var _useState7 = (0, _react.useState)(""),
|
|
57
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
58
|
+
target = _useState8[0],
|
|
59
|
+
setTarget = _useState8[1];
|
|
60
|
+
|
|
44
61
|
var icons = _utils.servicesCodeIcon;
|
|
45
62
|
(0, _react.useEffect)(function () {
|
|
46
63
|
if (usersArray) {
|
|
@@ -51,6 +68,31 @@ var UserOption = function UserOption(_ref) {
|
|
|
51
68
|
});
|
|
52
69
|
}
|
|
53
70
|
}, [userId, usersArray]);
|
|
71
|
+
(0, _react.useEffect)(function () {
|
|
72
|
+
switch (index) {
|
|
73
|
+
case "datasheet":
|
|
74
|
+
case "description":
|
|
75
|
+
setAssignationTarget("id_".concat(index, "_specialist"));
|
|
76
|
+
setConcept(index);
|
|
77
|
+
setTarget("specialist");
|
|
78
|
+
break;
|
|
79
|
+
|
|
80
|
+
case "image":
|
|
81
|
+
setAssignationTarget("id_".concat(index, "s_specialist"));
|
|
82
|
+
setConcept(index + "s");
|
|
83
|
+
setTarget("specialist");
|
|
84
|
+
break;
|
|
85
|
+
|
|
86
|
+
case "auditor":
|
|
87
|
+
setAssignationTarget("id_".concat(index));
|
|
88
|
+
setConcept(index);
|
|
89
|
+
setTarget(index);
|
|
90
|
+
break;
|
|
91
|
+
|
|
92
|
+
default:
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}, [index]);
|
|
54
96
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
55
97
|
onClick: function onClick() {
|
|
56
98
|
return setShowSelector(true);
|
|
@@ -72,7 +114,12 @@ var UserOption = function UserOption(_ref) {
|
|
|
72
114
|
searchLabel: "Buscar Usuario",
|
|
73
115
|
index: index,
|
|
74
116
|
usersArray: usersArray,
|
|
75
|
-
position: "absolute"
|
|
117
|
+
position: "absolute",
|
|
118
|
+
onAssign: onAssign,
|
|
119
|
+
product: product,
|
|
120
|
+
assignationTarget: assignationTarget,
|
|
121
|
+
target: target,
|
|
122
|
+
concept: concept
|
|
76
123
|
})]
|
|
77
124
|
});
|
|
78
125
|
};
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid #f0f0f0;\n border-radius: 5px;\n color: #262626;\n font-size: 12px;\n font-family: ", ";\n display: flex;\n align-items: center;\n padding: 5px 10px;\n justify-content: space-between;\n cursor: pointer;\n position: relative;\n background-color: white;\n
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid #f0f0f0;\n border-radius: 5px;\n color: #262626;\n font-size: 12px;\n font-family: ", ";\n display: flex;\n align-items: center;\n padding: 5px 10px;\n justify-content: space-between;\n cursor: pointer;\n position: relative;\n background-color: white;\n\n .image-and-name {\n display: flex;\n align-items: center;\n\n div + p {\n margin-left: 10px;\n white-space: nowrap;\n }\n\n & + * {\n margin-left: 10px;\n }\n }\n\n .icon-container {\n position: relative;\n span {\n color: #808080;\n cursor: pointer;\n\n & + span {\n display: none;\n position: absolute;\n right: 120%;\n top: 50%;\n transform: translateY(-50%);\n white-space: nowrap;\n border: 1px solid #f0f0f0;\n padding: 5px;\n background-color: white;\n }\n\n &:hover {\n & + span {\n display: block;\n }\n }\n }\n }\n\n & + * {\n margin-top: 5px;\n }\n"])), _variables.FontFamily.Lato);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -21,14 +21,20 @@ var _data = require("../../../global-files/data");
|
|
|
21
21
|
|
|
22
22
|
var _react = require("react");
|
|
23
23
|
|
|
24
|
+
var _customHooks = require("../../../global-files/customHooks");
|
|
25
|
+
|
|
24
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
27
|
|
|
26
28
|
var UserSelector = function UserSelector(_ref) {
|
|
27
29
|
var searchLabel = _ref.searchLabel,
|
|
28
|
-
index = _ref.index,
|
|
29
30
|
usersArray = _ref.usersArray,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
position = _ref.position,
|
|
32
|
+
id = _ref.id,
|
|
33
|
+
onAssign = _ref.onAssign,
|
|
34
|
+
product = _ref.product,
|
|
35
|
+
assignationTarget = _ref.assignationTarget,
|
|
36
|
+
target = _ref.target,
|
|
37
|
+
concept = _ref.concept;
|
|
32
38
|
|
|
33
39
|
var _useState = (0, _react.useState)([]),
|
|
34
40
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -53,6 +59,7 @@ var UserSelector = function UserSelector(_ref) {
|
|
|
53
59
|
|
|
54
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
55
61
|
position: position,
|
|
62
|
+
id: id,
|
|
56
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
57
64
|
className: "search-cotainer",
|
|
58
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
@@ -70,7 +77,9 @@ var UserSelector = function UserSelector(_ref) {
|
|
|
70
77
|
children: userFiltered.length ? userFiltered.map(function (user) {
|
|
71
78
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
79
|
className: "user-item",
|
|
73
|
-
onClick: onClick
|
|
80
|
+
onClick: function onClick(e) {
|
|
81
|
+
return onAssign && onAssign(product, user.id_user, assignationTarget, target, concept);
|
|
82
|
+
},
|
|
74
83
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
75
84
|
image: (0, _data.getProfilePicture)(user.id_user, 26, 26),
|
|
76
85
|
altText: "profile image",
|
|
@@ -33,7 +33,8 @@ var GridItem = function GridItem(_ref) {
|
|
|
33
33
|
isMerchans = _ref.isMerchans,
|
|
34
34
|
chkOnChange = _ref.chkOnChange,
|
|
35
35
|
onGridClick = _ref.onGridClick,
|
|
36
|
-
chkChecked = _ref.chkChecked
|
|
36
|
+
chkChecked = _ref.chkChecked,
|
|
37
|
+
index = _ref.index;
|
|
37
38
|
var _gridElement$images = gridElement.images,
|
|
38
39
|
images = _gridElement$images === void 0 ? [] : _gridElement$images,
|
|
39
40
|
_gridElement$info = gridElement.info,
|
|
@@ -43,8 +44,8 @@ var GridItem = function GridItem(_ref) {
|
|
|
43
44
|
_gridElement$catalogs = gridElement.catalogs,
|
|
44
45
|
catalogs = _gridElement$catalogs === void 0 ? {} : _gridElement$catalogs;
|
|
45
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
46
|
-
onClick: function onClick() {
|
|
47
|
-
return onGridClick && onGridClick(product);
|
|
47
|
+
onClick: function onClick(e) {
|
|
48
|
+
return onGridClick && onGridClick(e, product, index);
|
|
48
49
|
},
|
|
49
50
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
50
51
|
className: "chk-container",
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 175px;\n border: 1px solid #f0f0f0;\n position: relative;\n\n .chk-container {\n position: absolute;\n top: 5px;\n left: 5px;\n z-index:
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 175px;\n border: 1px solid #f0f0f0;\n position: relative;\n\n .chk-container {\n position: absolute;\n top: 5px;\n left: 5px;\n z-index: 5;\n height: 16px;\n }\n\n .data-body {\n padding: 10px;\n border-bottom: 1px solid #f0f0f0;\n\n h3,\n p {\n color: #262626;\n font-family: ", ";\n font-size: 12px;\n line-height: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n & + p {\n margin-top: 5px;\n }\n }\n p {\n font-size: 10px;\n line-height: 12px;\n color: #808080;\n }\n }\n\n .status-slider {\n display: flex;\n padding: 5px 10px;\n overflow: auto;\n border-bottom: 1px solid #f0f0f0;\n flex-wrap: nowrap;\n\n .status-element {\n display: flex;\n }\n\n * + * {\n margin-left: 10px;\n }\n }\n\n .cart-and-raiting,\n .retailers-and-user {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 5px 10px;\n .star-button {\n button {\n padding: 3px;\n color: transparent;\n -webkit-text-stroke: 1px #808080;\n }\n }\n }\n\n .retailers-and-user {\n padding: 0;\n > * {\n flex: 1 0 50%;\n display: flex;\n padding: 5px;\n height: 36px;\n }\n .retailers-container {\n border-right: 1px solid #f0f0f0;\n }\n }\n"])), _variables.FontFamily.Lato);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: #f0f0f0;\n display: flex;\n\n .chk-global-container {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 30px;\n }\n"])));
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: #f0f0f0;\n display: flex;\n width: 100%;\n min-width: fit-content;\n\n .chk-global-container {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 30px;\n }\n"])));
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ var RowItem = function RowItem(_ref) {
|
|
|
28
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
29
29
|
className: "row-container",
|
|
30
30
|
onClick: function onClick(e) {
|
|
31
|
-
return onGridClick && onGridClick(product);
|
|
31
|
+
return onGridClick && onGridClick(e, product, i);
|
|
32
32
|
},
|
|
33
33
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
34
|
className: "chk-container",
|
|
@@ -5008,11 +5008,15 @@ var setSelected = function setSelected(arr) {
|
|
|
5008
5008
|
selected = arr;
|
|
5009
5009
|
};
|
|
5010
5010
|
|
|
5011
|
+
var onAssign = function onAssign(productData, assigneeID, assignationTarget, concept, target) {
|
|
5012
|
+
console.log(productData, assigneeID, assignationTarget, concept, target);
|
|
5013
|
+
};
|
|
5014
|
+
|
|
5011
5015
|
GridProductsDefault.args = {
|
|
5012
5016
|
gridView: false,
|
|
5013
5017
|
selected: selected,
|
|
5014
5018
|
setSelected: setSelected,
|
|
5015
|
-
products: (0, _utils.getProductsToTable)(products, textSpecialists, imagesSpecialists, auditors, images),
|
|
5019
|
+
products: (0, _utils.getProductsToTable)(products, textSpecialists, imagesSpecialists, auditors, images, onAssign),
|
|
5016
5020
|
images: images,
|
|
5017
5021
|
auditors: auditors,
|
|
5018
5022
|
textSpecialists: textSpecialists,
|
|
@@ -5077,8 +5081,8 @@ GridProductsDefault.args = {
|
|
|
5077
5081
|
});
|
|
5078
5082
|
return (productSelected === null || productSelected === void 0 ? void 0 : productSelected.length) > 0;
|
|
5079
5083
|
},
|
|
5080
|
-
onGridClick: function onGridClick(e) {
|
|
5081
|
-
console.log(
|
|
5084
|
+
onGridClick: function onGridClick(e, product, i) {
|
|
5085
|
+
if (!e.target.closest("[id^=users]")) console.log(product, i);
|
|
5082
5086
|
},
|
|
5083
5087
|
chkCheckedAll: function chkCheckedAll() {
|
|
5084
5088
|
return selected.length === products.length;
|
|
@@ -11,14 +11,8 @@ var _GridItem = require("../../molecules/GridItem");
|
|
|
11
11
|
|
|
12
12
|
var _HeaderItem = require("../../molecules/HeaderItem");
|
|
13
13
|
|
|
14
|
-
var _utils = require("./utils");
|
|
15
|
-
|
|
16
|
-
var _react = require("react");
|
|
17
|
-
|
|
18
14
|
var _RowItem = require("../../molecules/RowItem");
|
|
19
15
|
|
|
20
|
-
var _CheckBox = require("../../atoms/CheckBox");
|
|
21
|
-
|
|
22
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
17
|
|
|
24
18
|
var GridProducts = function GridProducts(_ref) {
|
|
@@ -42,6 +36,7 @@ var GridProducts = function GridProducts(_ref) {
|
|
|
42
36
|
id = _ref2.id;
|
|
43
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridItem.GridItem, {
|
|
44
38
|
id: id,
|
|
39
|
+
index: i,
|
|
45
40
|
product: product,
|
|
46
41
|
gridElement: gridElement,
|
|
47
42
|
chkOnChange: chkOnChange,
|
|
@@ -17,6 +17,7 @@ var getProductsToTable = function getProductsToTable() {
|
|
|
17
17
|
var imagesSpecialists = arguments.length > 2 ? arguments[2] : undefined;
|
|
18
18
|
var auditors = arguments.length > 3 ? arguments[3] : undefined;
|
|
19
19
|
var images = arguments.length > 4 ? arguments[4] : undefined;
|
|
20
|
+
var onAssign = arguments.length > 5 ? arguments[5] : undefined;
|
|
20
21
|
var productsTableArray = [];
|
|
21
22
|
products.forEach(function (product) {
|
|
22
23
|
var article = product.article,
|
|
@@ -72,7 +73,8 @@ var getProductsToTable = function getProductsToTable() {
|
|
|
72
73
|
textSpecialists: textSpecialists,
|
|
73
74
|
imagesSpecialists: imagesSpecialists,
|
|
74
75
|
auditors: auditors,
|
|
75
|
-
id: "users-" + id
|
|
76
|
+
id: "users-" + id,
|
|
77
|
+
product: product
|
|
76
78
|
}),
|
|
77
79
|
flex: 1,
|
|
78
80
|
minWidth: 100
|
|
@@ -123,7 +125,9 @@ var getProductsToTable = function getProductsToTable() {
|
|
|
123
125
|
textSpecialists: textSpecialists,
|
|
124
126
|
imagesSpecialists: imagesSpecialists,
|
|
125
127
|
auditors: auditors,
|
|
126
|
-
id: "users-" + id
|
|
128
|
+
id: "users-" + id,
|
|
129
|
+
onAssign: onAssign,
|
|
130
|
+
product: product
|
|
127
131
|
})
|
|
128
132
|
}
|
|
129
133
|
},
|