@visns-studio/visns-components 1.0.17 → 1.0.19

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.
@@ -349,34 +349,16 @@ const DataGrid = (props) => {
349
349
  }, []);
350
350
 
351
351
  useEffect(() => {
352
- let relationName;
353
-
354
352
  const renderColumn = (column) => {
355
353
  switch (column.type) {
356
354
  case "created_by":
357
- relationName = column.id.reduce(
358
- (acc, id) => acc + `${id}.`,
359
- ""
360
- );
361
- relationName += column.nameFrom;
362
-
363
355
  return {
364
- name: relationName,
356
+ name: "audits.name",
365
357
  header: column.label,
366
358
  defaultFlex: 1,
367
359
  link: column.link ? column.link : {},
368
360
  render: ({ data }) => {
369
- let value = column.id.reduce((acc, id) => {
370
- if (acc === "") {
371
- return data[id];
372
- } else {
373
- return acc[id];
374
- }
375
- }, "");
376
-
377
- if (value && value.created_by) {
378
- value = moment(value.created_by).format('DD-MM-YYYY');
379
- }
361
+ let value = data.audits[0].user.name;
380
362
 
381
363
  return <span>{value}</span>;
382
364
  },
@@ -474,7 +456,7 @@ const DataGrid = (props) => {
474
456
  },
475
457
  };
476
458
  case "relation":
477
- relationName = column.id.reduce(
459
+ let relationName = column.id.reduce(
478
460
  (acc, id) => acc + `${id}.`,
479
461
  ""
480
462
  );
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "react-dom": ">=18.2.0"
33
33
  },
34
34
  "name": "@visns-studio/visns-components",
35
- "version": "1.0.17",
35
+ "version": "1.0.19",
36
36
  "description": "Various packages to assist in the development of our Custom Applications.",
37
37
  "main": "index.js",
38
38
  "devDependencies": {},