contentoh-components-library 21.1.57 → 21.1.59

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 (28) hide show
  1. package/dist/components/atoms/GeneralInput/index.js +1 -0
  2. package/dist/components/molecules/HeaderTop/index.js +1 -4
  3. package/dist/components/molecules/RetailerSelector/index.js +0 -32
  4. package/dist/components/molecules/StatusAsignationInfo/index.js +2 -3
  5. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  6. package/dist/components/organisms/FullTabsMenu/index.js +1 -3
  7. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +65 -115
  8. package/dist/components/pages/ProviderProductEdition/index.js +382 -333
  9. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -41
  10. package/dist/components/pages/RetailerProductEdition/index.js +210 -198
  11. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  12. package/dist/global-files/data.js +10 -9
  13. package/dist/index.js +0 -13
  14. package/package.json +1 -1
  15. package/src/components/atoms/GeneralInput/index.js +1 -0
  16. package/src/components/atoms/StatusTag/StatusTag.stories.js +28 -0
  17. package/src/components/molecules/HeaderTop/index.js +1 -6
  18. package/src/components/molecules/RetailerSelector/index.js +0 -15
  19. package/src/components/molecules/StatusAsignationInfo/index.js +2 -3
  20. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  21. package/src/components/organisms/FullTabsMenu/index.js +0 -2
  22. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +71 -133
  23. package/src/components/pages/ProviderProductEdition/index.js +222 -208
  24. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +87 -38
  25. package/src/components/pages/RetailerProductEdition/index.js +140 -166
  26. package/src/components/pages/RetailerProductEdition/styles.js +1 -1
  27. package/src/global-files/data.js +10 -9
  28. package/src/index.js +0 -1
@@ -65,6 +65,7 @@ var GeneralInput = function GeneralInput(_ref) {
65
65
  if ((optionList === null || optionList === void 0 ? void 0 : optionList.length) > 0) {
66
66
  var index = evt.target.selectedIndex;
67
67
  var valueSelected = evt.target.value;
68
+ console.log(valueSelected);
68
69
  generalValue = valueSelected;
69
70
  setTextValue({
70
71
  value: generalValue
@@ -26,10 +26,7 @@ var HeaderTop = function HeaderTop(_ref) {
26
26
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
27
27
  text: "Edici\xF3n de producto"
28
28
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Button, {
29
- buttonType: "close-button",
30
- onClick: function onClick() {
31
- window.location.href = "/products";
32
- }
29
+ buttonType: "close-button"
33
30
  })]
34
31
  });
35
32
  };
@@ -7,10 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.RetailerSelector = 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");
@@ -43,39 +39,11 @@ var RetailerSelector = function RetailerSelector(_ref) {
43
39
  }
44
40
  };
45
41
 
46
- var getRetailerImage = /*#__PURE__*/function () {
47
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
48
- return _regenerator.default.wrap(function _callee$(_context) {
49
- while (1) {
50
- switch (_context.prev = _context.next) {
51
- case 0:
52
- console.log("https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png"));
53
- activeRetailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(activeRetailer.id, ".png");
54
- retailers.forEach(function (retailer) {
55
- return retailer.image = "https://content-management-images.s3.amazonaws.com/retailers/".concat(retailer.id, ".png");
56
- });
57
-
58
- case 3:
59
- case "end":
60
- return _context.stop();
61
- }
62
- }
63
- }, _callee);
64
- }));
65
-
66
- return function getRetailerImage() {
67
- return _ref2.apply(this, arguments);
68
- };
69
- }();
70
-
71
42
  (0, _react.useEffect)(function () {
72
43
  if (retailersPanel) {
73
44
  document.addEventListener("click", closeRetailersPanel, false);
74
45
  }
75
46
  }, [retailersPanel]);
76
- (0, _react.useEffect)(function () {
77
- getRetailerImage();
78
- }, [activeRetailer]);
79
47
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
80
48
  id: "retailers-assignation",
81
49
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
@@ -54,8 +54,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
54
54
  _ref$id = _ref.id,
55
55
  id = _ref$id === void 0 ? "default-id" : _ref$id,
56
56
  onClickSave = _ref.onClickSave,
57
- showSaveButton = _ref.showSaveButton,
58
- canAssign = _ref.canAssign;
57
+ showSaveButton = _ref.showSaveButton;
59
58
 
60
59
  var _useState = (0, _react.useState)(false),
61
60
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -147,7 +146,7 @@ var StatusAsignationInfo = function StatusAsignationInfo(_ref) {
147
146
  color: "#969696",
148
147
  fontFamily: "Avenir Next",
149
148
  headerType: "input-name-header"
150
- }), showAsignationPanel && canAssign && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
149
+ }), showAsignationPanel && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
151
150
  className: "asignation-panel",
