@visns-studio/visns-components 4.7.2 → 4.7.3
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.
- package/package.json +13 -9
- package/src/components/cms/DataGrid.jsx +1461 -0
- package/src/components/cms/DropZone.jsx +349 -0
- package/src/components/cms/Field.jsx +802 -0
- package/src/components/cms/Form.jsx +476 -0
- package/src/components/cms/generic/CmsDetail.jsx +36 -0
- package/src/components/cms/generic/CmsIndex.jsx +73 -0
- package/src/components/cms/generic/CmsSort.jsx +125 -0
- package/src/components/cms/sorting/Item.jsx +115 -0
- package/src/components/cms/sorting/List.jsx +30 -0
- package/src/components/crm/AsyncSelect.jsx +125 -0
- package/src/components/crm/Autocomplete.jsx +174 -0
- package/src/components/crm/Breadcrumb.jsx +52 -0
- package/src/components/crm/Call.jsx +220 -0
- package/src/components/crm/DataGrid.jsx +2701 -0
- package/src/components/crm/Download.jsx +101 -0
- package/src/components/crm/Fetch.jsx +119 -0
- package/src/components/crm/Field.jsx +1557 -0
- package/src/components/crm/Form.jsx +1409 -0
- package/src/components/crm/Loader.jsx +29 -0
- package/src/components/crm/MultiSelect.jsx +78 -0
- package/src/components/crm/Navigation.jsx +619 -0
- package/src/components/crm/Notification.jsx +197 -0
- package/src/components/crm/QrCode.jsx +83 -0
- package/src/components/crm/Select.jsx +58 -0
- package/src/components/crm/SelectList.jsx +21 -0
- package/src/components/crm/TableFilter.jsx +198 -0
- package/src/components/crm/auth/Login.jsx +223 -0
- package/src/components/crm/auth/Profile.jsx +280 -0
- package/src/components/crm/auth/Reset.jsx +111 -0
- package/src/components/crm/auth/Verify.jsx +174 -0
- package/src/components/crm/auth/styles/Login.module.scss +243 -0
- package/src/components/crm/auth/styles/Profile.module.scss +222 -0
- package/src/components/crm/auth/styles/Reset.module.scss +216 -0
- package/src/components/crm/auth/styles/Verify.module.scss +216 -0
- package/src/components/crm/generic/AuditLog.jsx +108 -0
- package/src/components/crm/generic/AuditLogs.jsx +115 -0
- package/src/components/crm/generic/GenericAuth.jsx +166 -0
- package/src/components/crm/generic/GenericDashboard.jsx +42 -0
- package/src/components/crm/generic/GenericDetail.jsx +1499 -0
- package/src/components/crm/generic/GenericDynamic.jsx +915 -0
- package/src/components/crm/generic/GenericFormBuilder.jsx +1765 -0
- package/src/components/crm/generic/GenericIndex.jsx +376 -0
- package/src/components/crm/generic/GenericMain.jsx +129 -0
- package/src/components/crm/generic/GenericSort.jsx +188 -0
- package/src/components/crm/generic/NotificationList.jsx +64 -0
- package/src/components/crm/generic/styles/AuditLog.module.scss +147 -0
- package/src/components/crm/generic/styles/AuditLogs.module.scss +92 -0
- package/src/components/crm/generic/styles/GenericDetail.module.scss +634 -0
- package/src/components/crm/generic/styles/GenericDynamic.module.scss +932 -0
- package/src/components/crm/generic/styles/GenericFormBuilder.module.scss +944 -0
- package/src/components/crm/generic/styles/GenericIndex.module.scss +247 -0
- package/src/components/crm/generic/styles/GenericMain.module.scss +91 -0
- package/src/components/crm/generic/styles/GenericSort.module.scss +123 -0
- package/src/components/crm/generic/styles/NotificationList.module.scss +67 -0
- package/src/components/crm/sorting/Item.jsx +117 -0
- package/src/components/crm/sorting/List.jsx +32 -0
- package/src/components/crm/sorting/styles/Item.module.scss +68 -0
- package/src/components/crm/sorting/styles/List.module.scss +68 -0
- package/src/components/crm/styles/AsyncSelect.module.scss +8 -0
- package/src/components/crm/styles/Autocomplete.module.scss +44 -0
- package/src/components/crm/styles/DataGrid.module.scss +210 -0
- package/src/components/crm/styles/Field.module.scss +311 -0
- package/src/components/crm/styles/Form.module.scss +499 -0
- package/src/components/crm/styles/Loader.module.scss +94 -0
- package/src/components/crm/styles/MultiSelect.module.scss +8 -0
- package/src/components/crm/styles/Navigation.module.scss +978 -0
- package/src/components/crm/styles/Notification.module.scss +147 -0
- package/src/components/crm/styles/QrCode.module.scss +87 -0
- package/src/components/crm/styles/TableFilter.module.scss +52 -0
- package/src/components/styles/global.css +73 -0
- package/src/index.js +86 -0
- package/dist/104e5636d8ddb791614c.woff2 +0 -0
- package/dist/11fe6a83d647de5daf95.woff +0 -0
- package/dist/141e2a8c7836495afe2a.woff +0 -0
- package/dist/2ba5877f7079830b5383.woff +0 -0
- package/dist/2d6836f45b2037be41f3.woff +0 -0
- package/dist/399.0a0f3e0d21be1057d599.css +0 -8
- package/dist/399.b8f57fa3f8c0c10119e4.js +0 -1
- package/dist/47d566c3b1293dfd9d77.woff +0 -0
- package/dist/6282a13cbba671a71913.woff2 +0 -0
- package/dist/78266f551031aa9db127.woff +0 -0
- package/dist/7b7da89f1e3fdcbfe36c.woff2 +0 -0
- package/dist/7e78e8338af7efeda712.woff2 +0 -0
- package/dist/7fa387951673abf164b1.woff2 +0 -0
- package/dist/819d59862c2d0640aad8.woff +0 -0
- package/dist/b615e1a6c838ea059a56.woff +0 -0
- package/dist/b9b1aa739c660c4ce67c.woff2 +0 -0
- package/dist/c5f3640b11df9414facb.woff +0 -0
- package/dist/da26d162ff5af71d6590.woff2 +0 -0
- package/dist/dd5b2912dbf896310865.woff2 +0 -0
- package/dist/f282b331272463c1aa6c.woff2 +0 -0
- package/dist/index.css +0 -2902
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -150
- package/dist/main.83b033670d64419bb497.css +0 -1
- package/dist/main.b1723d17cd2d3513ab62.js +0 -1
- package/dist/report.html +0 -39
- package/dist/runtime.33c276593b23f8035b8d.js +0 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
.formItem {
|
|
2
|
+
width: 50%;
|
|
3
|
+
padding: 0.5em;
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
.fi__label {
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fi__span {
|
|
12
|
+
position: absolute;
|
|
13
|
+
transition: all 200ms;
|
|
14
|
+
opacity: 0.8;
|
|
15
|
+
left: 0;
|
|
16
|
+
padding: 19px 20px;
|
|
17
|
+
transform-origin: top left;
|
|
18
|
+
cursor: text;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.fi__div {
|
|
22
|
+
transition: all 200ms;
|
|
23
|
+
opacity: 0.8;
|
|
24
|
+
left: 0;
|
|
25
|
+
padding: 19px 13px;
|
|
26
|
+
border-radius: var(--br);
|
|
27
|
+
border: 1px solid rgba(var(--paragraph-color-rgb), 0.15);
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.fi__toggle {
|
|
32
|
+
width: max-content;
|
|
33
|
+
padding: 0px 10px 0px 0;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: inline;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fi__toggletxt {
|
|
39
|
+
position: relative;
|
|
40
|
+
left: 5px;
|
|
41
|
+
font-size: 0.95em;
|
|
42
|
+
top: -5px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fwItem {
|
|
47
|
+
flex-basis: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.lastItem {
|
|
51
|
+
.btn {
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.loginlogo {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
max-width: 140px;
|
|
60
|
+
height: auto;
|
|
61
|
+
margin: 0 auto;
|
|
62
|
+
padding-bottom: 1rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.logincontainer {
|
|
66
|
+
margin-left: var(--sidebar-width);
|
|
67
|
+
min-height: 100vh;
|
|
68
|
+
flex-grow: 1;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-content: center;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.login {
|
|
77
|
+
width: 35rem;
|
|
78
|
+
height: auto;
|
|
79
|
+
padding: 1rem;
|
|
80
|
+
margin: 0;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-wrap: wrap;
|
|
83
|
+
|
|
84
|
+
> .formItem {
|
|
85
|
+
padding: 0.25em 0;
|
|
86
|
+
|
|
87
|
+
small {
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 18px;
|
|
90
|
+
height: 18px;
|
|
91
|
+
right: 18px;
|
|
92
|
+
top: 18px;
|
|
93
|
+
opacity: 0.15;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
> .loginitem {
|
|
98
|
+
width: 100%;
|
|
99
|
+
padding: 0.25em 0;
|
|
100
|
+
|
|
101
|
+
label {
|
|
102
|
+
width: 100%;
|
|
103
|
+
padding-bottom: 0.25rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
button {
|
|
107
|
+
width: 100%;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.forgotten {
|
|
113
|
+
span {
|
|
114
|
+
display: block;
|
|
115
|
+
text-align: center;
|
|
116
|
+
color: var(--paragraph-color);
|
|
117
|
+
padding: 1rem 0;
|
|
118
|
+
|
|
119
|
+
a {
|
|
120
|
+
color: var(--highlight-color);
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.lcontainer {
|
|
127
|
+
--sidebar-width: 35%;
|
|
128
|
+
min-height: 100vh;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.lwrap {
|
|
132
|
+
display: flex;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.aside {
|
|
136
|
+
opacity: 1;
|
|
137
|
+
position: fixed;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
height: 101%;
|
|
140
|
+
width: var(--sidebar-width);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.fwItem {
|
|
144
|
+
flex-basis: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.lastItem .btn {
|
|
148
|
+
width: 100%;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.login .formItem {
|
|
152
|
+
padding: 0.25em 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.login .formItem small {
|
|
156
|
+
position: absolute;
|
|
157
|
+
width: 18px;
|
|
158
|
+
height: 18px;
|
|
159
|
+
right: 18px;
|
|
160
|
+
top: 18px;
|
|
161
|
+
opacity: 0.15;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.login .loginitem {
|
|
165
|
+
width: 100%;
|
|
166
|
+
padding: 0.25em 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.login .loginitem label {
|
|
170
|
+
width: 100%;
|
|
171
|
+
padding-bottom: 0.25rem;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.login .loginitem button {
|
|
175
|
+
width: 100%;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.forgotten span {
|
|
179
|
+
display: block;
|
|
180
|
+
text-align: center;
|
|
181
|
+
color: var(--paragraph-color);
|
|
182
|
+
padding: 1rem 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.forgotten span a {
|
|
186
|
+
color: var(--highlight-color);
|
|
187
|
+
text-decoration: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.btn {
|
|
191
|
+
width: max-content;
|
|
192
|
+
display: inline-block;
|
|
193
|
+
position: relative;
|
|
194
|
+
padding: 0.65rem 1rem;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
font-size: 1rem;
|
|
197
|
+
color: var(--tertiary-color);
|
|
198
|
+
text-decoration: none;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
background: var(--primary-color);
|
|
201
|
+
border: 1px solid rgba(var(--primary-color--rgb), 1.1);
|
|
202
|
+
border-radius: var(--br);
|
|
203
|
+
outline: none;
|
|
204
|
+
transition: all 0.2s cubic-bezier(0.85, 0, 0.15, 1) 0s;
|
|
205
|
+
font-size: 1.25em;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
input:not(:placeholder-shown) + .fi__span,
|
|
209
|
+
textarea:not(:placeholder-shown) + .fi__span,
|
|
210
|
+
select:not(:placeholder-shown) + .fi__span {
|
|
211
|
+
transform: translateY(-40%) translateX(10px) scale(0.75);
|
|
212
|
+
opacity: 1;
|
|
213
|
+
padding: 0 4px;
|
|
214
|
+
background: var(--tertiary-color);
|
|
215
|
+
font-weight: 300;
|
|
216
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
.formItem {
|
|
2
|
+
width: 50%;
|
|
3
|
+
padding: 0.5em;
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
.fi__label {
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fi__span {
|
|
12
|
+
position: absolute;
|
|
13
|
+
transition: all 200ms;
|
|
14
|
+
opacity: 0.8;
|
|
15
|
+
left: 0;
|
|
16
|
+
padding: 19px 20px;
|
|
17
|
+
transform-origin: top left;
|
|
18
|
+
cursor: text;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.fi__div {
|
|
22
|
+
transition: all 200ms;
|
|
23
|
+
opacity: 0.8;
|
|
24
|
+
left: 0;
|
|
25
|
+
padding: 19px 13px;
|
|
26
|
+
border-radius: var(--br);
|
|
27
|
+
border: 1px solid rgba(var(--paragraph-color-rgb), 0.15);
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.fi__toggle {
|
|
32
|
+
width: max-content;
|
|
33
|
+
padding: 0px 10px 0px 0;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: inline;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fi__toggletxt {
|
|
39
|
+
position: relative;
|
|
40
|
+
left: 5px;
|
|
41
|
+
font-size: 0.95em;
|
|
42
|
+
top: -5px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.fwItem {
|
|
47
|
+
flex-basis: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.lastItem {
|
|
51
|
+
.btn {
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.loginlogo {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
max-width: 140px;
|
|
60
|
+
height: auto;
|
|
61
|
+
margin: 0 auto;
|
|
62
|
+
padding-bottom: 1rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.logincontainer {
|
|
66
|
+
margin-left: var(--sidebar-width);
|
|
67
|
+
min-height: 100vh;
|
|
68
|
+
flex-grow: 1;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-content: center;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.login {
|
|
77
|
+
width: 35rem;
|
|
78
|
+
height: auto;
|
|
79
|
+
padding: 1rem;
|
|
80
|
+
margin: 0;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-wrap: wrap;
|
|
83
|
+
|
|
84
|
+
> .formItem {
|
|
85
|
+
padding: 0.25em 0;
|
|
86
|
+
|
|
87
|
+
small {
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 18px;
|
|
90
|
+
height: 18px;
|
|
91
|
+
right: 18px;
|
|
92
|
+
top: 18px;
|
|
93
|
+
opacity: 0.15;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
> .loginitem {
|
|
98
|
+
width: 100%;
|
|
99
|
+
padding: 0.25em 0;
|
|
100
|
+
|
|
101
|
+
label {
|
|
102
|
+
width: 100%;
|
|
103
|
+
padding-bottom: 0.25rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
button {
|
|
107
|
+
width: 100%;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.forgotten {
|
|
113
|
+
span {
|
|
114
|
+
display: block;
|
|
115
|
+
text-align: center;
|
|
116
|
+
color: var(--paragraph-color);
|
|
117
|
+
padding: 1rem 0;
|
|
118
|
+
|
|
119
|
+
a {
|
|
120
|
+
color: var(--highlight-color);
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.lcontainer {
|
|
127
|
+
--sidebar-width: 35%;
|
|
128
|
+
min-height: 100vh;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.lwrap {
|
|
132
|
+
display: flex;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.aside {
|
|
136
|
+
opacity: 1;
|
|
137
|
+
position: fixed;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
height: 101%;
|
|
140
|
+
width: var(--sidebar-width);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.fwItem {
|
|
144
|
+
flex-basis: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.lastItem .btn {
|
|
148
|
+
width: 100%;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.login .formItem {
|
|
152
|
+
padding: 0.25em 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.login .formItem small {
|
|
156
|
+
position: absolute;
|
|
157
|
+
width: 18px;
|
|
158
|
+
height: 18px;
|
|
159
|
+
right: 18px;
|
|
160
|
+
top: 18px;
|
|
161
|
+
opacity: 0.15;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.login .loginitem {
|
|
165
|
+
width: 100%;
|
|
166
|
+
padding: 0.25em 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.login .loginitem label {
|
|
170
|
+
width: 100%;
|
|
171
|
+
padding-bottom: 0.25rem;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.login .loginitem button {
|
|
175
|
+
width: 100%;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.forgotten span {
|
|
179
|
+
display: block;
|
|
180
|
+
text-align: center;
|
|
181
|
+
color: var(--paragraph-color);
|
|
182
|
+
padding: 1rem 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.forgotten span a {
|
|
186
|
+
color: var(--highlight-color);
|
|
187
|
+
text-decoration: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.btn {
|
|
191
|
+
width: max-content;
|
|
192
|
+
display: inline-block;
|
|
193
|
+
position: relative;
|
|
194
|
+
padding: 0.65rem 1rem;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
font-size: 1rem;
|
|
197
|
+
color: var(--tertiary-color);
|
|
198
|
+
text-decoration: none;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
background: var(--primary-color);
|
|
201
|
+
border: 1px solid rgba(var(--primary-color--rgb), 1.1);
|
|
202
|
+
border-radius: var(--br);
|
|
203
|
+
outline: none;
|
|
204
|
+
transition: all 0.2s cubic-bezier(0.85, 0, 0.15, 1) 0s;
|
|
205
|
+
font-size: 1.25em;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
input:not(:placeholder-shown) + .fi__span,
|
|
209
|
+
textarea:not(:placeholder-shown) + .fi__span,
|
|
210
|
+
select:not(:placeholder-shown) + .fi__span {
|
|
211
|
+
transform: translateY(-40%) translateX(10px) scale(0.75);
|
|
212
|
+
opacity: 1;
|
|
213
|
+
padding: 0 4px;
|
|
214
|
+
background: var(--tertiary-color);
|
|
215
|
+
font-weight: 300;
|
|
216
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { useParams } from 'react-router-dom';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
import Breadcrumb from '../Breadcrumb';
|
|
5
|
+
import CustomFetch from '../Fetch';
|
|
6
|
+
import styles from './styles/AuditLog.module.scss';
|
|
7
|
+
|
|
8
|
+
const AuditLog = ({ userProfile }) => {
|
|
9
|
+
const routeParams = useParams();
|
|
10
|
+
const [data, setData] = useState({});
|
|
11
|
+
|
|
12
|
+
const fetchData = async () => {
|
|
13
|
+
const res = await CustomFetch(
|
|
14
|
+
`/ajax/audits/${routeParams.dataId}`,
|
|
15
|
+
'GET'
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
setData(res.data);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
fetchData();
|
|
23
|
+
}, [routeParams.dataId]);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div>
|
|
27
|
+
<div className={styles.grid}>
|
|
28
|
+
<div className={styles.grid__row}>
|
|
29
|
+
<div className={`${styles.grid__full} ${styles.crmtitle}`}>
|
|
30
|
+
<Breadcrumb
|
|
31
|
+
data={data}
|
|
32
|
+
page={{
|
|
33
|
+
title: 'Audit Logs',
|
|
34
|
+
previousUrl: '/auditLogs',
|
|
35
|
+
titleKey: 'id',
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div className={styles.grid}>
|
|
42
|
+
<div className={styles.grid__subrow}>
|
|
43
|
+
<div className={styles.grid__full}>
|
|
44
|
+
<div className={styles.gridtxt}>
|
|
45
|
+
<ul className={styles.customer__overview}>
|
|
46
|
+
<li>
|
|
47
|
+
<strong>User:</strong>
|
|
48
|
+
{` ${data?.user?.name}`}
|
|
49
|
+
</li>
|
|
50
|
+
<li>
|
|
51
|
+
<strong>Created At:</strong>
|
|
52
|
+
{` ${
|
|
53
|
+
data?.created_at
|
|
54
|
+
? dayjs(data.created_at).format(
|
|
55
|
+
'MM-DD-YYYY hh:mm A'
|
|
56
|
+
)
|
|
57
|
+
: ''
|
|
58
|
+
}`}
|
|
59
|
+
</li>
|
|
60
|
+
<li>
|
|
61
|
+
<strong>IP Address:</strong>
|
|
62
|
+
{` ${data?.ip_address}`}
|
|
63
|
+
</li>
|
|
64
|
+
<li>
|
|
65
|
+
<strong>URL:</strong>
|
|
66
|
+
{` ${data?.url}`}
|
|
67
|
+
</li>
|
|
68
|
+
<li>
|
|
69
|
+
<strong>Event:</strong>
|
|
70
|
+
{` ${data?.formatted_event}`}
|
|
71
|
+
</li>
|
|
72
|
+
<li
|
|
73
|
+
className={`${styles['fw-grid-item']} ${styles.notecolor}`}
|
|
74
|
+
>
|
|
75
|
+
<strong>Old Value(s):</strong>
|
|
76
|
+
<br />
|
|
77
|
+
<pre>
|
|
78
|
+
{JSON.stringify(
|
|
79
|
+
data?.old_values,
|
|
80
|
+
null,
|
|
81
|
+
4
|
|
82
|
+
)}
|
|
83
|
+
</pre>
|
|
84
|
+
</li>
|
|
85
|
+
<li
|
|
86
|
+
className={`${styles['fw-grid-item']} ${styles.notecolor}`}
|
|
87
|
+
>
|
|
88
|
+
<strong>New Value(s):</strong>
|
|
89
|
+
<br />
|
|
90
|
+
|
|
91
|
+
<pre>
|
|
92
|
+
{JSON.stringify(
|
|
93
|
+
data?.new_values,
|
|
94
|
+
null,
|
|
95
|
+
4
|
|
96
|
+
)}
|
|
97
|
+
</pre>
|
|
98
|
+
</li>
|
|
99
|
+
</ul>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default AuditLog;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Table from '../DataGrid';
|
|
3
|
+
import styles from './styles/AuditLogs.module.scss';
|
|
4
|
+
|
|
5
|
+
const AuditLogs = ({ layout }) => {
|
|
6
|
+
const setting = {
|
|
7
|
+
ajaxSetting: {
|
|
8
|
+
url: '/ajax/audits/table',
|
|
9
|
+
take: 25,
|
|
10
|
+
sortBy: 'id',
|
|
11
|
+
sort: 'desc',
|
|
12
|
+
where: [],
|
|
13
|
+
},
|
|
14
|
+
form: {
|
|
15
|
+
primaryKey: 'id',
|
|
16
|
+
url: '/ajax/audits',
|
|
17
|
+
createDisable: true,
|
|
18
|
+
create: {},
|
|
19
|
+
update: {},
|
|
20
|
+
fields: [],
|
|
21
|
+
},
|
|
22
|
+
columns: [
|
|
23
|
+
{
|
|
24
|
+
id: ['user'],
|
|
25
|
+
label: 'User',
|
|
26
|
+
type: 'relation',
|
|
27
|
+
nameFrom: 'name',
|
|
28
|
+
link: {
|
|
29
|
+
url: '/auditLogs/',
|
|
30
|
+
key: 'id',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'formatted_old_values',
|
|
35
|
+
label: 'Old Values',
|
|
36
|
+
type: 'text',
|
|
37
|
+
link: {
|
|
38
|
+
url: '/auditLogs/',
|
|
39
|
+
key: 'id',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'formatted_new_values',
|
|
44
|
+
label: 'New Values',
|
|
45
|
+
type: 'text',
|
|
46
|
+
link: {
|
|
47
|
+
url: '/auditLogs/',
|
|
48
|
+
key: 'id',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'formatted_event',
|
|
53
|
+
label: 'Event',
|
|
54
|
+
type: 'text',
|
|
55
|
+
link: {
|
|
56
|
+
url: '/auditLogs/',
|
|
57
|
+
key: 'id',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'ip_address',
|
|
62
|
+
label: 'IP Address',
|
|
63
|
+
type: 'text',
|
|
64
|
+
link: {
|
|
65
|
+
url: '/auditLogs/',
|
|
66
|
+
key: 'id',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'created_at',
|
|
71
|
+
label: 'Created At',
|
|
72
|
+
type: 'datetime',
|
|
73
|
+
minWidth: 200,
|
|
74
|
+
maxWidth: 200,
|
|
75
|
+
link: {
|
|
76
|
+
url: '/auditLogs/',
|
|
77
|
+
key: 'id',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
settings: [],
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div>
|
|
86
|
+
<div className={styles.grid}>
|
|
87
|
+
<div className={styles.grid__row}>
|
|
88
|
+
<div
|
|
89
|
+
className={`${styles.grid__full} ${
|
|
90
|
+
layout === 'full'
|
|
91
|
+
? styles.crmtitle
|
|
92
|
+
: styles.crmtitleSimple
|
|
93
|
+
}`}
|
|
94
|
+
>
|
|
95
|
+
<h1>Audit Logs</h1>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div className={styles.grid}>
|
|
100
|
+
<div className={styles.grid__row}>
|
|
101
|
+
<div className={styles.grid__full}>
|
|
102
|
+
<Table
|
|
103
|
+
ajaxSetting={setting.ajaxSetting}
|
|
104
|
+
form={setting.form}
|
|
105
|
+
columns={setting.columns}
|
|
106
|
+
settings={setting.settings}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export default AuditLogs;
|