- saving progress;
This commit is contained in:
@@ -53,69 +53,97 @@ const AppSidebar = () => {
|
||||
icon: 'pi pi-file',
|
||||
href: '/domande',
|
||||
id: 6,
|
||||
enable: intersection(permissions, ['VIEW_USERS', 'MANAGE_USERS']).length
|
||||
enable: intersection(permissions, ['VIEW_USERS', 'MANAGE_USERS', 'ASSIGED_APPLICATION']).length
|
||||
},
|
||||
{
|
||||
label: __('Domande da valutare', 'gepafin'),
|
||||
icon: 'pi pi-calendar-clock',
|
||||
href: '/domande',
|
||||
id: 7,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length && !intersection(permissions, ['ASSIGED_APPLICATION']).length
|
||||
},
|
||||
{
|
||||
label: __('Bandi attivi', 'gepafin'),
|
||||
icon: 'pi pi-file',
|
||||
href: '/bandi',
|
||||
id: 8,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length
|
||||
},
|
||||
{
|
||||
label: __('Soccorso', 'gepafin'),
|
||||
icon: <HelpIcon/>,
|
||||
href: '/soccorso-istruttorio',
|
||||
id: 9,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length
|
||||
},
|
||||
{
|
||||
label: __('Archivio domande', 'gepafin'),
|
||||
icon: 'pi pi-briefcase',
|
||||
href: '/domande',
|
||||
id: 8,
|
||||
id: 10,
|
||||
enable: intersection(permissions, ['APPLY_CALLS']).length
|
||||
},
|
||||
{
|
||||
label: __('Archivio domande', 'gepafin'),
|
||||
icon: 'pi pi-briefcase',
|
||||
href: '/domande-archivio',
|
||||
id: 9,
|
||||
id: 11,
|
||||
enable: intersection(permissions, ['VIEW_USERS', 'MANAGE_USERS']).length
|
||||
},
|
||||
{
|
||||
label: __('Archivio domande', 'gepafin'),
|
||||
icon: 'pi pi-briefcase',
|
||||
href: '/domande-archivio',
|
||||
id: 10,
|
||||
id: 12,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length
|
||||
},
|
||||
{
|
||||
label: __('Area personale', 'gepafin'),
|
||||
icon: 'pi pi-calendar-clock',
|
||||
id: 17,
|
||||
enable: intersection(permissions, ['ASSIGED_APPLICATION']).length
|
||||
},
|
||||
{
|
||||
label: __('Domande da valutare', 'gepafin'),
|
||||
icon: 'pi pi-calendar-clock',
|
||||
href: '/mie-domande',
|
||||
id: 18,
|
||||
enable: intersection(permissions, ['ASSIGED_APPLICATION']).length
|
||||
},
|
||||
{
|
||||
label: __('Soccorso istruttorio', 'gepafin'),
|
||||
icon: <HelpIcon/>,
|
||||
href: '/soccorso-istruttorio',
|
||||
id: 11,
|
||||
enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length
|
||||
href: '/mio-soccorso-istruttorio',
|
||||
id: 19,
|
||||
enable: intersection(permissions, ['ASSIGED_APPLICATION']).length
|
||||
},
|
||||
{
|
||||
label: __('Gestione utenti', 'gepafin'),
|
||||
icon: 'pi pi-users',
|
||||
href: '/utenti',
|
||||
id: 12,
|
||||
id: 13,
|
||||
enable: intersection(permissions, ['VIEW_USERS', 'MANAGE_USERS']).length
|
||||
},
|
||||
{
|
||||
label: __('Configurazione', 'gepafin'),
|
||||
icon: 'pi pi-cog',
|
||||
//href: '/configurazione',
|
||||
id: 13,
|
||||
id: 14,
|
||||
enable: false
|
||||
},
|
||||
{
|
||||
label: __('Report e Analisi', 'gepafin'),
|
||||
icon: 'pi pi-chart-bar',
|
||||
//href: '/stats',
|
||||
id: 14,
|
||||
id: 15,
|
||||
enable: false
|
||||
},
|
||||
{
|
||||
label: __('Log di Sistema', 'gepafin'),
|
||||
icon: 'pi pi-receipt',
|
||||
clickFn: () => {},
|
||||
id: 15,
|
||||
clickFn: () => {
|
||||
},
|
||||
id: 16,
|
||||
enable: false
|
||||
}
|
||||
]
|
||||
@@ -125,20 +153,25 @@ const AppSidebar = () => {
|
||||
{items
|
||||
.filter(o => o.enable)
|
||||
.map(o => <li key={o.id}>
|
||||
{o.href
|
||||
? <NavLink to={o.href}>
|
||||
{is(String, o.icon)
|
||||
? <i className={o.icon}></i>
|
||||
: o.icon}
|
||||
<span>{o.label}</span>
|
||||
</NavLink>
|
||||
: <button onClick={() => {}}>
|
||||
{is(String, o.icon)
|
||||
? <i className={o.icon}></i>
|
||||
: o.icon}
|
||||
<span>{o.label}</span>
|
||||
</button>}
|
||||
</li>)}
|
||||
{o.href
|
||||
? <NavLink to={o.href}>
|
||||
{is(String, o.icon)
|
||||
? <i className={o.icon}></i>
|
||||
: o.icon}
|
||||
<span>{o.label}</span>
|
||||
</NavLink>
|
||||
: (o.clickFn ?
|
||||
<button onClick={() => {
|
||||
}}>
|
||||
{is(String, o.icon)
|
||||
? <i className={o.icon}></i>
|
||||
: o.icon}
|
||||
<span>{o.label}</span>
|
||||
</button>
|
||||
: <div className="nonLink">
|
||||
<span>{o.label}</span>
|
||||
</div>)}
|
||||
</li>)}
|
||||
</ul>
|
||||
</aside>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user