diff --git a/.replit b/.replit
deleted file mode 100644
index e5ab7812bc..0000000000
--- a/.replit
+++ /dev/null
@@ -1,2 +0,0 @@
-language = "nodejs"
-run = "npm start"
diff --git a/README.md b/README.md
index 42928a8062..dd1ef4e355 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
![Status](https://img.shields.io/badge/Status-developing-brightgree) [![Release](https://img.shields.io/github/release/HospitalRun/hospitalrun-frontend.svg)](https://github.com/HospitalRun/hospitalrun-frontend/releases) [![Version](https://img.shields.io/github/package-json/v/hospitalrun/hospitalrun-frontend)](https://github.com/HospitalRun/hospitalrun-frontend/releases)
[![GitHub CI](https://github.com/HospitalRun/frontend/workflows/GitHub%20CI/badge.svg)](https://github.com/HospitalRun/frontend/actions) [![Coverage Status](https://coveralls.io/repos/github/HospitalRun/hospitalrun-frontend/badge.svg?branch=master)](https://coveralls.io/github/HospitalRun/hospitalrun-frontend?branch=master) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/HospitalRun/hospitalrun-frontend.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/HospitalRun/hospitalrun-frontend/context:javascript) ![Code scanning](https://github.com/HospitalRun/hospitalrun-frontend/workflows/Code%20scanning/badge.svg?branch=master) [![Documentation Status](https://readthedocs.org/projects/hospitalrun-frontend/badge/?version=latest)](https://hospitalrun-frontend.readthedocs.io)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FHospitalRun%2Fhospitalrun-frontend.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FHospitalRun%2Fhospitalrun-frontend?ref=badge_large) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
-![dependabot](https://api.dependabot.com/badges/status?host=github&repo=HospitalRun/hospitalrun-frontend) [![Slack](https://hospitalrun-slack.herokuapp.com/badge.svg)](https://hospitalrun-slack.herokuapp.com) [![Run on Repl.it](https://repl.it/badge/github/HospitalRun/hospitalrun-frontend)](https://repl.it/github/HospitalRun/hospitalrun-frontend)
+![dependabot](https://api.dependabot.com/badges/status?host=github&repo=HospitalRun/hospitalrun-frontend) [![Slack](https://hospitalrun-slack.herokuapp.com/badge.svg)](https://hospitalrun-slack.herokuapp.com)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/HospitalRun/hospitalrun-frontend)
@@ -20,9 +20,9 @@ React frontend for [HospitalRun](http://hospitalrun.io/): free software for deve
- How can I deploy 1.0.0-beta?
- Where do I report a bug or request a feature?
-- How can I contribute? (There are several other ways besides coding)
-- What is the project structure?
-- What is the application infrastructure?
+- How can I contribute? (There are several other ways besides coding)
+- What is the project structure?
+- What is the application infrastructure?
- Who is behind HospitalRun? etc.
# Would you like to contribute? If yes...
diff --git a/couchdb/local.ini b/couchdb/local.ini
index 70c17e9c0f..9775ad68cb 100644
--- a/couchdb/local.ini
+++ b/couchdb/local.ini
@@ -4,6 +4,8 @@ users_db_security_editable = true
[httpd]
enable_cors = true
+; Replace default WWW-Authenticate = Basic realm="administrator"
+WWW-Authenticate = Other realm="app"
[cors]
origins = *
diff --git a/nginx.conf b/nginx.conf
index 2400141c1e..74aa917de7 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -5,6 +5,8 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
+ # replace WWW-Authenticate header in response if authorization failed
+ more_set_headers -s 401 'WWW-Authenticate: Other realm="App"';
}
error_page 500 502 503 504 /50x.html;
diff --git a/package.json b/package.json
index 8f1b944b9d..83ae8ec69c 100644
--- a/package.json
+++ b/package.json
@@ -5,16 +5,18 @@
"private": false,
"license": "MIT",
"dependencies": {
- "@hospitalrun/components": "~1.16.0",
+ "@hospitalrun/components": "~3.0.0",
"@reduxjs/toolkit": "~1.4.0",
"@types/escape-string-regexp": "~2.0.1",
+ "@types/json2csv": "~5.0.1",
"@types/pouchdb-find": "~6.3.4",
"bootstrap": "~4.5.0",
- "date-fns": "~2.15.0",
+ "date-fns": "~2.16.0",
"escape-string-regexp": "~4.0.0",
"i18next": "~19.7.0",
"i18next-browser-languagedetector": "~6.0.0",
"i18next-xhr-backend": "~3.2.2",
+ "json2csv": "~5.0.1",
"lodash": "^4.17.15",
"node-sass": "~4.14.0",
"pouchdb": "~7.2.1",
@@ -27,8 +29,8 @@
"react-bootstrap-typeahead": "~5.1.0",
"react-dom": "~16.13.0",
"react-i18next": "~11.7.0",
- "react-query": "~2.5.13",
- "react-query-devtools": "~2.4.2",
+ "react-query": "~2.23.0",
+ "react-query-devtools": "~2.5.0",
"react-redux": "~7.2.0",
"react-router": "~5.2.0",
"react-router-dom": "~5.2.0",
@@ -58,15 +60,15 @@
],
"devDependencies": {
"@commitlint/cli": "~9.1.2",
- "@commitlint/config-conventional": "~9.1.1",
- "@commitlint/core": "~9.1.1",
- "@commitlint/prompt": "~9.1.1",
- "@testing-library/react": "~10.4.0",
+ "@commitlint/config-conventional": "~11.0.0",
+ "@commitlint/core": "~11.0.0",
+ "@commitlint/prompt": "~11.0.0",
+ "@testing-library/react": "~11.0.0",
"@testing-library/react-hooks": "~3.4.1",
"@types/enzyme": "^3.10.5",
"@types/jest": "~26.0.0",
"@types/lodash": "^4.14.150",
- "@types/node": "~14.0.0",
+ "@types/node": "~14.11.1",
"@types/pouchdb": "~6.4.0",
"@types/react": "~16.9.17",
"@types/react-dom": "~16.9.4",
@@ -83,31 +85,31 @@
"commitizen": "~4.2.0",
"commitlint-config-cz": "~0.13.0",
"cross-env": "~7.0.0",
- "cz-conventional-changelog": "~3.2.0",
+ "cz-conventional-changelog": "~3.3.0",
"dateformat": "~3.0.3",
"enzyme": "~3.11.0",
"enzyme-adapter-react-16": "~1.15.2",
"eslint": "~6.8.0",
"eslint-config-airbnb": "~18.2.0",
"eslint-config-prettier": "~6.11.0",
- "eslint-import-resolver-typescript": "~2.2.0",
+ "eslint-import-resolver-typescript": "~2.3.0",
"eslint-plugin-import": "~2.22.0",
- "eslint-plugin-jest": "~23.20.0",
+ "eslint-plugin-jest": "~24.0.0",
"eslint-plugin-jsx-a11y": "~6.3.0",
"eslint-plugin-prettier": "~3.1.2",
- "eslint-plugin-react": "~7.20.0",
+ "eslint-plugin-react": "~7.21.0",
"eslint-plugin-react-hooks": "~4.1.0",
"history": "4.10.1",
- "husky": "~4.2.1",
- "jest": "~24.9.0",
- "lint-staged": "~10.2.0",
+ "husky": "~4.3.0",
+ "jest": "24.9.0",
+ "lint-staged": "~10.4.0",
"memdown": "~5.1.0",
"prettier": "~2.1.0",
"redux-mock-store": "~1.5.4",
"rimraf": "~3.0.2",
"source-map-explorer": "^2.2.2",
"standard-version": "~9.0.0",
- "ts-jest": "~26.2.0"
+ "ts-jest": "~26.4.0"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
diff --git a/src/App.tsx b/src/App.tsx
index 480178220e..0760e629c0 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -8,6 +8,7 @@ import { BrowserRouter, Route, Switch } from 'react-router-dom'
import HospitalRun from './HospitalRun'
import Login from './login/Login'
+import { TitleProvider } from './page-header/title/TitleContext'
import { remoteDb } from './shared/config/pouchdb'
import { getCurrentSession } from './user/user-slice'
@@ -41,7 +42,9 @@ const App: React.FC = () => {