contentoh-components-library 21.4.66 → 21.4.67

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.
@@ -175,19 +175,22 @@ var Dashboard = function Dashboard(_ref) {
175
175
 
176
176
  case 8:
177
177
  response = _context.sent;
178
+ console.log({
179
+ res: JSON.parse(response.data.body).data
180
+ });
178
181
  return _context.abrupt("return", JSON.parse(response.data.body).data);
179
182
 
180
- case 12:
181
- _context.prev = 12;
183
+ case 13:
184
+ _context.prev = 13;
182
185
  _context.t0 = _context["catch"](5);
183
186
  console.log(_context.t0);
184
187
 
185
- case 15:
188
+ case 16:
186
189
  case "end":
187
190
  return _context.stop();
188
191
  }
189
192
  }
190
- }, _callee, null, [[5, 12]]);
193
+ }, _callee, null, [[5, 13]]);
191
194
  }));
192
195
 
193
196
  return function loadProductVersions(_x) {
@@ -270,6 +273,12 @@ var Dashboard = function Dashboard(_ref) {
270
273
  ordersByStatus = _ref5.ordersByStatus;
271
274
  ordersByActive = _ref5.ordersByActive;
272
275
  companyTrades = _ref5.companyTrades;
276
+ console.log({
277
+ ordersBydate: ordersBydate,
278
+ ordersByStatus: ordersByStatus,
279
+ ordersByActive: ordersByActive,
280
+ companyTrades: companyTrades
281
+ });
273
282
  if (trades.length === 0) setTrades(companyTrades);
274
283
  _ordersByStatus$total = ordersByStatus.total, total = _ordersByStatus$total === void 0 ? 0 : _ordersByStatus$total, _ordersByStatus$R = ordersByStatus.R, R = _ordersByStatus$R === void 0 ? 0 : _ordersByStatus$R, _ordersByStatus$PA = ordersByStatus.PA, PA = _ordersByStatus$PA === void 0 ? 0 : _ordersByStatus$PA, _ordersByStatus$Ex = ordersByStatus.Ex, Ex = _ordersByStatus$Ex === void 0 ? 0 : _ordersByStatus$Ex, _ordersByStatus$ACA = ordersByStatus.ACA, ACA = _ordersByStatus$ACA === void 0 ? 0 : _ordersByStatus$ACA;
275
284
  productsFinished = 0;
@@ -303,22 +312,26 @@ var Dashboard = function Dashboard(_ref) {
303
312
  setMetricsData(metricsArray);
304
313
  setTotalCount(total);
305
314
  delete ordersByStatus.total;
315
+ console.log({
316
+ ordersBydate: ordersBydate,
317
+ ordersByStatus: ordersByStatus
318
+ });
306
319
  setRequiredProducts(ordersBydate);
307
320
  setProductsByStatus(ordersByStatus);
308
- _context3.next = 34;
321
+ _context3.next = 36;
309
322
  break;
310
323
 
311
- case 31:
312
- _context3.prev = 31;
324
+ case 33:
325
+ _context3.prev = 33;
313
326
  _context3.t1 = _context3["catch"](0);
314
- console.log(_context3.t1);
327
+ console.log("Ismael", _context3.t1);
315
328
 
316
- case 34:
329
+ case 36:
317
330
  case "end":
318
331
  return _context3.stop();
319
332
  }
320
333
  }
321
- }, _callee3, null, [[0, 31]]);
334
+ }, _callee3, null, [[0, 33]]);
322
335
  }));
323
336
 
324
337
  return function loadProductsByStatus(_x2) {
@@ -445,12 +458,6 @@ var Dashboard = function Dashboard(_ref) {
445
458
  }, _callee4);
446
459
  })), []);
447
460
  (0, _react.useEffect)(function () {
448
- console.log({
449
- orderByRequired: orderByRequired,
450
- orderByStatus: orderByStatus,
451
- metricsData: metricsData
452
- });
453
-
454
461
  if (orderByRequired !== null && orderByRequired !== void 0 && orderByRequired.startDate && orderByStatus !== null && orderByStatus !== void 0 && orderByStatus.endDate && metricsData.length > 0) {
455
462
  setLoading(false);
456
463
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.66",
3
+ "version": "21.4.67",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -55,6 +55,7 @@ export const Dashboard = ({ jwt, user, company }) => {
55
55
  Authorization: jwt,
56
56
  },
57
57
  });
58
+ console.log({ res: JSON.parse(response.data.body).data });
58
59
  return JSON.parse(response.data.body).data;
59
60
  } catch (error) {
60
61
  console.log(error);
@@ -89,6 +90,12 @@ export const Dashboard = ({ jwt, user, company }) => {
89
90
  const isCollaborator = user.id_role > 0;
90
91
  const { ordersBydate, ordersByStatus, ordersByActive, companyTrades } =
91
92
  (await loadProductVersions(orderByStatus)) || {};
93
+ console.log({
94
+ ordersBydate,
95
+ ordersByStatus,
96
+ ordersByActive,
97
+ companyTrades,
98
+ });
92
99
 
93
100
  if (trades.length === 0) setTrades(companyTrades);
94
101
  const { total = 0, R = 0, PA = 0, Ex = 0, ACA = 0 } = ordersByStatus;
@@ -122,10 +129,11 @@ export const Dashboard = ({ jwt, user, company }) => {
122
129
  setMetricsData(metricsArray);
123
130
  setTotalCount(total);
124
131
  delete ordersByStatus.total;
132
+ console.log({ ordersBydate, ordersByStatus });
125
133
  setRequiredProducts(ordersBydate);
126
134
  setProductsByStatus(ordersByStatus);
127
135
  } catch (err) {
128
- console.log(err);
136
+ console.log("Ismael", err);
129
137
  }
130
138
  };
131
139
 
@@ -227,7 +235,6 @@ export const Dashboard = ({ jwt, user, company }) => {
227
235
  }, []);
228
236
 
229
237
  useEffect(() => {
230
- console.log({ orderByRequired, orderByStatus, metricsData });
231
238
  if (
232
239
  orderByRequired?.startDate &&
233
240
  orderByStatus?.endDate &&