@campxdev/shared 0.5.7 → 0.5.8
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/SideNav.tsx +14 -14
package/package.json
CHANGED
|
@@ -86,24 +86,24 @@ const DropDownMenu = ({path, title, icon, menuItems, permissionKey}) => {
|
|
|
86
86
|
const [open, setOpen] = useState(false)
|
|
87
87
|
const permissions = PermissionsStore.useState((s) => s).permissions
|
|
88
88
|
|
|
89
|
-
const validateDropdownAccess = () => {
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
// const validateDropdownAccess = () => {
|
|
90
|
+
// if (accessIfNoKey && !permissions) return true
|
|
91
|
+
// let arr = []
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
// for (let i = 0; i < menuItems.length; i++) {
|
|
94
|
+
// if (permissions[menuItems[i].permissionKey]) {
|
|
95
|
+
// arr.push(true)
|
|
96
|
+
// } else {
|
|
97
|
+
// arr.push(accessIfNoKey)
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
}
|
|
101
|
+
// return arr.includes(true)
|
|
102
|
+
// }
|
|
103
103
|
|
|
104
|
-
const dropdownAccess = validateDropdownAccess()
|
|
104
|
+
// const dropdownAccess = validateDropdownAccess()
|
|
105
105
|
|
|
106
|
-
if (!dropdownAccess) return null
|
|
106
|
+
// if (!dropdownAccess) return null
|
|
107
107
|
return (
|
|
108
108
|
<>
|
|
109
109
|
<Box
|