Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic frontend rewrite #4594

Merged
merged 300 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
66a9ac7
review improvements
tcaiger May 26, 2023
9d7c539
WAITP-1259 Table to ts
alexd-bes May 28, 2023
b1e63d6
Merge branch 'epic-frontend-rewrite' into waitp-1259-map-components-t…
alexd-bes May 28, 2023
c2c9983
WAITP-1259 fix react types version mismatch
alexd-bes May 28, 2023
8371226
WAITP-1259 TilePicker to ts
alexd-bes May 28, 2023
0b6df81
WAITP-1259 colors to ts
alexd-bes May 28, 2023
54d0052
WAITP-1259 utils and fixes to types
alexd-bes May 29, 2023
2113372
WAITP-1259 Update type arrangement
alexd-bes May 29, 2023
280fb4e
WAITP-1259 remove ts-ignores
alexd-bes May 29, 2023
42181ee
WAITP-1259 handle default value
alexd-bes May 29, 2023
7362e82
WAITP-1259 Update storybook config
alexd-bes May 29, 2023
e31052b
Revert commit 'merge epic-landing-pages into waitp-1259-map-component…
alexd-bes May 29, 2023
f4e3e6a
WAITP-2359 get web frontend working
alexd-bes May 29, 2023
2ae1877
WAITP-1259 fix issues on frontend
alexd-bes May 29, 2023
d6d1250
WAITP-1259 get tests running
alexd-bes May 29, 2023
5e0b96f
Revert "Revert commit 'merge epic-landing-pages into waitp-1259-map-c…
alexd-bes May 29, 2023
43e4250
Update tsconfig.json
alexd-bes May 29, 2023
dcff0f6
Update tsconfig-build.json
alexd-bes May 29, 2023
fe8214d
Merge branch 'dev' into epic-frontend-rewrite
EMcQ-BES May 29, 2023
0af00cd
Build ui-components after utils
EMcQ-BES May 29, 2023
cc43775
Update CI files
EMcQ-BES May 29, 2023
dd60241
WAITP-1197 fix ui-components ts errors
alexd-bes May 30, 2023
28f9daa
Fix issue for codeship
alexd-bes May 30, 2023
c2ff177
Waitp 1197 tupaia web initial setup (#4603)
alexd-bes May 30, 2023
02045ac
WAITP-1199 Setup API abstraction
alexd-bes May 30, 2023
3353437
Update packages/tupaia-web/src/utils/getApiUrl.ts
alexd-bes May 30, 2023
84890fd
WIP
alexd-bes May 30, 2023
1dd307e
Update packages/tupaia-web/src/api/api.ts
alexd-bes May 30, 2023
4c28070
Update packages/tupaia-web/src/api/mutations/index.ts
alexd-bes May 30, 2023
cb3f0ec
WAITP-1199 Move api url fetcher
alexd-bes May 30, 2023
1746640
Merge pull request #4606 from beyondessential/waitp-1199-api-abstraction
tcaiger May 30, 2023
a2a8f9d
clean up web front end code
tcaiger May 30, 2023
6c5b57f
Update yarn.lock
tcaiger May 31, 2023
402e962
Remove import for missing file
alexd-bes May 31, 2023
b921b2a
mock out utils backend deps
tcaiger May 31, 2023
4fb95d5
Merge branch 'epic-frontend-rewrite' of github.com:beyondessential/tu…
tcaiger Jun 1, 2023
fdd420b
Merge branch 'epic-frontend-rewrite' into waitp-1258-charts-ts
tcaiger Jun 1, 2023
3ce7286
WAITP-1202 Working basic routing
alexd-bes Jun 1, 2023
cc47d7b
tweaks
tcaiger Jun 1, 2023
7d0411d
Update Route.ts
tcaiger Jun 1, 2023
4e0859c
Merge branch 'epic-frontend-rewrite' into waitp-1202-setup-routes
alexd-bes Jun 1, 2023
d72127c
WAITP-1202 Add constants to index
alexd-bes Jun 1, 2023
1b3f635
WAITP-1202 fix merge conflicts
alexd-bes Jun 1, 2023
c681fe9
WAITP-1202 tidy up code
alexd-bes Jun 1, 2023
8c45768
WAITP-1202 update format
alexd-bes Jun 1, 2023
6014d0c
load projects
tcaiger Jun 1, 2023
f36d6f9
Update models.ts
tcaiger Jun 1, 2023
35e1eb0
Update LineChart.tsx
tcaiger Jun 1, 2023
21d22b0
Merge pull request #4570 from beyondessential/waitp-1258-charts-ts
tcaiger Jun 1, 2023
a6170f2
WAITP-1202 tweaks
alexd-bes Jun 1, 2023
4e44107
Merge branch 'epic-frontend-rewrite' into waitp-1202-setup-routes
alexd-bes Jun 1, 2023
756f3a6
WAITP-1202 Update routing variables
alexd-bes Jun 1, 2023
607d341
WAITP-1202 Fix mismatched TS versions
alexd-bes Jun 1, 2023
bd6b823
Merge branch 'waitp-1202-setup-routes' into waitp-1205-login-screen
tcaiger Jun 2, 2023
faa3b6d
WAITP-1253 tupaia-web-server first pass (#4582)
EMcQ-BES Jun 2, 2023
7f353e8
wip
tcaiger Jun 2, 2023
d1a27b2
Update yarn.lock
tcaiger Jun 2, 2023
7409725
pin react version to ui-components
tcaiger Jun 5, 2023
7c45272
Revert "WAITP-1202 Fix mismatched TS versions"
alexd-bes Jun 5, 2023
d9a50aa
fix tupaia-web
tcaiger Jun 5, 2023
c5febd4
Merge pull request #4613 from beyondessential/yarn-lock
tcaiger Jun 5, 2023
a67686b
Merge branch 'epic-frontend-rewrite' into waitp-1202-setup-routes
alexd-bes Jun 5, 2023
af86307
Merge branch 'epic-frontend-rewrite' into waitp-1205-login-screen
tcaiger Jun 5, 2023
f16b951
WAITP-1202 fix version of react-router
alexd-bes Jun 5, 2023
5fbbd6a
WAITP-1202 updated routes for v6.3
alexd-bes Jun 5, 2023
05a78da
WAITP-1202 fix config and types version
alexd-bes Jun 5, 2023
76c2a9e
add react-hook form
tcaiger Jun 6, 2023
44cb313
Merge branch 'waitp-1202-setup-routes' into waitp-1205-login-screen
tcaiger Jun 6, 2023
2c31188
add react hook form
tcaiger Jun 6, 2023
d1065d1
fetch initial data
tcaiger Jun 6, 2023
b589a0b
Waitp 1200 setup mui (#4615)
alexd-bes Jun 6, 2023
a30f89c
Waitp 1202 setup routes (#4608)
alexd-bes Jun 6, 2023
bd0c3e7
Style modal component
tcaiger Jun 6, 2023
d648e63
Merge branch 'epic-frontend-rewrite' into waitp-1205-login-screen
tcaiger Jun 6, 2023
de52b81
Update yarn.lock
tcaiger Jun 6, 2023
3e50b49
fix import paths
tcaiger Jun 6, 2023
dedf22c
storybook
tcaiger Jun 7, 2023
6be041a
WAITP-1255: Tupaia web server report and dashboard routes (#4602)
EMcQ-BES Jun 7, 2023
22053e0
Waitp 1201 basic web layout (#4620)
alexd-bes Jun 7, 2023
d5140b9
Merge branch 'epic-frontend-rewrite' into waitp-1205-login-screen
tcaiger Jun 8, 2023
f99bca8
update routes
tcaiger Jun 8, 2023
500d084
sue auth modal
tcaiger Jun 8, 2023
ceb9b39
WAITP-1216 Add project permissions to landing page projects in respon…
alexd-bes Jun 8, 2023
fd9bf53
clean up
tcaiger Jun 8, 2023
329ea47
fix colours
tcaiger Jun 8, 2023
c8269a5
test files
tcaiger Jun 8, 2023
30f1930
add comments
tcaiger Jun 8, 2023
4b1c5dd
Update main.tsx
tcaiger Jun 8, 2023
87724d9
use navigate back util
tcaiger Jun 8, 2023
5ca81d4
WAITP-1216 Add default dashboard to project response (#4627)
alexd-bes Jun 8, 2023
757780b
WAITP-1216 fix typo
alexd-bes Jun 8, 2023
1ed6468
WAITP-1216 Fix entity object issue
alexd-bes Jun 9, 2023
ab82e92
add router button
tcaiger Jun 9, 2023
7be869d
Update Routes.tsx
tcaiger Jun 9, 2023
05119fb
Update TopBar.tsx
tcaiger Jun 9, 2023
068e448
Merge pull request #4616 from beyondessential/waitp-1205-login-screen
tcaiger Jun 11, 2023
d34e26e
WAITP-1216 FIx entity id/code error
alexd-bes Jun 11, 2023
8ed1c54
Merge branch 'epic-frontend-rewrite' of github.com:beyondessential/tu…
alexd-bes Jun 11, 2023
c11bfc6
add register form
tcaiger Jun 11, 2023
3cd0293
fix forms
tcaiger Jun 11, 2023
6b014e9
Waitp 1216 custom landing pages navigation (#4628)
alexd-bes Jun 12, 2023
74dccc8
Merge branch 'epic-frontend-rewrite' into waitp-1206-register-form
tcaiger Jun 12, 2023
577269e
add register form
tcaiger Jun 12, 2023
4bb1696
register form request
tcaiger Jun 12, 2023
0e6207c
verify email
tcaiger Jun 12, 2023
ffebef9
Merge branch 'epic-frontend-rewrite' into waitp-1259-map-components-t…
tcaiger Jun 12, 2023
1d2444c
Update yarn.lock
tcaiger Jun 12, 2023
9449762
WAITP-1259 remove disaster icons
alexd-bes Jun 12, 2023
a69806c
Waitp 1215 projects modal (#4630)
alexd-bes Jun 12, 2023
a78a4e2
email verification
tcaiger Jun 12, 2023
c3824c0
WAITP-1253 Tupaia web server cleanup (#4629)
EMcQ-BES Jun 12, 2023
00194f8
Merge branch 'epic-frontend-rewrite' into waitp-1206-register-form
tcaiger Jun 12, 2023
c0bcfdf
Remove unused include
EMcQ-BES Jun 12, 2023
d7570b4
verify resend
tcaiger Jun 12, 2023
75299be
refactor to use modals
tcaiger Jun 12, 2023
6b56d38
refactor to user routes naming
tcaiger Jun 13, 2023
4d29acc
styling tweaks
tcaiger Jun 13, 2023
f93464a
fix storybook
tcaiger Jun 13, 2023
cf98df0
tweak on success handling
tcaiger Jun 13, 2023
345b174
fix email verification
tcaiger Jun 13, 2023
1dffb52
review fixes
tcaiger Jun 13, 2023
581fd91
Fixup frontend epic CI/CD (#4633)
EMcQ-BES Jun 13, 2023
c8ca2d9
WAITP-1203 Add map packages (#4631)
alexd-bes Jun 13, 2023
d286058
setup hash links
tcaiger Jun 13, 2023
a70d8e1
refactor to modal hashes
tcaiger Jun 14, 2023
f5f6c4a
responsive modal widths
tcaiger Jun 14, 2023
719a44e
Update Projects.tsx
tcaiger Jun 14, 2023
84edd7b
form field components
tcaiger Jun 14, 2023
d82ae6a
clean up modal links
tcaiger Jun 14, 2023
574261b
rename util to useModal
tcaiger Jun 14, 2023
14c3d04
Update useModal.ts
tcaiger Jun 14, 2023
2e11265
Merge branch 'epic-frontend-rewrite' into waitp-1206-register-form
tcaiger Jun 14, 2023
2c13cc4
Fix chart tests (#4640)
alexd-bes Jun 14, 2023
08fd85c
tweaks
tcaiger Jun 14, 2023
82fff09
Merge pull request #4634 from beyondessential/waitp-1206-register-form
tcaiger Jun 14, 2023
6907803
Merge pull request #4600 from beyondessential/waitp-1259-map-componen…
tcaiger Jun 14, 2023
6e4413b
Disable test web-frontend
EMcQ-BES Jun 15, 2023
0fc4c8b
add logout button
tcaiger Jun 15, 2023
e3848fe
Update Sidebar.tsx
tcaiger Jun 15, 2023
68da4e6
Waitp 1208 reset password form (#4642)
alexd-bes Jun 15, 2023
fb32df0
Update Sidebar.tsx
tcaiger Jun 15, 2023
7c4fc1c
add static map component
tcaiger Jun 15, 2023
0a93c77
Merge branch 'dev' into epic-frontend-rewrite
tcaiger Jun 15, 2023
3ffd22b
update yarn lock
tcaiger Jun 15, 2023
907e92d
Merge branch 'epic-frontend-rewrite' into waitp-1205-logout
tcaiger Jun 16, 2023
3cf3581
Merge pull request #4644 from beyondessential/waitp-1205-logout
tcaiger Jun 16, 2023
1438df3
Merge branch 'dev' into epic-frontend-rewrite
tcaiger Jun 16, 2023
0aad5a7
Merge branch 'epic-frontend-rewrite' into waitp-1287-dashboard-layout
tcaiger Jun 16, 2023
deb1874
WAITP-1207 Add getProject route (#4648)
alexd-bes Jun 16, 2023
edf1bcb
update static map
tcaiger Jun 16, 2023
96e429a
tweak colors
tcaiger Jun 16, 2023
abd69c0
add photo
tcaiger Jun 16, 2023
2dd0805
Don't use try/catch in attachSessionIfAvailable
EMcQ-BES Jun 18, 2023
fb59391
Return empty object for user if not logged in
EMcQ-BES Jun 18, 2023
980e2c2
fix linting
tcaiger Jun 18, 2023
b3533ee
Merge branch 'epic-frontend-rewrite' into waitp-1287-dashboard-layout
tcaiger Jun 18, 2023
789389e
Update Photo.tsx
tcaiger Jun 18, 2023
cd97637
pr suggestions
tcaiger Jun 18, 2023
8e181f5
Merge pull request #4649 from beyondessential/tupaia-web-server-fixup…
tcaiger Jun 18, 2023
322a957
Merge branch 'epic-frontend-rewrite' into waitp-1287-dashboard-layout
tcaiger Jun 18, 2023
8fad698
Merge pull request #4647 from beyondessential/waitp-1287-dashboard-la…
tcaiger Jun 18, 2023
c2e9c67
fix front end api
tcaiger Jun 18, 2023
9a3135e
setup dashboards fetch
tcaiger Jun 19, 2023
23b0206
build dashboard dropdown
tcaiger Jun 19, 2023
16c0214
types
tcaiger Jun 19, 2023
17dd14b
move state to url
tcaiger Jun 19, 2023
6a67b36
refactor dropdown menu
tcaiger Jun 19, 2023
cf764eb
Update Sidebar.tsx
tcaiger Jun 19, 2023
bfe5e8e
move camel case keys to server
tcaiger Jun 19, 2023
65afea4
add theme color
tcaiger Jun 19, 2023
94489d5
Merge pull request #4655 from beyondessential/waitp-1287-dashboard-dr…
tcaiger Jun 19, 2023
71362a2
Waitp 1207 request access form (#4653)
alexd-bes Jun 20, 2023
dc2906c
WAITP-1207 Add country access list endpoint (#4657)
alexd-bes Jun 20, 2023
de0832e
WAITP-1207 add requestCountryAccess endpoint (#4658)
alexd-bes Jun 20, 2023
cd61763
Waitp 1214 dashboard mobile layout (#4656)
alexd-bes Jun 20, 2023
8857d6f
WAITP-1214 move tabs
alexd-bes Jun 20, 2023
9fdb109
WAITP-1214 fix filename error
alexd-bes Jun 20, 2023
b3608e2
renaming of folders and files for consistency
tcaiger Jun 21, 2023
0e8fa5b
Update Footer.tsx
tcaiger Jun 21, 2023
fe4b409
Merge pull request #4662 from beyondessential/frontend-rewrite-refact…
tcaiger Jun 21, 2023
394ea71
bump moment
tcaiger Jun 22, 2023
1c5eb27
bump parse link header
tcaiger Jun 22, 2023
53a8b40
bump validator js
tcaiger Jun 22, 2023
d62bf86
refactor dashboard code to dashboard name
tcaiger Jun 22, 2023
8e4ef1c
Merge pull request #4665 from beyondessential/waitp-1269-fix-fe-deps
tcaiger Jun 22, 2023
db21243
Merge branch 'dev' into epic-frontend-rewrite
tcaiger Jun 22, 2023
0adca3d
Update Chart.tsx
tcaiger Jun 22, 2023
14da721
Merge pull request #4666 from beyondessential/frontend-rewrite-refact…
tcaiger Jun 22, 2023
1b02540
WAITP-1250 Tupaia web server Entities Route (#4651)
EMcQ-BES Jun 22, 2023
088c354
Don't return empty children arrays in the EntitiesRoute
EMcQ-BES Jun 23, 2023
7c9c481
Vite hot reloading (#4670)
alexd-bes Jun 23, 2023
4401d37
WAITP-1211: Entity Dropdown Menu (#4672)
tcaiger Jun 25, 2023
177185e
WAITP-1211: Dashboard Navigation (#4673)
tcaiger Jun 25, 2023
5d097b6
Fix build
alexd-bes Jun 26, 2023
ae80230
Waitp 1244 pie chart (#4674)
alexd-bes Jun 26, 2023
b92f969
WAITP-1205 Show login form on first load of projects view (#4659)
alexd-bes Jun 26, 2023
36bb9d3
WAITP-1243 Bar charts (#4681)
alexd-bes Jun 26, 2023
f885e87
Fix build
alexd-bes Jun 26, 2023
76cedff
Fix font sizes
alexd-bes Jun 26, 2023
a4f0d0b
WAITP-1286 Map Overlays Route (#4677)
EMcQ-BES Jun 26, 2023
b5e42cc
WAITP-1209: Map entities part 1 (#4684)
tcaiger Jun 27, 2023
25ad724
WAITP-1209: Map entities part 2 (#4682)
tcaiger Jun 28, 2023
d18b38f
Waitp 1224 overlay selector desktop (#4685)
alexd-bes Jun 28, 2023
5718f4e
fix map overlay report route (#4689)
tcaiger Jun 28, 2023
9dfb078
WAITP-1256 Dashboard route updates (#4663)
EMcQ-BES Jun 29, 2023
97b2e75
WAITP-1293 Update filtering on entities route (#4688)
EMcQ-BES Jun 29, 2023
ca22db3
WAITP-1298 Add EntityAncestors route (#4690)
EMcQ-BES Jun 29, 2023
ba73a77
Connect dashboards endpoint to FE
alexd-bes Jun 29, 2023
b71c8bf
Update dashboard handling for property name
alexd-bes Jun 29, 2023
51d1a2c
Fix build errors
alexd-bes Jun 30, 2023
1b6d339
WAITP-1212: Tupaia Web Breadcrumbs (#4669)
tcaiger Jul 2, 2023
aeb5b11
Fix undefined error
alexd-bes Jul 2, 2023
6b12df6
Re-write: Fix admin panel tabs (#4696)
tcaiger Jul 3, 2023
43e33a6
Update projects.js
tcaiger Jul 3, 2023
2aa2d23
Waitp 1252 datepicker (#4693)
alexd-bes Jul 3, 2023
6b2454e
Waitp 1247 map overlays date picker (#4694)
alexd-bes Jul 3, 2023
9292d78
Update codeship steps for frontend-rewrite branch (#4699)
EMcQ-BES Jul 3, 2023
f72858d
Remove unused include
EMcQ-BES Jul 3, 2023
21faf96
Update central server map overlays filter to account for empty string…
EMcQ-BES Jul 4, 2023
2aebaf3
Temporarily remove tupaia-web and tupaia-web-server from deployable p…
EMcQ-BES Jul 6, 2023
721c7b6
WAITP-1286 Web config forward auth header to report server (#4705)
EMcQ-BES Jul 6, 2023
9aab174
WAITP-1289 Entity Search Route (#4711)
EMcQ-BES Jul 9, 2023
a78229a
rename types and add to exports (#4716)
alexd-bes Jul 10, 2023
bfea773
Fix issue with parsing chart config (#4718)
alexd-bes Jul 10, 2023
da68bb5
WAITP-1222: Marker layer (#4686)
tcaiger Jul 10, 2023
f5f94bf
WAITP-1290: Fix UI component regressions (#4719)
tcaiger Jul 11, 2023
3baf4aa
fix exportWithLabels
tcaiger Jul 11, 2023
13634cf
Merge branch 'epic-frontend-rewrite' of github.com:beyondessential/tu…
tcaiger Jul 11, 2023
d6943ec
Waitp 1231 base matrix component (#4707)
alexd-bes Jul 11, 2023
c8cbd2e
Fix build errors
alexd-bes Jul 11, 2023
a5c86f8
Update to use legacy report endpoint
alexd-bes Jul 11, 2023
224afff
Revert "Update to use legacy report endpoint"
alexd-bes Jul 11, 2023
1163926
Merge branch 'dev' into epic-frontend-rewrite
tcaiger Jul 11, 2023
6088642
Fixup silly errors (#4721)
EMcQ-BES Jul 11, 2023
1900c13
Fix build
alexd-bes Jul 11, 2023
8079aa2
Waitp 1316 Chart table (#4720)
alexd-bes Jul 12, 2023
35a56e9
Waitp 1338 add matrices (#4725)
alexd-bes Jul 12, 2023
4cfd152
use jest config to set test timezone (#4726)
tcaiger Jul 12, 2023
c7c874a
WAITP-1223: Tupaia web map legend (#4724)
tcaiger Jul 12, 2023
4e75c0a
fix export styles (#4727)
tcaiger Jul 12, 2023
7e7b5cf
WAITP-1292 & WAITP-1285: Web Frontend changes from dev (#4730)
tcaiger Jul 13, 2023
5f4ec30
refactor download files component to ts (#4736)
tcaiger Jul 16, 2023
4298433
WAITP-1229 Search filter for matrix (#4733)
alexd-bes Jul 16, 2023
7235f9d
Waitp 1239 static text visuals (#4732)
alexd-bes Jul 16, 2023
6f70315
WAITP-1318 Add EntityRoute (#4738)
EMcQ-BES Jul 16, 2023
bc04a56
Move search bar
alexd-bes Jul 18, 2023
a26727d
Merge pull request #4747 from beyondessential/waitp-1229-matrix-searc…
alexd-bes Jul 18, 2023
3b8320f
Merge branch 'dev' into epic-frontend-rewrite
tcaiger Jul 18, 2023
3d2edc8
Update FileUploadField.tsx
tcaiger Jul 18, 2023
d0c391a
Update DownloadFilesVisual.js
tcaiger Jul 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .eslintrc-js-frontend.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"extends": "./.eslintrc-js.json",
"extends": ["./.eslintrc-js.json"],
"env": {
"browser": true
},
"rules": {
"jsx-a11y/href-no-hash": "off",
"react/destructuring-assignment": "off",
"react/no-unescaped-entities": "off"
"react/no-unescaped-entities": "off",
"import/extensions": "off"
}
}
}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ COPY packages/utils/. ./packages/utils
COPY packages/tsutils/. ./packages/tsutils
COPY packages/types/. ./packages/types
COPY packages/ui-components/. ./packages/ui-components
COPY packages/ui-chart-components/. ./packages/ui-chart-components
COPY packages/ui-map-components/. ./packages/ui-map-components
COPY packages/weather-api/. ./packages/weather-api
COPY packages/server-boilerplate/. ./packages/server-boilerplate
COPY packages/kobo-api/. ./packages/kobo-api
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ While each package type has their own structure, there are a few common standard
### Platform interfaces

- [Tupaia](https://github.com/beyondessential/tupaia/blob/dev/packages/web-frontend/README.md) (for legacy reasons referred to as web-frontend)
- [Tupaia Web](https://github.com/beyondessential/tupaia/blob/dev/packages/tupaia-web/README.md) (New version of web-frontend)
- [Admin Panel](https://github.com/beyondessential/tupaia/blob/dev/packages/admin-panel/README.md)
- [LESMIS](https://github.com/beyondessential/tupaia/blob/dev/packages/lesmis/README.md)
- [PSSS](https://github.com/beyondessential/tupaia/blob/dev/packages/psss/README.md)
Expand Down Expand Up @@ -91,7 +92,9 @@ All servers are NodeJS express applications, and the packages follow the same ba
- [e2e](https://github.com/beyondessential/tupaia/blob/dev/packages/e2e/README.md)
- [expression-parser](https://github.com/beyondessential/tupaia/blob/dev/packages/expression-parser/README.md)
- [indicators](https://github.com/beyondessential/tupaia/blob/dev/packages/indicators/README.md)
- [kobo-api](https://github.com/beyondessential/tupaia/blob/dev/packages/kobo-api/README.md)
- [ui-components](https://github.com/beyondessential/tupaia/blob/dev/packages/ui-components/README.md)
- [ui-chart-components](https://github.com/beyondessential/tupaia/blob/dev/packages/ui-chart-components/README.md)
- [ui-map-components](https://github.com/beyondessential/tupaia/blob/dev/packages/ui-map-components/README.md)
- [server-boilerplate](https://github.com/beyondessential/tupaia/blob/dev/packages/server-boilerplate/README.md)
- [superset-api](https://github.com/beyondessential/tupaia/blob/dev/packages/superset-api/README.md)
- [ui-components](https://github.com/beyondessential/tupaia/blob/dev/packages/ui-components/README.md)
Expand Down
14 changes: 8 additions & 6 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
steps:
- name: Test admin-panel-server
command: './packages/devops/scripts/ci/testBackend.sh admin-panel-server'
- name: Test central-server
command: './packages/devops/scripts/ci/testBackend.sh central-server'
- name: Test data-table-server
command: './packages/devops/scripts/ci/testBackend.sh data-table-server'
- name: Test lesmis-server
Expand All @@ -37,8 +35,6 @@
command: './packages/devops/scripts/ci/testBackend.sh psss-server'
- name: Test report-server
command: './packages/devops/scripts/ci/testBackend.sh report-server'
- name: Test web-config-server
command: './packages/devops/scripts/ci/testBackend.sh web-config-server'
- type: parallel
name: Test batch 2
steps:
Expand All @@ -54,15 +50,21 @@
command: './packages/devops/scripts/ci/testBackend.sh indicators'
- name: Test internal-dependencies
command: './packages/devops/scripts/ci/testInternalDependencies.sh'
- name: Test web-frontend
command: './packages/devops/scripts/ci/testFrontend.sh web-frontend'
- type: parallel
name: Test batch 3
steps:
- name: Test entity-server
command: './packages/devops/scripts/ci/testBackend.sh entity-server'
- name: Test meditrak-app-server
command: './packages/devops/scripts/ci/testBackend.sh meditrak-app-server'
- name: Test tupaia-web-server
command: './packages/devops/scripts/ci/testBackend.sh tupaia-web-server'
- name: Test tupaia-web
command: './packages/devops/scripts/ci/testFrontend.sh tupaia-web'
- name: Test web-config-server
command: './packages/devops/scripts/ci/testBackend.sh web-config-server'
- name: Test central-server
command: './packages/devops/scripts/ci/testBackend.sh central-server'

- name: Deploy changes
service: deployment
Expand Down
6 changes: 4 additions & 2 deletions packages/admin-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"start-admin-panel-server": "yarn workspace @tupaia/admin-panel-server start-dev",
"start-data-table-server": "yarn workspace @tupaia/data-table-server start-dev",
"test": "echo No tests",
"start-ui-components": "yarn workspace @tupaia/ui-components build-dev:watch",
"start-ui-components": "yarn workspace @tupaia/ui-components build -w",
"start-ui-chart-components": "yarn workspace @tupaia/ui-chart-components build -w",
"start-frontend": "npm-run-all -c -l -p start-ui-components start-dev",
"start-servers": "npm-run-all -c -l -p start-central-server start-entity-server start-report-server start-admin-panel-server start-data-table-server"
},
Expand All @@ -41,6 +42,7 @@
"@material-ui/styles": "^4.9.10",
"@tupaia/access-policy": "3.0.0",
"@tupaia/types": "1.0.0",
"@tupaia/ui-chart-components": "1.0",
"@tupaia/ui-components": "1.0",
"@tupaia/utils": "1.0.0",
"axios": "^0.21.1",
Expand All @@ -53,7 +55,7 @@
"lodash.keyby": "^4.6.0",
"lodash.throttle": "^4.1.1",
"moment": "^2.22.2",
"parse-link-header": "^1.0.1",
"parse-link-header": "^2.0.0",
"prop-types": "^15.6.0",
"query-string": "^5.1.1",
"react": "^16.13.1",
Expand Down
43 changes: 26 additions & 17 deletions packages/admin-panel/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,32 @@ export const App = ({ user }) => {
<div ref={headerEl} />
<Switch>
{[...ROUTES, ...PROFILE_ROUTES].map(route => (
<Route key={route.to} path={route.to}>
<TabsToolbar
links={route.tabs.map(tab => ({
...tab,
id: `app-subTab-${labelToId(tab.label)}`,
}))}
maxWidth="xl"
/>
<Switch>
{route.tabs.map(tab => (
<Route key={`${route.to}-${tab.to}`} path={`${route.to}${tab.to}`} exact>
<tab.component getHeaderEl={getHeaderEl} />
</Route>
))}
<Redirect to={route.to} />
</Switch>
</Route>
<Route
key={route.to}
path={route.to}
render={({ match }) => {
return (
<>
<TabsToolbar
links={route.tabs.map(tab => ({
...tab,
id: `app-subTab-${labelToId(tab.label)}`,
}))}
maxWidth="xl"
baseRoute={match.url}
/>
<Switch>
{route.tabs.map(tab => (
<Route key={`${route.to}-${tab.to}`} path={`${route.to}${tab.to}`} exact>
<tab.component getHeaderEl={getHeaderEl} />
</Route>
))}
<Redirect to={route.to} />
</Switch>
</>
);
}}
/>
))}
<Redirect to="surveys" />
</Switch>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { useParams } from 'react-router-dom';
import styled from 'styled-components';
import MuiTab from '@material-ui/core/Tab';
import MuiTabs from '@material-ui/core/Tabs';
import { Chart, FlexSpaceBetween, FetchLoader, DataTable, JsonEditor } from '@tupaia/ui-components';

import { FlexSpaceBetween, FetchLoader, DataTable, JsonEditor } from '@tupaia/ui-components';
import { Chart } from '@tupaia/ui-chart-components';
import { TabPanel } from './TabPanel';
import { useReportPreview } from '../api';
import { usePreviewData, useVisualisation, useVizConfig, useVizConfigError } from '../context';
Expand Down
1 change: 1 addition & 0 deletions packages/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"dependencies": {
"@tupaia/tsutils": "1.0.0",
"@tupaia/types": "1.0.0",
"@tupaia/utils": "1.0.0",
"lodash.pick": "^4.4.0",
"node-fetch": "^1.7.3",
"qs": "^6.10.1"
Expand Down
5 changes: 5 additions & 0 deletions packages/api-client/src/MockTupaiaApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
DataTableApiInterface,
EntityApiInterface,
ReportApiInterface,
WebConfigApiInterface,
} from './connections';

import {
Expand All @@ -17,6 +18,7 @@ import {
MockDataTableApi,
MockEntityApi,
MockReportApi,
MockWebConfigApi,
} from './connections/mocks';

export class MockTupaiaApiClient {
Expand All @@ -25,18 +27,21 @@ export class MockTupaiaApiClient {
public readonly dataTable: DataTableApiInterface;
public readonly entity: EntityApiInterface;
public readonly report: ReportApiInterface;
public readonly webConfig: WebConfigApiInterface;

public constructor({
auth = new MockAuthApi(),
central = new MockCentralApi(),
dataTable = new MockDataTableApi(),
entity = new MockEntityApi(),
report = new MockReportApi(),
webConfig = new MockWebConfigApi(),
} = {}) {
this.auth = auth;
this.central = central;
this.dataTable = dataTable;
this.entity = entity;
this.report = report;
this.webConfig = webConfig
}
}
4 changes: 4 additions & 0 deletions packages/api-client/src/TupaiaApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import {
DataTableApi,
EntityApi,
ReportApi,
WebConfigApi,
AuthApiInterface,
CentralApiInterface,
DataTableApiInterface,
EntityApiInterface,
ReportApiInterface,
WebConfigApiInterface,
} from './connections';
import { PRODUCTION_BASE_URLS, ServiceBaseUrlSet } from './constants';

Expand All @@ -26,12 +28,14 @@ export class TupaiaApiClient {
public readonly dataTable: DataTableApiInterface;
public readonly auth: AuthApiInterface;
public readonly report: ReportApiInterface;
public readonly webConfig: WebConfigApiInterface;

public constructor(authHandler: AuthHandler, baseUrls: ServiceBaseUrlSet = PRODUCTION_BASE_URLS) {
this.auth = new AuthApi(new ApiConnection(authHandler, baseUrls.auth));
this.entity = new EntityApi(new ApiConnection(authHandler, baseUrls.entity));
this.central = new CentralApi(new ApiConnection(authHandler, baseUrls.central));
this.report = new ReportApi(new ApiConnection(authHandler, baseUrls.report));
this.dataTable = new DataTableApi(new ApiConnection(authHandler, baseUrls.dataTable));
this.webConfig = new WebConfigApi(new ApiConnection(authHandler, baseUrls.webConfig));
}
}
4 changes: 2 additions & 2 deletions packages/api-client/src/auth/BasicAuthHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import { AuthHandler } from '../types';
import { createBasicHeader } from '@tupaia/utils';

export class BasicAuthHandler implements AuthHandler {
private readonly authHeader: string;
Expand All @@ -17,7 +18,6 @@ export class BasicAuthHandler implements AuthHandler {
}

private buildAuthHeader(username: string, password: string): string {
// TODO: Replace with @tupaia/utils createBasicHeader() when we unpublish
return `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`;
return createBasicHeader(username, password);
}
}
47 changes: 47 additions & 0 deletions packages/api-client/src/connections/EntityApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,44 @@ export class EntityApi extends BaseApi {
);
}

public async getAncestorsOfEntity(
hierarchyName: string,
entityCode: string,
queryOptions?: {
field?: string;
fields?: string[];
filter?: any;
},
includeRootEntity = false,
) {
return this.connection.get(`hierarchy/${hierarchyName}/${entityCode}/ancestors`, {
...this.stringifyQueryParameters(queryOptions),
includeRootEntity: `${includeRootEntity}`,
});
}

public async getAncestorsOfEntities(
hierarchyName: string,
entityCodes: string[],
queryOptions?: {
field?: string;
fields?: string[];
filter?: any;
},
includeRootEntity = false,
) {
return this.connection.post(
`hierarchy/${hierarchyName}/ancestors`,
{
...this.stringifyQueryParameters(queryOptions),
includeRootEntity: `${includeRootEntity}`,
},
{
entities: entityCodes,
},
);
}

public async getRelativesOfEntity(
hierarchyName: string,
entityCode: string,
Expand Down Expand Up @@ -258,6 +296,15 @@ export class EntityApi extends BaseApi {
},
);
}

public async entitySearch(hierarchyName: string, searchString: string, queryOptions?: any) {
const { page, pageSize, ...otherQueryOptions } = queryOptions;
return this.connection.get(`hierarchy/${hierarchyName}/entitySearch/${searchString}`, {
...this.stringifyQueryParameters(otherQueryOptions),
page,
pageSize,
});
}
}

export interface EntityApiInterface extends PublicInterface<EntityApi> {}
4 changes: 4 additions & 0 deletions packages/api-client/src/connections/ReportApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export class ReportApi extends BaseApi {
public async fetchTransformSchemas() {
return this.connection.get('fetchTransformSchemas');
}

public async fetchReport(reportCode: string, query?: QueryParameters | null) {
return this.connection.get(`fetchReport/${reportCode}`, query);
}
}

export interface ReportApiInterface extends PublicInterface<ReportApi> {}
22 changes: 22 additions & 0 deletions packages/api-client/src/connections/WebConfigApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Tupaia
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/

import { QueryParameters } from '../types';
import { BaseApi } from './BaseApi';
import { PublicInterface } from './types';

export class WebConfigApi extends BaseApi {
public async fetchReport(reportCode: string, query?: QueryParameters | null) {
return this.connection.get(`report/${reportCode}`, query);
}
public async fetchMeasureData(mapOverlayCode: string, query?: QueryParameters | null) {
return this.connection.get('measureData', { ...query, mapOverlayCode });
}
public async fetchProjects() {
return this.connection.get('projects');
}
}

export interface WebConfigApiInterface extends PublicInterface<WebConfigApi> {}
1 change: 1 addition & 0 deletions packages/api-client/src/connections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export { DataTableApi, DataTableApiInterface } from './DataTableApi';
export { EntityApi, EntityApiInterface } from './EntityApi';
export { CentralApi, CentralApiInterface } from './CentralApi';
export { ReportApi, ReportApiInterface } from './ReportApi';
export { WebConfigApi, WebConfigApiInterface } from './WebConfigApi';
Loading