contentoh-components-library 21.4.57 → 21.4.59

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 (120) hide show
  1. package/dist/components/atoms/Avatar/index.js +2 -3
  2. package/dist/components/atoms/CheckBox/index.js +2 -7
  3. package/dist/components/atoms/CheckBox/styles.js +1 -1
  4. package/dist/components/atoms/InputFormatter/styles.js +1 -1
  5. package/dist/components/atoms/SliderToolTip/styles.js +1 -1
  6. package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
  7. package/dist/components/molecules/HeaderTop/index.js +11 -68
  8. package/dist/components/molecules/SignInLogin/index.js +28 -36
  9. package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
  10. package/dist/components/molecules/TagAndInput/index.js +3 -64
  11. package/dist/components/organisms/Chat/Chat.stories.js +8 -27
  12. package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
  13. package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
  14. package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
  15. package/dist/components/organisms/Chat/Footer/index.js +39 -48
  16. package/dist/components/organisms/Chat/index.js +4 -49
  17. package/dist/components/organisms/Chat/styles.js +1 -1
  18. package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
  19. package/dist/components/organisms/InputGroup/index.js +48 -154
  20. package/dist/components/organisms/Modal/styles.js +1 -1
  21. package/dist/components/pages/Dashboard/index.js +2 -8
  22. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +137 -123
  23. package/dist/components/pages/ProviderProductEdition/index.js +258 -269
  24. package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
  25. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
  26. package/dist/components/pages/RetailerProductEdition/index.js +276 -278
  27. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  28. package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
  29. package/dist/global-files/data.js +8 -21
  30. package/dist/global-files/variables.js +1 -5
  31. package/dist/index.js +58 -201
  32. package/package.json +1 -2
  33. package/src/components/atoms/Avatar/index.js +2 -8
  34. package/src/components/atoms/CheckBox/index.js +1 -4
  35. package/src/components/atoms/CheckBox/styles.js +0 -2
  36. package/src/components/atoms/InputFormatter/styles.js +1 -2
  37. package/src/components/atoms/SliderToolTip/styles.js +1 -1
  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/SignInLogin/index.js +11 -11
  41. package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
  42. package/src/components/molecules/TagAndInput/index.js +8 -52
  43. package/src/components/organisms/Chat/Chat.stories.js +7 -27
  44. package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
  45. package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
  46. package/src/components/organisms/Chat/ContentChat/index.js +12 -88
  47. package/src/components/organisms/Chat/Footer/index.js +0 -11
  48. package/src/components/organisms/Chat/index.js +4 -46
  49. package/src/components/organisms/Chat/styles.js +0 -4
  50. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  51. package/src/components/organisms/InputGroup/index.js +88 -238
  52. package/src/components/organisms/Modal/styles.js +1 -4
  53. package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
  54. package/src/components/pages/Dashboard/index.js +1 -6
  55. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +145 -141
  56. package/src/components/pages/ProviderProductEdition/index.js +148 -145
  57. package/src/components/pages/ProviderProductEdition/styles.js +1 -5
  58. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
  59. package/src/components/pages/RetailerProductEdition/index.js +144 -115
  60. package/src/components/pages/RetailerProductEdition/styles.js +0 -4
  61. package/src/components/pages/RetailerProductEdition/utils.js +0 -37
  62. package/src/global-files/data.js +6 -10
  63. package/src/global-files/variables.js +0 -4
  64. package/src/index.js +0 -11
  65. package/src/assets/images/Icons/info.svg +0 -8
  66. package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
  67. package/src/components/atoms/ImageCarousel/index.js +0 -103
  68. package/src/components/atoms/ImageCarousel/styles.js +0 -79
  69. package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
  70. package/src/components/atoms/PercentTag/index.js +0 -9
  71. package/src/components/atoms/PercentTag/styles.js +0 -69
  72. package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
  73. package/src/components/atoms/RatingStars/index.js +0 -31
  74. package/src/components/atoms/RatingStars/styles.js +0 -28
  75. package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
  76. package/src/components/atoms/RetailerCatalog/index.js +0 -49
  77. package/src/components/atoms/RetailerCatalog/styles.js +0 -30
  78. package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
  79. package/src/components/atoms/RetailerOption/index.js +0 -53
  80. package/src/components/atoms/RetailerOption/styles.js +0 -41
  81. package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
  82. package/src/components/atoms/RetailersList/index.js +0 -20
  83. package/src/components/atoms/RetailersList/styles.js +0 -19
  84. package/src/components/atoms/TabSection/styles.js +0 -23
  85. package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
  86. package/src/components/atoms/UserCatalog/index.js +0 -100
  87. package/src/components/atoms/UserCatalog/styles.js +0 -24
  88. package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
  89. package/src/components/atoms/UserOption/index.js +0 -95
  90. package/src/components/atoms/UserOption/styles.js +0 -61
  91. package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
  92. package/src/components/atoms/UserSelector/index.js +0 -86
  93. package/src/components/atoms/UserSelector/styles.js +0 -55
  94. package/src/components/molecules/BoxAttribute/BoxAttribute.stories.js +0 -16
  95. package/src/components/molecules/BoxAttribute/index.js +0 -72
  96. package/src/components/molecules/BoxAttribute/styles.js +0 -41
  97. package/src/components/molecules/BoxButtons/BoxButtons.stories.js +0 -15
  98. package/src/components/molecules/BoxButtons/index.js +0 -32
  99. package/src/components/molecules/BoxButtons/styles.js +0 -43
  100. package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
  101. package/src/components/molecules/GridItem/index.js +0 -105
  102. package/src/components/molecules/GridItem/styles.js +0 -104
  103. package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
  104. package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
  105. package/src/components/molecules/HeaderItem/index.js +0 -26
  106. package/src/components/molecules/HeaderItem/styles.js +0 -27
  107. package/src/components/molecules/RowItem/ColumnItem.js +0 -9
  108. package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
  109. package/src/components/molecules/RowItem/index.js +0 -45
  110. package/src/components/molecules/RowItem/styles.js +0 -40
  111. package/src/components/organisms/Box/Box.stories.js +0 -17
  112. package/src/components/organisms/Box/index.js +0 -103
  113. package/src/components/organisms/Box/styles.js +0 -48
  114. package/src/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +0 -17
  115. package/src/components/organisms/BoxOnboarding/index.js +0 -60
  116. package/src/components/organisms/BoxOnboarding/styles.js +0 -44
  117. package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
  118. package/src/components/organisms/GridProducts/index.js +0 -50
  119. package/src/components/organisms/GridProducts/styles.js +0 -14
  120. package/src/components/organisms/GridProducts/utils.js +0 -111
