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.
- package/dist/components/atoms/Avatar/index.js +2 -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/atoms/SliderToolTip/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/SignInLogin/index.js +28 -36
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/dist/components/molecules/TagAndInput/index.js +3 -64
- 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/Chat/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/InputGroup/index.js +48 -154
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/Dashboard/index.js +2 -8
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +137 -123
- package/dist/components/pages/ProviderProductEdition/index.js +258 -269
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +3 -7
- package/dist/components/pages/RetailerProductEdition/index.js +276 -278
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/global-files/data.js +8 -21
- package/dist/global-files/variables.js +1 -5
- package/dist/index.js +58 -201
- package/package.json +1 -2
- package/src/components/atoms/Avatar/index.js +2 -8
- 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/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/src/components/molecules/TagAndInput/index.js +8 -52
- 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 -14
- 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/Chat/styles.js +0 -4
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/InputGroup/index.js +88 -238
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/Dashboard/index.js +1 -6
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +145 -141
- package/src/components/pages/ProviderProductEdition/index.js +148 -145
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +2 -6
- package/src/components/pages/RetailerProductEdition/index.js +144 -115
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +6 -10
- package/src/global-files/variables.js +0 -4
- package/src/index.js +0 -11
- package/src/assets/images/Icons/info.svg +0 -8
- 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/TabSection/styles.js +0 -23
- 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/BoxAttribute/BoxAttribute.stories.js +0 -16
- package/src/components/molecules/BoxAttribute/index.js +0 -72
- package/src/components/molecules/BoxAttribute/styles.js +0 -41
- package/src/components/molecules/BoxButtons/BoxButtons.stories.js +0 -15
- package/src/components/molecules/BoxButtons/index.js +0 -32
- package/src/components/molecules/BoxButtons/styles.js +0 -43
- 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/organisms/Box/Box.stories.js +0 -17
- package/src/components/organisms/Box/index.js +0 -103
- package/src/components/organisms/Box/styles.js +0 -48
- package/src/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +0 -17
- package/src/components/organisms/BoxOnboarding/index.js +0 -60
- package/src/components/organisms/BoxOnboarding/styles.js +0 -44
- 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
|
@@ -39,10 +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
|
-
import { Box } from "../../organisms/Box";
|
|
46
42
|
|
|
47
43
|
const reducerImages = (state, action) => {
|
|
48
44
|
let { values, attrForImgs, inputsByRetailer } = state;
|
|
@@ -144,7 +140,6 @@ export const ProviderProductEdition = ({
|
|
|
144
140
|
const [datasheets, setDatasheets] = useState([]);
|
|
145
141
|
const [images, setImages] = useReducer(reducerImages, {});
|
|
146
142
|
const [showModal, setShowModal] = useState(false);
|
|
147
|
-
const [boxData, setBoxData] = useState();
|
|
148
143
|
const { getRootProps, getInputProps } = useDropzone({
|
|
149
144
|
accept: "image/*",
|
|
150
145
|
noKeyboard: true,
|
|
@@ -219,7 +214,6 @@ export const ProviderProductEdition = ({
|
|
|
219
214
|
const isRetailer = user?.is_retailer;
|
|
220
215
|
const [loading, setLoading] = useState(true);
|
|
221
216
|
const [validatedAll, setValidatedAll] = useState(false);
|
|
222
|
-
const [showRejectModal, setShowRejectModal] = useState(false);
|
|
223
217
|
|
|
224
218
|
const [origin, setOrigin] = useState({
|
|
225
219
|
"Ficha técnica": null,
|
|
@@ -349,6 +343,28 @@ export const ProviderProductEdition = ({
|
|
|
349
343
|
(type) => {
|
|
350
344
|
const formatter = new Intl.ListFormat("es", { type: "conjunction" });
|
|
351
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;
|
|
352
368
|
case "generic":
|
|
353
369
|
setGlobalModal(dataGenericModal);
|
|
354
370
|
break;
|
|
@@ -475,8 +491,7 @@ export const ProviderProductEdition = ({
|
|
|
475
491
|
product?.id_article || product?.article?.id_article,
|
|
476
492
|
product?.article?.company_name || product?.categoryName,
|
|
477
493
|
parseInt(product?.article?.id_category || product?.id_category),
|
|
478
|
-
version
|
|
479
|
-
token
|
|
494
|
+
version
|
|
480
495
|
);
|
|
481
496
|
|
|
482
497
|
//Converts the data inside the datasheets object to array
|
|
@@ -509,9 +524,7 @@ export const ProviderProductEdition = ({
|
|
|
509
524
|
);
|
|
510
525
|
setServicesData(parsedResponse);
|
|
511
526
|
}
|
|
512
|
-
|
|
513
|
-
!activeRetailer.id &&
|
|
514
|
-
setActiveRetailer(active ? active : retailers[0]);
|
|
527
|
+
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
515
528
|
};
|
|
516
529
|
|
|
517
530
|
const isRevision = () => {
|
|
@@ -587,7 +600,7 @@ export const ProviderProductEdition = ({
|
|
|
587
600
|
});
|
|
588
601
|
}
|
|
589
602
|
setProduct(productTemp);
|
|
590
|
-
|
|
603
|
+
setActivePercentage(retailers[0]?.percentage);
|
|
591
604
|
}, [percentages]);
|
|
592
605
|
|
|
593
606
|
const loadInputs = () => {
|
|
@@ -681,27 +694,11 @@ export const ProviderProductEdition = ({
|
|
|
681
694
|
};
|
|
682
695
|
|
|
683
696
|
const saveDatasheets = async () => {
|
|
684
|
-
|
|
685
|
-
Object.entries(boxData).forEach(([, box], index) => {
|
|
686
|
-
const { value } = box;
|
|
687
|
-
const attributesIds = Object.keys(value);
|
|
688
|
-
attributesIds.forEach((attributeId) => {
|
|
689
|
-
const boxId = index + 1;
|
|
690
|
-
const valueOfAtribute = value[attributeId];
|
|
691
|
-
parseBoxData.push({
|
|
692
|
-
attributeId,
|
|
693
|
-
value: valueOfAtribute,
|
|
694
|
-
boxId,
|
|
695
|
-
})
|
|
696
|
-
});
|
|
697
|
-
});
|
|
698
|
-
|
|
697
|
+
setLoading(true);
|
|
699
698
|
const dataObject = {
|
|
700
699
|
articleId: product?.id_article,
|
|
701
700
|
articleData: updatedDatasheets,
|
|
702
|
-
|
|
703
|
-
};
|
|
704
|
-
|
|
701
|
+
};
|
|
705
702
|
if (product?.orderId) dataObject["orderId"] = product?.orderId;
|
|
706
703
|
try {
|
|
707
704
|
const res = await axios.put(
|
|
@@ -720,8 +717,7 @@ export const ProviderProductEdition = ({
|
|
|
720
717
|
}
|
|
721
718
|
} catch (error) {
|
|
722
719
|
console.log(error);
|
|
723
|
-
}
|
|
724
|
-
console.log(dataObject)
|
|
720
|
+
}
|
|
725
721
|
};
|
|
726
722
|
|
|
727
723
|
const updateImages = useCallback(async () => {
|
|
@@ -847,21 +843,33 @@ export const ProviderProductEdition = ({
|
|
|
847
843
|
return "images";
|
|
848
844
|
}
|
|
849
845
|
};
|
|
850
|
-
|
|
851
846
|
|
|
852
|
-
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
|
+
}
|
|
853
861
|
const data = {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
status: product.status || productEdit.product.status,
|
|
860
|
-
},
|
|
861
|
-
paramsHeader: { Authorization: token },
|
|
862
|
+
articleId: product?.id_article,
|
|
863
|
+
orderId: product?.orderId,
|
|
864
|
+
message: body,
|
|
865
|
+
concept: concept,
|
|
866
|
+
version: version,
|
|
862
867
|
};
|
|
863
|
-
|
|
864
|
-
|
|
868
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
869
|
+
headers: {
|
|
870
|
+
Authorization: token,
|
|
871
|
+
},
|
|
872
|
+
});
|
|
865
873
|
};
|
|
866
874
|
|
|
867
875
|
useEffect(() => {
|
|
@@ -1201,6 +1209,8 @@ export const ProviderProductEdition = ({
|
|
|
1201
1209
|
|
|
1202
1210
|
const enableActions = (versionStatus) => {
|
|
1203
1211
|
try {
|
|
1212
|
+
if (user.is_retailer) return false;
|
|
1213
|
+
|
|
1204
1214
|
if (versionStatus) {
|
|
1205
1215
|
return ["AP", "ACA", "RCA", null].includes(versionStatus);
|
|
1206
1216
|
}
|
|
@@ -1284,7 +1294,8 @@ export const ProviderProductEdition = ({
|
|
|
1284
1294
|
return;
|
|
1285
1295
|
} else if (user.is_retailer) {
|
|
1286
1296
|
if (product.id_order || product.orderId) {
|
|
1287
|
-
|
|
1297
|
+
setValidatedAll(true);
|
|
1298
|
+
showGlobalModal("error");
|
|
1288
1299
|
} else {
|
|
1289
1300
|
setDataGenericModal((prev) => ({
|
|
1290
1301
|
...prev,
|
|
@@ -1296,7 +1307,8 @@ export const ProviderProductEdition = ({
|
|
|
1296
1307
|
showGlobalModal("generic");
|
|
1297
1308
|
}
|
|
1298
1309
|
} else {
|
|
1299
|
-
|
|
1310
|
+
setValidatedAll(true);
|
|
1311
|
+
showGlobalModal("error");
|
|
1300
1312
|
}
|
|
1301
1313
|
}
|
|
1302
1314
|
};
|
|
@@ -1306,7 +1318,6 @@ export const ProviderProductEdition = ({
|
|
|
1306
1318
|
<HeaderTop
|
|
1307
1319
|
setHeaderTop={setHeaderTop}
|
|
1308
1320
|
withChat={location?.state?.withChat}
|
|
1309
|
-
chatType={location?.state?.chatType}
|
|
1310
1321
|
productSelected={productSelected}
|
|
1311
1322
|
token={token}
|
|
1312
1323
|
activeRetailer={activeRetailer}
|
|
@@ -1385,7 +1396,7 @@ export const ProviderProductEdition = ({
|
|
|
1385
1396
|
} else if (user.is_retailer) {
|
|
1386
1397
|
if (product.id_order || product.orderId) {
|
|
1387
1398
|
setValidatedAll(true);
|
|
1388
|
-
|
|
1399
|
+
showGlobalModal("error");
|
|
1389
1400
|
} else {
|
|
1390
1401
|
setDataGenericModal((prev) => ({
|
|
1391
1402
|
...prev,
|
|
@@ -1397,14 +1408,12 @@ export const ProviderProductEdition = ({
|
|
|
1397
1408
|
showGlobalModal("generic");
|
|
1398
1409
|
}
|
|
1399
1410
|
} else {
|
|
1400
|
-
setShowRejectModal(true);
|
|
1401
1411
|
setValidatedAll(true);
|
|
1412
|
+
showGlobalModal("error");
|
|
1402
1413
|
}
|
|
1403
1414
|
}}
|
|
1404
1415
|
approve={() => sendToEvaluation("A")}
|
|
1405
|
-
reject={() =>
|
|
1406
|
-
setShowRejectModal(true);
|
|
1407
|
-
}}
|
|
1416
|
+
reject={() => sendToEvaluation("R")}
|
|
1408
1417
|
/>
|
|
1409
1418
|
<FullTabsMenu
|
|
1410
1419
|
tabsSections={tabsSections}
|
|
@@ -1470,28 +1479,19 @@ export const ProviderProductEdition = ({
|
|
|
1470
1479
|
)}
|
|
1471
1480
|
{activeTab === "Ficha técnica" &&
|
|
1472
1481
|
(product?.datasheet_status !== "NS" ? (
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
groupData={services[0][activeRetailer.id].data}
|
|
1487
|
-
setUpdatedBoxData={(e) => {
|
|
1488
|
-
setBoxData(e);
|
|
1489
|
-
}}
|
|
1490
|
-
index={index}
|
|
1491
|
-
//enableActions={enableActions(product.version_status)} ADD THIS VALIDATION
|
|
1492
|
-
></InputGroup>
|
|
1493
|
-
))}
|
|
1494
|
-
</div>
|
|
1482
|
+
datasheets[0]?.data?.map((dataGroup, index) => (
|
|
1483
|
+
<InputGroup
|
|
1484
|
+
key={index + "-" + activeRetailer.name}
|
|
1485
|
+
articleId={product.id_article}
|
|
1486
|
+
version={version}
|
|
1487
|
+
activeSection={activeTab}
|
|
1488
|
+
inputGroup={dataGroup}
|
|
1489
|
+
dataInputs={datasheets[1]}
|
|
1490
|
+
updatedDatasheets={updatedDatasheets}
|
|
1491
|
+
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1492
|
+
//enableActions={enableActions(product.version_status)} ADD THIS VALIDATION
|
|
1493
|
+
/>
|
|
1494
|
+
))
|
|
1495
1495
|
) : (
|
|
1496
1496
|
<ScreenHeader
|
|
1497
1497
|
text={"No cuentas con este servicio"}
|
|
@@ -1507,7 +1507,6 @@ export const ProviderProductEdition = ({
|
|
|
1507
1507
|
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1508
1508
|
articleId={product?.id_article}
|
|
1509
1509
|
version={version}
|
|
1510
|
-
isShowbox={false}
|
|
1511
1510
|
dinamicHeight={true}
|
|
1512
1511
|
/>
|
|
1513
1512
|
) : (
|
|
@@ -1534,41 +1533,87 @@ export const ProviderProductEdition = ({
|
|
|
1534
1533
|
</>
|
|
1535
1534
|
)}
|
|
1536
1535
|
</div>
|
|
1537
|
-
{
|
|
1538
|
-
<div className="
|
|
1539
|
-
|
|
1540
|
-
<
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
<
|
|
1551
|
-
|
|
1552
|
-
|
|
1536
|
+
{isRevision() && getSectionStatus() ? (
|
|
1537
|
+
<div className="commentary-box">
|
|
1538
|
+
{!comment ? (
|
|
1539
|
+
<div className="commentary">
|
|
1540
|
+
<TagAndInput
|
|
1541
|
+
label={"Caja de Comentario"}
|
|
1542
|
+
inputType={"textarea"}
|
|
1543
|
+
inputCols={80}
|
|
1544
|
+
inputRows={4}
|
|
1545
|
+
inputId={"commentary-box"}
|
|
1546
|
+
index={0}
|
|
1547
|
+
/>
|
|
1548
|
+
<div className="buttons-box">
|
|
1549
|
+
<Button
|
|
1550
|
+
buttonType={"general-transparent-button"}
|
|
1551
|
+
label={"Enviar comentario"}
|
|
1552
|
+
onClick={(e) =>
|
|
1553
|
+
createComment(
|
|
1554
|
+
e,
|
|
1555
|
+
document.querySelector(
|
|
1556
|
+
"#description-commentary-box-0 .ql-container .ql-editor > p"
|
|
1557
|
+
).innerHTML,
|
|
1558
|
+
activeTab
|
|
1559
|
+
)
|
|
1560
|
+
}
|
|
1561
|
+
/>
|
|
1562
|
+
</div>
|
|
1563
|
+
</div>
|
|
1553
1564
|
) : (
|
|
1554
|
-
|
|
1555
|
-
<
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
iconSize={"big-image"}
|
|
1559
|
-
slidePosition={"top-slide"}
|
|
1565
|
+
<div className="feedback-box">
|
|
1566
|
+
<Commentary
|
|
1567
|
+
comment={comment.message}
|
|
1568
|
+
reviewed={crossComment}
|
|
1560
1569
|
/>
|
|
1561
1570
|
<Button
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1571
|
+
buttonType={"circular-button accept-button"}
|
|
1572
|
+
onClick={async () => {
|
|
1573
|
+
setCrossComment(true);
|
|
1574
|
+
commentRevised();
|
|
1565
1575
|
}}
|
|
1566
|
-
buttonType="general-default-button"
|
|
1567
|
-
label="Enviar a Content-oh!"
|
|
1568
1576
|
/>
|
|
1569
|
-
|
|
1577
|
+
</div>
|
|
1570
1578
|
)}
|
|
1571
1579
|
</div>
|
|
1580
|
+
) : (
|
|
1581
|
+
!revision && (
|
|
1582
|
+
<div className="required-inputs-message">
|
|
1583
|
+
<div>
|
|
1584
|
+
<p>
|
|
1585
|
+
Los atributos son requeridos por las plataformas de las
|
|
1586
|
+
cadenas, es muy importante completar los campos requeridos
|
|
1587
|
+
ya que pueden rechazar el producto por falta de información.
|
|
1588
|
+
</p>
|
|
1589
|
+
</div>
|
|
1590
|
+
{inCart ? (
|
|
1591
|
+
<button type="button">
|
|
1592
|
+
<Link to="/checkout">
|
|
1593
|
+
<p>Articulo en carrito</p>
|
|
1594
|
+
<p>Ir a checkout</p>
|
|
1595
|
+
</Link>
|
|
1596
|
+
</button>
|
|
1597
|
+
) : (
|
|
1598
|
+
<>
|
|
1599
|
+
<SliderToolTip
|
|
1600
|
+
infoIcon={InfoIcon}
|
|
1601
|
+
slidefront={slidefront}
|
|
1602
|
+
iconSize={"big-image"}
|
|
1603
|
+
slidePosition={"top-slide"}
|
|
1604
|
+
/>
|
|
1605
|
+
<Button
|
|
1606
|
+
onClick={() => {
|
|
1607
|
+
setShowContentohRequestModal &&
|
|
1608
|
+
setShowContentohRequestModal(true);
|
|
1609
|
+
}}
|
|
1610
|
+
buttonType="general-default-button"
|
|
1611
|
+
label="Enviar a Content-oh!"
|
|
1612
|
+
/>
|
|
1613
|
+
</>
|
|
1614
|
+
)}
|
|
1615
|
+
</div>
|
|
1616
|
+
)
|
|
1572
1617
|
)}
|
|
1573
1618
|
</div>
|
|
1574
1619
|
</div>
|
|
@@ -1611,48 +1656,6 @@ export const ProviderProductEdition = ({
|
|
|
1611
1656
|
jwt={token}
|
|
1612
1657
|
/>
|
|
1613
1658
|
)}
|
|
1614
|
-
{showRejectModal && (
|
|
1615
|
-
<Modal
|
|
1616
|
-
title={"Agregar mensaje de rechazo"}
|
|
1617
|
-
show={showRejectModal}
|
|
1618
|
-
customComponent={
|
|
1619
|
-
<TagAndInput
|
|
1620
|
-
inputType={"textarea"}
|
|
1621
|
-
inputId={"modal-message-box"}
|
|
1622
|
-
index={0}
|
|
1623
|
-
color={"white"}
|
|
1624
|
-
/>
|
|
1625
|
-
}
|
|
1626
|
-
buttons={[
|
|
1627
|
-
<ButtonV2
|
|
1628
|
-
key={"btn-Cancelar"}
|
|
1629
|
-
type={"white"}
|
|
1630
|
-
label={"Cancelar"}
|
|
1631
|
-
size={12}
|
|
1632
|
-
onClick={() => {
|
|
1633
|
-
setShowRejectModal(false);
|
|
1634
|
-
}}
|
|
1635
|
-
/>,
|
|
1636
|
-
<ButtonV2
|
|
1637
|
-
key={"btn-Aceptar"}
|
|
1638
|
-
type={"pink"}
|
|
1639
|
-
label={"Aceptar"}
|
|
1640
|
-
size={12}
|
|
1641
|
-
onClick={async () => {
|
|
1642
|
-
const body = document.querySelector(
|
|
1643
|
-
"#modal-message-box .ql-container .ql-editor > p"
|
|
1644
|
-
).innerHTML;
|
|
1645
|
-
const messages = [
|
|
1646
|
-
{ type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
|
|
1647
|
-
];
|
|
1648
|
-
await createComment(messages, activeRetailer.id);
|
|
1649
|
-
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
1650
|
-
setShowRejectModal(false);
|
|
1651
|
-
}}
|
|
1652
|
-
/>,
|
|
1653
|
-
]}
|
|
1654
|
-
/>
|
|
1655
|
-
)}
|
|
1656
1659
|
</Container>
|
|
1657
1660
|
);
|
|
1658
1661
|
};
|
|
@@ -107,10 +107,6 @@ export const Container = styled.div`
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
#modal-message-box {
|
|
111
|
-
width: 400px;
|
|
112
|
-
height: 100px;
|
|
113
|
-
}
|
|
114
110
|
.container {
|
|
115
111
|
width: 100%;
|
|
116
112
|
height: 100%;
|
|
@@ -119,4 +115,4 @@ export const Container = styled.div`
|
|
|
119
115
|
width: 100%;
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
|
-
`;
|
|
118
|
+
`;
|
|
@@ -16,7 +16,7 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI0OTMyY2JhZC1lYzcyLTRjYWItODgyNS0wMzY2M2RkNmE2ODIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY5Mjc1MDY0NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY5Mjc1NDI0NywiaWF0IjoxNjkyNzUwNjQ3LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.eqOY-gcS-W99WcEC632Ewckcg3WJzKoV9fIGcn1AkEE44_odGTcEk8fhVs-6_evIJkfShQOP0RFX0d2Dn31F-xFh5Lez6LvbT9F41_rAmMb3ELyRvdcz42V4eMw2IBH-FGrpGhSsJOHKV2T3WuUyZxPJu-C04ZAadfFSoNBBWnxX6SFk_eefcp9KghNmnELSSnWDh6DD1XDrWqEaLOVlQ5H7q4ARJqBo07KcXHIQo056anVud-inUMiX9KDTaorXdBCD0doWgv8NkYWSEpUS_Ctj-NG6vAled9g-6oLnC6DLR_ay6PRnAKGVNCv8bRZJL0GqF8ZnWk02svDHfUPJ0Q",
|
|
20
20
|
productSelected: {
|
|
21
21
|
services: {
|
|
22
22
|
datasheets: 1,
|
|
@@ -73,11 +73,7 @@ RetailerProductEditionDefault.args = {
|
|
|
73
73
|
upc: "7543453453",
|
|
74
74
|
},
|
|
75
75
|
location: {
|
|
76
|
-
product: { articleId:
|
|
77
|
-
state: {
|
|
78
|
-
withChat: true,
|
|
79
|
-
chatType: "product_status",
|
|
80
|
-
},
|
|
76
|
+
product: { articleId: 39290, versionId: 7 },
|
|
81
77
|
},
|
|
82
78
|
user: {
|
|
83
79
|
id_user: 37,
|