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

merge latest dev before testing #5441

Merged
merged 15 commits into from
Feb 22, 2024
Merged

merge latest dev before testing #5441

merged 15 commits into from
Feb 22, 2024

Conversation

avaek
Copy link
Contributor

@avaek avaek commented Feb 22, 2024

No description provided.

rohan-bes and others added 15 commits February 13, 2024 12:13
* fix button spacing jank

* code style
* Update types

* Use new types in ui-chart-components

* Use new types for matrix

* Update types

* Revert "Use new types for matrix"

This reverts commit c366962.

* Revert "Use new types in ui-chart-components"

This reverts commit 320a3c4.

* Fix broken builds

* Update types

* Update types

* Update index.ts

* Update ui-chart-components to use the correct types

* Generate types

* Update type in ui-chart-components

* Updates for ui-chart-components

* Update types in tupaia-web

* Fix error

* Fix tests

* RN-1130: Added typeguards to use for casting chartTypes

* Fix types across chart components

* Generate types

* Fix test

* Fix tests

* Fix build error

---------

Co-authored-by: Rohan Port <rohan@bes.au>
* update Tupaia Web support link

* update component name for parity

* same for DataTrak

* remove redundant inline comment

* remove erroneous space
* RN-1107: Make matrix header sticky

* Use clamp instead of min
* RN-1107: Make matrix header sticky

* Use clamp instead of min

* Side scroll for matrix

* Update min widths

* Update width handling

* remove unused import

* Use theme breakpoints

* Testing fixes

---------

Co-authored-by: Andrew <vanbeekandrew@gmail.com>
* Add migration

* Check for existing report code when editing viz

* Add edit checks

* Update tests

---------

Co-authored-by: acdunham <129009580+acdunham@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
* autofocus email field on DataTrak login page

* autofocus email field in Tupaia login form

* fancier `buildInternalDependencies.sh` output

* markdown styling

* more markdown styling

* fix internal links

* touch up Admin Panel README

* touch up MediTrak README

* relabel marked link

* more descriptive component names

* tighten `ProjectSelectForm` imports

* reword a tooltip

* sentence case

* list `tupaia-web-server` in README

* better variable name

* remove unneccsary fullstop

follows Material Design style guide

* prettier `checkTestDatabaseExists.sh` output

* capitalise LastPass properly

* newline before EOF

* use logical css property

* update copyright header comment

* touch up `web-config-server` REAME

* Markdown style

* touch up `expression-parser` README

* reintroduce heading

* nonbreaking space before unit

* touch up LESMIS README

* full stops and nonbreaking space with “i.e.”

* minor rewordings

* capitalisation of “MediTrak”

* change header comment type

* again

* Markdown table format

* standardise spelling of “microservice”

* editorial nitpicks

* interal linking

* editorial nitpicks
* remove Node version override for App Center

* formatting
* tile component

* Revert "tile component"

This reverts commit 7b612fb.

