- added add company page;
- connected api for delega download, upload and deleting;
This commit is contained in:
@@ -23,8 +23,10 @@ import LoginAdmin from './pages/LoginAdmin';
|
||||
import Profile from './pages/Profile';
|
||||
import ProfileCompany from './pages/ProfileCompany';
|
||||
import Users from './pages/Users';
|
||||
import AddCompany from './pages/AddCompany';
|
||||
|
||||
const routes = ({ role, chosenCompanyId }) => {
|
||||
|
||||
const routes = ({ role }) => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route element={<ProtectedRoute/>}>
|
||||
@@ -78,7 +80,11 @@ const routes = ({ role }) => {
|
||||
</DefaultLayout>}/>
|
||||
<Route path="/profilo-aziendale" element={<DefaultLayout>
|
||||
{'ROLE_SUPER_ADMIN' === role ? <PageNotFound/> : null}
|
||||
{'ROLE_BENEFICIARY' === role ? <ProfileCompany/> : null}
|
||||
{'ROLE_BENEFICIARY' === role && chosenCompanyId > 0 ? <ProfileCompany/> : <PageNotFound/>}
|
||||
</DefaultLayout>}/>
|
||||
<Route path="/agguingi-azienda" element={<DefaultLayout>
|
||||
{'ROLE_SUPER_ADMIN' === role ? <PageNotFound/> : null}
|
||||
{'ROLE_BENEFICIARY' === role ? <AddCompany/> : null}
|
||||
</DefaultLayout>}/>
|
||||
<Route path="/utenti" element={<DefaultLayout>
|
||||
{'ROLE_SUPER_ADMIN' === role ? <Users/> : null}
|
||||
|
||||
Reference in New Issue
Block a user