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

Datatrak web epic #5171

Merged
merged 145 commits into from
Nov 19, 2023
Merged

Datatrak web epic #5171

merged 145 commits into from
Nov 19, 2023

Conversation

tcaiger
Copy link
Contributor

@tcaiger tcaiger commented Nov 13, 2023

Issue #: Datatrak web epic

Changes:

  • Migration to add project_id to surveys table
  • Landing Page updates
    • Recent Surveys
    • Recent Survey Responses
    • Leaderboard
    • Activity Feed
  • Update survey url to include country code

alexd-bes and others added 30 commits August 21, 2023 10:45
* Added skeleton datatrak-server package

* Added datatrak-server to CI/CD

* wip datatrak front end app

* Added api-client to datatrak-server

* Added /projects route to datatrak-server

* disable eslint and re-install dependencies

* Added /entities route to datatrak-server

* add base views and downgrade react

* Update api.js

* Disabled frozen-lockfile

* Reverted yarn.lock

* Re-enabled frozen lockfile

* Add datatrak to CI/CD

* Added /surveys and /surveyScreenComponents routes

* Re-enabled exports of ui-components

* Switched to using pre-existing build and start scripts for datatrak

* add base form components

* Fix datatrak build

* format data to screens

* Got login working

* Added extra fields to FetchSurveyScreenComponents

* Got project and country selection working

* Upated yarn.lock

* Got survey selection working

* Got Survey page working

* screen steps

* add template styling

* add admin route

* Switched to using .env var for server url

* add logout

* Fixed up FetchUserRoute

* Add submitSurveyResponse route

* labels

* Add entity question

* add entity question to screen

* survey submit

* Update yarn.lock

* Update package.json

* remove anything not from fe

* Merge branch 'dev' into datatrak-hackathon

* Remove unused files

* Add initial fetch example

* Update README.md

* Revert change

* Remove unneeded change

* Add back in datatrak-app

* Add .env.example

* Update files

* Remove unnecessary code

* Fixes

* Test remove server setup

* Remove test step