@@ -24,20 +24,15 @@ import descriptionSent from "../../../assets/images/modalsSVGs/descriptionSent.s
24
24
  import imagesSent from "../../../assets/images/modalsSVGs/uploadingImages.svg";
25
25
  import { TagAndInput } from "../../molecules/TagAndInput/index";
26
26
  import { Button } from "../../atoms/GeneralButton";
27
+ import { Commentary } from "../../atoms/Commentary";
27
28
  import { GenericModal } from "../../atoms/GenericModal";
28
29
  import { ScreenHeader } from "../../atoms/ScreenHeader";
29
30
  import { Loading } from "../../atoms/Loading";
30
31
  import succes from "../../../assets/images/genericModal/genericModalCheck.svg";
32
+ import errorModal from "../../../assets/images/genericModal/errorModal.svg";
31
33
  import { VersionSelector } from "../../organisms/VersionSelector";
32
34
  import { useCloseModal } from "../../../global-files/customHooks";
33
- import {
34
- getAuditVersion,
35
- getInputsData,
36
- createMessage,
37
- sendMessage,
38
- } from "./utils";
39
- import { Modal } from "../../organisms/Modal";
40
- import { ButtonV2 } from "../../atoms/ButtonV2";
35
+ import { getAuditVersion, getInputsData } from "./utils";
41
36
 
