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

Commit

Permalink
Merge pull request #2 from HospitalRun/master
Browse files Browse the repository at this point in the history
Merge master to this branch
  • Loading branch information
oizuldan authored Mar 10, 2020
2 parents 366a43a + d8494d7 commit 6ca695b
Show file tree
Hide file tree
Showing 114 changed files with 1,688 additions and 466 deletions.
7 changes: 3 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
ignorePatterns: ['commitlint.config.js', 'jest.config.js'],
env: {
browser: true,
es6: true,
Expand All @@ -10,7 +11,7 @@ module.exports = {
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'eslint-config-prettier'
'eslint-config-prettier',
],
globals: {
Atomics: 'readonly',
Expand All @@ -20,8 +21,6 @@ module.exports = {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: './',
// TODO: we need this because of an issue with @typescript-eslint/parser: https://github.com/typescript-eslint/typescript-eslint/issues/864
createDefaultProgram: true,
},
settings: {
'import/resolver': {
Expand All @@ -32,7 +31,7 @@ module.exports = {
},
plugins: ['react', '@typescript-eslint', 'prettier', 'jest'],
rules: {
"prettier/prettier": "error",
'prettier/prettier': 'error',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Issues should only be posted in this repository after you have been able to repr
them and confirm that they are a bug or incorrect/missing information in the [docs](https://github.com/HospitalRun/hospitalrun-docs).

For all other questions, requests, help resolving an issue, or if you are not sure if this is
the right place, please do not open an issue here. Instead, try to find a solution in our [Spectrum channel](https://spectrum.chat/hospitalrun).
the right place, please do not open an issue here. Instead, try to find a solution in our [Slack workspace](https://hospitalrun-slack.herokuapp.com/).

If you have issues with the [hospitalrun.io](https://www.hospitalrun.io) site, please open an issue [here](https://github.com/HospitalRun/hospitalrun.github.io/issues).
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

Before you submit an issue we recommend you drop into our [Spectrum channel](https://spectrum.chat/hospitalrun) and ask any questions you have or mention any problems you've had getting started with HospitalRun.
---Before you submit an issue we recommend you drop into our [Slack workspace](https://hospitalrun-slack.herokuapp.com/) and ask any questions you have or mention any problems you've had getting started with HospitalRun.

**Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ contact_links:
- name: Feature request
url: https://github.com/HospitalRun/hospitalrun/issues/new?template=feature.md
about: Submit a proposal for a new feature
- name: Spectrum Channel
url: https://spectrum.chat/hospitalrun
about: Please ask and answer questions here.
- name: Slack Workspace
url: https://hospitalrun-slack.herokuapp.com/
about: Please ask and answer questions here.
13 changes: 4 additions & 9 deletions .github/ISSUE_TEMPLATE/regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ about: Report unexpected behavior that worked in previous versions
title: ''
labels: ''
assignees: ''

---

Before you submit an issue we recommend you drop into our [Spectrum channel](https://spectrum.chat/hospitalrun) and ask any questions you have or mention any problems you've had getting started with HospitalRun.
---Before you submit an issue we recommend you drop into our [Slack workspace](https://hospitalrun-slack.herokuapp.com/) and ask any questions you have or mention any problems you've had getting started with HospitalRun.

**Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
Expand All @@ -30,7 +27,6 @@ Steps to reproduce the behavior:
Paste your code here:

```js

```

## Expected behavior
Expand All @@ -40,11 +36,10 @@ A clear and concise description of what you expected to happen.
Paste the results here:

```js

```

## Your Environment

- *node version*: 6,8,10
- *os*: Mac, Windows, Linux
- *any other relevant information*
- _node version_: 6,8,10
- _os_: Mac, Windows, Linux
- _any other relevant information_
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x, 13.x]
node-version: [12.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
# exclude:
# - os: windows-latest
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x, 13.x]
node-version: [12.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
# exclude:
# - os: windows-latest
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ before_script:
- npm run lint
script:
- npm run build
after_script:
- COVERALLS_REPO_TOKEN=$coveralls_repo_token npm run coveralls

notifications:
email:
on_success: never
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) [![Build Status](https://travis-ci.com/HospitalRun/hospitalrun-frontend.svg?branch=master)](https://travis-ci.com/HospitalRun/hospitalrun-frontend) [![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) [![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.heygears.com%2FHospitalRun%2Fhospitalrun-frontend.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.heygears.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) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/hospitalrun) [![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) [![Run on Repl.it](https://repl.it/badge/github/HospitalRun/hospitalrun-frontend)](https://repl.it/github/HospitalRun/hospitalrun-frontend)

</div>

Expand All @@ -16,10 +16,10 @@ React frontend for [HospitalRun](http://hospitalrun.io/): free software for deve
**Version 1.0.0-beta is no longer supported. Version 2 is currently under development.**

- To contribute, follow the guidelines in the readme or alternatively ask for details on Slack channel [#contributors](https://hospitalrun-slack.herokuapp.com).
- To use version 1.0.0-beta (not production ready) in a hospital facility, ask for support on Slack channel [#troubleshooting](https://hospitalrun-slack.herokuapp.com) or Spectrum channel [#support](https://spectrum.chat/hospitalrun).
- To use version 1.0.0-beta (not production ready) in a hospital facility, ask for support on Slack channel [#troubleshooting](https://hospitalrun-slack.herokuapp.com).

<div align="center">

[![Slack](https://img.shields.io/badge/Slack-Join%20our%20devs%20group-blueviolet?style=for-the-badge&logo=slack)](https://hospitalrun-slack.herokuapp.com)

</div>
Expand All @@ -35,12 +35,12 @@ Contributions are always welcome. Before contributing please read our [contribut

## Connecting to HospitalRun Server

__Note: The following instructions are for connecting to HospitalRun Server during development and are not intended to be for production use. For production deployments, see the deployment instructions.__
**Note: The following instructions are for connecting to HospitalRun Server during development and are not intended to be for production use. For production deployments, see the deployment instructions.**

1. Configure [HospitalRun Server](https://github.com/HospitalRun/hospitalrun-server)
2. Start the HospitalRun Development Server
3. Copy the `.env.example` file to `.env`
4. Change the `REACT_APP_HOSPITALRUN_API` variable to point to the HospitalRun Development Server.
4. Change the `REACT_APP_HOSPITALRUN_API` variable to point to the HospitalRun Development Server.

## Working on an Issue

Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module.exports = {
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.+(ts|tsx|js)', '**/?(*.)+(spec|test).+(ts|tsx|js)'],
testMatch: ['**/__tests__/**/*.+(ts|tsx)', '**/?(*.)+(spec|test).+(ts|tsx)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
coverageDirectory: './coverage',
testPathIgnorePatterns: ['<rootDir>/jest.config.js'],
}
22 changes: 13 additions & 9 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": "^0.34.0",
"@hospitalrun/components": "^0.35.0",
"@reduxjs/toolkit": "~1.2.1",
"@types/pouchdb-find": "~6.3.4",
"bootstrap": "~4.4.1",
Expand All @@ -26,10 +26,12 @@
"react-redux": "~7.2.0",
"react-router": "~5.1.2",
"react-router-dom": "~5.1.2",
"react-scripts": "~3.3.0",
"react-scripts": "3.4.0",
"redux": "~4.0.5",
"redux-thunk": "~2.3.0",
"typescript": "~3.8.2"
"shortid": "^2.2.15",
"typescript": "~3.8.2",
"uuid": "^7.0.1"
},
"repository": {
"type": "git",
Expand All @@ -45,19 +47,21 @@
"@commitlint/config-conventional": "~8.3.4",
"@commitlint/core": "~8.3.5",
"@commitlint/prompt": "~8.3.5",
"@testing-library/react": "~9.4.0",
"@testing-library/react": "~9.5.0",
"@testing-library/react-hooks": "~3.2.1",
"@types/jest": "~25.1.0",
"@types/node": "~13.7.0",
"@types/node": "~13.9.0",
"@types/pouchdb": "~6.4.0",
"@types/react": "~16.9.17",
"@types/react-dom": "~16.9.4",
"@types/react-redux": "~7.1.5",
"@types/react-router": "~5.1.2",
"@types/react-router-dom": "~5.1.0",
"@types/redux-mock-store": "~1.0.1",
"@typescript-eslint/eslint-plugin": "~2.22.0",
"@typescript-eslint/parser": "~2.22.0",
"@types/shortid": "^0.0.29",
"@types/uuid": "^7.0.0",
"@typescript-eslint/eslint-plugin": "~2.23.0",
"@typescript-eslint/parser": "~2.23.0",
"commitizen": "~4.0.3",
"commitlint-config-cz": "~0.13.0",
"coveralls": "~3.0.9",
Expand All @@ -73,7 +77,7 @@
"eslint-plugin-jest": "~23.8.0",
"eslint-plugin-jsx-a11y": "~6.2.3",
"eslint-plugin-prettier": "~3.1.1",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-react": "~7.19.0",
"eslint-plugin-react-hooks": "~2.5.0",
"history": "~4.10.1",
"husky": "~4.2.1",
Expand All @@ -93,7 +97,7 @@
"build": "react-scripts build",
"prepublishOnly": "npm run build",
"test": "react-scripts test --detectOpenHandles",
"test:ci": "cross-env CI=true react-scripts test",
"test:ci": "cross-env CI=true react-scripts test --passWithNoTests",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
"lint-staged": "lint-staged",
Expand Down
8 changes: 7 additions & 1 deletion src/HospitalRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import PrivateRoute from './components/PrivateRoute'
const HospitalRun = () => {
const { title } = useSelector((state: RootState) => state.title)
const { permissions } = useSelector((state: RootState) => state.user)
const { sidebarCollapsed } = useSelector((state: RootState) => state.components)

return (
<div>
Expand All @@ -31,7 +32,12 @@ const HospitalRun = () => {
<Sidebar />
<ButtonBarProvider>
<div className="row">
<main role="main" className="col-md-9 ml-sm-auto col-lg-10 px-4">
<main
role="main"
className={`${
sidebarCollapsed ? 'col-md-10 col-lg-11' : 'col-md-9 col-lg-10'
} ml-sm-auto px-4`}
>
<div className="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 className="h2">{title}</h1>
<ButtonToolBar />
Expand Down
Loading

0 comments on commit 6ca695b

Please # to comment.