- saving progress;
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import React from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { intersection } from 'ramda';
|
||||
import { intersection, is } from 'ramda';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../../../store';
|
||||
|
||||
// components
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import HelpIcon from '../../../../icons/HelpIcon';
|
||||
|
||||
const AppSidebar = () => {
|
||||
const permissions = useStore().main.getPermissions();
|
||||
@@ -54,32 +55,39 @@ const AppSidebar = () => {
|
||||
id: 6,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length
|
||||
},
|
||||
{
|
||||
label: __('Soccorso Istruttorio', 'gepafin'),
|
||||
icon: <HelpIcon/>,
|
||||
href: '/soccorso-istruttorio',
|
||||
id: 7,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length
|
||||
},
|
||||
{
|
||||
label: __('Gestione Utenti', 'gepafin'),
|
||||
icon: 'pi pi-users',
|
||||
href: '/utenti',
|
||||
id: 7,
|
||||
id: 8,
|
||||
enable: intersection(permissions, ['VIEW_USERS', 'MANAGE_USERS']).length
|
||||
},
|
||||
{
|
||||
label: __('Configurazione', 'gepafin'),
|
||||
icon: 'pi pi-cog',
|
||||
//href: '/configurazione',
|
||||
id: 8,
|
||||
id: 9,
|
||||
enable: false
|
||||
},
|
||||
{
|
||||
label: __('Report e Analisi', 'gepafin'),
|
||||
icon: 'pi pi-chart-bar',
|
||||
//href: '/stats',
|
||||
id: 9,
|
||||
id: 10,
|
||||
enable: false
|
||||
},
|
||||
{
|
||||
label: __('Log di Sistema', 'gepafin'),
|
||||
icon: 'pi pi-receipt',
|
||||
clickFn: () => {},
|
||||
id: 10,
|
||||
id: 11,
|
||||
enable: false
|
||||
}
|
||||
]
|
||||
@@ -91,11 +99,15 @@ const AppSidebar = () => {
|
||||
.map(o => <li key={o.id}>
|
||||
{o.href
|
||||
? <NavLink to={o.href}>
|
||||
<i className={o.icon}></i>
|
||||
{is(String, o.icon)
|
||||
? <i className={o.icon}></i>
|
||||
: o.icon}
|
||||
<span>{o.label}</span>
|
||||
</NavLink>
|
||||
: <button onClick={() => {}}>
|
||||
<i className={o.icon}></i>
|
||||
{is(String, o.icon)
|
||||
? <i className={o.icon}></i>
|
||||
: o.icon}
|
||||
<span>{o.label}</span>
|
||||
</button>}
|
||||
</li>)}
|
||||
|
||||
Reference in New Issue
Block a user