42
37
  const reducerImages = (state, action) => {
43
38
  let { values, attrForImgs, inputsByRetailer } = state;
@@ -137,7 +132,6 @@ export const RetailerProductEdition = ({
137
132
  const [datasheets, setDatasheets] = useState([]);
138
133
  const [images, setImages] = useReducer(reducerImages, {});
139
134
  const [showModal, setShowModal] = useState(false);
140
- const [showRejectModal, setShowRejectModal] = useState(false);
141
135
  const { getRootProps, getInputProps } = useDropzone({
142
136
  accept: "image/*",
143
137
  noKeyboard: true,
@@ -224,11 +218,6 @@ export const RetailerProductEdition = ({
224
218
  const [auditDescriptions, setAuditDescriptions] = useState([]);
225
219
  const [auditImages, setAuditImages] = useState([]);
226
220
  const [compare, setCompare] = useState(false);
227
- const [valRejAll, setValRejAll] = useState(false);
228
-
229
- const [desc, setDesc] = useState([]);
230
- const [fich, setFich] = useState([]);
231
- const [imag, setImag] = useState([]);
232
221
 
233
222
  useEffect(async () => {
234
223
  const { id_article } = product?.article || {};
@@ -242,8 +231,7 @@ export const RetailerProductEdition = ({
242
231
  product?.article?.id_article,
243
232
  product?.article?.category,
244
233
  parseInt(product?.article?.id_category),
245
- auditableVersion.version,
246
- token
234
+ auditableVersion.version
247
235
  );
248
236
  getInputsData(
249
237
  auditServices,
@@ -272,8 +260,7 @@ export const RetailerProductEdition = ({
272
260
  product?.article?.id_article,
273
261
  product?.article?.category,
274
262
  parseInt(product?.article?.id_category),
275
- version,
276
- token
263
+ version
277
264
  );
278
265
  if (auditableVersion) {
279
266
  loadAuditableData();
@@ -574,7 +561,6 @@ export const RetailerProductEdition = ({
574
561
  active: images?.values?.some((value) => value?.image_id === e?.id),
575
562
  }));
576
563
  setSocketType(imageInputs);
577
- console.log(images);
578
564
  }, [images]);
579
565
 
580
566
  const updateImages = useCallback(async () => {
@@ -873,30 +859,11 @@ export const RetailerProductEdition = ({
873
859
  );
874
860
  }
875
861
  if (res.data.statusCode === 200) {
876
- const { newStatus, newOrderStatus, newArticleStatus } = JSON.parse(
877
- res.data.body
878
- );
879
- const messageToChat = createMessage(
880
- product.retailers,
881
- activeRetailer.id,
882
- evalStatus,
883
- newStatus,
884
- activeTab
885
- );
886
-
887
- const data = {
888
- paramsBody: {
889
- id: product.article.id_article,
890
- version: version,
891
- items: [{ type: "status", value: messageToChat }],
892
- retailerId: activeRetailer.id,
893
- status: product.status,
894
- },
895
- paramsHeader: { Authorization: token },
896
- };
897
- await sendMessage(data);
898
- if (newOrderStatus) productTemp.status = newArticleStatus[articleId];
899
- productTemp[`${concept}_status`] = newStatus;
862
+ const response = JSON.parse(res.data.body)?.successfulData;
863
+ const statusObject =
864
+ response[`${orderId}-${articleId}-${activeRetailer.id}`];
865
+ productTemp.status = statusObject["generalStatus"];
866
+ productTemp[`${concept}_status`] = statusObject[`${concept}Status`];
900
867
  await loadData();
901
868
  if (message) setMessage(message);
902
869
  sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
@@ -937,19 +904,35 @@ export const RetailerProductEdition = ({
937
904
  return product?.article[`id_auditor`] === user.id_user;
938
905
  };
939
906
 
940
- const createComment = async (messages = [], retailerId) => {
907
+ const createComment = async (e, body, tab) => {
908
+ let concept = "";
909
+ switch (activeTab) {
910
+ case "Ficha técnica":
911
+ concept = "datasheet";
912
+ break;
913
+ case "Imágenes":
914
+ concept = "images";
915
+ break;
916
+
917
+ default:
918
+ concept = "description";
919
+ break;
920
+ }
941
921
  const data = {
942
- paramsBody: {
943
- id: product.article.id_article,
944
- version: version,
945
- items: messages,
946
- retailerId: retailerId,
947
- status: product.status,
948
- },
949
- paramsHeader: { Authorization: token },
922
+ articleId: product?.article?.id_article,
923
+ orderId: product?.orderId,
924
+ message: body?.replace(/<.*?\/?>/gm, ""),
925
+ concept: concept,
926
+ version: version,
950
927
  };
928
+ await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
929
+ headers: {
930
+ Authorization: token,
931
+ },
932
+ });
933
+ await getComments(tab);
951
934
  setMessage("");
952
- return sendMessage(data);
935
+ setComponentsArray([]);
953
936
  };
954
937
 
955
938
  const getRequired = (services) => {
@@ -1201,7 +1184,6 @@ export const RetailerProductEdition = ({
1201
1184
  };
1202
1185
 
1203
1186
  useEffect(() => {
1204
- console.log(servicesData, "servicesData");
1205
1187
  let status = getRetailerStatus(servicesData, activeTab);
1206
1188
  setRetailerStatus(status);
1207
1189
  }, [activeTab, servicesData, activeRetailer]);
@@ -1232,8 +1214,8 @@ export const RetailerProductEdition = ({
1232
1214
  break;
1233
1215
  }
1234
1216
 
1235
- const messages = [];
1236
-
1217
+ const isAproved = result === "A";
1218
+ const retailersIds = [];
1237
1219
  servicesData?.forEach((ret) => {
1238
1220
  if (!retailersIds.includes(ret.id_retailer))
1239
1221
  retailersIds.push(ret.id_retailer);
@@ -1258,19 +1240,19 @@ export const RetailerProductEdition = ({
1258
1240
  })
1259
1241
  );
1260
1242
  });
1243
+
1261
1244
  await Promise.all(evaluationArray);
1262
1245
 
1263
1246
  const productTemp = product;
1264
1247
  productTemp.status = `${result}A`;
1265
1248
  productTemp.datasheet_status =
1266
- productTemp.datasheet_status === "NS" ? "NS" : `${result}A`;
1249
+ productTemp.datasheet_status === "NA" ? "NA" : `${result}A`;
1267
1250
  productTemp.description_status =
1268
- productTemp.description_status === "NS" ? "NS" : `${result}A`;
1251
+ productTemp.description_status === "NA" ? "NA" : `${result}A`;
1269
1252
  productTemp.images_status =
1270
- productTemp.images_status === "NS" ? "NS" : `${result}A`;
1253
+ productTemp.images_status === "NA" ? "NA" : `${result}A`;
1271
1254
  sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
1272
1255
  setProduct(productTemp);
1273
- const messagesResponse = await Promise.all(messages);
1274
1256
 
1275
1257
  await loadData();
1276
1258
  } catch (error) {
@@ -1286,10 +1268,8 @@ export const RetailerProductEdition = ({
1286
1268
  setCompare={setCompare}
1287
1269
  isAuditor={[1, 6].includes(user.id_role)}
1288
1270
  withChat={location?.state?.withChat}
1289
- chatType={location?.state?.chatType}
1290
- productSelected={product}
1271
+ productSelected={productSelected}
1291
1272
  token={token}
1292
- activeRetailer={activeRetailer}
1293
1273
  />
1294
1274
  <div className="data-container">
1295
1275
  <div className="image-data-panel">
@@ -1329,7 +1309,36 @@ export const RetailerProductEdition = ({
1329
1309
  sendToFacilitator("A");
1330
1310
  }}
1331
1311
  reject={() => {
1332
- setShowRejectModal(true);
1312
+ sendToFacilitator("R");
1313
+ setMessage("Rechazado");
1314
+ setComponentsArray([
1315
+ <img src={errorModal} />,
1316
+ <ScreenHeader
1317
+ text={"Agrega tu comentarios para enviar el rechazo"}
1318
+ headerType={"input-name-header"}
1319
+ color={"white"}
1320
+ />,
1321
+ <TagAndInput
1322
+ label={"Caja de Comentario"}
1323
+ inputType={"textarea"}
1324
+ inputId={"modal-commentary-box"}
1325
+ index={0}
1326
+ color={"white"}
1327
+ />,
1328
+ <Button
1329
+ buttonType={"general-default-button"}
1330
+ label={"Enviar comentario"}
1331
+ onClick={(e) =>
1332
+ createComment(
1333
+ e,
1334
+ document.querySelector(
1335
+ "#modal-commentary-box .ql-container .ql-editor > p"
1336
+ ).innerHTML,
1337
+ activeTab
1338
+ )
1339
+ }
1340
+ />,
1341
+ ]);
1333
1342
  }}
1334
1343
  showApproveRejectAll={
1335
1344
  approveRejectAllButtons() && (auditorAssigned() || userAssigned())
@@ -1339,8 +1348,36 @@ export const RetailerProductEdition = ({
1339
1348
  }
1340
1349
  approveAll={() => validateAll("A")}
1341
1350
  rejectAll={() => {
1342
- setShowRejectModal(true);
1343
- setValRejAll(true);
1351
+ validateAll("R");
1352
+ setMessage("Rechazado");
1353
+ setComponentsArray([
1354
+ <img src={errorModal} />,
1355
+ <ScreenHeader
1356
+ text={"Agrega tu comentarios para enviar el rechazo"}
1357
+ headerType={"input-name-header"}
1358
+ color={"white"}
1359
+ />,
1360
+ <TagAndInput
1361
+ label={"Caja de Comentario"}
1362
+ inputType={"textarea"}
1363
+ inputId={"modal-commentary-box"}
1364
+ index={0}
1365
+ color={"white"}
1366
+ />,
1367
+ <Button
1368
+ buttonType={"general-default-button"}
1369
+ label={"Enviar comentario"}
1370
+ onClick={(e) =>
1371
+ createComment(
1372
+ e,
1373
+ document.querySelector(
1374
+ "#modal-commentary-box .ql-container .ql-editor > p"
1375
+ ).innerHTML,
1376
+ activeTab
1377
+ )
1378
+ }
1379
+ />,
1380
+ ]);
1344
1381
  }}
1345
1382
  />
1346
1383
  <FullTabsMenu
@@ -1356,12 +1393,6 @@ export const RetailerProductEdition = ({
1356
1393
  isRetailer={isRetailer}
1357
1394
  showSaveButton={auditorAssigned() || userAssigned()}
1358
1395
  version={version}
1359
- desc={desc}
1360
- setDesc={setDesc}
1361
- fich={fich}
1362
- setFich={setFich}
1363
- imag={imag}
1364
- setImag={setImag}
1365
1396
  updatedDescriptions={updatedDescriptions}
1366
1397
  setUpdatedDescriptions={setUpdatedDescriptions}
1367
1398
  updatedDatasheets={updatedDatasheets}
@@ -1476,6 +1507,47 @@ export const RetailerProductEdition = ({
1476
1507
  {(userAssigned(activeTab) || auditorAssigned()) &&
1477
1508
  product[`${getConcept(activeTab)}_status`] !== "NS" && (
1478
1509
  <div className="commentary-box">
1510
+ {!comment ? (
1511
+ <div className="commentary">
1512
+ <TagAndInput
1513
+ label={"Caja de Comentario"}
1514
+ inputType={"textarea"}
1515
+ inputCols={80}
1516
+ inputRows={4}
1517
+ inputId={"commentary-box"}
1518
+ index={0}
1519
+ />
1520
+ <div className="buttons-box">
1521
+ <Button
1522
+ buttonType={"general-transparent-button"}
1523
+ label={"Enviar comentario"}
1524
+ onClick={(e) =>
1525
+ createComment(
1526
+ e,
1527
+ document.querySelector(
1528
+ "#commentary-box .ql-container .ql-editor > p"
1529
+ ).innerHTML,
1530
+ activeTab
1531
+ )
1532
+ }
1533
+ />
1534
+ </div>
1535
+ </div>
1536
+ ) : (
1537
+ <div className="feedback-box">
1538
+ <Commentary
1539
+ comment={comment?.message?.replace(/<.*?\/?>/gm, "")}
1540
+ reviewed={crossComment}
1541
+ />
1542
+ <Button
1543
+ buttonType={"circular-button accept-button"}
1544
+ onClick={async () => {
1545
+ setCrossComment(true);
1546
+ commentRevised();
1547
+ }}
1548
+ />
1549
+ </div>
1550
+ )}
1479
1551
  {[7, 8].includes(user.id_role) && (
1480
1552
  <Button
1481
1553
  buttonType={
@@ -1533,49 +1605,6 @@ export const RetailerProductEdition = ({
1533
1605
  jwt={token}
1534
1606
  />
1535
1607
  )}
1536
- {showRejectModal && (
1537
- <Modal
1538
- title={`Agregar mensaje de rechazo para ${activeTab?.toLowerCase()}`}
1539
- show={showRejectModal}
1540
- customComponent={
1541
- <TagAndInput
1542
- inputType={"textarea"}
1543
- inputId={"modal-message-box"}
1544
- index={0}
1545
- color={"white"}
1546
- />
1547
- }
1548
- buttons={[
1549
- <ButtonV2
1550
- key={"btn-Cancelar"}
1551
- type={"white"}
1552
- label={"Cancelar"}
1553
- size={12}
1554
- onClick={() => {
1555
- setShowRejectModal(false);
1556
- }}
1557
- />,
1558
- <ButtonV2
1559
- key={"btn-Aceptar"}
1560
- type={"pink"}
1561
- label={"Aceptar"}
1562
- size={12}
1563
- onClick={async () => {
1564
- const body = document.querySelector(
1565
- "#modal-message-box .ql-container .ql-editor > p"
1566
- ).innerHTML;
1567
- const messages = [
1568
- { type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
1569
- ];
1570
- await createComment(messages, activeRetailer.id);
1571
- valRejAll ? validateAll("R") : sendToFacilitator("R");
1572
- setMessage("Rechazado");
1573
- setShowRejectModal(false);
1574
- }}
1575
- />,
1576
- ]}
1577
- />
1578
- )}
1579
1608
  </Container>
1580
1609
  );
1581
1610
  };
@@ -89,10 +89,6 @@ export const Container = styled.div`
89
89
  }
90
90
  }
91
91
  }
92
- #modal-message-box {
93
- width: 400px;
94
- height: 100px;
95
- }
96
92
  .container {
97
93
  width: 100%;
98
94
  height: 100%;
@@ -1,5 +1,4 @@
1
1
  import axios from "axios";
2
- import { fetchPOST } from "../../../global-files/handle_http";
3
2
 
4
3
  export const getAuditVersion = async (articleId, setState, token) => {
5
4
  const auditResponse = await axios.get(
@@ -33,39 +32,3 @@ export const getInputsData = (
33
32
  setDescriptionState(descriptions);
34
33
  }
35
34
  };
36
-
37
- export const translateService = (tab) => {
38
- switch (tab) {
39
- case "description":
40
- case "Descripción":
41
- return "Descripciones";
42
- case "datasheet":
43
- case "Ficha técnica":
44
- return "Fichas técnicas";
45
- case "images":
46
- case "Imágenes":
47
- return "Imágenes";
48
- }
49
- };
50
-
51
- export const createMessage = (
52
- retailers,
53
- idRetailer,
54
- oldStatus,
55
- newStatus,
56
- service
57
- ) => {
58
- const [retailer] = retailers?.filter((ret) => ret.id === idRetailer) || [];
59
- return `${translateService(service)} de ${
60
- retailer.name
61
- } |${oldStatus}| a |${newStatus}`;
62
- };
63
-
64
- export const sendMessage = async (data) => {
65
- const { paramsBody, paramsHeader } = data;
66
- return fetchPOST(
67
- process.env.REACT_APP_CREATE_MESSAGES,
68
- paramsBody,
69
- paramsHeader
70
- );
71
- };
@@ -6,28 +6,24 @@ export const getRetailerServices = async (
6
6
  articleId,
7
7
  category,
8
8
  categoryId,
9
- version,
10
- Authorization
9
+ version
11
10
  ) => {
12
11
  try {
13
12
  const responseArray = await Promise.all([
14
13
  axios.post(
15
- `${process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`,
16
- {},
17
- { headers: { Authorization } }
14
+ `${process.env.REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`
18
15
  ),
19
16
  axios.get(
20
- `${process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`,
21
- { headers: { Authorization } }
17
+ `${process.env.REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT}?idCategory=${categoryId}&articleId=${articleId}&version=${version}`
22
18
  ),
23
19
  axios.post(
24
20
  `${process.env.REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT}?articleId=${articleId}&version=${version}`,
25
- { category },
26
- { headers: { Authorization } }
21
+ {
22
+ category,
23
+ }
27
24
  ),
28
25
  ]);
29
26
 
30
- console.log(responseArray[0]);
31
27
  const datasheets = JSON.parse(responseArray[0].data.body).data;
32
28
  const descriptions = JSON.parse(responseArray[1].data.body).data;
33
29
  const images = JSON.parse(responseArray[2].data.body).data;
@@ -15,10 +15,6 @@ export const GlobalColors = {
15
15
  finished: "#18A0FB",
16
16
  exported: "#71DE56",
17
17
  white: "#FFFFFF",
18
- gray_light: "#F0F0F0",
19
- gray:"#707070",
20
- blue_light:"#F7F7FC",
21
- purple:"#8A6CAA",
22
18
  };
23
19
 
24
20
  export const FontFamily = {
package/src/index.js CHANGED
@@ -33,13 +33,6 @@ export * from "./components/atoms/ImagePreview/index";
33
33
  export * from "./components/atoms/InputText/index";
34
34
  export * from "./components/atoms/NotFound/index";
35
35
  export * from "./components/atoms/Tooltip/index";
36
- export * from "./components/atoms/UserOption/index";
37
- export * from "./components/atoms/UserCatalog/index";
38
- export * from "./components/atoms/UserSelector/index";
39
- export * from "./components/atoms/ImageCarousel/index";
40
- export * from "./components/atoms/RetailersList/index";
41
- export * from "./components/atoms/RetailerOption/index";
42
- export * from "./components/atoms/RetailerCatalog/index";
43
36
 
44
37
  //molecules
45
38
  export * from "./components/molecules/AvatarAndValidation/index";
@@ -72,9 +65,6 @@ export * from "./components/molecules/SelectV2/index";
72
65
  export * from "./components/molecules/Dropdown/index";
73
66
  export * from "./components/molecules/StripeCardForm/index";
74
67
  export * from "./components/molecules/StripeCardSelector/index";
75
- export * from "./components/molecules/GridItem/index";
76
- export * from "./components/molecules/HeaderItem/index";
77
- export * from "./components/molecules/RowItem/index";
78
68
 
79
69
  //organisms
80
70
  export * from "./components/organisms/ChangePassword/index";
@@ -92,7 +82,6 @@ export * from "./components/organisms/OrderDetail/index";
92
82
  export * from "./components/organisms/RangeCalendar";
93
83
  export * from "./components/organisms/TableResizable";
94
84
  export * from "./components/organisms/SideModal/index";
95
- export * from "./components/organisms/GridProducts/index";
96
85
  export * from "./components/organisms/PanelLayout";
97
86
 
98
87
  //pages
@@ -1,8 +0,0 @@
1
- <svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <mask id="mask0_37_379" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="8" height="8">
3
- <rect width="8" height="8" fill="#D9D9D9"/>
4
- </mask>
5
- <g mask="url(#mask0_37_379)">
6
- <path d="M3.63807 5.98825H4.40893V3.62867H3.63807V5.98825ZM3.99596 3.07403C4.124 3.07403 4.2311 3.03169 4.31727 2.947C4.40345 2.86232 4.44653 2.75738 4.44653 2.6322C4.44653 2.49463 4.40331 2.38347 4.31685 2.29871C4.2304 2.21394 4.12327 2.17156 3.99547 2.17156C3.86061 2.17156 3.75166 2.21394 3.66863 2.29871C3.58559 2.38347 3.54407 2.49307 3.54407 2.6275C3.54407 2.7566 3.58737 2.8633 3.67398 2.94759C3.7606 3.03188 3.86792 3.07403 3.99596 3.07403ZM3.9991 8C3.44212 8 2.92156 7.89633 2.43741 7.68899C1.95324 7.48165 1.52964 7.19646 1.16659 6.83341C0.803541 6.47036 0.518349 6.04696 0.311013 5.5632C0.103671 5.07943 0 4.5588 0 4.0013C0 3.44379 0.103671 2.92273 0.311013 2.4381C0.518349 1.95348 0.803049 1.53104 1.16511 1.1708C1.52718 0.810554 1.95032 0.525358 2.43455 0.315215C2.91877 0.105072 3.43989 0 3.99792 0C4.55595 0 5.07764 0.10483 5.56301 0.314491C6.04837 0.524146 6.47094 0.80868 6.83072 1.16809C7.1905 1.52751 7.47533 1.95015 7.6852 2.43603C7.89507 2.92191 8 3.44396 8 4.0022C8 4.56004 7.89493 5.08098 7.68479 5.56504C7.47464 6.04909 7.18945 6.47169 6.8292 6.83282C6.46896 7.19395 6.04646 7.47876 5.56169 7.68726C5.07694 7.89575 4.55607 8 3.9991 8ZM4 7.11633C4.86173 7.11633 5.59499 6.81435 6.19977 6.21037C6.80454 5.60639 7.10693 4.8696 7.10693 4C7.10693 3.13827 6.80513 2.40501 6.20153 1.80024C5.59793 1.19546 4.86095 0.893067 3.9906 0.893067C3.12887 0.893067 2.39561 1.19487 1.79083 1.79847C1.18606 2.40207 0.883666 3.13905 0.883666 4.0094C0.883666 4.87113 1.18565 5.60439 1.78963 6.20917C2.39361 6.81394 3.1304 7.11633 4 7.11633Z" fill="#ECDD1D"/>
7
- </g>
8
- </svg>
@@ -1,76 +0,0 @@
1
- import { ImageCarousel } from ".";
2
-
3
- export default {
4
- title: "Components/atoms/ImageCarousel",
5
- component: ImageCarousel,
6
- };
7
-
8
- const Template = (args) => <ImageCarousel {...args} />;
9
- export const ImageCarouselDefault = Template.bind({});
10
- ImageCarouselDefault.args = {
11
- imageArray: [
12
- {
13
- id: 35596,
14
- status: null,
15
- image_id: 1,
16
- packing_type: "3",
17
- image_type: "1",
18
- article_id: "38443",
19
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMS1kNDQ2ZjIwNy0wYTkzLTQyNzgtYWZjNi01MTY2ZjIyY2EzNDMucG5nIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoxMDAwLCJoZWlnaHQiOjEwMDAsImZpdCI6ImNvbnRhaW4iLCJiYWNrZ3JvdW5kIjp7InIiOjI1NSwiZyI6MjU1LCJiIjoyNTUsImFscGhhIjoxfX19fQ==",
20
- timestamp: "2023-05-30T03:01:12.000Z",
21
- id_version: 15,
22
- width: null,
23
- height: null,
24
- scene_type: null,
25
- image_shot_type: null,
26
- last_modified: "2023-06-05T23:49:49.000Z",
27
- name: "Central (Frente Comercial)",
28
- version: 15,
29
- ext: "png",
30
- uuid: "d446f207-0a93-4278-afc6-5166f22ca343",
31
- srcDB: "id-38443/15/1-d446f207-0a93-4278-afc6-5166f22ca343.png",
32
- },
33
- {
34
- id: 35597,
35
- status: null,
36
- image_id: 3,
37
- packing_type: "3",
38
- image_type: "1",
39
- article_id: "38443",
40
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMy0yOTZkMzU3ZC00OTUzLTRiMzktYjFjMy04YWZmZDI2NDgwMWIucG5nIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoxMDAwLCJoZWlnaHQiOjEwMDAsImZpdCI6ImNvbnRhaW4iLCJiYWNrZ3JvdW5kIjp7InIiOjI1NSwiZyI6MjU1LCJiIjoyNTUsImFscGhhIjoxfX19fQ==",
41
- timestamp: "2023-05-30T03:01:12.000Z",
42
- id_version: 15,
43
- width: null,
44
- height: null,
45
- scene_type: null,
46
- image_shot_type: null,
47
- last_modified: "2023-06-05T23:49:49.000Z",
48
- name: "Trasera (Back)",
49
- version: 15,
50
- ext: "png",
51
- uuid: "296d357d-4953-4b39-b1c3-8affd264801b",
52
- srcDB: "id-38443/15/3-296d357d-4953-4b39-b1c3-8affd264801b.png",
53
- },
54
- {
55
- id: 35598,
56
- status: null,
57
- image_id: 16,
58
- packing_type: "3",
59
- image_type: "1",
60
- article_id: "38443",
61
- src: "https://d24s337exbt5zr.cloudfront.net/eyJidWNrZXQiOiJjb250ZW50LW1hbmFnZW1lbnQtaW1hZ2VzIiwia2V5IjoiaWQtMzg0NDMvMTUvMTYtOGMzNDIzM2YtZTRiMC00MjU0LWFlYzUtZjEyN2ZiYjhkYmVkLnBuZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6MTAwMCwiaGVpZ2h0IjoxMDAwLCJmaXQiOiJjb250YWluIiwiYmFja2dyb3VuZCI6eyJyIjoyNTUsImciOjI1NSwiYiI6MjU1LCJhbHBoYSI6MX19fX0=",
62
- timestamp: "2023-05-30T03:01:12.000Z",
63
- id_version: 15,
64
- width: null,
65
- height: null,
66
- scene_type: null,
67
- image_shot_type: null,
68
- last_modified: "2023-06-05T23:49:49.000Z",
69
- name: "Detalle / Características 1",
70
- version: 15,
71
- ext: "png",
72
- uuid: "8c34233f-e4b0-4254-aec5-f127fbb8dbed",
73
- srcDB: "id-38443/15/16-8c34233f-e4b0-4254-aec5-f127fbb8dbed.png",
74
- },
75
- ],
76
- };