contentoh-components-library 21.0.97 → 21.1.0

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.
Files changed (23) hide show
  1. package/dist/components/atoms/AsignationOption/index.js +1 -11
  2. package/dist/components/atoms/GeneralInput/index.js +13 -7
  3. package/dist/components/molecules/LoginPasswordStrength/index.js +8 -13
  4. package/dist/components/molecules/TagAndInput/index.js +4 -2
  5. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  6. package/dist/components/pages/ChangePasswordLogin/index.js +12 -35
  7. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +115 -61
  8. package/dist/components/pages/ProviderProductEdition/index.js +9 -16
  9. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +35 -47
  10. package/dist/components/pages/RetailerProductEdition/index.js +25 -25
  11. package/dist/global-files/data.js +2 -0
  12. package/package.json +1 -1
  13. package/src/components/atoms/AsignationOption/index.js +2 -8
  14. package/src/components/atoms/GeneralInput/index.js +11 -6
  15. package/src/components/molecules/LoginPasswordStrength/index.js +6 -16
  16. package/src/components/molecules/TagAndInput/index.js +2 -0
  17. package/src/components/organisms/FullProductNameHeader/index.js +5 -1
  18. package/src/components/pages/ChangePasswordLogin/index.js +1 -2
  19. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +130 -62
  20. package/src/components/pages/ProviderProductEdition/index.js +9 -11
  21. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +35 -49
  22. package/src/components/pages/RetailerProductEdition/index.js +14 -5
  23. package/src/global-files/data.js +2 -0
@@ -43,17 +43,7 @@ var AsignationOption = function AsignationOption(_ref) {
43
43
  services.forEach(function (srv) {
44
44
  return servCad += srv;
45
45
  });
46
-
47
- switch (servCad) {
48
- case "NANANA":
49
- return "NA";
50
-
51
- case "RECEIVEDRECEIVEDRECEIVED":
52
- return "RECEIVED";
53
-
54
- default:
55
- return (0, _data.getNewStatus)(services);
56
- }
46
+ return (0, _data.getNewStatus)(services);
57
47
  };
58
48
 
59
49
  var iconsAsignation = {
@@ -39,7 +39,8 @@ var GeneralInput = function GeneralInput(_ref) {
39
39
  version = _ref.version,
40
40
  _ref$optionList = _ref.optionList,
41
41
  optionList = _ref$optionList === void 0 ? [] : _ref$optionList,
42
- description = _ref.description;
42
+ description = _ref.description,
43
+ inputOnChange = _ref.inputOnChange;
43
44
 
44
45
  var _useState = (0, _react.useState)({
45
46
  value: inputValue
@@ -55,14 +56,15 @@ var GeneralInput = function GeneralInput(_ref) {
55
56
 
56
57
  var onHandleChange = function onHandleChange(evt) {
57
58
  if (validateInput) {
59
+ console.log("here");
58
60
  setTextValue({
59
61
  value: validateInput(evt, position, inputsArray)
60
62
  });
61
- } else {
63
+ } else if (updatedDatasheets || updatedDescriptions) {
62
64
  setTextValue({
63
65
  value: inputType === "checkbox" ? evt.target.checked : evt.target.value
64
66
  });
65
- var dataSave = updatedDatasheets.slice();
67
+ var dataSave = updatedDatasheets === null || updatedDatasheets === void 0 ? void 0 : updatedDatasheets.slice();
66
68
  if (dataSave.length === 0) dataSave.push({
67
69
  articleId: articleId,
68
70
  versionId: version,
@@ -85,6 +87,11 @@ var GeneralInput = function GeneralInput(_ref) {
85
87
  });
86
88
  }
87
89
  setUpdatedDatasheets(dataSave);
90
+ } else {
91
+ setTextValue({
92
+ value: evt.target.value
93
+ });
94
+ inputOnChange && inputOnChange(evt);
88
95
  }
89
96
  };
90
97
 
@@ -103,15 +110,14 @@ var GeneralInput = function GeneralInput(_ref) {
103
110
  },
104
111
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
105
112
  value: "",
106
- selected: true,
107
113
  disabled: true,
108
114
  children: description
109
- }), JSON.parse(optionList || "[]").map(function (element) {
115
+ }), JSON.parse(optionList || "[]").map(function (element, index) {
110
116
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
111
117
  value: element,
112
- selected: element === textValue.value ? "selected" : "",
118
+ defaultValue: element === textValue.value ? "selected" : "",
113
119
  children: element
114
- }, element);
120
+ }, element + "-" + index);
115
121
  })]
