contentoh-components-library 21.3.46 → 21.3.48
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 +0 -2
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/organisms/Chat/Chat.stories.js +1 -21
- package/dist/components/organisms/Chat/ContainerItems/index.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +191 -343
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +3 -48
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -2
- package/dist/components/pages/ProviderProductEdition/index.js +1 -2
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
- package/dist/components/pages/RetailerProductEdition/index.js +2 -4
- package/package.json +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/organisms/Chat/Chat.stories.js +0 -21
- package/src/components/organisms/Chat/ContainerItems/index.js +1 -4
- package/src/components/organisms/Chat/ContentChat/index.js +6 -81
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +3 -47
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +2 -3
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +0 -1
- package/src/components/pages/ProviderProductEdition/index.js +0 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +1 -5
- package/src/components/pages/RetailerProductEdition/index.js +0 -2
package/.env.development
CHANGED
|
@@ -24,8 +24,6 @@ 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_GET_AUDIT=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/version-manager
|
|
27
|
-
REACT_APP_READ_MESSAGES=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/read-messages
|
|
28
|
-
REACT_APP_CREATE_MESSAGES=https://fc069ovhuk.execute-api.us-east-1.amazonaws.com/dev/create-messages
|
|
29
27
|
|
|
30
28
|
REACT_APP_IMAGES_ENDPOINT=https://content-management-images.s3.amazonaws.com
|
|
31
29
|
REACT_APP_IMAGES_BUCKET=content-management-images
|
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.HeaderTop = void 0;
|
|
9
9
|
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
-
|
|
12
10
|
var _styles = require("./styles");
|
|
13
11
|
|
|
14
12
|
var _index = require("../../atoms/ScreenHeader/index");
|
|
@@ -21,14 +19,11 @@ var _Chat = require("../../organisms/Chat");
|
|
|
21
19
|
|
|
22
20
|
var _IconoAB = _interopRequireDefault(require("../../../../src/assets/images/generalButton/Icono AB.svg"));
|
|
23
21
|
|
|
24
|
-
var _react2 = require("@testing-library/react");
|
|
25
|
-
|
|
26
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
23
|
|
|
28
24
|
var HeaderTop = function HeaderTop(_ref) {
|
|
29
25
|
var setHeaderTop = _ref.setHeaderTop,
|
|
30
26
|
withChat = _ref.withChat,
|
|
31
|
-
chatType = _ref.chatType,
|
|
32
27
|
productSelected = _ref.productSelected,
|
|
33
28
|
token = _ref.token,
|
|
34
29
|
auditableVersion = _ref.auditableVersion,
|
|
@@ -36,78 +31,26 @@ var HeaderTop = function HeaderTop(_ref) {
|
|
|
36
31
|
isAuditor = _ref.isAuditor,
|
|
37
32
|
activeRetailer = _ref.activeRetailer;
|
|
38
33
|
var headerTop = (0, _react.useRef)();
|
|
39
|
-
|
|
40
|
-
var _useState = (0, _react.useState)(null),
|
|
41
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
|
-
chat = _useState2[0],
|
|
43
|
-
setChat = _useState2[1];
|
|
44
|
-
|
|
45
|
-
var _useState3 = (0, _react.useState)(null),
|
|
46
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
47
|
-
chatData = _useState4[0],
|
|
48
|
-
setChatData = _useState4[1];
|
|
49
|
-
|
|
50
|
-
(0, _react.useEffect)(function () {
|
|
51
|
-
if (activeRetailer.id && productSelected && token.length) {
|
|
52
|
-
var _productSelected$arti;
|
|
53
|
-
|
|
54
|
-
setChatData({
|
|
55
|
-
id: (productSelected === null || productSelected === void 0 ? void 0 : (_productSelected$arti = productSelected.article) === null || _productSelected$arti === void 0 ? void 0 : _productSelected$arti.id_article) || (productSelected === null || productSelected === void 0 ? void 0 : productSelected.id_article),
|
|
56
|
-
version: productSelected === null || productSelected === void 0 ? void 0 : productSelected.version,
|
|
57
|
-
retailerId: activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id,
|
|
58
|
-
status: productSelected === null || productSelected === void 0 ? void 0 : productSelected.status,
|
|
59
|
-
userToken: token
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}, [activeRetailer, productSelected, token]);
|
|
63
|
-
(0, _react.useEffect)(function () {
|
|
64
|
-
if (chatType) renderChat(chatType);
|
|
65
|
-
}, [chatData, chatType]);
|
|
66
34
|
(0, _react.useEffect)(function () {
|
|
67
35
|
setHeaderTop && setHeaderTop(headerTop.current.clientHeight);
|
|
68
36
|
}, []);
|
|
69
|
-
|
|
70
|
-
var renderChat = function renderChat(chatType) {
|
|
71
|
-
switch (chatType) {
|
|
72
|
-
case "product_status":
|
|
73
|
-
chatData && setChat( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
|
|
74
|
-
chatType: "product_status",
|
|
75
|
-
chatContainerType: "popUp",
|
|
76
|
-
chatData: {
|
|
77
|
-
id: chatData === null || chatData === void 0 ? void 0 : chatData.id,
|
|
78
|
-
version: chatData === null || chatData === void 0 ? void 0 : chatData.version,
|
|
79
|
-
retailerId: chatData === null || chatData === void 0 ? void 0 : chatData.retailerId,
|
|
80
|
-
status: chatData === null || chatData === void 0 ? void 0 : chatData.status,
|
|
81
|
-
userToken: chatData === null || chatData === void 0 ? void 0 : chatData.userToken
|
|
82
|
-
},
|
|
83
|
-
size: 18,
|
|
84
|
-
activeRetailer: activeRetailer
|
|
85
|
-
}));
|
|
86
|
-
break;
|
|
87
|
-
|
|
88
|
-
default:
|
|
89
|
-
setChat( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
|
|
90
|
-
chatType: "merchant_product",
|
|
91
|
-
chatContainerType: "popUp",
|
|
92
|
-
chatData: {
|
|
93
|
-
userToken: token,
|
|
94
|
-
id: productSelected.id_article,
|
|
95
|
-
version: productSelected.version
|
|
96
|
-
},
|
|
97
|
-
size: 18,
|
|
98
|
-
activeRetailer: activeRetailer
|
|
99
|
-
}));
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
105
38
|
ref: headerTop,
|
|
106
39
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
107
40
|
text: "Edici\xF3n de producto"
|
|
108
41
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
42
|
className: "buttons-container",
|
|
110
|
-
children: [withChat &&
|
|
43
|
+
children: [withChat && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chat.Chat, {
|
|
44
|
+
chatType: "merchant_product",
|
|
45
|
+
chatContainerType: "popUp",
|
|
46
|
+
chatData: {
|
|
47
|
+
userToken: token,
|
|
48
|
+
id: productSelected.id_article,
|
|
49
|
+
version: productSelected.version
|
|
50
|
+
},
|
|
51
|
+
size: 18,
|
|
52
|
+
activeRetailer: activeRetailer
|
|
53
|
+
}), isAuditor && auditableVersion && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
|
|
111
54
|
buttonType: "general-white-button circular-button",
|
|
112
55
|
onClick: function onClick() {
|
|
113
56
|
setCompare(function (current) {
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.chatTicket_userTECH = exports.chatTicket_userNORMAL = exports.
|
|
8
|
+
exports.default = exports.chatTicket_userTECH = exports.chatTicket_userNORMAL = exports.chatPROV_orderProduct = exports.chatFAB_orderProduct_user49 = exports.chatFAB_orderProduct_user37 = exports.chatCAD_orderProduct = exports.chatCAD_merchantsProductProvider = exports.chatCAD_merchantsProduct = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
11
|
|
|
@@ -172,24 +172,4 @@ chatTicket_userTECH.args = {
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
classNameContainerFixed: "chatTicket"
|
|
175
|
-
}; // ejemplo del chat para los cambios de status del producto.
|
|
176
|
-
|
|
177
|
-
var chatProduct_status = Template.bind({});
|
|
178
|
-
exports.chatProduct_status = chatProduct_status;
|
|
179
|
-
chatProduct_status.args = {
|
|
180
|
-
chatType: "product_status",
|
|
181
|
-
chatContainerType: "popUp",
|
|
182
|
-
chatData: {
|
|
183
|
-
id: 37414,
|
|
184
|
-
version: 7,
|
|
185
|
-
retailerId: 70,
|
|
186
|
-
status: "AA",
|
|
187
|
-
orderId: 15189,
|
|
188
|
-
userToken: "eyJraW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ed9sEvAxGh_B44aIgWeDteQGeGdYhsm6rUcxgkrskywZJp9FW5VgYXuDcC5NpvomMMRy_v95UV897JzCHl__sK2Z9ahm0eczVN3tAc0GbKnlN96ZrGTQ_nmNHbuMDPQBPXH5HXZQ",
|
|
189
|
-
currentUser: {
|
|
190
|
-
id: 37,
|
|
191
|
-
companyId: 2,
|
|
192
|
-
isUserTech: false
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
175
|
};
|
|
@@ -87,7 +87,7 @@ var ContainerItems = function ContainerItems(props) {
|
|
|
87
87
|
var containerItems = (0, _react.useRef)(null);
|
|
88
88
|
(0, _react.useEffect)(function () {
|
|
89
89
|
if (!items) return;
|
|
90
|
-
if (["merchant_product", "order_product"
|
|
90
|
+
if (["merchant_product", "order_product"].includes(chatType)) renderItems();else if (chatType === "ticket") renderItemsTicket();else setCustomItems([]);
|
|
91
91
|
}, [items]);
|
|
92
92
|
(0, _react.useEffect)(function () {
|
|
93
93
|
var containerScroll = document.getElementById("ulItems");
|