contentoh-components-library 21.4.128 → 21.4.130
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/images/Icons/save-white-gray.svg +1 -1
- package/dist/assets/images/Icons/save-white.svg +1 -1
- package/dist/components/atoms/GeneralInput/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/index.js +4 -3
- package/dist/components/molecules/GalleryElement/index.js +1 -1
- package/dist/components/organisms/InputGroup/index.js +32 -30
- package/dist/components/organisms/Table/index.js +16 -2
- package/dist/components/pages/MultipleEdition/MultipleEdition.stories.js +2 -2
- package/dist/components/pages/MultipleEdition/index.js +2 -1
- package/dist/components/pages/MultipleEdition/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/utils.js +20 -3
- package/package.json +1 -1
- package/src/assets/images/Icons/save-white-gray.svg +1 -1
- package/src/assets/images/Icons/save-white.svg +1 -1
- package/src/components/atoms/GeneralInput/styles.js +1 -1
- package/src/components/atoms/InputFormatter/index.js +2 -1
- package/src/components/molecules/GalleryElement/index.js +50 -46
- package/src/components/organisms/InputGroup/index.js +48 -38
- package/src/components/organisms/Table/index.js +12 -2
- package/src/components/pages/MultipleEdition/MultipleEdition.stories.js +2 -2
- package/src/components/pages/MultipleEdition/index.js +1 -0
- package/src/components/pages/MultipleEdition/styles.js +1 -6
- package/src/components/pages/MultipleEdition/utils.js +16 -0
- package/dist/components/atoms/GeneralInput/style.js +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<rect width="34" height="34" rx="17" fill="#F0F0F0"/>
|
|
3
3
|
<mask id="mask0_346_670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="14" height="14">
|
|
4
4
|
<rect x="10" y="10" width="14" height="14" fill="#D9D9D9"/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<rect width="34" height="34" rx="17" fill="#E33AA9"/>
|
|
3
3
|
<mask id="mask0_346_670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="14" height="14">
|
|
4
4
|
<rect x="10" y="10" width="14" height="14" fill="#D9D9D9"/>
|
|
@@ -15,7 +15,7 @@ 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: 100%;\n\n > div {\n label {\n &:before {\n outline: 1px solid ", ";\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius:
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n\n > div {\n label {\n &:before {\n outline: 1px solid ", ";\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 5px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n select {\n background: #fafafa;\n outline: none;\n border: 1px solid\n ", ";\n width: 100%;\n cursor: pointer;\n font-family: ", ";\n color: ", ";\n font-size: 12px;\n line-height: 21px;\n padding: 10px;\n border-right: 2px solid #e33aa9;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n p {\n font-family: ", ";\n font-size: 12px;\n color: ", ";\n }\n\n &.audit-class {\n input,\n .quill {\n border: 1px solid #8a6caa;\n background-color: #ededfc;\n }\n }\n\n .btnReviewState {\n display: \"flex\";\n flex-direction: \"column\";\n border: 1px solid lightgray;\n border-radius: 3px;\n z-index: 1000;\n /* position: absolute; */\n }\n\n .btnReviewState button {\n border: none;\n background: white;\n border-radius: 3px;\n }\n .btnReviewState button:hover {\n background: lightgray;\n }\n"])), function (_ref) {
|
|
19
19
|
var isRequired = _ref.isRequired;
|
|
20
20
|
return isRequired ? "red" : "none";
|
|
21
21
|
}, function (_ref2) {
|
|
@@ -27,7 +27,8 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
27
27
|
updatedDescriptions = _ref.updatedDescriptions,
|
|
28
28
|
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
29
29
|
isRequired = _ref.isRequired,
|
|
30
|
-
maxChar = _ref.maxChar
|
|
30
|
+
maxChar = _ref.maxChar,
|
|
31
|
+
disabled = _ref.disabled;
|
|
31
32
|
|
|
32
33
|
var _useState = (0, _react.useState)(mainValue),
|
|
33
34
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -152,8 +153,8 @@ var InputFormatter = function InputFormatter(_ref) {
|
|
|
152
153
|
ref: function ref(el) {
|
|
153
154
|
return setQuill(el);
|
|
154
155
|
},
|
|
155
|
-
defaultValue: getValue(inputValue)
|
|
156
|
-
,
|
|
156
|
+
defaultValue: getValue(inputValue),
|
|
157
|
+
readOnly: disabled,
|
|
157
158
|
modules: {
|
|
158
159
|
toolbar: ["bold"]
|
|
159
160
|
},
|
|
@@ -197,7 +197,7 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
197
197
|
index: number
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
200
|
+
}), (image === null || image === void 0 ? void 0 : image.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
201
201
|
style: {
|
|
202
202
|
display: "flex",
|
|
203
203
|
"justify-content": "center",
|
|
@@ -189,38 +189,38 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
189
189
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
190
190
|
className: "inputs-container",
|
|
191
191
|
children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs = inputGroup.inputs) === null || _inputGroup$inputs === void 0 ? void 0 : _inputGroup$inputs.map(function (input, index) {
|
|
192
|
-
var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6,
|
|
192
|
+
var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _dataInputs$input7, _auditInputs$input, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _dataInputs$input13, _dataInputs$input14, _dataInputs$input15, _dataInputs$input16, _dataInputs$input17, _auditInputGroup$inpu, _auditInputGroup$inpu2;
|
|
193
193
|
|
|
194
194
|
return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
195
195
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
196
196
|
//disabled={input === 40001}
|
|
197
|
-
disabled: dataInputs[input].isApproved,
|
|
198
|
-
inputId: (_dataInputs$
|
|
197
|
+
disabled: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.isApproved,
|
|
198
|
+
inputId: (_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.id,
|
|
199
199
|
version: version,
|
|
200
|
-
inputType: inputTypeValue((_dataInputs$
|
|
201
|
-
label: ((_dataInputs$
|
|
202
|
-
value: compare ? (_auditInputs$input = auditInputs[input]) === null || _auditInputs$input === void 0 ? void 0 : _auditInputs$input.value : (_dataInputs$
|
|
200
|
+
inputType: inputTypeValue((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.type),
|
|
201
|
+
label: ((_dataInputs$input6 = dataInputs[input]) === null || _dataInputs$input6 === void 0 ? void 0 : _dataInputs$input6.name) + ((_dataInputs$input7 = dataInputs[input]) !== null && _dataInputs$input7 !== void 0 && _dataInputs$input7.required ? "*" : ""),
|
|
202
|
+
value: compare ? (_auditInputs$input = auditInputs[input]) === null || _auditInputs$input === void 0 ? void 0 : _auditInputs$input.value : (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.value,
|
|
203
203
|
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
204
204
|
articleId: articleId,
|
|
205
|
-
isRequired: (_dataInputs$
|
|
205
|
+
isRequired: (_dataInputs$input9 = dataInputs[input]) === null || _dataInputs$input9 === void 0 ? void 0 : _dataInputs$input9.required,
|
|
206
206
|
updatedDatasheets: updatedDatasheets,
|
|
207
207
|
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
208
|
-
maxChar: (_dataInputs$
|
|
209
|
-
optionList: (_dataInputs$
|
|
210
|
-
description: (_dataInputs$
|
|
208
|
+
maxChar: (_dataInputs$input10 = dataInputs[input]) !== null && _dataInputs$input10 !== void 0 && _dataInputs$input10.max_chars ? (_dataInputs$input11 = dataInputs[input]) === null || _dataInputs$input11 === void 0 ? void 0 : _dataInputs$input11.max_chars : 999,
|
|
209
|
+
optionList: (_dataInputs$input12 = dataInputs[input]) === null || _dataInputs$input12 === void 0 ? void 0 : _dataInputs$input12.option_list,
|
|
210
|
+
description: (_dataInputs$input13 = dataInputs[input]) === null || _dataInputs$input13 === void 0 ? void 0 : _dataInputs$input13.description,
|
|
211
211
|
showTooltip: true,
|
|
212
212
|
auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : ""
|
|
213
|
-
}, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id) + "-" + compare), /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
214
|
-
inputId: (_dataInputs$
|
|
215
|
-
isApproved: (_dataInputs$
|
|
216
|
-
comment: (_dataInputs$
|
|
213
|
+
}, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id) + "-" + compare), ((_dataInputs$input14 = dataInputs[input]) === null || _dataInputs$input14 === void 0 ? void 0 : _dataInputs$input14.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
214
|
+
inputId: (_dataInputs$input15 = dataInputs[input]) === null || _dataInputs$input15 === void 0 ? void 0 : _dataInputs$input15.id,
|
|
215
|
+
isApproved: (_dataInputs$input16 = dataInputs[input]) === null || _dataInputs$input16 === void 0 ? void 0 : _dataInputs$input16.isApproved,
|
|
216
|
+
comment: (_dataInputs$input17 = dataInputs[input]) === null || _dataInputs$input17 === void 0 ? void 0 : _dataInputs$input17.comment,
|
|
217
217
|
handleImgClick: handleImgClick,
|
|
218
218
|
changeImageBtn: changeImageBtn,
|
|
219
219
|
showDivState: showDivStates,
|
|
220
220
|
imageStates: imageStates
|
|
221
221
|
})]
|
|
222
222
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
223
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
223
|
+
children: [(input === null || input === void 0 ? void 0 : input.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
224
224
|
inputId: input === null || input === void 0 ? void 0 : input.id,
|
|
225
225
|
isApproved: input === null || input === void 0 ? void 0 : input.isApproved,
|
|
226
226
|
comment: input === null || input === void 0 ? void 0 : input.comment,
|
|
@@ -235,6 +235,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
235
235
|
label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
|
|
236
236
|
value: compare ? auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu === void 0 ? void 0 : _auditInputGroup$inpu.value : input === null || input === void 0 ? void 0 : input.value,
|
|
237
237
|
isRequired: input.required,
|
|
238
|
+
disabled: input === null || input === void 0 ? void 0 : input.isApproved,
|
|
238
239
|
maxChar: input.max_chars,
|
|
239
240
|
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
240
241
|
updatedDescriptions: updatedDescriptions,
|
|
@@ -257,41 +258,41 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
257
258
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
258
259
|
className: "inputs-container",
|
|
259
260
|
children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs2 = inputGroup.inputs) === null || _inputGroup$inputs2 === void 0 ? void 0 : _inputGroup$inputs2.map(function (input, index) {
|
|
260
|
-
var _dataInputs$
|
|
261
|
+
var _dataInputs$input18, _dataInputs$input19, _dataInputs$input20, _dataInputs$input21, _dataInputs$input22, _dataInputs$input23, _dataInputs$input24, _auditInputs$input2, _dataInputs$input25, _dataInputs$input26, _dataInputs$input27, _dataInputs$input28, _dataInputs$input29, _dataInputs$input30, _dataInputs$input31, _dataInputs$input32, _dataInputs$input33, _dataInputs$input34, _auditInputGroup$inpu3, _auditInputGroup$inpu4;
|
|
261
262
|
|
|
262
263
|
return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
263
264
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
264
265
|
//disabled={input === 40001}
|
|
265
|
-
disabled:
|
|
266
|
-
inputId: (_dataInputs$
|
|
266
|
+
disabled: (_dataInputs$input20 = dataInputs[input]) === null || _dataInputs$input20 === void 0 ? void 0 : _dataInputs$input20.isApproved,
|
|
267
|
+
inputId: (_dataInputs$input21 = dataInputs[input]) === null || _dataInputs$input21 === void 0 ? void 0 : _dataInputs$input21.id,
|
|
267
268
|
version: version,
|
|
268
|
-
inputType: inputTypeValue((_dataInputs$
|
|
269
|
-
label: ((_dataInputs$
|
|
270
|
-
value: compare ? (_auditInputs$input2 = auditInputs[input]) === null || _auditInputs$input2 === void 0 ? void 0 : _auditInputs$input2.value : (_dataInputs$
|
|
269
|
+
inputType: inputTypeValue((_dataInputs$input22 = dataInputs[input]) === null || _dataInputs$input22 === void 0 ? void 0 : _dataInputs$input22.type),
|
|
270
|
+
label: ((_dataInputs$input23 = dataInputs[input]) === null || _dataInputs$input23 === void 0 ? void 0 : _dataInputs$input23.name) + ((_dataInputs$input24 = dataInputs[input]) !== null && _dataInputs$input24 !== void 0 && _dataInputs$input24.required ? "*" : ""),
|
|
271
|
+
value: compare ? (_auditInputs$input2 = auditInputs[input]) === null || _auditInputs$input2 === void 0 ? void 0 : _auditInputs$input2.value : (_dataInputs$input25 = dataInputs[input]) === null || _dataInputs$input25 === void 0 ? void 0 : _dataInputs$input25.value,
|
|
271
272
|
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
272
273
|
articleId: articleId,
|
|
273
|
-
isRequired: (_dataInputs$
|
|
274
|
+
isRequired: (_dataInputs$input26 = dataInputs[input]) === null || _dataInputs$input26 === void 0 ? void 0 : _dataInputs$input26.required,
|
|
274
275
|
updatedDatasheets: updatedDatasheets,
|
|
275
276
|
setUpdatedDatasheets: setUpdatedDatasheets,
|
|
276
|
-
maxChar: (_dataInputs$
|
|
277
|
-
optionList: (_dataInputs$
|
|
278
|
-
description: (_dataInputs$
|
|
277
|
+
maxChar: (_dataInputs$input27 = dataInputs[input]) !== null && _dataInputs$input27 !== void 0 && _dataInputs$input27.max_chars ? (_dataInputs$input28 = dataInputs[input]) === null || _dataInputs$input28 === void 0 ? void 0 : _dataInputs$input28.max_chars : 999,
|
|
278
|
+
optionList: (_dataInputs$input29 = dataInputs[input]) === null || _dataInputs$input29 === void 0 ? void 0 : _dataInputs$input29.option_list,
|
|
279
|
+
description: (_dataInputs$input30 = dataInputs[input]) === null || _dataInputs$input30 === void 0 ? void 0 : _dataInputs$input30.description,
|
|
279
280
|
showTooltip: true,
|
|
280
281
|
inputGroup: inputGroup,
|
|
281
282
|
dataInputs: dataInputs,
|
|
282
283
|
onChange: setUpdatedBoxData,
|
|
283
284
|
auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : ""
|
|
284
|
-
}, index + "-" + ((_dataInputs$
|
|
285
|
-
inputId: (_dataInputs$
|
|
286
|
-
isApproved: (_dataInputs$
|
|
287
|
-
comment: (_dataInputs$
|
|
285
|
+
}, index + "-" + ((_dataInputs$input18 = dataInputs[input]) === null || _dataInputs$input18 === void 0 ? void 0 : _dataInputs$input18.value) + "-" + ((_dataInputs$input19 = dataInputs[input]) === null || _dataInputs$input19 === void 0 ? void 0 : _dataInputs$input19.id) + "-" + compare), ((_dataInputs$input31 = dataInputs[input]) === null || _dataInputs$input31 === void 0 ? void 0 : _dataInputs$input31.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
286
|
+
inputId: (_dataInputs$input32 = dataInputs[input]) === null || _dataInputs$input32 === void 0 ? void 0 : _dataInputs$input32.id,
|
|
287
|
+
isApproved: (_dataInputs$input33 = dataInputs[input]) === null || _dataInputs$input33 === void 0 ? void 0 : _dataInputs$input33.isApproved,
|
|
288
|
+
comment: (_dataInputs$input34 = dataInputs[input]) === null || _dataInputs$input34 === void 0 ? void 0 : _dataInputs$input34.comment,
|
|
288
289
|
handleImgClick: handleImgClick,
|
|
289
290
|
changeImageBtn: changeImageBtn,
|
|
290
291
|
showDivState: showDivStates,
|
|
291
292
|
imageStates: imageStates
|
|
292
293
|
})]
|
|
293
294
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
294
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
295
|
+
children: [(input === null || input === void 0 ? void 0 : input.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
|
|
295
296
|
inputId: input === null || input === void 0 ? void 0 : input.id,
|
|
296
297
|
isApproved: input === null || input === void 0 ? void 0 : input.isApproved,
|
|
297
298
|
comment: input === null || input === void 0 ? void 0 : input.comment,
|
|
@@ -302,6 +303,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
302
303
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
303
304
|
inputId: input.id,
|
|
304
305
|
index: index,
|
|
306
|
+
disabled: input === null || input === void 0 ? void 0 : input.isApproved,
|
|
305
307
|
inputType: "textarea",
|
|
306
308
|
label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
|
|
307
309
|
value: compare ? auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu3 = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu3 === void 0 ? void 0 : _auditInputGroup$inpu3.value : input === null || input === void 0 ? void 0 : input.value,
|
|
@@ -21,12 +21,16 @@ var _CheckBox = require("../../atoms/CheckBox");
|
|
|
21
21
|
|
|
22
22
|
var _styles = require("./styles");
|
|
23
23
|
|
|
24
|
+
var _Tooltip = require("../../atoms/Tooltip");
|
|
25
|
+
|
|
24
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
27
|
|
|
26
28
|
var Table = function Table(_ref) {
|
|
27
29
|
var columns = _ref.columns,
|
|
28
30
|
data = _ref.data,
|
|
29
|
-
withCheckbox = _ref.withCheckbox
|
|
31
|
+
withCheckbox = _ref.withCheckbox,
|
|
32
|
+
_ref$withTooltip = _ref.withTooltip,
|
|
33
|
+
withTooltip = _ref$withTooltip === void 0 ? false : _ref$withTooltip;
|
|
30
34
|
|
|
31
35
|
var _useState = (0, _react.useState)([]),
|
|
32
36
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -73,7 +77,17 @@ var Table = function Table(_ref) {
|
|
|
73
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TH, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
74
78
|
withCheckbox: withCheckbox
|
|
75
79
|
}, column), {}, {
|
|
76
|
-
children: column.
|
|
80
|
+
children: column.description && withTooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
81
|
+
componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
82
|
+
children: column.description
|
|
83
|
+
}),
|
|
84
|
+
position: "topCenter",
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
86
|
+
children: column.Header
|
|
87
|
+
})
|
|
88
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
89
|
+
children: column.Header
|
|
90
|
+
})
|
|
77
91
|
}), "".concat(column.accessor).concat(i));
|
|
78
92
|
})]
|
|
79
93
|
})
|
|
@@ -26,10 +26,10 @@ var Template = function Template(args) {
|
|
|
26
26
|
var MultipleEditionDefault = Template.bind({});
|
|
27
27
|
exports.MultipleEditionDefault = MultipleEditionDefault;
|
|
28
28
|
MultipleEditionDefault.args = {
|
|
29
|
-
articles: [
|
|
29
|
+
articles: [121161, 121165],
|
|
30
30
|
//[216, 238, 239],
|
|
31
31
|
versions: [1, 1],
|
|
32
32
|
//token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxZmFjNjY2Ny1hMDMzLTQ1NjAtOWU5ZC01MTQw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C1hMDM3Mzg1MjUwYzAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTcwMjQxMTc0MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTcwMjQxNTM0MSwiaWF0IjoxNzAyNDExNzQxLCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.O4Lr5HZLuueNNY1FxqrRBaQZKMgnTXY9IG7KAMkhWO20Dxnfj253sqOme36AbqIAsCQBy77GmnZtTAFs0uF9QBfEDzZXRQ1xcctboGZ9U235LlLdz-BNGoH5QCRXeZsZdXJ1M7yL8IvIdEnXkFC0WYcUMWMRUc6K6vgOvmCCQhzOr-uW-2nsLBGjBb7Tj_okViYvT0Lupo5Z0Z9Xc20oOWnVmrSuaYa1-b4AjOjEOnETA9usnRa6blOVOkHqi5fX8u11ejczINxNBtoizMPOQROuzuuPTvHrl17ae8JkNoxVCJe5ZdfRrUN1lwUXnOZim7QhNg8YR_uvPs_EJRIwfw",
|
|
34
34
|
|
|
35
35
|
};
|
|
@@ -182,7 +182,8 @@ var MultipleEdition = function MultipleEdition(_ref) {
|
|
|
182
182
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Table.Table, {
|
|
183
183
|
withCheckbox: true,
|
|
184
184
|
columns: currentData.columns,
|
|
185
|
-
data: currentData.data
|
|
185
|
+
data: currentData.data,
|
|
186
|
+
withTooltip: true
|
|
186
187
|
}), " "]
|
|
187
188
|
}), " ", modalFromTable, " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, (0, _objectSpread2.default)({}, modal)), " ", showRejectModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.Modal, {
|
|
188
189
|
title: "Agregar mensaje de rechazo",
|
|
@@ -15,7 +15,7 @@ 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 display: grid;\n grid-template-columns: 75% 25%;\n grid-template-rows: 75px 1fr;\n grid-template-areas:\n \"tabs action_buttons\"\n \"table table\";\n margin: 0 30px;\n body{\n font-family: Roboto;\n }\n\n .tabs {\n grid-area: tabs;\n display: flex;\n align-items: center;\n gap: 0 10px;\n }\n .action_buttons {\n grid-area: action_buttons;\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 0 10px;\n & > * {\n cursor: pointer;\n }\n }\n .table {\n grid-area: table;\n background: red;\n height: 100%;\n font-family: Raleway;\n }\n \n .buttons-container{\n background: white;\n width: max-content;\n padding: 8px;\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n border-radius: 3px;\n position: absolute;\n top: -10%;\n left: 50px;\n z-index: 100;\n }\n\n .validation-button{\n width: 30px;\n height: 20px;\n display: flex;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-template-columns: 75% 25%;\n grid-template-rows: 75px 1fr;\n grid-template-areas:\n \"tabs action_buttons\"\n \"table table\";\n margin: 0 30px;\n body{\n font-family: Roboto;\n }\n\n .tabs {\n grid-area: tabs;\n display: flex;\n align-items: center;\n gap: 0 10px;\n }\n .action_buttons {\n grid-area: action_buttons;\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 0 10px;\n & > * {\n cursor: pointer;\n }\n }\n .table {\n grid-area: table;\n background: red;\n height: 100%;\n font-family: Raleway;\n }\n \n .buttons-container{\n background: white;\n width: max-content;\n padding: 8px;\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n border-radius: 3px;\n position: absolute;\n top: -10%;\n left: 50px;\n z-index: 100;\n }\n\n .validation-button{\n width: 30px;\n height: 20px;\n display: flex;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n }\n\n .validation-option {\n width: 82px;\n height: 20px;\n align-items: center;\n border: none;\n cursor: pointer;\n color: black;\n font-weight: 400;\n font-size: 13px;\n line-height: 18px;\n background-color: white;\n left: 7px;\n\n img {\n & + p {\n margin-left: 7px;\n }\n }\n\n &:hover {\n border-radius: 10px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n\n td{\n margin:0;\n }\n \n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 5px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n .tooltip {\n position: relative;\n display: inline-block;\n }\n \n .tooltiptext {\n visibility: hidden;\n width: 200px;\n background-color: #ffffff;\n color: #000000;\n text-align: center;\n border-radius: 6px;\n position: absolute;\n z-index: 6 important!;\n bottom: 100%;\n left: 20%;\n margin-left: -80px;\n opacity: 0;\n transition: opacity 0.3s;\n box-shadow: 0px 2px 4px 0px #00000040;\n font-family: Roboto;\n font-size: 12px;\n padding: 10px;\n text-align: justify;\n }\n \n\n \n .tooltip:hover .tooltiptext {\n visibility: visible;\n opacity: 1;\n }\n"])), _variables.GlobalColors.s3, function (_ref) {
|
|
19
19
|
var isRequired = _ref.isRequired;
|
|
20
20
|
return isRequired ? "red" : "".concat(_variables.GlobalColors.s2);
|
|
21
21
|
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.deep_gray, _variables.GlobalColors.magenta_s2);
|
|
@@ -532,15 +532,31 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
|
|
|
532
532
|
Header: rules[attributeId].name,
|
|
533
533
|
accessor: "".concat(attributeId + "-" + ret.id),
|
|
534
534
|
width: "200px",
|
|
535
|
-
style: styleData
|
|
535
|
+
style: styleData,
|
|
536
|
+
description: rules[attributeId].description
|
|
536
537
|
});
|
|
537
538
|
}
|
|
538
539
|
});
|
|
540
|
+
|
|
541
|
+
var inputTypeValue = function inputTypeValue(type) {
|
|
542
|
+
switch (type) {
|
|
543
|
+
case "Booleano":
|
|
544
|
+
return "checkbox";
|
|
545
|
+
|
|
546
|
+
case "Numérico":
|
|
547
|
+
return "number";
|
|
548
|
+
|
|
549
|
+
default:
|
|
550
|
+
return "text";
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
|
|
539
554
|
Object.values(item.attributes).forEach(function (des) {
|
|
540
555
|
var props = {
|
|
541
556
|
inputId: item.id + "_" + rules[des.attributeId].attributeId + "_" + item.version,
|
|
542
557
|
name: item.id + "-" + rules[des.attributeId].attributeId + "-" + item.version,
|
|
543
|
-
value: des.value
|
|
558
|
+
value: des.value,
|
|
559
|
+
inputType: inputTypeValue(des.type)
|
|
544
560
|
};
|
|
545
561
|
if (!attributesReviewed.find(function (e) {
|
|
546
562
|
return e.articleId == item.id && e.attributeId == des.attributeId && e.versionId == item.version;
|
|
@@ -670,7 +686,8 @@ function setDataColumns(section, dataService, token, setModalFromTable, setDataS
|
|
|
670
686
|
Header: rules[ret.id][descriptionId].name,
|
|
671
687
|
accessor: "".concat(descriptionId),
|
|
672
688
|
width: "250px",
|
|
673
|
-
style: styleData
|
|
689
|
+
style: styleData,
|
|
690
|
+
description: rules[ret.id][descriptionId].description
|
|
674
691
|
});
|
|
675
692
|
}
|
|
676
693
|
});
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<rect width="34" height="34" rx="17" fill="#F0F0F0"/>
|
|
3
3
|
<mask id="mask0_346_670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="14" height="14">
|
|
4
4
|
<rect x="10" y="10" width="14" height="14" fill="#D9D9D9"/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<rect width="34" height="34" rx="17" fill="#E33AA9"/>
|
|
3
3
|
<mask id="mask0_346_670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="14" height="14">
|
|
4
4
|
<rect x="10" y="10" width="14" height="14" fill="#D9D9D9"/>
|
|
@@ -11,6 +11,7 @@ export const InputFormatter = ({
|
|
|
11
11
|
setUpdatedDescriptions,
|
|
12
12
|
isRequired,
|
|
13
13
|
maxChar,
|
|
14
|
+
disabled,
|
|
14
15
|
}) => {
|
|
15
16
|
const [inputValue, setInputValue] = useState(mainValue);
|
|
16
17
|
const [selection, setSelection] = useState(false);
|
|
@@ -117,7 +118,7 @@ export const InputFormatter = ({
|
|
|
117
118
|
id={inputId + ""}
|
|
118
119
|
ref={(el) => setQuill(el)}
|
|
119
120
|
defaultValue={getValue(inputValue)}
|
|
120
|
-
|
|
121
|
+
readOnly={disabled}
|
|
121
122
|
modules={{ toolbar: ["bold"] }}
|
|
122
123
|
onKeyPress={(e) => {
|
|
123
124
|
if (charsCounter >= maxLength && e.key !== "Backspace") {
|
|
@@ -162,56 +162,60 @@ export const GalleryElement = ({
|
|
|
162
162
|
}}
|
|
163
163
|
/>
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
src={
|
|
185
|
-
imageStates[image.image_id] ? acceptIcon : rejectIcon
|
|
186
|
-
}
|
|
187
|
-
alt={"botón rechazar"}
|
|
188
|
-
style={{ cursor: "pointer" }}
|
|
189
|
-
onClick={() => handleImgClick(image.image_id)}
|
|
190
|
-
/>
|
|
191
|
-
)
|
|
192
|
-
}
|
|
193
|
-
classNameTooltip={"container-tooltip"}
|
|
194
|
-
/>
|
|
195
|
-
{showDivStates[image.image_id] && (
|
|
196
|
-
<div className="btnReviewState">
|
|
197
|
-
<div>
|
|
198
|
-
<button
|
|
199
|
-
id="aceptbtn"
|
|
200
|
-
onClick={() =>
|
|
201
|
-
changeImageBtn(image.image_id, "validate")
|
|
202
|
-
}
|
|
203
|
-
>
|
|
165
|
+
{image?.isApproved === false && (
|
|
166
|
+
<div
|
|
167
|
+
style={{
|
|
168
|
+
display: "flex",
|
|
169
|
+
"justify-content": "center",
|
|
170
|
+
"align-items": "center",
|
|
171
|
+
}}
|
|
172
|
+
>
|
|
173
|
+
<Tooltip
|
|
174
|
+
componentTooltip={
|
|
175
|
+
<>
|
|
176
|
+
<p>
|
|
177
|
+
<b>Comentarios:</b>
|
|
178
|
+
</p>
|
|
179
|
+
<p>{image.comment}</p>
|
|
180
|
+
</>
|
|
181
|
+
}
|
|
182
|
+
children={
|
|
183
|
+
!image.isApproved && (
|
|
204
184
|
<img
|
|
205
|
-
src={
|
|
206
|
-
|
|
185
|
+
src={
|
|
186
|
+
imageStates[image.image_id]
|
|
187
|
+
? acceptIcon
|
|
188
|
+
: rejectIcon
|
|
189
|
+
}
|
|
190
|
+
alt={"botón rechazar"}
|
|
207
191
|
style={{ cursor: "pointer" }}
|
|
192
|
+
onClick={() => handleImgClick(image.image_id)}
|
|
208
193
|
/>
|
|
209
|
-
|
|
210
|
-
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
classNameTooltip={"container-tooltip"}
|
|
197
|
+
/>
|
|
198
|
+
{showDivStates[image.image_id] && (
|
|
199
|
+
<div className="btnReviewState">
|
|
200
|
+
<div>
|
|
201
|
+
<button
|
|
202
|
+
id="aceptbtn"
|
|
203
|
+
onClick={() =>
|
|
204
|
+
changeImageBtn(image.image_id, "validate")
|
|
205
|
+
}
|
|
206
|
+
>
|
|
207
|
+
<img
|
|
208
|
+
src={acceptIcon}
|
|
209
|
+
alt="acept button"
|
|
210
|
+
style={{ cursor: "pointer" }}
|
|
211
|
+
/>
|
|
212
|
+
Validar
|
|
213
|
+
</button>
|
|
214
|
+
</div>
|
|
211
215
|
</div>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
216
|
+
)}
|
|
217
|
+
</div>
|
|
218
|
+
)}
|
|
215
219
|
</>
|
|
216
220
|
)}
|
|
217
221
|
</div>
|
|
@@ -186,7 +186,7 @@ export const InputGroup = ({
|
|
|
186
186
|
compare
|
|
187
187
|
}
|
|
188
188
|
//disabled={input === 40001}
|
|
189
|
-
disabled={dataInputs[input]
|
|
189
|
+
disabled={dataInputs[input]?.isApproved}
|
|
190
190
|
inputId={dataInputs[input]?.id}
|
|
191
191
|
version={version}
|
|
192
192
|
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
@@ -222,27 +222,31 @@ export const InputGroup = ({
|
|
|
222
222
|
: ""
|
|
223
223
|
}
|
|
224
224
|
/>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
225
|
+
{dataInputs[input]?.isApproved === false && (
|
|
226
|
+
<InputReviewSection
|
|
227
|
+
inputId={dataInputs[input]?.id}
|
|
228
|
+
isApproved={dataInputs[input]?.isApproved}
|
|
229
|
+
comment={dataInputs[input]?.comment}
|
|
230
|
+
handleImgClick={handleImgClick}
|
|
231
|
+
changeImageBtn={changeImageBtn}
|
|
232
|
+
showDivState={showDivStates}
|
|
233
|
+
imageStates={imageStates}
|
|
234
|
+
/>
|
|
235
|
+
)}
|
|
234
236
|
</>
|
|
235
237
|
) : (
|
|
236
238
|
<>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
239
|
+
{input?.isApproved === false && (
|
|
240
|
+
<InputReviewSection
|
|
241
|
+
inputId={input?.id}
|
|
242
|
+
isApproved={input?.isApproved}
|
|
243
|
+
comment={input?.comment}
|
|
244
|
+
handleImgClick={handleImgClick}
|
|
245
|
+
changeImageBtn={changeImageBtn}
|
|
246
|
+
showDivState={showDivStates}
|
|
247
|
+
imageStates={imageStates}
|
|
248
|
+
/>
|
|
249
|
+
)}
|
|
246
250
|
<TagAndInput
|
|
247
251
|
key={index + "-" + input?.value + "-" + compare}
|
|
248
252
|
inputId={input.id}
|
|
@@ -255,6 +259,7 @@ export const InputGroup = ({
|
|
|
255
259
|
: input?.value
|
|
256
260
|
}
|
|
257
261
|
isRequired={input.required}
|
|
262
|
+
disabled={input?.isApproved}
|
|
258
263
|
maxChar={input.max_chars}
|
|
259
264
|
inputPlaceHolder={input?.placeholder}
|
|
260
265
|
updatedDescriptions={updatedDescriptions}
|
|
@@ -309,7 +314,7 @@ export const InputGroup = ({
|
|
|
309
314
|
compare
|
|
310
315
|
}
|
|
311
316
|
//disabled={input === 40001}
|
|
312
|
-
disabled={
|
|
317
|
+
disabled={dataInputs[input]?.isApproved}
|
|
313
318
|
inputId={dataInputs[input]?.id}
|
|
314
319
|
version={version}
|
|
315
320
|
inputType={inputTypeValue(dataInputs[input]?.type)}
|
|
@@ -348,31 +353,36 @@ export const InputGroup = ({
|
|
|
348
353
|
: ""
|
|
349
354
|
}
|
|
350
355
|
/>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
356
|
+
{dataInputs[input]?.isApproved === false && (
|
|
357
|
+
<InputReviewSection
|
|
358
|
+
inputId={dataInputs[input]?.id}
|
|
359
|
+
isApproved={dataInputs[input]?.isApproved}
|
|
360
|
+
comment={dataInputs[input]?.comment}
|
|
361
|
+
handleImgClick={handleImgClick}
|
|
362
|
+
changeImageBtn={changeImageBtn}
|
|
363
|
+
showDivState={showDivStates}
|
|
364
|
+
imageStates={imageStates}
|
|
365
|
+
/>
|
|
366
|
+
)}
|
|
360
367
|
</>
|
|
361
368
|
) : (
|
|
362
369
|
<>
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
{input?.isApproved === false && (
|
|
371
|
+
<InputReviewSection
|
|
372
|
+
inputId={input?.id}
|
|
373
|
+
isApproved={input?.isApproved}
|
|
374
|
+
comment={input?.comment}
|
|
375
|
+
handleImgClick={handleImgClick}
|
|
376
|
+
changeImageBtn={changeImageBtn}
|
|
377
|
+
showDivState={showDivStates}
|
|
378
|
+
imageStates={imageStates}
|
|
379
|
+
/>
|
|
380
|
+
)}
|
|
372
381
|
<TagAndInput
|
|
373
382
|
key={index + "-" + input?.value + "-" + compare}
|
|
374
383
|
inputId={input.id}
|
|
375
384
|
index={index}
|
|
385
|
+
disabled={input?.isApproved}
|
|
376
386
|
inputType={"textarea"}
|
|
377
387
|
label={input?.name + (input.required ? "*" : "")}
|
|
378
388
|
value={
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { CheckBox } from "../../atoms/CheckBox";
|
|
3
3
|
import { Container, TH, TD } from "./styles";
|
|
4
|
+
import { Tooltip } from "../../atoms/Tooltip";
|
|
4
5
|
|
|
5
|
-
export const Table = ({ columns, data, withCheckbox }) => {
|
|
6
|
+
export const Table = ({ columns, data, withCheckbox, withTooltip=false }) => {
|
|
6
7
|
const [rowsChecked, setRowsChecked] = useState([]);
|
|
7
8
|
|
|
8
9
|
function handlerSelectAll(evt) {
|
|
@@ -40,7 +41,16 @@ export const Table = ({ columns, data, withCheckbox }) => {
|
|
|
40
41
|
withCheckbox={withCheckbox}
|
|
41
42
|
{...column}
|
|
42
43
|
>
|
|
43
|
-
|
|
44
|
+
{column.description && withTooltip ? (
|
|
45
|
+
<Tooltip
|
|
46
|
+
componentTooltip={<span>{column.description}</span>}
|
|
47
|
+
position="topCenter"
|
|
48
|
+
>
|
|
49
|
+
<span>{column.Header}</span>
|
|
50
|
+
</Tooltip>
|
|
51
|
+
) : (
|
|
52
|
+
<span>{column.Header}</span>
|
|
53
|
+
)}
|
|
44
54
|
</TH>
|
|
45
55
|
))}
|
|
46
56
|
</tr>
|
|
@@ -9,9 +9,9 @@ const Template = (args) => <MultipleEdition {...args} />;
|
|
|
9
9
|
export const MultipleEditionDefault = Template.bind({});
|
|
10
10
|
|
|
11
11
|
MultipleEditionDefault.args = {
|
|
12
|
-
articles: [
|
|
12
|
+
articles: [121161,121165],//[216, 238, 239],
|
|
13
13
|
versions: [1,1],
|
|
14
14
|
//token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxZmFjNjY2Ny1hMDMzLTQ1NjAtOWU5ZC01MTQwMDc2MmI2MWYiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjFmYWM2NjY3LWEwMzMtNDU2MC05ZTlkLTUxNDAwNzYyYjYxZiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06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CRXeZsZdXJ1M7yL8IvIdEnXkFC0WYcUMWMRUc6K6vgOvmCCQhzOr-uW-2nsLBGjBb7Tj_okViYvT0Lupo5Z0Z9Xc20oOWnVmrSuaYa1-b4AjOjEOnETA9usnRa6blOVOkHqi5fX8u11ejczINxNBtoizMPOQROuzuuPTvHrl17ae8JkNoxVCJe5ZdfRrUN1lwUXnOZim7QhNg8YR_uvPs_EJRIwfw",
|
|
17
17
|
};
|
|
@@ -71,16 +71,11 @@ export const Container = styled.div`
|
|
|
71
71
|
&:hover {
|
|
72
72
|
border-radius: 10px;
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
& + * {
|
|
76
|
-
margin-top: 8px;
|
|
77
|
-
}
|
|
78
74
|
}
|
|
79
75
|
|
|
80
76
|
.validation-option {
|
|
81
77
|
width: 82px;
|
|
82
78
|
height: 20px;
|
|
83
|
-
display: flex;
|
|
84
79
|
align-items: center;
|
|
85
80
|
border: none;
|
|
86
81
|
cursor: pointer;
|
|
@@ -122,7 +117,7 @@ export const Container = styled.div`
|
|
|
122
117
|
line-height: 15px;
|
|
123
118
|
padding: 10px;
|
|
124
119
|
outline: none;
|
|
125
|
-
border-radius:
|
|
120
|
+
border-radius: 5px;
|
|
126
121
|
resize: none;
|
|
127
122
|
|
|
128
123
|
&:focus {
|
|
@@ -500,9 +500,21 @@ export function setDataColumns(
|
|
|
500
500
|
accessor: `${attributeId + "-" + ret.id}`,
|
|
501
501
|
width: "200px",
|
|
502
502
|
style: styleData,
|
|
503
|
+
description:rules[attributeId].description,
|
|
503
504
|
});
|
|
504
505
|
}
|
|
505
506
|
});
|
|
507
|
+
|
|
508
|
+
const inputTypeValue = (type) => {
|
|
509
|
+
switch (type) {
|
|
510
|
+
case "Booleano":
|
|
511
|
+
return "checkbox";
|
|
512
|
+
case "Numérico":
|
|
513
|
+
return "number";
|
|
514
|
+
default:
|
|
515
|
+
return "text";
|
|
516
|
+
}
|
|
517
|
+
};
|
|
506
518
|
Object.values(item.attributes).forEach((des) => {
|
|
507
519
|
const props = {
|
|
508
520
|
inputId:
|
|
@@ -518,7 +530,9 @@ export function setDataColumns(
|
|
|
518
530
|
"-" +
|
|
519
531
|
item.version,
|
|
520
532
|
value: des.value,
|
|
533
|
+
inputType:inputTypeValue(des.type),
|
|
521
534
|
};
|
|
535
|
+
|
|
522
536
|
if (
|
|
523
537
|
!attributesReviewed.find(
|
|
524
538
|
(e) =>
|
|
@@ -674,9 +688,11 @@ export function setDataColumns(
|
|
|
674
688
|
accessor: `${descriptionId}`,
|
|
675
689
|
width: "250px",
|
|
676
690
|
style: styleData,
|
|
691
|
+
description:rules[ret.id][descriptionId].description
|
|
677
692
|
});
|
|
678
693
|
}
|
|
679
694
|
});
|
|
695
|
+
|
|
680
696
|
currentData[`retailer${ret.id}-save`] = (
|
|
681
697
|
<button
|
|
682
698
|
onClick={() => {
|
|
@@ -1,29 +0,0 @@
|
|
|
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 _variables = require("../../../global-files/variables");
|
|
15
|
-
|
|
16
|
-
var _templateObject;
|
|
17
|
-
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n\n > div {\n label {\n &:before {\n outline: 1px solid ", ";\n }\n }\n }\n\n input,\n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n select {\n background: #fafafa;\n outline: none;\n border: 1px solid\n ", ";\n width: 100%;\n cursor: pointer;\n font-family: ", ";\n color: ", ";\n font-size: 12px;\n line-height: 21px;\n padding: 10px;\n border-right: 2px solid #e33aa9;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n\n p {\n font-family: ", ";\n font-size: 12px;\n color: ", ";\n }\n\n &.audit-class {\n input,\n .quill {\n border: 1px solid #8a6caa;\n background-color: #ededfc;\n }\n }\n"])), function (_ref) {
|
|
19
|
-
var isRequired = _ref.isRequired;
|
|
20
|
-
return isRequired ? "red" : "none";
|
|
21
|
-
}, function (_ref2) {
|
|
22
|
-
var isRequired = _ref2.isRequired;
|
|
23
|
-
return isRequired ? "red" : "".concat(_variables.GlobalColors.s2);
|
|
24
|
-
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.deep_gray, _variables.GlobalColors.magenta_s2, function (_ref3) {
|
|
25
|
-
var isRequired = _ref3.isRequired;
|
|
26
|
-
return isRequired ? "red" : "".concat(_variables.GlobalColors.s2);
|
|
27
|
-
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.deep_gray, _variables.GlobalColors.magenta_s2, _variables.FontFamily.Raleway, _variables.GlobalColors.deep_gray);
|
|
28
|
-
|
|
29
|
-
exports.Container = Container;
|