contentoh-components-library 21.1.28 → 21.1.29
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/assets/images/sliderToolTip/slide21.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide22.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide23.svg +9 -0
- package/dist/components/atoms/CheckBox/styles.js +1 -1
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/atoms/MenuCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/styles.js +20 -0
- package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +67 -13
- package/dist/components/atoms/SliderToolTip/index.js +64 -134
- package/dist/components/atoms/SliderToolTip/styles.js +2 -2
- package/dist/components/atoms/ValidationPanel/index.js +3 -4
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +44 -1
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +45 -48
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +30 -3
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/molecules/ApproveRejetPanel/styles.js +18 -0
- package/dist/components/molecules/AvatarAndValidation/index.js +0 -4
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +29 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +1 -5
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +109 -99
- package/dist/components/pages/ProviderProductEdition/index.js +100 -146
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +65 -56
- package/dist/components/pages/RetailerProductEdition/index.js +18 -127
- package/dist/global-files/global-styles.css +0 -1
- package/dist/index.js +38 -51
- package/package.json +1 -1
- package/src/assets/images/sliderToolTip/slide21.svg +9 -0
- package/src/assets/images/sliderToolTip/slide22.svg +9 -0
- package/src/assets/images/sliderToolTip/slide23.svg +9 -0
- package/src/components/atoms/CheckBox/styles.js +0 -1
- package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +77 -11
- package/src/components/atoms/SliderToolTip/index.js +91 -154
- package/src/components/atoms/SliderToolTip/styles.js +51 -22
- package/src/components/atoms/ValidationPanel/index.js +3 -4
- package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +24 -1
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +37 -30
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +76 -18
- package/src/components/molecules/AvatarAndValidation/index.js +0 -4
- package/src/components/molecules/StatusAsignationInfo/index.js +31 -0
- package/src/components/organisms/FullProductNameHeader/index.js +0 -4
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +107 -105
- package/src/components/pages/ProviderProductEdition/index.js +72 -102
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +67 -56
- package/src/components/pages/RetailerProductEdition/index.js +2 -102
- package/src/index.js +0 -1
- package/dist/components/atoms/Percent/Percent.stories.js +0 -39
- package/dist/components/atoms/Percent/index.js +0 -39
- package/dist/components/atoms/Percent/styles.js +0 -20
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -31
- package/dist/components/molecules/TextAndGradient/index.js +0 -36
- package/dist/components/molecules/TextAndGradient/styles.js +0 -18
- package/src/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +0 -17
- package/src/components/pages/RegistrationLoginFirstStep/index.js +0 -160
- package/src/components/pages/RegistrationLoginFirstStep/styles.js +0 -85
|
@@ -33,6 +33,13 @@ import { Link } from "react-router-dom";
|
|
|
33
33
|
import face from "../../../assets/images/defaultImages/defaultProfileImage.svg";
|
|
34
34
|
import errorModal from "../../../assets/images/genericModal/errorModal.svg";
|
|
35
35
|
import { GlobalModal } from "../../organisms/GlobalModal/index";
|
|
36
|
+
import { SliderToolTip } from "../../atoms/SliderToolTip";
|
|
37
|
+
import InfoIcon from "../../../assets/images/sliderToolTip/infoIcon.svg";
|
|
38
|
+
import Slide1_1 from "../../../assets/images/sliderToolTip/slide1.svg";
|
|
39
|
+
import Slide1_2 from "../../../assets/images/sliderToolTip/slide2.svg";
|
|
40
|
+
import Slide1_3 from "../../../assets/images/sliderToolTip/slide3.svg";
|
|
41
|
+
import Slide1_4 from "../../../assets/images/sliderToolTip/slide4.svg";
|
|
42
|
+
import Slide1_5 from "../../../assets/images/sliderToolTip/slide5.svg";
|
|
36
43
|
|
|
37
44
|
const reducerImages = (state, action) => {
|
|
38
45
|
let { values, attrForImgs } = state;
|
|
@@ -209,7 +216,6 @@ export const ProviderProductEdition = ({
|
|
|
209
216
|
const loadData = async () => {
|
|
210
217
|
const services = await getRetailerServices(
|
|
211
218
|
product?.id_article || product?.article?.id_article,
|
|
212
|
-
product?.article?.company_name || product?.categoryName,
|
|
213
219
|
parseInt(product?.article?.id_category || product?.id_category),
|
|
214
220
|
product?.version
|
|
215
221
|
);
|
|
@@ -827,7 +833,6 @@ export const ProviderProductEdition = ({
|
|
|
827
833
|
},
|
|
828
834
|
});
|
|
829
835
|
setProduct(productTemp);
|
|
830
|
-
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
831
836
|
setProductEdit({
|
|
832
837
|
ArticleId: productTemp.id_article,
|
|
833
838
|
idCategory: productTemp.article.id_category,
|
|
@@ -849,10 +854,10 @@ export const ProviderProductEdition = ({
|
|
|
849
854
|
|
|
850
855
|
const validateAll = async (result) => {
|
|
851
856
|
try {
|
|
852
|
-
setLoading(true);
|
|
853
857
|
const evaluationArray = [];
|
|
854
858
|
const sendAll = [];
|
|
855
859
|
const conceptArray = ["description", "datasheet", "images"];
|
|
860
|
+
console.log(servicesData);
|
|
856
861
|
|
|
857
862
|
servicesData?.forEach((ret) => {
|
|
858
863
|
let data = {
|
|
@@ -871,9 +876,7 @@ export const ProviderProductEdition = ({
|
|
|
871
876
|
);
|
|
872
877
|
});
|
|
873
878
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
conceptArray?.forEach((concept) => {
|
|
879
|
+
conceptArray.forEach((concept) => {
|
|
877
880
|
let data = {
|
|
878
881
|
articleId: product.id_article,
|
|
879
882
|
orderId: product.id_order ?? product.orderId,
|
|
@@ -888,32 +891,8 @@ export const ProviderProductEdition = ({
|
|
|
888
891
|
);
|
|
889
892
|
});
|
|
890
893
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
productTemp.article_status = `${result}C`;
|
|
894
|
-
productTemp.datasheet_status =
|
|
895
|
-
productTemp.datasheet_status === "NA" ? "NA" : `${result}C`;
|
|
896
|
-
productTemp.description_status =
|
|
897
|
-
productTemp.description_status === "NA" ? "NA" : `${result}C`;
|
|
898
|
-
productTemp.images_status =
|
|
899
|
-
productTemp.images_status === "NA" ? "NA" : `${result}C`;
|
|
900
|
-
setProduct(productTemp);
|
|
901
|
-
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
902
|
-
setProductEdit({
|
|
903
|
-
ArticleId: productTemp.id_article,
|
|
904
|
-
idCategory: productTemp.article.id_category,
|
|
905
|
-
product: productTemp,
|
|
906
|
-
});
|
|
907
|
-
sessionStorage.setItem(
|
|
908
|
-
"productEdit",
|
|
909
|
-
JSON.stringify({
|
|
910
|
-
ArticleId: productTemp.id_article,
|
|
911
|
-
idCategory: productTemp.article.id_category,
|
|
912
|
-
product: productTemp,
|
|
913
|
-
})
|
|
914
|
-
);
|
|
915
|
-
|
|
916
|
-
loadData();
|
|
894
|
+
Promise.all(conceptArray);
|
|
895
|
+
Promise.all(sendAll);
|
|
917
896
|
} catch (error) {
|
|
918
897
|
console.log(error);
|
|
919
898
|
}
|
|
@@ -969,10 +948,47 @@ export const ProviderProductEdition = ({
|
|
|
969
948
|
}
|
|
970
949
|
};
|
|
971
950
|
|
|
951
|
+
const slidefront = [
|
|
952
|
+
{
|
|
953
|
+
slide: Slide1_1,
|
|
954
|
+
description:
|
|
955
|
+
"Creamos tu contenido, y todo lo que haga falta para tu producto, cada sección puedes socilitar contenido enriquecido, y nosotros lo haremos por ti.",
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
slide: Slide1_2,
|
|
959
|
+
description:
|
|
960
|
+
"Puedes agregar solicitudes de contenido enriquecido a tu carrito de compra las veces que sean necesarias. Una vez completada tu lista con los servicios necesitados sigue el proceso de compra en checkout.",
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
slide: Slide1_3,
|
|
964
|
+
description:
|
|
965
|
+
"Revisa el contenido que deseas solicilitar, valida y tambien puedes agregar contenido extra, traducciones, o simplemente completar el checkout.",
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
slide: Slide1_4,
|
|
969
|
+
description:
|
|
970
|
+
"Elige el tipo de entrega de tu producto, puedes ser recolección en el lugar o por el contrario puedes dejarlo en nuestras oficinas.",
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
slide: Slide1_5,
|
|
974
|
+
title: "Bienvenido al modo Content-oh!",
|
|
975
|
+
description:
|
|
976
|
+
"Finalmente elige la forma de pago que más te guste, procede con el pago y listo.",
|
|
977
|
+
},
|
|
978
|
+
];
|
|
979
|
+
|
|
972
980
|
useEffect(() => {
|
|
973
981
|
setSaving(loading);
|
|
974
982
|
}, [loading]);
|
|
975
983
|
|
|
984
|
+
console.log(
|
|
985
|
+
user.is_retailer === 1,
|
|
986
|
+
product.id_order || product.orderId,
|
|
987
|
+
isRevision(),
|
|
988
|
+
getSectionStatus(),
|
|
989
|
+
"XD"
|
|
990
|
+
);
|
|
991
|
+
|
|
976
992
|
return (
|
|
977
993
|
<Container headerTop={headerTop}>
|
|
978
994
|
<HeaderTop setHeaderTop={setHeaderTop} />
|
|
@@ -1006,68 +1022,14 @@ export const ProviderProductEdition = ({
|
|
|
1006
1022
|
setActiveRetailer={setActiveRetailer}
|
|
1007
1023
|
showValidationButtons={isRevision() && getSectionStatus()}
|
|
1008
1024
|
servicesData={servicesData ? servicesData : null}
|
|
1009
|
-
showApproveRejectAll={
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
...prev,
|
|
1018
|
-
button2: {
|
|
1019
|
-
name: "Continuar",
|
|
1020
|
-
action: () => evaluationToRetailer("A"),
|
|
1021
|
-
},
|
|
1022
|
-
}));
|
|
1023
|
-
setShowGenericModal(true);
|
|
1024
|
-
} else {
|
|
1025
|
-
if (user.is_retailer) {
|
|
1026
|
-
if (product.id_order || product.orderId) {
|
|
1027
|
-
validateAll("A");
|
|
1028
|
-
} else {
|
|
1029
|
-
setDataGenericModal((prev) => ({
|
|
1030
|
-
...prev,
|
|
1031
|
-
button2: {
|
|
1032
|
-
name: "Continuar",
|
|
1033
|
-
action: () => evaluationToRetailer("A"),
|
|
1034
|
-
},
|
|
1035
|
-
}));
|
|
1036
|
-
setShowGenericModal(true);
|
|
1037
|
-
}
|
|
1038
|
-
} else {
|
|
1039
|
-
validateAll("A");
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
}}
|
|
1043
|
-
rejectAll={() => {
|
|
1044
|
-
if (
|
|
1045
|
-
originProp === "RequestWithoutContentoh" &&
|
|
1046
|
-
!user.is_retailer &&
|
|
1047
|
-
(!product.id_order || !product.orderId)
|
|
1048
|
-
) {
|
|
1049
|
-
return;
|
|
1050
|
-
} else {
|
|
1051
|
-
if (user.is_retailer) {
|
|
1052
|
-
if (product.id_order || product.orderId) {
|
|
1053
|
-
validateAll("R");
|
|
1054
|
-
setModalViewError(true);
|
|
1055
|
-
} else {
|
|
1056
|
-
setDataGenericModal((prev) => ({
|
|
1057
|
-
...prev,
|
|
1058
|
-
button2: {
|
|
1059
|
-
name: "Continuar",
|
|
1060
|
-
action: () => evaluationToRetailer("R"),
|
|
1061
|
-
},
|
|
1062
|
-
}));
|
|
1063
|
-
setShowGenericModal(true);
|
|
1064
|
-
}
|
|
1065
|
-
} else {
|
|
1066
|
-
validateAll("R");
|
|
1067
|
-
setModalViewError(true);
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
}}
|
|
1025
|
+
showApproveRejectAll={
|
|
1026
|
+
user.is_retailer === 1 &&
|
|
1027
|
+
(product.id_order || product.orderId) &&
|
|
1028
|
+
isRevision() &&
|
|
1029
|
+
getSectionStatus()
|
|
1030
|
+
}
|
|
1031
|
+
approveAll={() => validateAll("A")}
|
|
1032
|
+
rejectAll={() => validateAll("R")}
|
|
1071
1033
|
approve={() => {
|
|
1072
1034
|
if (
|
|
1073
1035
|
origin[activeTab] === "RequestWithoutContentoh" &&
|
|
@@ -1309,14 +1271,22 @@ export const ProviderProductEdition = ({
|
|
|
1309
1271
|
</Link>
|
|
1310
1272
|
</button>
|
|
1311
1273
|
) : (
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1274
|
+
<>
|
|
1275
|
+
<SliderToolTip
|
|
1276
|
+
infoIcon={InfoIcon}
|
|
1277
|
+
slidefront={slidefront}
|
|
1278
|
+
iconSize={"big-image"}
|
|
1279
|
+
slidePosition={"top-slide"}
|
|
1280
|
+
></SliderToolTip>
|
|
1281
|
+
<Button
|
|
1282
|
+
onClick={() => {
|
|
1283
|
+
setShowContentohRequestModal &&
|
|
1284
|
+
setShowContentohRequestModal(true);
|
|
1285
|
+
}}
|
|
1286
|
+
buttonType="general-default-button"
|
|
1287
|
+
label="Enviar a Content-oh!"
|
|
1288
|
+
/>
|
|
1289
|
+
</>
|
|
1320
1290
|
)}
|
|
1321
1291
|
</div>
|
|
1322
1292
|
)}
|
|
@@ -16,99 +16,110 @@ RetailerProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"
|
|
19
|
+
"eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiJkMjc2ZGUwMy01YmM3LTRkZjEtYTk4MC1jYmYwYjkyOGU3MDEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NjEwMDM2MSwibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY1NjEwMzk2MSwiaWF0IjoxNjU2MTAwMzYxLCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.WmbNT419c79ZIIZIxT8bW6YjSAvlGW_36cehBQWtdPPIeeRWO1ZVOkJeimGNm9dKwIVzdieg13mUPmJOcFZMQGtNoj4yOYOhSrQBEOg4Gr3Rv94RAEa-AcoFNns55Cl98krqF42qoYYeFRV9nH1iZrMU2sEML6kxwWgxAza5eXFie_MioMphXxMsWj3BT5Fmzk8SSHsAuf8jIjUTdGtFsNv2TOOU8YjTlljYij9cvLpu9Udlaj6tVnnElCcGskQk-U7QXqjHYDpOgeEkdWZU-Cy-vm4bT6qYCQHNtMxVCu_RZPpNm_p3vSWgkhj__baJsffhsb-PAETQKPTLuT690w",
|
|
20
|
+
articleId: 238,
|
|
21
|
+
category: 846,
|
|
22
|
+
version: 2,
|
|
20
23
|
productSelected: {
|
|
21
24
|
services: {
|
|
22
25
|
datasheets: 1,
|
|
23
26
|
descriptions: 1,
|
|
24
27
|
images: 1,
|
|
25
28
|
},
|
|
26
|
-
orderId:
|
|
27
|
-
status: "
|
|
28
|
-
datasheet_status: "
|
|
29
|
-
prio: "
|
|
30
|
-
version:
|
|
31
|
-
description_status: "
|
|
32
|
-
images_status: "
|
|
29
|
+
orderId: 1213,
|
|
30
|
+
status: "AA",
|
|
31
|
+
datasheet_status: "AA",
|
|
32
|
+
prio: "low",
|
|
33
|
+
version: 2,
|
|
34
|
+
description_status: "AA",
|
|
35
|
+
images_status: "AA",
|
|
33
36
|
article: {
|
|
34
|
-
id_article:
|
|
35
|
-
id_category: "
|
|
36
|
-
name: "
|
|
37
|
-
upc: "
|
|
38
|
-
timestamp: "
|
|
39
|
-
id_user:
|
|
40
|
-
status: "
|
|
37
|
+
id_article: 17517,
|
|
38
|
+
id_category: "691",
|
|
39
|
+
name: "Antitranspirante Lady Speed Stick Clinical Complete en Barra para Dama 45 g",
|
|
40
|
+
upc: "7509546066172",
|
|
41
|
+
timestamp: "2021-10-09T16:33:17.000Z",
|
|
42
|
+
id_user: 203,
|
|
43
|
+
status: "RECEPTION",
|
|
41
44
|
active: 1,
|
|
42
|
-
company_id:
|
|
43
|
-
company_name: "
|
|
44
|
-
country: "
|
|
45
|
-
id_order:
|
|
46
|
-
id_datasheet_especialist:
|
|
47
|
-
id_datasheet_facilitator:
|
|
48
|
-
id_description_especialist:
|
|
49
|
-
id_description_facilitator:
|
|
50
|
-
id_images_especialist:
|
|
51
|
-
id_images_facilitator:
|
|
52
|
-
id_auditor:
|
|
45
|
+
company_id: 226,
|
|
46
|
+
company_name: "Prueba Test S.A de C.V.",
|
|
47
|
+
country: "null",
|
|
48
|
+
id_order: 1213,
|
|
49
|
+
id_datasheet_especialist: 334,
|
|
50
|
+
id_datasheet_facilitator: 158,
|
|
51
|
+
id_description_especialist: 334,
|
|
52
|
+
id_description_facilitator: 158,
|
|
53
|
+
id_images_especialist: 366,
|
|
54
|
+
id_images_facilitator: 14,
|
|
55
|
+
id_auditor: 94,
|
|
53
56
|
id_recepcionist: null,
|
|
54
|
-
category:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
category:
|
|
58
|
+
"SALUD Y BELLEZA|CUIDADO CORPORAL|DESODORANTES CABALLERO Y DAMA",
|
|
59
|
+
missingAttributes: 1,
|
|
60
|
+
missingDescriptions: 0,
|
|
61
|
+
missingImages: -4,
|
|
58
62
|
},
|
|
59
63
|
retailers: [
|
|
60
64
|
{
|
|
61
|
-
id:
|
|
62
|
-
name: "
|
|
65
|
+
id: 4,
|
|
66
|
+
name: "Walmart Super y Superama",
|
|
63
67
|
country: "México",
|
|
64
68
|
id_region: 1,
|
|
65
69
|
active: 1,
|
|
66
70
|
},
|
|
67
71
|
{
|
|
68
|
-
id:
|
|
69
|
-
name: "
|
|
72
|
+
id: 6,
|
|
73
|
+
name: "HEB",
|
|
74
|
+
country: "México",
|
|
75
|
+
id_region: 1,
|
|
76
|
+
active: 1,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 29,
|
|
80
|
+
name: "Farmacias del Ahorro",
|
|
70
81
|
country: "México",
|
|
71
82
|
id_region: 1,
|
|
72
83
|
active: 1,
|
|
73
84
|
},
|
|
74
85
|
],
|
|
75
|
-
country: "
|
|
76
|
-
upc: "
|
|
86
|
+
country: "null",
|
|
87
|
+
upc: "7509546066172",
|
|
77
88
|
},
|
|
78
89
|
location: {
|
|
79
90
|
product: { articleId: 109485, versionId: 3 },
|
|
80
91
|
},
|
|
81
92
|
user: {
|
|
82
|
-
id_user:
|
|
83
|
-
name: "
|
|
84
|
-
last_name: "
|
|
85
|
-
email: "
|
|
86
|
-
position: "
|
|
93
|
+
id_user: 423,
|
|
94
|
+
name: "Facilitador Textos",
|
|
95
|
+
last_name: " ",
|
|
96
|
+
email: "bayadi1538@mnqlm.com",
|
|
97
|
+
position: "Tester",
|
|
87
98
|
telephone: null,
|
|
88
|
-
country:
|
|
89
|
-
id_company:
|
|
90
|
-
id_cognito: "
|
|
99
|
+
country: null,
|
|
100
|
+
id_company: 254,
|
|
101
|
+
id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
|
|
91
102
|
birth_Date: null,
|
|
92
103
|
about_me: null,
|
|
93
104
|
zip_code: null,
|
|
94
105
|
address: null,
|
|
95
106
|
job: null,
|
|
96
107
|
id_stripe: null,
|
|
97
|
-
id_role:
|
|
108
|
+
id_role: 4,
|
|
98
109
|
active: 1,
|
|
99
110
|
is_retailer: 0,
|
|
100
|
-
email_notify:
|
|
111
|
+
email_notify: null,
|
|
101
112
|
membership: {
|
|
102
|
-
id:
|
|
103
|
-
start_date: "
|
|
104
|
-
end_date: "
|
|
105
|
-
planID:
|
|
106
|
-
plan: "
|
|
107
|
-
name: "Plan
|
|
108
|
-
user_limit: "
|
|
109
|
-
products_limit: "
|
|
110
|
-
type: "
|
|
113
|
+
id: 750,
|
|
114
|
+
start_date: "2022-01-07T21:32:54.000Z",
|
|
115
|
+
end_date: "2023-01-07T21:32:54.000Z",
|
|
116
|
+
planID: 6,
|
|
117
|
+
plan: "prod_KvGd6YSTJyR3AP",
|
|
118
|
+
name: "Plan Small",
|
|
119
|
+
user_limit: "10",
|
|
120
|
+
products_limit: "1000",
|
|
121
|
+
type: "Enterprise",
|
|
111
122
|
},
|
|
112
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
123
|
+
src: "https://content-management-profile-prod.s3.amazonaws.com/id-423/423.png?1656100361978",
|
|
113
124
|
},
|
|
114
125
|
};
|
|
@@ -77,6 +77,7 @@ export const RetailerProductEdition = ({
|
|
|
77
77
|
tabsSections,
|
|
78
78
|
productSelected = {},
|
|
79
79
|
user = {},
|
|
80
|
+
location = {},
|
|
80
81
|
token,
|
|
81
82
|
}) => {
|
|
82
83
|
const [activeTab, setActiveTab] = useState("Descripción");
|
|
@@ -164,7 +165,6 @@ export const RetailerProductEdition = ({
|
|
|
164
165
|
const [socketType, setSocketType] = useState(null);
|
|
165
166
|
const [servicesStatus, setServicesStatus] = useState([]);
|
|
166
167
|
const [saving, setSaving] = useState(loading);
|
|
167
|
-
const isAuditor = user.id_role === 6;
|
|
168
168
|
|
|
169
169
|
useEffect(() => {
|
|
170
170
|
checkAll && setSelectedImages(images.values);
|
|
@@ -425,6 +425,7 @@ export const RetailerProductEdition = ({
|
|
|
425
425
|
articleId: product?.article?.id_article,
|
|
426
426
|
articleData: updatedDatasheets,
|
|
427
427
|
};
|
|
428
|
+
console.log(updatedDatasheets, "updatedDatasheets");
|
|
428
429
|
if (product?.orderId) dataObject["orderId"] = product?.orderId;
|
|
429
430
|
try {
|
|
430
431
|
await axios.put(
|
|
@@ -1081,66 +1082,6 @@ export const RetailerProductEdition = ({
|
|
|
1081
1082
|
setSaving(loading);
|
|
1082
1083
|
}, [loading]);
|
|
1083
1084
|
|
|
1084
|
-
const validateAll = async (result) => {
|
|
1085
|
-
try {
|
|
1086
|
-
setLoading(true);
|
|
1087
|
-
const evaluationArray = [];
|
|
1088
|
-
const sendAll = [];
|
|
1089
|
-
const conceptArray = ["description", "datasheet", "images"];
|
|
1090
|
-
|
|
1091
|
-
servicesData?.forEach((ret) => {
|
|
1092
|
-
let data = {
|
|
1093
|
-
articleId: product.article.id_article,
|
|
1094
|
-
orderId: product.id_order ?? product.orderId,
|
|
1095
|
-
concept: ret.service,
|
|
1096
|
-
result: result,
|
|
1097
|
-
evalStatus: product[`${ret.service}_status`],
|
|
1098
|
-
retailerId: ret.id_retailer,
|
|
1099
|
-
};
|
|
1100
|
-
evaluationArray.push(
|
|
1101
|
-
axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
|
|
1102
|
-
headers: {
|
|
1103
|
-
Authorization: token,
|
|
1104
|
-
},
|
|
1105
|
-
})
|
|
1106
|
-
);
|
|
1107
|
-
});
|
|
1108
|
-
|
|
1109
|
-
await Promise.all(evaluationArray);
|
|
1110
|
-
|
|
1111
|
-
conceptArray?.forEach((concept) => {
|
|
1112
|
-
let data = {
|
|
1113
|
-
articleId: product.article.id_article,
|
|
1114
|
-
orderId: product.id_order ?? product.orderId,
|
|
1115
|
-
concept,
|
|
1116
|
-
evalStatus: product[`${concept}_status`],
|
|
1117
|
-
};
|
|
1118
|
-
sendAll.push(
|
|
1119
|
-
axios.put(`${process.env.REACT_APP_SEND_EVAL}`, data, {
|
|
1120
|
-
headers: {
|
|
1121
|
-
Authorization: token,
|
|
1122
|
-
},
|
|
1123
|
-
})
|
|
1124
|
-
);
|
|
1125
|
-
});
|
|
1126
|
-
await Promise.all(sendAll);
|
|
1127
|
-
const productTemp = product;
|
|
1128
|
-
productTemp.status = `${result}A`;
|
|
1129
|
-
productTemp.datasheet_status =
|
|
1130
|
-
productTemp.datasheet_status === "NA" ? "NA" : `${result}A`;
|
|
1131
|
-
productTemp.description_status =
|
|
1132
|
-
productTemp.description_status === "NA" ? "NA" : `${result}A`;
|
|
1133
|
-
productTemp.images_status =
|
|
1134
|
-
productTemp.images_status === "NA" ? "NA" : `${result}A`;
|
|
1135
|
-
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1136
|
-
setProduct(productTemp);
|
|
1137
|
-
|
|
1138
|
-
loadData();
|
|
1139
|
-
} catch (error) {
|
|
1140
|
-
console.log(error);
|
|
1141
|
-
}
|
|
1142
|
-
};
|
|
1143
|
-
|
|
1144
1085
|
return (
|
|
1145
1086
|
<Container headerTop={headerTop}>
|
|
1146
1087
|
<HeaderTop setHeaderTop={setHeaderTop} />
|
|
@@ -1210,50 +1151,9 @@ export const RetailerProductEdition = ({
|
|
|
1210
1151
|
/>,
|
|
1211
1152
|
]);
|
|
1212
1153
|
}}
|
|
1213
|
-
showApproveRejectAll={
|
|
1214
|
-
isAuditor &&
|
|
1215
|
-
servicesData.every((serv) =>
|
|
1216
|
-
["RA", "AA", "AP", "AC", "AF"].includes(serv.status)
|
|
1217
|
-
) &&
|
|
1218
|
-
approveRejectButtons() &&
|
|
1219
|
-
(auditorAssigned() || userAssigned())
|
|
1220
|
-
}
|
|
1221
1154
|
showValidationButtons={
|
|
1222
1155
|
approveRejectButtons() && (auditorAssigned() || userAssigned())
|
|
1223
1156
|
}
|
|
1224
|
-
approveAll={() => validateAll("A")}
|
|
1225
|
-
rejectAll={() => {
|
|
1226
|
-
validateAll("R");
|
|
1227
|
-
setMessage("Rechazado");
|
|
1228
|
-
setComponentsArray([
|
|
1229
|
-
<img src={errorModal} />,
|
|
1230
|
-
<ScreenHeader
|
|
1231
|
-
text={"Agrega tu comentarios para enviar el rechazo"}
|
|
1232
|
-
headerType={"input-name-header"}
|
|
1233
|
-
color={"white"}
|
|
1234
|
-
/>,
|
|
1235
|
-
<TagAndInput
|
|
1236
|
-
label={"Caja de Comentario"}
|
|
1237
|
-
inputType={"textarea"}
|
|
1238
|
-
inputId={"modal-commentary-box"}
|
|
1239
|
-
index={0}
|
|
1240
|
-
color={"white"}
|
|
1241
|
-
/>,
|
|
1242
|
-
<Button
|
|
1243
|
-
buttonType={"general-default-button"}
|
|
1244
|
-
label={"Enviar comentario"}
|
|
1245
|
-
onClick={(e) =>
|
|
1246
|
-
createComment(
|
|
1247
|
-
e,
|
|
1248
|
-
document.querySelector(
|
|
1249
|
-
"#modal-commentary-box .ql-container .ql-editor > p"
|
|
1250
|
-
).innerHTML,
|
|
1251
|
-
activeTab
|
|
1252
|
-
)
|
|
1253
|
-
}
|
|
1254
|
-
/>,
|
|
1255
|
-
]);
|
|
1256
|
-
}}
|
|
1257
1157
|
/>
|
|
1258
1158
|
<FullTabsMenu
|
|
1259
1159
|
tabsSections={tabsSections}
|
package/src/index.js
CHANGED
|
@@ -22,7 +22,6 @@ export * from "./components/atoms/SliderToolTip/index";
|
|
|
22
22
|
export * from "./components/atoms/StatusTag/index";
|
|
23
23
|
export * from "./components/atoms/TabSection/index";
|
|
24
24
|
export * from "./components/atoms/ValidationPanel/index";
|
|
25
|
-
export * from "./components/atoms/VerticalSideMenuMainPage/index";
|
|
26
25
|
|
|
27
26
|
//molecules
|
|
28
27
|
export * from "./components/molecules/AvatarAndValidation/index";
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = exports.PercentDefault = void 0;
|
|
9
|
-
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
-
|
|
12
|
-
var _index = require("./index");
|
|
13
|
-
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
|
|
16
|
-
var status = ["-", "Pr", "Rc", "As", "P", "QF", "AF", "AA", "AP", "AC", "RA", "RF", "RP", "RC", "Ex"];
|
|
17
|
-
var _default = {
|
|
18
|
-
title: "Components/atoms/Percent",
|
|
19
|
-
component: _index.Percent,
|
|
20
|
-
argTypes: {
|
|
21
|
-
statusType: {
|
|
22
|
-
options: status,
|
|
23
|
-
control: {
|
|
24
|
-
type: "select"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
exports.default = _default;
|
|
30
|
-
|
|
31
|
-
var Template = function Template(args) {
|
|
32
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Percent, (0, _objectSpread2.default)({}, args));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var PercentDefault = Template.bind({});
|
|
36
|
-
exports.PercentDefault = PercentDefault;
|
|
37
|
-
PercentDefault.args = {
|
|
38
|
-
statusType: "-"
|
|
39
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.Percent = void 0;
|
|
9
|
-
|
|
10
|
-
var _styles = require("./styles");
|
|
11
|
-
|
|
12
|
-
var _polygon = _interopRequireDefault(require("../../../assets/images/arrow/polygon.svg"));
|
|
13
|
-
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
|
|
16
|
-
var Percent = function Percent(_ref) {
|
|
17
|
-
var statusType = _ref.statusType;
|
|
18
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
19
|
-
className: "status-".concat(statusType),
|
|
20
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
21
|
-
className: "text",
|
|
22
|
-
children: "Productos en proceso"
|
|
23
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
24
|
-
className: "percent-text",
|
|
25
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
26
|
-
className: "number",
|
|
27
|
-
children: "20"
|
|
28
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
29
|
-
src: _polygon.default,
|
|
30
|
-
alt: ""
|
|
31
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
32
|
-
className: "span",
|
|
33
|
-
children: "1%"
|
|
34
|
-
})]
|
|
35
|
-
})]
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.Percent = Percent;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.Container = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
-
|
|
14
|
-
var _variables = require("../../../global-files/variables");
|
|
15
|
-
|
|
16
|
-
var _templateObject;
|
|
17
|
-
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 7px;\n width: 97px;\n height: 83px;\n text-align: center;\n padding: 15px;\n\n &.status-Pr,\n &.status-Rc {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n &.status-- {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n &.status-As,\n &.status-P,\n &.status-QF {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n &.status-AF,\n &.status-AA,\n &.status-AP,\n &.status-AC {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n border: 1px solid #d74ded;\n .span {\n color: #d74ded;\n }\n }\n\n &.status-Ex {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n .text {\n color: ", ";\n font-size: 12px;\n font-family: ", ";\n line-height: 14px;\n }\n .percent-text {\n display: flex;\n .number {\n font-family: ", ";\n font-size: 28px;\n color: ", ";\n }\n .span{\n padding-top: 8px;\n font-size: 18px;\n }\n }\n"])), _variables.GlobalColors.reception, _variables.GlobalColors.reception, _variables.GlobalColors.s3, _variables.GlobalColors.s3, _variables.GlobalColors.in_progress, _variables.GlobalColors.in_progress, _variables.GlobalColors.finished, _variables.GlobalColors.finished, _variables.GlobalColors.exported, _variables.GlobalColors.exported, _variables.GlobalColors.s4, _variables.FontFamily.Raleway, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
19
|
-
|
|
20
|
-
exports.Container = Container;
|