contentoh-components-library 21.0.65 → 21.0.66
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 +5 -18
- package/.env.production +3 -16
- package/CHANGELOG.md +33 -31
- package/dist/assets/images/carouselImagesLogin/login2.svg +117 -0
- package/dist/assets/images/carouselImagesLogin/login3.svg +147 -0
- package/dist/assets/images/carouselImagesLogin/loginImage.svg +301 -0
- package/dist/assets/images/sliderToolTip/infoIcon.svg +4 -0
- package/dist/assets/images/sliderToolTip/slide1.svg +5 -0
- package/dist/assets/images/sliderToolTip/slide2.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide3.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide4.svg +9 -0
- package/dist/assets/images/sliderToolTip/slide5.svg +40 -0
- package/dist/components/atoms/AsignationOption/index.js +5 -9
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/CheckBox/index.js +2 -4
- package/dist/components/atoms/GeneralButton/index.js +0 -5
- package/dist/components/atoms/GeneralButton/styles.js +2 -4
- package/dist/components/atoms/GeneralInput/index.js +25 -72
- package/dist/components/atoms/GeneralInput/styles.js +1 -7
- package/dist/components/atoms/GenericModal/index.js +2 -4
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/GradientPanel/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/Loading/Loading.stories.js +28 -0
- package/dist/components/atoms/Loading/index.js +1 -0
- package/dist/components/atoms/LogoImage/index.js +1 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/{molecules/RetailerSelector → atoms/MenuCommercialRetailers}/styles.js +1 -1
- 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/PriorityFlag/index.js +1 -1
- package/dist/components/atoms/ProductImage/styles.js +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -2
- package/dist/components/atoms/ProgressBar/styles.js +5 -3
- package/dist/components/atoms/ScreenHeader/index.js +1 -1
- package/dist/components/atoms/ScreenHeader/styles.js +1 -1
- package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +47 -0
- package/dist/components/atoms/SliderToolTip/index.js +200 -0
- package/dist/components/atoms/SliderToolTip/styles.js +24 -0
- package/dist/components/atoms/StatusTag/index.js +2 -37
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +3 -4
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +22 -0
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +49 -0
- package/dist/components/atoms/{Commentary → VerticalSideMenuMainPage}/styles.js +1 -6
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/{atoms/CharCounter → molecules/ApproveRejetPanel}/styles.js +1 -3
- package/dist/components/molecules/AvatarAndValidation/index.js +7 -17
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +40 -42
- package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/EmailResetPasswordLogin/index.js +153 -0
- package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/FeaturesBar/index.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +21 -80
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/index.js +6 -28
- package/dist/components/molecules/GalleryHeader/styles.js +1 -1
- package/dist/components/molecules/ImageSelector/index.js +4 -2
- package/dist/components/molecules/LoginPasswordStrength/index.js +6 -6
- package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
- package/dist/components/{atoms/CharCounter/CharCounter.stories.js → molecules/LogoLoading/Loading.stories.js} +7 -10
- package/dist/components/molecules/LogoLoading/index.js +22 -0
- package/dist/components/molecules/LogoLoading/styles.js +18 -0
- package/dist/components/molecules/ProductNameHeader/index.js +2 -1
- package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationFirstStep/index.js +308 -0
- package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationSecondStep/index.js +169 -0
- package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
- package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
- package/dist/components/molecules/RegistrationThirdStep/index.js +155 -0
- package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
- package/dist/components/molecules/SignInLogin/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLogin/index.js +321 -0
- package/dist/components/molecules/SignInLogin/styles.js +20 -0
- 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 +25 -46
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +5 -12
- package/dist/components/molecules/TableHeader/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +2 -24
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +210 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
- package/dist/components/{atoms/InputFormatter/Wysiwyg.stories.js → organisms/ChangePassword/ChangePassword.stories.js} +7 -9
- package/dist/components/organisms/ChangePassword/index.js +123 -0
- package/dist/components/organisms/ChangePassword/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +8 -32
- package/dist/components/organisms/FullTabsMenu/index.js +5 -18
- package/dist/components/organisms/ImageDataTable/index.js +14 -90
- package/dist/components/organisms/InputGroup/index.js +13 -34
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +11 -15
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +347 -91
- package/dist/components/pages/RetailerProductEdition/index.js +60 -1608
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +53 -212
- package/dist/global-files/global-styles.css +0 -1
- package/dist/global-files/variables.js +0 -1
- package/dist/index.js +277 -30
- package/package.json +14 -12
- package/src/assets/images/editField/showPassword.png +0 -0
- package/src/assets/images/sliderToolTip/infoIcon.svg +4 -0
- package/src/assets/images/sliderToolTip/slide1.svg +5 -0
- package/src/assets/images/sliderToolTip/slide2.svg +9 -0
- package/src/assets/images/sliderToolTip/slide3.svg +9 -0
- package/src/assets/images/sliderToolTip/slide4.svg +9 -0
- package/src/assets/images/sliderToolTip/slide5.svg +40 -0
- package/src/components/atoms/AsignationOption/index.js +5 -7
- package/src/components/atoms/AsignationOption/styles.js +1 -9
- package/src/components/atoms/CheckBox/index.js +2 -8
- package/src/components/atoms/GeneralButton/index.js +2 -9
- package/src/components/atoms/GeneralButton/styles.js +0 -23
- package/src/components/atoms/GeneralInput/index.js +23 -71
- package/src/components/atoms/GeneralInput/styles.js +1 -11
- package/src/components/atoms/GenericModal/index.js +2 -2
- package/src/components/atoms/GenericModal/styles.js +2 -10
- package/src/components/atoms/GradientPanel/styles.js +1 -0
- package/src/components/atoms/Loading/Loading.stories.js +10 -0
- package/src/components/atoms/Loading/index.js +3 -2
- package/src/components/atoms/LogoImage/index.js +1 -1
- package/src/components/atoms/PriorityFlag/index.js +1 -1
- package/src/components/atoms/ProductImage/styles.js +1 -1
- package/src/components/atoms/ProgressBar/index.js +2 -2
- package/src/components/atoms/ProgressBar/styles.js +3 -54
- package/src/components/atoms/ScreenHeader/index.js +3 -7
- package/src/components/atoms/ScreenHeader/styles.js +2 -9
- package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +23 -0
- package/src/components/atoms/SliderToolTip/index.js +182 -0
- package/src/components/atoms/SliderToolTip/styles.js +168 -0
- package/src/components/atoms/StatusTag/index.js +2 -30
- package/src/components/atoms/StatusTag/styles.js +3 -15
- package/src/components/atoms/ValidationPanel/index.js +3 -3
- package/src/components/molecules/AvatarAndValidation/index.js +6 -24
- package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
- package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/EmailResetPasswordLogin/index.js +85 -0
- package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
- package/src/components/molecules/FeaturesBar/index.js +7 -10
- package/src/components/molecules/GalleryElement/index.js +36 -75
- package/src/components/molecules/GalleryElement/styles.js +11 -38
- package/src/components/molecules/GalleryHeader/index.js +8 -14
- package/src/components/molecules/GalleryHeader/styles.js +0 -16
- package/src/components/molecules/ImageSelector/index.js +3 -2
- package/src/components/molecules/LoginPasswordStrength/index.js +8 -3
- package/src/components/molecules/LoginPasswordStrength/styles.js +3 -0
- package/src/components/molecules/LogoLoading/Loading.stories.js +10 -0
- package/src/components/molecules/LogoLoading/index.js +12 -0
- package/src/components/molecules/LogoLoading/styles.js +16 -0
- package/src/components/molecules/ProductNameHeader/index.js +2 -1
- package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
- package/src/components/molecules/RegistrationFirstStep/index.js +227 -0
- package/src/components/molecules/RegistrationFirstStep/styles.js +87 -0
- package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
- package/src/components/molecules/RegistrationSecondStep/index.js +130 -0
- package/src/components/molecules/RegistrationSecondStep/styles.js +59 -0
- package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
- package/src/components/molecules/RegistrationThirdStep/index.js +130 -0
- package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
- package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
- package/src/components/molecules/SignInLogin/index.js +227 -0
- package/src/components/molecules/SignInLogin/styles.js +128 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +38 -62
- package/src/components/molecules/StatusAsignationInfo/styles.js +2 -12
- package/src/components/molecules/TableHeader/index.js +3 -16
- package/src/components/molecules/TableHeader/styles.js +0 -5
- package/src/components/molecules/TagAndInput/index.js +2 -24
- package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +170 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +51 -0
- package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +54 -0
- package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
- package/src/components/organisms/ChangePassword/index.js +76 -0
- package/src/components/organisms/ChangePassword/styles.js +13 -0
- package/src/components/organisms/FullProductNameHeader/index.js +7 -28
- package/src/components/organisms/FullTabsMenu/index.js +3 -15
- package/src/components/organisms/ImageDataTable/index.js +11 -89
- package/src/components/organisms/InputGroup/index.js +11 -46
- package/src/components/organisms/InputGroup/styles.js +0 -3
- package/src/components/organisms/ProductImageModal/index.js +12 -20
- package/src/components/organisms/ProductImageModal/styles.js +0 -3
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +343 -91
- package/src/components/pages/RetailerProductEdition/index.js +48 -1239
- package/src/components/pages/RetailerProductEdition/styles.js +4 -67
- package/src/global-files/data.js +57 -156
- package/src/global-files/global-styles.css +0 -1
- package/src/global-files/variables.js +0 -1
- package/src/index.js +20 -1
- package/dist/assets/images/generalButton/downloadIcon.svg +0 -3
- package/dist/assets/images/modalsSVGs/attributesSent.svg +0 -208
- package/dist/assets/images/modalsSVGs/descriptionSent.svg +0 -237
- package/dist/assets/images/modalsSVGs/providerSent.svg +0 -445
- package/dist/assets/images/modalsSVGs/uploadingImages.svg +0 -148
- package/dist/components/atoms/CharCounter/index.js +0 -22
- package/dist/components/atoms/Commentary/Commentary.stories.js +0 -1
- package/dist/components/atoms/Commentary/index.js +0 -23
- package/dist/components/atoms/Input/index.js +0 -26
- package/dist/components/atoms/Input/style.js +0 -26
- package/dist/components/atoms/InputFormatter/index.js +0 -184
- package/dist/components/atoms/InputFormatter/styles.js +0 -33
- package/dist/components/atoms/LabelToInput/index.js +0 -53
- package/dist/components/atoms/LabelToInput/style.js +0 -22
- 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/atoms/Select/index.js +0 -39
- package/dist/components/atoms/Select/style.js +0 -32
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -48
- package/dist/components/molecules/RetailerSelector/index.js +0 -74
- 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/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +0 -102
- package/dist/components/pages/ProviderProductEdition/index.js +0 -1688
- package/dist/components/pages/ProviderProductEdition/styles.js +0 -21
- package/src/assets/images/generalButton/downloadIcon.svg +0 -3
- package/src/assets/images/modalsSVGs/attributesSent.svg +0 -208
- package/src/assets/images/modalsSVGs/descriptionSent.svg +0 -237
- package/src/assets/images/modalsSVGs/providerSent.svg +0 -445
- package/src/assets/images/modalsSVGs/uploadingImages.svg +0 -148
- package/src/components/atoms/CharCounter/CharCounter.stories.js +0 -11
- package/src/components/atoms/CharCounter/index.js +0 -13
- package/src/components/atoms/CharCounter/styles.js +0 -10
- package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
- package/src/components/atoms/Commentary/index.js +0 -9
- package/src/components/atoms/Commentary/styles.js +0 -16
- package/src/components/atoms/Input/index.js +0 -15
- package/src/components/atoms/Input/style.js +0 -31
- package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatter/index.js +0 -144
- package/src/components/atoms/InputFormatter/styles.js +0 -40
- package/src/components/atoms/LabelToInput/index.js +0 -26
- package/src/components/atoms/LabelToInput/style.js +0 -41
- package/src/components/atoms/Select/index.js +0 -35
- package/src/components/atoms/Select/style.js +0 -76
- package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -35
- package/src/components/molecules/RetailerSelector/index.js +0 -63
- package/src/components/molecules/RetailerSelector/styles.js +0 -18
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +0 -89
- package/src/components/pages/ProviderProductEdition/index.js +0 -1249
- package/src/components/pages/ProviderProductEdition/styles.js +0 -100
|
@@ -0,0 +1,210 @@
|
|
|
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.VerificationCodeResetPasswordLogin = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _styles = require("./styles");
|
|
17
|
+
|
|
18
|
+
var _GradientPanel = require("../../atoms/GradientPanel");
|
|
19
|
+
|
|
20
|
+
var _react = require("react");
|
|
21
|
+
|
|
22
|
+
var _LogoImage = require("../../atoms/LogoImage");
|
|
23
|
+
|
|
24
|
+
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
25
|
+
|
|
26
|
+
var _variables = require("../../../global-files/variables");
|
|
27
|
+
|
|
28
|
+
var _GeneralInput = require("../../atoms/GeneralInput");
|
|
29
|
+
|
|
30
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
31
|
+
|
|
32
|
+
var _utils = require("./utils");
|
|
33
|
+
|
|
34
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
|
+
|
|
36
|
+
var VerificationCodeResetPasswordLogin = function VerificationCodeResetPasswordLogin(props) {
|
|
37
|
+
var _useState = (0, _react.useState)(false),
|
|
38
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
39
|
+
resend = _useState2[0],
|
|
40
|
+
setResend = _useState2[1];
|
|
41
|
+
|
|
42
|
+
var _useState3 = (0, _react.useState)(""),
|
|
43
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
44
|
+
awsError = _useState4[0],
|
|
45
|
+
setAwsError = _useState4[1];
|
|
46
|
+
|
|
47
|
+
var _useState5 = (0, _react.useState)(false),
|
|
48
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
49
|
+
emptyVerificationCode = _useState6[0],
|
|
50
|
+
setEmptyVerificationCode = _useState6[1];
|
|
51
|
+
|
|
52
|
+
var _useState7 = (0, _react.useState)(document.querySelectorAll("[id^='verificationCodeInput']")),
|
|
53
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
54
|
+
inputCodeVerificationAll = _useState8[0],
|
|
55
|
+
setInputCodeVerificationAll = _useState8[1];
|
|
56
|
+
|
|
57
|
+
var inputPositions = [1, 2, 3, 4, 5, 6];
|
|
58
|
+
(0, _react.useEffect)(function () {
|
|
59
|
+
props.confirmationError !== "" && setEmptyVerificationCode(false);
|
|
60
|
+
}, [props.confirmationError]);
|
|
61
|
+
|
|
62
|
+
var checkCode = function checkCode(e, flag) {
|
|
63
|
+
var valid = true;
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
var code = "";
|
|
66
|
+
|
|
67
|
+
if (awsError === "" && !flag) {
|
|
68
|
+
inputPositions.map(function (position) {
|
|
69
|
+
return code = code + document.querySelector("#verificationCodeInput".concat(position)).value;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
if (sessionStorage.getItem("resetError")) {
|
|
73
|
+
JSON.parse(sessionStorage.getItem("confirmationCode")) === code && (valid = false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
sessionStorage.setItem("confirmationCode", JSON.stringify(code));
|
|
77
|
+
valid && !sessionStorage.getItem("resetPasswordProcess") && props.setPaso(6);
|
|
78
|
+
valid && sessionStorage.getItem("resetPasswordProcess") && props.setPaso(8);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var validateResend = /*#__PURE__*/function () {
|
|
83
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
|
|
84
|
+
var email;
|
|
85
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
86
|
+
while (1) {
|
|
87
|
+
switch (_context.prev = _context.next) {
|
|
88
|
+
case 0:
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
email = JSON.parse(sessionStorage.getItem("email"));
|
|
91
|
+
_context.prev = 2;
|
|
92
|
+
_context.next = 5;
|
|
93
|
+
return props.Auth.forgotPassword(email);
|
|
94
|
+
|
|
95
|
+
case 5:
|
|
96
|
+
sessionStorage.setItem("email", JSON.stringify(email));
|
|
97
|
+
sessionStorage.setItem("resetPasswordProcess", JSON.stringify("true"));
|
|
98
|
+
props.setPaso(5);
|
|
99
|
+
setResend(true);
|
|
100
|
+
_context.next = 15;
|
|
101
|
+
break;
|
|
102
|
+
|
|
103
|
+
case 11:
|
|
104
|
+
_context.prev = 11;
|
|
105
|
+
_context.t0 = _context["catch"](2);
|
|
106
|
+
setAwsError(_context.t0.code);
|
|
107
|
+
console.log(_context.t0.message);
|
|
108
|
+
|
|
109
|
+
case 15:
|
|
110
|
+
case "end":
|
|
111
|
+
return _context.stop();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, _callee, null, [[2, 11]]);
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
return function validateResend(_x) {
|
|
118
|
+
return _ref.apply(this, arguments);
|
|
119
|
+
};
|
|
120
|
+
}();
|
|
121
|
+
|
|
122
|
+
(0, _react.useEffect)(function () {
|
|
123
|
+
setInputCodeVerificationAll(document.querySelectorAll("[id^='verificationCodeInput']"));
|
|
124
|
+
}, []);
|
|
125
|
+
var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
126
|
+
className: "credenciales",
|
|
127
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
128
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
129
|
+
color: _variables.GlobalColors.s5,
|
|
130
|
+
text: "Ingresa tus credenciales"
|
|
131
|
+
})
|
|
132
|
+
}, "2"), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
133
|
+
className: "user",
|
|
134
|
+
children: [sessionStorage.getItem("email") && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
135
|
+
text: "Ingrese el c\xF3digo de verificaci\xF3n enviado a: ".concat(JSON.parse(sessionStorage.getItem("email"))),
|
|
136
|
+
headerType: "input-name-header"
|
|
137
|
+
}), !sessionStorage.getItem("email") && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
138
|
+
text: "Ingrese c\xF3digo de verificaci\xF3n enviado a: ".concat(JSON.parse(sessionStorage.getItem("nuevoRegistro")).email),
|
|
139
|
+
headerType: "input-name-header"
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
141
|
+
className: "verification-code",
|
|
142
|
+
children: inputPositions.map(function (position) {
|
|
143
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralInput.GeneralInput, {
|
|
144
|
+
inputId: "verificationCodeInput".concat(position),
|
|
145
|
+
inputType: "text",
|
|
146
|
+
inputPlaceholder: "X",
|
|
147
|
+
validateInput: _utils.validateInput,
|
|
148
|
+
inputsArray: inputCodeVerificationAll,
|
|
149
|
+
position: position,
|
|
150
|
+
maxLength: "1"
|
|
151
|
+
});
|
|
152
|
+
})
|
|
153
|
+
}), emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
154
|
+
children: "Ingrese su c\xF3digo de verificaci\xF3n"
|
|
155
|
+
}), sessionStorage.getItem("resetError") && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
156
|
+
children: "C\xF3digo de verifiaci\xF3n incorrecto"
|
|
157
|
+
}), props.confirmationError === "LimitExceededException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
158
|
+
children: "Haz realizado demasiados intentos, intentalo m\xE1s tarde"
|
|
159
|
+
}), props.confirmationError === "CodeMismatchException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
160
|
+
children: "C\xF3digo de verificaci\xF3n incorrecto"
|
|
161
|
+
}), props.confirmationError === "ExpiredCodeException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
162
|
+
children: "El c\xF3digo ingresado est\xE1 expirado"
|
|
163
|
+
}), props.confirmationError === "InternalErrorException" && !emptyVerificationCode && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
164
|
+
children: "Algo sali\xF3 mal, porfavor vuelva a intentarlo"
|
|
165
|
+
}), awsError === "LimitExceededException" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
166
|
+
children: "Haz realizado demasiados intentos, intentalo m\xE1s tarde"
|
|
167
|
+
}), awsError === "InternalErrorException" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
168
|
+
children: "Algo sali\xF3 mal, porfavor vuelva a intentarlo"
|
|
169
|
+
}), resend && awsError === "" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
170
|
+
className: "resendTrue",
|
|
171
|
+
children: "Se reenvi\xF3 el c\xF3digo de verificaci\xF3n correctamente"
|
|
172
|
+
})]
|
|
173
|
+
}, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
174
|
+
className: "resend-code",
|
|
175
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
176
|
+
onClick: function onClick(e) {
|
|
177
|
+
return validateResend(e);
|
|
178
|
+
},
|
|
179
|
+
children: "Reenviar c\xF3digo de verificaci\xF3n"
|
|
180
|
+
})
|
|
181
|
+
}, "4"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
182
|
+
className: "button-center",
|
|
183
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
184
|
+
buttonType: "general-default-button",
|
|
185
|
+
label: "Enviar",
|
|
186
|
+
onClick: function onClick(e) {
|
|
187
|
+
var flag = (0, _utils.validate)(inputCodeVerificationAll);
|
|
188
|
+
checkCode(e, flag);
|
|
189
|
+
setEmptyVerificationCode(flag);
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
}, "5"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
193
|
+
className: "reset-password",
|
|
194
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
195
|
+
onClick: function onClick() {
|
|
196
|
+
return props.setPaso(10);
|
|
197
|
+
},
|
|
198
|
+
children: "Regresar..."
|
|
199
|
+
})
|
|
200
|
+
}, "6")];
|
|
201
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
202
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
|
|
203
|
+
componentsArray: loginRight,
|
|
204
|
+
panelType: "home-login",
|
|
205
|
+
panelColor: _variables.GlobalColors.white
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
exports.VerificationCodeResetPasswordLogin = VerificationCodeResetPasswordLogin;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 display: flex;\n height: 100vh;\n width: 50%;\n align-items: center;\n justify-content: center;\n .button-center {\n text-align: center;\n .general-default-button {\n width: 160px;\n }\n }\n .reset-password {\n text-align: center;\n margin: 15px !important;\n color: ", ";\n cursor: pointer;\n font-weight: bold;\n font-family: ", ";\n font-size: 13px;\n }\n .resend-code {\n margin-top: 8px !important;\n color: ", ";\n font-family: ", ";\n font-size: 11px;\n text-decoration: underline rgb(228, 81, 172);\n cursor: pointer;\n & + * {\n margin-top: 30px;\n }\n }\n .verification-code {\n display: flex;\n text-align: center;\n margin: auto;\n margin-top: 10px;\n input[type=\"number\"]::-webkit-inner-spin-button,\n input[type=\"number\"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n input {\n width: 70%;\n text-align: center;\n }\n }\n"])), _variables.GlobalColors.secondary_magenta, _variables.FontFamily.Raleway, _variables.GlobalColors.magenta_s2, _variables.FontFamily.AvenirNext);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.validateInput = exports.validate = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {event} e event received triggered by verification code input
|
|
11
|
+
* @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
|
|
12
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
|
|
13
|
+
*/
|
|
14
|
+
var validateInput = function validateInput(e, index, inputsArray) {
|
|
15
|
+
var isValid = false;
|
|
16
|
+
var inputNotEmpty = e.target.value.length > 0;
|
|
17
|
+
|
|
18
|
+
if (inputNotEmpty) {
|
|
19
|
+
if (validateInputNumber(e) !== null) {
|
|
20
|
+
isValid = true;
|
|
21
|
+
nextInputFocus(inputsArray, index++);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return isValid ? e.target.value : "";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param {event} e event received triggered by verification code input
|
|
30
|
+
* @returns {boolean} if digit is a number
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.validateInput = validateInput;
|
|
35
|
+
|
|
36
|
+
var validateInputNumber = function validateInputNumber(e) {
|
|
37
|
+
return (e.target.value || String.fromCharCode(e.keyCode)).match(/[0-9]{1}/);
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to change focus on input change)
|
|
42
|
+
* @param {number} index index position from the verification code(VC) input array (i.e. digit 1,2,3 etc...)
|
|
43
|
+
* changes focus to next input if digit typed is a number and there wasn't any before
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var nextInputFocus = function nextInputFocus(inputsArray, index) {
|
|
48
|
+
var _inputsArray$index;
|
|
49
|
+
|
|
50
|
+
var button = document.getElementsByClassName("general-default-button");
|
|
51
|
+
inputsArray !== null && inputsArray !== void 0 && inputsArray.length && index === (inputsArray === null || inputsArray === void 0 ? void 0 : inputsArray.length) ? button[0].focus() : (_inputsArray$index = inputsArray[index]) === null || _inputsArray$index === void 0 ? void 0 : _inputsArray$index.focus();
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @param {array<html nodes>} inputsArray array which contains every VC digit input (used to check if there's any empty)
|
|
56
|
+
* @param {function} setEmptyVerificationCode function to update flag which handles if there's an empty char
|
|
57
|
+
* updates emptyVerificationFlag from father component
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
var validate = function validate(inputsArray) {
|
|
62
|
+
var contInputEmpty = 0;
|
|
63
|
+
inputsArray.forEach(function (element) {
|
|
64
|
+
element.value === "" ? 0 : contInputEmpty++;
|
|
65
|
+
});
|
|
66
|
+
return contInputEmpty !== inputsArray.length;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.validate = validate;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.
|
|
8
|
+
exports.default = exports.ChangePasswordDefault = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
11
|
|
|
@@ -14,17 +14,15 @@ var _index = require("./index");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: "Components/
|
|
18
|
-
component: _index.
|
|
17
|
+
title: "Components/organisms/ChangePassword",
|
|
18
|
+
component: _index.ChangePassword
|
|
19
19
|
};
|
|
20
20
|
exports.default = _default;
|
|
21
21
|
|
|
22
22
|
var Template = function Template(args) {
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ChangePassword, (0, _objectSpread2.default)({}, args));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
exports.
|
|
28
|
-
|
|
29
|
-
text: "hola mundo"
|
|
30
|
-
};
|
|
26
|
+
var ChangePasswordDefault = Template.bind({});
|
|
27
|
+
exports.ChangePasswordDefault = ChangePasswordDefault;
|
|
28
|
+
ChangePasswordDefault.args = {};
|
|
@@ -0,0 +1,123 @@
|
|
|
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.ChangePassword = void 0;
|
|
9
|
+
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _styles = require("./styles");
|
|
17
|
+
|
|
18
|
+
var _LoginPasswordStrength = require("../../molecules/LoginPasswordStrength");
|
|
19
|
+
|
|
20
|
+
var _react = require("react");
|
|
21
|
+
|
|
22
|
+
var _GeneralButton = require("../../atoms/GeneralButton");
|
|
23
|
+
|
|
24
|
+
var _LogoImage = require("../../atoms/LogoImage");
|
|
25
|
+
|
|
26
|
+
var _ScreenHeader = require("../../atoms/ScreenHeader");
|
|
27
|
+
|
|
28
|
+
var _variables = require("../../../global-files/variables");
|
|
29
|
+
|
|
30
|
+
var _GradientPanel = require("../../atoms/GradientPanel");
|
|
31
|
+
|
|
32
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
|
+
|
|
34
|
+
var ChangePassword = function ChangePassword(props) {
|
|
35
|
+
var _useState = (0, _react.useState)(false),
|
|
36
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
37
|
+
emptyPassword = _useState2[0],
|
|
38
|
+
setEmptyPassword = _useState2[1];
|
|
39
|
+
|
|
40
|
+
var _useState3 = (0, _react.useState)(false),
|
|
41
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
42
|
+
emptyConfirmPassword = _useState4[0],
|
|
43
|
+
setEmptyConfirmPassword = _useState4[1];
|
|
44
|
+
|
|
45
|
+
var _useState5 = (0, _react.useState)(true),
|
|
46
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
47
|
+
matchPasswords = _useState6[0],
|
|
48
|
+
setMatchPasswords = _useState6[1];
|
|
49
|
+
|
|
50
|
+
var validate = /*#__PURE__*/function () {
|
|
51
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
|
|
52
|
+
var password, confirmPassword, valid;
|
|
53
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
54
|
+
while (1) {
|
|
55
|
+
switch (_context.prev = _context.next) {
|
|
56
|
+
case 0:
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
password = document.querySelector("#newPasswordInput").value;
|
|
59
|
+
password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
|
|
60
|
+
confirmPassword = document.querySelector("#confirmPasswordInput").value;
|
|
61
|
+
confirmPassword === "" ? setEmptyConfirmPassword(true) : setEmptyConfirmPassword(false);
|
|
62
|
+
|
|
63
|
+
if (password === confirmPassword) {
|
|
64
|
+
setMatchPasswords(true);
|
|
65
|
+
} else {
|
|
66
|
+
setMatchPasswords(false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
valid = true;
|
|
70
|
+
emptyPassword && (valid = false);
|
|
71
|
+
emptyConfirmPassword && (valid = false);
|
|
72
|
+
!matchPasswords && (valid = false);
|
|
73
|
+
|
|
74
|
+
if (valid) {
|
|
75
|
+
sessionStorage.setItem("newPassword", JSON.stringify(password));
|
|
76
|
+
!sessionStorage.getItem("resetPasswordProcess") ? props.setPaso(9) : props.setPaso(11);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
case 11:
|
|
80
|
+
case "end":
|
|
81
|
+
return _context.stop();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, _callee);
|
|
85
|
+
}));
|
|
86
|
+
|
|
87
|
+
return function validate(_x) {
|
|
88
|
+
return _ref.apply(this, arguments);
|
|
89
|
+
};
|
|
90
|
+
}();
|
|
91
|
+
|
|
92
|
+
var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
93
|
+
className: "credenciales",
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
|
|
95
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
96
|
+
color: _variables.GlobalColors.s5,
|
|
97
|
+
text: "Ingresa tus credenciales"
|
|
98
|
+
})
|
|
99
|
+
}, "2"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoginPasswordStrength.LoginPasswordStrength, {
|
|
100
|
+
emptyPassword: emptyPassword,
|
|
101
|
+
emptyConfirmPassword: emptyConfirmPassword,
|
|
102
|
+
matchPasswords: matchPasswords,
|
|
103
|
+
textTittle: "Ingresa tus credenciales"
|
|
104
|
+
}, "3"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
105
|
+
className: "button-center",
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
107
|
+
buttonType: "general-default-button",
|
|
108
|
+
label: "Enviar",
|
|
109
|
+
onClick: function onClick(e) {
|
|
110
|
+
return validate(e);
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
}, "4")];
|
|
114
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientPanel.GradientPanel, {
|
|
116
|
+
panelColor: _variables.GlobalColors.white,
|
|
117
|
+
componentsArray: loginRight,
|
|
118
|
+
panelType: "home-login"
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
exports.ChangePassword = ChangePassword;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 _templateObject;
|
|
15
|
+
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 50%;\n height: 100vh;\n .button-center {\n display: flex;\n justify-content: center;\n .general-default-button {\n width: 160px;\n }\n }\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -16,46 +16,22 @@ var _AvatarAndValidation = require("../../molecules/AvatarAndValidation");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
18
|
var FullProductNameHeader = function FullProductNameHeader(_ref) {
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
var headerData = _ref.headerData,
|
|
22
|
-
percent = _ref.percent,
|
|
23
|
-
activeRetailer = _ref.activeRetailer,
|
|
24
|
-
setActiveRetailer = _ref.setActiveRetailer,
|
|
25
|
-
approveRejectButtons = _ref.approveRejectButtons,
|
|
26
|
-
sendToFacilitator = _ref.sendToFacilitator,
|
|
27
|
-
auditorAssigned = _ref.auditorAssigned,
|
|
28
|
-
userAssigned = _ref.userAssigned;
|
|
19
|
+
var headerData = _ref.headerData;
|
|
29
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
30
21
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductNameHeader.ProductNameHeader, {
|
|
31
|
-
productName: headerData === null || headerData === void 0 ? void 0 :
|
|
22
|
+
productName: headerData === null || headerData === void 0 ? void 0 : headerData.name,
|
|
32
23
|
statusType: headerData === null || headerData === void 0 ? void 0 : headerData.status,
|
|
33
|
-
percent:
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
percent: headerData === null || headerData === void 0 ? void 0 : headerData.percent,
|
|
25
|
+
backgroundColor: headerData === null || headerData === void 0 ? void 0 : headerData.backgroundColor,
|
|
26
|
+
priority: headerData === null || headerData === void 0 ? void 0 : headerData.priority,
|
|
27
|
+
date: headerData === null || headerData === void 0 ? void 0 : headerData.date
|
|
36
28
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
37
29
|
className: "features-bar-container",
|
|
38
30
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FeaturesBar.FeaturesBar, {
|
|
39
|
-
features:
|
|
40
|
-
feature: "Categoría",
|
|
41
|
-
value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article3 = headerData.article) === null || _headerData$article3 === void 0 ? void 0 : _headerData$article3.category
|
|
42
|
-
}, {
|
|
43
|
-
feature: "Prov",
|
|
44
|
-
value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article4 = headerData.article) === null || _headerData$article4 === void 0 ? void 0 : _headerData$article4.company_name
|
|
45
|
-
}, {
|
|
46
|
-
feature: "UPC",
|
|
47
|
-
value: headerData === null || headerData === void 0 ? void 0 : (_headerData$article5 = headerData.article) === null || _headerData$article5 === void 0 ? void 0 : _headerData$article5.upc
|
|
48
|
-
}]
|
|
31
|
+
features: headerData === null || headerData === void 0 ? void 0 : headerData.features
|
|
49
32
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AvatarAndValidation.AvatarAndValidation, {
|
|
50
|
-
retailers: headerData === null || headerData === void 0 ? void 0 : headerData.retailers,
|
|
51
33
|
avatarData: headerData === null || headerData === void 0 ? void 0 : headerData.avatarData,
|
|
52
|
-
validation: headerData === null || headerData === void 0 ? void 0 : headerData.validation
|
|
53
|
-
activeRetailer: activeRetailer,
|
|
54
|
-
setActiveRetailer: setActiveRetailer,
|
|
55
|
-
approveRejectButtons: approveRejectButtons,
|
|
56
|
-
sendToFacilitator: sendToFacilitator,
|
|
57
|
-
auditorAssigned: auditorAssigned,
|
|
58
|
-
userAssigned: userAssigned
|
|
34
|
+
validation: headerData === null || headerData === void 0 ? void 0 : headerData.validation
|
|
59
35
|
})]
|
|
60
36
|
})]
|
|
61
37
|
});
|
|
@@ -21,17 +21,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
21
|
|
|
22
22
|
var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
23
23
|
var tabsSections = _ref.tabsSections,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
activeTab = _ref.activeTab,
|
|
24
|
+
status = _ref.status,
|
|
25
|
+
profileImage = _ref.profileImage,
|
|
27
26
|
setActiveTab = _ref.setActiveTab,
|
|
28
|
-
setImageLayout = _ref.setImageLayout
|
|
29
|
-
assig = _ref.assig,
|
|
30
|
-
setAssignation = _ref.setAssignation,
|
|
31
|
-
isRetailer = _ref.isRetailer,
|
|
32
|
-
downloadImages = _ref.downloadImages,
|
|
33
|
-
askToDeleteImages = _ref.askToDeleteImages,
|
|
34
|
-
onClickSave = _ref.onClickSave;
|
|
27
|
+
setImageLayout = _ref.setImageLayout;
|
|
35
28
|
|
|
36
29
|
var _useState = (0, _react.useState)(false),
|
|
37
30
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -45,15 +38,9 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
|
|
|
45
38
|
setActiveTab: setActiveTab
|
|
46
39
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusAsignationInfo, {
|
|
47
40
|
status: status,
|
|
48
|
-
|
|
41
|
+
image: profileImage,
|
|
49
42
|
setImageLayout: setImageLayout,
|
|
50
|
-
imagesSection: imagesSection
|
|
51
|
-
assignationsImages: assig,
|
|
52
|
-
setAssignation: setAssignation,
|
|
53
|
-
isRetailer: isRetailer,
|
|
54
|
-
downloadImages: downloadImages,
|
|
55
|
-
onClickSave: onClickSave,
|
|
56
|
-
askToDeleteImages: askToDeleteImages
|
|
43
|
+
imagesSection: imagesSection
|
|
57
44
|
})]
|
|
58
45
|
});
|
|
59
46
|
};
|