@visns-studio/visns-components 3.2.0 → 3.2.2
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.
|
@@ -14,7 +14,6 @@ import numeral from 'numeral';
|
|
|
14
14
|
import Popup from 'reactjs-popup';
|
|
15
15
|
import parse from 'html-react-parser';
|
|
16
16
|
import { saveAs } from 'file-saver';
|
|
17
|
-
import pluralize from 'pluralize';
|
|
18
17
|
import NumberFilter from '@inovua/reactdatagrid-community/NumberFilter';
|
|
19
18
|
import SelectFilter from '@inovua/reactdatagrid-community/SelectFilter';
|
|
20
19
|
import DateFilter from '@inovua/reactdatagrid-community/DateFilter';
|
|
@@ -721,7 +720,11 @@ const DataGrid = forwardRef(
|
|
|
721
720
|
return (
|
|
722
721
|
<div
|
|
723
722
|
className="filterInput--alt"
|
|
724
|
-
style={{
|
|
723
|
+
style={{
|
|
724
|
+
height: style.data_grid_search_height
|
|
725
|
+
? style.data_grid_search_height
|
|
726
|
+
: '58px',
|
|
727
|
+
}}
|
|
725
728
|
></div>
|
|
726
729
|
);
|
|
727
730
|
}
|
|
@@ -193,10 +193,21 @@ function Navigation({
|
|
|
193
193
|
);
|
|
194
194
|
};
|
|
195
195
|
|
|
196
|
+
const getFirstRolePermissions = () => {
|
|
197
|
+
if (
|
|
198
|
+
userProfile.roles &&
|
|
199
|
+
userProfile.roles.length > 0 &&
|
|
200
|
+
userProfile.roles[0].permissions.length > 0
|
|
201
|
+
) {
|
|
202
|
+
return userProfile.roles[0].permissions.map(
|
|
203
|
+
(permission) => permission.name
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
return [];
|
|
207
|
+
};
|
|
208
|
+
|
|
196
209
|
useEffect(() => {
|
|
197
|
-
const permissions =
|
|
198
|
-
(permission) => permission.name
|
|
199
|
-
);
|
|
210
|
+
const permissions = getFirstRolePermissions();
|
|
200
211
|
|
|
201
212
|
setNavData((prevNavData) => {
|
|
202
213
|
const updatePermissions = (nav) => {
|
package/package.json
CHANGED