contentoh-components-library 21.1.36 → 21.1.39
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/Percent/Percent.stories.js +39 -0
- package/dist/components/atoms/Percent/index.js +39 -0
- package/dist/components/atoms/Percent/styles.js +20 -0
- package/dist/components/atoms/StatusTag/index.js +17 -2
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
- package/dist/components/molecules/TextAndGradient/index.js +36 -0
- package/dist/components/molecules/TextAndGradient/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +105 -103
- package/dist/components/pages/ProviderProductEdition/index.js +323 -349
- package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
- package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
- package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +38 -83
- package/dist/components/pages/RetailerProductEdition/index.js +197 -208
- package/dist/global-files/data.js +9 -10
- package/dist/index.js +13 -0
- package/package.json +1 -1
- package/src/components/atoms/StatusTag/index.js +12 -2
- package/src/components/atoms/StatusTag/styles.js +11 -11
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +117 -103
- package/src/components/pages/ProviderProductEdition/index.js +171 -165
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +33 -82
- package/src/components/pages/RetailerProductEdition/index.js +167 -139
- package/src/global-files/data.js +9 -10
- package/src/index.js +1 -0
|
@@ -29,6 +29,7 @@ import { GenericModal } from "../../atoms/GenericModal";
|
|
|
29
29
|
import { ScreenHeader } from "../../atoms/ScreenHeader";
|
|
30
30
|
import { Loading } from "../../atoms/Loading";
|
|
31
31
|
import succes from "../../../assets/images/genericModal/genericModalCheck.svg";
|
|
32
|
+
import { getNewStatus } from "../../../global-files/data";
|
|
32
33
|
import errorModal from "../../../assets/images/genericModal/errorModal.svg";
|
|
33
34
|
|
|
34
35
|
const reducerImages = (state, action) => {
|
|
@@ -181,8 +182,11 @@ export const RetailerProductEdition = ({
|
|
|
181
182
|
setServices(services);
|
|
182
183
|
getServices();
|
|
183
184
|
|
|
184
|
-
//
|
|
185
|
-
setImages({
|
|
185
|
+
//setActiveRetailer(product?.retailers[0]);
|
|
186
|
+
setImages({
|
|
187
|
+
action: "init",
|
|
188
|
+
init: services[2],
|
|
189
|
+
});
|
|
186
190
|
if (services[2]?.values?.length > 0) setActiveImage(0);
|
|
187
191
|
|
|
188
192
|
getPercentage({ data: [product] }).then((res) => setPercentages(res));
|
|
@@ -200,22 +204,24 @@ export const RetailerProductEdition = ({
|
|
|
200
204
|
);
|
|
201
205
|
const parsedResponse = JSON.parse(servicesResponse?.data?.body).data;
|
|
202
206
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
);
|
|
207
|
+
let retailers = product.retailers || product.retailersAvailable;
|
|
208
|
+
let active = retailers?.filter((retailer) =>
|
|
209
|
+
parsedResponse?.map((srv) => srv.id_retailer).includes(retailer.id)
|
|
210
|
+
)[0];
|
|
208
211
|
!activeRetailer.id && setActiveRetailer(active ? active : retailers[0]);
|
|
209
212
|
setServicesData(parsedResponse);
|
|
210
213
|
};
|
|
211
214
|
|
|
212
215
|
const translateConcept = (concept) => {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
let translation = "";
|
|
217
|
+
if (concept === "datasheet") {
|
|
218
|
+
translation = "Ficha técnica";
|
|
219
|
+
} else if (concept === "description") {
|
|
220
|
+
translation = "Descripción";
|
|
221
|
+
} else if (concept === "images") {
|
|
222
|
+
translation = "Imágenes";
|
|
223
|
+
}
|
|
224
|
+
return translation;
|
|
219
225
|
};
|
|
220
226
|
|
|
221
227
|
const getComments = async (tab = "Descripción") => {
|
|
@@ -251,14 +257,14 @@ export const RetailerProductEdition = ({
|
|
|
251
257
|
switch (user.id_role) {
|
|
252
258
|
case 7:
|
|
253
259
|
case 8:
|
|
254
|
-
arr = ["
|
|
260
|
+
arr = ["IN_PROGRESS", "RF", "RA"];
|
|
255
261
|
break;
|
|
256
262
|
case 4:
|
|
257
263
|
case 5:
|
|
258
|
-
arr = ["
|
|
264
|
+
arr = ["RF", "AF", "AA", "AP", "AC"];
|
|
259
265
|
break;
|
|
260
266
|
case 6:
|
|
261
|
-
arr = ["RP", "
|
|
267
|
+
arr = ["RP", "RC", "AF", "RA"];
|
|
262
268
|
break;
|
|
263
269
|
default:
|
|
264
270
|
arr = [];
|
|
@@ -384,14 +390,13 @@ export const RetailerProductEdition = ({
|
|
|
384
390
|
const saveDescriptions = async () => {
|
|
385
391
|
setLoading(true);
|
|
386
392
|
const productTemp = product;
|
|
387
|
-
const articleId = product?.article?.id_article;
|
|
388
393
|
const dataObject = {
|
|
389
|
-
articleId,
|
|
394
|
+
articleId: product?.article?.id_article,
|
|
390
395
|
articleData: updatedDescriptions,
|
|
391
396
|
};
|
|
392
397
|
if (product?.orderId) dataObject["orderId"] = product?.orderId;
|
|
393
398
|
try {
|
|
394
|
-
|
|
399
|
+
await axios.put(
|
|
395
400
|
`${process.env.REACT_APP_ARTICLE_DATA_ENDPOINT}?description=true&version=${version}`,
|
|
396
401
|
dataObject,
|
|
397
402
|
{
|
|
@@ -400,16 +405,14 @@ export const RetailerProductEdition = ({
|
|
|
400
405
|
},
|
|
401
406
|
}
|
|
402
407
|
);
|
|
403
|
-
if (
|
|
404
|
-
|
|
405
|
-
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
406
|
-
if (newStatus) productTemp.description_status = newStatus;
|
|
408
|
+
if (productTemp.status === "ASSIGNED") {
|
|
409
|
+
productTemp.status = "IN_PROGRESS";
|
|
407
410
|
setProduct(productTemp);
|
|
408
411
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
409
|
-
|
|
410
|
-
setMessage("Descripciones guardadas con éxito");
|
|
411
|
-
await loadData();
|
|
412
412
|
}
|
|
413
|
+
|
|
414
|
+
setMessage("Descripciones guardadas con éxito");
|
|
415
|
+
loadData();
|
|
413
416
|
} catch (error) {
|
|
414
417
|
console.log(error);
|
|
415
418
|
}
|
|
@@ -418,14 +421,13 @@ export const RetailerProductEdition = ({
|
|
|
418
421
|
const saveDatasheets = async () => {
|
|
419
422
|
setLoading(true);
|
|
420
423
|
const productTemp = product;
|
|
421
|
-
const articleId = product?.article?.id_article;
|
|
422
424
|
const dataObject = {
|
|
423
|
-
articleId,
|
|
425
|
+
articleId: product?.article?.id_article,
|
|
424
426
|
articleData: updatedDatasheets,
|
|
425
427
|
};
|
|
426
428
|
if (product?.orderId) dataObject["orderId"] = product?.orderId;
|
|
427
429
|
try {
|
|
428
|
-
|
|
430
|
+
await axios.put(
|
|
429
431
|
`${process.env.REACT_APP_ARTICLE_DATA_ENDPOINT}?datasheet=true&version=${version}`,
|
|
430
432
|
dataObject,
|
|
431
433
|
{
|
|
@@ -434,16 +436,13 @@ export const RetailerProductEdition = ({
|
|
|
434
436
|
},
|
|
435
437
|
}
|
|
436
438
|
);
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
if (newStatus) productTemp.datasheet_status = newStatus;
|
|
439
|
+
setMessage("Fichas técnicas guardadas");
|
|
440
|
+
if (productTemp.status === "ASSIGNED") {
|
|
441
|
+
productTemp.status = "IN_PROGRESS";
|
|
441
442
|
setProduct(productTemp);
|
|
442
443
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
443
|
-
|
|
444
|
-
setMessage("Fichas técnicas guardadas");
|
|
445
|
-
await loadData();
|
|
446
444
|
}
|
|
445
|
+
loadData();
|
|
447
446
|
} catch (error) {
|
|
448
447
|
console.log(error);
|
|
449
448
|
}
|
|
@@ -527,6 +526,15 @@ export const RetailerProductEdition = ({
|
|
|
527
526
|
} else {
|
|
528
527
|
setImagesUploaded(true);
|
|
529
528
|
}
|
|
529
|
+
let productTemp = product;
|
|
530
|
+
if (productTemp.status === "ASSIGNED") {
|
|
531
|
+
productTemp.status = "IN_PROGRESS";
|
|
532
|
+
setProduct(productTemp);
|
|
533
|
+
sessionStorage.setItem(
|
|
534
|
+
"productSelected",
|
|
535
|
+
JSON.stringify(productTemp)
|
|
536
|
+
);
|
|
537
|
+
}
|
|
530
538
|
} catch (err) {
|
|
531
539
|
console.log(err);
|
|
532
540
|
// setMainLoading(false);
|
|
@@ -551,7 +559,7 @@ export const RetailerProductEdition = ({
|
|
|
551
559
|
return e;
|
|
552
560
|
});
|
|
553
561
|
try {
|
|
554
|
-
|
|
562
|
+
await axios.put(
|
|
555
563
|
`${process.env.REACT_APP_ARTICLE_DATA_ENDPOINT}?image=true&version=${version}`,
|
|
556
564
|
dataImages,
|
|
557
565
|
{
|
|
@@ -560,21 +568,9 @@ export const RetailerProductEdition = ({
|
|
|
560
568
|
},
|
|
561
569
|
}
|
|
562
570
|
);
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
if (newArticleStatus)
|
|
567
|
-
productTemp.status = newArticleStatus[articleId];
|
|
568
|
-
if (newStatus) productTemp.images_status = newStatus;
|
|
569
|
-
setProduct(productTemp);
|
|
570
|
-
sessionStorage.setItem(
|
|
571
|
-
"productSelected",
|
|
572
|
-
JSON.stringify(productTemp)
|
|
573
|
-
);
|
|
574
|
-
setMessage("Imágenes guardadas con éxito");
|
|
575
|
-
sessionStorage.removeItem("imagesList");
|
|
576
|
-
await loadData();
|
|
577
|
-
}
|
|
571
|
+
setMessage("Imágenes guardadas con éxito");
|
|
572
|
+
sessionStorage.removeItem("imagesList");
|
|
573
|
+
loadData();
|
|
578
574
|
} catch (error) {
|
|
579
575
|
console.log(error);
|
|
580
576
|
}
|
|
@@ -583,20 +579,24 @@ export const RetailerProductEdition = ({
|
|
|
583
579
|
|
|
584
580
|
const evaluationFinished = (userId, tab, statusArray) => {
|
|
585
581
|
const srv = servicesData.filter((serv) => serv.service === getConcept(tab));
|
|
586
|
-
const srvActive = srv
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
|
|
582
|
+
const [srvActive] = srv.filter(
|
|
583
|
+
(serv) => serv.id_retailer === activeRetailer?.id
|
|
584
|
+
);
|
|
585
|
+
const unvalidated =
|
|
586
|
+
product[`${getConcept(tab)}_status`] === "QF" ||
|
|
587
|
+
product[`${getConcept(tab)}_status`] === "IN_PROGRESS";
|
|
591
588
|
|
|
592
|
-
const auditorUnvalidated = !["RA", "AA", "
|
|
589
|
+
const auditorUnvalidated = !["RA", "AA", "AC", "AP"].includes(
|
|
590
|
+
product[`${getConcept(tab)}_status`]
|
|
591
|
+
);
|
|
593
592
|
|
|
594
593
|
switch (userId) {
|
|
595
594
|
case 7:
|
|
596
595
|
case 8:
|
|
597
596
|
return (
|
|
598
|
-
|
|
599
|
-
|
|
597
|
+
(["RA", "RF"].includes(product?.status) && //"IN_PROGRESS", "RF", "RA"
|
|
598
|
+
statusArray.includes(srvActive?.status)) ||
|
|
599
|
+
(statusArray.includes(product.status) &&
|
|
600
600
|
srv.filter((serv) => statusArray.includes(serv.status)).length ===
|
|
601
601
|
srv.length)
|
|
602
602
|
);
|
|
@@ -604,16 +604,14 @@ export const RetailerProductEdition = ({
|
|
|
604
604
|
case 5:
|
|
605
605
|
return (
|
|
606
606
|
unvalidated &&
|
|
607
|
-
["
|
|
607
|
+
["IN_PROGRESS", "QF"].includes(product.status) && //"RF", "AF", "AA", "AP", "AC
|
|
608
608
|
srv.filter((serv) => statusArray.includes(serv.status)).length ===
|
|
609
609
|
srv.length
|
|
610
610
|
);
|
|
611
611
|
case 6:
|
|
612
612
|
return (
|
|
613
|
-
statusArray.includes(product.status) && //
|
|
614
|
-
srv.every((serv) =>
|
|
615
|
-
["RA", "AA", "AP", "ACA"].includes(serv.status)
|
|
616
|
-
) &&
|
|
613
|
+
statusArray.includes(product.status) && //RP, RC, AF, RA true
|
|
614
|
+
srv.every((serv) => ["RA", "AA", "AP", "AC"].includes(serv.status)) &&
|
|
617
615
|
auditorUnvalidated
|
|
618
616
|
);
|
|
619
617
|
default:
|
|
@@ -635,20 +633,20 @@ export const RetailerProductEdition = ({
|
|
|
635
633
|
const approveRejectButtons = (action) => {
|
|
636
634
|
let concept = getConcept(action || activeTab);
|
|
637
635
|
|
|
638
|
-
const retailerStatus = servicesData
|
|
639
|
-
.
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
?.status
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
retailerStatus === "
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
636
|
+
const [retailerStatus] = servicesData.filter(
|
|
637
|
+
(srv) => srv.id_retailer === activeRetailer?.id && srv.service === concept
|
|
638
|
+
);
|
|
639
|
+
|
|
640
|
+
return (
|
|
641
|
+
(retailerStatus?.status === "QF" &&
|
|
642
|
+
(user.id_role === 1 || user.id_role === 4 || user.id_role === 5)) ||
|
|
643
|
+
(retailerStatus?.status === "AF" && //sessionStorage product
|
|
644
|
+
(user.id_role === 1 || user.id_role === 6)) ||
|
|
645
|
+
(retailerStatus?.status === "RP" &&
|
|
646
|
+
(user.id_role === 1 || user.id_role === 6)) ||
|
|
647
|
+
(retailerStatus?.status === "RC" &&
|
|
648
|
+
(user.id_role === 1 || user.id_role === 6))
|
|
649
|
+
);
|
|
652
650
|
};
|
|
653
651
|
|
|
654
652
|
const getSectionIcon = () => {
|
|
@@ -672,57 +670,92 @@ export const RetailerProductEdition = ({
|
|
|
672
670
|
try {
|
|
673
671
|
let concept = getConcept(activeTab);
|
|
674
672
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
let data = {
|
|
681
|
-
articleId,
|
|
682
|
-
orderId,
|
|
683
|
-
concept,
|
|
684
|
-
evalStatus,
|
|
685
|
-
retailerId: activeRetailer.id,
|
|
686
|
-
};
|
|
687
|
-
let res;
|
|
673
|
+
let productTemp = { ...product };
|
|
674
|
+
let evalStatus = product[`${concept}_status`];
|
|
675
|
+
|
|
676
|
+
let data = {};
|
|
688
677
|
if (result) {
|
|
689
|
-
data
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
678
|
+
data = {
|
|
679
|
+
articleId: product.article.id_article,
|
|
680
|
+
orderId: product.orderId,
|
|
681
|
+
concept: concept,
|
|
682
|
+
result: result,
|
|
683
|
+
evalStatus: evalStatus,
|
|
684
|
+
retailerId: activeRetailer.id,
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
await axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
688
|
+
headers: {
|
|
689
|
+
Authorization: token,
|
|
690
|
+
},
|
|
691
|
+
});
|
|
699
692
|
getServices();
|
|
700
693
|
} else {
|
|
701
|
-
const specialistDone =
|
|
694
|
+
const specialistDone =
|
|
695
|
+
evalStatus === "RF" ||
|
|
696
|
+
evalStatus === "RA" ||
|
|
697
|
+
evalStatus === "IN_PROGRESS";
|
|
702
698
|
|
|
703
|
-
let message;
|
|
704
699
|
if (specialistDone) {
|
|
705
|
-
|
|
700
|
+
setMessage(`${activeTab} enviada a facilitador`);
|
|
701
|
+
getSectionIcon();
|
|
702
|
+
} else if (evalStatus === "QF") {
|
|
703
|
+
setMessage("Evaluación enviada");
|
|
704
|
+
getSectionIcon();
|
|
705
|
+
} else if (evalStatus === "AF") {
|
|
706
|
+
setMessage("Evaluación enviada");
|
|
706
707
|
getSectionIcon();
|
|
707
|
-
} else if (
|
|
708
|
-
|
|
708
|
+
} else if (evalStatus === "RP") {
|
|
709
|
+
setMessage("Evaluación enviada");
|
|
709
710
|
getSectionIcon();
|
|
711
|
+
} else if (evalStatus === "RC") {
|
|
712
|
+
setMessage("Evaluación enviada");
|
|
713
|
+
getSectionIcon();
|
|
714
|
+
}
|
|
715
|
+
let statusArr = [];
|
|
716
|
+
servicesData.forEach((srv) => {
|
|
717
|
+
srv.service === concept && statusArr.push(srv.status);
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
productTemp[`${concept}_status`] = getNewStatus(statusArr);
|
|
721
|
+
|
|
722
|
+
let newStatus = getNewStatus([
|
|
723
|
+
productTemp.datasheet_status,
|
|
724
|
+
productTemp.description_status,
|
|
725
|
+
productTemp.images_status,
|
|
726
|
+
]);
|
|
727
|
+
|
|
728
|
+
productTemp.status = newStatus;
|
|
729
|
+
|
|
730
|
+
data = {
|
|
731
|
+
articleId: product.article.id_article,
|
|
732
|
+
orderId: product.orderId,
|
|
733
|
+
concept: concept,
|
|
734
|
+
evalStatus: evalStatus,
|
|
735
|
+
retailerId: activeRetailer.id,
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
switch (user.id_role) {
|
|
739
|
+
case 7:
|
|
740
|
+
case 8:
|
|
741
|
+
data.especialist = true;
|
|
742
|
+
break;
|
|
743
|
+
case 4:
|
|
744
|
+
case 5:
|
|
745
|
+
data.facilitator = true;
|
|
746
|
+
break;
|
|
747
|
+
default:
|
|
748
|
+
break;
|
|
710
749
|
}
|
|
711
|
-
|
|
750
|
+
await axios.put(`${process.env.REACT_APP_SEND_EVAL}`, data, {
|
|
712
751
|
headers: {
|
|
713
752
|
Authorization: token,
|
|
714
753
|
},
|
|
715
754
|
});
|
|
716
755
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
productTemp[`${concept}_status`] = newStatus;
|
|
721
|
-
await loadData();
|
|
722
|
-
if (message) setMessage(message);
|
|
723
|
-
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
724
|
-
setProduct(productTemp);
|
|
725
|
-
}
|
|
756
|
+
loadData();
|
|
757
|
+
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
758
|
+
setProduct(productTemp);
|
|
726
759
|
} catch (error) {
|
|
727
760
|
console.log(error);
|
|
728
761
|
}
|
|
@@ -908,12 +941,12 @@ export const RetailerProductEdition = ({
|
|
|
908
941
|
},
|
|
909
942
|
],
|
|
910
943
|
concept: concept,
|
|
911
|
-
|
|
944
|
+
[`${assignationType}Id`]: assignationId,
|
|
912
945
|
};
|
|
913
|
-
|
|
946
|
+
axios({
|
|
914
947
|
method: "post",
|
|
915
948
|
url: process.env.REACT_APP_ASSIGNATIONS_ENDPOINT,
|
|
916
|
-
data,
|
|
949
|
+
data: data,
|
|
917
950
|
headers: {
|
|
918
951
|
Authorization: token,
|
|
919
952
|
},
|
|
@@ -1102,7 +1135,7 @@ export const RetailerProductEdition = ({
|
|
|
1102
1135
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1103
1136
|
setProduct(productTemp);
|
|
1104
1137
|
|
|
1105
|
-
|
|
1138
|
+
loadData();
|
|
1106
1139
|
} catch (error) {
|
|
1107
1140
|
console.log(error);
|
|
1108
1141
|
}
|
|
@@ -1180,7 +1213,7 @@ export const RetailerProductEdition = ({
|
|
|
1180
1213
|
showApproveRejectAll={
|
|
1181
1214
|
isAuditor &&
|
|
1182
1215
|
servicesData.every((serv) =>
|
|
1183
|
-
["RA", "AA", "AP", "
|
|
1216
|
+
["RA", "AA", "AP", "AC", "AF"].includes(serv.status)
|
|
1184
1217
|
) &&
|
|
1185
1218
|
approveRejectButtons() &&
|
|
1186
1219
|
(auditorAssigned() || userAssigned())
|
|
@@ -1233,7 +1266,7 @@ export const RetailerProductEdition = ({
|
|
|
1233
1266
|
assig={assig[activeTab]}
|
|
1234
1267
|
setAssignation={setAssignation}
|
|
1235
1268
|
isRetailer={isRetailer}
|
|
1236
|
-
showSaveButton={userAssigned()}
|
|
1269
|
+
showSaveButton={auditorAssigned() || userAssigned()}
|
|
1237
1270
|
onClickSave={() => {
|
|
1238
1271
|
switch (activeTab) {
|
|
1239
1272
|
case "Descripción":
|
|
@@ -1373,21 +1406,16 @@ export const RetailerProductEdition = ({
|
|
|
1373
1406
|
/>
|
|
1374
1407
|
</div>
|
|
1375
1408
|
)}
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
}
|
|
1387
|
-
label={"Enviar evaluación"}
|
|
1388
|
-
onClick={() => sendToFacilitator()}
|
|
1389
|
-
/>
|
|
1390
|
-
)}
|
|
1409
|
+
<Button
|
|
1410
|
+
buttonType={
|
|
1411
|
+
evaluationFinished(user.id_role, activeTab, statusArray) &&
|
|
1412
|
+
requiredNull[activeTab] === 0
|
|
1413
|
+
? "general-green-button"
|
|
1414
|
+
: "general-button-disabled"
|
|
1415
|
+
}
|
|
1416
|
+
label={"Enviar evaluación"}
|
|
1417
|
+
onClick={() => sendToFacilitator()}
|
|
1418
|
+
/>
|
|
1391
1419
|
</div>
|
|
1392
1420
|
)}
|
|
1393
1421
|
</div>
|
|
@@ -1421,4 +1449,4 @@ export const RetailerProductEdition = ({
|
|
|
1421
1449
|
)}
|
|
1422
1450
|
</Container>
|
|
1423
1451
|
);
|
|
1424
|
-
};
|
|
1452
|
+
};
|
package/src/global-files/data.js
CHANGED
|
@@ -195,19 +195,18 @@ export const fetchUsers = async (auth) => {
|
|
|
195
195
|
export const getNewStatus = (statusArray) => {
|
|
196
196
|
let lookupString = "";
|
|
197
197
|
statusArray.forEach((element) => (lookupString += element + "/"));
|
|
198
|
-
if (lookupString.includes("
|
|
198
|
+
if (lookupString.includes("RF")) return "RF";
|
|
199
199
|
if (lookupString.includes("RA")) return "RA";
|
|
200
200
|
if (lookupString.includes("RP")) return "RP";
|
|
201
|
-
if (lookupString.includes("
|
|
202
|
-
if (lookupString.includes("UNASSIGNED")) return "
|
|
203
|
-
if (lookupString.includes("
|
|
204
|
-
if (lookupString.includes("
|
|
205
|
-
if (lookupString.includes("
|
|
201
|
+
if (lookupString.includes("RC")) return "RC";
|
|
202
|
+
if (lookupString.includes("UNASSIGNED")) return "IN_PROGRESS";
|
|
203
|
+
if (lookupString.includes("IN_PROGRESS")) return "IN_PROGRESS";
|
|
204
|
+
if (lookupString.includes("QF")) return "QF";
|
|
205
|
+
if (lookupString.includes("AF")) return "AF";
|
|
206
206
|
if (lookupString.includes("AA")) return "AA";
|
|
207
207
|
if (lookupString.includes("AP")) return "AP";
|
|
208
|
-
if (lookupString.includes("
|
|
209
|
-
if (lookupString.includes("
|
|
208
|
+
if (lookupString.includes("AC")) return "AC";
|
|
209
|
+
if (lookupString.includes("RECEIVED")) return "RECEIVED";
|
|
210
210
|
if (lookupString.includes("NA")) return "NA";
|
|
211
|
-
|
|
212
|
-
return "NA";
|
|
211
|
+
return new Error("Status not found");
|
|
213
212
|
};
|
package/src/index.js
CHANGED
|
@@ -65,6 +65,7 @@ export * from "./components/pages/CustomerLogin";
|
|
|
65
65
|
export * from "./components/pages/CustomerType";
|
|
66
66
|
export * from "./components/pages/EmailResetPassword";
|
|
67
67
|
export * from "./components/pages/OnboardPlan";
|
|
68
|
+
export * from "./components/pages/RegistrationLoginFirstStep";
|
|
68
69
|
export * from "./components/pages/RegistrationLoginSecondStep";
|
|
69
70
|
export * from "./components/pages/RegistrationLoginThirdStep";
|
|
70
71
|
export * from "./components/pages/RetailerProductEdition";
|