contentoh-components-library 21.4.7 → 21.4.9
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/assets/fonts/roboto/LICENSE.txt +202 -0
- 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 +29 -169
- package/dist/components/pages/ProviderProductEdition/index.js +203 -213
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +60 -85
- package/dist/components/pages/RetailerProductEdition/index.js +303 -315
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/index.js +52 -234
- 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 +34 -188
- package/src/components/pages/ProviderProductEdition/index.js +132 -132
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +41 -72
- package/src/components/pages/RetailerProductEdition/index.js +138 -122
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/index.js +0 -15
- 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 -96
- 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 -97
- 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/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,6 +684,7 @@ export const ProviderProductEdition = ({
|
|
|
668
684
|
}
|
|
669
685
|
);
|
|
670
686
|
if (res.data.statusCode === 200) {
|
|
687
|
+
setUpdatedDescriptions([]);
|
|
671
688
|
setMessage("Descripciones guardadas con éxito");
|
|
672
689
|
await loadData();
|
|
673
690
|
}
|
|
@@ -694,6 +711,7 @@ export const ProviderProductEdition = ({
|
|
|
694
711
|
}
|
|
695
712
|
);
|
|
696
713
|
if (res.data.statusCode === 200) {
|
|
714
|
+
setUpdatedDatasheets([]);
|
|
697
715
|
setMessage("Fichas técnicas guardadas");
|
|
698
716
|
await loadData();
|
|
699
717
|
}
|
|
@@ -804,6 +822,7 @@ export const ProviderProductEdition = ({
|
|
|
804
822
|
}
|
|
805
823
|
);
|
|
806
824
|
if (res.data.statusCode === 200) {
|
|
825
|
+
setImages({});
|
|
807
826
|
setMessage("Imágenes guardadas con éxito");
|
|
808
827
|
sessionStorage.removeItem("imagesList");
|
|
809
828
|
await loadData();
|
|
@@ -825,19 +844,32 @@ export const ProviderProductEdition = ({
|
|
|
825
844
|
}
|
|
826
845
|
};
|
|
827
846
|
|
|
828
|
-
const createComment = async (
|
|
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
|
+
}
|
|
829
861
|
const data = {
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
status: product.status || productEdit.product.status,
|
|
836
|
-
},
|
|
837
|
-
paramsHeader: { Authorization: token },
|
|
862
|
+
articleId: product?.id_article,
|
|
863
|
+
orderId: product?.orderId,
|
|
864
|
+
message: body,
|
|
865
|
+
concept: concept,
|
|
866
|
+
version: version,
|
|
838
867
|
};
|
|
839
|
-
|
|
840
|
-
|
|
868
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
869
|
+
headers: {
|
|
870
|
+
Authorization: token,
|
|
871
|
+
},
|
|
872
|
+
});
|
|
841
873
|
};
|
|
842
874
|
|
|
843
875
|
useEffect(() => {
|
|
@@ -1037,27 +1069,6 @@ export const ProviderProductEdition = ({
|
|
|
1037
1069
|
const { newArticleStatus, newServiceStatus, newStatus } = JSON.parse(
|
|
1038
1070
|
res.data.body
|
|
1039
1071
|
);
|
|
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
1072
|
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1062
1073
|
const retailerStatusCopy = { ...retailerStatus };
|
|
1063
1074
|
retailerStatusCopy[activeRetailer.id][concept] = newStatus;
|
|
@@ -1089,7 +1100,6 @@ export const ProviderProductEdition = ({
|
|
|
1089
1100
|
result,
|
|
1090
1101
|
isAproved: result === "A",
|
|
1091
1102
|
};
|
|
1092
|
-
const messages = [];
|
|
1093
1103
|
servicesData?.forEach((ret) => {
|
|
1094
1104
|
const { service, id_retailer } = ret;
|
|
1095
1105
|
let data = {};
|
|
@@ -1106,18 +1116,6 @@ export const ProviderProductEdition = ({
|
|
|
1106
1116
|
},
|
|
1107
1117
|
})
|
|
1108
1118
|
);
|
|
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
1119
|
});
|
|
1122
1120
|
await Promise.all(evaluationArray);
|
|
1123
1121
|
const userType = user.is_retailer === 1 ? "CA" : "P";
|
|
@@ -1157,7 +1155,6 @@ export const ProviderProductEdition = ({
|
|
|
1157
1155
|
product: productTemp,
|
|
1158
1156
|
})
|
|
1159
1157
|
);
|
|
1160
|
-
await Promise.all(messages);
|
|
1161
1158
|
|
|
1162
1159
|
await loadData();
|
|
1163
1160
|
} catch (error) {
|
|
@@ -1286,7 +1283,8 @@ export const ProviderProductEdition = ({
|
|
|
1286
1283
|
return;
|
|
1287
1284
|
} else if (user.is_retailer) {
|
|
1288
1285
|
if (product.id_order || product.orderId) {
|
|
1289
|
-
|
|
1286
|
+
setValidatedAll(true);
|
|
1287
|
+
showGlobalModal("error");
|
|
1290
1288
|
} else {
|
|
1291
1289
|
setDataGenericModal((prev) => ({
|
|
1292
1290
|
...prev,
|
|
@@ -1298,7 +1296,8 @@ export const ProviderProductEdition = ({
|
|
|
1298
1296
|
showGlobalModal("generic");
|
|
1299
1297
|
}
|
|
1300
1298
|
} else {
|
|
1301
|
-
|
|
1299
|
+
setValidatedAll(true);
|
|
1300
|
+
showGlobalModal("error");
|
|
1302
1301
|
}
|
|
1303
1302
|
}
|
|
1304
1303
|
};
|
|
@@ -1308,7 +1307,6 @@ export const ProviderProductEdition = ({
|
|
|
1308
1307
|
<HeaderTop
|
|
1309
1308
|
setHeaderTop={setHeaderTop}
|
|
1310
1309
|
withChat={location?.state?.withChat}
|
|
1311
|
-
chatType={location?.state?.chatType}
|
|
1312
1310
|
productSelected={productSelected}
|
|
1313
1311
|
token={token}
|
|
1314
1312
|
activeRetailer={activeRetailer}
|
|
@@ -1387,7 +1385,7 @@ export const ProviderProductEdition = ({
|
|
|
1387
1385
|
} else if (user.is_retailer) {
|
|
1388
1386
|
if (product.id_order || product.orderId) {
|
|
1389
1387
|
setValidatedAll(true);
|
|
1390
|
-
|
|
1388
|
+
showGlobalModal("error");
|
|
1391
1389
|
} else {
|
|
1392
1390
|
setDataGenericModal((prev) => ({
|
|
1393
1391
|
...prev,
|
|
@@ -1399,14 +1397,12 @@ export const ProviderProductEdition = ({
|
|
|
1399
1397
|
showGlobalModal("generic");
|
|
1400
1398
|
}
|
|
1401
1399
|
} else {
|
|
1402
|
-
setShowRejectModal(true);
|
|
1403
1400
|
setValidatedAll(true);
|
|
1401
|
+
showGlobalModal("error");
|
|
1404
1402
|
}
|
|
1405
1403
|
}}
|
|
1406
1404
|
approve={() => sendToEvaluation("A")}
|
|
1407
|
-
reject={() =>
|
|
1408
|
-
setShowRejectModal(true);
|
|
1409
|
-
}}
|
|
1405
|
+
reject={() => sendToEvaluation("R")}
|
|
1410
1406
|
/>
|
|
1411
1407
|
<FullTabsMenu
|
|
1412
1408
|
tabsSections={tabsSections}
|
|
@@ -1526,41 +1522,87 @@ export const ProviderProductEdition = ({
|
|
|
1526
1522
|
</>
|
|
1527
1523
|
)}
|
|
1528
1524
|
</div>
|
|
1529
|
-
{
|
|
1530
|
-
<div className="
|
|
1531
|
-
|
|
1532
|
-
<
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
<
|
|
1543
|
-
|
|
1544
|
-
|
|
1525
|
+
{isRevision() && getSectionStatus() ? (
|
|
1526
|
+
<div className="commentary-box">
|
|
1527
|
+
{!comment ? (
|
|
1528
|
+
<div className="commentary">
|
|
1529
|
+
<TagAndInput
|
|
1530
|
+
label={"Caja de Comentario"}
|
|
1531
|
+
inputType={"textarea"}
|
|
1532
|
+
inputCols={80}
|
|
1533
|
+
inputRows={4}
|
|
1534
|
+
inputId={"commentary-box"}
|
|
1535
|
+
index={0}
|
|
1536
|
+
/>
|
|
1537
|
+
<div className="buttons-box">
|
|
1538
|
+
<Button
|
|
1539
|
+
buttonType={"general-transparent-button"}
|
|
1540
|
+
label={"Enviar comentario"}
|
|
1541
|
+
onClick={(e) =>
|
|
1542
|
+
createComment(
|
|
1543
|
+
e,
|
|
1544
|
+
document.querySelector(
|
|
1545
|
+
"#description-commentary-box-0 .ql-container .ql-editor > p"
|
|
1546
|
+
).innerHTML,
|
|
1547
|
+
activeTab
|
|
1548
|
+
)
|
|
1549
|
+
}
|
|
1550
|
+
/>
|
|
1551
|
+
</div>
|
|
1552
|
+
</div>
|
|
1545
1553
|
) : (
|
|
1546
|
-
|
|
1547
|
-
<
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
iconSize={"big-image"}
|
|
1551
|
-
slidePosition={"top-slide"}
|
|
1554
|
+
<div className="feedback-box">
|
|
1555
|
+
<Commentary
|
|
1556
|
+
comment={comment.message}
|
|
1557
|
+
reviewed={crossComment}
|
|
1552
1558
|
/>
|
|
1553
1559
|
<Button
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1560
|
+
buttonType={"circular-button accept-button"}
|
|
1561
|
+
onClick={async () => {
|
|
1562
|
+
setCrossComment(true);
|
|
1563
|
+
commentRevised();
|
|
1557
1564
|
}}
|
|
1558
|
-
buttonType="general-default-button"
|
|
1559
|
-
label="Enviar a Content-oh!"
|
|
1560
1565
|
/>
|
|
1561
|
-
|
|
1566
|
+
</div>
|
|
1562
1567
|
)}
|
|
1563
1568
|
</div>
|
|
1569
|
+
) : (
|
|
1570
|
+
!revision && (
|
|
1571
|
+
<div className="required-inputs-message">
|
|
1572
|
+
<div>
|
|
1573
|
+
<p>
|
|
1574
|
+
Los atributos son requeridos por las plataformas de las
|
|
1575
|
+
cadenas, es muy importante completar los campos requeridos
|
|
1576
|
+
ya que pueden rechazar el producto por falta de información.
|
|
1577
|
+
</p>
|
|
1578
|
+
</div>
|
|
1579
|
+
{inCart ? (
|
|
1580
|
+
<button type="button">
|
|
1581
|
+
<Link to="/checkout">
|
|
1582
|
+
<p>Articulo en carrito</p>
|
|
1583
|
+
<p>Ir a checkout</p>
|
|
1584
|
+
</Link>
|
|
1585
|
+
</button>
|
|
1586
|
+
) : (
|
|
1587
|
+
<>
|
|
1588
|
+
<SliderToolTip
|
|
1589
|
+
infoIcon={InfoIcon}
|
|
1590
|
+
slidefront={slidefront}
|
|
1591
|
+
iconSize={"big-image"}
|
|
1592
|
+
slidePosition={"top-slide"}
|
|
1593
|
+
/>
|
|
1594
|
+
<Button
|
|
1595
|
+
onClick={() => {
|
|
1596
|
+
setShowContentohRequestModal &&
|
|
1597
|
+
setShowContentohRequestModal(true);
|
|
1598
|
+
}}
|
|
1599
|
+
buttonType="general-default-button"
|
|
1600
|
+
label="Enviar a Content-oh!"
|
|
1601
|
+
/>
|
|
1602
|
+
</>
|
|
1603
|
+
)}
|
|
1604
|
+
</div>
|
|
1605
|
+
)
|
|
1564
1606
|
)}
|
|
1565
1607
|
</div>
|
|
1566
1608
|
</div>
|
|
@@ -1603,48 +1645,6 @@ export const ProviderProductEdition = ({
|
|
|
1603
1645
|
jwt={token}
|
|
1604
1646
|
/>
|
|
1605
1647
|
)}
|
|
1606
|
-
{showRejectModal && (
|
|
1607
|
-
<Modal
|
|
1608
|
-
title={"Agregar mensaje de rechazo"}
|
|
1609
|
-
show={showRejectModal}
|
|
1610
|
-
customComponent={
|
|
1611
|
-
<TagAndInput
|
|
1612
|
-
inputType={"textarea"}
|
|
1613
|
-
inputId={"modal-message-box"}
|
|
1614
|
-
index={0}
|
|
1615
|
-
color={"white"}
|
|
1616
|
-
/>
|
|
1617
|
-
}
|
|
1618
|
-
buttons={[
|
|
1619
|
-
<ButtonV2
|
|
1620
|
-
key={"btn-Cancelar"}
|
|
1621
|
-
type={"white"}
|
|
1622
|
-
label={"Cancelar"}
|
|
1623
|
-
size={12}
|
|
1624
|
-
onClick={() => {
|
|
1625
|
-
setShowRejectModal(false);
|
|
1626
|
-
}}
|
|
1627
|
-
/>,
|
|
1628
|
-
<ButtonV2
|
|
1629
|
-
key={"btn-Aceptar"}
|
|
1630
|
-
type={"pink"}
|
|
1631
|
-
label={"Aceptar"}
|
|
1632
|
-
size={12}
|
|
1633
|
-
onClick={async () => {
|
|
1634
|
-
const body = document.querySelector(
|
|
1635
|
-
"#modal-message-box .ql-container .ql-editor > p"
|
|
1636
|
-
).innerHTML;
|
|
1637
|
-
const messages = [
|
|
1638
|
-
{ type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
|
|
1639
|
-
];
|
|
1640
|
-
await createComment(messages, activeRetailer.id);
|
|
1641
|
-
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
1642
|
-
setShowRejectModal(false);
|
|
1643
|
-
}}
|
|
1644
|
-
/>,
|
|
1645
|
-
]}
|
|
1646
|
-
/>
|
|
1647
|
-
)}
|
|
1648
1648
|
</Container>
|
|
1649
1649
|
);
|
|
1650
1650
|
};
|
|
@@ -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,113 +16,82 @@ 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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
},
|
|
21
|
+
services: {
|
|
22
|
+
datasheets: 1,
|
|
23
|
+
descriptions: 1,
|
|
24
|
+
images: 1,
|
|
54
25
|
},
|
|
55
|
-
orderId:
|
|
56
|
-
status: "
|
|
57
|
-
datasheet_status: "
|
|
26
|
+
orderId: 15275,
|
|
27
|
+
status: "AC",
|
|
28
|
+
datasheet_status: "AC",
|
|
58
29
|
prio: "none",
|
|
59
30
|
version: 3,
|
|
60
|
-
description_status: "
|
|
61
|
-
images_status: "
|
|
31
|
+
description_status: "AC",
|
|
32
|
+
images_status: "AC",
|
|
62
33
|
statusByRetailer: {
|
|
63
|
-
|
|
64
|
-
datasheet: "
|
|
65
|
-
description: "
|
|
66
|
-
images: "
|
|
34
|
+
34: {
|
|
35
|
+
datasheet: "AC",
|
|
36
|
+
description: "AC",
|
|
37
|
+
images: "AC",
|
|
67
38
|
},
|
|
68
39
|
},
|
|
69
40
|
article: {
|
|
70
|
-
id_article:
|
|
71
|
-
id_category: "
|
|
72
|
-
name: "
|
|
73
|
-
upc: "
|
|
74
|
-
timestamp: "2023-
|
|
75
|
-
id_user:
|
|
41
|
+
id_article: 39485,
|
|
42
|
+
id_category: "11",
|
|
43
|
+
name: "Mix de nueces",
|
|
44
|
+
upc: "7543453453",
|
|
45
|
+
timestamp: "2023-07-14T21:02:54.000Z",
|
|
46
|
+
id_user: 28,
|
|
76
47
|
status: "NULL",
|
|
77
48
|
active: 1,
|
|
78
|
-
company_id:
|
|
49
|
+
company_id: 1,
|
|
79
50
|
company_name: "GRUPO BRAHMA",
|
|
80
51
|
country: "México",
|
|
81
|
-
id_order:
|
|
82
|
-
id_datasheet_especialist:
|
|
52
|
+
id_order: 15275,
|
|
53
|
+
id_datasheet_especialist: 54,
|
|
83
54
|
id_datasheet_facilitator: 52,
|
|
84
|
-
id_description_especialist:
|
|
55
|
+
id_description_especialist: 54,
|
|
85
56
|
id_description_facilitator: 52,
|
|
86
|
-
id_images_especialist:
|
|
57
|
+
id_images_especialist: 55,
|
|
87
58
|
id_images_facilitator: 53,
|
|
88
|
-
id_auditor:
|
|
59
|
+
id_auditor: 37,
|
|
89
60
|
id_recepcionist: null,
|
|
90
|
-
category: "
|
|
61
|
+
category: "Abarrotes|Abarrotes Secos|Frutos Secos",
|
|
91
62
|
missingAttributes: 0,
|
|
92
63
|
missingDescriptions: 0,
|
|
93
64
|
missingImages: 0,
|
|
94
65
|
},
|
|
95
66
|
retailers: [
|
|
96
67
|
{
|
|
97
|
-
id:
|
|
98
|
-
name: "
|
|
68
|
+
id: 34,
|
|
69
|
+
name: "San Pablo",
|
|
99
70
|
},
|
|
100
71
|
],
|
|
72
|
+
country: "México",
|
|
73
|
+
upc: "7543453453",
|
|
101
74
|
},
|
|
102
75
|
location: {
|
|
103
|
-
product: { articleId:
|
|
104
|
-
state: {
|
|
105
|
-
withChat: true,
|
|
106
|
-
chatType: "product_status",
|
|
107
|
-
},
|
|
76
|
+
product: { articleId: 39290, versionId: 7 },
|
|
108
77
|
},
|
|
109
78
|
user: {
|
|
110
|
-
id_user:
|
|
111
|
-
name: "
|
|
112
|
-
last_name: "",
|
|
113
|
-
email: "
|
|
114
|
-
position: "",
|
|
79
|
+
id_user: 37,
|
|
80
|
+
name: "José",
|
|
81
|
+
last_name: "Castañeda",
|
|
82
|
+
email: "ismael97lopez@gmail.com",
|
|
83
|
+
position: "Auditor",
|
|
115
84
|
telephone: "",
|
|
116
|
-
country: "",
|
|
85
|
+
country: "México",
|
|
117
86
|
id_company: 2,
|
|
118
|
-
id_cognito: "
|
|
87
|
+
id_cognito: "9a213128-6482-4c16-a4b6-6e64f225b1bd",
|
|
119
88
|
birth_Date: null,
|
|
120
89
|
about_me: "",
|
|
121
90
|
zip_code: "",
|
|
122
91
|
address: "",
|
|
123
92
|
job: "",
|
|
124
93
|
id_stripe: "",
|
|
125
|
-
id_role:
|
|
94
|
+
id_role: 6,
|
|
126
95
|
active: 1,
|
|
127
96
|
is_retailer: 0,
|
|
128
97
|
email_notify: 1,
|
|
@@ -138,6 +107,6 @@ RetailerProductEditionDefault.args = {
|
|
|
138
107
|
products_limit: "3",
|
|
139
108
|
type: "PyMES",
|
|
140
109
|
},
|
|
141
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
110
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-37/37.png?1691175586149",
|
|
142
111
|
},
|
|
143
112
|
};
|