contentoh-components-library 21.4.16 → 21.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +1 -5
- package/.env.production +1 -3
- package/dist/components/atoms/Avatar/index.js +2 -3
- package/dist/components/atoms/Card/index.js +5 -46
- package/dist/components/atoms/Card/styles.js +1 -3
- package/dist/components/atoms/CheckBox/index.js +2 -7
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/InputFormatter/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/HeaderTop/index.js +11 -68
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +8 -27
- package/dist/components/organisms/Chat/ContainerItems/index.js +3 -19
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +197 -350
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +4 -49
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +120 -88
- package/dist/components/pages/ProviderProductEdition/index.js +200 -216
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +52 -56
- package/dist/components/pages/RetailerProductEdition/index.js +300 -318
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/index.js +52 -247
- package/package.json +1 -4
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/Card/index.js +2 -35
- package/src/components/atoms/Card/styles.js +5 -41
- package/src/components/atoms/CheckBox/index.js +1 -4
- package/src/components/atoms/CheckBox/styles.js +0 -2
- package/src/components/atoms/InputFormatter/styles.js +1 -2
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/TagAndInput/index.js +8 -10
- package/src/components/organisms/Chat/Chat.stories.js +7 -27
- package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
- package/src/components/organisms/Chat/ContainerItems/styles.js +2 -10
- package/src/components/organisms/Chat/ContentChat/index.js +12 -88
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +4 -46
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +127 -95
- package/src/components/pages/ProviderProductEdition/index.js +129 -135
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +52 -55
- package/src/components/pages/RetailerProductEdition/index.js +136 -124
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/index.js +0 -16
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +0 -76
- package/src/components/atoms/ImageCarousel/index.js +0 -103
- package/src/components/atoms/ImageCarousel/styles.js +0 -79
- package/src/components/atoms/PercentTag/PercentTag.stories.js +0 -7
- package/src/components/atoms/PercentTag/index.js +0 -9
- package/src/components/atoms/PercentTag/styles.js +0 -69
- package/src/components/atoms/RatingStars/RatingStars.stories.js +0 -10
- package/src/components/atoms/RatingStars/index.js +0 -31
- package/src/components/atoms/RatingStars/styles.js +0 -28
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +0 -36
- package/src/components/atoms/RetailerCatalog/index.js +0 -49
- package/src/components/atoms/RetailerCatalog/styles.js +0 -30
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +0 -15
- package/src/components/atoms/RetailerOption/index.js +0 -53
- package/src/components/atoms/RetailerOption/styles.js +0 -41
- package/src/components/atoms/RetailersList/RetailersList.stories.js +0 -33
- package/src/components/atoms/RetailersList/index.js +0 -20
- package/src/components/atoms/RetailersList/styles.js +0 -19
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +0 -67
- package/src/components/atoms/UserCatalog/index.js +0 -100
- package/src/components/atoms/UserCatalog/styles.js +0 -24
- package/src/components/atoms/UserOption/UserOption.stories.js +0 -25
- package/src/components/atoms/UserOption/index.js +0 -95
- package/src/components/atoms/UserOption/styles.js +0 -61
- package/src/components/atoms/UserSelector/UserSelector.stories.js +0 -25
- package/src/components/atoms/UserSelector/index.js +0 -86
- package/src/components/atoms/UserSelector/styles.js +0 -55
- package/src/components/molecules/GridItem/GridItem.stories.js +0 -126
- package/src/components/molecules/GridItem/index.js +0 -105
- package/src/components/molecules/GridItem/styles.js +0 -104
- package/src/components/molecules/HeaderItem/ColumnItem.js +0 -9
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +0 -24
- package/src/components/molecules/HeaderItem/index.js +0 -26
- package/src/components/molecules/HeaderItem/styles.js +0 -27
- package/src/components/molecules/RowItem/ColumnItem.js +0 -9
- package/src/components/molecules/RowItem/RowItem.stories.js +0 -5660
- package/src/components/molecules/RowItem/index.js +0 -45
- package/src/components/molecules/RowItem/styles.js +0 -40
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +0 -13
- package/src/components/molecules/StripeCardForm/index.js +0 -42
- package/src/components/molecules/StripeCardForm/paymentForm.js +0 -124
- package/src/components/molecules/StripeCardForm/styles.js +0 -73
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +0 -12
- package/src/components/molecules/StripeCardSelector/index.js +0 -44
- package/src/components/molecules/StripeCardSelector/styles.js +0 -4
- package/src/components/molecules/StripeCardSelector/utils.js +0 -17
- package/src/components/organisms/GridProducts/GridProducts.stories.js +0 -5485
- package/src/components/organisms/GridProducts/index.js +0 -50
- package/src/components/organisms/GridProducts/styles.js +0 -14
- package/src/components/organisms/GridProducts/utils.js +0 -111
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +0 -63
- package/src/components/organisms/PanelLayout/index.js +0 -11
- package/src/components/organisms/PanelLayout/styles.js +0 -33
- package/src/components/organisms/SideModal/SideModal.stories.js +0 -23
- package/src/components/organisms/SideModal/index.js +0 -50
- 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
|
-
|
|
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
|
-
|
|
603
|
+
setActivePercentage(retailers[0]?.percentage);
|
|
588
604
|
}, [percentages]);
|
|
589
605
|
|
|
590
606
|
const loadInputs = () => {
|
|
@@ -668,7 +684,6 @@ export const ProviderProductEdition = ({
|
|
|
668
684
|
}
|
|
669
685
|
);
|
|
670
686
|
if (res.data.statusCode === 200) {
|
|
671
|
-
setUpdatedDescriptions([]);
|
|
672
687
|
setMessage("Descripciones guardadas con éxito");
|
|
673
688
|
await loadData();
|
|
674
689
|
}
|
|
@@ -695,7 +710,6 @@ export const ProviderProductEdition = ({
|
|
|
695
710
|
}
|
|
696
711
|
);
|
|
697
712
|
if (res.data.statusCode === 200) {
|
|
698
|
-
setUpdatedDatasheets([]);
|
|
699
713
|
setMessage("Fichas técnicas guardadas");
|
|
700
714
|
await loadData();
|
|
701
715
|
}
|
|
@@ -806,7 +820,6 @@ export const ProviderProductEdition = ({
|
|
|
806
820
|
}
|
|
807
821
|
);
|
|
808
822
|
if (res.data.statusCode === 200) {
|
|
809
|
-
setImages({});
|
|
810
823
|
setMessage("Imágenes guardadas con éxito");
|
|
811
824
|
sessionStorage.removeItem("imagesList");
|
|
812
825
|
await loadData();
|
|
@@ -828,19 +841,32 @@ export const ProviderProductEdition = ({
|
|
|
828
841
|
}
|
|
829
842
|
};
|
|
830
843
|
|
|
831
|
-
const createComment = async (
|
|
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
|
+
}
|
|
832
858
|
const data = {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
status: product.status || productEdit.product.status,
|
|
839
|
-
},
|
|
840
|
-
paramsHeader: { Authorization: token },
|
|
859
|
+
articleId: product?.id_article,
|
|
860
|
+
orderId: product?.orderId,
|
|
861
|
+
message: body,
|
|
862
|
+
concept: concept,
|
|
863
|
+
version: version,
|
|
841
864
|
};
|
|
842
|
-
|
|
843
|
-
|
|
865
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
866
|
+
headers: {
|
|
867
|
+
Authorization: token,
|
|
868
|
+
},
|
|
869
|
+
});
|
|
844
870
|
};
|
|
845
871
|
|
|
846
872
|
useEffect(() => {
|
|
@@ -1040,27 +1066,6 @@ export const ProviderProductEdition = ({
|
|
|
1040
1066
|
const { newArticleStatus, newServiceStatus, newStatus } = JSON.parse(
|
|
1041
1067
|
res.data.body
|
|
1042
1068
|
);
|
|
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
1069
|
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1065
1070
|
const retailerStatusCopy = { ...retailerStatus };
|
|
1066
1071
|
retailerStatusCopy[activeRetailer.id][concept] = newStatus;
|
|
@@ -1092,7 +1097,6 @@ export const ProviderProductEdition = ({
|
|
|
1092
1097
|
result,
|
|
1093
1098
|
isAproved: result === "A",
|
|
1094
1099
|
};
|
|
1095
|
-
const messages = [];
|
|
1096
1100
|
servicesData?.forEach((ret) => {
|
|
1097
1101
|
const { service, id_retailer } = ret;
|
|
1098
1102
|
let data = {};
|
|
@@ -1109,18 +1113,6 @@ export const ProviderProductEdition = ({
|
|
|
1109
1113
|
},
|
|
1110
1114
|
})
|
|
1111
1115
|
);
|
|
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
1116
|
});
|
|
1125
1117
|
await Promise.all(evaluationArray);
|
|
1126
1118
|
const userType = user.is_retailer === 1 ? "CA" : "P";
|
|
@@ -1160,7 +1152,6 @@ export const ProviderProductEdition = ({
|
|
|
1160
1152
|
product: productTemp,
|
|
1161
1153
|
})
|
|
1162
1154
|
);
|
|
1163
|
-
await Promise.all(messages);
|
|
1164
1155
|
|
|
1165
1156
|
await loadData();
|
|
1166
1157
|
} catch (error) {
|
|
@@ -1289,7 +1280,8 @@ export const ProviderProductEdition = ({
|
|
|
1289
1280
|
return;
|
|
1290
1281
|
} else if (user.is_retailer) {
|
|
1291
1282
|
if (product.id_order || product.orderId) {
|
|
1292
|
-
|
|
1283
|
+
setValidatedAll(true);
|
|
1284
|
+
showGlobalModal("error");
|
|
1293
1285
|
} else {
|
|
1294
1286
|
setDataGenericModal((prev) => ({
|
|
1295
1287
|
...prev,
|
|
@@ -1301,7 +1293,8 @@ export const ProviderProductEdition = ({
|
|
|
1301
1293
|
showGlobalModal("generic");
|
|
1302
1294
|
}
|
|
1303
1295
|
} else {
|
|
1304
|
-
|
|
1296
|
+
setValidatedAll(true);
|
|
1297
|
+
showGlobalModal("error");
|
|
1305
1298
|
}
|
|
1306
1299
|
}
|
|
1307
1300
|
};
|
|
@@ -1311,7 +1304,6 @@ export const ProviderProductEdition = ({
|
|
|
1311
1304
|
<HeaderTop
|
|
1312
1305
|
setHeaderTop={setHeaderTop}
|
|
1313
1306
|
withChat={location?.state?.withChat}
|
|
1314
|
-
chatType={location?.state?.chatType}
|
|
1315
1307
|
productSelected={productSelected}
|
|
1316
1308
|
token={token}
|
|
1317
1309
|
activeRetailer={activeRetailer}
|
|
@@ -1390,7 +1382,7 @@ export const ProviderProductEdition = ({
|
|
|
1390
1382
|
} else if (user.is_retailer) {
|
|
1391
1383
|
if (product.id_order || product.orderId) {
|
|
1392
1384
|
setValidatedAll(true);
|
|
1393
|
-
|
|
1385
|
+
showGlobalModal("error");
|
|
1394
1386
|
} else {
|
|
1395
1387
|
setDataGenericModal((prev) => ({
|
|
1396
1388
|
...prev,
|
|
@@ -1402,14 +1394,12 @@ export const ProviderProductEdition = ({
|
|
|
1402
1394
|
showGlobalModal("generic");
|
|
1403
1395
|
}
|
|
1404
1396
|
} else {
|
|
1405
|
-
setShowRejectModal(true);
|
|
1406
1397
|
setValidatedAll(true);
|
|
1398
|
+
showGlobalModal("error");
|
|
1407
1399
|
}
|
|
1408
1400
|
}}
|
|
1409
1401
|
approve={() => sendToEvaluation("A")}
|
|
1410
|
-
reject={() =>
|
|
1411
|
-
setShowRejectModal(true);
|
|
1412
|
-
}}
|
|
1402
|
+
reject={() => sendToEvaluation("R")}
|
|
1413
1403
|
/>
|
|
1414
1404
|
<FullTabsMenu
|
|
1415
1405
|
tabsSections={tabsSections}
|
|
@@ -1529,41 +1519,87 @@ export const ProviderProductEdition = ({
|
|
|
1529
1519
|
</>
|
|
1530
1520
|
)}
|
|
1531
1521
|
</div>
|
|
1532
|
-
{
|
|
1533
|
-
<div className="
|
|
1534
|
-
|
|
1535
|
-
<
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
<
|
|
1546
|
-
|
|
1547
|
-
|
|
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>
|
|
1548
1550
|
) : (
|
|
1549
|
-
|
|
1550
|
-
<
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
iconSize={"big-image"}
|
|
1554
|
-
slidePosition={"top-slide"}
|
|
1551
|
+
<div className="feedback-box">
|
|
1552
|
+
<Commentary
|
|
1553
|
+
comment={comment.message}
|
|
1554
|
+
reviewed={crossComment}
|
|
1555
1555
|
/>
|
|
1556
1556
|
<Button
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1557
|
+
buttonType={"circular-button accept-button"}
|
|
1558
|
+
onClick={async () => {
|
|
1559
|
+
setCrossComment(true);
|
|
1560
|
+
commentRevised();
|
|
1560
1561
|
}}
|
|
1561
|
-
buttonType="general-default-button"
|
|
1562
|
-
label="Enviar a Content-oh!"
|
|
1563
1562
|
/>
|
|
1564
|
-
|
|
1563
|
+
</div>
|
|
1565
1564
|
)}
|
|
1566
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
|
+
)
|
|
1567
1603
|
)}
|
|
1568
1604
|
</div>
|
|
1569
1605
|
</div>
|
|
@@ -1606,48 +1642,6 @@ export const ProviderProductEdition = ({
|
|
|
1606
1642
|
jwt={token}
|
|
1607
1643
|
/>
|
|
1608
1644
|
)}
|
|
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
1645
|
</Container>
|
|
1652
1646
|
);
|
|
1653
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,86 +16,83 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhNmM0ZDNkNi0yNGE0LTQxZDQtYWQwZi1kMDg3NDM4YWI1YjYiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImE2YzRkM2Q2LTI0YTQtNDFkNC1hZDBmLWQwODc0MzhhYjViNiIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiIyYjU3MjZlMy04MjM2LTRmYzMtODBkMi05NWVmYmU4ODdjOTYiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MjAxNjI5MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4MjAxOTg5MSwiaWF0IjoxNjgyMDE2MjkxLCJlbWFpbCI6ImV0Y0Bjb250ZW50b2guY29tIn0.SCj_yp1NkGCED59JHoDSdFAOakIOvZVeC0yLwt9z0BtenDXlU0m5cUofQQonnWPM8Q70yMFEkyMGI9kQs_fz1gxrmrSc2FGefn3B_1Vymq3pQ_S1JrY_syYf88m_GtJKOywEnE6--Ef9lZhFBFKGtqRJ4H8JBa9Xb96uCjAKyEMCSURDlw37pk2RQdULlZPj17Zb6Xrqi2lwrhpI1ByptX3__UoTiZklnTXwIxM4JdU7yuhXLznaEH8NOSd2Jw-CV6FCUbYBHlnRYBQg7B5mwyVKtDQm6QpRgBTBPCvljJJpFjRKUcnon8WZiFXx1qVbkWPt2vCT1TZqqoSLdlP6lA",
|
|
20
20
|
productSelected: {
|
|
21
|
+
orderId: 15160,
|
|
22
|
+
status: "SAC",
|
|
23
|
+
datasheet_status: "SAC",
|
|
24
|
+
prio: "none",
|
|
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,
|
|
34
|
+
},
|
|
21
35
|
services: {
|
|
22
36
|
datasheets: 1,
|
|
23
37
|
descriptions: 1,
|
|
24
38
|
images: 1,
|
|
25
39
|
},
|
|
26
|
-
orderId: 15275,
|
|
27
|
-
status: "AC",
|
|
28
|
-
datasheet_status: "AC",
|
|
29
|
-
prio: "none",
|
|
30
|
-
version: 3,
|
|
31
|
-
description_status: "AC",
|
|
32
|
-
images_status: "AC",
|
|
33
|
-
statusByRetailer: {
|
|
34
|
-
34: {
|
|
35
|
-
datasheet: "AC",
|
|
36
|
-
description: "AC",
|
|
37
|
-
images: "AC",
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
40
|
article: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
name: "Mix de nueces",
|
|
44
|
-
upc: "7543453453",
|
|
45
|
-
timestamp: "2023-07-14T21:02:54.000Z",
|
|
46
|
-
id_user: 28,
|
|
47
|
-
status: "NULL",
|
|
48
|
-
active: 1,
|
|
49
|
-
company_id: 1,
|
|
50
|
-
company_name: "GRUPO BRAHMA",
|
|
41
|
+
category: "Puertas y Ventanas|Molduras|Molduras Madera Blanda",
|
|
42
|
+
company_name: "Demo",
|
|
51
43
|
country: "México",
|
|
52
|
-
|
|
53
|
-
id_datasheet_especialist:
|
|
54
|
-
id_datasheet_facilitator:
|
|
55
|
-
id_description_especialist:
|
|
56
|
-
id_description_facilitator:
|
|
57
|
-
id_images_especialist:
|
|
58
|
-
id_images_facilitator:
|
|
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,
|
|
59
53
|
id_auditor: 37,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
missingDescriptions: 0,
|
|
64
|
-
missingImages: 0,
|
|
54
|
+
name: "MOLDURA MARCO MODER 11X4X244 CM",
|
|
55
|
+
timestamp: "2023-04-19T21:36:02.000Z",
|
|
56
|
+
upc: "100030",
|
|
65
57
|
},
|
|
66
58
|
retailers: [
|
|
67
59
|
{
|
|
68
|
-
id:
|
|
69
|
-
name: "
|
|
60
|
+
id: 58,
|
|
61
|
+
name: "The Home Depot Golden",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 68,
|
|
65
|
+
name: "The Home Depot Merchants",
|
|
70
66
|
},
|
|
71
67
|
],
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
statusByRetailer: {
|
|
69
|
+
58: {
|
|
70
|
+
datasheet: "SAC",
|
|
71
|
+
description: "SAC",
|
|
72
|
+
images: "SAC",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
74
75
|
},
|
|
75
76
|
location: {
|
|
76
|
-
product: { articleId:
|
|
77
|
-
state: {
|
|
78
|
-
withChat: true,
|
|
79
|
-
chatType: "product_status",
|
|
80
|
-
},
|
|
77
|
+
product: { articleId: 39290, versionId: 7 },
|
|
81
78
|
},
|
|
82
79
|
user: {
|
|
83
|
-
id_user:
|
|
84
|
-
name: "
|
|
85
|
-
last_name: "
|
|
86
|
-
email: "
|
|
87
|
-
position: "
|
|
80
|
+
id_user: 51,
|
|
81
|
+
name: "ADMIN PRUEBA",
|
|
82
|
+
last_name: "",
|
|
83
|
+
email: "etc@contentoh.com",
|
|
84
|
+
position: "",
|
|
88
85
|
telephone: "",
|
|
89
|
-
country: "
|
|
86
|
+
country: "",
|
|
90
87
|
id_company: 2,
|
|
91
|
-
id_cognito: "
|
|
88
|
+
id_cognito: "a6c4d3d6-24a4-41d4-ad0f-d087438ab5b6",
|
|
92
89
|
birth_Date: null,
|
|
93
90
|
about_me: "",
|
|
94
91
|
zip_code: "",
|
|
95
92
|
address: "",
|
|
96
93
|
job: "",
|
|
97
94
|
id_stripe: "",
|
|
98
|
-
id_role:
|
|
95
|
+
id_role: 1,
|
|
99
96
|
active: 1,
|
|
100
97
|
is_retailer: 0,
|
|
101
98
|
email_notify: 1,
|
|
@@ -111,6 +108,6 @@ RetailerProductEditionDefault.args = {
|
|
|
111
108
|
products_limit: "3",
|
|
112
109
|
type: "PyMES",
|
|
113
110
|
},
|
|
114
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
111
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-51/51.png?1682016291518",
|
|
115
112
|
},
|
|
116
113
|
};
|