forked from ddrilling/asb_cloud_front
goodm2ice
85f98044c6
* Доблена страница "Доступ запрещён" * Актуализирована работа с правами * Добавлен переключатель оси X TVD
43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
import { memo } from 'react'
|
|
import { Route, Switch } from 'react-router-dom'
|
|
|
|
import { AdminLayoutPortal, LayoutPortal } from '@components/Layout'
|
|
import { PrivateDefaultRoute, PrivateRoute } from '@components/Private'
|
|
|
|
import Well from './Well'
|
|
import Cluster from './Cluster'
|
|
import Deposit from './Deposit'
|
|
import AdminPanel from './AdminPanel'
|
|
import AccessDenied from './AccessDenied'
|
|
|
|
export const Main = memo(() => (
|
|
<Switch>
|
|
<PrivateRoute path={'/admin/:tab?'}>
|
|
<AdminLayoutPortal title={'Администраторская панель'}>
|
|
<AdminPanel />
|
|
</AdminLayoutPortal>
|
|
</PrivateRoute>
|
|
<PrivateRoute path={'/deposit'}>
|
|
<LayoutPortal noSheet title='Месторождение'>
|
|
<Deposit />
|
|
</LayoutPortal>
|
|
</PrivateRoute>
|
|
<PrivateRoute path={'/cluster/:idCluster'}>
|
|
<LayoutPortal title={'Анализ скважин куста'}>
|
|
<Cluster />
|
|
</LayoutPortal>
|
|
</PrivateRoute>
|
|
<PrivateRoute path={'/well/:idWell/:tab?'}>
|
|
<LayoutPortal>
|
|
<Well />
|
|
</LayoutPortal>
|
|
</PrivateRoute>
|
|
<Route path={'/access_denied'}>
|
|
<AccessDenied />
|
|
</Route>
|
|
<PrivateDefaultRoute urls={['/deposit']} />
|
|
</Switch>
|
|
))
|
|
|
|
export default Main
|