| 12264 |
stevensc |
1 |
import React, { useState } from 'react'
|
|
|
2 |
import { BrowserRouter, Route, Switch } from 'react-router-dom'
|
|
|
3 |
import ContentTitle from '../../../shared/ContentTitle'
|
|
|
4 |
import AddView from '../views/AddView'
|
|
|
5 |
import EditView from '../views/EditView'
|
|
|
6 |
import TableView from '../views/TableView'
|
|
|
7 |
|
|
|
8 |
const Routes = ({ backendVars }) => {
|
|
|
9 |
|
|
|
10 |
const [actionLink, setActionLink] = useState(backendVars.add_link)
|
|
|
11 |
|
|
|
12 |
return (
|
|
|
13 |
<BrowserRouter>
|
|
|
14 |
<ContentTitle title='Evaluación de desempeño'>
|
|
|
15 |
<Switch>
|
|
|
16 |
<Route exact path='/performance-evaluation/forms'>
|
|
|
17 |
<TableView {...backendVars} actionLink={actionLink} setActionLink={setActionLink} />
|
|
|
18 |
</Route>
|
|
|
19 |
<Route exact path='/performance-evaluation/forms/edit' >
|
|
|
20 |
<EditView
|
|
|
21 |
actionLink={actionLink}
|
|
|
22 |
/>
|
|
|
23 |
</Route>
|
|
|
24 |
<Route exact path='/performance-evaluation/forms/add'>
|
|
|
25 |
<AddView
|
|
|
26 |
actionLink={actionLink}
|
|
|
27 |
jobsDescription={backendVars.jobsDescription}
|
|
|
28 |
/>
|
|
|
29 |
</Route>
|
|
|
30 |
</Switch>
|
|
|
31 |
</ContentTitle>
|
|
|
32 |
</BrowserRouter>
|
|
|
33 |
)
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
export default Routes
|