* WAITP-1454: UI changes (#5089)

* tile component

* Show modal when exiting survey via home button

* Remove unused imports

* Stop menu re-rendering on change of survey screen

* Update button disabled state

* Fix build errors

* Fix tests

* Close side menu on screen change on mobile

* clean up code from another branch

* Update LandingPage.tsx

---------

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

* WAITP-1377 Forward signup route to web config server (#5090)

* WAITP-1377 Forward signup route to web config server

* WAITP-1377 Fixup lint

* WAITP-1449: QR code generator (#5086)

* WIP visibility criteria

* Working survey visibility criteria

* Generate types

* Add tests

* Redirect user if survey screen is not visible

* Reset invisible answers

* Handle when value is not an array

* Remove only from test

* Fix tests

* Conditional questions working

* Get question fully updating

* Generate types

* Add tests and update types

* Update survey.json

* Fix types and build

* Fix tests

* Initial logic and separate out context

* Working arithmetic question

* Fix tests and build

* Generate types

* Fix types

* Add tests

* WIP

* WIP

* WIP

* WIP

* Working qr code

* Fix types

* Update test

* Fix tests

* PR fixes

* WAITP-1415: Photo upload question (#5099)

* WIP

* Use built in functionality

* Add comment

* Fix build errors

* no-issue-fix-types-after-merge

* WAITP-1357: Datatrak dashboard survey responses (#5091)

* Update LandingPage.tsx

* update landing page

* data fetching layer

* fix console errors

* re organise landing page

* tooltips

* style tweaks

* update landing page layout

* horizontal scroll

* page limit

* WAITP-1461: Datatrak design feedback (#5109)

* Update LandingPage.tsx

* update landing page

* data fetching layer

* fix console errors

* re organise landing page

* tooltips

* style tweaks

* update landing page layout

* horizontal scroll

* page limit

* project select page

* menu ux

* Update useSubmitSurvey.ts

* gps question

* Update index.html

* Update ProjectsRoute.ts

* theming

* Update mui.d.ts

* Update useSubmitSurvey.test.ts

* Update theme.ts

* Update SurveySelectPage.tsx

* Update SurveySelectPage.tsx

* Update useValidationResolver.ts (#5128)

* WAITP-1412: fix arithmetic questions

* one time login flow (#5138)

* WAITP-1354: Leaderboard (#5132)

* no-issue: Add @tupaia/server-utils package (#5121)

* RN-1060: (task) Moved sendEmail to @tupaia/server-utils (#5126)

* RN-1060: (task) Added dashboards/:project/:entity/:dashboard/export route to tupaia-web (#5125)

* WAITP-1354: Leaderboard

* Update copyright

* Update internal email

* Update email filter

* Fix response type

* Update packages/datatrak-web/src/features/Leaderboard/LeaderboardTable.tsx

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

* Update background variable

* Update branch name validation script (#5136)

* Update to use new leaderboard model

* Revert "Merge branch 'dev' into waitp-1354-leaderboard"

This reverts commit c2acdbe, reversing
changes made to 747f182.

* Fix types

* Update packages/database/src/modelClasses/SurveyResponse.js

Co-authored-by: Rohan Port <59544282+rohan-bes@users.noreply.github.com>

* PR fixes

* Fix error

---------

Co-authored-by: Rohan Port <59544282+rohan-bes@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Ethan McQuarrie <69437175+EMcQ-BES@users.noreply.github.com>

* WAITP-1356: recent surveys (#5113)

* Update LandingPage.tsx

* update landing page

* data fetching layer

* fix console errors

* re organise landing page

* tooltips

* style tweaks

* update landing page layout

* horizontal scroll

* page limit

* Frontend layout

* Working request

* Refetch recent surveys on submit

* Fix recent survey request and styling

* Use grid and update heading element

* Remove unnecessary css

* PR fixes

---------

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

* WAITP-1469: account delete (#5134)

* WIP

* Account deletion

* Update component for section

* Update modals

* Remove forced open state

* Fix types

* fix build error

* Update packages/datatrak-web/src/api/mutations/useEditUser.ts

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

* Update packages/datatrak-web/src/api/mutations/useEditUser.ts

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

* Change format

* fix bad merge

* return zeros for rewards

---------

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

* WAITP-1330: File upload question type (#5100)

* WIP

* Use built in functionality

* Add comment

* Fix build errors

* Working file upload

* Fix build

* Remove unused vars

* Update format of file upload answers

* Update schemas.ts

* Update processSurveyResponse.test.ts

* Update upsertAnswers.js

---------

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

* WAITP-1424: Datatrak PrimaryEntity question fix (#5144)

* fix rewards types

* update primary entity question name

* WIP

* Fix success screen layout

* Fix date change issue

* Fix error styling

* Working activity feed

* Tidy ups

* WAITP-1427: Fix survey cancelling (#5148)

* Update CancelSurveyModal.tsx

* tidy up landing page

* fix console errors

* No issue: Only generate QR code when createNew is true

* No issue: Fix tests

* Remove permission group and country from admin panel feed items

* No issue: Fix recent survey layout

* Working pinned posts

* No issue: Login redirect (#5151)

* Redirect to route on login or project select

* Formatting

* Always show user on leaderboard

* WAITP-1478 Single survey response endpoint (#5153)

* 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

* WAITP-1478 Update survey response answers to map by question_id

* WAITP-1478 Rename RecentSurveyResponse to SingleSurveyResponse

* WAITP-1478 Rename files

* Fix PR

* Generate types

* Fix styling

* Update Button.tsx

* Fixes

* WAITP-1452: Datatrak-web refactor survey context (#5156)

* Update useLogin.ts

* refactor survey context to be at survey level

* Create migration

* Update types

* Responsive styling (#5158)

* Responsive styling

* Fix padding on mobile

* sentnece case for heading

to match Figma (and Material Design style guide)

* Handle project id in queries

* enforce min gap in `AccountSettingsSection`

* user details form GUI

* Filter user rewards by project id

* two-column form in medium size class

* dim colour for `AccountSettingsSection` desc

* Update queries to have projectId as optional param

* prepopulate email in account settings

also move `const` declarations into `export`

* Fix bindings

* Update SurveyResponse.js

* Add project column to admin panel

* separate first/last names for UserRoute

* prepopulate first/last names in account settings

* WAITP-1452: Recent survey response page (#5157)

* 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>

* nest children instead of passing as prop

* Update 20231112212117-AddProjectIdToSurveys-modifies-schema.js

* Add index to migration

* Fix migration

* Fix typo

* Cap survey name length at 50 characters

* remove redundant nesting selector

* non-hacky label colouring in personal detail form

* `firstName`/`lastName` properties in user req body

* prepopulate contact no., employer, position

* remove faulty tooltip usage

* set ‘Save changes’ button initially disabled

* more sensible property ordering

* WAITP-1490: Datatrak current user context (#5170)

* add current user context

* add error display

* rename context

* make personal detail fields editable

* autofill attributes for employer and position

* use `useCurrentUser`

* use state for field values

* label font weight from theme

* Revert “use state for field values”

This reverts commit cc44f1b.

* make email uneditable in account settings

* wip: React Hook Form for personal details

* WAITP-1431: Fix survey select filter (#5177)

* Update SurveysRoute.ts

* remove tsx extentions

* Update SurveysRoute.ts

* WAITP-1387: Add survey project field (#5172)

* Responsive styling of dashboard leaderboard (#5173)

* Responsive styling of dashboard leaderboard

* Fix type error

* Survey not found error handling (#5160)

* Survey not found error handling

* Reorder imports

* Updates to route

* Fix types

* Remove unused imports

* Error page rename

* Rename page

* no-issue: Fix `location.state` null (#5179)

* extract useFromLocation

* extract `useFromLocation` to own file and use

* use React Hook Form `required` property

* make personal details fields controlled

* fix user details save button alignment

* clearer comment

* button tooltip only when form is dirty

* full width user detail save button

* Enter key hints for user details on mobile

* `tel` input mode for contact number field

* make PUT request to change user details

* WAITP-1474: Update success illustration on DataTrak (#5159)

* 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’

* fix `mobileNumber` field in `UserRequest.ts`

* Fix package error

* Fix autocomplete validation issue

* fix fetching contact number

* use React Hook Form to set default field values

* optional `PersonalDetails` & remove unused import

* fix fetching contact number (again)

* WAITP-1431: Update datatrak survey url with country code (#5182)

* 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 Make questions optional in GETSurveys (#5185)

* 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

* user details: update only changed fields

* toast upon successful user detail change

* fix build errors

* fix typing issue

* shared type, success toast only when appropriate

previously, success toast would redundantly show when account deletion request was successfully made

* stricter typing of submit handler parameter

* refactor creation of dirty-field-only object

* email form field tooltip

* use shorthand to pass details to submit handler

* Apply suggestions from code review

specify `email` and `tel` input types

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

* organise imports

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

* uncontrolled personal details form

* more readable submit handler

* consolidate form default values

and disable save button when submitting

* reword success toast to match Figma

* un-require mobile number

* register mobile number field

* narrow typing of form `defaultValues`

* wip: reset personal details form

* remove extraneous logs

* fix input label layering

* wip: reset form

* dynamically label save button

* async-ify `updateUser`

* revert `useEditUser` signature change

* don’t await query invalidation

* restore previous `onSuccess`

* custom validation UI (and extract form component)

* organise file structure

* organise imports

* disable form while submitting

* fix form sizing

* extract inline `onSuccess` handler to named fn

* remove extraneous `export`

* fix dynamic button label

* relabel save button while submitting

* fix form width in medium size class

* actually fix form width in medium size class

* omit ellipsis in button

* more rigorous form validation

* don’t bother registering `email` field

* sanitise values by trimming

* enable complete removal of `mobile_number`

* remove extraneous log

Co-authored-by: acdunham <129009580+acdunham@users.noreply.github.com>

* remove another extraneous log

Co-authored-by: acdunham <129009580+acdunham@users.noreply.github.com>

* extract `assertNotWhitespace()`

* fix usage before definition

* extract non-whitespace assersion

* inline comments for submit handler

* conciser comment and trivial line reordering

* experiment: `required="non-whitespace"`

* code format

* more consistent code format

* remove commented-out code

* make inputs more accessible with `id` prop

also moved placement of a comment for clarity

* Revert "make inputs more accessible with `id` prop"

This reverts commit dfa3455.

* make inputs more accessible with `id` prop

also moved placement of a comment for clarity

* `div` → `Box`

* fix button alignment on mobile

* stricter typing for current user

* autofocus first field

* trim to validate iff input type ≠ password

and stricter typing

* remove dead code/comments

* remove extraneous ESLint comment

* rename a variable for consistency

* DRY up `fieldset` reset styles

* fix unobscured password fields

* fix registration T&C checkbox

* comment React Hook Form `validate` quirks

* finish merge from `dev`

* delete accidentally committed file

* fix import order

* destructure a variable

* move `formContext` definition

* comment `FormInput`

* fix registration checkbox behaviour

* better typing

* fix typo

* more explicit inline comment

* unify disabled button styling

* don’t disable registratino button

* refactor to avoid `reduce()`

---------

Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: acdunham <alex@beyondessential.com.au>
Co-authored-by: acdunham <129009580+acdunham@users.noreply.github.com>
Co-authored-by: Ethan McQuarrie <69437175+EMcQ-BES@users.noreply.github.com>
Co-authored-by: Rohan Port <59544282+rohan-bes@users.noreply.github.com>
Co-authored-by: Ethan McQuarrie <ethan@beyondessential.com.au>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
@avaek avaek merged commit be86ccf into rn-1165-doc-upload-bug Feb 22, 2024
70 checks passed
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.

4 participants