@visns-studio/visns-components 5.11.21 → 5.12.0
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 +5 -5
- package/src/components/{crm/Autocomplete.jsx → Autocomplete.jsx} +1 -1
- package/src/components/{crm/BusinessCardOcr.jsx → BusinessCardOcr.jsx} +1 -1
- package/src/components/{crm/DataGrid.jsx → DataGrid.jsx} +57 -9
- package/src/components/{crm/Download.jsx → Download.jsx} +1 -1
- package/src/components/{cms/DropZone.jsx → DropZone.jsx} +1 -1
- package/src/components/{crm/Field.jsx → Field.jsx} +2 -2
- package/src/components/{crm/Form.jsx → Form.jsx} +65 -30
- package/src/components/{crm/auth → auth}/ClientLogin.jsx +2 -2
- package/src/components/{crm/auth → auth}/ClientOTPVerify.jsx +2 -2
- package/src/components/{crm/auth → auth}/Login.jsx +2 -2
- package/src/components/{crm/auth → auth}/Profile.jsx +3 -3
- package/src/components/{crm/auth → auth}/Reset.jsx +2 -2
- package/src/components/{crm/auth → auth}/TwoFactorAuth.jsx +2 -2
- package/src/components/{crm/auth → auth}/Verify.jsx +2 -2
- package/src/components/{crm/client → client}/ClientDashboard.jsx +1 -1
- package/src/components/{crm/client → client}/ClientPortal.jsx +1 -1
- package/src/components/{crm/columns → columns}/ColumnRenderers.jsx +31 -20
- package/src/components/{crm/generic → generic}/ActionButtons.jsx +1 -1
- package/src/components/{crm/generic → generic}/AlternativeActionModal.jsx +2 -2
- package/src/components/{crm/generic → generic}/AuditLog.jsx +1 -1
- package/src/components/{crm/generic → generic}/AuditLogs.jsx +1 -1
- package/src/components/{cms/generic → generic}/CmsDetail.jsx +2 -2
- package/src/components/{cms/generic → generic}/CmsSort.jsx +1 -1
- package/src/components/{crm/generic → generic}/ConfirmationDialog.jsx +1 -1
- package/src/components/{crm/generic → generic}/ContactSelectorModal.jsx +2 -2
- package/src/components/{crm/generic → generic}/DatePickerDialog.jsx +2 -2
- package/src/components/{crm/generic → generic}/DateRangeSelectorModal.jsx +2 -2
- package/src/components/{crm/generic → generic}/GenericClientPortal.jsx +1 -1
- package/src/components/{crm/generic → generic}/GenericDashboard.jsx +4 -4
- package/src/components/{crm/generic → generic}/GenericDetail.jsx +5 -5
- package/src/components/{crm/generic → generic}/GenericDynamic.jsx +1 -1
- package/src/components/{crm/generic → generic}/GenericEditableTable.jsx +1 -1
- package/src/components/{crm/generic → generic}/GenericFormBuilder.jsx +2 -2
- package/src/components/{crm/generic → generic}/GenericGrid.jsx +2 -2
- package/src/components/{crm/generic → generic}/GenericIndex.jsx +2 -2
- package/src/components/{crm/generic → generic}/GenericMain.jsx +2 -2
- package/src/components/{crm/generic → generic}/GenericQuote.jsx +4 -4
- package/src/components/{crm/generic → generic}/GenericReport.jsx +2 -2
- package/src/components/{crm/generic → generic}/GenericReportForm.jsx +1 -1
- package/src/components/{crm/generic → generic}/GenericSort.jsx +2 -2
- package/src/components/{crm/generic → generic}/NotificationList.jsx +1 -1
- package/src/components/{crm/generic → generic}/ReasonCollectorModal.jsx +2 -2
- package/src/components/{crm/generic → generic}/SortableQuoteItems.jsx +1 -1
- package/src/components/proposal/SectionEditor.jsx +1 -1
- package/src/components/{crm/sorting → sorting}/Item.jsx +1 -1
- package/src/components/{crm/sorting → sorting}/List.jsx +1 -1
- package/src/index.js +57 -59
- package/src/utils/{ConfirmDialog.js → ConfirmDialog.jsx} +1 -1
- package/src/components/cms/DataGrid.jsx +0 -1652
- package/src/components/cms/Field.jsx +0 -802
- package/src/components/cms/Form.jsx +0 -475
- package/src/components/cms/sorting/Item.jsx +0 -121
- package/src/components/cms/sorting/List.jsx +0 -32
- package/src/components/cms/sorting/styles/Item.module.scss +0 -38
- package/src/components/crm/sorting/styles/List.module.scss +0 -74
- /package/src/components/{crm/AssociationManager.jsx → AssociationManager.jsx} +0 -0
- /package/src/components/{crm/AsyncSelect.jsx → AsyncSelect.jsx} +0 -0
- /package/src/components/{crm/Breadcrumb.jsx → Breadcrumb.jsx} +0 -0
- /package/src/components/{crm/Call.jsx → Call.jsx} +0 -0
- /package/src/components/{crm/ClientAssociationManager.jsx → ClientAssociationManager.jsx} +0 -0
- /package/src/components/{crm/Fetch.jsx → Fetch.jsx} +0 -0
- /package/src/components/{cms/Gallery.jsx → Gallery.jsx} +0 -0
- /package/src/components/{crm/Loader.jsx → Loader.jsx} +0 -0
- /package/src/components/{crm/MergeEntity.jsx → MergeEntity.jsx} +0 -0
- /package/src/components/{crm/MultiSelect.jsx → MultiSelect.jsx} +0 -0
- /package/src/components/{crm/Navigation.jsx → Navigation.jsx} +0 -0
- /package/src/components/{crm/Notification.jsx → Notification.jsx} +0 -0
- /package/src/components/{crm/QrCode.jsx → QrCode.jsx} +0 -0
- /package/src/components/{crm/QuickAction.jsx → QuickAction.jsx} +0 -0
- /package/src/components/{crm/SectionHeader.jsx → SectionHeader.jsx} +0 -0
- /package/src/components/{crm/Select.jsx → Select.jsx} +0 -0
- /package/src/components/{crm/SelectList.jsx → SelectList.jsx} +0 -0
- /package/src/components/{crm/SwitchAccount.jsx → SwitchAccount.jsx} +0 -0
- /package/src/components/{crm/TableFilter.jsx → TableFilter.jsx} +0 -0
- /package/src/components/{crm/cells → cells}/CellWithTooltip.jsx +0 -0
- /package/src/components/{crm/controls → controls}/AudioPlayer.jsx +0 -0
- /package/src/components/{crm/controls → controls}/AutoRefreshControls.jsx +0 -0
- /package/src/components/{crm/controls → controls}/DataGridSearch.jsx +0 -0
- /package/src/components/{crm/examples → examples}/FilterExample.jsx +0 -0
- /package/src/components/{crm/examples → examples}/FormStylingGuide.md +0 -0
- /package/src/components/{crm/examples → examples}/FormWithSectionHeaders.jsx +0 -0
- /package/src/components/{crm/examples → examples}/README.md +0 -0
- /package/src/components/{cms/generic → generic}/CmsIndex.jsx +0 -0
- /package/src/components/{crm/generic → generic}/GenericAuth.jsx +0 -0
- /package/src/components/{crm/generic → generic}/shared/formatters.js +0 -0
- /package/src/components/{crm/generic → generic}/shared/gridUtils.js +0 -0
- /package/src/components/{crm/generic → generic}/utils/formatters.js +0 -0
- /package/src/components/{crm/modals → modals}/GalleryModal.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/SketchField.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/arrow.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/circle.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/default-tool.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/fabrictool.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/history.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/json/config.json +0 -0
- /package/src/components/{crm/sketch → sketch}/line.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/pan.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/pencil.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/rectangle-label-object.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/rectangle-label.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/rectangle.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/select.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/tools.jsx +0 -0
- /package/src/components/{crm/sketch → sketch}/utils.jsx +0 -0
- /package/src/components/{crm/generic/styles → styles}/ActionButtons.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/AlternativeActionModal.css +0 -0
- /package/src/components/{crm/styles → styles}/AssociationManager.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/AsyncSelect.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/AuditLog.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/AuditLogs.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/AuthForm.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/Autocomplete.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/BusinessCardOcr.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/ClientAssociationManager.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/ClientAuth.module.scss +0 -0
- /package/src/components/{crm/client/styles → styles}/ClientDashboard.module.scss +0 -0
- /package/src/components/{crm/client/styles → styles}/ClientPortal.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/ContactSelectorModal.css +0 -0
- /package/src/components/{crm/styles → styles}/DataGrid.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/DatePickerDialog.css +0 -0
- /package/src/components/{crm/generic/styles → styles}/DateRangeSelectorModal.css +0 -0
- /package/src/components/{cms/styles → styles}/DropZone.module.css +0 -0
- /package/src/components/{crm/styles → styles}/Field.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/Form.module.scss +0 -0
- /package/src/components/{cms/styles → styles}/Gallery.module.css +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericClientPortal.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericDashboard.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericDetail.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericDynamic.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericEditableTable.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericFormBuilder.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericIndex.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericMain.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericQuote.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericReport.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/GenericSort.module.scss +0 -0
- /package/src/components/{crm/sorting/styles → styles}/Item.module.scss +0 -0
- /package/src/components/{cms/sorting/styles → styles}/List.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/Loader.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/Login.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/MergeEntity.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/MultiSelect.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/Navigation.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/Notification.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/NotificationList.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/Profile.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/QrCode.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/QuickAction.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/ReasonCollectorModal.css +0 -0
- /package/src/components/{crm/generic/styles → styles}/ReportForm.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/Reset.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/SortableQuoteItems.module.scss +0 -0
- /package/src/components/{crm/generic/styles → styles}/SweetAlert.module.css +0 -0
- /package/src/components/{crm/styles → styles}/SwitchAccount.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/TableFilter.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/TwoFactorAuth.module.scss +0 -0
- /package/src/components/{crm/auth/styles → styles}/Verify.module.scss +0 -0
- /package/src/components/{crm/styles → styles}/global-datagrid.css +0 -0
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import CustomFetch from '../crm/Fetch';
|
|
3
|
-
import Field from './Field';
|
|
4
|
-
import slugify from 'react-slugify';
|
|
5
|
-
import moment from 'moment';
|
|
6
|
-
import Reveal from 'react-reveal/Reveal';
|
|
7
|
-
import parse from 'html-react-parser';
|
|
8
|
-
import { toast } from 'react-toastify';
|
|
9
|
-
import { Copy, Trash2 as TrashBin } from 'lucide-react';
|
|
10
|
-
import { confirmDialog } from '../utils/ConfirmDialog';
|
|
11
|
-
|
|
12
|
-
function Form(props) {
|
|
13
|
-
const { dataId, navigate, form } = props;
|
|
14
|
-
const [data, setData] = useState({});
|
|
15
|
-
const [dataClass, setDataClass] = useState({});
|
|
16
|
-
const [audit, setAudit] = useState({
|
|
17
|
-
createdBy: {},
|
|
18
|
-
created: '',
|
|
19
|
-
updatedBy: {},
|
|
20
|
-
updated: '',
|
|
21
|
-
});
|
|
22
|
-
const [uploadProgress, setUploadProgress] = useState({});
|
|
23
|
-
|
|
24
|
-
const handleChange = (e) => {
|
|
25
|
-
if (e) {
|
|
26
|
-
const { name, value } = e.target;
|
|
27
|
-
|
|
28
|
-
switch (e.target.name) {
|
|
29
|
-
case 'title':
|
|
30
|
-
setData((prevState) => ({
|
|
31
|
-
...prevState,
|
|
32
|
-
[name]: value,
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
setData((prevState) => ({
|
|
36
|
-
...prevState,
|
|
37
|
-
slug: slugify(value),
|
|
38
|
-
}));
|
|
39
|
-
break;
|
|
40
|
-
case 'name':
|
|
41
|
-
setData((prevState) => ({
|
|
42
|
-
...prevState,
|
|
43
|
-
[name]: value,
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
|
-
setData((prevState) => ({
|
|
47
|
-
...prevState,
|
|
48
|
-
slug: slugify(value),
|
|
49
|
-
}));
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
if (name) {
|
|
53
|
-
setData((prevState) => ({
|
|
54
|
-
...prevState,
|
|
55
|
-
[name]: value,
|
|
56
|
-
}));
|
|
57
|
-
} else {
|
|
58
|
-
setData((prevState) => ({
|
|
59
|
-
...prevState,
|
|
60
|
-
[e.target.dataset.name]: value,
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const handleChangeDate = (date, id) => {
|
|
69
|
-
setData((prevState) => ({
|
|
70
|
-
...prevState,
|
|
71
|
-
[id]: date,
|
|
72
|
-
}));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const handleChangeSelect = (value, action, id) => {
|
|
76
|
-
if (value && action && id) {
|
|
77
|
-
setData((prevState) => ({
|
|
78
|
-
...prevState,
|
|
79
|
-
[id]: value,
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const handleChangeRicheditor = (e, value, name) => {
|
|
85
|
-
setData((prevState) => ({
|
|
86
|
-
...prevState,
|
|
87
|
-
[name]: value,
|
|
88
|
-
}));
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const handleChangeToggle = (e) => {
|
|
92
|
-
if (!e) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const { name, checked } = e.target;
|
|
97
|
-
|
|
98
|
-
setData((prevState) => ({
|
|
99
|
-
...prevState,
|
|
100
|
-
[name]: checked,
|
|
101
|
-
}));
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const handleChangeFile = (e) => {
|
|
105
|
-
if (e) {
|
|
106
|
-
setData((prevState) => ({
|
|
107
|
-
...prevState,
|
|
108
|
-
[e.target.name]: e.target.files[0],
|
|
109
|
-
}));
|
|
110
|
-
|
|
111
|
-
Vapor.store(e.target.files[0], {
|
|
112
|
-
progress: (progress) => {
|
|
113
|
-
setUploadProgress((prevState) => ({
|
|
114
|
-
...prevState,
|
|
115
|
-
[e.target.name]: progress * 100,
|
|
116
|
-
}));
|
|
117
|
-
},
|
|
118
|
-
}).then((response) => {
|
|
119
|
-
if (data.hasOwnProperty('files')) {
|
|
120
|
-
let _files = data.files;
|
|
121
|
-
let _new = true;
|
|
122
|
-
|
|
123
|
-
data.files.forEach((a, b) => {
|
|
124
|
-
if (e.target.name === a.field) {
|
|
125
|
-
_files[b] = {
|
|
126
|
-
field: e.target.name,
|
|
127
|
-
uuid: response.uuid,
|
|
128
|
-
key: response.key,
|
|
129
|
-
bucket: response.bucket,
|
|
130
|
-
filename: e.target.files[0].name,
|
|
131
|
-
filesize: e.target.files[0].size,
|
|
132
|
-
extension: response.extension,
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
_new = false;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
if (_new === true) {
|
|
140
|
-
setData((prevState) => ({
|
|
141
|
-
...prevState,
|
|
142
|
-
files: [
|
|
143
|
-
...prevState.files,
|
|
144
|
-
{
|
|
145
|
-
field: e.target.name,
|
|
146
|
-
uuid: response.uuid,
|
|
147
|
-
key: response.key,
|
|
148
|
-
bucket: response.bucket,
|
|
149
|
-
filename: e.target.files[0].name,
|
|
150
|
-
filesize: e.target.files[0].size,
|
|
151
|
-
extension: response.extension,
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
}));
|
|
155
|
-
} else {
|
|
156
|
-
setData((prevState) => ({
|
|
157
|
-
...prevState,
|
|
158
|
-
files: _files,
|
|
159
|
-
}));
|
|
160
|
-
}
|
|
161
|
-
} else {
|
|
162
|
-
setData((prevState) => ({
|
|
163
|
-
...prevState,
|
|
164
|
-
files: [
|
|
165
|
-
{
|
|
166
|
-
field: e.target.name,
|
|
167
|
-
uuid: response.uuid,
|
|
168
|
-
key: response.key,
|
|
169
|
-
bucket: response.bucket,
|
|
170
|
-
filename: e.target.files[0].name,
|
|
171
|
-
filesize: e.target.files[0].size,
|
|
172
|
-
extension: response.extension,
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
}));
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
const handleSubmit = (e) => {
|
|
182
|
-
if (e) {
|
|
183
|
-
e.preventDefault();
|
|
184
|
-
|
|
185
|
-
let error = '';
|
|
186
|
-
let url = '';
|
|
187
|
-
let method = '';
|
|
188
|
-
let message = '';
|
|
189
|
-
|
|
190
|
-
if (data.title === '') {
|
|
191
|
-
error += 'Please enter a title.<br />';
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (data.summary === '') {
|
|
195
|
-
error += 'Please enter a summary.<br />';
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (error === '') {
|
|
199
|
-
if (dataId === 'create') {
|
|
200
|
-
url = form.url;
|
|
201
|
-
method = 'POST';
|
|
202
|
-
message = 'You have successfully created a new entry.';
|
|
203
|
-
} else {
|
|
204
|
-
url = form.url + '/' + dataId;
|
|
205
|
-
method = 'PUT';
|
|
206
|
-
message = 'You have successfully updated this entry.';
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
CustomFetch(url, method, data, function (result) {
|
|
210
|
-
if (result.error === '') {
|
|
211
|
-
let _uploadProgress = uploadProgress;
|
|
212
|
-
|
|
213
|
-
Object.keys(_uploadProgress).forEach((a, b) => {
|
|
214
|
-
setUploadProgress((prevState) => ({
|
|
215
|
-
...prevState,
|
|
216
|
-
[b]: 0,
|
|
217
|
-
}));
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
toast.success(message);
|
|
221
|
-
|
|
222
|
-
if (dataId === 'create') {
|
|
223
|
-
navigate(
|
|
224
|
-
form.url.replace('/ajax', '') +
|
|
225
|
-
'/' +
|
|
226
|
-
result.data.id,
|
|
227
|
-
{
|
|
228
|
-
state: {
|
|
229
|
-
form: form,
|
|
230
|
-
},
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
} else {
|
|
235
|
-
toast.error(result.error);
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
} else {
|
|
239
|
-
toast.error(<div>{parse(error)}</div>);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
const handleDelete = (e) => {
|
|
245
|
-
if (e) {
|
|
246
|
-
confirmDialog({
|
|
247
|
-
title: 'Delete this entry',
|
|
248
|
-
message: 'Are you sure you want to delete it?',
|
|
249
|
-
data: data, // Pass the data object for context
|
|
250
|
-
buttons: [
|
|
251
|
-
{
|
|
252
|
-
label: 'Yes',
|
|
253
|
-
onClick: () =>
|
|
254
|
-
CustomFetch(
|
|
255
|
-
`${form.url}/${dataId}`,
|
|
256
|
-
'DELETE',
|
|
257
|
-
{},
|
|
258
|
-
function (result) {
|
|
259
|
-
if (result.error === '') {
|
|
260
|
-
navigate(form.url.replace('/ajax', ''));
|
|
261
|
-
toast.success(
|
|
262
|
-
'You have successfully deleted this entry.'
|
|
263
|
-
);
|
|
264
|
-
} else {
|
|
265
|
-
toast.error(result.error);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
label: 'No',
|
|
272
|
-
onClick: () => close(),
|
|
273
|
-
},
|
|
274
|
-
],
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
const fetchData = () => {
|
|
280
|
-
form.fields.forEach((a) => {
|
|
281
|
-
setData((prevState) => ({
|
|
282
|
-
...prevState,
|
|
283
|
-
[a.id]: '',
|
|
284
|
-
}));
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
if (dataId !== 'create') {
|
|
288
|
-
CustomFetch(
|
|
289
|
-
`${form.url}/${dataId}`,
|
|
290
|
-
'GET',
|
|
291
|
-
{},
|
|
292
|
-
function (result) {
|
|
293
|
-
let now = moment();
|
|
294
|
-
let created = moment.duration(
|
|
295
|
-
now.diff(result.data.created_at)
|
|
296
|
-
);
|
|
297
|
-
let updated = moment.duration(
|
|
298
|
-
now.diff(result.data.updated_at)
|
|
299
|
-
);
|
|
300
|
-
|
|
301
|
-
setData(result.data);
|
|
302
|
-
setAudit((prevState) => ({
|
|
303
|
-
...prevState,
|
|
304
|
-
createdBy: result.audit_first,
|
|
305
|
-
created:
|
|
306
|
-
created.hours() > 24
|
|
307
|
-
? created.days() +
|
|
308
|
-
' Days ' +
|
|
309
|
-
created.hours() +
|
|
310
|
-
' Hour(s) ' +
|
|
311
|
-
created.minutes() +
|
|
312
|
-
' Minutes'
|
|
313
|
-
: created.hours() +
|
|
314
|
-
' Hour(s) ' +
|
|
315
|
-
created.minutes() +
|
|
316
|
-
' Minutes',
|
|
317
|
-
updatedBy: result.audit_latest,
|
|
318
|
-
updated:
|
|
319
|
-
updated.hours() > 24
|
|
320
|
-
? updated.days() +
|
|
321
|
-
' Days ' +
|
|
322
|
-
updated.hours() +
|
|
323
|
-
' Hour(s) ' +
|
|
324
|
-
updated.minutes() +
|
|
325
|
-
' Minutes'
|
|
326
|
-
: updated.hours() +
|
|
327
|
-
' Hour(s) ' +
|
|
328
|
-
updated.minutes() +
|
|
329
|
-
' Minutes',
|
|
330
|
-
}));
|
|
331
|
-
},
|
|
332
|
-
function (error) {
|
|
333
|
-
navigate('/');
|
|
334
|
-
|
|
335
|
-
toast.error(String(error));
|
|
336
|
-
}
|
|
337
|
-
);
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
useEffect(() => {
|
|
342
|
-
form.fields.forEach((a) => {
|
|
343
|
-
if (a.type === 'image') {
|
|
344
|
-
setUploadProgress((prevState) => ({
|
|
345
|
-
...prevState,
|
|
346
|
-
[a.id]: 0,
|
|
347
|
-
}));
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
setData((prevState) => ({
|
|
351
|
-
...prevState,
|
|
352
|
-
[a.id]: '',
|
|
353
|
-
}));
|
|
354
|
-
|
|
355
|
-
setDataClass((prevState) => ({
|
|
356
|
-
...prevState,
|
|
357
|
-
[a.id]: '',
|
|
358
|
-
}));
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
fetchData();
|
|
362
|
-
}, [dataId]);
|
|
363
|
-
|
|
364
|
-
return (
|
|
365
|
-
<Reveal effect="fadeInUp">
|
|
366
|
-
<div className="grid">
|
|
367
|
-
<div className="grid__row">
|
|
368
|
-
<div className="grid__full cmstitle">
|
|
369
|
-
<h1>
|
|
370
|
-
{data.title
|
|
371
|
-
? data.title
|
|
372
|
-
: dataId !== 'create'
|
|
373
|
-
? form.update.title
|
|
374
|
-
: form.create.title}
|
|
375
|
-
</h1>
|
|
376
|
-
<div className="cmstitle__actions">
|
|
377
|
-
<button
|
|
378
|
-
className="btn actionbtn"
|
|
379
|
-
onClick={handleSubmit}
|
|
380
|
-
>
|
|
381
|
-
<Copy size={18} strokeWidth={2} />{' '}
|
|
382
|
-
{dataId !== 'create' ? 'Save' : 'Create'}
|
|
383
|
-
</button>
|
|
384
|
-
</div>
|
|
385
|
-
</div>
|
|
386
|
-
</div>
|
|
387
|
-
</div>
|
|
388
|
-
<div className="dynamic">
|
|
389
|
-
<div className="dynamic__left">
|
|
390
|
-
<div className="formcontainer">
|
|
391
|
-
<div className="dynamicform">
|
|
392
|
-
{form.fields.map((a, b) => (
|
|
393
|
-
<Field
|
|
394
|
-
key={
|
|
395
|
-
b +
|
|
396
|
-
'-fields-' +
|
|
397
|
-
(a.hasOwnProperty('key')
|
|
398
|
-
? a.id + '-' + a.key
|
|
399
|
-
: a.id)
|
|
400
|
-
}
|
|
401
|
-
baseData={data}
|
|
402
|
-
fetchData={fetchData}
|
|
403
|
-
inputClass={dataClass}
|
|
404
|
-
inputValue={
|
|
405
|
-
a.hasOwnProperty('key')
|
|
406
|
-
? data[a.key]
|
|
407
|
-
: Array.isArray(data[a.id]) &&
|
|
408
|
-
a.type === 'image'
|
|
409
|
-
? data[a.id].length > 0
|
|
410
|
-
? data[a.id][0]
|
|
411
|
-
: ''
|
|
412
|
-
: data[a.id]
|
|
413
|
-
}
|
|
414
|
-
onChange={handleChange}
|
|
415
|
-
onChangeDate={handleChangeDate}
|
|
416
|
-
onChangeFile={handleChangeFile}
|
|
417
|
-
onChangeRicheditor={handleChangeRicheditor}
|
|
418
|
-
onChangeSelect={handleChangeSelect}
|
|
419
|
-
onChangeToggle={handleChangeToggle}
|
|
420
|
-
setFormData={setData}
|
|
421
|
-
settings={a}
|
|
422
|
-
uploadProgress={uploadProgress}
|
|
423
|
-
/>
|
|
424
|
-
))}
|
|
425
|
-
</div>
|
|
426
|
-
</div>
|
|
427
|
-
</div>
|
|
428
|
-
<div className="dynamic__right">
|
|
429
|
-
<h1>Information</h1>
|
|
430
|
-
<ul>
|
|
431
|
-
<li>
|
|
432
|
-
Created: <span>{audit.created} Ago</span>
|
|
433
|
-
</li>
|
|
434
|
-
<li>
|
|
435
|
-
By:{' '}
|
|
436
|
-
<span>
|
|
437
|
-
{audit &&
|
|
438
|
-
audit.createdBy &&
|
|
439
|
-
audit.createdBy.user
|
|
440
|
-
? audit.createdBy.user.name
|
|
441
|
-
: null}
|
|
442
|
-
</span>
|
|
443
|
-
</li>
|
|
444
|
-
<li>
|
|
445
|
-
Last Update: <span>{audit.updated} Ago</span>
|
|
446
|
-
</li>
|
|
447
|
-
<li>
|
|
448
|
-
by:{' '}
|
|
449
|
-
<span>
|
|
450
|
-
{audit &&
|
|
451
|
-
audit.updatedBy &&
|
|
452
|
-
audit.updatedBy.user
|
|
453
|
-
? audit.updatedBy.user.name
|
|
454
|
-
: null}
|
|
455
|
-
</span>
|
|
456
|
-
</li>
|
|
457
|
-
{dataId !== 'create' ? (
|
|
458
|
-
<li>
|
|
459
|
-
<button
|
|
460
|
-
className="btn actionbtn deletebtn"
|
|
461
|
-
onClick={handleDelete}
|
|
462
|
-
>
|
|
463
|
-
<TrashBin size={14} strokeWidth={2} />{' '}
|
|
464
|
-
Delete Entry
|
|
465
|
-
</button>
|
|
466
|
-
</li>
|
|
467
|
-
) : null}
|
|
468
|
-
</ul>
|
|
469
|
-
</div>
|
|
470
|
-
</div>
|
|
471
|
-
</Reveal>
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export default Form;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SortableElement, sortableHandle } from 'react-sortable-hoc';
|
|
3
|
-
import { GripVertical as ChevronVertical, Edit as Pencil, Trash2 as TrashCan } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
import styles from './styles/Item.module.scss';
|
|
6
|
-
|
|
7
|
-
const DragHandle = sortableHandle(() => (
|
|
8
|
-
<ChevronVertical className="drag-handle" strokeWidth={1} size={26} />
|
|
9
|
-
));
|
|
10
|
-
|
|
11
|
-
// Utility function to truncate text
|
|
12
|
-
const truncateText = (text, maxLength) => {
|
|
13
|
-
if (text && text.length > maxLength) {
|
|
14
|
-
return `${text.substring(0, maxLength)}...`;
|
|
15
|
-
}
|
|
16
|
-
return text;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const SortableItem = ({
|
|
20
|
-
containerIndex,
|
|
21
|
-
handleClick,
|
|
22
|
-
handleEdit,
|
|
23
|
-
handleDelete,
|
|
24
|
-
showImage,
|
|
25
|
-
value,
|
|
26
|
-
}) => {
|
|
27
|
-
const renderImage = (d) => {
|
|
28
|
-
let htmlContainer = '';
|
|
29
|
-
|
|
30
|
-
if (showImage) {
|
|
31
|
-
const imageUrl = d.image_url || d.file_url;
|
|
32
|
-
htmlContainer = imageUrl ? (
|
|
33
|
-
<div className="sortimg">
|
|
34
|
-
<img src={imageUrl} alt="" />
|
|
35
|
-
</div>
|
|
36
|
-
) : (
|
|
37
|
-
<div className="sortimg">
|
|
38
|
-
{/* Placeholder image */}
|
|
39
|
-
<img
|
|
40
|
-
src="data:image/png;base64,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"
|
|
41
|
-
alt="Placeholder"
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return htmlContainer;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const renderEditButton = () => {
|
|
51
|
-
if (!handleEdit) return null;
|
|
52
|
-
|
|
53
|
-
if (showImage) {
|
|
54
|
-
if (
|
|
55
|
-
value.hasOwnProperty('file_title') &&
|
|
56
|
-
value.hasOwnProperty('file_description')
|
|
57
|
-
) {
|
|
58
|
-
return <EditButton />;
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return <EditButton />;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const EditButton = () => (
|
|
67
|
-
<Pencil
|
|
68
|
-
className="pencil-edit"
|
|
69
|
-
strokeWidth={2}
|
|
70
|
-
size={24}
|
|
71
|
-
onClick={(e) => {
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
e.stopPropagation();
|
|
74
|
-
handleEdit(value);
|
|
75
|
-
}}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<li
|
|
81
|
-
onClick={(e) => {
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
if (handleClick) {
|
|
84
|
-
handleClick(containerIndex);
|
|
85
|
-
}
|
|
86
|
-
}}
|
|
87
|
-
>
|
|
88
|
-
<DragHandle />
|
|
89
|
-
{truncateText(
|
|
90
|
-
value.label || value.file_title || value.file_name,
|
|
91
|
-
30
|
|
92
|
-
)}
|
|
93
|
-
|
|
94
|
-
{renderImage(value)}
|
|
95
|
-
|
|
96
|
-
{(handleEdit || handleDelete) && (
|
|
97
|
-
<div className={styles.actionIcons}>
|
|
98
|
-
{renderEditButton()}
|
|
99
|
-
|
|
100
|
-
{handleDelete && (
|
|
101
|
-
<TrashCan
|
|
102
|
-
className="delete"
|
|
103
|
-
strokeWidth={2}
|
|
104
|
-
size={24}
|
|
105
|
-
onClick={(e) => {
|
|
106
|
-
e.preventDefault();
|
|
107
|
-
e.stopPropagation();
|
|
108
|
-
handleDelete(
|
|
109
|
-
value.id || containerIndex,
|
|
110
|
-
value.label || value.file_name
|
|
111
|
-
);
|
|
112
|
-
}}
|
|
113
|
-
/>
|
|
114
|
-
)}
|
|
115
|
-
</div>
|
|
116
|
-
)}
|
|
117
|
-
</li>
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export default SortableElement(SortableItem);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import VisnsSortableItem from './Item';
|
|
3
|
-
import { SortableContainer } from 'react-sortable-hoc';
|
|
4
|
-
|
|
5
|
-
import styles from './styles/List.module.scss';
|
|
6
|
-
|
|
7
|
-
const SortableList = ({
|
|
8
|
-
handleClick,
|
|
9
|
-
handleDelete,
|
|
10
|
-
handleEdit,
|
|
11
|
-
items,
|
|
12
|
-
showImage,
|
|
13
|
-
}) => {
|
|
14
|
-
return (
|
|
15
|
-
<ul className={styles.sortlist}>
|
|
16
|
-
{items.map((value, index) => (
|
|
17
|
-
<VisnsSortableItem
|
|
18
|
-
key={`item-${index}`}
|
|
19
|
-
containerIndex={index}
|
|
20
|
-
index={index}
|
|
21
|
-
handleClick={handleClick}
|
|
22
|
-
handleDelete={handleDelete}
|
|
23
|
-
handleEdit={handleEdit}
|
|
24
|
-
showImage={showImage}
|
|
25
|
-
value={value}
|
|
26
|
-
/>
|
|
27
|
-
))}
|
|
28
|
-
</ul>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default SortableContainer(SortableList);
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.actionIcons {
|
|
2
|
-
position: absolute;
|
|
3
|
-
right: 10px;
|
|
4
|
-
top: 50%;
|
|
5
|
-
transform: translateY(-50%);
|
|
6
|
-
display: flex;
|
|
7
|
-
gap: 12px;
|
|
8
|
-
align-items: center;
|
|
9
|
-
z-index: 10;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:global {
|
|
13
|
-
.delete {
|
|
14
|
-
width: 32px;
|
|
15
|
-
height: 32px;
|
|
16
|
-
color: #fff;
|
|
17
|
-
transition: color 0.2s ease;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
display: block;
|
|
20
|
-
|
|
21
|
-
&:hover {
|
|
22
|
-
color: #d32f2f;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.pencil-edit {
|
|
27
|
-
width: 32px;
|
|
28
|
-
height: 32px;
|
|
29
|
-
color: var(--primary-color);
|
|
30
|
-
transition: color 0.2s ease;
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
display: block;
|
|
33
|
-
|
|
34
|
-
&:hover {
|
|
35
|
-
color: var(--secondary-color);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|