contentoh-components-library 21.0.6 → 21.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/GeneralInput/index.js +14 -6
- package/dist/components/atoms/GeneralInput/styles.js +4 -1
- package/dist/components/atoms/InputFormatter/index.js +15 -11
- package/dist/components/atoms/Select/style.js +1 -1
- package/dist/components/organisms/FullTabsMenu/index.js +1 -1
- package/dist/components/organisms/InputGroup/index.js +8 -8
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +29 -29
- package/dist/components/pages/RetailerProductEdition/index.js +136 -62
- package/package.json +1 -1
- package/src/components/atoms/GeneralInput/index.js +21 -6
- package/src/components/atoms/GeneralInput/styles.js +9 -0
- package/src/components/atoms/InputFormatter/index.js +13 -7
- package/src/components/atoms/Select/style.js +0 -1
- package/src/components/organisms/FullTabsMenu/index.js +1 -1
- package/src/components/organisms/InputGroup/index.js +7 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +29 -30
- package/src/components/pages/RetailerProductEdition/index.js +114 -46
|
@@ -44,7 +44,7 @@ RetailerProductEditionDefault.args = {
|
|
|
44
44
|
Imágenes: false,
|
|
45
45
|
},
|
|
46
46
|
token:
|
|
47
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
47
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJiMmNlNWIyYS02MDljLTRlNzktOWVhOS0yZjc0Y2ZmNDM4ODkiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwiY29nbml0bzp1c2VybmFtZSI6ImIyY2U1YjJhLTYwOWMtNGU3OS05ZWE5LTJmNzRjZmY0Mzg4OSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJkMGQ0NDUxYS01ODg1LTQ0ZTctYjZhNi0xODdkY2NjNDI4MTgiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1MTIyMDI2NiwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1MTIyMzg2NiwiaWF0IjoxNjUxMjIwMjY2LCJlbWFpbCI6ImF6YXJhdGVAY29udGVudG9oLmNvbSJ9.lhlgp4NoHgFu4LrpIWiGCTD08MIHo-mLQ17SNx1rAmyHP5YosGp9LKJXEgNcpAIaVfFiy4Zd-YGTf2QExMcP9kAYksoKHI1G6jSg87yh3Pg3V3aGE6X6JkuOOflz2M8jZgyYMRvbkJfG7oi6uj_nZ-tCjq7VMnmZyfWL4LjTvF5E0EqzVC93fcPViwW5ozqr51VvGhIoXGHiG01i4CPbsorp0jJjlU795cq4ETNw6i0d61Wz9pLDUttYmt5RCEMrbCp3ctSymtxHuz3eJTXzsF330KAmGL2SG4hJ8l-kdyoYRSlkGy3PTy4tYdFVrcubpHL3LOFzJWMrmLn98J3MoA",
|
|
48
48
|
articleId: 238,
|
|
49
49
|
category: 846,
|
|
50
50
|
version: 2,
|
|
@@ -54,76 +54,75 @@ RetailerProductEditionDefault.args = {
|
|
|
54
54
|
descriptions: 1,
|
|
55
55
|
images: 1,
|
|
56
56
|
},
|
|
57
|
-
orderId:
|
|
58
|
-
status: "
|
|
59
|
-
datasheet_status: "
|
|
57
|
+
orderId: 125,
|
|
58
|
+
status: "IN_PROGRESS",
|
|
59
|
+
datasheet_status: "QF",
|
|
60
60
|
prio: "none",
|
|
61
61
|
version: 2,
|
|
62
|
-
description_status: "
|
|
63
|
-
images_status: "
|
|
62
|
+
description_status: "QF",
|
|
63
|
+
images_status: "IN_PROGRESS",
|
|
64
64
|
article: {
|
|
65
|
-
id_article:
|
|
66
|
-
id_category: "
|
|
67
|
-
name: "
|
|
68
|
-
upc: "
|
|
69
|
-
timestamp: "2022-
|
|
65
|
+
id_article: 109483,
|
|
66
|
+
id_category: "2046",
|
|
67
|
+
name: "Celular",
|
|
68
|
+
upc: "31313131",
|
|
69
|
+
timestamp: "2022-04-28T21:42:27.000Z",
|
|
70
70
|
id_user: 28,
|
|
71
71
|
status: "NULL",
|
|
72
72
|
active: 1,
|
|
73
73
|
company_id: 1,
|
|
74
74
|
company_name: "COMPANY DEV",
|
|
75
75
|
country: "Colombia",
|
|
76
|
-
id_order:
|
|
77
|
-
id_datasheet_especialist:
|
|
76
|
+
id_order: 125,
|
|
77
|
+
id_datasheet_especialist: 54,
|
|
78
78
|
id_datasheet_facilitator: 52,
|
|
79
|
-
id_description_especialist:
|
|
79
|
+
id_description_especialist: 54,
|
|
80
80
|
id_description_facilitator: 52,
|
|
81
81
|
id_images_especialist: 55,
|
|
82
82
|
id_images_facilitator: 53,
|
|
83
83
|
id_auditor: 30,
|
|
84
84
|
id_recepcionist: null,
|
|
85
|
-
category:
|
|
86
|
-
"SALUD Y BELLEZA|CUIDADO DEL CABELLO|SHAMPOOS Y ACONDICIONADORES",
|
|
85
|
+
category: "ELÉCTRICO|ELECTRÓNICA|ANTENAS Y ACCESORIOS",
|
|
87
86
|
missingAttributes: null,
|
|
88
87
|
missingDescriptions: null,
|
|
89
88
|
missingImages: null,
|
|
90
89
|
},
|
|
91
90
|
retailers: [
|
|
92
91
|
{
|
|
93
|
-
id:
|
|
94
|
-
name: "
|
|
92
|
+
id: 58,
|
|
93
|
+
name: "The Home Depot",
|
|
95
94
|
country: "México",
|
|
96
95
|
id_region: 1,
|
|
97
96
|
active: 1,
|
|
98
97
|
},
|
|
99
98
|
{
|
|
100
|
-
id:
|
|
101
|
-
name: "
|
|
99
|
+
id: 59,
|
|
100
|
+
name: "Home Depot Platinum",
|
|
102
101
|
country: "México",
|
|
103
102
|
id_region: 1,
|
|
104
103
|
active: 1,
|
|
105
104
|
},
|
|
106
105
|
],
|
|
107
106
|
country: "Colombia",
|
|
108
|
-
upc: "
|
|
107
|
+
upc: "31313131",
|
|
109
108
|
},
|
|
110
109
|
user: {
|
|
111
|
-
id_user:
|
|
112
|
-
name: "
|
|
113
|
-
last_name: "
|
|
114
|
-
email: "
|
|
115
|
-
position:
|
|
110
|
+
id_user: 52,
|
|
111
|
+
name: "FACILITADOR TXT PRUEBA",
|
|
112
|
+
last_name: "",
|
|
113
|
+
email: "azarate@contentoh.com",
|
|
114
|
+
position: null,
|
|
116
115
|
telephone: null,
|
|
117
|
-
country:
|
|
116
|
+
country: null,
|
|
118
117
|
id_company: 2,
|
|
119
|
-
id_cognito: "
|
|
118
|
+
id_cognito: "b2ce5b2a-609c-4e79-9ea9-2f74cff43889",
|
|
120
119
|
birth_Date: null,
|
|
121
120
|
about_me: null,
|
|
122
121
|
zip_code: null,
|
|
123
122
|
address: null,
|
|
124
123
|
job: null,
|
|
125
124
|
id_stripe: null,
|
|
126
|
-
id_role:
|
|
125
|
+
id_role: 4,
|
|
127
126
|
active: 1,
|
|
128
127
|
is_retailer: 0,
|
|
129
128
|
membership: {
|
|
@@ -137,6 +136,6 @@ RetailerProductEditionDefault.args = {
|
|
|
137
136
|
products_limit: "3",
|
|
138
137
|
type: "PyMES",
|
|
139
138
|
},
|
|
140
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
139
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-52/52.png?1651207506986",
|
|
141
140
|
},
|
|
142
141
|
};
|
|
@@ -126,7 +126,11 @@ export const RetailerProductEdition = ({
|
|
|
126
126
|
const [services, setServices] = useState([]);
|
|
127
127
|
const [servicesData, setServicesData] = useState([]);
|
|
128
128
|
const [message, setMessage] = useState("");
|
|
129
|
-
const [product, setProduct] = useState(
|
|
129
|
+
const [product, setProduct] = useState(
|
|
130
|
+
JSON.parse(sessionStorage.getItem("productSelected"))
|
|
131
|
+
? JSON.parse(sessionStorage.getItem("productSelected"))
|
|
132
|
+
: productSelected
|
|
133
|
+
);
|
|
130
134
|
const [icon, setIcon] = useState(null);
|
|
131
135
|
const [version, setVersion] = useState(productSelected?.version);
|
|
132
136
|
const [comments, setComments] = useState({});
|
|
@@ -164,7 +168,7 @@ export const RetailerProductEdition = ({
|
|
|
164
168
|
init: services[2],
|
|
165
169
|
});
|
|
166
170
|
if (services[2]?.values?.length > 0) setActiveImage(0);
|
|
167
|
-
|
|
171
|
+
|
|
168
172
|
getPercentage({ data: [productSelected] }).then((res) =>
|
|
169
173
|
setPercentages(res)
|
|
170
174
|
);
|
|
@@ -186,7 +190,7 @@ export const RetailerProductEdition = ({
|
|
|
186
190
|
}
|
|
187
191
|
const selected = productSelected;
|
|
188
192
|
const servicesResponse = await axios.get(
|
|
189
|
-
`${process.env.REACT_APP_SERVICES_ENDPOINT}?articleId=${
|
|
193
|
+
`${process.env.REACT_APP_SERVICES_ENDPOINT}?articleId=${product?.article?.id_article}&orderId=${product?.article?.id_order}&end=true`
|
|
190
194
|
);
|
|
191
195
|
const parsedResponse = JSON.parse(servicesResponse?.data?.body).data;
|
|
192
196
|
setServicesData(parsedResponse);
|
|
@@ -530,11 +534,13 @@ export const RetailerProductEdition = ({
|
|
|
530
534
|
}
|
|
531
535
|
concept = action ? action : concept;
|
|
532
536
|
return (
|
|
533
|
-
(
|
|
537
|
+
(product[`${concept}_status`] === "QF" &&
|
|
534
538
|
(user.id_role === 1 || user.id_role === 4 || user.id_role === 5)) ||
|
|
535
|
-
(
|
|
539
|
+
(product[`${concept}_status`] === "AF" && //sessionStorage productSelected
|
|
536
540
|
(user.id_role === 1 || user.id_role === 6)) ||
|
|
537
|
-
(
|
|
541
|
+
(product[`${concept}_status`] === "RP" &&
|
|
542
|
+
(user.id_role === 1 || user.id_role === 6)) ||
|
|
543
|
+
(product[`${concept}_status`] === "RC" &&
|
|
538
544
|
(user.id_role === 1 || user.id_role === 6))
|
|
539
545
|
);
|
|
540
546
|
};
|
|
@@ -557,7 +563,7 @@ export const RetailerProductEdition = ({
|
|
|
557
563
|
|
|
558
564
|
const updateCompaniesList = (status, result, retailerId, concept) => {
|
|
559
565
|
let serv = servicesData.slice();
|
|
560
|
-
let item = serv
|
|
566
|
+
let item = serv.find(
|
|
561
567
|
(item) => item.id_retailer === retailerId && item.service === concept
|
|
562
568
|
);
|
|
563
569
|
let index = serv.indexOf(item);
|
|
@@ -631,12 +637,9 @@ export const RetailerProductEdition = ({
|
|
|
631
637
|
case "Imágenes":
|
|
632
638
|
concept = "images";
|
|
633
639
|
break;
|
|
634
|
-
default:
|
|
635
|
-
break;
|
|
636
640
|
}
|
|
637
|
-
let
|
|
638
|
-
let
|
|
639
|
-
evalStatus = productSelected[`${concept}_status`];
|
|
641
|
+
let productTemp = { ...product };
|
|
642
|
+
let evalStatus = product[`${concept}_status`];
|
|
640
643
|
const specialistDone =
|
|
641
644
|
evalStatus === "RF" ||
|
|
642
645
|
evalStatus === "RA" ||
|
|
@@ -646,46 +649,51 @@ export const RetailerProductEdition = ({
|
|
|
646
649
|
setMessage(`${activeTab} enviada a facilitador`);
|
|
647
650
|
getSectionIcon();
|
|
648
651
|
productTemp[`${concept}_status`] = "QF";
|
|
649
|
-
evalStatus = "QF";
|
|
650
652
|
} else if (evalStatus === "QF") {
|
|
651
653
|
setMessage("Evaluación enviada");
|
|
652
654
|
getSectionIcon();
|
|
653
655
|
productTemp[`${concept}_status`] = "AF";
|
|
654
|
-
evalStatus = "AF";
|
|
655
656
|
} else if (evalStatus === "AF") {
|
|
656
657
|
setMessage("Evaluación enviada");
|
|
657
658
|
getSectionIcon();
|
|
658
659
|
productTemp[`${concept}_status`] = "AA";
|
|
659
|
-
evalStatus = "AA";
|
|
660
660
|
} else if (evalStatus === "RP") {
|
|
661
661
|
setMessage("Evaluación enviada");
|
|
662
662
|
getSectionIcon();
|
|
663
663
|
productTemp[`${concept}_status`] = "AA";
|
|
664
|
-
|
|
664
|
+
} else if (evalStatus === "RC") {
|
|
665
|
+
setMessage("Evaluación enviada");
|
|
666
|
+
getSectionIcon();
|
|
667
|
+
productTemp[`${concept}_status`] = "AP";
|
|
665
668
|
}
|
|
669
|
+
|
|
666
670
|
let data = {};
|
|
667
671
|
if (result) {
|
|
668
672
|
updateCompaniesList(evalStatus, result, activeRetailer.id, concept);
|
|
669
673
|
data = {
|
|
670
|
-
articleId:
|
|
671
|
-
orderId:
|
|
674
|
+
articleId: product.article.id_article,
|
|
675
|
+
orderId: product.orderId,
|
|
672
676
|
concept: concept,
|
|
673
677
|
result: result,
|
|
674
678
|
evalStatus: evalStatus,
|
|
675
679
|
retailerId: activeRetailer.id,
|
|
676
680
|
};
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
681
|
+
try {
|
|
682
|
+
await axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
683
|
+
headers: {
|
|
684
|
+
Authorization: token,
|
|
685
|
+
},
|
|
686
|
+
});
|
|
687
|
+
} catch (error) {
|
|
688
|
+
console.log(error);
|
|
689
|
+
}
|
|
682
690
|
} else {
|
|
683
691
|
if (specialistDone) {
|
|
684
|
-
updateCompaniesList(evalStatus, result, activeRetailer.id);
|
|
692
|
+
updateCompaniesList(evalStatus, result, activeRetailer.id, concept);
|
|
685
693
|
}
|
|
686
694
|
data = {
|
|
687
|
-
articleId:
|
|
688
|
-
orderId:
|
|
695
|
+
articleId: product.article.id_article,
|
|
696
|
+
orderId: product.orderId,
|
|
689
697
|
concept: concept,
|
|
690
698
|
evalStatus: evalStatus,
|
|
691
699
|
retailerId: activeRetailer.id,
|
|
@@ -704,11 +712,14 @@ export const RetailerProductEdition = ({
|
|
|
704
712
|
break;
|
|
705
713
|
}
|
|
706
714
|
|
|
715
|
+
console.log(data);
|
|
716
|
+
|
|
707
717
|
axios.put(`${process.env.REACT_APP_SEND_EVAL}`, data, {
|
|
708
718
|
headers: {
|
|
709
719
|
Authorization: token,
|
|
710
720
|
},
|
|
711
721
|
});
|
|
722
|
+
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
712
723
|
setProduct(productTemp);
|
|
713
724
|
//setModalSent(true);
|
|
714
725
|
}
|
|
@@ -730,9 +741,21 @@ export const RetailerProductEdition = ({
|
|
|
730
741
|
}
|
|
731
742
|
|
|
732
743
|
const allowedRoles = [1, 4, 5, 6, 7, 8];
|
|
733
|
-
|
|
734
744
|
const validUser = allowedRoles.indexOf(user?.id_role) !== -1;
|
|
735
745
|
|
|
746
|
+
if (!rol) {
|
|
747
|
+
switch (user.id_role) {
|
|
748
|
+
case 4:
|
|
749
|
+
case 5:
|
|
750
|
+
rol = "facilitator";
|
|
751
|
+
break;
|
|
752
|
+
case 7:
|
|
753
|
+
case 8:
|
|
754
|
+
rol = "especialist";
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
736
759
|
return (
|
|
737
760
|
productSelected.article[`id_${concept}_${rol}`] === user.id_user &&
|
|
738
761
|
validUser
|
|
@@ -773,7 +796,7 @@ export const RetailerProductEdition = ({
|
|
|
773
796
|
};
|
|
774
797
|
|
|
775
798
|
const getRequired = (services) => {
|
|
776
|
-
const objetcTemp =
|
|
799
|
+
const objetcTemp = {};
|
|
777
800
|
const datasheetServicesArray = Object.values(services[0]);
|
|
778
801
|
const dsInputs = datasheetServicesArray.pop();
|
|
779
802
|
const descriptionsServicesArray = services[1];
|
|
@@ -784,11 +807,14 @@ export const RetailerProductEdition = ({
|
|
|
784
807
|
Object.values(datasheet?.data).forEach((dataGroup) =>
|
|
785
808
|
dsInputsRequired.push(
|
|
786
809
|
...dataGroup.inputs.filter(
|
|
787
|
-
(input) =>
|
|
810
|
+
(input) =>
|
|
811
|
+
dsInputs[input].required &&
|
|
812
|
+
(dsInputs[input].value === undefined || !dsInputs[input].value)
|
|
788
813
|
)
|
|
789
814
|
)
|
|
790
815
|
)
|
|
791
816
|
);
|
|
817
|
+
|
|
792
818
|
objetcTemp["Ficha técnica"] = dsInputsRequired.length;
|
|
793
819
|
|
|
794
820
|
descriptionsServicesArray.forEach((description) =>
|
|
@@ -869,20 +895,20 @@ export const RetailerProductEdition = ({
|
|
|
869
895
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
870
896
|
};
|
|
871
897
|
|
|
872
|
-
const evaluationComplete = (
|
|
898
|
+
const evaluationComplete = () => {
|
|
873
899
|
let concept = "";
|
|
874
|
-
switch (
|
|
900
|
+
switch (activeTab) {
|
|
875
901
|
case "Ficha técnica":
|
|
876
902
|
concept = "datasheet";
|
|
877
903
|
break;
|
|
878
904
|
case "Imágenes":
|
|
879
905
|
concept = "images";
|
|
880
906
|
break;
|
|
881
|
-
|
|
882
|
-
default:
|
|
907
|
+
case "Descripción":
|
|
883
908
|
concept = "description";
|
|
884
909
|
break;
|
|
885
910
|
}
|
|
911
|
+
|
|
886
912
|
let serv = servicesData.filter((item) => item.service === concept);
|
|
887
913
|
let approved = "";
|
|
888
914
|
let rejected = "";
|
|
@@ -995,6 +1021,26 @@ export const RetailerProductEdition = ({
|
|
|
995
1021
|
}
|
|
996
1022
|
};
|
|
997
1023
|
|
|
1024
|
+
const specialistValid = (tab) => {
|
|
1025
|
+
let concept = "";
|
|
1026
|
+
switch (tab) {
|
|
1027
|
+
case "Ficha técnica":
|
|
1028
|
+
concept = "datasheet";
|
|
1029
|
+
break;
|
|
1030
|
+
case "Imágenes":
|
|
1031
|
+
concept = "images";
|
|
1032
|
+
break;
|
|
1033
|
+
case "Descripción":
|
|
1034
|
+
concept = "description";
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
return (
|
|
1038
|
+
product[`${concept}_status`] === "IN_PROGRESS" ||
|
|
1039
|
+
product[`${concept}_status`] === "RF" ||
|
|
1040
|
+
product[`${concept}_status`] === "RA"
|
|
1041
|
+
);
|
|
1042
|
+
};
|
|
1043
|
+
|
|
998
1044
|
return (
|
|
999
1045
|
<Container headerTop={headerTop}>
|
|
1000
1046
|
<HeaderTop setHeaderTop={setHeaderTop} />
|
|
@@ -1029,15 +1075,38 @@ export const RetailerProductEdition = ({
|
|
|
1029
1075
|
approveRejectButtons={approveRejectButtons}
|
|
1030
1076
|
sendToFacilitator={sendToFacilitator}
|
|
1031
1077
|
auditorAssigned={auditorAssigned}
|
|
1032
|
-
userAssigned={() => userAssigned(activeTab
|
|
1078
|
+
userAssigned={() => userAssigned(activeTab)}
|
|
1033
1079
|
/>
|
|
1034
1080
|
<FullTabsMenu
|
|
1035
1081
|
tabsSections={tabsSections}
|
|
1036
|
-
status={
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1082
|
+
status={
|
|
1083
|
+
// {
|
|
1084
|
+
// Descripción: product?.description_status,
|
|
1085
|
+
// "Ficha técnica": product?.datasheet_status,
|
|
1086
|
+
// Imágenes: product?.images_status,
|
|
1087
|
+
// }
|
|
1088
|
+
() => {
|
|
1089
|
+
let concept = "";
|
|
1090
|
+
switch (activeTab) {
|
|
1091
|
+
case "Ficha técnica":
|
|
1092
|
+
concept = "datasheet";
|
|
1093
|
+
break;
|
|
1094
|
+
case "Imágenes":
|
|
1095
|
+
concept = "images";
|
|
1096
|
+
break;
|
|
1097
|
+
case "Descripción":
|
|
1098
|
+
concept = "description";
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
let retailerService = {};
|
|
1102
|
+
[retailerService] = servicesData.filter(
|
|
1103
|
+
(service) =>
|
|
1104
|
+
service.id_retailer === activeRetailer.id &&
|
|
1105
|
+
service.service === concept
|
|
1106
|
+
);
|
|
1107
|
+
return retailerService?.status;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1041
1110
|
activeTab={activeTab}
|
|
1042
1111
|
setActiveTab={setActiveTab}
|
|
1043
1112
|
setImageLayout={setImageLayout}
|
|
@@ -1137,8 +1206,7 @@ export const RetailerProductEdition = ({
|
|
|
1137
1206
|
</>
|
|
1138
1207
|
)}
|
|
1139
1208
|
</div>
|
|
1140
|
-
{(userAssigned(activeTab
|
|
1141
|
-
auditorAssigned()) && (
|
|
1209
|
+
{(userAssigned(activeTab) || auditorAssigned()) && (
|
|
1142
1210
|
<div className="commentary-box">
|
|
1143
1211
|
{!comment ? (
|
|
1144
1212
|
<div className="commentary">
|
|
@@ -1183,11 +1251,11 @@ export const RetailerProductEdition = ({
|
|
|
1183
1251
|
)}
|
|
1184
1252
|
<Button
|
|
1185
1253
|
buttonType={
|
|
1186
|
-
|
|
1187
|
-
requiredNull[activeTab]
|
|
1188
|
-
|
|
1189
|
-
? "general-button
|
|
1190
|
-
: "general-
|
|
1254
|
+
evaluationComplete() &&
|
|
1255
|
+
requiredNull[activeTab] === 0 &&
|
|
1256
|
+
approveRejectButtons()
|
|
1257
|
+
? "general-green-button"
|
|
1258
|
+
: "general-button-disabled"
|
|
1191
1259
|
}
|
|
1192
1260
|
label={"Enviar evaluación"}
|
|
1193
1261
|
onClick={() => sendToFacilitator()}
|