contentoh-components-library 21.4.18 → 21.4.20

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.
Files changed (116) hide show
  1. package/.env.development +2 -5
  2. package/.env.production +1 -3
  3. package/dist/components/atoms/Avatar/index.js +2 -3
  4. package/dist/components/atoms/Card/index.js +5 -46
  5. package/dist/components/atoms/Card/styles.js +1 -3
  6. package/dist/components/atoms/CheckBox/index.js +2 -7
  7. package/dist/components/atoms/CheckBox/styles.js +1 -1
  8. package/dist/components/atoms/InputFormatter/styles.js +1 -1
  9. package/dist/components/atoms/SliderToolTip/styles.js +1 -1
  10. package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
  11. package/dist/components/molecules/HeaderTop/index.js +11 -68
  12. package/dist/components/molecules/TagAndInput/index.js +1 -1
  13. package/dist/components/organisms/Chat/Chat.stories.js +8 -27
  14. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  15. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  16. package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
  17. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  18. package/dist/components/organisms/Chat/index.js +4 -49
  19. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  20. package/dist/components/organisms/Modal/styles.js +1 -1
  21. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +116 -60
  22. package/dist/components/pages/ProviderProductEdition/index.js +207 -213
  23. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  24. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +4 -8
  25. package/dist/components/pages/RetailerProductEdition/index.js +308 -316
  26. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  27. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  28. package/dist/index.js +52 -247
  29. package/package.json +1 -4
  30. package/src/components/atoms/Avatar/index.js +2 -8
  31. package/src/components/atoms/Card/index.js +2 -35
  32. package/src/components/atoms/Card/styles.js +5 -41
  33. package/src/components/atoms/CheckBox/index.js +1 -4
  34. package/src/components/atoms/CheckBox/styles.js +0 -2
  35. package/src/components/atoms/InputFormatter/styles.js +1 -2
  36. package/src/components/atoms/SliderToolTip/styles.js +1 -1
  37. package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
  38. package/src/components/molecules/HeaderTop/index.js +6 -52
  39. package/src/components/molecules/TagAndInput/index.js +8 -10
  40. package/src/components/organisms/Chat/Chat.stories.js +7 -27
  41. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  42. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -10
  43. package/src/components/organisms/Chat/ContentChat/index.js +12 -88
  44. package/src/components/organisms/Chat/Footer/index.js +0 -11
  45. package/src/components/organisms/Chat/index.js +4 -46
  46. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  47. package/src/components/organisms/Modal/styles.js +1 -4
  48. package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
  49. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +116 -66
  50. package/src/components/pages/ProviderProductEdition/index.js +185 -177
  51. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  52. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
  53. package/src/components/pages/RetailerProductEdition/index.js +184 -158
  54. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  55. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  56. package/src/index.js +0 -16
  57. package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
  58. package/dist/components/organisms/PanelLayout/PanelLayout.stories.js +0 -87
  59. package/dist/components/organisms/PanelLayout/index.js +0 -27
  60. package/dist/components/organisms/PanelLayout/styles.js +0 -32
  61. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  62. package/src/components/atoms/ImageCarousel/index.js +0 -103
  63. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  64. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  65. package/src/components/atoms/PercentTag/index.js +0 -9
  66. package/src/components/atoms/PercentTag/styles.js +0 -69
  67. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  68. package/src/components/atoms/RatingStars/index.js +0 -31
  69. package/src/components/atoms/RatingStars/styles.js +0 -28
  70. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  71. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  72. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  73. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  74. package/src/components/atoms/RetailerOption/index.js +0 -53
  75. package/src/components/atoms/RetailerOption/styles.js +0 -41
  76. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  77. package/src/components/atoms/RetailersList/index.js +0 -20
  78. package/src/components/atoms/RetailersList/styles.js +0 -19
  79. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
  80. package/src/components/atoms/UserCatalog/index.js +0 -100
  81. package/src/components/atoms/UserCatalog/styles.js +0 -24
  82. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  83. package/src/components/atoms/UserOption/index.js +0 -95
  84. package/src/components/atoms/UserOption/styles.js +0 -61
  85. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  86. package/src/components/atoms/UserSelector/index.js +0 -86
  87. package/src/components/atoms/UserSelector/styles.js +0 -55
  88. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  89. package/src/components/molecules/GridItem/index.js +0 -105
  90. package/src/components/molecules/GridItem/styles.js +0 -104
  91. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  92. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  93. package/src/components/molecules/HeaderItem/index.js +0 -26
  94. package/src/components/molecules/HeaderItem/styles.js +0 -27
  95. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  96. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  97. package/src/components/molecules/RowItem/index.js +0 -45
  98. package/src/components/molecules/RowItem/styles.js +0 -40
  99. package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -13
  100. package/src/components/molecules/StripeCardForm/index.js +0 -42
  101. package/src/components/molecules/StripeCardForm/paymentForm.js +0 -124
  102. package/src/components/molecules/StripeCardForm/styles.js +0 -73
  103. package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -12
  104. package/src/components/molecules/StripeCardSelector/index.js +0 -44
  105. package/src/components/molecules/StripeCardSelector/styles.js +0 -4
  106. package/src/components/molecules/StripeCardSelector/utils.js +0 -17
  107. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
  108. package/src/components/organisms/GridProducts/index.js +0 -50
  109. package/src/components/organisms/GridProducts/styles.js +0 -14
  110. package/src/components/organisms/GridProducts/utils.js +0 -111
  111. package/src/components/organisms/PanelLayout/PanelLayout.stories.js +0 -63
  112. package/src/components/organisms/PanelLayout/index.js +0 -11
  113. package/src/components/organisms/PanelLayout/styles.js +0 -33
  114. package/src/components/organisms/SideModal/SideModal.stories.js +0 -23
  115. package/src/components/organisms/SideModal/index.js +0 -50
  116. package/src/components/organisms/SideModal/styles.js +0 -30
@@ -39,9 +39,6 @@ import Slide1_4 from "../../../assets/images/sliderToolTip/slide4.svg";
39
39
  import Slide1_5 from "../../../assets/images/sliderToolTip/slide5.svg";
40
40
  import { VersionSelector } from "../../organisms/VersionSelector";
41
41
  import { useCloseModal } from "../../../global-files/customHooks";
42
- import { createMessage, sendMessage } from "../RetailerProductEdition/utils";
43
- import { Modal } from "../../organisms/Modal";
44
- import { ButtonV2 } from "../../atoms/ButtonV2";
45
42
 
46
43
  const reducerImages = (state, action) => {
47
44
  let { values, attrForImgs, inputsByRetailer } = state;
@@ -217,7 +214,6 @@ export const ProviderProductEdition = ({
217
214
  const isRetailer = user?.is_retailer;
218
215
  const [loading, setLoading] = useState(true);
219
216
  const [validatedAll, setValidatedAll] = useState(false);
220
- const [showRejectModal, setShowRejectModal] = useState(false);
221
217
 
222
218
  const [origin, setOrigin] = useState({
223
219
  "Ficha técnica": null,
@@ -347,6 +343,28 @@ export const ProviderProductEdition = ({
347
343
  (type) => {
348
344
  const formatter = new Intl.ListFormat("es", { type: "conjunction" });
349
345
  switch (type) {
346
+ case "error":
347
+ setGlobalModal({
348
+ message: `${activeTab} rechazada`,
349
+ detail: "Agrega tu comentarios para enviar el rechazo",
350
+ img: errorModal,
351
+ textArea: true,
352
+ button1: {
353
+ name: "Enviar",
354
+ action: (e) => {
355
+ const textArea = document.querySelector("#area");
356
+ if (textArea.value) {
357
+ textArea.style.border = "none";
358
+ createComment(e, textArea.value);
359
+ showGlobalModal("commentsSent");
360
+ validatedAll ? validateAll("R") : sendEvaluation("R");
361
+ } else {
362
+ textArea.style.border = "2px solid red";
363
+ }
364
+ },
365
+ },
366
+ });
367
+ break;
350
368
  case "generic":
351
369
  setGlobalModal(dataGenericModal);
352
370
  break;
@@ -506,9 +524,7 @@ export const ProviderProductEdition = ({
506
524
  );
507
525
  setServicesData(parsedResponse);
508
526
  }
509
- retailers &&
510
- !activeRetailer.id &&
511
- setActiveRetailer(active ? active : retailers[0]);
527
+ !activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
512
528
  };
513
529
 
514
530
  const isRevision = () => {
@@ -584,7 +600,7 @@ export const ProviderProductEdition = ({
584
600
  });
585
601
  }
586
602
  setProduct(productTemp);
587
- retailers && setActivePercentage(retailers[0]?.percentage);
603
+ setActivePercentage(retailers[0]?.percentage);
588
604
  }, [percentages]);
589
605
 
590
606
  const loadInputs = () => {
@@ -828,19 +844,32 @@ export const ProviderProductEdition = ({
828
844
  }
829
845
  };
830
846
 
831
- const createComment = async (messages = [], retailerId) => {
847
+ const createComment = async (e, body, tab) => {
848
+ let concept = "";
849
+ switch (activeTab) {
850
+ case "Ficha técnica":
851
+ concept = "datasheet";
852
+ break;
853
+ case "Imágenes":
854
+ concept = "images";
855
+ break;
856
+
857
+ default:
858
+ concept = "description";
859
+ break;
860
+ }
832
861
  const data = {
833
- paramsBody: {
834
- id: product.article.id_article || productEdit.ArticleId,
835
- version: version,
836
- items: messages,
837
- retailerId: retailerId,
838
- status: product.status || productEdit.product.status,
839
- },
840
- paramsHeader: { Authorization: token },
862
+ articleId: product?.id_article,
863
+ orderId: product?.orderId,
864
+ message: body,
865
+ concept: concept,
866
+ version: version,
841
867
  };
842
- setMessage("");
843
- return sendMessage(data);
868
+ await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
869
+ headers: {
870
+ Authorization: token,
871
+ },
872
+ });
844
873
  };
845
874
 
846
875
  useEffect(() => {
@@ -1002,75 +1031,62 @@ export const ProviderProductEdition = ({
1002
1031
  const retailerId = activeRetailer?.id;
1003
1032
  let res;
1004
1033
  try {
1034
+ const body = {
1035
+ orderArticleRetailers: [
1036
+ { orderId, articleId, retailersIds: [activeRetailer.id] },
1037
+ ],
1038
+ isAproved: false,
1039
+ service: concept,
1040
+ };
1005
1041
  if (result) {
1006
- data.result = result;
1007
- data.retailerId = retailerId;
1008
- res = await axios.put(
1009
- `${process.env.REACT_APP_EVALUATION_ENDPOINT}`,
1010
- data,
1042
+ body.isAproved = result === "A";
1043
+ res = await axios.post(
1044
+ `${process.env.REACT_APP_EVALUATION_REFACTOR}`,
1045
+ body,
1011
1046
  {
1012
1047
  headers: {
1013
1048
  Authorization: token,
1014
1049
  },
1015
1050
  }
1016
1051
  );
1017
- const newStatuses = JSON.parse(res.data.body);
1018
- const orderStatus = newStatuses.newOrderStatus;
1019
- const serviceStatus =
1020
- newStatuses.newServiceStatus[articleId][
1021
- `${getConcept(activeTab)}Status`
1022
- ];
1052
+
1053
+ const response = JSON.parse(res.data.body)?.successfulData;
1054
+ const newStatuses = response;
1055
+ const statusObject =
1056
+ response[`${orderId}-${articleId}-${activeRetailer.id}`];
1057
+ const orderStatus = statusObject["generalStatus"];
1058
+ const serviceStatus = newStatuses[`${getConcept(activeTab)}Status`];
1023
1059
 
1024
1060
  const newProductEdit = productEdit;
1025
1061
  newProductEdit.product[sectionStatusKey] = serviceStatus;
1026
1062
  setProductEdit(newProductEdit);
1027
- const showSurveyByProvider =
1028
- !user.is_retailer && orderStatus[orderId] === "AP";
1029
- const showSurveyByRetailer =
1030
- user.is_retailer && orderStatus[orderId] === "ACA";
1063
+ const showSurveyByProvider = !user.is_retailer && orderStatus === "AP";
1064
+ const showSurveyByRetailer = user.is_retailer && orderStatus === "ACA";
1031
1065
  showSurvey && showSurvey(showSurveyByProvider || showSurveyByRetailer);
1032
1066
  } else {
1033
- res = await axios.put(`${process.env.REACT_APP_SEND_EVAL}`, data, {
1034
- headers: {
1035
- Authorization: token,
1036
- },
1037
- });
1067
+ res = await axios.post(
1068
+ `${process.env.REACT_APP_EVALUATION_REFACTOR}`,
1069
+ body,
1070
+ {
1071
+ headers: {
1072
+ Authorization: token,
1073
+ },
1074
+ }
1075
+ );
1038
1076
  }
1039
1077
  if (res.data.statusCode === 200) {
1040
- const { newArticleStatus, newServiceStatus, newStatus } = JSON.parse(
1041
- res.data.body
1042
- );
1043
-
1044
- const message = createMessage(
1045
- product.retailers || product.retailersAvailable,
1046
- activeRetailer.id,
1047
- product[sectionStatusKey],
1048
- newStatus,
1049
- activeTab
1050
- );
1051
-
1052
- const messageData = {
1053
- paramsBody: {
1054
- id: product.article.id_article || productEdit.ArticleId,
1055
- version: version,
1056
- items: [{ type: "status", value: message }],
1057
- retailerId: activeRetailer.id,
1058
- status: product.status || productEdit.product.status,
1059
- },
1060
- paramsHeader: { Authorization: token },
1061
- };
1062
- await sendMessage(messageData);
1063
-
1064
- if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
1078
+ const response = JSON.parse(res.data.body)?.successfulData;
1079
+ const statusObject =
1080
+ response[`${orderId}-${articleId}-${activeRetailer.id}`];
1081
+ productTemp.status = statusObject["generalStatus"];
1065
1082
  const retailerStatusCopy = { ...retailerStatus };
1066
- retailerStatusCopy[activeRetailer.id][concept] = newStatus;
1083
+ retailerStatusCopy[activeRetailer.id][concept] =
1084
+ statusObject[`${concept}Status`];
1067
1085
  setRetailerStatus(retailerStatusCopy);
1068
1086
  productTemp.statusByRetailer = retailerStatusCopy;
1069
1087
  let status;
1070
- if (newServiceStatus) {
1071
- status = newServiceStatus[articleId][`${concept}Status`];
1072
- productTemp[`${concept}_status`] = status;
1073
- }
1088
+ status = statusObject[`${concept}Status`];
1089
+ productTemp[`${concept}_status`] = status;
1074
1090
  setProduct(productTemp);
1075
1091
  sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
1076
1092
  setOrigin((prev) => ({ ...prev, [concept]: status }));
@@ -1086,48 +1102,38 @@ export const ProviderProductEdition = ({
1086
1102
  setLoading(true);
1087
1103
  const evaluationArray = [];
1088
1104
  const conceptArray = ["description", "datasheet", "images"];
1089
- const dataGeneral = {
1090
- articleId: product.id_article,
1091
- orderId: product.id_order ?? product.orderId,
1092
- result,
1093
- isAproved: result === "A",
1094
- };
1095
- const messages = [];
1105
+ const isAproved = result === "A";
1106
+ const retailersIds = [];
1096
1107
  servicesData?.forEach((ret) => {
1097
- const { service, id_retailer } = ret;
1098
- let data = {};
1099
- data = {
1100
- ...dataGeneral,
1101
- concept: service,
1102
- retailerId: id_retailer,
1103
- evalStatus: retailerStatus[id_retailer][service],
1104
- };
1108
+ if (!retailersIds.includes(ret.id_retailer))
1109
+ retailersIds.push(ret.id_retailer);
1110
+ });
1111
+ const body = {
1112
+ orderArticleRetailers: [
1113
+ {
1114
+ orderId: product.id_order ?? product.orderId,
1115
+ articleId: product.article.id_article,
1116
+ retailersIds,
1117
+ },
1118
+ ],
1119
+ isAproved,
1120
+ };
1121
+ conceptArray.forEach((concept) => {
1122
+ body.service = concept;
1105
1123
  evaluationArray.push(
1106
- axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
1124
+ axios.post(`${process.env.REACT_APP_EVALUATION_REFACTOR}`, body, {
1107
1125
  headers: {
1108
1126
  Authorization: token,
1109
1127
  },
1110
1128
  })
1111
1129
  );
1112
- if (product[`${ret.service}_status`] !== "NS") {
1113
- const message = createMessage(
1114
- product.retailers,
1115
- ret.id_retailer,
1116
- product[`${ret.service}_status`],
1117
- `${result}A`,
1118
- ret.service
1119
- );
1120
- messages.push(
1121
- createComment([{ type: "status", value: message }], ret.id_retailer)
1122
- );
1123
- }
1124
1130
  });
1125
1131
  await Promise.all(evaluationArray);
1126
1132
  const userType = user.is_retailer === 1 ? "CA" : "P";
1127
1133
 
1128
1134
  const productTemp = product;
1129
1135
  const status = `${result}${userType}`;
1130
- productTemp.article_status = status;
1136
+ productTemp.status = status;
1131
1137
  productTemp.datasheet_status =
1132
1138
  productTemp.datasheet_status === "NA" ? "NA" : status;
1133
1139
  productTemp.description_status =
@@ -1160,7 +1166,6 @@ export const ProviderProductEdition = ({
1160
1166
  product: productTemp,
1161
1167
  })
1162
1168
  );
1163
- await Promise.all(messages);
1164
1169
 
1165
1170
  await loadData();
1166
1171
  } catch (error) {
@@ -1289,7 +1294,8 @@ export const ProviderProductEdition = ({
1289
1294
  return;
1290
1295
  } else if (user.is_retailer) {
1291
1296
  if (product.id_order || product.orderId) {
1292
- sendEvaluation("R");
1297
+ setValidatedAll(true);
1298
+ showGlobalModal("error");
1293
1299
  } else {
1294
1300
  setDataGenericModal((prev) => ({
1295
1301
  ...prev,
@@ -1301,7 +1307,8 @@ export const ProviderProductEdition = ({
1301
1307
  showGlobalModal("generic");
1302
1308
  }
1303
1309
  } else {
1304
- sendEvaluation("R");
1310
+ setValidatedAll(true);
1311
+ showGlobalModal("error");
1305
1312
  }
1306
1313
  }
1307
1314
  };
@@ -1311,7 +1318,6 @@ export const ProviderProductEdition = ({
1311
1318
  <HeaderTop
1312
1319
  setHeaderTop={setHeaderTop}
1313
1320
  withChat={location?.state?.withChat}
1314
- chatType={location?.state?.chatType}
1315
1321
  productSelected={productSelected}
1316
1322
  token={token}
1317
1323
  activeRetailer={activeRetailer}
@@ -1390,7 +1396,7 @@ export const ProviderProductEdition = ({
1390
1396
  } else if (user.is_retailer) {
1391
1397
  if (product.id_order || product.orderId) {
1392
1398
  setValidatedAll(true);
1393
- setShowRejectModal(true);
1399
+ showGlobalModal("error");
1394
1400
  } else {
1395
1401
  setDataGenericModal((prev) => ({
1396
1402
  ...prev,
@@ -1402,14 +1408,12 @@ export const ProviderProductEdition = ({
1402
1408
  showGlobalModal("generic");
1403
1409
  }
1404
1410
  } else {
1405
- setShowRejectModal(true);
1406
1411
  setValidatedAll(true);
1412
+ showGlobalModal("error");
1407
1413
  }
1408
1414
  }}
1409
1415
  approve={() => sendToEvaluation("A")}
1410
- reject={() => {
1411
- setShowRejectModal(true);
1412
- }}
1416
+ reject={() => sendToEvaluation("R")}
1413
1417
  />
1414
1418
  <FullTabsMenu
1415
1419
  tabsSections={tabsSections}
@@ -1529,41 +1533,87 @@ export const ProviderProductEdition = ({
1529
1533
  </>
1530
1534
  )}
1531
1535
  </div>
1532
- {!(isRevision() && getSectionStatus()) && !revision && (
1533
- <div className="required-inputs-message">
1534
- <div>
1535
- <p>
1536
- Los atributos son requeridos por las plataformas de las
1537
- cadenas, es muy importante completar los campos requeridos ya
1538
- que pueden rechazar el producto por falta de información.
1539
- </p>
1540
- </div>
1541
- {inCart ? (
1542
- <button type="button">
1543
- <Link to="/checkout">
1544
- <p>Articulo en carrito</p>
1545
- <p>Ir a checkout</p>
1546
- </Link>
1547
- </button>
1536
+ {isRevision() && getSectionStatus() ? (
1537
+ <div className="commentary-box">
1538
+ {!comment ? (
1539
+ <div className="commentary">
1540
+ <TagAndInput
1541
+ label={"Caja de Comentario"}
1542
+ inputType={"textarea"}
1543
+ inputCols={80}
1544
+ inputRows={4}
1545
+ inputId={"commentary-box"}
1546
+ index={0}
1547
+ />
1548
+ <div className="buttons-box">
1549
+ <Button
1550
+ buttonType={"general-transparent-button"}
1551
+ label={"Enviar comentario"}
1552
+ onClick={(e) =>
1553
+ createComment(
1554
+ e,
1555
+ document.querySelector(
1556
+ "#description-commentary-box-0 .ql-container .ql-editor > p"
1557
+ ).innerHTML,
1558
+ activeTab
1559
+ )
1560
+ }
1561
+ />
1562
+ </div>
1563
+ </div>
1548
1564
  ) : (
1549
- <>
1550
- <SliderToolTip
1551
- infoIcon={InfoIcon}
1552
- slidefront={slidefront}
1553
- iconSize={"big-image"}
1554
- slidePosition={"top-slide"}
1565
+ <div className="feedback-box">
1566
+ <Commentary
1567
+ comment={comment.message}
1568
+ reviewed={crossComment}
1555
1569
  />
1556
1570
  <Button
1557
- onClick={() => {
1558
- setShowContentohRequestModal &&
1559
- setShowContentohRequestModal(true);
1571
+ buttonType={"circular-button accept-button"}
1572
+ onClick={async () => {
1573
+ setCrossComment(true);
1574
+ commentRevised();
1560
1575
  }}
1561
- buttonType="general-default-button"
1562
- label="Enviar a Content-oh!"
1563
1576
  />
1564
- </>
1577
+ </div>
1565
1578
  )}
1566
1579
  </div>
1580
+ ) : (
1581
+ !revision && (
1582
+ <div className="required-inputs-message">
1583
+ <div>
1584
+ <p>
1585
+ Los atributos son requeridos por las plataformas de las
1586
+ cadenas, es muy importante completar los campos requeridos
1587
+ ya que pueden rechazar el producto por falta de información.
1588
+ </p>
1589
+ </div>
1590
+ {inCart ? (
1591
+ <button type="button">
1592
+ <Link to="/checkout">
1593
+ <p>Articulo en carrito</p>
1594
+ <p>Ir a checkout</p>
1595
+ </Link>
1596
+ </button>
1597
+ ) : (
1598
+ <>
1599
+ <SliderToolTip
1600
+ infoIcon={InfoIcon}
1601
+ slidefront={slidefront}
1602
+ iconSize={"big-image"}
1603
+ slidePosition={"top-slide"}
1604
+ />
1605
+ <Button
1606
+ onClick={() => {
1607
+ setShowContentohRequestModal &&
1608
+ setShowContentohRequestModal(true);
1609
+ }}
1610
+ buttonType="general-default-button"
1611
+ label="Enviar a Content-oh!"
1612
+ />
1613
+ </>
1614
+ )}
1615
+ </div>
1616
+ )
1567
1617
  )}
1568
1618
  </div>
1569
1619
  </div>
@@ -1606,48 +1656,6 @@ export const ProviderProductEdition = ({
1606
1656
  jwt={token}
1607
1657
  />
1608
1658
  )}
1609
- {showRejectModal && (
1610
- <Modal
1611
- title={"Agregar mensaje de rechazo"}
1612
- show={showRejectModal}
1613
- customComponent={
1614
- <TagAndInput
1615
- inputType={"textarea"}
1616
- inputId={"modal-message-box"}
1617
- index={0}
1618
- color={"white"}
1619
- />
1620
- }
1621
- buttons={[
1622
- <ButtonV2
1623
- key={"btn-Cancelar"}
1624
- type={"white"}
1625
- label={"Cancelar"}
1626
- size={12}
1627
- onClick={() => {
1628
- setShowRejectModal(false);
1629
- }}
1630
- />,
1631
- <ButtonV2
1632
- key={"btn-Aceptar"}
1633
- type={"pink"}
1634
- label={"Aceptar"}
1635
- size={12}
1636
- onClick={async () => {
1637
- const body = document.querySelector(
1638
- "#modal-message-box .ql-container .ql-editor > p"
1639
- ).innerHTML;
1640
- const messages = [
1641
- { type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
1642
- ];
1643
- await createComment(messages, activeRetailer.id);
1644
- validatedAll ? validateAll("R") : sendToEvaluation("R");
1645
- setShowRejectModal(false);
1646
- }}
1647
- />,
1648
- ]}
1649
- />
1650
- )}
1651
1659
  </Container>
1652
1660
  );
1653
1661
  };
@@ -107,10 +107,6 @@ export const Container = styled.div`
107
107
  }
108
108
  }
109
109
  }
110
- #modal-message-box {
111
- width: 400px;
112
- height: 100px;
113
- }
114
110
  .container {
115
111
  width: 100%;
116
112
  height: 100%;
@@ -119,4 +115,4 @@ export const Container = styled.div`
119
115
  width: 100%;
120
116
  }
121
117
  }
122
- `;
118
+ `;
@@ -16,7 +16,7 @@ RetailerProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb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Qo056anVud-inUMiX9KDTaorXdBCD0doWgv8NkYWSEpUS_Ctj-NG6vAled9g-6oLnC6DLR_ay6PRnAKGVNCv8bRZJL0GqF8ZnWk02svDHfUPJ0Q",
20
20
  productSelected: {
21
21
  services: {
22
22
  datasheets: 1,
@@ -73,11 +73,7 @@ RetailerProductEditionDefault.args = {
73
73
  upc: "7543453453",
74
74
  },
75
75
  location: {
76
- product: { articleId: 354, versionId: 3 },
77
- state: {
78
- withChat: true,
79
- chatType: "product_status",
80
- },
76
+ product: { articleId: 39290, versionId: 7 },
81
77
  },
82
78
  user: {
83
79
  id_user: 37,
@@ -111,6 +107,6 @@ RetailerProductEditionDefault.args = {
111
107
  products_limit: "3",
112
108
  type: "PyMES",
113
109
  },
114
- src: "https://content-management-profile.s3.amazonaws.com/id-37/37.png?1691175586149",
110
+ src: "https://content-management-profile.s3.amazonaws.com/id-37/37.png?1692750648813",
115
111
  },
116
112
  };