Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
pull merge
  • Loading branch information
JDarke committed Apr 29, 2020
2 parents b603dd1 + 234b125 commit bb1af60
Show file tree
Hide file tree
Showing 52 changed files with 1,589 additions and 1,400 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][homep
## Core Team

<!-- prettier-ignore -->
| [<img src="https://avatars3.githubusercontent.com/u/25089405?s=460&v=4" width="100px;"/><br /><sub><b>Stefano Casasola</b></sub>](https://github.com/irvelervel) |[<img src="https://avatars2.githubusercontent.com/u/8914893?s=460&v=4" width="100px;"/><br /><sub><b>Michael Daly</b></sub>](https://github.com/MichaelDalyDev)|[<img src="https://avatars1.githubusercontent.com/u/25009192?s=460&v=4" width="100px;"/><br /><sub><b>Riccardo Gulin</b></sub>](https://github.com/bazuzu666) | [<img src="https://avatars3.githubusercontent.com/u/603924?s=460&v=4" width="100px;"/><br /><sub><b>Grace Lau</b></sub>](https://github.com/lauggh) | [<img src="https://avatars3.githubusercontent.com/u/18731800?s=460&v=4" width="100px;"/><br /><sub><b>Jack Meyer</b></sub>](https://github.com/jackcmeyer) | [<img src="https://avatars0.githubusercontent.com/u/6388707?s=460&v=4" width="100px;"/><br /><sub><b>Matteo Vivona</b></sub>](https://github.com/tehKapa) |
| [<img src="https://avatars3.githubusercontent.com/u/25089405?s=460&v=4" width="100px;"/><br /><sub><b>Stefano Casasola</b></sub>](https://github.com/irvelervel) |[<img src="https://avatars2.githubusercontent.com/u/8914893?s=460&v=4" width="100px;"/><br /><sub><b>Michael Daly</b></sub>](https://github.com/MichaelDalyDev)|[<img src="https://avatars1.githubusercontent.com/u/25009192?s=460&v=4" width="100px;"/><br /><sub><b>Riccardo Gulin</b></sub>](https://github.com/nclBaz) | [<img src="https://avatars3.githubusercontent.com/u/603924?s=460&v=4" width="100px;"/><br /><sub><b>Grace Lau</b></sub>](https://github.com/lauggh) | [<img src="https://avatars3.githubusercontent.com/u/18731800?s=460&v=4" width="100px;"/><br /><sub><b>Jack Meyer</b></sub>](https://github.com/jackcmeyer) | [<img src="https://avatars0.githubusercontent.com/u/6388707?s=460&v=4" width="100px;"/><br /><sub><b>Matteo Vivona</b></sub>](https://github.com/tehKapa) |
|---|---|---|---|---|---|

## Medical Supervisor
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": false,
"license": "MIT",
"dependencies": {
"@hospitalrun/components": "^1.2.0",
"@hospitalrun/components": "^1.3.0",
"@reduxjs/toolkit": "~1.3.0",
"@types/pouchdb-find": "~6.3.4",
"bootstrap": "~4.4.1",
Expand All @@ -14,7 +14,8 @@
"i18next": "~19.4.0",
"i18next-browser-languagedetector": "~4.1.0",
"i18next-xhr-backend": "~3.2.2",
"node-sass": "~4.13.0",
"node-sass": "~4.14.0",
"lodash": "^4.17.15",
"pouchdb": "~7.2.1",
"pouchdb-adapter-memory": "~7.2.1",
"pouchdb-find": "~7.2.1",
Expand All @@ -23,7 +24,7 @@
"react-bootstrap": "~1.0.0-beta.16",
"react-bootstrap-typeahead": "~4.2.0",
"react-dom": "~16.13.0",
"react-i18next": "~11.3.0",
"react-i18next": "~11.4.0",
"react-redux": "~7.2.0",
"react-router": "~5.1.2",
"react-router-dom": "~5.1.2",
Expand All @@ -50,7 +51,9 @@
"@commitlint/prompt": "~8.3.5",
"@testing-library/react": "~10.0.0",
"@testing-library/react-hooks": "~3.2.1",
"@types/enzyme": "^3.10.5",
"@types/jest": "~25.2.0",
"@types/lodash": "^4.14.150",
"@types/node": "~13.13.0",
"@types/pouchdb": "~6.4.0",
"@types/react": "~16.9.17",
Expand All @@ -61,8 +64,8 @@
"@types/redux-mock-store": "~1.0.1",
"@types/shortid": "^0.0.29",
"@types/uuid": "^7.0.0",
"@typescript-eslint/eslint-plugin": "~2.29.0",
"@typescript-eslint/parser": "~2.29.0",
"@typescript-eslint/eslint-plugin": "~2.30.0",
"@typescript-eslint/parser": "~2.30.0",
"commitizen": "~4.0.3",
"commitlint-config-cz": "~0.13.0",
"cross-env": "~7.0.0",
Expand All @@ -82,7 +85,7 @@
"history": "~4.10.1",
"husky": "~4.2.1",
"jest": "~24.9.0",
"lint-staged": "~10.1.0",
"lint-staged": "~10.2.0",
"memdown": "~5.1.0",
"prettier": "~2.0.4",
"redux-mock-store": "~1.5.4",
Expand Down
33 changes: 3 additions & 30 deletions src/HospitalRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ import Labs from 'labs/Labs'
import Sidebar from './components/Sidebar'
import Permissions from './model/Permissions'
import Dashboard from './dashboard/Dashboard'
import Patients from './patients/list/Patients'
import NewPatient from './patients/new/NewPatient'
import EditPatient from './patients/edit/EditPatient'
import ViewPatient from './patients/view/ViewPatient'
import { RootState } from './store'
import Navbar from './components/Navbar'
import PrivateRoute from './components/PrivateRoute'
import Patients from './patients/Patients'

const HospitalRun = () => {
const { title } = useSelector((state: RootState) => state.title)
Expand Down Expand Up @@ -47,32 +44,7 @@ const HospitalRun = () => {
<div>
<Switch>
<Route exact path="/" component={Dashboard} />
<PrivateRoute
isAuthenticated={permissions.includes(Permissions.ReadPatients)}
exact
path="/patients"
component={Patients}
/>
<PrivateRoute
isAuthenticated={permissions.includes(Permissions.WritePatients)}
exact
path="/patients/new"
component={NewPatient}
/>
<PrivateRoute
isAuthenticated={
permissions.includes(Permissions.WritePatients) &&
permissions.includes(Permissions.ReadPatients)
}
exact
path="/patients/edit/:id"
component={EditPatient}
/>
<PrivateRoute
isAuthenticated={permissions.includes(Permissions.ReadPatients)}
path="/patients/:id"
component={ViewPatient}
/>

<PrivateRoute
isAuthenticated={permissions.includes(Permissions.ReadAppointments)}
exact
Expand Down Expand Up @@ -100,6 +72,7 @@ const HospitalRun = () => {
path="/appointments/:id"
component={ViewAppointment}
/>
<PrivateRoute isAuthenticated path="/patients" component={Patients} />
<PrivateRoute isAuthenticated path="/labs" component={Labs} />
</Switch>
</div>
Expand Down
Loading

0 comments on commit bb1af60

Please sign in to comment.