152
151
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
153
152
  className: "asignation-header",
@@ -47,7 +47,7 @@ var FullProductNameHeader = function FullProductNameHeader(_ref) {
47
47
  var element = [];
48
48
  servicesData.forEach(function (sd) {
49
49
  if (sd.id_retailer === rt.id) {
50
- element.push(sd.status ? sd.status : "RECEIVED");
50
+ element.push(sd.status ? sd.status : "R");
51
51
  } else element.push("NA");
52
52
 
53
53
  rt["services"] = element;
@@ -32,8 +32,7 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
32
32
  downloadImages = _ref.downloadImages,
33
33
  askToDeleteImages = _ref.askToDeleteImages,
34
34
  onClickSave = _ref.onClickSave,
35
- showSaveButton = _ref.showSaveButton,
36
- canAssign = _ref.canAssign;
35
+ showSaveButton = _ref.showSaveButton;
37
36
 
38
37
  var _useState = (0, _react.useState)(false),
39
38
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -46,7 +45,6 @@ var FullTabsMenu = function FullTabsMenu(_ref) {
46
45
  setImagesSection: setImagesSection,
47
46
  setActiveTab: setActiveTab
48
47
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.StatusAsignationInfo, {
49
- canAssign: canAssign,
50
48
  status: status,
51
49
  activeTab: activeTab,
52
50
  setImageLayout: setImageLayout,
@@ -31,115 +31,65 @@ ProviderProductEditionDefault.args = {
31
31
  "Ficha técnica": false,
32
32
  Imágenes: false
33
33
  },
34
- token: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGF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3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6ImY1OTI3ZjhlLWNiZjctNDkyMi05ZTA5LWU2OWVjMGIyNzMxYSIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJiNmYyMTUyNi05Y2M1LTQwZTYtYjY5Yi1lNDljZDk1MWNlMzUiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY1ODE5MTg4MSwibmFtZSI6IklzbWFlbCBMb3BleiIsInBob25lX251bWJlciI6Iis1MjMxMTEzNjYzMzYiLCJleHAiOjE2NTgxOTU0ODEsImlhdCI6MTY1ODE5MTg4MSwiZW1haWwiOiJpbG9wZXpAY29udGVudG9oLmNvbSJ9.Ng3EvhD6fMIoHcpQW-K_KOoVqsBfK6zZ5iVOa8UbFtBEjFnhhvJ76xxpDfpsZ7ywTdIN0618qA-GlG99sbmnG0es_2gwADB9awSyRL0-zEJyNmlPeUcrK59RI6VVQGey8mzUUvBbebeV_4NfkAt_wvBuYcVUMMSadnbw86l4fbHX9k3um_00hhwJd4wS8OYRGW2b8QsiRl7S9ocxuLwVdGRxcGEK2xFjJwIW2YPMe9IMY8euK59-Gl2rLFo2TgkR9lQMpSJOhd9Ujl-8zbsqY-Pc2wK9OmndhzlQaw2upmitFapGi2SStvT4DWP4NxvGsAZX8nmqWhf5iXeM7OSbCg",
35
35
  articleId: 238,
36
36
  category: 846,
37
37
  version: 2,
38
38
  productSelected: {
39
- orderId: 55,
40
- article_status: "AP",
41
- datasheet_status: "AP",
42
- description_status: "AP",
43
- images_status: "AP",
44
- prio: "none",
39
+ id_article: 76125,
40
+ id_category: "682",
41
+ name: "prueba 11",
42
+ upc: "35646655",
43
+ timestamp: "2022-07-01T16:21:23.000Z",
44
+ status: "NULL",
45
+ categoryName: "Salud y Belleza|Cosméticos y Accesorios|Cosméticos",
46
+ asignations: [],
45
47
  version: 2,
46
- brand: null,
47
- article: {
48
- category: "ILUMINACIÓN|FOCOS|FOCOS",
49
- company_name: "THD Proveedor",
48
+ version_status: "R",
49
+ retailersAvailable: [{
50
+ id: 2,
51
+ name: "Walmart Mercancías Generales",
50
52
  country: "México",
51
- id_category: "2143",
52
- id_article: 55118,
53
- name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
54
- upc: "145582"
55
- },
56
- retailers: [{
57
- id: 58,
58
- name: "The Home Depot Golden"
59
- }, {
60
- id: 59,
61
- name: "The Home Depot Platinum"
53
+ id_region: 1,
54
+ active: 1
62
55
  }, {
63
- id: 60,
64
- name: "The Home Depot Resizing"
56
+ id: 3,
57
+ name: "Sam´s Club",
58
+ country: "México",
59
+ id_region: 1,
60
+ active: 1
65
61
  }, {
66
- id: 61,
67
- name: "Home Depot TAB"
62
+ id: 5,
63
+ name: "Chedraui",
64
+ country: "México",
65
+ id_region: 1,
66
+ active: 1
68
67
  }],
69
- services: {
70
- datasheets: 1,
71
- descriptions: 1,
72
- images: 1
73
- },
74
- id_article: 55118,
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
- }]
68
+ missing: {}
88
69
  },
89
70
  productToEdit: {
90
- ArticleId: 55118,
91
- idCategory: "2143",
92
- product: {
93
- orderId: 55,
94
- article_status: "AP",
95
- datasheet_status: "AP",
96
- description_status: "AP",
97
- images_status: "AP",
98
- prio: "none",
99
- version: 2,
100
- brand: null,
101
- article: {
102
- category: "ILUMINACIÓN|FOCOS|FOCOS",
103
- company_name: "THD Proveedor",
104
- country: "México",
105
- id_category: "2143",
106
- id_article: 55118,
107
- name: "FOCO BLUETOOTH SPOT PHILIPS 6 WATTS 300 LÚMENES MULTICOLOR",
108
- upc: "145582"
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"
122
- }],
123
- services: {
124
- datasheets: 1,
125
- descriptions: 1,
126
- images: 1
127
- },
128
- id_article: 55118,
71
+ idCategory: "3028",
72
+ ArticleId: 76175,
73
+ product: [{
74
+ id_article: 76175,
75
+ id_category: "3028",
76
+ name: "Producto 1 C",
77
+ upc: "18072021",
78
+ timestamp: "2022-07-18T19:25:34.000Z",
79
+ status: "NULL",
80
+ categoryName: "Eléctrico|Casa Inteligente|Asistentes Inteligentes",
81
+ asignations: [],
82
+ version: 1,
83
+ version_status: null,
129
84
  retailersAvailable: [{
130
85
  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
- }
86
+ name: "The Home Depot Golden",
87
+ country: "México",
88
+ id_region: 1,
89
+ active: 1
90
+ }],
91
+ missing: {}
92
+ }]
143
93
  },
144
94
  location: {
145
95
  product: {
@@ -147,40 +97,40 @@ ProviderProductEditionDefault.args = {
147
97
  versionId: 3
148
98
  },
149
99
  state: {
150
- origin: "Contentoh"
100
+ origin: "RequestWithContentoh"
151
101
  }
152
102
  },
153
103
  user: {
154
- id_user: 59,
155
- name: "The Home",
156
- last_name: "Depot",
157
- email: "cadena.ismael@allfreemail.net",
158
- position: "Admin",
104
+ id_user: 28,
105
+ name: "Proveedor",
106
+ last_name: "Colgate",
107
+ email: "ilopez@contentoh.com",
108
+ position: "Prueba Admin",
159
109
  telephone: "+523111366336",
160
110
  country: "México",
161
- id_company: 7,
162
- id_cognito: "5884ae34-59d6-4454-b98e-821518bcc3a7",
111
+ id_company: 1,
112
+ id_cognito: "f5927f8e-cbf7-4922-9e09-e69ec0b2731a",
163
113
  birth_Date: null,
164
114
  about_me: null,
165
115
  zip_code: null,
166
116
  address: null,
167
117
  job: null,
168
- id_stripe: "",
118
+ id_stripe: "cus_KuEt6R6vwmN09f",
169
119
  id_role: 0,
170
120
  active: 1,
171
121
  is_retailer: 0,
172
- email_notify: 1,
122
+ email_notify: 0,
173
123
  membership: {
174
- id: 24,
175
- start_date: "2021-11-23T03:35:50.000Z",
176
- end_date: "2022-11-23T03:35:50.000Z",
177
- planID: 9,
178
- plan: "prod_KtlkzZVGq6bRTO",
179
- name: "Plan Enterprise Full",
180
- user_limit: "30",
181
- products_limit: "10000",
124
+ id: 76,
125
+ start_date: "2022-01-18T17:25:35.000Z",
126
+ end_date: "2023-01-18T17:25:35.000Z",
127
+ planID: 8,
128
+ plan: "prod_KtlhECVSFG2iro",
129
+ name: "Plan Pro",
130
+ user_limit: "20",
131
+ products_limit: "5000",
182
132
  type: "Enterprise"
183
133
  },
184
- src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1656113146885"
134
+ src: "https://content-management-profile.s3.amazonaws.com/id-28/28.png?1658189942624"
185
135
  }
186
136
  };