@visns-studio/visns-components 3.3.3 → 3.3.5
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/components/crm/DataGrid.jsx +16 -1
- package/components/crm/Field.jsx +19 -2
- package/package.json +1 -1
|
@@ -669,7 +669,7 @@ const DataGrid = forwardRef(
|
|
|
669
669
|
{(form.create &&
|
|
670
670
|
form.create.title &&
|
|
671
671
|
form.create.title !== '') ||
|
|
672
|
-
(form.url && form.create
|
|
672
|
+
(form.url && form.create?.title) ? (
|
|
673
673
|
<button
|
|
674
674
|
className="btn"
|
|
675
675
|
onClick={(e) => {
|
|
@@ -694,6 +694,21 @@ const DataGrid = forwardRef(
|
|
|
694
694
|
>
|
|
695
695
|
<div className="icon-plus"></div> Create
|
|
696
696
|
</button>
|
|
697
|
+
) : form.url ? (
|
|
698
|
+
<button
|
|
699
|
+
className="btn"
|
|
700
|
+
onClick={(e) => {
|
|
701
|
+
e.preventDefault();
|
|
702
|
+
|
|
703
|
+
window.open(
|
|
704
|
+
form.url,
|
|
705
|
+
'',
|
|
706
|
+
'width=1440,height=1024,menubar=1,resizable=1,status=1,titlebar=1,toolbar=1'
|
|
707
|
+
);
|
|
708
|
+
}}
|
|
709
|
+
>
|
|
710
|
+
<div className="icon-plus"></div> Create
|
|
711
|
+
</button>
|
|
697
712
|
) : null}
|
|
698
713
|
</div>
|
|
699
714
|
);
|
package/components/crm/Field.jsx
CHANGED
|
@@ -3,6 +3,7 @@ import DatePicker from 'react-datepicker';
|
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
import Toggle from 'react-toggle';
|
|
5
5
|
import moment from 'moment';
|
|
6
|
+
import parse from 'html-react-parser';
|
|
6
7
|
import { BlockPicker } from 'react-color';
|
|
7
8
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
8
9
|
import { NumericFormat, PatternFormat } from 'react-number-format';
|
|
@@ -238,8 +239,6 @@ function Field({
|
|
|
238
239
|
'plaindatetime',
|
|
239
240
|
'plainrelation',
|
|
240
241
|
'plainrelationarray',
|
|
241
|
-
'plaintext',
|
|
242
|
-
'plaintextheading',
|
|
243
242
|
'richeditor',
|
|
244
243
|
'time',
|
|
245
244
|
].includes(settings.type)
|
|
@@ -249,6 +248,24 @@ function Field({
|
|
|
249
248
|
{settings.label} {settings.required ? '*' : ''}
|
|
250
249
|
</span>
|
|
251
250
|
);
|
|
251
|
+
} else if (['plaintext'].includes(settings.type)) {
|
|
252
|
+
if (settings.description) {
|
|
253
|
+
return (
|
|
254
|
+
<span>
|
|
255
|
+
{settings.description
|
|
256
|
+
? parse(settings.description)
|
|
257
|
+
: ''}
|
|
258
|
+
</span>
|
|
259
|
+
);
|
|
260
|
+
} else {
|
|
261
|
+
return (
|
|
262
|
+
<span className="fi__span prefocus">
|
|
263
|
+
{settings.label} {settings.required ? '*' : ''}
|
|
264
|
+
</span>
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
} else if (['plaintextheading'].includes(settings.type)) {
|
|
268
|
+
return <h2>{settings.label ? settings.label : ''}</h2>;
|
|
252
269
|
}
|
|
253
270
|
};
|
|
254
271
|
|
package/package.json
CHANGED