116
122
  }, "dropdownK".concat(inputId)) : inputType === "checkbox" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.CheckBox, {
117
123
  id: inputId,
@@ -31,32 +31,26 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
31
31
  var upperCaseLetters = /[A-Z]/g;
32
32
  var numbers = /[0-9]/g;
33
33
  var specialChar = /[‘!’,‘@’,‘#’,‘$’,‘%’,‘^’,‘&’,‘*’]/g;
34
- (0, _react.useEffect)(function () {
35
- var inputValue = document.getElementById("newPasswordInput");
36
- inputValue.addEventListener("input", function (e) {
37
- updateInfo(e, e.target.value);
38
- }, false);
39
- }, []);
40
-
41
- var updateInfo = function updateInfo(e, newValue) {
34
+
35
+ var updateInfo = function updateInfo(e) {
42
36
  switch (e.target.id) {
43
37
  case "newPasswordInput":
44
38
  setPasswordStrength(0);
45
39
 
46
- if (newValue.length >= 8) {
40
+ if (e.target.value.length >= 8) {
47
41
  setPasswordStrength(function (passwordStrength) {
48
42
  return passwordStrength + 1;
49
43
  });
50
44
  } //Verificar si la contraseña contiene mayuscula, numeros y un caracter especial
51
45
 
52
46
 
53
- newValue.match(upperCaseLetters) && setPasswordStrength(function (passwordStrength) {
47
+ e.target.value.match(upperCaseLetters) && setPasswordStrength(function (passwordStrength) {
54
48
  return passwordStrength + 1;
55
49
  });
56
- newValue.match(numbers) && setPasswordStrength(function (passwordStrength) {
50
+ e.target.value.match(numbers) && setPasswordStrength(function (passwordStrength) {
57
51
  return passwordStrength + 1;
58
52
  });
59
- newValue.match(specialChar) && setPasswordStrength(function (passwordStrength) {
53
+ e.target.value.match(specialChar) && setPasswordStrength(function (passwordStrength) {
60
54
  return passwordStrength + 1;
61
55
  });
62
56
  break;
@@ -73,7 +67,8 @@ var LoginPasswordStrength = function LoginPasswordStrength(_ref) {
73
67
  inputType: "password",
74
68
  inputId: "newPasswordInput",
75
69
  label: "Ingrese su nueva contraseña",
76
- isRequired: required
70
+ isRequired: required,
71
+ inputOnChange: updateInfo
77
72
  }), emptyPassword && /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
78
73
  children: "La contrase\xF1a debe ser minimo de 8 caracteres"
79
74
  })]
@@ -33,7 +33,8 @@ var TagAndInput = function TagAndInput(_ref) {
33
33
  maxChar = _ref.maxChar,
34
34
  required = _ref.required,
35
35
  optionList = _ref.optionList,
36
- description = _ref.description;
36
+ description = _ref.description,
37
+ inputOnChange = _ref.inputOnChange;
37
38
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
38
39
  inputType: inputType,
39
40
  className: "input-container",
@@ -65,7 +66,8 @@ var TagAndInput = function TagAndInput(_ref) {
65
66
  maxChar: maxChar,
66
67
  required: required,
67
68
  optionList: optionList,
68
- description: description
69
+ description: description,
70
+ inputOnChange: inputOnChange
69
71
  })]
70
72
  }, "generalTagInput-".concat(inputType));
71
73
  };
@@ -55,7 +55,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
55
55
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
56
56
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductNameHeader.ProductNameHeader, {
57
57
  productName: (headerData === null || headerData === void 0 ? void 0 : (_headerData$article = headerData.article) === null || _headerData$article === void 0 ? void 0 : _headerData$article.name) || (headerData === null || headerData === void 0 ? void 0 : headerData.name),
58
- statusType: (headerData === null || headerData === void 0 ? void 0 : headerData.version_status) || (headerData === null || headerData === void 0 ? void 0 : headerData.status),
58
+ statusType: (headerData === null || headerData === void 0 ? void 0 : headerData.version_status) || (headerData === null || headerData === void 0 ? void 0 : headerData.status) || (headerData === null || headerData === void 0 ? void 0 : headerData.article_status),
59
59
  percent: percent === null || percent === void 0 ? void 0 : percent.toFixed(0),
60
60
  priority: headerData === null || headerData === void 0 ? void 0 : headerData.prio,
61
61
  date: new Date((headerData === null || headerData === void 0 ? void 0 : (_headerData$article2 = headerData.article) === null || _headerData$article2 === void 0 ? void 0 : _headerData$article2.timestamp) || (headerData === null || headerData === void 0 ? void 0 : headerData.timestamp)).toLocaleDateString()
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.ChangePasswordLogin = void 0;
9
9
 
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
-
14
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
15
11
 
16
12
  var _styles = require("./styles");
@@ -55,37 +51,18 @@ var ChangePasswordLogin = function ChangePasswordLogin(_ref) {
55
51
  matchPasswords = _useState6[0],
56
52
  setMatchPasswords = _useState6[1];
57
53
 
58
- var validate = /*#__PURE__*/function () {
59
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(e) {
60
- var password, confirmPassword;
61
- return _regenerator.default.wrap(function _callee$(_context) {
62
- while (1) {
63
- switch (_context.prev = _context.next) {
64
- case 0:
65
- e.preventDefault();
66
- password = document.querySelector("#newPasswordInput").value;
67
- password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
68
- confirmPassword = document.querySelector("#confirmPasswordInput").value;
69
- confirmPassword === "" ? setEmptyConfirmPassword(true) : setEmptyConfirmPassword(false);
70
-
71
- if (password === confirmPassword) {
72
- setMatchPasswords(true);
73
- } else {
74
- setMatchPasswords(false);
75
- }
76
-
77
- case 6:
78
- case "end":
79
- return _context.stop();
80
- }
81
- }
82
- }, _callee);
83
- }));
84
-
85
- return function validate(_x) {
86
- return _ref2.apply(this, arguments);
87
- };
88
- }();
54
+ var validate = function validate(e) {
55
+ var password = document.querySelector("#newPasswordInput").value;
56
+ password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
57
+ var confirmPassword = document.querySelector("#confirmPasswordInput").value;
58
+ confirmPassword === "" ? setEmptyConfirmPassword(true) : setEmptyConfirmPassword(false);
59
+
60
+ if (password === confirmPassword) {
61
+ setMatchPasswords(true);
62
+ } else {
63
+ setMatchPasswords(false);
64
+ }
65
+ };
89
66
 
90
67
  var loginRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoImage.LogoImage, {}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
91
68
  className: "credenciales",
@@ -31,61 +31,115 @@ ProviderProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJmNTkyN2Y4ZS1jYmY3LTQ5MjItOWUwOS1lNjllYzBiMjczMWEiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhZWQzMzEyZi1kZGYyLTQ2ZTAtOTgyNS1lODU2ZDM0ODYwNzMiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1Mzk1NzQ3MiwibmFtZSI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2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJhOTZjN2YxMi0wYjI5LTRkMzctOWMxOS1mMDAzMWFiMGY2N2EiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1NTQ5MjkzNiwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjU1NDk2NTM2LCJpYXQiOjE2NTU0OTI5MzYsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.Rg3hxEzGy4pSDcG-q5lXRZWBoBiXQQKCdpRtAChvQuGM5GaQySgBW0YUEIXcLuwMbWSzj3RWJ4ZTY8NZvUhYIRbGqnIhB82FP41YCcYF7BYDilr4pZzeqEjx6U4_jR4HtbmkFfscyg0Q1VINNHTj1b0n1xLNMiE6rM7hY3eWFFhyvXn5OIH_5fZaHjYRe2uBDnF6Ogx1Za2z8DzyKkR2-QjVo4l-f64Egc5EfYWm6_3gZ1gkRGLxa7HfQXNUs0ds7Ifkx4QYHggUQdkrNdmGeYGxqZFYgG5a4LWZ-17E6x5yL87LhH-oErepE6xe6oyy-DnHaf7rWnRPqxSuilW5lQ",
35
35
  articleId: 238,
36
36
  category: 846,
37
37
  version: 2,
38
38
  productSelected: {
39
- id_article: 35319,
40
- id_category: "2146",
41
- name: "FOCO LED A19 (60W) LUZ AMARILLA",
42
- upc: "120873",
43
- timestamp: "2022-06-14T15:31:50.000Z",
44
- status: "NULL",
45
- categoryName: "ILUMINACIÓN|FOCOS|LEDS",
46
- asignations: [],
39
+ orderId: 14,
40
+ article_status: "AP",
41
+ datasheet_status: "AC",
42
+ description_status: "AC",
43
+ images_status: "AP",
44
+ prio: "none",
47
45
  version: 2,
48
- version_status: "AA",
49
- retailersAvailable: [{
50
- id: 58,
51
- name: "The Home Depot Golden",
46
+ brand: null,
47
+ article: {
48
+ category: "ILUMINACIÓN|FOCOS|LEDS",
49
+ company_name: "COMPANY DEV",
52
50
  country: "México",
53
- id_region: 1,
54
- active: 1
51
+ id_category: "2146",
52
+ id_article: 35705,
53
+ name: "FOCO LED A19 (60W) LUZ AMARILLA",
54
+ upc: "12087311111"
55
+ },
56
+ retailers: [{
57
+ id: 58,
58
+ name: "The Home Depot Golden"
59
+ }, {
60
+ id: 59,
61
+ name: "The Home Depot Platinum"
62
+ }, {
63
+ id: 60,
64
+ name: "The Home Depot Resizing"
65
+ }, {
66
+ id: 61,
67
+ name: "Home Depot TAB"
55
68
  }],
56
- missing: {
57
- datasheet: 33,
58
- description: 0,
59
- image: 23
60
- }
69
+ services: {
70
+ datasheets: 1,
71
+ descriptions: 1,
72
+ images: 1
73
+ },
74
+ id_article: 35705,
75
+ retailersAvailable: [{
76
+ id: 58,
77
+ name: "The Home Depot Golden"
78
+ }, {
79
+ id: 59,
80
+ name: "The Home Depot Platinum"
81
+ }, {
82
+ id: 60,
83
+ name: "The Home Depot Resizing"
84
+ }, {
85
+ id: 61,
86
+ name: "Home Depot TAB"
87
+ }]
61
88
  },
62
89
  productToEdit: {
90
+ ArticleId: 35705,
63
91
  idCategory: "2146",
64
- ArticleId: 35319,
65
- product: [{
66
- id_article: 35319,
67
- id_category: "2146",
68
- name: "FOCO LED A19 (60W) LUZ AMARILLA",
69
- upc: "120873",
70
- timestamp: "2022-06-14T15:31:50.000Z",
71
- status: "NULL",
72
- categoryName: "ILUMINACIÓN|FOCOS|LEDS",
73
- asignations: [],
92
+ product: {
93
+ orderId: 14,
94
+ article_status: "AP",
95
+ datasheet_status: "AC",
96
+ description_status: "AC",
97
+ images_status: "AP",
98
+ prio: "none",
74
99
  version: 2,
75
- version_status: "AA",
76
- retailersAvailable: [{
77
- id: 58,
78
- name: "The Home Depot Golden",
100
+ brand: null,
101
+ article: {
102
+ category: "ILUMINACIÓN|FOCOS|LEDS",
103
+ company_name: "COMPANY DEV",
79
104
  country: "México",
80
- id_region: 1,
81
- active: 1
105
+ id_category: "2146",
106
+ id_article: 35705,
107
+ name: "FOCO LED A19 (60W) LUZ AMARILLA",
108
+ upc: "12087311111"
109
+ },
110
+ retailers: [{
111
+ id: 58,
112
+ name: "The Home Depot Golden"
113
+ }, {
114
+ id: 59,
115
+ name: "The Home Depot Platinum"
116
+ }, {
117
+ id: 60,
118
+ name: "The Home Depot Resizing"
119
+ }, {
120
+ id: 61,
121
+ name: "Home Depot TAB"
82
122
  }],
83
- missing: {
84
- datasheet: 33,
85
- description: 0,
86
- image: 23
87
- }
88
- }]
123
+ services: {
124
+ datasheets: 1,
125
+ descriptions: 1,
126
+ images: 1
127
+ },
128
+ id_article: 35705,
129
+ retailersAvailable: [{
130
+ id: 58,
131
+ name: "The Home Depot Golden"
132
+ }, {
133
+ id: 59,
134
+ name: "The Home Depot Platinum"
135
+ }, {
136
+ id: 60,
137
+ name: "The Home Depot Resizing"
138
+ }, {
139
+ id: 61,
140
+ name: "Home Depot TAB"
141
+ }]
142
+ }
89
143
  },
90
144
  location: {
91
145
  product: {
@@ -93,39 +147,39 @@ ProviderProductEditionDefault.args = {
93
147
  versionId: 3
94
148
  },
95
149
  state: {
96
- origin: "RequestWithContentoh"
150
+ origin: "Contentoh"
97
151
  }
98
152
  },
99
153
  user: {
100
- id_user: 28,
101
- name: "Proveedor",
102
- last_name: "Colgate",
103
- email: "ilopez@contentoh.com",
104
- position: "Prueba Admin",
154
+ id_user: 59,
155
+ name: "The Home",
156
+ last_name: "Depot",
157
+ email: "cadena.ismael@allfreemail.net",
158
+ position: "Admin",
105
159
  telephone: "+523111366336",
106
160
  country: "México",
107
- id_company: 1,
108
- id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
161
+ id_company: 7,
162
+ id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
109
163
  birth_Date: null,
110
164
  about_me: null,
111
165
  zip_code: null,
112
166
  address: null,
113
167
  job: null,
114
- id_stripe: "cus_KuEt6R6vwmN09f",
168
+ id_stripe: "",
115
169
  id_role: 0,
116
170
  active: 1,
117
- is_retailer: 0,
171
+ is_retailer: 1,
118
172
  membership: {
119
- id: 38,
120
- start_date: "2022-01-18T17:25:35.000Z",
121
- end_date: "2023-01-18T17:25:35.000Z",
122
- planID: 8,
123
- plan: "prod_KtlhECVSFG2iro",
124
- name: "Plan Pro",
125
- user_limit: "20",
126
- products_limit: "5000",
173
+ id: 24,
174
+ start_date: "2021-11-23T03:35:50.000Z",
175
+ end_date: "2022-11-23T03:35:50.000Z",
176
+ planID: 9,
177
+ plan: "prod_KtlkzZVGq6bRTO",
178
+ name: "Plan Enterprise Full",
179
+ user_limit: "30",
180
+ products_limit: "10000",
127
181
  type: "Enterprise"
128
182
  },
129
- src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1655246340910"
183
+ src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1655492937526"
130
184
  }
131
185
  };
@@ -478,14 +478,14 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
478
478
  case 2:
479
479
  services = _context2.sent;
480
480
  //Converts the data inside the datasheets object to array
481
- setServices(services); //setActiveRetailer(product?.retailers[0]);
481
+ setServices(services);
482
+ getServices(); //setActiveRetailer(product?.retailers[0]);
482
483
 
483
484
  setImages({
484
485
  action: "init",
485
486
  init: services[2]
486
487
  });
487
488
  if (((_services$ = services[2]) === null || _services$ === void 0 ? void 0 : (_services$$values = _services$.values) === null || _services$$values === void 0 ? void 0 : _services$$values.length) > 0) setActiveImage(0);
488
- setActiveRetailer(product.retailers ? product.retailers[0] : product.retailersAvailable[0]);
489
489
  (0, _data2.getPercentage)({
490
490
  data: [product]
491
491
  }).then(function (res) {
@@ -621,12 +621,12 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
621
621
  while (1) {
622
622
  switch (_context5.prev = _context5.next) {
623
623
  case 0:
624
- loadData(); // getPercentage({ data: [product] }).then((res) =>
624
+ loadData();
625
+ setActiveRetailer(product.retailers ? product.retailers[0] : product.retailersAvailable[0]); // getPercentage({ data: [product] }).then((res) =>
625
626
  // setPercentages(res)
626
627
  // );
627
628
 
628
629
  getCart();
629
- getServices();
630
630
  _context5.t0 = setUserGroups;
631
631
  _context5.next = 6;
632
632
  return (0, _data2.fetchUsers)(token);
@@ -1696,8 +1696,9 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1696
1696
  sessionStorage.setItem("productEdit", JSON.stringify(prod));
1697
1697
  setProduct(prod);
1698
1698
  setShowGenericModal && setShowGenericModal(false);
1699
+ loadData();
1699
1700
 
1700
- case 13:
1701
+ case 14:
1701
1702
  case "end":
1702
1703
  return _context14.stop();
1703
1704
  }
@@ -1950,7 +1951,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1950
1951
  onClick: function onClick() {
1951
1952
  //setModalSent(true);
1952
1953
  sendEvaluation();
1953
- setMessage("\xA1Evaluaci\xF3n de ".concat(translateConcept(), " completada!"));
1954
+ setMessage("\xA1Evaluaci\xF3n de ".concat(activeTab, " completada!"));
1954
1955
  }
1955
1956
  })]
1956
1957
  }) : revision ? null : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -1960,15 +1961,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1960
1961
  children: "Los atributos son requeridos por las plataformas de las cadenas, es muy importante completar los campos requeridos ya que pueden rechazar el producto por falta de informaci\xF3n."
1961
1962
  })
1962
1963
  }), inCart ? /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
1963
- type: "button",
1964
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.Link, {
1965
- to: "/checkout",
1966
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
1967
- children: "Articulo en carrito"
1968
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
1969
- children: "Ir a checkout"
1970
- })]
1971
- })
1964
+ type: "button"
1972
1965
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
1973
1966
  onClick: function onClick() {
1974
1967
  setShowContentohRequestModal && setShowContentohRequestModal(true);
@@ -1981,7 +1974,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1981
1974
  }), showModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProductImageModal.ProductImageModal, {
1982
1975
  images: images,
1983
1976
  setShowModal: setShowModal
1984
- }), message.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GenericModal.GenericModal, {
1977
+ }), message.length > 0 && !showSurvey && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GenericModal.GenericModal, {
1985
1978
  buttonType: componentsArray.length > 0 && "delete-product",
1986
1979
  componentsArray: componentsArray.length > 0 ? componentsArray : [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
1987
1980
  src: _genericModalCheck.default,
@@ -31,7 +31,7 @@ RetailerProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjOTRhNzMwNS05MzY1LTQ2ZmYtYTQyMy00YjRiYzNiOGIxODAiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiYzk0YTczMDUtOTM2NS00NmZmLWE0MjMtNGI0YmMzYjhiMTgwIiwiY29nbml0bzpyb2xlcyI6WyJhcm46YXdzOmlhbTo6ODk4NjcwMjMyODA3OnJvbGVcL2NvbnRlbnRva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GhvbmVfbnVtYmVyX3ZlcmlmaWVkIjp0cnVlLCJjb2duaXRvOnVzZXJuYW1lIjoiYzk0YTczMDUtOTM2NS00NmZmLWE0MjMtNGI0YmMzYjhiMTgwIiwiY29nbml0bzpyb2xlcyI6WyJhcm46YXdzOmlhbTo6ODk4NjcwMjMyODA3OnJvbGVcL2NvbnRlbnRvaC1kZXYtdXMtZWFzdC0xLWxhbWJkYVJvbGUiXSwiYXVkIjoiNWFjOHRwZ3M2Z2JzcTEzZnJ2cnBpZWVwNDAiLCJldmVudF9pZCI6IjZlYzkzZDk4LTU3Y2YtNDdhMS05MTBhLTk1ZWIxNjdhYjhjNyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU1NTAyMDg3LCJuYW1lIjoiQ29sYWJvcmFkb3IiLCJwaG9uZV9udW1iZXIiOiIrNTIxMTExIiwiZXhwIjoxNjU1NTA1Njg3LCJpYXQiOjE2NTU1MDIwODcsImVtYWlsIjoic2FsbWVyb24uNUBob3RtYWlsLmNvbSJ9.fxgw--POlE3fFg2QWJaSD6tWZB9je4bR-rX5MJGOSRH9dc2WvDROjS1x_bT41M-wx9q-_U2xcFTAIff76zd-PYFYuYD29pJzTNl3c8xpQYcg4LwCvsBueRN9-_qxDcGzdSwdzxVbbk8guGdu4FA9ll-nruVIJ5QWnt8yNkWKRfn_bDLWHuQ2fPHsvVScwdn4Q60wERB6GFy6xLuQtRD5zWOBMu-_gLIfvbTm-eEJu-pkB5WtBDQki-UY1yi3bIjk9mNVSM4cdEFA7_84zKWL1O2eUUCOVC7Cn2NXQ0OEgphYmSftTU7nVN_xvl8JSUXdqRpSpkCYka849zCL5OJV7Q",
35
35
  articleId: 238,
36
36
  category: 846,
37
37
  version: 2,
@@ -41,18 +41,18 @@ RetailerProductEditionDefault.args = {
41
41
  descriptions: 1,
42
42
  images: 1
43
43
  },
44
- orderId: 4,
45
- status: "ASSIGNED",
46
- datasheet_status: null,
44
+ orderId: 1,
45
+ status: "AF",
46
+ datasheet_status: "AF",
47
47
  prio: "none",
48
- version: 3,
49
- description_status: null,
50
- images_status: null,
48
+ version: 2,
49
+ description_status: "AF",
50
+ images_status: "AF",
51
51
  article: {
52
- id_article: 33249,
53
- id_category: "684",
54
- name: "Crema dental ",
55
- upc: "232435",
52
+ id_article: 33250,
53
+ id_category: "689",
54
+ name: "crema antiarrugas",
55
+ upc: "2512651",
56
56
  timestamp: "2022-06-14T14:52:51.000Z",
57
57
  id_user: 28,
58
58
  status: "NULL",
@@ -60,19 +60,19 @@ RetailerProductEditionDefault.args = {
60
60
  company_id: 1,
61
61
  company_name: "COMPANY DEV",
62
62
  country: "México",
63
- id_order: 4,
64
- id_datasheet_especialist: null,
65
- id_datasheet_facilitator: null,
66
- id_description_especialist: null,
67
- id_description_facilitator: null,
68
- id_images_especialist: null,
69
- id_images_facilitator: null,
70
- id_auditor: 37,
63
+ id_order: 1,
64
+ id_datasheet_especialist: 54,
65
+ id_datasheet_facilitator: 52,
66
+ id_description_especialist: 54,
67
+ id_description_facilitator: 52,
68
+ id_images_especialist: 55,
69
+ id_images_facilitator: 53,
70
+ id_auditor: 30,
71
71
  id_recepcionist: null,
72
- category: "SALUD Y BELLEZA|CUIDADO BUCAL|PASTAS DENTALES Y ASEO BUCAL",
73
- missingAttributes: 13,
74
- missingDescriptions: 4,
75
- missingImages: 3
72
+ category: "SALUD Y BELLEZA|CUIDADO CORPORAL|CREMAS FAMILIARES",
73
+ missingAttributes: null,
74
+ missingDescriptions: null,
75
+ missingImages: null
76
76
  },
77
77
  retailers: [{
78
78
  id: 4,
@@ -81,26 +81,14 @@ RetailerProductEditionDefault.args = {
81
81
  id_region: 1,
82
82
  active: 1
83
83
  }, {
84
- id: 9,
85
- name: "Amazon",
84
+ id: 26,
85
+ name: "Mercado Libre",
86
86
  country: "México",
87
87
  id_region: 1,
88
88
  active: 1
89
- }, {
90
- id: 1013,
91
- name: "Cencosud Colombia",
92
- country: "Colombia",
93
- id_region: 2,
94
- active: 1
95
- }, {
96
- id: 2005,
97
- name: "ClubCo",
98
- country: "Costa Rica",
99
- id_region: 3,
100
- active: 1
101
89
  }],
102
90
  country: "México",
103
- upc: "232435"
91
+ upc: "2512651"
104
92
  },
105
93
  location: {
106
94
  product: {
@@ -109,22 +97,22 @@ RetailerProductEditionDefault.args = {
109
97
  }
110
98
  },
111
99
  user: {
112
- id_user: 54,
113
- name: "ESPECIALISTA TXTS PRUEBA",
114
- last_name: "",
115
- email: "rlegorreta@contentoh.com",
116
- position: null,
100
+ id_user: 30,
101
+ name: "Admin",
102
+ last_name: "Ulises",
103
+ email: "salmeron.5@hotmail.com",
104
+ position: "Admin",
117
105
  telephone: null,
118
- country: null,
106
+ country: "México",
119
107
  id_company: 2,
120
- id_cognito: "ca1d24ab-e992-4c19-b4e1-2fe6f720c16b",
108
+ id_cognito: "c94a7305-9365-46ff-a423-4b4bc3b8b180",
121
109
  birth_Date: null,
122
110
  about_me: null,
123
111
  zip_code: null,
124
112
  address: null,
125
113
  job: null,
126
114
  id_stripe: null,
127
- id_role: 7,
115
+ id_role: 6,
128
116
  active: 1,
129
117
  is_retailer: 0,
130
118
  membership: {
@@ -138,6 +126,6 @@ RetailerProductEditionDefault.args = {
138
126
  products_limit: "3",
139
127
  type: "PyMES"
140
128
  },
141
- src: "https://content-management-profile.s3.amazonaws.com/id-54/54.png?1655433250522"
129
+ src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655502088129"
142
130
  }
143
131
  };