- added page managebandi;
- improved styles of the pages and sections;
This commit is contained in:
@@ -2,37 +2,38 @@ import React from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
// components
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
const AppSidebar = () => {
|
||||
const items = [
|
||||
{
|
||||
label: __('Riepilogo', 'gepafin'),
|
||||
icon: 'pi pi-objects-column',
|
||||
clickFn: () => {},
|
||||
href: '/',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
label: __('Gestione Bandi', 'gepafin'),
|
||||
icon: 'pi pi-file',
|
||||
clickFn: () => {},
|
||||
href: '/bandi',
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
label: __('Gestione Utenti', 'gepafin'),
|
||||
icon: 'pi pi-users',
|
||||
clickFn: () => {},
|
||||
href: '/utenti',
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
label: __('Configurazione', 'gepafin'),
|
||||
icon: 'pi pi-cog',
|
||||
clickFn: () => {},
|
||||
href: '/configurazione',
|
||||
id: 4
|
||||
},
|
||||
{
|
||||
label: __('Report e Analisi', 'gepafin'),
|
||||
icon: 'pi pi-chart-bar',
|
||||
clickFn: () => {},
|
||||
href: '/stats',
|
||||
id: 5
|
||||
},
|
||||
{
|
||||
@@ -43,16 +44,21 @@ const AppSidebar = () => {
|
||||
}
|
||||
]
|
||||
|
||||
return <sidebar>
|
||||
return <aside>
|
||||
<ul>
|
||||
{items.map(o => <li key={o.id}>
|
||||
<a href="#" onClick={o.clickFn} className={o.id === 1 ? 'active' : ''}>
|
||||
{o.href
|
||||
? <NavLink to={o.href}>
|
||||
<i className={o.icon}></i>
|
||||
<span>{o.label}</span>
|
||||
</a>
|
||||
</NavLink>
|
||||
: <button onClick={() => {}}>
|
||||
<i className={o.icon}></i>
|
||||
<span>{o.label}</span>
|
||||
</button>}
|
||||
</li>)}
|
||||
</ul>
|
||||
</sidebar>
|
||||
</aside>
|
||||
}
|
||||
|
||||
export default AppSidebar;
|
||||
Reference in New Issue
Block a user