contentoh-components-library 21.1.27 → 21.1.30
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/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/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/pages/ProviderProductEdition/index.js +106 -12
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +56 -65
- package/dist/components/pages/RetailerProductEdition/index.js +118 -8
- 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 +1 -1
- 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 +1 -1
- package/src/components/molecules/StatusAsignationInfo/index.js +31 -0
- package/src/components/organisms/FullProductNameHeader/index.js +1 -1
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +1 -1
- package/src/components/pages/ProviderProductEdition/index.js +113 -12
- package/src/components/pages/ProviderProductEdition/styles.js +1 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +57 -68
- package/src/components/pages/RetailerProductEdition/index.js +103 -2
- 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
|
@@ -0,0 +1,270 @@
|
|
|
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.SignInLoginCreationApp = 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 _index = require("../../atoms/LogoImage/index");
|
|
19
|
+
|
|
20
|
+
var _index2 = require("../../atoms/ScreenHeader/index");
|
|
21
|
+
|
|
22
|
+
var _index3 = require("../../atoms/GeneralButton/index");
|
|
23
|
+
|
|
24
|
+
var _index4 = require("../../atoms/CheckBox/index");
|
|
25
|
+
|
|
26
|
+
var _TagAndInput = require("../TagAndInput");
|
|
27
|
+
|
|
28
|
+
var _variables = require("../../../global-files/variables");
|
|
29
|
+
|
|
30
|
+
var _react = require("react");
|
|
31
|
+
|
|
32
|
+
var _Loading = require("../../atoms/Loading");
|
|
33
|
+
|
|
34
|
+
var _reactRouterDom = require("react-router-dom");
|
|
35
|
+
|
|
36
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
37
|
+
|
|
38
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
39
|
+
|
|
40
|
+
var SignInLoginCreationApp = function SignInLoginCreationApp(props) {
|
|
41
|
+
var _useState = (0, _react.useState)(false),
|
|
42
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
|
+
emptyEmail = _useState2[0],
|
|
44
|
+
setEmptyEmail = _useState2[1];
|
|
45
|
+
|
|
46
|
+
var _useState3 = (0, _react.useState)(false),
|
|
47
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
48
|
+
invalidEmail = _useState4[0],
|
|
49
|
+
setInvalidEmail = _useState4[1];
|
|
50
|
+
|
|
51
|
+
var _useState5 = (0, _react.useState)(false),
|
|
52
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
53
|
+
emptyPassword = _useState6[0],
|
|
54
|
+
setEmptyPassword = _useState6[1];
|
|
55
|
+
|
|
56
|
+
var _useState7 = (0, _react.useState)(true),
|
|
57
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
58
|
+
showErrors = _useState8[0],
|
|
59
|
+
setShowErrors = _useState8[1];
|
|
60
|
+
|
|
61
|
+
var _useState9 = (0, _react.useState)(""),
|
|
62
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
63
|
+
signInError = _useState10[0],
|
|
64
|
+
setSignInError = _useState10[1];
|
|
65
|
+
|
|
66
|
+
var _useState11 = (0, _react.useState)(false),
|
|
67
|
+
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
68
|
+
loading = _useState12[0],
|
|
69
|
+
setLoading = _useState12[1];
|
|
70
|
+
|
|
71
|
+
var _useState13 = (0, _react.useState)(false),
|
|
72
|
+
_useState14 = (0, _slicedToArray2.default)(_useState13, 2),
|
|
73
|
+
upgradePlanRedirect = _useState14[0],
|
|
74
|
+
setUpgradePlanRedirect = _useState14[1];
|
|
75
|
+
|
|
76
|
+
var validate = /*#__PURE__*/function () {
|
|
77
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
|
|
78
|
+
var valid, email, password, session, userGroup, response, userGroupValue, user, company;
|
|
79
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
80
|
+
while (1) {
|
|
81
|
+
switch (_context.prev = _context.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
setSignInError("");
|
|
85
|
+
setShowErrors(true);
|
|
86
|
+
valid = true;
|
|
87
|
+
email = document.querySelector("#emailInput").value.trim();
|
|
88
|
+
password = document.querySelector("#passwordInput").value;
|
|
89
|
+
!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email) ? setInvalidEmail(true) : setInvalidEmail(false);
|
|
90
|
+
|
|
91
|
+
if (email === "") {
|
|
92
|
+
valid = false;
|
|
93
|
+
setEmptyEmail(true);
|
|
94
|
+
} else {
|
|
95
|
+
setEmptyEmail(false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (password === "") {
|
|
99
|
+
valid = false;
|
|
100
|
+
setEmptyPassword(true);
|
|
101
|
+
} else {
|
|
102
|
+
setEmptyPassword(false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!valid) {
|
|
106
|
+
_context.next = 35;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_context.prev = 10;
|
|
111
|
+
setLoading(true);
|
|
112
|
+
_context.next = 14;
|
|
113
|
+
return props.Auth.signIn(email, password);
|
|
114
|
+
|
|
115
|
+
case 14:
|
|
116
|
+
session = _context.sent;
|
|
117
|
+
|
|
118
|
+
if (!(session.challengeName === "NEW_PASSWORD_REQUIRED")) {
|
|
119
|
+
_context.next = 20;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
props.setUser(session);
|
|
124
|
+
props.setPaso(8);
|
|
125
|
+
_context.next = 28;
|
|
126
|
+
break;
|
|
127
|
+
|
|
128
|
+
case 20:
|
|
129
|
+
userGroup = session.signInUserSession.accessToken.payload["cognito:groups"];
|
|
130
|
+
_context.next = 23;
|
|
131
|
+
return _axios.default.get(process.env.REACT_APP_USER_ENDPOINT, {
|
|
132
|
+
headers: {
|
|
133
|
+
Authorization: session.signInUserSession.idToken.jwtToken
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
case 23:
|
|
138
|
+
response = _context.sent;
|
|
139
|
+
console.log(userGroup);
|
|
140
|
+
console.log(userGroup[0]);
|
|
141
|
+
userGroupValue = typeof userGroup === "string" ? userGroup : userGroup[0];
|
|
142
|
+
|
|
143
|
+
if (userGroupValue === "colaboradores_contentoh") {
|
|
144
|
+
sessionStorage.setItem("auth", true);
|
|
145
|
+
sessionStorage.setItem("jwt", session.signInUserSession.idToken.jwtToken);
|
|
146
|
+
user = JSON.parse(response.data.body).data[0];
|
|
147
|
+
company = JSON.parse(response.data.body).data[1];
|
|
148
|
+
caches.keys().then(function (names) {
|
|
149
|
+
names.forEach(function (name) {
|
|
150
|
+
caches.delete(name);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
user.src = "https://".concat(process.env.REACT_APP_IMAGES_PROFILE_BUCKET, ".s3.amazonaws.com/id-").concat(user.id_user, "/").concat(user.id_user, ".png?").concat(new Date().getTime());
|
|
154
|
+
sessionStorage.setItem("user", JSON.stringify(user));
|
|
155
|
+
sessionStorage.setItem("company", JSON.stringify(company));
|
|
156
|
+
setUpgradePlanRedirect(true);
|
|
157
|
+
} else {
|
|
158
|
+
setSignInError("NotAuthorizedException");
|
|
159
|
+
setLoading(false);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
case 28:
|
|
163
|
+
_context.next = 35;
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
case 30:
|
|
167
|
+
_context.prev = 30;
|
|
168
|
+
_context.t0 = _context["catch"](10);
|
|
169
|
+
console.log(_context.t0);
|
|
170
|
+
setLoading(false);
|
|
171
|
+
|
|
172
|
+
if (_context.t0.code === "NotAuthorizedException") {
|
|
173
|
+
setSignInError("NotAuthorizedException");
|
|
174
|
+
} else if (_context.t0.code === "UserNotConfirmedException") {
|
|
175
|
+
sessionStorage.setItem("email", JSON.stringify(document.querySelector("#usernameInput").value));
|
|
176
|
+
props.setPaso(5);
|
|
177
|
+
} else {
|
|
178
|
+
setSignInError("Error");
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
case 35:
|
|
182
|
+
case "end":
|
|
183
|
+
return _context.stop();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}, _callee, null, [[10, 30]]);
|
|
187
|
+
}));
|
|
188
|
+
|
|
189
|
+
return function validate(_x) {
|
|
190
|
+
return _ref.apply(this, arguments);
|
|
191
|
+
};
|
|
192
|
+
}();
|
|
193
|
+
|
|
194
|
+
(0, _react.useEffect)(function () {
|
|
195
|
+
sessionStorage.getItem("resetPasswordProcess") && sessionStorage.removeItem("resetPasswordProcess");
|
|
196
|
+
}, []);
|
|
197
|
+
(0, _react.useEffect)(function () {
|
|
198
|
+
if (upgradePlanRedirect) setLoading(false);
|
|
199
|
+
}, [upgradePlanRedirect]);
|
|
200
|
+
return loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
201
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
202
|
+
className: "home-login",
|
|
203
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
204
|
+
className: "main-container",
|
|
205
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LogoImage, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
206
|
+
className: "credenciales",
|
|
207
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.ScreenHeader, {
|
|
208
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
209
|
+
color: _variables.GlobalColors.s5,
|
|
210
|
+
text: "Ingresa tus credenciales"
|
|
211
|
+
})
|
|
212
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
213
|
+
className: "user",
|
|
214
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
215
|
+
inputType: "text",
|
|
216
|
+
label: "Nombre de usuario",
|
|
217
|
+
inputPlaceHolder: "username@contentoh.com",
|
|
218
|
+
inputId: "emailInput"
|
|
219
|
+
})
|
|
220
|
+
}), showErrors && emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
221
|
+
children: "Ingrese su correo"
|
|
222
|
+
}), invalidEmail && !emptyEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
223
|
+
children: "Ingrese un correo v\xE1lido"
|
|
224
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
225
|
+
className: "password",
|
|
226
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
227
|
+
inputType: "password",
|
|
228
|
+
label: "Contraseña",
|
|
229
|
+
inputPlaceHolder: "Escribe tu contraseña",
|
|
230
|
+
inputId: "passwordInput"
|
|
231
|
+
})
|
|
232
|
+
}), showErrors && emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
233
|
+
children: "Ingrese su contrase\xF1a"
|
|
234
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
235
|
+
className: "select",
|
|
236
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.CheckBox, {
|
|
237
|
+
label: "Mantener sesión activada",
|
|
238
|
+
id: "chk-default",
|
|
239
|
+
className: "active-left"
|
|
240
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
241
|
+
onClick: function onClick() {
|
|
242
|
+
return props.setPaso(10);
|
|
243
|
+
},
|
|
244
|
+
className: "active-right",
|
|
245
|
+
children: "Olvide mi contrase\xF1a"
|
|
246
|
+
})]
|
|
247
|
+
}), showErrors && signInError === "NotAuthorizedException" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
248
|
+
children: "Correo o contrase\xF1a incorrectos"
|
|
249
|
+
}), showErrors && signInError === "Error" && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
250
|
+
children: "Ha habido un problema al iniciar sesi\xF3n"
|
|
251
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
252
|
+
className: "button-right",
|
|
253
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Button, {
|
|
254
|
+
buttonType: "general-default-button",
|
|
255
|
+
label: "Iniciar sesión",
|
|
256
|
+
onClick: function onClick(e) {
|
|
257
|
+
return validate(e);
|
|
258
|
+
}
|
|
259
|
+
})
|
|
260
|
+
})]
|
|
261
|
+
})
|
|
262
|
+
}), upgradePlanRedirect && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
|
|
263
|
+
to: {
|
|
264
|
+
pathname: "/dashboard"
|
|
265
|
+
}
|
|
266
|
+
})]
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
exports.SignInLoginCreationApp = SignInLoginCreationApp;
|
|
@@ -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 background: \"white\";\n display: flex;\n height: 100vh;\n width: 50%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n & + * {\n margin-top: 12px;\n }\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n cursor: pointer;\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n cursor: pointer;\n span {\n color: ", ";\n }\n }\n }\n }\n .main-container {\n max-width: 80%;\n max-height: 80%;\n }\n"])), _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.secondary_magenta);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -25,6 +25,16 @@ var _index3 = require("../../atoms/AsignationOption/index");
|
|
|
25
25
|
|
|
26
26
|
var _data = require("../../../global-files/data");
|
|
27
27
|
|
|
28
|
+
var _SliderToolTip = require("../../atoms/SliderToolTip");
|
|
29
|
+
|
|
30
|
+
var _infoIcon = _interopRequireDefault(require("../../../assets/images/sliderToolTip/infoIcon.svg"));
|
|
31
|
+
|
|
32
|
+
var _slide = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide21.svg"));
|
|
33
|
+
|
|
34
|
+
var _slide2 = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide22.svg"));
|
|
35
|
+
|
|
36
|
+
var _slide3 = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide23.svg"));
|
|
37
|
+
|
|
28
38
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
39
|
|
|
30
40
|
var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
@@ -68,6 +78,19 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
68
78
|
}
|
|
69
79
|
};
|
|
70
80
|
|
|
81
|
+
var slidefront = [{
|
|
82
|
+
slide: _slide.default,
|
|
83
|
+
title: "Valida tu producto en cada activo digital",
|
|
84
|
+
description: "Al solicitar a Content-oh! podrás validar la información, imágenes y documentación de tu producto, esto hará más sencillo que puedas aprobar o rechazar el contenido."
|
|
85
|
+
}, {
|
|
86
|
+
slide: _slide2.default,
|
|
87
|
+
title: "Aprueba o rechaza con un clic",
|
|
88
|
+
description: "Cuando termines de revisar tu información, elige si aproebas o rechazas, esto enviara una notificiación a nuestro equipo, para continuar o corregir el producto."
|
|
89
|
+
}, {
|
|
90
|
+
slide: _slide3.default,
|
|
91
|
+
title: "Estatus de tu producto en el proceso",
|
|
92
|
+
description: "La mayor parte del proceso podrás identificar que estatus tiene tu producto, esto dara visibilidad a todo tu equipo para saber la etapa se encuentra."
|
|
93
|
+
}];
|
|
71
94
|
(0, _react.useEffect)(function () {
|
|
72
95
|
if (showAsignationPanel) {
|
|
73
96
|
document.addEventListener("click", closeAsignations, false);
|
|
@@ -75,7 +98,12 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
|
|
|
75
98
|
}, [showAsignationPanel]);
|
|
76
99
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
77
100
|
id: id,
|
|
78
|
-
children: [
|
|
101
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SliderToolTip.SliderToolTip, {
|
|
102
|
+
infoIcon: _infoIcon.default,
|
|
103
|
+
slidefront: slidefront,
|
|
104
|
+
iconSize: "medium-image",
|
|
105
|
+
slidePosition: "bottom-slide"
|
|
106
|
+
}), status !== "-" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusTag, {
|
|
79
107
|
statusType: status,
|
|
80
108
|
ovalForm: true
|
|
81
109
|
}), showSaveButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
@@ -81,6 +81,20 @@ var _errorModal = _interopRequireDefault(require("../../../assets/images/generic
|
|
|
81
81
|
|
|
82
82
|
var _index2 = require("../../organisms/GlobalModal/index");
|
|
83
83
|
|
|
84
|
+
var _SliderToolTip = require("../../atoms/SliderToolTip");
|
|
85
|
+
|
|
86
|
+
var _infoIcon = _interopRequireDefault(require("../../../assets/images/sliderToolTip/infoIcon.svg"));
|
|
87
|
+
|
|
88
|
+
var _slide = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide1.svg"));
|
|
89
|
+
|
|
90
|
+
var _slide2 = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide2.svg"));
|
|
91
|
+
|
|
92
|
+
var _slide3 = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide3.svg"));
|
|
93
|
+
|
|
94
|
+
var _slide4 = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide4.svg"));
|
|
95
|
+
|
|
96
|
+
var _slide5 = _interopRequireDefault(require("../../../assets/images/sliderToolTip/slide5.svg"));
|
|
97
|
+
|
|
84
98
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
85
99
|
|
|
86
100
|
var reducerImages = function reducerImages(state, action) {
|
|
@@ -1437,9 +1451,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1437
1451
|
case 11:
|
|
1438
1452
|
productTemp = product;
|
|
1439
1453
|
productTemp.article_status = "".concat(result, "C");
|
|
1440
|
-
productTemp.datasheet_status = "".concat(result, "C");
|
|
1441
|
-
productTemp.description_status = "".concat(result, "C");
|
|
1442
|
-
productTemp.images_status = "".concat(result, "C");
|
|
1454
|
+
productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : "".concat(result, "C");
|
|
1455
|
+
productTemp.description_status = productTemp.description_status === "NA" ? "NA" : "".concat(result, "C");
|
|
1456
|
+
productTemp.images_status = productTemp.images_status === "NA" ? "NA" : "".concat(result, "C");
|
|
1443
1457
|
setProduct(productTemp);
|
|
1444
1458
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1445
1459
|
setProductEdit({
|
|
@@ -1544,6 +1558,23 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1544
1558
|
(0, _react.useEffect)(function () {
|
|
1545
1559
|
setSaving(loading);
|
|
1546
1560
|
}, [loading]);
|
|
1561
|
+
var slidefront = [{
|
|
1562
|
+
slide: _slide.default,
|
|
1563
|
+
description: "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."
|
|
1564
|
+
}, {
|
|
1565
|
+
slide: _slide2.default,
|
|
1566
|
+
description: "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."
|
|
1567
|
+
}, {
|
|
1568
|
+
slide: _slide3.default,
|
|
1569
|
+
description: "Revisa el contenido que deseas solicilitar, valida y tambien puedes agregar contenido extra, traducciones, o simplemente completar el checkout."
|
|
1570
|
+
}, {
|
|
1571
|
+
slide: _slide4.default,
|
|
1572
|
+
description: "Elige el tipo de entrega de tu producto, puedes ser recolección en el lugar o por el contrario puedes dejarlo en nuestras oficinas."
|
|
1573
|
+
}, {
|
|
1574
|
+
slide: _slide5.default,
|
|
1575
|
+
title: "Bienvenido al modo Content-oh!",
|
|
1576
|
+
description: "Finalmente elige la forma de pago que más te guste, procede con el pago y listo."
|
|
1577
|
+
}];
|
|
1547
1578
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
1548
1579
|
headerTop: headerTop,
|
|
1549
1580
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderTop.HeaderTop, {
|
|
@@ -1581,12 +1612,68 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1581
1612
|
setActiveRetailer: setActiveRetailer,
|
|
1582
1613
|
showValidationButtons: isRevision() && getSectionStatus(),
|
|
1583
1614
|
servicesData: servicesData ? servicesData : null,
|
|
1584
|
-
showApproveRejectAll:
|
|
1615
|
+
showApproveRejectAll: isRevision() && getSectionStatus(),
|
|
1585
1616
|
approveAll: function approveAll() {
|
|
1586
|
-
|
|
1617
|
+
if (originProp === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
1618
|
+
setDataGenericModal(function (prev) {
|
|
1619
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1620
|
+
button2: {
|
|
1621
|
+
name: "Continuar",
|
|
1622
|
+
action: function action() {
|
|
1623
|
+
return evaluationToRetailer("A");
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
});
|
|
1627
|
+
});
|
|
1628
|
+
setShowGenericModal(true);
|
|
1629
|
+
} else {
|
|
1630
|
+
if (user.is_retailer) {
|
|
1631
|
+
if (product.id_order || product.orderId) {
|
|
1632
|
+
validateAll("A");
|
|
1633
|
+
} else {
|
|
1634
|
+
setDataGenericModal(function (prev) {
|
|
1635
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1636
|
+
button2: {
|
|
1637
|
+
name: "Continuar",
|
|
1638
|
+
action: function action() {
|
|
1639
|
+
return evaluationToRetailer("A");
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1643
|
+
});
|
|
1644
|
+
setShowGenericModal(true);
|
|
1645
|
+
}
|
|
1646
|
+
} else {
|
|
1647
|
+
validateAll("A");
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1587
1650
|
},
|
|
1588
1651
|
rejectAll: function rejectAll() {
|
|
1589
|
-
|
|
1652
|
+
if (originProp === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
1653
|
+
return;
|
|
1654
|
+
} else {
|
|
1655
|
+
if (user.is_retailer) {
|
|
1656
|
+
if (product.id_order || product.orderId) {
|
|
1657
|
+
validateAll("R");
|
|
1658
|
+
setModalViewError(true);
|
|
1659
|
+
} else {
|
|
1660
|
+
setDataGenericModal(function (prev) {
|
|
1661
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, {
|
|
1662
|
+
button2: {
|
|
1663
|
+
name: "Continuar",
|
|
1664
|
+
action: function action() {
|
|
1665
|
+
return evaluationToRetailer("R");
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
});
|
|
1669
|
+
});
|
|
1670
|
+
setShowGenericModal(true);
|
|
1671
|
+
}
|
|
1672
|
+
} else {
|
|
1673
|
+
validateAll("R");
|
|
1674
|
+
setModalViewError(true);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1590
1677
|
},
|
|
1591
1678
|
approve: function approve() {
|
|
1592
1679
|
if (origin[activeTab] === "RequestWithoutContentoh" && !user.is_retailer && (!product.id_order || !product.orderId)) {
|
|
@@ -1795,12 +1882,19 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1795
1882
|
children: "Ir a checkout"
|
|
1796
1883
|
})]
|
|
1797
1884
|
})
|
|
1798
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1885
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1886
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SliderToolTip.SliderToolTip, {
|
|
1887
|
+
infoIcon: _infoIcon.default,
|
|
1888
|
+
slidefront: slidefront,
|
|
1889
|
+
iconSize: "big-image",
|
|
1890
|
+
slidePosition: "top-slide"
|
|
1891
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
|
|
1892
|
+
onClick: function onClick() {
|
|
1893
|
+
setShowContentohRequestModal && setShowContentohRequestModal(true);
|
|
1894
|
+
},
|
|
1895
|
+
buttonType: "general-default-button",
|
|
1896
|
+
label: "Enviar a Content-oh!"
|
|
1897
|
+
})]
|
|
1804
1898
|
})]
|
|
1805
1899
|
})]
|
|
1806
1900
|
})]
|
|
@@ -31,70 +31,61 @@ RetailerProductEditionDefault.args = {
|
|
|
31
31
|
"Ficha técnica": false,
|
|
32
32
|
Imágenes: false
|
|
33
33
|
},
|
|
34
|
-
token: "
|
|
35
|
-
articleId: 238,
|
|
36
|
-
category: 846,
|
|
37
|
-
version: 2,
|
|
34
|
+
token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiYzk0YTczMDUtOTM2NS00NmZmLWE0MjMtNGI0YmMzYjhiMTgwIiwiY29nbml0bzpyb2xlcyI6WyJhcm46YXdzOmlhbTo6ODk4NjcwMjMyODA3OnJvbGVcL2NvbnRlbnRvaC1kZXYtdXMtZWFzdC0xLWxhbWJkYVJvbGUiXSwiYXVkIjoiNWFjOHRwZ3M2Z2JzcTEzZnJ2cnBpZWVwNDAiLCJldmVudF9pZCI6ImExY2QwOGQ3LTM0MTgtNGI0ZC1hODNmLTJlOWE0N2E2ZTQzYSIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU2Mzc1MzQ5LCJuYW1lIjoiQ29sYWJvcmFkb3IiLCJwaG9uZV9udW1iZXIiOiIrNTIxMTExIiwiZXhwIjoxNjU2Mzc4OTQ5LCJpYXQiOjE2NTYzNzUzNDksImVtYWlsIjoic2FsbWVyb24uNUBob3RtYWlsLmNvbSJ9.AXD7CR-3bJz6vIdBBNB_3xLfaTvlFjHi-cwKdN5qCUSY4msnf1a1RhMEThL3wt7fXi15dy5Fy5b_7zgkWc_NY35Otu1ifQNmSxemncx5qFsNsBH6OvIaZrhiw7XXkfQF20w22f4o8VFW1u0cWudFBYYm6tXlKVEetw-NEu94Mnip0BtQQUU6rFjz5hQM0gWYsvOMmSX3JKQWl4thirzTOqJxrKebFeWnUMs5D3hlFpKeBSKodgB6lLw2522SJmxWXmGCaDOVSMUP9LqB9PsboSOBfSeQpkbIZqd9iNWbrFCusGhnoRrQABucqFwlQ6KPHYTPaOOux-X3pf6i5woX4g",
|
|
38
35
|
productSelected: {
|
|
39
36
|
services: {
|
|
40
37
|
datasheets: 1,
|
|
41
38
|
descriptions: 1,
|
|
42
39
|
images: 1
|
|
43
40
|
},
|
|
44
|
-
orderId:
|
|
45
|
-
status: "
|
|
46
|
-
datasheet_status: "
|
|
47
|
-
prio: "
|
|
48
|
-
version:
|
|
49
|
-
description_status: "
|
|
50
|
-
images_status: "
|
|
41
|
+
orderId: 64,
|
|
42
|
+
status: "AF",
|
|
43
|
+
datasheet_status: "AF",
|
|
44
|
+
prio: "none",
|
|
45
|
+
version: 7,
|
|
46
|
+
description_status: "AF",
|
|
47
|
+
images_status: "AF",
|
|
51
48
|
article: {
|
|
52
|
-
id_article:
|
|
53
|
-
id_category: "
|
|
54
|
-
name: "
|
|
55
|
-
upc: "
|
|
56
|
-
timestamp: "
|
|
57
|
-
id_user:
|
|
58
|
-
status: "
|
|
49
|
+
id_article: 35707,
|
|
50
|
+
id_category: "41",
|
|
51
|
+
name: "chetos",
|
|
52
|
+
upc: "1010101010",
|
|
53
|
+
timestamp: "2022-06-16T18:12:42.000Z",
|
|
54
|
+
id_user: 28,
|
|
55
|
+
status: "NULL",
|
|
59
56
|
active: 1,
|
|
60
|
-
company_id:
|
|
61
|
-
company_name: "
|
|
62
|
-
country: "
|
|
63
|
-
id_order:
|
|
64
|
-
id_datasheet_especialist:
|
|
65
|
-
id_datasheet_facilitator:
|
|
66
|
-
id_description_especialist:
|
|
67
|
-
id_description_facilitator:
|
|
68
|
-
id_images_especialist:
|
|
69
|
-
id_images_facilitator:
|
|
70
|
-
id_auditor:
|
|
57
|
+
company_id: 1,
|
|
58
|
+
company_name: "COMPANY DEV",
|
|
59
|
+
country: "México",
|
|
60
|
+
id_order: 64,
|
|
61
|
+
id_datasheet_especialist: 54,
|
|
62
|
+
id_datasheet_facilitator: 52,
|
|
63
|
+
id_description_especialist: 54,
|
|
64
|
+
id_description_facilitator: 52,
|
|
65
|
+
id_images_especialist: 55,
|
|
66
|
+
id_images_facilitator: 53,
|
|
67
|
+
id_auditor: 30,
|
|
71
68
|
id_recepcionist: null,
|
|
72
|
-
category: "
|
|
73
|
-
missingAttributes:
|
|
74
|
-
missingDescriptions:
|
|
75
|
-
missingImages:
|
|
69
|
+
category: "ABARROTES|BOTANAS, GOLOSINAS Y CHOCOLATES|BOTANAS",
|
|
70
|
+
missingAttributes: null,
|
|
71
|
+
missingDescriptions: null,
|
|
72
|
+
missingImages: null
|
|
76
73
|
},
|
|
77
74
|
retailers: [{
|
|
78
|
-
id:
|
|
79
|
-
name: "
|
|
80
|
-
country: "México",
|
|
81
|
-
id_region: 1,
|
|
82
|
-
active: 1
|
|
83
|
-
}, {
|
|
84
|
-
id: 6,
|
|
85
|
-
name: "HEB",
|
|
75
|
+
id: 3,
|
|
76
|
+
name: "Sam´s Club",
|
|
86
77
|
country: "México",
|
|
87
78
|
id_region: 1,
|
|
88
79
|
active: 1
|
|
89
80
|
}, {
|
|
90
|
-
id:
|
|
91
|
-
name: "
|
|
81
|
+
id: 8,
|
|
82
|
+
name: "Fragua",
|
|
92
83
|
country: "México",
|
|
93
84
|
id_region: 1,
|
|
94
85
|
active: 1
|
|
95
86
|
}],
|
|
96
|
-
country: "
|
|
97
|
-
upc: "
|
|
87
|
+
country: "México",
|
|
88
|
+
upc: "1010101010"
|
|
98
89
|
},
|
|
99
90
|
location: {
|
|
100
91
|
product: {
|
|
@@ -103,36 +94,36 @@ RetailerProductEditionDefault.args = {
|
|
|
103
94
|
}
|
|
104
95
|
},
|
|
105
96
|
user: {
|
|
106
|
-
id_user:
|
|
107
|
-
name: "
|
|
108
|
-
last_name: "
|
|
109
|
-
email: "
|
|
110
|
-
position: "
|
|
97
|
+
id_user: 30,
|
|
98
|
+
name: "Admin",
|
|
99
|
+
last_name: "Ulises",
|
|
100
|
+
email: "salmeron.5@hotmail.com",
|
|
101
|
+
position: "Admin",
|
|
111
102
|
telephone: null,
|
|
112
|
-
country:
|
|
113
|
-
id_company:
|
|
114
|
-
id_cognito: "
|
|
103
|
+
country: "México",
|
|
104
|
+
id_company: 2,
|
|
105
|
+
id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
|
|
115
106
|
birth_Date: null,
|
|
116
107
|
about_me: null,
|
|
117
108
|
zip_code: null,
|
|
118
109
|
address: null,
|
|
119
110
|
job: null,
|
|
120
111
|
id_stripe: null,
|
|
121
|
-
id_role:
|
|
112
|
+
id_role: 6,
|
|
122
113
|
active: 1,
|
|
123
114
|
is_retailer: 0,
|
|
124
|
-
email_notify:
|
|
115
|
+
email_notify: 0,
|
|
125
116
|
membership: {
|
|
126
|
-
id:
|
|
127
|
-
start_date: "
|
|
128
|
-
end_date: "
|
|
129
|
-
planID:
|
|
130
|
-
plan: "
|
|
131
|
-
name: "Plan
|
|
132
|
-
user_limit: "
|
|
133
|
-
products_limit: "
|
|
134
|
-
type: "
|
|
117
|
+
id: 2,
|
|
118
|
+
start_date: "2021-11-05T02:35:12.000Z",
|
|
119
|
+
end_date: "2022-11-05T02:34:49.000Z",
|
|
120
|
+
planID: 1,
|
|
121
|
+
plan: "prod_KtkvuFFLpOdP6e",
|
|
122
|
+
name: "Plan Free",
|
|
123
|
+
user_limit: "1",
|
|
124
|
+
products_limit: "3",
|
|
125
|
+
type: "PyMES"
|
|
135
126
|
},
|
|
136
|
-
src: "https://content-management-profile
|
|
127
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1656375350443"
|
|
137
128
|
}
|
|
138
129
|
};
|