contentoh-components-library 21.3.68 → 21.3.69
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 +4 -0
- package/.env.production +3 -0
- package/dist/components/atoms/ButtonV2/styles.js +1 -1
- package/dist/components/atoms/Card/index.js +47 -7
- package/dist/components/atoms/Card/styles.js +3 -1
- package/dist/components/atoms/CheckBox/index.js +4 -2
- 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 +68 -11
- package/dist/components/molecules/StripeCardForm/StripeCardForm.stories.js +31 -0
- package/dist/components/molecules/StripeCardForm/index.js +81 -0
- package/dist/components/molecules/StripeCardForm/paymentForm.js +187 -0
- package/dist/components/molecules/StripeCardForm/styles.js +24 -0
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +30 -0
- package/dist/components/molecules/StripeCardSelector/index.js +103 -0
- package/dist/components/molecules/StripeCardSelector/styles.js +19 -0
- package/dist/components/molecules/StripeCardSelector/utils.js +56 -0
- package/dist/components/molecules/TabsMenu/index.js +128 -13
- package/dist/components/molecules/TagAndInput/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +21 -1
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +343 -191
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +48 -3
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/FullTabsMenu/index.js +27 -2
- package/dist/components/organisms/ImageDataTable/index.js +2 -0
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/SideModal/index.js +11 -0
- package/dist/components/organisms/SideModal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +171 -96
- package/dist/components/pages/ProviderProductEdition/index.js +226 -184
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +40 -28
- package/dist/components/pages/RetailerProductEdition/index.js +298 -273
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/index.js +51 -12
- package/package.json +1 -1
- package/src/components/atoms/ButtonV2/styles.js +1 -1
- package/src/components/atoms/Card/index.js +35 -2
- package/src/components/atoms/Card/styles.js +41 -5
- package/src/components/atoms/CheckBox/index.js +2 -0
- package/src/components/atoms/InputFormatter/styles.js +2 -1
- package/src/components/molecules/AvatarAndValidation/index.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GalleryElement/index.js +5 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/StripeCardForm/StripeCardForm.stories.js +13 -0
- package/src/components/molecules/StripeCardForm/index.js +33 -0
- package/src/components/molecules/StripeCardForm/paymentForm.js +121 -0
- package/src/components/molecules/StripeCardForm/styles.js +72 -0
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +12 -0
- package/src/components/molecules/StripeCardSelector/index.js +42 -0
- package/src/components/molecules/StripeCardSelector/styles.js +4 -0
- package/src/components/molecules/StripeCardSelector/utils.js +17 -0
- package/src/components/molecules/TabsMenu/index.js +126 -3
- package/src/components/molecules/TagAndInput/index.js +12 -8
- package/src/components/organisms/Chat/Chat.stories.js +21 -0
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +10 -2
- package/src/components/organisms/Chat/ContentChat/index.js +81 -6
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +47 -3
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/FullTabsMenu/index.js +28 -1
- package/src/components/organisms/ImageDataTable/index.js +3 -0
- package/src/components/organisms/InputGroup/index.js +4 -1
- package/src/components/organisms/Modal/styles.js +4 -1
- package/src/components/organisms/SideModal/SideModal.stories.js +23 -0
- package/src/components/organisms/SideModal/index.js +50 -0
- package/src/components/organisms/SideModal/styles.js +30 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +181 -98
- package/src/components/pages/ProviderProductEdition/index.js +163 -133
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +38 -26
- package/src/components/pages/RetailerProductEdition/index.js +142 -135
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/index.js +3 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
|
@@ -39,6 +39,9 @@ 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";
|
|
42
45
|
|
|
43
46
|
const reducerImages = (state, action) => {
|
|
44
47
|
let { values, attrForImgs, inputsByRetailer } = state;
|
|
@@ -214,12 +217,27 @@ export const ProviderProductEdition = ({
|
|
|
214
217
|
const isRetailer = user?.is_retailer;
|
|
215
218
|
const [loading, setLoading] = useState(true);
|
|
216
219
|
const [validatedAll, setValidatedAll] = useState(false);
|
|
220
|
+
const [showRejectModal, setShowRejectModal] = useState(false);
|
|
217
221
|
|
|
218
222
|
const [origin, setOrigin] = useState({
|
|
219
223
|
"Ficha técnica": null,
|
|
220
224
|
Descripción: null,
|
|
221
225
|
Imágenes: null,
|
|
222
226
|
});
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
//! ==========================================Daniel===========================================
|
|
230
|
+
/* ====================================== Cambios =================================*/
|
|
231
|
+
const [desc, setDesc] = useState([])
|
|
232
|
+
const [fich, setFich] = useState([])
|
|
233
|
+
const [imag, setImag] = useState([])
|
|
234
|
+
|
|
235
|
+
/* ------------------------------------- Cambios ----------------------------------*/
|
|
236
|
+
//! ==========================================Daniel===========================================
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
223
241
|
const [inCart, setInCart] = useState(false);
|
|
224
242
|
const [dataGenericModal, setDataGenericModal] = useState({
|
|
225
243
|
message: "¿Estás seguro de continuar?",
|
|
@@ -342,28 +360,6 @@ export const ProviderProductEdition = ({
|
|
|
342
360
|
(type) => {
|
|
343
361
|
const formatter = new Intl.ListFormat("es", { type: "conjunction" });
|
|
344
362
|
switch (type) {
|
|
345
|
-
case "error":
|
|
346
|
-
setGlobalModal({
|
|
347
|
-
message: `${activeTab} rechazada`,
|
|
348
|
-
detail: "Agrega tu comentarios para enviar el rechazo",
|
|
349
|
-
img: errorModal,
|
|
350
|
-
textArea: true,
|
|
351
|
-
button1: {
|
|
352
|
-
name: "Enviar",
|
|
353
|
-
action: (e) => {
|
|
354
|
-
const textArea = document.querySelector("#area");
|
|
355
|
-
if (textArea.value) {
|
|
356
|
-
textArea.style.border = "none";
|
|
357
|
-
createComment(e, textArea.value);
|
|
358
|
-
showGlobalModal("commentsSent");
|
|
359
|
-
validatedAll ? validateAll("R") : sendEvaluation("R");
|
|
360
|
-
} else {
|
|
361
|
-
textArea.style.border = "2px solid red";
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
|
-
});
|
|
366
|
-
break;
|
|
367
363
|
case "generic":
|
|
368
364
|
setGlobalModal(dataGenericModal);
|
|
369
365
|
break;
|
|
@@ -523,7 +519,9 @@ export const ProviderProductEdition = ({
|
|
|
523
519
|
);
|
|
524
520
|
setServicesData(parsedResponse);
|
|
525
521
|
}
|
|
526
|
-
|
|
522
|
+
retailers &&
|
|
523
|
+
!activeRetailer.id &&
|
|
524
|
+
setActiveRetailer(active ? active : retailers[0]);
|
|
527
525
|
};
|
|
528
526
|
|
|
529
527
|
const isRevision = () => {
|
|
@@ -599,7 +597,7 @@ export const ProviderProductEdition = ({
|
|
|
599
597
|
});
|
|
600
598
|
}
|
|
601
599
|
setProduct(productTemp);
|
|
602
|
-
setActivePercentage(retailers[0]?.percentage);
|
|
600
|
+
retailers && setActivePercentage(retailers[0]?.percentage);
|
|
603
601
|
}, [percentages]);
|
|
604
602
|
|
|
605
603
|
const loadInputs = () => {
|
|
@@ -840,32 +838,19 @@ export const ProviderProductEdition = ({
|
|
|
840
838
|
}
|
|
841
839
|
};
|
|
842
840
|
|
|
843
|
-
const createComment = async (
|
|
844
|
-
let concept = "";
|
|
845
|
-
switch (activeTab) {
|
|
846
|
-
case "Ficha técnica":
|
|
847
|
-
concept = "datasheet";
|
|
848
|
-
break;
|
|
849
|
-
case "Imágenes":
|
|
850
|
-
concept = "images";
|
|
851
|
-
break;
|
|
852
|
-
|
|
853
|
-
default:
|
|
854
|
-
concept = "description";
|
|
855
|
-
break;
|
|
856
|
-
}
|
|
841
|
+
const createComment = async (messages = [], retailerId) => {
|
|
857
842
|
const data = {
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
865
|
-
headers: {
|
|
866
|
-
Authorization: token,
|
|
843
|
+
paramsBody: {
|
|
844
|
+
id: product.article.id_article || productEdit.ArticleId,
|
|
845
|
+
version: version,
|
|
846
|
+
items: messages,
|
|
847
|
+
retailerId: retailerId,
|
|
848
|
+
status: product.status || productEdit.product.status,
|
|
867
849
|
},
|
|
868
|
-
|
|
850
|
+
paramsHeader: { Authorization: token },
|
|
851
|
+
};
|
|
852
|
+
setMessage("");
|
|
853
|
+
return sendMessage(data);
|
|
869
854
|
};
|
|
870
855
|
|
|
871
856
|
useEffect(() => {
|
|
@@ -1065,6 +1050,27 @@ export const ProviderProductEdition = ({
|
|
|
1065
1050
|
const { newArticleStatus, newServiceStatus, newStatus } = JSON.parse(
|
|
1066
1051
|
res.data.body
|
|
1067
1052
|
);
|
|
1053
|
+
|
|
1054
|
+
const message = createMessage(
|
|
1055
|
+
product.retailers || product.retailersAvailable,
|
|
1056
|
+
activeRetailer.id,
|
|
1057
|
+
product[sectionStatusKey],
|
|
1058
|
+
newStatus,
|
|
1059
|
+
activeTab
|
|
1060
|
+
);
|
|
1061
|
+
|
|
1062
|
+
const messageData = {
|
|
1063
|
+
paramsBody: {
|
|
1064
|
+
id: product.article.id_article || productEdit.ArticleId,
|
|
1065
|
+
version: version,
|
|
1066
|
+
items: [{ type: "status", value: message }],
|
|
1067
|
+
retailerId: activeRetailer.id,
|
|
1068
|
+
status: product.status || productEdit.product.status,
|
|
1069
|
+
},
|
|
1070
|
+
paramsHeader: { Authorization: token },
|
|
1071
|
+
};
|
|
1072
|
+
await sendMessage(messageData);
|
|
1073
|
+
|
|
1068
1074
|
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1069
1075
|
const retailerStatusCopy = { ...retailerStatus };
|
|
1070
1076
|
retailerStatusCopy[activeRetailer.id][concept] = newStatus;
|
|
@@ -1096,6 +1102,7 @@ export const ProviderProductEdition = ({
|
|
|
1096
1102
|
result,
|
|
1097
1103
|
isAproved: result === "A",
|
|
1098
1104
|
};
|
|
1105
|
+
const messages = [];
|
|
1099
1106
|
servicesData?.forEach((ret) => {
|
|
1100
1107
|
const { service, id_retailer } = ret;
|
|
1101
1108
|
let data = {};
|
|
@@ -1112,6 +1119,18 @@ export const ProviderProductEdition = ({
|
|
|
1112
1119
|
},
|
|
1113
1120
|
})
|
|
1114
1121
|
);
|
|
1122
|
+
if (product[`${ret.service}_status`] !== "NS") {
|
|
1123
|
+
const message = createMessage(
|
|
1124
|
+
product.retailers,
|
|
1125
|
+
ret.id_retailer,
|
|
1126
|
+
product[`${ret.service}_status`],
|
|
1127
|
+
`${result}A`,
|
|
1128
|
+
ret.service
|
|
1129
|
+
);
|
|
1130
|
+
messages.push(
|
|
1131
|
+
createComment([{ type: "status", value: message }], ret.id_retailer)
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1115
1134
|
});
|
|
1116
1135
|
await Promise.all(evaluationArray);
|
|
1117
1136
|
const userType = user.is_retailer === 1 ? "CA" : "P";
|
|
@@ -1151,6 +1170,7 @@ export const ProviderProductEdition = ({
|
|
|
1151
1170
|
product: productTemp,
|
|
1152
1171
|
})
|
|
1153
1172
|
);
|
|
1173
|
+
await Promise.all(messages);
|
|
1154
1174
|
|
|
1155
1175
|
await loadData();
|
|
1156
1176
|
} catch (error) {
|
|
@@ -1239,7 +1259,6 @@ export const ProviderProductEdition = ({
|
|
|
1239
1259
|
},
|
|
1240
1260
|
];
|
|
1241
1261
|
const sendToEvaluation = (result) => {
|
|
1242
|
-
console.log({ result });
|
|
1243
1262
|
if (result === "A") {
|
|
1244
1263
|
if (
|
|
1245
1264
|
origin[activeTab] === "RequestWithoutContentoh" &&
|
|
@@ -1272,15 +1291,14 @@ export const ProviderProductEdition = ({
|
|
|
1272
1291
|
}
|
|
1273
1292
|
} else {
|
|
1274
1293
|
if (
|
|
1275
|
-
|
|
1294
|
+
originProp === "RequestWithoutContentoh" &&
|
|
1276
1295
|
!user.is_retailer &&
|
|
1277
1296
|
(!product.id_order || !product.orderId)
|
|
1278
1297
|
) {
|
|
1279
1298
|
return;
|
|
1280
1299
|
} else if (user.is_retailer) {
|
|
1281
1300
|
if (product.id_order || product.orderId) {
|
|
1282
|
-
|
|
1283
|
-
showGlobalModal("error");
|
|
1301
|
+
sendEvaluation("R");
|
|
1284
1302
|
} else {
|
|
1285
1303
|
setDataGenericModal((prev) => ({
|
|
1286
1304
|
...prev,
|
|
@@ -1292,8 +1310,7 @@ export const ProviderProductEdition = ({
|
|
|
1292
1310
|
showGlobalModal("generic");
|
|
1293
1311
|
}
|
|
1294
1312
|
} else {
|
|
1295
|
-
|
|
1296
|
-
showGlobalModal("error");
|
|
1313
|
+
sendEvaluation("R");
|
|
1297
1314
|
}
|
|
1298
1315
|
}
|
|
1299
1316
|
};
|
|
@@ -1302,6 +1319,7 @@ export const ProviderProductEdition = ({
|
|
|
1302
1319
|
<HeaderTop
|
|
1303
1320
|
setHeaderTop={setHeaderTop}
|
|
1304
1321
|
withChat={location?.state?.withChat}
|
|
1322
|
+
chatType={location?.state?.chatType}
|
|
1305
1323
|
productSelected={productSelected}
|
|
1306
1324
|
token={token}
|
|
1307
1325
|
activeRetailer={activeRetailer}
|
|
@@ -1341,7 +1359,7 @@ export const ProviderProductEdition = ({
|
|
|
1341
1359
|
showApproveRejectAll={isRevision() && getSectionStatus()}
|
|
1342
1360
|
approveAll={() => {
|
|
1343
1361
|
if (
|
|
1344
|
-
|
|
1362
|
+
originProp === "RequestWithoutContentoh" &&
|
|
1345
1363
|
!user.is_retailer &&
|
|
1346
1364
|
(!product.id_order || !product.orderId)
|
|
1347
1365
|
) {
|
|
@@ -1372,7 +1390,7 @@ export const ProviderProductEdition = ({
|
|
|
1372
1390
|
}}
|
|
1373
1391
|
rejectAll={() => {
|
|
1374
1392
|
if (
|
|
1375
|
-
|
|
1393
|
+
originProp === "RequestWithoutContentoh" &&
|
|
1376
1394
|
!user.is_retailer &&
|
|
1377
1395
|
(!product.id_order || !product.orderId)
|
|
1378
1396
|
) {
|
|
@@ -1380,7 +1398,7 @@ export const ProviderProductEdition = ({
|
|
|
1380
1398
|
} else if (user.is_retailer) {
|
|
1381
1399
|
if (product.id_order || product.orderId) {
|
|
1382
1400
|
setValidatedAll(true);
|
|
1383
|
-
|
|
1401
|
+
setShowRejectModal(true);
|
|
1384
1402
|
} else {
|
|
1385
1403
|
setDataGenericModal((prev) => ({
|
|
1386
1404
|
...prev,
|
|
@@ -1392,12 +1410,14 @@ export const ProviderProductEdition = ({
|
|
|
1392
1410
|
showGlobalModal("generic");
|
|
1393
1411
|
}
|
|
1394
1412
|
} else {
|
|
1413
|
+
setShowRejectModal(true);
|
|
1395
1414
|
setValidatedAll(true);
|
|
1396
|
-
showGlobalModal("error");
|
|
1397
1415
|
}
|
|
1398
1416
|
}}
|
|
1399
1417
|
approve={() => sendToEvaluation("A")}
|
|
1400
|
-
reject={() =>
|
|
1418
|
+
reject={() => {
|
|
1419
|
+
setShowRejectModal(true);
|
|
1420
|
+
}}
|
|
1401
1421
|
/>
|
|
1402
1422
|
<FullTabsMenu
|
|
1403
1423
|
tabsSections={tabsSections}
|
|
@@ -1419,6 +1439,20 @@ export const ProviderProductEdition = ({
|
|
|
1419
1439
|
isRetailer={isRetailer}
|
|
1420
1440
|
showSaveButton={enableActions(product.version_status)}
|
|
1421
1441
|
version={version}
|
|
1442
|
+
|
|
1443
|
+
desc={ desc }
|
|
1444
|
+
setDesc={ setDesc }
|
|
1445
|
+
fich={fich}
|
|
1446
|
+
setFich={setFich}
|
|
1447
|
+
imag={imag}
|
|
1448
|
+
setImag={setImag}
|
|
1449
|
+
updatedDescriptions={updatedDescriptions}
|
|
1450
|
+
updatedDatasheets={updatedDatasheets}
|
|
1451
|
+
selectedImages={selectedImages}
|
|
1452
|
+
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1453
|
+
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1454
|
+
setSelectedImages={setSelectedImages}
|
|
1455
|
+
|
|
1422
1456
|
setShowVersionSelector={setShowVersionSelector}
|
|
1423
1457
|
onClickSave={() => {
|
|
1424
1458
|
switch (activeTab) {
|
|
@@ -1509,87 +1543,41 @@ export const ProviderProductEdition = ({
|
|
|
1509
1543
|
</>
|
|
1510
1544
|
)}
|
|
1511
1545
|
</div>
|
|
1512
|
-
{isRevision() && getSectionStatus()
|
|
1513
|
-
<div className="
|
|
1514
|
-
|
|
1515
|
-
<
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
<
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
onClick={(e) =>
|
|
1529
|
-
createComment(
|
|
1530
|
-
e,
|
|
1531
|
-
document.querySelector(
|
|
1532
|
-
"#description-commentary-box-0 .ql-container .ql-editor > p"
|
|
1533
|
-
).innerHTML,
|
|
1534
|
-
activeTab
|
|
1535
|
-
)
|
|
1536
|
-
}
|
|
1537
|
-
/>
|
|
1538
|
-
</div>
|
|
1539
|
-
</div>
|
|
1546
|
+
{!(isRevision() && getSectionStatus()) && !revision && (
|
|
1547
|
+
<div className="required-inputs-message">
|
|
1548
|
+
<div>
|
|
1549
|
+
<p>
|
|
1550
|
+
Los atributos son requeridos por las plataformas de las
|
|
1551
|
+
cadenas, es muy importante completar los campos requeridos ya
|
|
1552
|
+
que pueden rechazar el producto por falta de información.
|
|
1553
|
+
</p>
|
|
1554
|
+
</div>
|
|
1555
|
+
{inCart ? (
|
|
1556
|
+
<button type="button">
|
|
1557
|
+
<Link to="/checkout">
|
|
1558
|
+
<p>Articulo en carrito</p>
|
|
1559
|
+
<p>Ir a checkout</p>
|
|
1560
|
+
</Link>
|
|
1561
|
+
</button>
|
|
1540
1562
|
) : (
|
|
1541
|
-
|
|
1542
|
-
<
|
|
1543
|
-
|
|
1544
|
-
|
|
1563
|
+
<>
|
|
1564
|
+
<SliderToolTip
|
|
1565
|
+
infoIcon={InfoIcon}
|
|
1566
|
+
slidefront={slidefront}
|
|
1567
|
+
iconSize={"big-image"}
|
|
1568
|
+
slidePosition={"top-slide"}
|
|
1545
1569
|
/>
|
|
1546
1570
|
<Button
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
commentRevised();
|
|
1571
|
+
onClick={() => {
|
|
1572
|
+
setShowContentohRequestModal &&
|
|
1573
|
+
setShowContentohRequestModal(true);
|
|
1551
1574
|
}}
|
|
1575
|
+
buttonType="general-default-button"
|
|
1576
|
+
label="Enviar a Content-oh!"
|
|
1552
1577
|
/>
|
|
1553
|
-
|
|
1578
|
+
</>
|
|
1554
1579
|
)}
|
|
1555
1580
|
</div>
|
|
1556
|
-
) : (
|
|
1557
|
-
!revision && (
|
|
1558
|
-
<div className="required-inputs-message">
|
|
1559
|
-
<div>
|
|
1560
|
-
<p>
|
|
1561
|
-
Los atributos son requeridos por las plataformas de las
|
|
1562
|
-
cadenas, es muy importante completar los campos requeridos
|
|
1563
|
-
ya que pueden rechazar el producto por falta de información.
|
|
1564
|
-
</p>
|
|
1565
|
-
</div>
|
|
1566
|
-
{inCart ? (
|
|
1567
|
-
<button type="button">
|
|
1568
|
-
<Link to="/checkout">
|
|
1569
|
-
<p>Articulo en carrito</p>
|
|
1570
|
-
<p>Ir a checkout</p>
|
|
1571
|
-
</Link>
|
|
1572
|
-
</button>
|
|
1573
|
-
) : (
|
|
1574
|
-
<>
|
|
1575
|
-
<SliderToolTip
|
|
1576
|
-
infoIcon={InfoIcon}
|
|
1577
|
-
slidefront={slidefront}
|
|
1578
|
-
iconSize={"big-image"}
|
|
1579
|
-
slidePosition={"top-slide"}
|
|
1580
|
-
/>
|
|
1581
|
-
<Button
|
|
1582
|
-
onClick={() => {
|
|
1583
|
-
setShowContentohRequestModal &&
|
|
1584
|
-
setShowContentohRequestModal(true);
|
|
1585
|
-
}}
|
|
1586
|
-
buttonType="general-default-button"
|
|
1587
|
-
label="Enviar a Content-oh!"
|
|
1588
|
-
/>
|
|
1589
|
-
</>
|
|
1590
|
-
)}
|
|
1591
|
-
</div>
|
|
1592
|
-
)
|
|
1593
1581
|
)}
|
|
1594
1582
|
</div>
|
|
1595
1583
|
</div>
|
|
@@ -1632,6 +1620,48 @@ export const ProviderProductEdition = ({
|
|
|
1632
1620
|
jwt={token}
|
|
1633
1621
|
/>
|
|
1634
1622
|
)}
|
|
1623
|
+
{showRejectModal && (
|
|
1624
|
+
<Modal
|
|
1625
|
+
title={"Agregar mensaje de rechazo"}
|
|
1626
|
+
show={showRejectModal}
|
|
1627
|
+
customComponent={
|
|
1628
|
+
<TagAndInput
|
|
1629
|
+
inputType={"textarea"}
|
|
1630
|
+
inputId={"modal-message-box"}
|
|
1631
|
+
index={0}
|
|
1632
|
+
color={"white"}
|
|
1633
|
+
/>
|
|
1634
|
+
}
|
|
1635
|
+
buttons={[
|
|
1636
|
+
<ButtonV2
|
|
1637
|
+
key={"btn-Cancelar"}
|
|
1638
|
+
type={"white"}
|
|
1639
|
+
label={"Cancelar"}
|
|
1640
|
+
size={12}
|
|
1641
|
+
onClick={() => {
|
|
1642
|
+
setShowRejectModal(false);
|
|
1643
|
+
}}
|
|
1644
|
+
/>,
|
|
1645
|
+
<ButtonV2
|
|
1646
|
+
key={"btn-Aceptar"}
|
|
1647
|
+
type={"pink"}
|
|
1648
|
+
label={"Aceptar"}
|
|
1649
|
+
size={12}
|
|
1650
|
+
onClick={async () => {
|
|
1651
|
+
const body = document.querySelector(
|
|
1652
|
+
"#modal-message-box .ql-container .ql-editor > p"
|
|
1653
|
+
).innerHTML;
|
|
1654
|
+
const messages = [
|
|
1655
|
+
{ type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
|
|
1656
|
+
];
|
|
1657
|
+
await createComment(messages, activeRetailer.id);
|
|
1658
|
+
validatedAll ? validateAll("R") : sendToEvaluation("R");
|
|
1659
|
+
setShowRejectModal(false);
|
|
1660
|
+
}}
|
|
1661
|
+
/>,
|
|
1662
|
+
]}
|
|
1663
|
+
/>
|
|
1664
|
+
)}
|
|
1635
1665
|
</Container>
|
|
1636
1666
|
);
|
|
1637
1667
|
};
|
|
@@ -107,6 +107,10 @@ export const Container = styled.div`
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
+
#modal-message-box {
|
|
111
|
+
width: 400px;
|
|
112
|
+
height: 100px;
|
|
113
|
+
}
|
|
110
114
|
.container {
|
|
111
115
|
width: 100%;
|
|
112
116
|
height: 100%;
|
|
@@ -115,4 +119,4 @@ export const Container = styled.div`
|
|
|
115
119
|
width: 100%;
|
|
116
120
|
}
|
|
117
121
|
}
|
|
118
|
-
`;
|
|
122
|
+
`;
|
|
@@ -16,26 +16,41 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI5YTIxMzEyOC02NDgyLTRjMTYtYTRiNi02ZTY0ZjIyNWIxYmQiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6IjlhMjEzMTI4LTY0ODItNGMxNi1hNGI2LTZlNjRmMjI1YjFiZCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5OGE0NzYxMy04ZGIyLTRlZjUtYjA0Mi01ZDU3MWRkZjIwMWIiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4Mzg3NTIyNiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY4Mzg3ODgyNiwiaWF0IjoxNjgzODc1MjI2LCJlbWFpbCI6ImlzbWFlbDk3bG9wZXpAZ21haWwuY29tIn0.EtgmT_THMx-Zy_zB5yZK4gz6TXNTVVJEKFt5X0JK2UkGVrp_q_92YCEuejS4n976fyTez0jkwOee6IkVHLV71uZWRBDFt-3Yw4ZxfsZYPNJWhoHXGNxhMU8MCkSntfu597esBTk-VsUpstT5R7L-WJfN8viE7R-qVo-42RlPTG0TFrWA9q0oTcqjv8vbxLpOBUjiEpjmqRhg4blJZwgkGNta6MOlw1vfmisOVbo9wMvqwnCZ9xx9KMKoH9U4uNObK_JomjbvPmTmkcUXsE-wGSD7XcoSwtuhBngLC7-jiu1u8MvL_ff5Z0Qp70sSpLdUglcSS8d1Xf7j_fcZuJ5jKA",
|
|
20
20
|
productSelected: {
|
|
21
|
-
orderId:
|
|
22
|
-
status: "
|
|
23
|
-
datasheet_status: "
|
|
21
|
+
orderId: 14606,
|
|
22
|
+
status: "RA",
|
|
23
|
+
datasheet_status: "RA",
|
|
24
24
|
prio: "none",
|
|
25
|
-
version:
|
|
26
|
-
description_status: "
|
|
27
|
-
images_status: "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
},
|
|
39
54
|
},
|
|
40
55
|
article: {
|
|
41
56
|
category: "Puertas y Ventanas|Molduras|Molduras Madera Blanda",
|
|
@@ -65,16 +80,13 @@ RetailerProductEditionDefault.args = {
|
|
|
65
80
|
name: "The Home Depot Merchants",
|
|
66
81
|
},
|
|
67
82
|
],
|
|
68
|
-
statusByRetailer: {
|
|
69
|
-
58: {
|
|
70
|
-
datasheet: "SAC",
|
|
71
|
-
description: "SAC",
|
|
72
|
-
images: "SAC",
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
83
|
},
|
|
76
84
|
location: {
|
|
77
|
-
product: { articleId:
|
|
85
|
+
product: { articleId: 354, versionId: 3 },
|
|
86
|
+
state: {
|
|
87
|
+
withChat: true,
|
|
88
|
+
chatType: "product_status",
|
|
89
|
+
},
|
|
78
90
|
},
|
|
79
91
|
user: {
|
|
80
92
|
id_user: 51,
|