@visns-studio/visns-components 4.7.10 → 4.7.11
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 +1 -1
- package/src/components/crm/DataGrid.jsx +29 -19
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
76
76
|
},
|
|
77
77
|
"name": "@visns-studio/visns-components",
|
|
78
|
-
"version": "4.7.
|
|
78
|
+
"version": "4.7.11",
|
|
79
79
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
80
80
|
"main": "src/index.js",
|
|
81
81
|
"files": [
|
|
@@ -646,28 +646,38 @@ const DataGrid = forwardRef(
|
|
|
646
646
|
|
|
647
647
|
if (column.type !== 'dropdown') {
|
|
648
648
|
if (column.id !== '__checkbox-column') {
|
|
649
|
-
if (column.link && column.link.url) {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
649
|
+
if (column.link && column.link.hasOwnProperty('url')) {
|
|
650
|
+
if (column.link.url) {
|
|
651
|
+
const fileRelationArray = column.id.split('.');
|
|
652
|
+
const linkUrl = column.link.url;
|
|
653
|
+
const linkKey =
|
|
654
|
+
rowProps.columns[columnIndex].link.key;
|
|
655
|
+
const rowData = rowProps.data[linkKey];
|
|
656
|
+
|
|
657
|
+
if (column.link.hasOwnProperty('folder')) {
|
|
658
|
+
const linkFolder =
|
|
659
|
+
rowProps.columns[columnIndex].link
|
|
660
|
+
.folder;
|
|
661
|
+
|
|
662
|
+
if (rowProps.data[fileRelationArray[0]]) {
|
|
663
|
+
if (linkFolder !== '') {
|
|
664
|
+
window.open(
|
|
665
|
+
`${linkUrl}${rowData}/${linkFolder}`
|
|
666
|
+
);
|
|
667
|
+
} else {
|
|
668
|
+
window.open(`${linkUrl}${rowData}`);
|
|
669
|
+
}
|
|
667
670
|
}
|
|
671
|
+
} else {
|
|
672
|
+
navigate(`${linkUrl}${rowData}`);
|
|
668
673
|
}
|
|
669
674
|
} else {
|
|
670
|
-
|
|
675
|
+
if (rowProps.data[column.id]) {
|
|
676
|
+
window.open(
|
|
677
|
+
rowProps.data[column.id],
|
|
678
|
+
'_blank'
|
|
679
|
+
);
|
|
680
|
+
}
|
|
671
681
|
}
|
|
672
682
|
} else if (column.link && column.link.popup) {
|
|
673
683
|
const linkPopup = column.link.popup;
|