@visns-studio/visns-components 3.9.2 → 3.9.4

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.
@@ -764,7 +764,7 @@ function Form({
764
764
  };
765
765
  } else {
766
766
  if (newValue !== '') {
767
- if (['date', 'datetime', 'time'].includes(type)) {
767
+ if (['date', 'datetime'].includes(type)) {
768
768
  _formData[id] =
769
769
  newValue instanceof Date
770
770
  ? newValue
@@ -73,6 +73,7 @@ function Navigation({
73
73
  const iconComponents = {
74
74
  bug: Bug,
75
75
  calendar: Calendar,
76
+ draft: Draft,
76
77
  person: Person,
77
78
  shield: Shield,
78
79
  signOut: SignOut,
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import Table from '../DataGrid';
3
+
4
+ const AuditLogs = () => {
5
+ const setting = {
6
+ ajaxSetting: {
7
+ url: '/ajax/audits/table',
8
+ take: 25,
9
+ sortBy: 'id',
10
+ sort: 'desc',
11
+ where: [],
12
+ },
13
+ form: {
14
+ primaryKey: 'id',
15
+ url: '/ajax/audits',
16
+ create: {},
17
+ update: {},
18
+ fields: [],
19
+ },
20
+ columns: [
21
+ {
22
+ id: ['user'],
23
+ label: 'User',
24
+ type: 'relation',
25
+ nameFrom: 'name',
26
+ },
27
+ {
28
+ id: 'old_values',
29
+ label: 'Old Values',
30
+ type: 'text',
31
+ },
32
+ {
33
+ id: 'new_values',
34
+ label: 'New Values',
35
+ type: 'text',
36
+ },
37
+ {
38
+ id: 'url',
39
+ label: 'URL',
40
+ type: 'text',
41
+ },
42
+ {
43
+ id: 'ip_address',
44
+ label: 'IP Address',
45
+ type: 'text',
46
+ },
47
+ {
48
+ id: 'created_at',
49
+ label: 'Created At',
50
+ type: 'datetime',
51
+ minWidth: 200,
52
+ maxWidth: 200,
53
+ },
54
+ ],
55
+ settings: [],
56
+ };
57
+
58
+ return (
59
+ <div>
60
+ <div className="grid">
61
+ <div className="grid__row">
62
+ <div className="grid__full crmtitle">
63
+ <h1>Audit Log</h1>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ <div className="grid">
68
+ <div className="grid__row">
69
+ <div className="grid__full">
70
+ <Table
71
+ ajaxSetting={setting.ajaxSetting}
72
+ form={setting.form}
73
+ columns={setting.columns}
74
+ settings={setting.settings}
75
+ />
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ );
81
+ };
82
+
83
+ export default AuditLogs;
package/index.js CHANGED
@@ -34,6 +34,7 @@ import CmsIndex from './components/cms/generic/CmsIndex';
34
34
  import CmsSort from './components/cms/generic/CmsSort';
35
35
 
36
36
  /** CRM Generic Components */
37
+ import AuditLogs from './components/crm/generic/AuditLogs';
37
38
  import GenericAuth from './components/crm/generic/GenericAuth';
38
39
  import GenericDetail from './components/crm/generic/GenericDetail';
39
40
  import GenericDynamic from './components/crm/generic/GenericDynamic';
@@ -45,6 +46,7 @@ import NotificationList from './components/crm/generic/NotificationList';
45
46
 
46
47
  export {
47
48
  AsyncSelect,
49
+ AuditLogs,
48
50
  Autocomplete,
49
51
  Breadcrumb,
50
52
  Call,
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "react-dom": "^17.0.1"
55
55
  },
56
56
  "name": "@visns-studio/visns-components",
57
- "version": "3.9.2",
57
+ "version": "3.9.4",
58
58
  "description": "Various packages to assist in the development of our Custom Applications.",
59
59
  "main": "index.js",
60
60
  "scripts": {