* WAITP-1368: Basic page layout (#4890)

* basic page layout

* styles

* use theme colours

---------

Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
* WAITP-1367 Add datatrak_session table to db

* WAITP-1367 Add request type for datatrak user request

* WAITP-1367 Add datatrak-server package

* WAITP-1367 Regenerate yarn.lock

* WAITP-1367 Fix minor copy-paste errors

* WAITP-1367 Add datatrak_session to ignored tables for hooks

* WAITP-1367 Add datatrak-server to server startup script in datatrak-web

* WAITP-1367 Add datatrak-server to CI/CD scripts

* WAITP-1367 Reduce layer count in dockerfile

* WAITP-1367 Regenerate types

* WAITP-1367 Regnerate types (again)

* WAITP-1367 Fixup clashing exports

* WAITP-1367 Rebalance test batching
* find and replace

* rename package

* Update tupaia-ci-cd.Dockerfile

* update types
This reverts commit 6fbbec6.
* Setup reusable login form

* Working login

* User menu

* Fix versions

* Comments and tidy ups

* Fix build issue

* Add verify email view

* Update loginForm.stories.js

* FIx export

* Fix storybook

* Fixes

* Fix route names

* Update private routes and fix build

* Fix type errors

* Fix types

* Generate types

* Revert "Generate types"

This reverts commit de0fb64.

* Create private route

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
* Setup reusable login form

* Working login

* User menu

* Fix versions

* Comments and tidy ups

* Fix build issue

* Add verify email view

* Update loginForm.stories.js

* FIx export

* Update storybook

* Fix storybook

* Add pages to datatrak-web and mobile styling

* Fixes

* Fix route names

* Update private routes and fix build

* Fix height

* Fix type errors

* Fix types

* Generate types

* Revert "Generate types"

This reverts commit de0fb64.

* Create private route

* Fix build

* Fix casing

* Fix build error

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
* Initial landing page

* Working survey select

* Fix type errors

* WAITP-1411: Setup datatrak survey screens (#4920)

* Setup reusable login form

* Working login

* User menu

* Fix versions

* Comments and tidy ups

* Fix build issue

* Add verify email view

* Update loginForm.stories.js

* FIx export

* Fix storybook

* Fixes

* Fix route names

* survey screens

* save form data

* routes

* Update Routes.tsx

* fix types

* scrren layout

* refactor context

* tidy up css

* resolve conflicts

* Update merge

* Update useSurveyScreenComponents.tsx

---------

Co-authored-by: acdunham <alex@beyondessential.com.au>

* Fix circular types error

* Fix route

* Test types generate

* revert generate changes

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
* Started on progress bar commit

* added more styling and changed logic

* designed logic for progress bar

* fixed progress bar colour

* fixed pr

* ready for retest

* Added to survey page

* cleaned a few things

---------

Co-authored-by: acdunham <alex@beyondessential.com.au>
* Text question

* Binary and radio questions

* Update types

* ƒix option parsing

* Date question

* Update question number logic

* Instruction question

* Update index.ts

* Handle review screen

* Fix date styles

* Update text field width

* Update line height

* Add types

* remove question number for now

* Checkbox question and styling

* Checkbox question

* Add comment

* DateTimeQuestion

* Add controller around all questions

* Add in question number

* Reorder imports

* Handle more than 26 questions on a screen

* Update casing.ts

* Fix imports

* Fixes and generate types

* Fix merge and question number logic

* Fix props
* Auth updates part 1

* Auth view

* Survey screen

* Tooltip buttons

* Use theme variable

* Update theme variable for primary text

* Auth layout

* Move styles into common form files

* Fix layout padding

* Update layout

* Update SurveySelectPage.tsx

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
* Setup reusable login form

* Working login

* User menu

* Fix versions

* Comments and tidy ups

* Fix build issue

* Add verify email view

* Update loginForm.stories.js

* FIx export

* Fix storybook

* Fixes

* Fix route names

* survey screens

* save form data

* routes

* Update Routes.tsx

* Initial landing page

* fix types

* scrren layout

* refactor context

* Working survey select

* tidy up css

* resolve conflicts

* Fix type errors

* Update merge

* Update useSurveyScreenComponents.tsx

* work in progress

* need testing

* quick fix

* styling commit

* few pr changes

* changed folder locations

* fixed imports and exports

---------

Co-authored-by: acdunham <alex@beyondessential.com.au>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
* Working menu

* Remove unused import

* Fixes
* WIP on geolocation question

* Pushing to remote for pairing

* updates to map pin drop functionality and ui

* tidying up unused imports and redundant components

* Fixes part 1

* Updates

* Fixes

---------

Co-authored-by: wduncker <wduncker@LAPTOP-AFVENG10>
Co-authored-by: acdunham <alex@beyondessential.com.au>
* almost done with routes

* sorted, does need cleaning up

* survey success commit

* Tidy up files

* Fix merge issues

* Fixes

* Fix types

* remove questions url

* Fix types

---------

Co-authored-by: acdunham <alex@beyondessential.com.au>
* project select modal

* save project id for a user

* fix types

* Update ProjectSelectPage.tsx

* edit project

* Update ProjectSelectPage.tsx

* Update ProjectSelectModal.tsx

* custom icons

* pr changes

* request access styles

* request access on click

* update types
* almost done with routes

* sorted, does need cleaning up

* survey success commit

* Tidy up files

* Fix merge issues

* Review screen

* Initial mutation

* Tidy up files

* Fixes

* Update SurveyLayout.tsx

---------

Co-authored-by: Chao Xin Nhin <chaon@missionreadyhq.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
* Working request access

* Add access requested icon to project list

* Add 'EditUserForMe' endpoint

* Remove all countries requested view

* Refactor select list

* Fix on select issue

* Don't have onClick if is not a button

* Generate types

* Fixes

* Update types
* WIP

* Finish styling and get working

* Update styles

* Update font size

* Update hover colour

* Update packages/datatrak-web/src/features/Questions/AutocompleteQuestion.tsx

Co-authored-by: Tom Caiger <caigertom@gmail.com>

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
* setup entities question

* searching

* debounce

* styles

* close button

* sorting search results

* update filters

* remove old entity route

* fix filters

* fix types

* Update EntityList.js

* Update EntitiesRoute.ts

* refactor to match new list component

* Update useUser.ts
* Toast messages

* Remove buttons from landing page

* Apply error handling by default

* Fixes

* Fix build errors and merge conflicts

* Fix error

* Fix broken test
alexd-bes and others added 26 commits November 13, 2023 15:23
* WAITP-1478 Add types definition for RecentSurveyResponseRoute

* WAITP-1478 Regen types

* WAITP-1478 Add route for RecentSurveyResponse

* WAITP-1478 Fixup export

* WAITP-1478 Update url

* WAITP-1478 Regen types

* useSurveyResponse

* survey review screen

* wip set default values

* set up route

* Update useLogin.ts

* refactor survey context to be at survey level

* remove bad merge

* survey data

* basic working setup

* remove debug changes

* split out paginator

* put page back in survey layout

* refactor layout components

* Update index.ts

* Update SurveyContext.tsx

* Update SurveyReviewSection.tsx

---------

Co-authored-by: Ethan McQuarrie <ethan@beyondessential.com.au>
…validation

WAITP-1463: Cap survey name length at 50 characters
* add current user context

* add error display

* rename context
* Update SurveysRoute.ts

* remove tsx extentions

* Update SurveysRoute.ts
* Responsive styling of dashboard leaderboard

* Fix type error
* Survey not found error handling

* Reorder imports

* Updates to route

* Fix types

* Remove unused imports

* Error page rename

* Rename page
* extract useFromLocation

* extract `useFromLocation` to own file and use
* generify high-five graphic filename

* update submission success graphic

* define margins along block/inline axes

See https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flow_layout/Block_and_inline_layout_in_normal_flow

* success screen fix horizontal overflow

* define survey success image dimen with `rem`

* relabel button ‘Close’ → ‘Return to dashboard’
* add Single Entity Route

* use country url to submit

* fix tests

* make TupaiaWebEntityRequest re-usable

* Update SingleEntityRoute.ts

* update recent surveys and responses routes

* handle recent survey submissions

* Update SurveyResponsesSection.tsx

* update country id in survey page

* remove unused code

* Update processSurveyResponse.test.ts
* WAITP-1496 Simple skip for join tables in GETSurveys

* WAITP-1496 Default to true

* WAITP-1496 Request questions in single survey route

* WAITP-1496 Add countryNames to surveys request
@tcaiger tcaiger enabled auto-merge (squash) November 19, 2023 22:57
@tcaiger tcaiger merged commit b2c534f into dev Nov 19, 2023
42 checks passed
@tcaiger tcaiger deleted the datatrak-web-epic branch November 19, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants