contentoh-components-library 21.3.92 → 21.3.94

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 (153) hide show
  1. package/.env.development +0 -5
  2. package/.env.production +0 -3
  3. package/dist/assets/fonts/roboto/LICENSE.txt +202 -0
  4. package/dist/components/atoms/Avatar/index.js +2 -3
  5. package/dist/components/atoms/Card/index.js +5 -46
  6. package/dist/components/atoms/Card/styles.js +1 -3
  7. package/dist/components/atoms/CheckBox/index.js +2 -7
  8. package/dist/components/atoms/CheckBox/styles.js +1 -1
  9. package/dist/components/atoms/InputFormatter/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/TabsMenu/index.js +13 -7
  13. package/dist/components/molecules/TagAndInput/index.js +1 -1
  14. package/dist/components/organisms/Chat/Chat.stories.js +8 -27
  15. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  16. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  17. package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
  18. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  19. package/dist/components/organisms/Chat/index.js +4 -49
  20. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  21. package/dist/components/organisms/FullTabsMenu/index.js +3 -1
  22. package/dist/components/organisms/Modal/styles.js +1 -1
  23. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +96 -171
  24. package/dist/components/pages/ProviderProductEdition/index.js +178 -190
  25. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  26. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +52 -77
  27. package/dist/components/pages/RetailerProductEdition/index.js +276 -290
  28. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  29. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  30. package/dist/index.js +52 -182
  31. package/package.json +1 -4
  32. package/src/components/atoms/Avatar/index.js +2 -8
  33. package/src/components/atoms/Card/index.js +2 -35
  34. package/src/components/atoms/Card/styles.js +5 -41
  35. package/src/components/atoms/CheckBox/index.js +1 -4
  36. package/src/components/atoms/CheckBox/styles.js +0 -2
  37. package/src/components/atoms/InputFormatter/styles.js +1 -2
  38. package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
  39. package/src/components/molecules/HeaderTop/index.js +6 -52
  40. package/src/components/molecules/TabsMenu/index.js +16 -10
  41. package/src/components/molecules/TagAndInput/index.js +8 -10
  42. package/src/components/organisms/Chat/Chat.stories.js +7 -27
  43. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  44. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -10
  45. package/src/components/organisms/Chat/ContentChat/index.js +12 -88
  46. package/src/components/organisms/Chat/Footer/index.js +0 -11
  47. package/src/components/organisms/Chat/index.js +4 -46
  48. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  49. package/src/components/organisms/FullTabsMenu/index.js +3 -1
  50. package/src/components/organisms/Modal/styles.js +1 -4
  51. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +98 -181
  52. package/src/components/pages/ProviderProductEdition/index.js +132 -134
  53. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  54. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +46 -76
  55. package/src/components/pages/RetailerProductEdition/index.js +138 -123
  56. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  57. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  58. package/src/index.js +0 -11
  59. package/dist/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -90
  60. package/dist/components/atoms/ImageCarousel/index.js +0 -123
  61. package/dist/components/atoms/ImageCarousel/styles.js +0 -18
  62. package/dist/components/atoms/PercentTag/PercentTag.stories.js +0 -31
  63. package/dist/components/atoms/PercentTag/index.js +0 -23
  64. package/dist/components/atoms/PercentTag/styles.js +0 -22
  65. package/dist/components/atoms/RatingStars/RatingStars.stories.js +0 -30
  66. package/dist/components/atoms/RatingStars/index.js +0 -53
  67. package/dist/components/atoms/RatingStars/styles.js +0 -18
  68. package/dist/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -48
  69. package/dist/components/atoms/RetailerCatalog/index.js +0 -69
  70. package/dist/components/atoms/RetailerCatalog/styles.js +0 -20
  71. package/dist/components/atoms/RetailerOption/RetailerOption.stories.js +0 -33
  72. package/dist/components/atoms/RetailerOption/index.js +0 -62
  73. package/dist/components/atoms/RetailerOption/styles.js +0 -20
  74. package/dist/components/atoms/RetailersList/RetailersList.stories.js +0 -45
  75. package/dist/components/atoms/RetailersList/index.js +0 -44
  76. package/dist/components/atoms/RetailersList/styles.js +0 -18
  77. package/dist/components/atoms/UserCatalog/UserCatalog.stories.js +0 -72
  78. package/dist/components/atoms/UserCatalog/index.js +0 -89
  79. package/dist/components/atoms/UserCatalog/styles.js +0 -18
  80. package/dist/components/atoms/UserOption/UserOption.stories.js +0 -40
  81. package/dist/components/atoms/UserOption/index.js +0 -80
  82. package/dist/components/atoms/UserOption/styles.js +0 -20
  83. package/dist/components/atoms/UserSelector/UserSelector.stories.js +0 -40
  84. package/dist/components/atoms/UserSelector/index.js +0 -91
  85. package/dist/components/atoms/UserSelector/styles.js +0 -32
  86. package/dist/components/molecules/GridItem/GridItem.stories.js +0 -123
  87. package/dist/components/molecules/GridItem/index.js +0 -122
  88. package/dist/components/molecules/GridItem/styles.js +0 -20
  89. package/dist/components/molecules/HeaderItem/ColumnItem.js +0 -23
  90. package/dist/components/molecules/HeaderItem/HeaderItem.stories.js +0 -70
  91. package/dist/components/molecules/HeaderItem/index.js +0 -42
  92. package/dist/components/molecules/HeaderItem/styles.js +0 -30
  93. package/dist/components/molecules/RowItem/ColumnItem.js +0 -23
  94. package/dist/components/molecules/RowItem/RowItem.stories.js +0 -5242
  95. package/dist/components/molecules/RowItem/index.js +0 -59
  96. package/dist/components/molecules/RowItem/styles.js +0 -30
  97. package/dist/components/organisms/GridProducts/GridProducts.stories.js +0 -5093
  98. package/dist/components/organisms/GridProducts/index.js +0 -81
  99. package/dist/components/organisms/GridProducts/styles.js +0 -18
  100. package/dist/components/organisms/GridProducts/utils.js +0 -139
  101. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  102. package/src/components/atoms/ImageCarousel/index.js +0 -103
  103. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  104. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  105. package/src/components/atoms/PercentTag/index.js +0 -9
  106. package/src/components/atoms/PercentTag/styles.js +0 -69
  107. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  108. package/src/components/atoms/RatingStars/index.js +0 -31
  109. package/src/components/atoms/RatingStars/styles.js +0 -28
  110. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  111. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  112. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  113. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  114. package/src/components/atoms/RetailerOption/index.js +0 -53
  115. package/src/components/atoms/RetailerOption/styles.js +0 -41
  116. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  117. package/src/components/atoms/RetailersList/index.js +0 -20
  118. package/src/components/atoms/RetailersList/styles.js +0 -19
  119. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -66
  120. package/src/components/atoms/UserCatalog/index.js +0 -77
  121. package/src/components/atoms/UserCatalog/styles.js +0 -24
  122. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  123. package/src/components/atoms/UserOption/index.js +0 -49
  124. package/src/components/atoms/UserOption/styles.js +0 -54
  125. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  126. package/src/components/atoms/UserSelector/index.js +0 -70
  127. package/src/components/atoms/UserSelector/styles.js +0 -55
  128. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  129. package/src/components/molecules/GridItem/index.js +0 -82
  130. package/src/components/molecules/GridItem/styles.js +0 -85
  131. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  132. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  133. package/src/components/molecules/HeaderItem/index.js +0 -26
  134. package/src/components/molecules/HeaderItem/styles.js +0 -25
  135. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  136. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  137. package/src/components/molecules/RowItem/index.js +0 -45
  138. package/src/components/molecules/RowItem/styles.js +0 -38
  139. package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -13
  140. package/src/components/molecules/StripeCardForm/index.js +0 -42
  141. package/src/components/molecules/StripeCardForm/paymentForm.js +0 -124
  142. package/src/components/molecules/StripeCardForm/styles.js +0 -73
  143. package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -12
  144. package/src/components/molecules/StripeCardSelector/index.js +0 -44
  145. package/src/components/molecules/StripeCardSelector/styles.js +0 -4
  146. package/src/components/molecules/StripeCardSelector/utils.js +0 -17
  147. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5474
  148. package/src/components/organisms/GridProducts/index.js +0 -59
  149. package/src/components/organisms/GridProducts/styles.js +0 -15
  150. package/src/components/organisms/GridProducts/utils.js +0 -103
  151. package/src/components/organisms/SideModal/SideModal.stories.js +0 -23
  152. package/src/components/organisms/SideModal/index.js +0 -50
  153. 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 = () => {
@@ -825,19 +841,32 @@ export const ProviderProductEdition = ({
825
841
  }
826
842
  };
827
843
 
828
- const createComment = async (messages = [], retailerId) => {
844
+ const createComment = async (e, body, tab) => {
845
+ let concept = "";
846
+ switch (activeTab) {
847
+ case "Ficha técnica":
848
+ concept = "datasheet";
849
+ break;
850
+ case "Imágenes":
851
+ concept = "images";
852
+ break;
853
+
854
+ default:
855
+ concept = "description";
856
+ break;
857
+ }
829
858
  const data = {
830
- paramsBody: {
831
- id: product.article.id_article || productEdit.ArticleId,
832
- version: version,
833
- items: messages,
834
- retailerId: retailerId,
835
- status: product.status || productEdit.product.status,
836
- },
837
- paramsHeader: { Authorization: token },
859
+ articleId: product?.id_article,
860
+ orderId: product?.orderId,
861
+ message: body,
862
+ concept: concept,
863
+ version: version,
838
864
  };
839
- setMessage("");
840
- return sendMessage(data);
865
+ await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
866
+ headers: {
867
+ Authorization: token,
868
+ },
869
+ });
841
870
  };
842
871
 
843
872
  useEffect(() => {
@@ -1037,27 +1066,6 @@ export const ProviderProductEdition = ({
1037
1066
  const { newArticleStatus, newServiceStatus, newStatus } = JSON.parse(
1038
1067
  res.data.body
1039
1068
  );
1040
-
1041
- const message = createMessage(
1042
- product.retailers || product.retailersAvailable,
1043
- activeRetailer.id,
1044
- product[sectionStatusKey],
1045
- newStatus,
1046
- activeTab
1047
- );
1048
-
1049
- const messageData = {
1050
- paramsBody: {
1051
- id: product.article.id_article || productEdit.ArticleId,
1052
- version: version,
1053
- items: [{ type: "status", value: message }],
1054
- retailerId: activeRetailer.id,
1055
- status: product.status || productEdit.product.status,
1056
- },
1057
- paramsHeader: { Authorization: token },
1058
- };
1059
- await sendMessage(messageData);
1060
-
1061
1069
  if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
1062
1070
  const retailerStatusCopy = { ...retailerStatus };
1063
1071
  retailerStatusCopy[activeRetailer.id][concept] = newStatus;
@@ -1089,7 +1097,6 @@ export const ProviderProductEdition = ({
1089
1097
  result,
1090
1098
  isAproved: result === "A",
1091
1099
  };
1092
- const messages = [];
1093
1100
  servicesData?.forEach((ret) => {
1094
1101
  const { service, id_retailer } = ret;
1095
1102
  let data = {};
@@ -1106,18 +1113,6 @@ export const ProviderProductEdition = ({
1106
1113
  },
1107
1114
  })
1108
1115
  );
1109
- if (product[`${ret.service}_status`] !== "NS") {
1110
- const message = createMessage(
1111
- product.retailers,
1112
- ret.id_retailer,
1113
- product[`${ret.service}_status`],
1114
- `${result}A`,
1115
- ret.service
1116
- );
1117
- messages.push(
1118
- createComment([{ type: "status", value: message }], ret.id_retailer)
1119
- );
1120
- }
1121
1116
  });
1122
1117
  await Promise.all(evaluationArray);
1123
1118
  const userType = user.is_retailer === 1 ? "CA" : "P";
@@ -1157,7 +1152,6 @@ export const ProviderProductEdition = ({
1157
1152
  product: productTemp,
1158
1153
  })
1159
1154
  );
1160
- await Promise.all(messages);
1161
1155
 
1162
1156
  await loadData();
1163
1157
  } catch (error) {
@@ -1286,7 +1280,8 @@ export const ProviderProductEdition = ({
1286
1280
  return;
1287
1281
  } else if (user.is_retailer) {
1288
1282
  if (product.id_order || product.orderId) {
1289
- sendEvaluation("R");
1283
+ setValidatedAll(true);
1284
+ showGlobalModal("error");
1290
1285
  } else {
1291
1286
  setDataGenericModal((prev) => ({
1292
1287
  ...prev,
@@ -1298,7 +1293,8 @@ export const ProviderProductEdition = ({
1298
1293
  showGlobalModal("generic");
1299
1294
  }
1300
1295
  } else {
1301
- sendEvaluation("R");
1296
+ setValidatedAll(true);
1297
+ showGlobalModal("error");
1302
1298
  }
1303
1299
  }
1304
1300
  };
@@ -1308,7 +1304,6 @@ export const ProviderProductEdition = ({
1308
1304
  <HeaderTop
1309
1305
  setHeaderTop={setHeaderTop}
1310
1306
  withChat={location?.state?.withChat}
1311
- chatType={location?.state?.chatType}
1312
1307
  productSelected={productSelected}
1313
1308
  token={token}
1314
1309
  activeRetailer={activeRetailer}
@@ -1387,7 +1382,7 @@ export const ProviderProductEdition = ({
1387
1382
  } else if (user.is_retailer) {
1388
1383
  if (product.id_order || product.orderId) {
1389
1384
  setValidatedAll(true);
1390
- setShowRejectModal(true);
1385
+ showGlobalModal("error");
1391
1386
  } else {
1392
1387
  setDataGenericModal((prev) => ({
1393
1388
  ...prev,
@@ -1399,14 +1394,12 @@ export const ProviderProductEdition = ({
1399
1394
  showGlobalModal("generic");
1400
1395
  }
1401
1396
  } else {
1402
- setShowRejectModal(true);
1403
1397
  setValidatedAll(true);
1398
+ showGlobalModal("error");
1404
1399
  }
1405
1400
  }}
1406
1401
  approve={() => sendToEvaluation("A")}
1407
- reject={() => {
1408
- setShowRejectModal(true);
1409
- }}
1402
+ reject={() => sendToEvaluation("R")}
1410
1403
  />
1411
1404
  <FullTabsMenu
1412
1405
  tabsSections={tabsSections}
@@ -1429,11 +1422,12 @@ export const ProviderProductEdition = ({
1429
1422
  showSaveButton={enableActions(product.version_status)}
1430
1423
  version={version}
1431
1424
  updatedDescriptions={updatedDescriptions}
1425
+ setUpdatedDescriptions={setUpdatedDescriptions}
1432
1426
  updatedDatasheets={updatedDatasheets}
1427
+ setUpdatedDatasheets={setUpdatedDatasheets}
1433
1428
  images={images}
1429
+ setImages={setImages}
1434
1430
  selectedImages={selectedImages}
1435
- setUpdatedDescriptions={setUpdatedDescriptions}
1436
- setUpdatedDatasheets={setUpdatedDatasheets}
1437
1431
  setSelectedImages={setSelectedImages}
1438
1432
  setShowVersionSelector={setShowVersionSelector}
1439
1433
  onClickSave={() => {
@@ -1525,41 +1519,87 @@ export const ProviderProductEdition = ({
1525
1519
  </>
1526
1520
  )}
1527
1521
  </div>
1528
- {!(isRevision() && getSectionStatus()) && !revision && (
1529
- <div className="required-inputs-message">
1530
- <div>
1531
- <p>
1532
- Los atributos son requeridos por las plataformas de las
1533
- cadenas, es muy importante completar los campos requeridos ya
1534
- que pueden rechazar el producto por falta de información.
1535
- </p>
1536
- </div>
1537
- {inCart ? (
1538
- <button type="button">
1539
- <Link to="/checkout">
1540
- <p>Articulo en carrito</p>
1541
- <p>Ir a checkout</p>
1542
- </Link>
1543
- </button>
1522
+ {isRevision() && getSectionStatus() ? (
1523
+ <div className="commentary-box">
1524
+ {!comment ? (
1525
+ <div className="commentary">
1526
+ <TagAndInput
1527
+ label={"Caja de Comentario"}
1528
+ inputType={"textarea"}
1529
+ inputCols={80}
1530
+ inputRows={4}
1531
+ inputId={"commentary-box"}
1532
+ index={0}
1533
+ />
1534
+ <div className="buttons-box">
1535
+ <Button
1536
+ buttonType={"general-transparent-button"}
1537
+ label={"Enviar comentario"}
1538
+ onClick={(e) =>
1539
+ createComment(
1540
+ e,
1541
+ document.querySelector(
1542
+ "#description-commentary-box-0 .ql-container .ql-editor > p"
1543
+ ).innerHTML,
1544
+ activeTab
1545
+ )
1546
+ }
1547
+ />
1548
+ </div>
1549
+ </div>
1544
1550
  ) : (
1545
- <>
1546
- <SliderToolTip
1547
- infoIcon={InfoIcon}
1548
- slidefront={slidefront}
1549
- iconSize={"big-image"}
1550
- slidePosition={"top-slide"}
1551
+ <div className="feedback-box">
1552
+ <Commentary
1553
+ comment={comment.message}
1554
+ reviewed={crossComment}
1551
1555
  />
1552
1556
  <Button
1553
- onClick={() => {
1554
- setShowContentohRequestModal &&
1555
- setShowContentohRequestModal(true);
1557
+ buttonType={"circular-button accept-button"}
1558
+ onClick={async () => {
1559
+ setCrossComment(true);
1560
+ commentRevised();
1556
1561
  }}
1557
- buttonType="general-default-button"
1558
- label="Enviar a Content-oh!"
1559
1562
  />
1560
- </>
1563
+ </div>
1561
1564
  )}
1562
1565
  </div>
1566
+ ) : (
1567
+ !revision && (
1568
+ <div className="required-inputs-message">
1569
+ <div>
1570
+ <p>
1571
+ Los atributos son requeridos por las plataformas de las
1572
+ cadenas, es muy importante completar los campos requeridos
1573
+ ya que pueden rechazar el producto por falta de información.
1574
+ </p>
1575
+ </div>
1576
+ {inCart ? (
1577
+ <button type="button">
1578
+ <Link to="/checkout">
1579
+ <p>Articulo en carrito</p>
1580
+ <p>Ir a checkout</p>
1581
+ </Link>
1582
+ </button>
1583
+ ) : (
1584
+ <>
1585
+ <SliderToolTip
1586
+ infoIcon={InfoIcon}
1587
+ slidefront={slidefront}
1588
+ iconSize={"big-image"}
1589
+ slidePosition={"top-slide"}
1590
+ />
1591
+ <Button
1592
+ onClick={() => {
1593
+ setShowContentohRequestModal &&
1594
+ setShowContentohRequestModal(true);
1595
+ }}
1596
+ buttonType="general-default-button"
1597
+ label="Enviar a Content-oh!"
1598
+ />
1599
+ </>
1600
+ )}
1601
+ </div>
1602
+ )
1563
1603
  )}
1564
1604
  </div>
1565
1605
  </div>
@@ -1602,48 +1642,6 @@ export const ProviderProductEdition = ({
1602
1642
  jwt={token}
1603
1643
  />
1604
1644
  )}
1605
- {showRejectModal && (
1606
- <Modal
1607
- title={"Agregar mensaje de rechazo"}
1608
- show={showRejectModal}
1609
- customComponent={
1610
- <TagAndInput
1611
- inputType={"textarea"}
1612
- inputId={"modal-message-box"}
1613
- index={0}
1614
- color={"white"}
1615
- />
1616
- }
1617
- buttons={[
1618
- <ButtonV2
1619
- key={"btn-Cancelar"}
1620
- type={"white"}
1621
- label={"Cancelar"}
1622
- size={12}
1623
- onClick={() => {
1624
- setShowRejectModal(false);
1625
- }}
1626
- />,
1627
- <ButtonV2
1628
- key={"btn-Aceptar"}
1629
- type={"pink"}
1630
- label={"Aceptar"}
1631
- size={12}
1632
- onClick={async () => {
1633
- const body = document.querySelector(
1634
- "#modal-message-box .ql-container .ql-editor > p"
1635
- ).innerHTML;
1636
- const messages = [
1637
- { type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
1638
- ];
1639
- await createComment(messages, activeRetailer.id);
1640
- validatedAll ? validateAll("R") : sendToEvaluation("R");
1641
- setShowRejectModal(false);
1642
- }}
1643
- />,
1644
- ]}
1645
- />
1646
- )}
1647
1645
  </Container>
1648
1646
  );
1649
1647
  };
@@ -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,95 +16,65 @@ RetailerProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5OGE0NzYxMy04ZGIyLTRlZjUtYjA0Mi01ZDU3MWRkZjIwMWIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4Mzg3NTIyNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4Mzg3ODgyNiwiaWF0IjoxNjgzODc1MjI2LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.EtgmT_THMx-Zy_zB5yZK4gz6TXNTVVJEKFt5X0JK2UkGVrp_q_92YCEuejS4n976fyTez0jkwOee6IkVHLV71uZWRBDFt-3Yw4ZxfsZYPNJWhoHXGNxhMU8MCkSntfu597esBTk-VsUpstT5R7L-WJfN8viE7R-qVo-42RlPTG0TFrWA9q0oTcqjv8vbxLpOBUjiEpjmqRhg4blJZwgkGNta6MOlw1vfmisOVbo9wMvqwnCZ9xx9KMKoH9U4uNObK_JomjbvPmTmkcUXsE-wGSD7XcoSwtuhBngLC7-jiu1u8MvL_ff5Z0Qp70sSpLdUglcSS8d1Xf7j_fcZuJ5jKA",
19
+ "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhNmM0ZDNkNi0yNGE0LTQxZDQtYWQwZi1kMDg3NDM4YWI1YjYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImE2YzRkM2Q2LTI0YTQtNDFkNC1hZDBmLWQwODc0MzhhYjViNiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyYjU3MjZlMy04MjM2LTRmYzMtODBkMi05NWVmYmU4ODdjOTYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MjAxNjI5MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4MjAxOTg5MSwiaWF0IjoxNjgyMDE2MjkxLCJlbWFpbCI6ImV0Y0Bjb250ZW50b2guY29tIn0.SCj_yp1NkGCED59JHoDSdFAOakIOvZVeC0yLwt9z0BtenDXlU0m5cUofQQonnWPM8Q70yMFEkyMGI9kQs_fz1gxrmrSc2FGefn3B_1Vymq3pQ_S1JrY_syYf88m_GtJKOywEnE6--Ef9lZhFBFKGtqRJ4H8JBa9Xb96uCjAKyEMCSURDlw37pk2RQdULlZPj17Zb6Xrqi2lwrhpI1ByptX3__UoTiZklnTXwIxM4JdU7yuhXLznaEH8NOSd2Jw-CV6FCUbYBHlnRYBQg7B5mwyVKtDQm6QpRgBTBPCvljJJpFjRKUcnon8WZiFXx1qVbkWPt2vCT1TZqqoSLdlP6lA",
20
20
  productSelected: {
21
- orderId: 14606,
22
- status: "RA",
23
- datasheet_status: "RA",
21
+ orderId: 15160,
22
+ status: "SAC",
23
+ datasheet_status: "SAC",
24
24
  prio: "none",
25
- version: 3,
26
- description_status: "RA",
27
- images_status: "RA",
28
- statusByRetailer: {
29
- 4: {
30
- datasheet: "RA/AC",
31
- description: "RA/AC",
32
- images: "RA/AC",
33
- },
34
- 5: {
35
- datasheet: "RA/AC",
36
- description: "RA/AC",
37
- images: "RA/AC",
38
- },
39
- 6: {
40
- description: "RA/AC",
41
- images: "RA/AC",
42
- datasheet: "RA/AC",
43
- },
44
- 12: {
45
- datasheet: "RA/AC",
46
- description: "RA/AC",
47
- images: "RA/AC",
48
- },
49
- 17: {
50
- datasheet: "RA/AC",
51
- description: "RA/AC",
52
- images: "RA/AC",
53
- },
25
+ version: 7,
26
+ description_status: "SAC",
27
+ images_status: "SAC",
28
+ brand: null,
29
+ retailerOrder: 1,
30
+ missing: {
31
+ datasheet: null,
32
+ descriptions: null,
33
+ images: null,
54
34
  },
55
- orderId: 15209,
56
- status: "ACA",
57
- datasheet_status: "ACA",
58
- prio: "none",
59
- version: 3,
60
- description_status: "ACA",
61
- images_status: "ACA",
62
- statusByRetailer: {
63
- 70: {
64
- datasheet: "ACA",
65
- description: "ACA",
66
- images: "ACA",
67
- },
35
+ services: {
36
+ datasheets: 1,
37
+ descriptions: 1,
38
+ images: 1,
68
39
  },
69
40
  article: {
70
- id_article: 39390,
71
- id_category: "4311",
72
- name: "test demo 1",
73
- upc: "2312312313",
74
- timestamp: "2023-05-12T20:07:42.000Z",
75
- id_user: 133,
76
- status: "NULL",
77
- active: 1,
78
- company_id: 912,
79
- company_name: "GRUPO BRAHMA",
41
+ category: "Puertas y Ventanas|Molduras|Molduras Madera Blanda",
42
+ company_name: "Demo",
80
43
  country: "México",
81
- id_order: 15209,
82
- id_datasheet_especialist: 232,
83
- id_datasheet_facilitator: 52,
84
- id_description_especialist: 232,
85
- id_description_facilitator: 52,
86
- id_images_especialist: 196,
87
- id_images_facilitator: 53,
88
- id_auditor: 195,
89
- id_recepcionist: null,
90
- category: "Ropa Interior Dama|Ropa Interior|Ropa Interior",
91
- missingAttributes: 0,
92
- missingDescriptions: 0,
93
- missingImages: 0,
44
+ id_category: "2366",
45
+ id_datasheet_especialist: null,
46
+ id_datasheet_facilitator: null,
47
+ id_description_especialist: null,
48
+ id_description_facilitator: null,
49
+ id_images_especialist: null,
50
+ id_images_facilitator: null,
51
+ id_order: 15160,
52
+ id_article: 39290,
53
+ id_auditor: 37,
54
+ name: "MOLDURA MARCO MODER 11X4X244 CM",
55
+ timestamp: "2023-04-19T21:36:02.000Z",
56
+ upc: "100030",
94
57
  },
95
58
  retailers: [
96
59
  {
97
- id: 70,
98
- name: "Bodega Aurrera",
60
+ id: 58,
61
+ name: "The Home Depot Golden",
62
+ },
63
+ {
64
+ id: 68,
65
+ name: "The Home Depot Merchants",
99
66
  },
100
67
  ],
68
+ statusByRetailer: {
69
+ 58: {
70
+ datasheet: "SAC",
71
+ description: "SAC",
72
+ images: "SAC",
73
+ },
74
+ },
101
75
  },
102
76
  location: {
103
- product: { articleId: 354, versionId: 3 },
104
- state: {
105
- withChat: true,
106
- chatType: "product_status",
107
- },
77
+ product: { articleId: 39290, versionId: 7 },
108
78
  },
109
79
  user: {
110
80
  id_user: 51,