contentoh-components-library 21.3.21 → 21.3.23
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/.env.development +1 -2
- package/dist/assets/fonts/roboto/Roboto-Black.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-Italic.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- package/dist/assets/fonts/roboto/Roboto-ThinItalic.ttf +0 -0
- package/dist/components/atoms/GeneralInput/index.js +3 -1
- package/dist/components/atoms/GeneralInput/styles.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +12 -3
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +12 -14
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +6 -2
- package/dist/components/organisms/Chat/ContentChat/index.js +16 -8
- package/dist/components/organisms/Chat/Footer/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +19 -8
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +38 -46
- package/dist/components/pages/RetailerProductEdition/index.js +331 -235
- package/dist/components/pages/RetailerProductEdition/utils.js +68 -0
- package/package.json +1 -1
- package/src/assets/fonts/roboto/Roboto-Black.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-BlackItalic.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-BoldItalic.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-Italic.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-LightItalic.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-MediumItalic.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- package/src/assets/fonts/roboto/Roboto-ThinItalic.ttf +0 -0
- package/src/components/atoms/GeneralInput/index.js +2 -1
- package/src/components/atoms/GeneralInput/styles.js +9 -1
- package/src/components/molecules/GalleryElement/index.js +14 -2
- package/src/components/molecules/GalleryElement/styles.js +5 -0
- package/src/components/molecules/HeaderTop/index.js +9 -18
- package/src/components/molecules/HeaderTop/styles.js +19 -0
- package/src/components/molecules/TagAndInput/index.js +4 -0
- package/src/components/organisms/Chat/ContentChat/index.js +1 -1
- package/src/components/organisms/Chat/Footer/index.js +2 -2
- package/src/components/organisms/InputGroup/index.js +31 -4
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +38 -47
- package/src/components/pages/RetailerProductEdition/index.js +61 -18
- package/src/components/pages/RetailerProductEdition/utils.js +34 -0
package/.env.development
CHANGED
|
@@ -24,6 +24,7 @@ REACT_APP_PENDING_INVITATIONS=https://fc069ovhuk.execute-api.us-east-1.amazonaws
|
|
|
24
24
|
REACT_APP_PRODUCTS_CHAT_ENDPOINT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/products-chat
|
|
25
25
|
REACT_APP_TICKETS_CHAT_ENDPOINT=https://ocqbzaa4a2.execute-api.us-east-1.amazonaws.com/dev/ticket-chat
|
|
26
26
|
REACT_APP_IMAGES_ENDPOINT=https://content-management-images.s3.amazonaws.com
|
|
27
|
+
REACT_APP_GET_AUDIT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/version-manager
|
|
27
28
|
|
|
28
29
|
REACT_APP_IMAGES_BUCKET=content-management-images
|
|
29
30
|
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
|
|
@@ -31,5 +32,3 @@ REACT_APP_KUTS3=AKIA5CPHLQTTS22HCGHW
|
|
|
31
32
|
REACT_APP_AKUTS3=RSpwEaM0fsLEgN7BJzRyCKqyU0lNExTsPUvxyNXm
|
|
32
33
|
REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
|
|
33
34
|
REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
|
|
34
|
-
REACT_APP_KEY_UPLOAD_TO_S3=AKIA5CPHLQTTYNYWQ2TM
|
|
35
|
-
REACT_APP_ACCESS_KEY_UPLOAD_TO_S3=zGYWR4rW52rqg1bW1CrC00zBXv2od0mNCF8WGcvr
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -42,7 +42,8 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
42
42
|
description = _ref.description,
|
|
43
43
|
inputOnChange = _ref.inputOnChange,
|
|
44
44
|
disabled = _ref.disabled,
|
|
45
|
-
onKeyDown = _ref.onKeyDown
|
|
45
|
+
onKeyDown = _ref.onKeyDown,
|
|
46
|
+
auditClass = _ref.auditClass;
|
|
46
47
|
|
|
47
48
|
var _useState = (0, _react.useState)({
|
|
48
49
|
value: inputValue
|
|
@@ -128,6 +129,7 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
128
129
|
|
|
129
130
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
130
131
|
isRequired: requiredEmpty,
|
|
132
|
+
className: auditClass,
|
|
131
133
|
children: [(optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("select", {
|
|
132
134
|
id: "dropdown".concat(inputId),
|
|
133
135
|
onChange: function onChange(e) {
|
|
@@ -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: 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"])), function (_ref) {
|
|
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
19
|
var isRequired = _ref.isRequired;
|
|
20
20
|
return isRequired ? "red" : "none";
|
|
21
21
|
}, function (_ref2) {
|
|
@@ -26,6 +26,8 @@ var _Select = _interopRequireDefault(require("../../atoms/Select"));
|
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
27
|
|
|
28
28
|
var GalleryElement = function GalleryElement(_ref) {
|
|
29
|
+
var _auditImages$values$n;
|
|
30
|
+
|
|
29
31
|
var _ref$validation = _ref.validation,
|
|
30
32
|
validation = _ref$validation === void 0 ? "null-button" : _ref$validation,
|
|
31
33
|
image = _ref.image,
|
|
@@ -42,7 +44,9 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
42
44
|
changeImage = _ref.changeImage,
|
|
43
45
|
selectedImages = _ref.selectedImages,
|
|
44
46
|
setSelectedImages = _ref.setSelectedImages,
|
|
45
|
-
setCheckAll = _ref.setCheckAll
|
|
47
|
+
setCheckAll = _ref.setCheckAll,
|
|
48
|
+
auditImages = _ref.auditImages,
|
|
49
|
+
compare = _ref.compare;
|
|
46
50
|
|
|
47
51
|
var _useState = (0, _react.useState)(validation),
|
|
48
52
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -82,8 +86,13 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
82
86
|
document.addEventListener("click", closeValidationPanel, false);
|
|
83
87
|
}
|
|
84
88
|
}, [showValidationPanel]);
|
|
89
|
+
|
|
90
|
+
var isEquals = function isEquals(value, auditValue) {
|
|
91
|
+
return !value === auditValue;
|
|
92
|
+
};
|
|
93
|
+
|
|
85
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
86
|
-
className: gridLayout ? "grid-gallery" : "row-gallery",
|
|
95
|
+
className: "".concat(gridLayout ? "grid-gallery" : "row-gallery", " ").concat(!isEquals(image.uuid, auditImages === null || auditImages === void 0 ? void 0 : auditImages.values[number].uuid) && compare ? "audit-class" : ""),
|
|
87
96
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
88
97
|
className: "buttons-container",
|
|
89
98
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.CheckBox, {
|
|
@@ -96,7 +105,7 @@ var GalleryElement = function GalleryElement(_ref) {
|
|
|
96
105
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
97
106
|
className: "image-container",
|
|
98
107
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImage.ProductImage, {
|
|
99
|
-
img: image === null || image === void 0 ? void 0 : image.src,
|
|
108
|
+
img: compare ? auditImages === null || auditImages === void 0 ? void 0 : (_auditImages$values$n = auditImages.values[number]) === null || _auditImages$values$n === void 0 ? void 0 : _auditImages$values$n.src : image === null || image === void 0 ? void 0 : image.src,
|
|
100
109
|
altText: image === null || image === void 0 ? void 0 : image.altText,
|
|
101
110
|
imageType: "catalogue-image-".concat(gridLayout ? "big" : "small", "-size")
|
|
102
111
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -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 &.grid-gallery {\n position: relative;\n width: 179px;\n border-radius: 3px;\n overflow: hidden;\n\n .buttons-container {\n position: absolute;\n top: 5px;\n left: 5px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .image-container {\n border: 1px solid #f0eef2;\n\n .information-container {\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n padding: 0 2px;\n\n p {\n font-family: ", ";\n color: ", ";\n font-size: 11px;\n line-height: 17px;\n }\n }\n }\n }\n\n &.row-gallery {\n display: flex;\n align-items: center;\n padding-right: 10px;\n\n .buttons-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .image-container {\n display: flex;\n align-items: center;\n flex: 1;\n .information-container {\n display: flex;\n flex: 1;\n\n p {\n font-family: ", ";\n color: ", ";\n font-size: 14px;\n line-height: 17px;\n text-align: center;\n\n &.highlighted-data {\n font-family: ", ";\n color: ", ";\n background-color: ", ";\n border-radius: 3px;\n font-weight: 600;\n font-size: 11px;\n line-height: 18px;\n padding: 0 10px;\n }\n\n &:nth-child(1) {\n //min-width: calc(20% - 76px);\n //flex: 1 0 20%;\n min-width: 22%;\n }\n\n &:nth-child(2),\n &:nth-child(3) {\n text-align: center;\n }\n &:nth-child(2) {\n max-width: 90px;\n min-width: 90px;\n }\n &:nth-child(3) {\n max-width: 60px;\n min-width: 60px;\n }\n /* &:nth-child(4) {\n max-width: 90px;\n min-width: 90px;\n }\n &:nth-child(5) {\n max-width: 80px;\n min-width: 80px;\n } */\n }\n\n & > * {\n flex: 1;\n padding: 5px;\n }\n }\n }\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s2);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.grid-gallery {\n position: relative;\n width: 179px;\n border-radius: 3px;\n overflow: hidden;\n\n .buttons-container {\n position: absolute;\n top: 5px;\n left: 5px;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .image-container {\n border: 1px solid #f0eef2;\n\n .information-container {\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n padding: 0 2px;\n\n p {\n font-family: ", ";\n color: ", ";\n font-size: 11px;\n line-height: 17px;\n }\n }\n }\n }\n\n &.row-gallery {\n display: flex;\n align-items: center;\n padding-right: 10px;\n\n .buttons-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .image-container {\n display: flex;\n align-items: center;\n flex: 1;\n .information-container {\n display: flex;\n flex: 1;\n\n p {\n font-family: ", ";\n color: ", ";\n font-size: 14px;\n line-height: 17px;\n text-align: center;\n\n &.highlighted-data {\n font-family: ", ";\n color: ", ";\n background-color: ", ";\n border-radius: 3px;\n font-weight: 600;\n font-size: 11px;\n line-height: 18px;\n padding: 0 10px;\n }\n\n &:nth-child(1) {\n //min-width: calc(20% - 76px);\n //flex: 1 0 20%;\n min-width: 22%;\n }\n\n &:nth-child(2),\n &:nth-child(3) {\n text-align: center;\n }\n &:nth-child(2) {\n max-width: 90px;\n min-width: 90px;\n }\n &:nth-child(3) {\n max-width: 60px;\n min-width: 60px;\n }\n /* &:nth-child(4) {\n max-width: 90px;\n min-width: 90px;\n }\n &:nth-child(5) {\n max-width: 80px;\n min-width: 80px;\n } */\n }\n\n & > * {\n flex: 1;\n padding: 5px;\n }\n }\n }\n }\n\n &.audit-class{\n border: 1px solid #8a6caa;\n background-color: #ededfc;\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s2);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -19,9 +19,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
|
|
20
20
|
var HeaderTop = function HeaderTop(_ref) {
|
|
21
21
|
var setHeaderTop = _ref.setHeaderTop,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
token = _ref.token;
|
|
22
|
+
auditableVersion = _ref.auditableVersion,
|
|
23
|
+
setCompare = _ref.setCompare;
|
|
25
24
|
var headerTop = (0, _react.useRef)();
|
|
26
25
|
(0, _react.useEffect)(function () {
|
|
27
26
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
@@ -31,18 +30,17 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
31
30
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
32
31
|
text: "Edici\xF3n de producto"
|
|
33
32
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
34
|
-
className: "buttons-
|
|
35
|
-
children: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
size: 18
|
|
33
|
+
className: "buttons-container",
|
|
34
|
+
children: [auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
35
|
+
buttonType: "general-white-button circular-button",
|
|
36
|
+
label: "A|B",
|
|
37
|
+
onClick: function onClick() {
|
|
38
|
+
setCompare(function (current) {
|
|
39
|
+
return !current;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
44
42
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
45
|
-
buttonType: "close-button",
|
|
43
|
+
buttonType: "general-white-button close-button",
|
|
46
44
|
onClick: function onClick() {
|
|
47
45
|
window.location.href = "/products";
|
|
48
46
|
}
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n .buttons-top {\n display: flex;\n align-items: center;\n }\n"])));
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n<<<<<<< HEAD\n .buttons-top {\n display: flex;\n align-items: center;\n=======\n padding-top: 10px;\n\n .buttons-container {\n display: flex;\n\n button {\n width: 30px;\n height: 30px;\n border: 1px solid #f0f0f0;\n background-size: 20px;\n padding: 0;\n\n & + * {\n margin-left: 10px;\n }\n }\n>>>>>>> versionManager\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -11,6 +11,8 @@ var _index = require("../../atoms/ScreenHeader/index");
|
|
|
11
11
|
|
|
12
12
|
var _index2 = require("../../atoms/GeneralInput/index");
|
|
13
13
|
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
|
|
16
18
|
var TagAndInput = function TagAndInput(_ref) {
|
|
@@ -38,7 +40,8 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
38
40
|
color = _ref.color,
|
|
39
41
|
disabled = _ref.disabled,
|
|
40
42
|
onKeyDown = _ref.onKeyDown,
|
|
41
|
-
showTooltip = _ref.showTooltip
|
|
43
|
+
showTooltip = _ref.showTooltip,
|
|
44
|
+
auditClass = _ref.auditClass;
|
|
42
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
43
46
|
inputType: inputType,
|
|
44
47
|
className: "input-container",
|
|
@@ -74,7 +77,8 @@ var TagAndInput = function TagAndInput(_ref) {
|
|
|
74
77
|
optionList: optionList,
|
|
75
78
|
description: description,
|
|
76
79
|
inputOnChange: inputOnChange,
|
|
77
|
-
onKeyDown: onKeyDown
|
|
80
|
+
onKeyDown: onKeyDown,
|
|
81
|
+
auditClass: auditClass
|
|
78
82
|
})]
|
|
79
83
|
}, "generalTagInput-".concat(inputType));
|
|
80
84
|
};
|
|
@@ -212,7 +212,6 @@ var ContentChat = function ContentChat(props) {
|
|
|
212
212
|
}, [startUpdate]); // ejecutar update
|
|
213
213
|
|
|
214
214
|
(0, _react.useEffect)(function () {
|
|
215
|
-
// if (runUpdate == 0) return;
|
|
216
215
|
if (chatType === "merchant_product") {
|
|
217
216
|
if (singleChat.items) getUpdateLatestMerchantProduct();else getInitialMerchantProduct();
|
|
218
217
|
} else if (chatType === "order_product") {
|
|
@@ -824,6 +823,15 @@ var ContentChat = function ContentChat(props) {
|
|
|
824
823
|
switch (_context9.prev = _context9.next) {
|
|
825
824
|
case 0:
|
|
826
825
|
fromUpdate = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : false;
|
|
826
|
+
|
|
827
|
+
if (!(singleChat.statusChat === "closed")) {
|
|
828
|
+
_context9.next = 3;
|
|
829
|
+
break;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
return _context9.abrupt("return");
|
|
833
|
+
|
|
834
|
+
case 3:
|
|
827
835
|
dataUser = {
|
|
828
836
|
id: (_dataChat$currentUser9 = dataChat.currentUser) === null || _dataChat$currentUser9 === void 0 ? void 0 : _dataChat$currentUser9.id,
|
|
829
837
|
companyId: (_dataChat$currentUser10 = dataChat.currentUser) === null || _dataChat$currentUser10 === void 0 ? void 0 : _dataChat$currentUser10.companyId,
|
|
@@ -836,12 +844,12 @@ var ContentChat = function ContentChat(props) {
|
|
|
836
844
|
currentUser: (0, _utils.encodeUriJson)(dataUser),
|
|
837
845
|
currentItemsFront: (0, _utils.encodeUriJson)(getItemsIdSingleChat())
|
|
838
846
|
};
|
|
839
|
-
_context9.next =
|
|
847
|
+
_context9.next = 7;
|
|
840
848
|
return (0, _handle_http.fetchGET)(process.env.REACT_APP_TICKETS_CHAT_ENDPOINT, paramsQuery, {
|
|
841
849
|
Authorization: (_dataChat$currentUser12 = dataChat.currentUser) === null || _dataChat$currentUser12 === void 0 ? void 0 : _dataChat$currentUser12.token
|
|
842
850
|
});
|
|
843
851
|
|
|
844
|
-
case
|
|
852
|
+
case 7:
|
|
845
853
|
response = _context9.sent;
|
|
846
854
|
//programar update en 20s
|
|
847
855
|
setStartUpdate(function (prev) {
|
|
@@ -849,7 +857,7 @@ var ContentChat = function ContentChat(props) {
|
|
|
849
857
|
});
|
|
850
858
|
|
|
851
859
|
if (response.body) {
|
|
852
|
-
_context9.next =
|
|
860
|
+
_context9.next = 13;
|
|
853
861
|
break;
|
|
854
862
|
}
|
|
855
863
|
|
|
@@ -873,7 +881,7 @@ var ContentChat = function ContentChat(props) {
|
|
|
873
881
|
});
|
|
874
882
|
return _context9.abrupt("return");
|
|
875
883
|
|
|
876
|
-
case
|
|
884
|
+
case 13:
|
|
877
885
|
// limpiar error update
|
|
878
886
|
if (errorUpdate.startDate) {
|
|
879
887
|
setErrorUpdate({});
|
|
@@ -885,19 +893,19 @@ var ContentChat = function ContentChat(props) {
|
|
|
885
893
|
updateAllUsers(response.body.users); // actualizar los items del chat
|
|
886
894
|
|
|
887
895
|
if (!(response.body.items.length === 0)) {
|
|
888
|
-
_context9.next =
|
|
896
|
+
_context9.next = 18;
|
|
889
897
|
break;
|
|
890
898
|
}
|
|
891
899
|
|
|
892
900
|
return _context9.abrupt("return");
|
|
893
901
|
|
|
894
|
-
case
|
|
902
|
+
case 18:
|
|
895
903
|
newSingleChat = (0, _objectSpread3.default)({}, singleChat);
|
|
896
904
|
newSingleChat.items = addNewItemsChat(newSingleChat.items, response.body.items, fromUpdate);
|
|
897
905
|
newSingleChat.statusChat = response.body.data.statusChat;
|
|
898
906
|
setSingleChat(newSingleChat);
|
|
899
907
|
|
|
900
|
-
case
|
|
908
|
+
case 22:
|
|
901
909
|
case "end":
|
|
902
910
|
return _context9.stop();
|
|
903
911
|
}
|
|
@@ -63,8 +63,8 @@ var S3_BUCKET = process.env.REACT_APP_IMAGES_BUCKET;
|
|
|
63
63
|
var REGION = "us-east-1";
|
|
64
64
|
|
|
65
65
|
_awsSdk.default.config.update({
|
|
66
|
-
accessKeyId: process.env.
|
|
67
|
-
secretAccessKey: process.env.
|
|
66
|
+
accessKeyId: process.env.REACT_APP_KUTS3,
|
|
67
|
+
secretAccessKey: process.env.REACT_APP_AKUTS3
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
var myBucket = new _awsSdk.default.S3({
|
|
@@ -18,16 +18,20 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
18
18
|
|
|
19
19
|
var _ref$inputGroup = _ref.inputGroup,
|
|
20
20
|
inputGroup = _ref$inputGroup === void 0 ? {} : _ref$inputGroup,
|
|
21
|
+
auditInputGroup = _ref.auditInputGroup,
|
|
21
22
|
activeSection = _ref.activeSection,
|
|
22
23
|
_ref$dataInputs = _ref.dataInputs,
|
|
23
24
|
dataInputs = _ref$dataInputs === void 0 ? {} : _ref$dataInputs,
|
|
25
|
+
_ref$auditInputs = _ref.auditInputs,
|
|
26
|
+
auditInputs = _ref$auditInputs === void 0 ? {} : _ref$auditInputs,
|
|
24
27
|
updatedDescriptions = _ref.updatedDescriptions,
|
|
25
28
|
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
26
29
|
updatedDatasheets = _ref.updatedDatasheets,
|
|
27
30
|
setUpdatedDatasheets = _ref.setUpdatedDatasheets,
|
|
28
31
|
articleId = _ref.articleId,
|
|
29
32
|
version = _ref.version,
|
|
30
|
-
dinamicHeight = _ref.dinamicHeight
|
|
33
|
+
dinamicHeight = _ref.dinamicHeight,
|
|
34
|
+
compare = _ref.compare;
|
|
31
35
|
|
|
32
36
|
var inputTypeValue = function inputTypeValue(type) {
|
|
33
37
|
switch (type) {
|
|
@@ -42,6 +46,11 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
42
46
|
}
|
|
43
47
|
};
|
|
44
48
|
|
|
49
|
+
var isEquals = function isEquals(dataInputsVal, auditInputsVal) {
|
|
50
|
+
var result = dataInputsVal === auditInputsVal;
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
|
|
45
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
46
55
|
className: activeSection === "Ficha técnica" ? "datasheets-layout" : "descriptions-layout",
|
|
47
56
|
children: [(inputGroup === null || inputGroup === void 0 ? void 0 : inputGroup.dataGroup) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
@@ -50,7 +59,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
50
59
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
60
|
className: "inputs-container",
|
|
52
61
|
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) {
|
|
53
|
-
var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12;
|
|
62
|
+
var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _auditInputs$input, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _auditInputGroup$inpu, _auditInputGroup$inpu2;
|
|
54
63
|
|
|
55
64
|
return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
56
65
|
//disabled={input === 40001}
|
|
@@ -59,7 +68,7 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
59
68
|
version: version,
|
|
60
69
|
inputType: inputTypeValue((_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.type),
|
|
61
70
|
label: ((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.name) + ((_dataInputs$input6 = dataInputs[input]) !== null && _dataInputs$input6 !== void 0 && _dataInputs$input6.required ? "*" : ""),
|
|
62
|
-
value: (_dataInputs$input7 = dataInputs[input]) === null || _dataInputs$input7 === void 0 ? void 0 : _dataInputs$input7.value,
|
|
71
|
+
value: compare ? (_auditInputs$input = auditInputs[input]) === null || _auditInputs$input === void 0 ? void 0 : _auditInputs$input.value : (_dataInputs$input7 = dataInputs[input]) === null || _dataInputs$input7 === void 0 ? void 0 : _dataInputs$input7.value,
|
|
63
72
|
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
64
73
|
articleId: articleId,
|
|
65
74
|
isRequired: (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.required,
|
|
@@ -68,13 +77,14 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
68
77
|
maxChar: (_dataInputs$input9 = dataInputs[input]) !== null && _dataInputs$input9 !== void 0 && _dataInputs$input9.max_chars ? (_dataInputs$input10 = dataInputs[input]) === null || _dataInputs$input10 === void 0 ? void 0 : _dataInputs$input10.max_chars : 999,
|
|
69
78
|
optionList: (_dataInputs$input11 = dataInputs[input]) === null || _dataInputs$input11 === void 0 ? void 0 : _dataInputs$input11.option_list,
|
|
70
79
|
description: (_dataInputs$input12 = dataInputs[input]) === null || _dataInputs$input12 === void 0 ? void 0 : _dataInputs$input12.description,
|
|
71
|
-
showTooltip: true
|
|
72
|
-
|
|
80
|
+
showTooltip: true,
|
|
81
|
+
auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : ""
|
|
82
|
+
}, 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)(_TagAndInput.TagAndInput, {
|
|
73
83
|
inputId: input.id,
|
|
74
84
|
index: index,
|
|
75
85
|
inputType: "textarea",
|
|
76
86
|
label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
|
|
77
|
-
value: input === null || input === void 0 ? void 0 : input.value,
|
|
87
|
+
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,
|
|
78
88
|
isRequired: input.required,
|
|
79
89
|
maxChar: input.max_chars,
|
|
80
90
|
inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
|
|
@@ -84,8 +94,9 @@ var InputGroup = function InputGroup(_ref) {
|
|
|
84
94
|
version: version,
|
|
85
95
|
dinamicHeight: dinamicHeight,
|
|
86
96
|
description: input === null || input === void 0 ? void 0 : input.description,
|
|
87
|
-
showTooltip: true
|
|
88
|
-
|
|
97
|
+
showTooltip: true,
|
|
98
|
+
auditClass: compare && !isEquals(input === null || input === void 0 ? void 0 : input.value, auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu2 = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu2 === void 0 ? void 0 : _auditInputGroup$inpu2.value) ? "audit-class" : ""
|
|
99
|
+
}, index + "-" + (input === null || input === void 0 ? void 0 : input.value) + "-" + compare);
|
|
89
100
|
})
|
|
90
101
|
})]
|
|
91
102
|
});
|
|
@@ -31,67 +31,59 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": true,
|
|
32
32
|
Imágenes: true
|
|
33
33
|
},
|
|
34
|
-
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiYzk0YTczMDUtOTM2NS00NmZmLWE0MjMtNGI0YmMzYjhiMTgwIiwiY29nbml0bzpyb2xlcyI6WyJhcm46YXdzOmlhbTo6ODk4NjcwMjMyODA3OnJvbGVcL2NvbnRlbnRvaC1kZXYtdXMtZWFzdC0xLWxhbWJkYVJvbGUiXSwiYXVkIjoiNWFjOHRwZ3M2Z2JzcTEzZnJ2cnBpZWVwNDAiLCJldmVudF9pZCI6IjllNTRjMDc0LWFjNzktNGEwNC1iOGEzLWNhOWU2ZmQxNDE3ZiIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjc3NTQ1NzA2LCJuYW1lIjoiQ29sYWJvcmFkb3IiLCJwaG9uZV9udW1iZXIiOiIrNTIxMTExIiwiZXhwIjoxNjc3NTQ5MzA2LCJpYXQiOjE2Nzc1NDU3MDYsImVtYWlsIjoic2FsbWVyb24uNUBob3RtYWlsLmNvbSJ9.CS5zthG2PFlQIn5yCV64aadrBvh0ccEMlm8osN_BHTqqYARTiGJMnGUzD-FqmCB9JNeLn036eNHQ7TppqlvhBEe66-F7Aq3fSCMR2X31dWkASsg1E9kSmYS2V6NeG1G5WkfaIBOh7d7VH5Dnu6i5phne_BAu_fDbnBgsQUxQQMh-LMfv2heQ_MInJ6O2MrIzbYYMZYK7ioO5C7FvBnOCpDuk3DcgVFwuqBdVJAGkm-VYJbbnR6NYmYMnZfzrFJ8DjNE3O-L3ugVDOIfZOjuVBt2ZsfIB0-I7h_TBuIzwVE309f68AoDAujacOKvPORoN4ympPrAUSa7ZrM6ye2564g",
|
|
35
35
|
productSelected: {
|
|
36
36
|
services: {
|
|
37
37
|
datasheets: 1,
|
|
38
38
|
descriptions: 1,
|
|
39
39
|
images: 1
|
|
40
40
|
},
|
|
41
|
-
orderId:
|
|
42
|
-
status: "
|
|
43
|
-
datasheet_status: "
|
|
41
|
+
orderId: 130,
|
|
42
|
+
status: "PA",
|
|
43
|
+
datasheet_status: "PA",
|
|
44
44
|
prio: "none",
|
|
45
|
-
version:
|
|
46
|
-
description_status: "
|
|
47
|
-
images_status: "
|
|
45
|
+
version: 17,
|
|
46
|
+
description_status: "PA",
|
|
47
|
+
images_status: "PA",
|
|
48
48
|
statusByRetailer: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
43: {
|
|
55
|
-
datasheet: "AC",
|
|
56
|
-
description: "AC",
|
|
57
|
-
images: "AC"
|
|
49
|
+
58: {
|
|
50
|
+
datasheet: "PA",
|
|
51
|
+
description: "PA",
|
|
52
|
+
images: "PA"
|
|
58
53
|
}
|
|
59
54
|
},
|
|
60
55
|
article: {
|
|
61
|
-
id_article:
|
|
62
|
-
id_category: "
|
|
63
|
-
name: "
|
|
64
|
-
upc: "
|
|
65
|
-
timestamp: "
|
|
56
|
+
id_article: 3,
|
|
57
|
+
id_category: "2032",
|
|
58
|
+
name: "CORTINA BLACKOUT DE POLIÉSTER CAFÉ 2.13 X 1.06 M",
|
|
59
|
+
upc: "161157",
|
|
60
|
+
timestamp: "2022-11-14T16:02:47.000Z",
|
|
66
61
|
id_user: 28,
|
|
67
62
|
status: "NULL",
|
|
68
63
|
active: 1,
|
|
69
64
|
company_id: 1,
|
|
70
65
|
company_name: "GRUPO BRAHMA",
|
|
71
66
|
country: "México",
|
|
72
|
-
id_order:
|
|
73
|
-
id_datasheet_especialist:
|
|
74
|
-
id_datasheet_facilitator:
|
|
75
|
-
id_description_especialist:
|
|
76
|
-
id_description_facilitator:
|
|
77
|
-
id_images_especialist:
|
|
78
|
-
id_images_facilitator:
|
|
79
|
-
id_auditor:
|
|
67
|
+
id_order: 130,
|
|
68
|
+
id_datasheet_especialist: null,
|
|
69
|
+
id_datasheet_facilitator: null,
|
|
70
|
+
id_description_especialist: null,
|
|
71
|
+
id_description_facilitator: null,
|
|
72
|
+
id_images_especialist: null,
|
|
73
|
+
id_images_facilitator: null,
|
|
74
|
+
id_auditor: null,
|
|
80
75
|
id_recepcionist: null,
|
|
81
|
-
category: "
|
|
76
|
+
category: "Decoración|Cortinas y Persianas|Cortinas",
|
|
82
77
|
missingAttributes: 0,
|
|
83
78
|
missingDescriptions: 0,
|
|
84
79
|
missingImages: 0
|
|
85
80
|
},
|
|
86
81
|
retailers: [{
|
|
87
|
-
id:
|
|
88
|
-
name: "
|
|
89
|
-
}, {
|
|
90
|
-
id: 43,
|
|
91
|
-
name: "City Club"
|
|
82
|
+
id: 58,
|
|
83
|
+
name: "The Home Depot Golden"
|
|
92
84
|
}],
|
|
93
85
|
country: "México",
|
|
94
|
-
upc: "
|
|
86
|
+
upc: "161157"
|
|
95
87
|
},
|
|
96
88
|
location: {
|
|
97
89
|
product: {
|
|
@@ -100,26 +92,26 @@ RetailerProductEditionDefault.args = {
|
|
|
100
92
|
}
|
|
101
93
|
},
|
|
102
94
|
user: {
|
|
103
|
-
id_user:
|
|
104
|
-
name: "
|
|
105
|
-
last_name: "
|
|
106
|
-
email: "
|
|
107
|
-
position: "",
|
|
95
|
+
id_user: 30,
|
|
96
|
+
name: "Admin",
|
|
97
|
+
last_name: "Ulises",
|
|
98
|
+
email: "salmeron.5@hotmail.com",
|
|
99
|
+
position: "Admin",
|
|
108
100
|
telephone: "",
|
|
109
|
-
country: "",
|
|
101
|
+
country: "México",
|
|
110
102
|
id_company: 2,
|
|
111
|
-
id_cognito: "
|
|
103
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
112
104
|
birth_Date: null,
|
|
113
105
|
about_me: "",
|
|
114
106
|
zip_code: "",
|
|
115
107
|
address: "",
|
|
116
108
|
job: "",
|
|
117
109
|
id_stripe: "",
|
|
118
|
-
id_role:
|
|
110
|
+
id_role: 6,
|
|
119
111
|
active: 1,
|
|
120
112
|
is_retailer: 0,
|
|
121
113
|
email_notify: 1,
|
|
122
|
-
is_user_tech: "AS",
|
|
114
|
+
is_user_tech: "ADMIN-AS",
|
|
123
115
|
membership: {
|
|
124
116
|
id: 2,
|
|
125
117
|
start_date: "2021-11-05T02:35:12.000Z",
|
|
@@ -131,6 +123,6 @@ RetailerProductEditionDefault.args = {
|
|
|
131
123
|
products_limit: "3",
|
|
132
124
|
type: "PyMES"
|
|
133
125
|
},
|
|
134
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
126
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1676494961913"
|
|
135
127
|
}
|
|
136
128
|
};
|