contentoh-components-library 21.3.81 → 21.3.83
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 +0 -5
- package/.env.production +0 -3
- package/dist/components/atoms/ButtonV2/styles.js +1 -1
- 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 -4
- package/dist/components/atoms/GeneralInput/index.js +20 -24
- package/dist/components/atoms/InputFormatter/index.js +16 -14
- 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/TabsMenu/index.js +48 -22
- package/dist/components/molecules/TagAndInput/index.js +3 -1
- package/dist/components/organisms/Chat/Chat.stories.js +1 -21
- 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 +200 -348
- package/dist/components/organisms/Chat/Footer/index.js +39 -48
- package/dist/components/organisms/Chat/index.js +3 -48
- package/dist/components/organisms/FullProductNameHeader/index.js +2 -2
- package/dist/components/organisms/FullTabsMenu/index.js +12 -2
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +96 -171
- package/dist/components/pages/ProviderProductEdition/index.js +196 -189
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +28 -40
- package/dist/components/pages/RetailerProductEdition/index.js +290 -262
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +2 -61
- package/dist/index.js +12 -51
- package/package.json +1 -3
- package/src/components/atoms/ButtonV2/styles.js +1 -1
- 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 +0 -2
- package/src/components/atoms/GeneralInput/index.js +21 -20
- package/src/components/atoms/InputFormatter/index.js +18 -14
- 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/TabsMenu/index.js +88 -65
- package/src/components/molecules/TagAndInput/index.js +12 -10
- package/src/components/organisms/Chat/Chat.stories.js +0 -21
- 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 +15 -86
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +3 -47
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/organisms/FullTabsMenu/index.js +16 -4
- package/src/components/organisms/Modal/styles.js +1 -4
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +98 -181
- package/src/components/pages/ProviderProductEdition/index.js +142 -134
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +26 -38
- package/src/components/pages/RetailerProductEdition/index.js +148 -111
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/index.js +0 -3
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
- 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/SideModal/SideModal.stories.js +0 -23
- package/src/components/organisms/SideModal/index.js +0 -50
- package/src/components/organisms/SideModal/styles.js +0 -30
|
@@ -24,20 +24,15 @@ import descriptionSent from "../../../assets/images/modalsSVGs/descriptionSent.s
|
|
|
24
24
|
import imagesSent from "../../../assets/images/modalsSVGs/uploadingImages.svg";
|
|
25
25
|
import { TagAndInput } from "../../molecules/TagAndInput/index";
|
|
26
26
|
import { Button } from "../../atoms/GeneralButton";
|
|
27
|
+
import { Commentary } from "../../atoms/Commentary";
|
|
27
28
|
import { GenericModal } from "../../atoms/GenericModal";
|
|
28
29
|
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
29
30
|
import { Loading } from "../../atoms/Loading";
|
|
30
31
|
import succes from "../../../assets/images/genericModal/genericModalCheck.svg";
|
|
32
|
+
import errorModal from "../../../assets/images/genericModal/errorModal.svg";
|
|
31
33
|
import { VersionSelector } from "../../organisms/VersionSelector";
|
|
32
34
|
import { useCloseModal } from "../../../global-files/customHooks";
|
|
33
|
-
import {
|
|
34
|
-
getAuditVersion,
|
|
35
|
-
getInputsData,
|
|
36
|
-
createMessage,
|
|
37
|
-
sendMessage,
|
|
38
|
-
} from "./utils";
|
|
39
|
-
import { Modal } from "../../organisms/Modal";
|
|
40
|
-
import { ButtonV2 } from "../../atoms/ButtonV2";
|
|
35
|
+
import { getAuditVersion, getInputsData } from "./utils";
|
|
41
36
|
|
|
42
37
|
const reducerImages = (state, action) => {
|
|
43
38
|
let { values, attrForImgs, inputsByRetailer } = state;
|
|
@@ -137,7 +132,6 @@ export const RetailerProductEdition = ({
|
|
|
137
132
|
const [datasheets, setDatasheets] = useState([]);
|
|
138
133
|
const [images, setImages] = useReducer(reducerImages, {});
|
|
139
134
|
const [showModal, setShowModal] = useState(false);
|
|
140
|
-
const [showRejectModal, setShowRejectModal] = useState(false);
|
|
141
135
|
const { getRootProps, getInputProps } = useDropzone({
|
|
142
136
|
accept: "image/*",
|
|
143
137
|
noKeyboard: true,
|
|
@@ -224,7 +218,10 @@ export const RetailerProductEdition = ({
|
|
|
224
218
|
const [auditDescriptions, setAuditDescriptions] = useState([]);
|
|
225
219
|
const [auditImages, setAuditImages] = useState([]);
|
|
226
220
|
const [compare, setCompare] = useState(false);
|
|
227
|
-
|
|
221
|
+
|
|
222
|
+
const [desc, setDesc] = useState([])
|
|
223
|
+
const [fich, setFich] = useState([])
|
|
224
|
+
const [imag, setImag] = useState([])
|
|
228
225
|
|
|
229
226
|
useEffect(async () => {
|
|
230
227
|
const { id_article } = product?.article || {};
|
|
@@ -862,25 +859,6 @@ export const RetailerProductEdition = ({
|
|
|
862
859
|
const { newStatus, newOrderStatus, newArticleStatus } = JSON.parse(
|
|
863
860
|
res.data.body
|
|
864
861
|
);
|
|
865
|
-
const messageToChat = createMessage(
|
|
866
|
-
product.retailers,
|
|
867
|
-
activeRetailer.id,
|
|
868
|
-
evalStatus,
|
|
869
|
-
newStatus,
|
|
870
|
-
activeTab
|
|
871
|
-
);
|
|
872
|
-
|
|
873
|
-
const data = {
|
|
874
|
-
paramsBody: {
|
|
875
|
-
id: product.article.id_article,
|
|
876
|
-
version: version,
|
|
877
|
-
items: [{ type: "status", value: messageToChat }],
|
|
878
|
-
retailerId: activeRetailer.id,
|
|
879
|
-
status: product.status,
|
|
880
|
-
},
|
|
881
|
-
paramsHeader: { Authorization: token },
|
|
882
|
-
};
|
|
883
|
-
await sendMessage(data);
|
|
884
862
|
if (newOrderStatus) productTemp.status = newArticleStatus[articleId];
|
|
885
863
|
productTemp[`${concept}_status`] = newStatus;
|
|
886
864
|
await loadData();
|
|
@@ -923,19 +901,35 @@ export const RetailerProductEdition = ({
|
|
|
923
901
|
return product?.article[`id_auditor`] === user.id_user;
|
|
924
902
|
};
|
|
925
903
|
|
|
926
|
-
const createComment = async (
|
|
904
|
+
const createComment = async (e, body, tab) => {
|
|
905
|
+
let concept = "";
|
|
906
|
+
switch (activeTab) {
|
|
907
|
+
case "Ficha técnica":
|
|
908
|
+
concept = "datasheet";
|
|
909
|
+
break;
|
|
910
|
+
case "Imágenes":
|
|
911
|
+
concept = "images";
|
|
912
|
+
break;
|
|
913
|
+
|
|
914
|
+
default:
|
|
915
|
+
concept = "description";
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
927
918
|
const data = {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
status: product.status,
|
|
934
|
-
},
|
|
935
|
-
paramsHeader: { Authorization: token },
|
|
919
|
+
articleId: product?.article?.id_article,
|
|
920
|
+
orderId: product?.orderId,
|
|
921
|
+
message: body?.replace(/<.*?\/?>/gm, ""),
|
|
922
|
+
concept: concept,
|
|
923
|
+
version: version,
|
|
936
924
|
};
|
|
925
|
+
await axios.post(`${process.env.REACT_APP_COMMENTS_ENDPOINT}`, data, {
|
|
926
|
+
headers: {
|
|
927
|
+
Authorization: token,
|
|
928
|
+
},
|
|
929
|
+
});
|
|
930
|
+
await getComments(tab);
|
|
937
931
|
setMessage("");
|
|
938
|
-
|
|
932
|
+
setComponentsArray([]);
|
|
939
933
|
};
|
|
940
934
|
|
|
941
935
|
const getRequired = (services) => {
|
|
@@ -1217,8 +1211,6 @@ export const RetailerProductEdition = ({
|
|
|
1217
1211
|
break;
|
|
1218
1212
|
}
|
|
1219
1213
|
|
|
1220
|
-
const messages = [];
|
|
1221
|
-
|
|
1222
1214
|
servicesData?.forEach((ret) => {
|
|
1223
1215
|
if (conceptArray.includes(ret.service)) {
|
|
1224
1216
|
let data = {
|
|
@@ -1229,21 +1221,6 @@ export const RetailerProductEdition = ({
|
|
|
1229
1221
|
evalStatus: ret.status,
|
|
1230
1222
|
retailerId: ret.id_retailer,
|
|
1231
1223
|
};
|
|
1232
|
-
if (product[`${ret.service}_status`] !== "NS") {
|
|
1233
|
-
const message = createMessage(
|
|
1234
|
-
product.retailers,
|
|
1235
|
-
ret.id_retailer,
|
|
1236
|
-
product[`${ret.service}_status`],
|
|
1237
|
-
`${result}A`,
|
|
1238
|
-
ret.service
|
|
1239
|
-
);
|
|
1240
|
-
messages.push(
|
|
1241
|
-
createComment(
|
|
1242
|
-
[{ type: "status", value: message }],
|
|
1243
|
-
ret.id_retailer
|
|
1244
|
-
)
|
|
1245
|
-
);
|
|
1246
|
-
}
|
|
1247
1224
|
evaluationArray.push(
|
|
1248
1225
|
axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
1249
1226
|
headers: {
|
|
@@ -1253,19 +1230,19 @@ export const RetailerProductEdition = ({
|
|
|
1253
1230
|
);
|
|
1254
1231
|
}
|
|
1255
1232
|
});
|
|
1233
|
+
|
|
1256
1234
|
await Promise.all(evaluationArray);
|
|
1257
1235
|
|
|
1258
1236
|
const productTemp = product;
|
|
1259
1237
|
productTemp.status = `${result}A`;
|
|
1260
1238
|
productTemp.datasheet_status =
|
|
1261
|
-
productTemp.datasheet_status === "
|
|
1239
|
+
productTemp.datasheet_status === "NA" ? "NA" : `${result}A`;
|
|
1262
1240
|
productTemp.description_status =
|
|
1263
|
-
productTemp.description_status === "
|
|
1241
|
+
productTemp.description_status === "NA" ? "NA" : `${result}A`;
|
|
1264
1242
|
productTemp.images_status =
|
|
1265
|
-
productTemp.images_status === "
|
|
1243
|
+
productTemp.images_status === "NA" ? "NA" : `${result}A`;
|
|
1266
1244
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1267
1245
|
setProduct(productTemp);
|
|
1268
|
-
const messagesResponse = await Promise.all(messages);
|
|
1269
1246
|
|
|
1270
1247
|
await loadData();
|
|
1271
1248
|
} catch (error) {
|
|
@@ -1281,10 +1258,8 @@ export const RetailerProductEdition = ({
|
|
|
1281
1258
|
setCompare={setCompare}
|
|
1282
1259
|
isAuditor={[1, 6].includes(user.id_role)}
|
|
1283
1260
|
withChat={location?.state?.withChat}
|
|
1284
|
-
|
|
1285
|
-
productSelected={product}
|
|
1261
|
+
productSelected={productSelected}
|
|
1286
1262
|
token={token}
|
|
1287
|
-
activeRetailer={activeRetailer}
|
|
1288
1263
|
/>
|
|
1289
1264
|
<div className="data-container">
|
|
1290
1265
|
<div className="image-data-panel">
|
|
@@ -1324,7 +1299,36 @@ export const RetailerProductEdition = ({
|
|
|
1324
1299
|
sendToFacilitator("A");
|
|
1325
1300
|
}}
|
|
1326
1301
|
reject={() => {
|
|
1327
|
-
|
|
1302
|
+
sendToFacilitator("R");
|
|
1303
|
+
setMessage("Rechazado");
|
|
1304
|
+
setComponentsArray([
|
|
1305
|
+
<img src={errorModal} />,
|
|
1306
|
+
<ScreenHeader
|
|
1307
|
+
text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1308
|
+
headerType={"input-name-header"}
|
|
1309
|
+
color={"white"}
|
|
1310
|
+
/>,
|
|
1311
|
+
<TagAndInput
|
|
1312
|
+
label={"Caja de Comentario"}
|
|
1313
|
+
inputType={"textarea"}
|
|
1314
|
+
inputId={"modal-commentary-box"}
|
|
1315
|
+
index={0}
|
|
1316
|
+
color={"white"}
|
|
1317
|
+
/>,
|
|
1318
|
+
<Button
|
|
1319
|
+
buttonType={"general-default-button"}
|
|
1320
|
+
label={"Enviar comentario"}
|
|
1321
|
+
onClick={(e) =>
|
|
1322
|
+
createComment(
|
|
1323
|
+
e,
|
|
1324
|
+
document.querySelector(
|
|
1325
|
+
"#modal-commentary-box .ql-container .ql-editor > p"
|
|
1326
|
+
).innerHTML,
|
|
1327
|
+
activeTab
|
|
1328
|
+
)
|
|
1329
|
+
}
|
|
1330
|
+
/>,
|
|
1331
|
+
]);
|
|
1328
1332
|
}}
|
|
1329
1333
|
showApproveRejectAll={
|
|
1330
1334
|
approveRejectAllButtons() && (auditorAssigned() || userAssigned())
|
|
@@ -1334,8 +1338,36 @@ export const RetailerProductEdition = ({
|
|
|
1334
1338
|
}
|
|
1335
1339
|
approveAll={() => validateAll("A")}
|
|
1336
1340
|
rejectAll={() => {
|
|
1337
|
-
|
|
1338
|
-
|
|
1341
|
+
validateAll("R");
|
|
1342
|
+
setMessage("Rechazado");
|
|
1343
|
+
setComponentsArray([
|
|
1344
|
+
<img src={errorModal} />,
|
|
1345
|
+
<ScreenHeader
|
|
1346
|
+
text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1347
|
+
headerType={"input-name-header"}
|
|
1348
|
+
color={"white"}
|
|
1349
|
+
/>,
|
|
1350
|
+
<TagAndInput
|
|
1351
|
+
label={"Caja de Comentario"}
|
|
1352
|
+
inputType={"textarea"}
|
|
1353
|
+
inputId={"modal-commentary-box"}
|
|
1354
|
+
index={0}
|
|
1355
|
+
color={"white"}
|
|
1356
|
+
/>,
|
|
1357
|
+
<Button
|
|
1358
|
+
buttonType={"general-default-button"}
|
|
1359
|
+
label={"Enviar comentario"}
|
|
1360
|
+
onClick={(e) =>
|
|
1361
|
+
createComment(
|
|
1362
|
+
e,
|
|
1363
|
+
document.querySelector(
|
|
1364
|
+
"#modal-commentary-box .ql-container .ql-editor > p"
|
|
1365
|
+
).innerHTML,
|
|
1366
|
+
activeTab
|
|
1367
|
+
)
|
|
1368
|
+
}
|
|
1369
|
+
/>,
|
|
1370
|
+
]);
|
|
1339
1371
|
}}
|
|
1340
1372
|
/>
|
|
1341
1373
|
<FullTabsMenu
|
|
@@ -1351,13 +1383,20 @@ export const RetailerProductEdition = ({
|
|
|
1351
1383
|
isRetailer={isRetailer}
|
|
1352
1384
|
showSaveButton={auditorAssigned() || userAssigned()}
|
|
1353
1385
|
version={version}
|
|
1386
|
+
|
|
1387
|
+
desc={ desc }
|
|
1388
|
+
setDesc={ setDesc }
|
|
1389
|
+
fich={fich}
|
|
1390
|
+
setFich={setFich}
|
|
1391
|
+
imag={imag}
|
|
1392
|
+
setImag={setImag}
|
|
1354
1393
|
updatedDescriptions={updatedDescriptions}
|
|
1355
1394
|
updatedDatasheets={updatedDatasheets}
|
|
1356
|
-
images={images}
|
|
1357
1395
|
selectedImages={selectedImages}
|
|
1358
1396
|
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
1359
1397
|
setUpdatedDatasheets={setUpdatedDatasheets}
|
|
1360
1398
|
setSelectedImages={setSelectedImages}
|
|
1399
|
+
|
|
1361
1400
|
setShowVersionSelector={setShowVersionSelector}
|
|
1362
1401
|
onClickSave={() => {
|
|
1363
1402
|
switch (activeTab) {
|
|
@@ -1436,7 +1475,7 @@ export const RetailerProductEdition = ({
|
|
|
1436
1475
|
version={version}
|
|
1437
1476
|
dinamicHeight={true}
|
|
1438
1477
|
compare={compare}
|
|
1439
|
-
/>
|
|
1478
|
+
/>
|
|
1440
1479
|
) : (
|
|
1441
1480
|
<ScreenHeader
|
|
1442
1481
|
text={"No cuentas con este servicio"}
|
|
@@ -1464,6 +1503,47 @@ export const RetailerProductEdition = ({
|
|
|
1464
1503
|
{(userAssigned(activeTab) || auditorAssigned()) &&
|
|
1465
1504
|
product[`${getConcept(activeTab)}_status`] !== "NS" && (
|
|
1466
1505
|
<div className="commentary-box">
|
|
1506
|
+
{!comment ? (
|
|
1507
|
+
<div className="commentary">
|
|
1508
|
+
<TagAndInput
|
|
1509
|
+
label={"Caja de Comentario"}
|
|
1510
|
+
inputType={"textarea"}
|
|
1511
|
+
inputCols={80}
|
|
1512
|
+
inputRows={4}
|
|
1513
|
+
inputId={"commentary-box"}
|
|
1514
|
+
index={0}
|
|
1515
|
+
/>
|
|
1516
|
+
<div className="buttons-box">
|
|
1517
|
+
<Button
|
|
1518
|
+
buttonType={"general-transparent-button"}
|
|
1519
|
+
label={"Enviar comentario"}
|
|
1520
|
+
onClick={(e) =>
|
|
1521
|
+
createComment(
|
|
1522
|
+
e,
|
|
1523
|
+
document.querySelector(
|
|
1524
|
+
"#commentary-box .ql-container .ql-editor > p"
|
|
1525
|
+
).innerHTML,
|
|
1526
|
+
activeTab
|
|
1527
|
+
)
|
|
1528
|
+
}
|
|
1529
|
+
/>
|
|
1530
|
+
</div>
|
|
1531
|
+
</div>
|
|
1532
|
+
) : (
|
|
1533
|
+
<div className="feedback-box">
|
|
1534
|
+
<Commentary
|
|
1535
|
+
comment={comment?.message?.replace(/<.*?\/?>/gm, "")}
|
|
1536
|
+
reviewed={crossComment}
|
|
1537
|
+
/>
|
|
1538
|
+
<Button
|
|
1539
|
+
buttonType={"circular-button accept-button"}
|
|
1540
|
+
onClick={async () => {
|
|
1541
|
+
setCrossComment(true);
|
|
1542
|
+
commentRevised();
|
|
1543
|
+
}}
|
|
1544
|
+
/>
|
|
1545
|
+
</div>
|
|
1546
|
+
)}
|
|
1467
1547
|
{[7, 8].includes(user.id_role) && (
|
|
1468
1548
|
<Button
|
|
1469
1549
|
buttonType={
|
|
@@ -1521,49 +1601,6 @@ export const RetailerProductEdition = ({
|
|
|
1521
1601
|
jwt={token}
|
|
1522
1602
|
/>
|
|
1523
1603
|
)}
|
|
1524
|
-
{showRejectModal && (
|
|
1525
|
-
<Modal
|
|
1526
|
-
title={`Agregar mensaje de rechazo para ${activeTab?.toLowerCase()}`}
|
|
1527
|
-
show={showRejectModal}
|
|
1528
|
-
customComponent={
|
|
1529
|
-
<TagAndInput
|
|
1530
|
-
inputType={"textarea"}
|
|
1531
|
-
inputId={"modal-message-box"}
|
|
1532
|
-
index={0}
|
|
1533
|
-
color={"white"}
|
|
1534
|
-
/>
|
|
1535
|
-
}
|
|
1536
|
-
buttons={[
|
|
1537
|
-
<ButtonV2
|
|
1538
|
-
key={"btn-Cancelar"}
|
|
1539
|
-
type={"white"}
|
|
1540
|
-
label={"Cancelar"}
|
|
1541
|
-
size={12}
|
|
1542
|
-
onClick={() => {
|
|
1543
|
-
setShowRejectModal(false);
|
|
1544
|
-
}}
|
|
1545
|
-
/>,
|
|
1546
|
-
<ButtonV2
|
|
1547
|
-
key={"btn-Aceptar"}
|
|
1548
|
-
type={"pink"}
|
|
1549
|
-
label={"Aceptar"}
|
|
1550
|
-
size={12}
|
|
1551
|
-
onClick={async () => {
|
|
1552
|
-
const body = document.querySelector(
|
|
1553
|
-
"#modal-message-box .ql-container .ql-editor > p"
|
|
1554
|
-
).innerHTML;
|
|
1555
|
-
const messages = [
|
|
1556
|
-
{ type: "message", value: body?.replace(/<.*?\/?>/gm, "") },
|
|
1557
|
-
];
|
|
1558
|
-
await createComment(messages, activeRetailer.id);
|
|
1559
|
-
valRejAll ? validateAll("R") : sendToFacilitator("R");
|
|
1560
|
-
setMessage("Rechazado");
|
|
1561
|
-
setShowRejectModal(false);
|
|
1562
|
-
}}
|
|
1563
|
-
/>,
|
|
1564
|
-
]}
|
|
1565
|
-
/>
|
|
1566
|
-
)}
|
|
1567
1604
|
</Container>
|
|
1568
1605
|
);
|
|
1569
1606
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
import { fetchPOST } from "../../../global-files/handle_http";
|
|
3
2
|
|
|
4
3
|
export const getAuditVersion = async (articleId, setState, token) => {
|
|
5
4
|
const auditResponse = await axios.get(
|
|
@@ -33,39 +32,3 @@ export const getInputsData = (
|
|
|
33
32
|
setDescriptionState(descriptions);
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
export const translateService = (tab) => {
|
|
38
|
-
switch (tab) {
|
|
39
|
-
case "description":
|
|
40
|
-
case "Descripción":
|
|
41
|
-
return "Descripciones";
|
|
42
|
-
case "datasheet":
|
|
43
|
-
case "Ficha técnica":
|
|
44
|
-
return "Fichas técnicas";
|
|
45
|
-
case "images":
|
|
46
|
-
case "Imágenes":
|
|
47
|
-
return "Imágenes";
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const createMessage = (
|
|
52
|
-
retailers,
|
|
53
|
-
idRetailer,
|
|
54
|
-
oldStatus,
|
|
55
|
-
newStatus,
|
|
56
|
-
service
|
|
57
|
-
) => {
|
|
58
|
-
const [retailer] = retailers?.filter((ret) => ret.id === idRetailer) || [];
|
|
59
|
-
return `${translateService(service)} de ${
|
|
60
|
-
retailer.name
|
|
61
|
-
} |${oldStatus}| a |${newStatus}`;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const sendMessage = async (data) => {
|
|
65
|
-
const { paramsBody, paramsHeader } = data;
|
|
66
|
-
return fetchPOST(
|
|
67
|
-
process.env.REACT_APP_CREATE_MESSAGES,
|
|
68
|
-
paramsBody,
|
|
69
|
-
paramsHeader
|
|
70
|
-
);
|
|
71
|
-
};
|
package/src/index.js
CHANGED
|
@@ -63,8 +63,6 @@ export * from "./components/molecules/ButtonDownloadFile/index";
|
|
|
63
63
|
export * from "./components/molecules/ImageTooltip/index";
|
|
64
64
|
export * from "./components/molecules/SelectV2/index";
|
|
65
65
|
export * from "./components/molecules/Dropdown/index";
|
|
66
|
-
export * from "./components/molecules/StripeCardForm/index";
|
|
67
|
-
export * from "./components/molecules/StripeCardSelector/index";
|
|
68
66
|
|
|
69
67
|
//organisms
|
|
70
68
|
export * from "./components/organisms/ChangePassword/index";
|
|
@@ -81,7 +79,6 @@ export * from "./components/organisms/Modal/index";
|
|
|
81
79
|
export * from "./components/organisms/OrderDetail/index";
|
|
82
80
|
export * from "./components/organisms/RangeCalendar";
|
|
83
81
|
export * from "./components/organisms/TableResizable";
|
|
84
|
-
export * from "./components/organisms/SideModal/index";
|
|
85
82
|
|
|
86
83
|
//pages
|
|
87
84
|
export * from "./components/pages/ChangePasswordLogin";
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright [yyyy] [name of copyright owner]
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StripeCardForm } from ".";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/molecules/StripeCardForm",
|
|
5
|
-
component: StripeCardForm,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const Template = (args) => <StripeCardForm {...args} />;
|
|
9
|
-
export const StripeCardFormDefault = Template.bind({});
|
|
10
|
-
StripeCardFormDefault.args = {
|
|
11
|
-
customerId: "cus_KuEt6R6vwmN09f",
|
|
12
|
-
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiI5ZjQzNjAwMC0wYzgyLTRjNzYtYWEzNi1kM2Q1NGJjZTZiMTMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4NTU2OTUyMywibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2ODU1NzMxMjMsImlhdCI6MTY4NTU2OTUyMywiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.EotcxmtkUpBxwlXa3bo25iLAmRcT0kj1G3PVITVB_0ZtF8UC19rJIMTNSc1hYkl8cbfCuB_vkjYCAxi4b2SOru5MdMTRhgNjcQTVbiwIYww-QdUWq0WSv84nW_HaRoxCJ8ezm-wBZgUTpcD3VFuynUICbODKKHUfxVdKdVoAM6GGE6ymSbO7-0C7ZumoWEqaZ22BF4G1H-JvLkR-tL5iqXa2N-QCnNoteFmHstBfH6Sp5UZhPav1VBEGRmwdFfUnC-Xc-aNeIFwgWCXMsOXFWbbmWeh0uNF-Btu-QEJ7VkCu4pbElqHWJKBYLCx1zqDBrKrsrNxyvQlxsJ9NSOae8Q",
|
|
13
|
-
};
|