Skip to content

Commit bfd10ac

Browse files
authored
Merge pull request #125 from swiftss-org/staging
staging to master
2 parents 1646863 + d602f5f commit bfd10ac

File tree

113 files changed

+6955
-4224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+6955
-4224
lines changed

.babelrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module.exports = {
33
plugins: [
44
'@babel/plugin-proposal-optional-chaining',
55
[
6-
'emotion',
6+
'@emotion',
77
{
88
sourceMap: false,
9-
autoLabel: process.env.NODE_ENV !== 'production',
9+
autoLabel: process.env.NODE_ENV !== 'production' ? 'always' : undefined,
1010
labelFormat: '[filename]_[local]',
1111
cssPropOptimization: true,
1212
},

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ jobs:
2222

2323
steps:
2424
- name: Checkout 📥
25-
uses: actions/[email protected].4
25+
uses: actions/[email protected].5
2626

2727
- name: Get yarn cache 📦
2828
id: yarn-cache
2929
run: echo "::set-output name=dir::$(yarn cache dir)"
3030

31-
- uses: actions/[email protected].5
31+
- uses: actions/[email protected].6
3232
with:
3333
path: ${{ steps.yarn-cache.outputs.dir }}
3434
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3535
restore-keys: |
3636
${{ runner.os }}-yarn-
37-
- uses: actions/setup-node@v2.1.5
38-
- uses: actions/setup-node@v2.1.5
37+
- uses: actions/setup-node@v2.4.1
38+
- uses: actions/setup-node@v2.4.1
3939
with:
4040
node-version: '12'
4141

@@ -50,7 +50,7 @@ jobs:
5050
- test
5151
steps:
5252
- name: Checkout Repository
53-
uses: actions/[email protected].4
53+
uses: actions/[email protected].5
5454

5555
- name: Push to Staging 🛠
5656
if: github.ref == 'refs/heads/staging'

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
"version": "0.1.0",
88
"private": true,
99
"dependencies": {
10-
"@emotion/core": "10.1.1",
1110
"@emotion/jest": "^11.2.1",
12-
"@emotion/react": "^11.1.5",
13-
"@emotion/styled": "^10.0.27",
14-
"@orfium/ictinus": "^2.70.2",
11+
"@emotion/react": "^11.4.1",
12+
"@emotion/styled": "^11.3.0",
13+
"@orfium/ictinus": "^3.14.1",
1514
"@testing-library/jest-dom": "^5.11.9",
16-
"@testing-library/react": "^11.2.5",
15+
"@testing-library/react": "^12.1.2",
1716
"@testing-library/user-event": "^13.1.3",
1817
"@types/jest": "^26.0.23",
1918
"@types/node": "^14.14.28",
@@ -24,12 +23,13 @@
2423
"axios": "^0.21.1",
2524
"customize-cra": "^1.0.0",
2625
"final-form": "^4.20.2",
27-
"history": "^5.0.0",
28-
"jest-emotion": "^11.0.0",
26+
"final-form-arrays": "^3.0.2",
27+
"history": "^4.10.1",
2928
"lodash": "^4.17.21",
3029
"react": "^17.0.2",
3130
"react-dom": "^17.0.2",
3231
"react-final-form": "^6.5.3",
32+
"react-final-form-arrays": "^3.1.3",
3333
"react-final-form-listeners": "^1.0.3",
3434
"react-query": "^3.16.0",
3535
"react-router-dom": "^5.2.0",
@@ -62,8 +62,8 @@
6262
"devDependencies": {
6363
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
6464
"@babel/preset-react": "^7.12.10",
65-
"@commitlint/cli": "^11.0.0",
66-
"@commitlint/config-conventional": "^11.0.0",
65+
"@commitlint/cli": "^13.2.1",
66+
"@commitlint/config-conventional": "^13.2.0",
6767
"@emotion/babel-plugin": "^11.3.0",
6868
"@semantic-release/changelog": "^5.0.1",
6969
"@semantic-release/git": "^9.0.0",
@@ -73,7 +73,7 @@
7373
"babel-jest": "^26.6.3",
7474
"babel-plugin-styled-components": "^1.12.0",
7575
"cross-env": "^7.0.3",
76-
"eslint-config-prettier": "^7.2.0",
76+
"eslint-config-prettier": "^8.3.0",
7777
"eslint-plugin-better-styled-components": "^1.1.2",
7878
"eslint-plugin-import": "^2.23.4",
7979
"husky": "^6.0.0",

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<body>
3030
<noscript>You need to enable JavaScript to run this app.</noscript>
3131
<div id="root"></div>
32+
<div id="portal-root"></div>
3233
<!--
3334
This HTML file is a template.
3435
If you open it directly in the browser, you will see an empty page.

src/App.style.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import styled from '@emotion/styled';
22

3-
import theme from 'theme/globals';
3+
import { appTheme } from './theme/globals';
44

55
export const AppWrapper = styled.div`
6-
background-color: ${theme.defaultBackgroundColor};
7-
color: ${theme.defaultTextColor};
8-
font-family: ${theme.fontFamily};
6+
background-color: white;
7+
color: black;
8+
font-family: ${appTheme.fontFamily};
99
height: calc(100vh);
1010
overflow: hidden;
1111
position: relative;

src/App.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,27 @@ import { QueryClient, QueryClientProvider } from 'react-query';
55
import { BrowserRouter as Router } from 'react-router-dom';
66

77
import { AppWrapper } from './App.style';
8+
import NotificationsProvider from './providers/Notifications/NotificationProvider';
89
import Routes from './routing/Routes';
9-
import theme from 'theme/globals';
10+
import { themeOverride } from './theme/globals';
1011

1112
const queryClient = new QueryClient({
1213
defaultOptions: { queries: { refetchOnWindowFocus: false, refetchOnReconnect: false } },
1314
});
1415

1516
const App: React.FC = () => {
1617
return (
17-
<ThemeProvider theme={{ palette: { branded1: theme.colors.branded1 } }}>
18-
<QueryClientProvider client={queryClient}>
19-
<Router>
20-
<AppWrapper>
21-
<Routes />
22-
</AppWrapper>
23-
</Router>
24-
</QueryClientProvider>
25-
</ThemeProvider>
18+
<QueryClientProvider client={queryClient}>
19+
<ThemeProvider theme={themeOverride}>
20+
<NotificationsProvider>
21+
<Router>
22+
<AppWrapper>
23+
<Routes />
24+
</AppWrapper>
25+
</Router>
26+
</NotificationsProvider>
27+
</ThemeProvider>
28+
</QueryClientProvider>
2629
);
2730
};
2831

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2-
import { RegisterPatientPayload } from '../../models/apiTypes';
2+
import {
3+
RegisterPatientPayload,
4+
PatientsPayload,
5+
PaginationParams,
6+
RegisterEpisodePayload,
7+
HospitalMappingPayload,
8+
DischargePayload,
9+
FollowUpPayload,
10+
} from '../../models/apiTypes';
311
import { METHODS, request } from '../axiosInstances';
412

513
export default {
6-
getHospitals: () => request(METHODS.GET, '/hospitals/', {}),
14+
getHospitals: (params?: PaginationParams) => request(METHODS.GET, '/hospitals/', { params }),
15+
getHospital: (id: string) => request(METHODS.GET, `/hospitals/${id}/`, {}),
16+
getPatients: (params?: PatientsPayload) => request(METHODS.GET, '/patients/', { params }),
17+
getSurgeons: (params?: PaginationParams) =>
18+
request(METHODS.GET, '/medical-personnel/', { params }),
19+
getPatient: (id: string) => request(METHODS.GET, `/patients/${id}/`, {}),
20+
getEpisode: (id: string) => request(METHODS.GET, `/episodes/${id}/`, {}),
21+
getEpisodeDischarge: (id: string) => request(METHODS.GET, `/episodes/${id}/discharge/`, {}),
22+
getEpisodeFollowUps: (id: string) => request(METHODS.GET, `/episodes/${id}/follow-ups/`, {}),
723
registerPatient: (params: RegisterPatientPayload) =>
824
request(METHODS.POST, '/patients/', { params }),
25+
registerEpisode: (params: RegisterEpisodePayload) =>
26+
request(METHODS.POST, '/episodes/', { params }),
27+
createHospitalMapping: (params: HospitalMappingPayload) =>
28+
request(METHODS.POST, '/patient-hospital-mappings/', { params }),
29+
dischargePatient: (params: DischargePayload) => request(METHODS.POST, `/discharges/`, { params }),
30+
followUpPatient: (params: FollowUpPayload) => request(METHODS.POST, `/follow-ups/`, { params }),
931
};

src/api/userAPI/userAPI.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2-
import { LoginResponse } from '../../models/apiTypes';
2+
import { LoginFormType } from '../../models/apiTypes';
33
import { METHODS, request } from '../axiosInstances';
44

55
export default {
6-
signIn: (params: LoginResponse) => request(METHODS.POST, '/sign-in/', { params }),
6+
signIn: (params: LoginFormType) => request(METHODS.POST, '/sign-in/', { params }),
77
};
Lines changed: 4 additions & 0 deletions
Loading

src/assets/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import SwiftSSLogo from 'assets/swiftss-logo.png';
2+
import TSALogo from 'assets/tsa-logo.png';
3+
4+
export default {
5+
TSALogo,
6+
SwiftSSLogo,
7+
};

0 commit comments

Comments
 (0)