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

Add eslint config for typescript as a package #1030

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

kael89
Copy link
Collaborator

@kael89 kael89 commented Jul 23, 2020

Issue #:

Will be used in https://github.com/beyondessential/tupaia-backlog/issues/256

There is also eslint-config-airbnb-typescript, which converts the Airbnb Style Guide (which uses JavaScript rules) to Typescript rules, but is not currently working with Eslint 7 and our configuration (see this issue.) It would be great to use this plugin in the near future, since currently some rules in our standard configuration (eg no-underscore-dangle) are not enabled in the config here.

Other solutions would be

  • We could use both the Airbnb style guide (Javascript) and @typescript-eslint/eslint-plugin (Typescript). I tried that initially, but
    1. Most rules are duplicate and show two errors
    2. Some Airbnb rules may be redundant/need to be adjusted to a Typescript environment
  • We could adjust the rules ourselves to match Airbnb, but this would re-invent eslint-config-airbnb-typescript's wheel

More information on using eslint for Typescript here: https://github.com/typescript-eslint/typescript-eslint


Usage

In another package's .eslintrc:

{
  "extends": "@tupaia/eslint-config-typescript"
}

No other configuration is required.

If we like this pattern, we can create @tupaia/eslint-config-base, @tupaia/eslint-config-react packages, and use them accordingly (instead of https://github.com/beyondessential/eslint-config-beyondessential ?)

Copy link
Member

@edmofro edmofro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kael89
Copy link
Collaborator Author

kael89 commented Jul 24, 2020

Merging straight to dev as dev-related

@kael89 kael89 merged commit cd5da21 into dev Jul 24, 2020
@kael89 kael89 deleted the add-eslint-config-for-typescript branch July 24, 2020 01:48
avaek added a commit that referenced this pull request Jul 27, 2020
* 528: Import tupaia data surveys (#886)

* Add unique constraint in data_element_data_group
* Associate survey with data source
* Update admin panel

* 679 Add new binary indicator telephone available (#948)

* 679 Add new binary indicator telephone available

* Add popupHeaderFormat key to new map overlay

* Remove unneeded key from new map overlay

* 679 Fix after testing

* Merging dev into feature branch (#1006)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* Add clear error message when a program is missing from DHIS2

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

* 771 Update demoninator codes for flutracking overlays (#940)

* 771 Update demoninator codes for flutracking overlays

* Use different codes for state and lga

* Remove unneeded const

* 771 Fix typo breaking overlay

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

* 829 update conditions check (#1004)

* 829 Update conditions check

* 829 Update tests

* 829 Remove .only

* 829 Make web config server test setup more involved

* Remove unneeded delete

* Revert unneeded changes as id generation is handled

* 829-update-conditions-check test (#1020)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 914: Fix incorrect data shown for Baseline survey responses for UNFPA SRH services matrix (#962)

* 914: use aggregationType in the column config

* 914: moved aggregationType

* 914-unfpa-srh-matrix-wrong-baseline test (#1005)

* 448 Flutracker participants per capita overlay

* 499 add flutracking overlays and change population scale to neutral

* 448 remove logs

* 448 Remove whitespace from measureBuilder title in migration

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* 449 PR feedback

* 449 allow 0 values for tooltip

* flutracking overlay fixes based on testing

* Use 3.5% as max value for fever and cough overlay

* 460 Add non-participant overlays

* 460 Make data regional

* 460 display lga's at country level if measure is active

* 460 Apply suggestions from code review

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* Allow more general tooltips for shaded polygons

* Fix merge conflicts

* 543: added migration to hide unnecessary DL surveys

* 543: removed console.log

* 543: deleted by ids to be safer

* 543: renamed const

* 543: removed incorrect surveys

* Add projects to flutracking overlays

* 581 allow display

* 581 Add period extremes utils

* 581 Remove unneeded util

* 581 Change return type of measureBuilders to match dataBuilders

* 581 Remove deleted functionality from index files

* 581 Add period extremes and update tests

* 581 Connect everything

* 503: Reworked tableOfValuesForOrgUnits to support custom names for rows
- Previously they had to match the indicator name
- Added unit tests

* 503: Added Laos Schools Binary Matrix District Level Dashboard

* 611 Update indicators

* 503 Use new entity aggregation

* 581 return period from more measureBuilders

* 581 Implement design

* 611 make additional changes

* Remove unneeded import

* 581 Fix failing tests

* 503 Pass project code to export call

* 503 also pass project code through the backend

* Merge conflict bugfix

* 631: Added new hand washing func overlay

* 696: Added distance from main road overlay

* 618: Update percentage of schools bar chart in Laos Schools

* 758: fixed a color issue with shaded polygons. Changed the name of dev
     partner support overlay

* merge fixes

* Fix flutracking overlays with entity aggregation

* Remove logs

* add migration

* add migration

* Change id suffix from National to Regional

* Update 20200710081638-AddUNFPARepHealthProdMOSReportToProvinceLevel-modifies-data.js

Update suffix to National

* 679 Add new indicator to report

* 581 Fix non-awaited promise

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 503 Fix regression in cell order

* 894: fixed broken export because of merge conflict

* Build and watch internal dependencies when running a server

* Copy scripts directory to CI/CD docker container

* Fix COPY statement

* Invalidate model schema after schema change

Addressing beyondessential/tupaia-backlog#670

Unfortunately creating event triggers can't be done using a migration, so we will have to
manually apply the commands below during deployment as the superuser, and then ask everyone
to get a fresh clone of the database

```
  CREATE FUNCTION schema_change_notification() RETURNS event_trigger
  LANGUAGE plpgsql
  AS $$
  BEGIN
  PERFORM pg_notify('schema_change', 'schema_change');
  END;
  $$;
  CREATE EVENT TRIGGER schema_change_trigger
  ON "ddl_command_end"
  EXECUTE PROCEDURE schema_change_notification();
```

* Also invalidate fieldNames

* Fix more merge conflicts

* Fix command evaluation

* Update scripts/bash/backendStartDev.sh

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 631: added more value as requirements changed

* Temporarily set tupaia to be superuser when importing a db dump

* Fix merge (and other) bugs in flutracking branch

* Update testDataDump.sql

* 700: Migrate questions to use hook to attach new photo and gps to laos
     schools

* Remove dataElements removed from survey

* Remove extra comma

* Remove reference to population scale

* 631: value changed again, so updating the migration

* Make sure to normalize to percentage for performance scale

* MeasureBuilders now return objects

* Await async function mapMeasureDataToCountries

* Make it clear that function is async

* Add clear error message when a program is missing from DHIS2

Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

* Fix many countries appearing in second access request (#875)

Co-authored-by: Edwin <edmofro@gmail.com>

* [EPIC] PSSS (#462)

* 312 set up ui components package (#334)

* first commit of ui-components package

* Add button stories

* Add semantic ui

* add theme structure

* Update theme and buttons

* Clean up ui components base code

* clean up ui packages code

* update button story

* Add alert component (#342)

* Add alert component

* Refactor alert component

* UI Components Tabs (#352)

* Add tabs component and tabs stories. Add docs and story source storybook addons

* Update Tabs component and add CardTabs component

* move storybook and babel deps to devDeps

* update formatting

* Add custom icons (#371)

* Add custom icons

* Update custom icon styles

* 359 ui components package breadcrumbs (#380)

* Add custom icons

* Update custom icon styles

* Add breadcrumbs component

* update formatting

* Breadcrumbs refactoring

* 335 ui components modal (#381)

* Add modal component and update palette and button styles

* Add eslint and fix lint errors. Update dialog stories

* add useCallback to dialog stories and fix linting errors

* add text field and select inputs (#392)

* add text field and select inputs

* Update select component

* add date picker component (#396)

* UI Components Navbar (#407)

* Add navbar, profile button and home button components

* update tab styles

* Refactor home button to take a source

* Add autocomplete components (#406)

* Add autocomplete components

* remove nav variation of components

* fix eslint

* Update autocomplete component

* fix style

* pass props through autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* fix disabled prop

* fix typo

* fix typo

* 398 ui components button select (#428)

* fix typo

* add button select

* fix typo

* 387 create new psss package (#433)

* Add PSSS package

* add psss to workspaces file

* 388 ui components distribution (#444)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* update build config for production

* added migration~

* create, update and delete endpoints for alerts

* get endpoint for alerts

* started unit tests

* 389 psss routing (#458)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* add useCallback to navbar

* finalised CRUD tests for alerts

* 400 ui components toolbar (#474)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* clean up toolbar

* Update packages/meditrak-server/src/tests/routes/getRecords/alerts.test.js

Co-Authored-By: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* moved alerts tests out of getRecords

* use upsertRecord and clearTestData

* refactored tests, added more helpers

* Update packages/meditrak-server/src/tests/routes/alerts.test.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* remove commented code

* Update packages/meditrak-server/src/tests/testUtilities/database/clearTestData.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* Update packages/meditrak-server/src/tests/testUtilities/database/generateDummyRecord.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* updated columns to use timestamp with timezone

* removed after function

* Add layout component (#479)

* Add header component (#502)

* Add header component

* update prop types

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* add ui-components to getInternalDependencies.sh

* started api layer

* testing

* update docker file

* update get internal dependencies file

* add test script stub

* hot fix add missing icons to ui components

* move ui-components stories directory out of src

* Revert "started api layer"

This reverts commit d73e8af.

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* basic preliminary redux implementation

* add login view

* add private route

* Add redux for psss (#553)

Added a basic redux implementation following tamanu repo's way.
Included an example component tied to an example reducer.

* add auth to redux store and update login form to use store state

* Data Fetching Table Component (#509)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* remove psss changes

* refactor data fetching table component and stories

* clean up tables

* Update names in table and table row

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* continue api integration

* 492 data fetching tables psss (#543)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* add placeholder comments

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* update test data

* 506 ui components bar meter (#545)

* add bar meter

* 507 ui components circle meter (#546)

* add circle meter

* re-factor circle meter api

* add checkboxes (#594)

* update test data

* style tweaks

* Dump test data using 12.2

* psss api layer (#540)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* updated testDataDump

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

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* 401 ui components card (#547)

* add bar meter

* add circle meter

* Add card component

* update card component

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* PSSS Alert Comments endpoint (#494)

tupaia-backlog#385

DB migrations (comment, alert_comment)
Alert Comment endpoint
CRUD operations
Unit tests for the CRUD operations

* 420 update form styles (#600)

* update form styles

* update alert

* update px to rems

* update profile button

* remove old auth folder

* put back auth folder

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* 420 psss auth gateway (#551)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* update placeholder text

* psss drawer component (#674)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* update placeholder text

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* 552 psss ui alert comments (#654)

* started the user message component, familiarised myself with story book

* tweaked more details of the component

* continued work on the UserMessage component. Cards render and stubs for the actions were created

* finalise component, edit/delete supported, actions delegated to handler functions

* updated message prop

* final refactoring

* replace moment with date-fns

* moved ActionsMenu to its own component, use options as array

* moved styles into components

* updated format string

* added ActionsMenu story

* moved UserMessage to single file

* fix bad merge

* UI Components Editable Table Component (#668)

* add editable table component

* Update editable table stories

* clean up editable table component

* add memos

* combine expandable tableBody and tableBody

* Refactor expandable table row

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data-api to get internal dependencies

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* add data-api to get internal dependencies

* Resolve merge conflicts

* Update yarn.lock

* Update testDataDump.sql

* Use `upsertDummyRecord` from db

* Fix soft conflicts

* Fix final soft conflict

* refactor table styles

* add table styles and table loader styles (#699)

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data-api to get internal dependencies

* refactor table styles

* 589 weekly reports state management (#703)

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* 625 first psss unit test (#718)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* update tests

* refactor tests

* refactor test set up

* Update packages/psss/README.md

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 589 weekly reports panel data editing (#720)

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update naming in weekly reports

* remove a link from indicators table template

* rename verifiable table to country report table

* rename indicators table to syndromes table

* rename indicators to syndromes

* rename table state to table status

* rename syndrome table to site report table

* fix some regressions

* editable table fixes

* fix clone of state

* code clean up

* move initialisation of editable table form state

* replace table row data and index with rowData

* add useCallbacks to table components

* fix regressions

* fix useCallback bug

* add react memo to custom table components

* add country flags (#758)

* add country flags and refactor constants

* increase yarn timeout

* 632 weekly reports integration test (#757)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* 626 psss first end to end test (#729)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view (#765)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view

* tidy up alerts styles

* add more descriptive names to styled components

* add outbreaks view & table (#770)

* add out breaks view

* update alerts table

* add archive view & table (#774)

* add out breaks view

* update alerts table

* add archive table

* add tooltips (#777)

* Refactor psss directories (#783)

* add fancy autocomplete

* add async autocomple component

* update header components

* delete list and menu

* update autocomplete

* Add autocomplete components

* update navbar

* update header

* update autocomplet components

* remove nav variation of components

* fix eslint

* update nav select component

* Update autocomplete component

* fix style

* update button select

* pass props through autocomplete

* update autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* wip

* fix disabled prop

* update ButtonSelect

* fix typo

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Add routes to psss

* tidy up psss and remove circular deps

* Clean up place holder layouts

* update browser list config

* Update toolbar

* update routes

* Refactor routes

* update tool bar

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* tweak button

* add drawer

* wip

* Add layout components

* fix typo

* Update header

* update cards

* add circlemeter

* wip data tables

* add nested table

* Style header

* fix merge from table branch

* update meter components

* fix typo

* update cards

* add a dummy login form

* add dummy auth flow

* remove redundant event based country view

* update textfield styles

* update form inputs

* update form fields

* update login screen

* update auth

* clean up wip branch

* update profile button

* update alerts

* update px to rems

* update to latest

* refactor table rows

* wip add tables types to psss

* wip update cards

* wip update drawer styles

* wip

* add address component

* update drawer styles

* wip update editable table

* update editable table

* add table state validation

* update table body

* add controllable table row

* add editable table to ui components

* add controlled expandable table

* add customisable table row expansion container

* add verified button

* add editable table to weekly report pane

* add verifying to editable tables

* add todos

* add verifiable table

* verifiable table refactor

* editable table working

* verifiable table working

* add editable table component

* update editable table

* Update editable table stories

* clean up editable table component

* add memos

* fix merge

* move drawer to psss

* add drawer header content component

* update button select and fake data

* start refactor

* clean up

* tables edit working

* add country weeks to store

* refactor country weeks store

* update connected tables

* fix bad merge

* update tables state

* rename weekly reports state

* refactor weekly reports panel

* add store data to weekly reports panel

* refactor data structure

* add country week data to weekly reports panel

* updating to store from side panel

* connect indicators table to store

* add default expanded to expandable table body

* control row opening

* clearn up

* combine expandable tableBody and tableBody

* refactor styled table components

* add editable table loader

* add table loader

* Refactor expandable table row

* update to match new tables api

* update table styles

* fix table editing bugs

* add loading states

* calculated expandable table rows

* update expandable table

* make expandable row optionally controlled

* update expandable table body

* sync with latest changes

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* add panel to store

* add active id to panel

* refactor active week

* refactor verified data management

* remove metadata from editabletable

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* sync with psss branch

* add weekly reports integration test

* update active week selectors

* add country flags

* add country flags and add constants

* increase yarn timeout to handle material ui icons

* add alerts tab view and alerts table

* remove alert reports view file

* style alerts view

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* alerts table styles

* add outbreaks view

* add archive view

* add tooltip component

* add tooltips to psss

* rename weekly report panel to weekly reports panel

* add alerts panel

* weekly reports panel

* fix alerts store

* refactor component directories

* remove wip changes

* remove wip changes

* move constants into tables directory

* fix merge errors

* update yarn lock

* re-install yarn deps

* add use fetch data hook (#849)

* 724 refactor drawer component (#828)

* split drawer component into multiple files

* move integration tests to containers folder

* fix drawer and webpack

* upgrade yarn deps

* merge in psss

* re-install yarn deps

* tidy up style formatting

* 724 add psss alerts panel (#850)

* add drop down menu component

* tweak menu styles

* style tweaks

* add custom cell components

* add alerts panel and fetch hook

* add use memos

* PR suggestions

* tidy up cell components

* psss DropdownMenu component (#829)

* add drop down menu component

* tweak menu styles

* style tweaks

* add use call backs and fix default value bug

* Update testDataDump.sql

* Delete alerts before data sources

* User Message components (#867)

* add UserMessage components

* style tweaks

* add date format constants

* 724 psss affected sites tab (#869)

* add alerts outbreaks card

* update table header

* update color constants

* fix bugs

* style tweaks

* style tweak

* refactor affected sites tab

* refactor alerts outbreaks card

* refactor Fetch Loader

* formatting and style tweaks

* Add activity tab content (#880)

* Add activity tab content

* update alerts panel state

* rename note link to notes tab link

* tidy up formatting

* Add Notes Tab (#879)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* 725 psss outbreaks panel (#889)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* reformat tests

* add react hook forms (#898)

* add react hook forms

* commit package json

* 641 submit weekly report (#896)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* Add is alert status to fake api

* update modal styles to match designs

* Add alert created modal on submit

* fix tests

* update modal styes

* tidy up formatting

* 725 psss outbreak confirmed modal (#919)

* add create outbreak modal

* update date picker

* remove console log

* refactor for PR suggestions

* add multi select component (#926)

* Add Export Modals (#932)

* Add Export Modals

* add documentation

* update lock file

* add toast and refactor alerts (#938)

* fix tests

* remove debug code

* update test data

* update test data

* Add deployment process for psss

* Add psss to nginx config

* Update test data dump

* add fixes

* add fixes (#977)

* change text to sites reported

* 942 ui components tests setup (#975)

* add test setup to ui components

* update tests setup

* clean up formatting

* add yarn lock file

* 942 ui components first tests (#976)

* add test setup to ui components

* update tests setup

* clean up formatting

* add tests

* remove debug

* update toasts test

* update async test

* fix tests

* remove watwg-fetch from test

* Reinstate alert and comment as gettable types

* Reinstate Andres' work for alert comments

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>

* turn off psss deployment in ci (#1010)

* Allow creating user entity permissions (#1014)

Co-authored-by: Edwin <edmofro@gmail.com>

* Migration to update basline data max date (#983)

Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>

* Synchronise images at the same time as the survey response (#1000)

* Synchronise images at the same time as the survey response

* Allow testing on dev

* Correctly invalidate the alternative hierarchy cache

Co-authored-by: Edwin <edmofro@gmail.com>

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

* Add eslint config for typescript as a package (#1030)

* Define jest at monorepo root (#1034)

* Use jest plugin in typescript eslint config (#1036)

* change unfpa project dashboard permission group (#1037)

Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Alastair <lockealastair@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>
avaek added a commit that referenced this pull request Jul 27, 2020
* 528: Import tupaia data surveys (#886)

* Add unique constraint in data_element_data_group
* Associate survey with data source
* Update admin panel

* 679 Add new binary indicator telephone available (#948)

* 679 Add new binary indicator telephone available

* Add popupHeaderFormat key to new map overlay

* Remove unneeded key from new map overlay

* 679 Fix after testing

* Merging dev into feature branch (#1006)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* Add clear error message when a program is missing from DHIS2

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

* 771 Update demoninator codes for flutracking overlays (#940)

* 771 Update demoninator codes for flutracking overlays

* Use different codes for state and lga

* Remove unneeded const

* 771 Fix typo breaking overlay

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

* 829 update conditions check (#1004)

* 829 Update conditions check

* 829 Update tests

* 829 Remove .only

* 829 Make web config server test setup more involved

* Remove unneeded delete

* Revert unneeded changes as id generation is handled

* 829-update-conditions-check test (#1020)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 914: Fix incorrect data shown for Baseline survey responses for UNFPA SRH services matrix (#962)

* 914: use aggregationType in the column config

* 914: moved aggregationType

* 914-unfpa-srh-matrix-wrong-baseline test (#1005)

* 448 Flutracker participants per capita overlay

* 499 add flutracking overlays and change population scale to neutral

* 448 remove logs

* 448 Remove whitespace from measureBuilder title in migration

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* 449 PR feedback

* 449 allow 0 values for tooltip

* flutracking overlay fixes based on testing

* Use 3.5% as max value for fever and cough overlay

* 460 Add non-participant overlays

* 460 Make data regional

* 460 display lga's at country level if measure is active

* 460 Apply suggestions from code review

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* Allow more general tooltips for shaded polygons

* Fix merge conflicts

* 543: added migration to hide unnecessary DL surveys

* 543: removed console.log

* 543: deleted by ids to be safer

* 543: renamed const

* 543: removed incorrect surveys

* Add projects to flutracking overlays

* 581 allow display

* 581 Add period extremes utils

* 581 Remove unneeded util

* 581 Change return type of measureBuilders to match dataBuilders

* 581 Remove deleted functionality from index files

* 581 Add period extremes and update tests

* 581 Connect everything

* 503: Reworked tableOfValuesForOrgUnits to support custom names for rows
- Previously they had to match the indicator name
- Added unit tests

* 503: Added Laos Schools Binary Matrix District Level Dashboard

* 611 Update indicators

* 503 Use new entity aggregation

* 581 return period from more measureBuilders

* 581 Implement design

* 611 make additional changes

* Remove unneeded import

* 581 Fix failing tests

* 503 Pass project code to export call

* 503 also pass project code through the backend

* Merge conflict bugfix

* 631: Added new hand washing func overlay

* 696: Added distance from main road overlay

* 618: Update percentage of schools bar chart in Laos Schools

* 758: fixed a color issue with shaded polygons. Changed the name of dev
     partner support overlay

* merge fixes

* Fix flutracking overlays with entity aggregation

* Remove logs

* add migration

* add migration

* Change id suffix from National to Regional

* Update 20200710081638-AddUNFPARepHealthProdMOSReportToProvinceLevel-modifies-data.js

Update suffix to National

* 679 Add new indicator to report

* 581 Fix non-awaited promise

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 503 Fix regression in cell order

* 894: fixed broken export because of merge conflict

* Build and watch internal dependencies when running a server

* Copy scripts directory to CI/CD docker container

* Fix COPY statement

* Invalidate model schema after schema change

Addressing beyondessential/tupaia-backlog#670

Unfortunately creating event triggers can't be done using a migration, so we will have to
manually apply the commands below during deployment as the superuser, and then ask everyone
to get a fresh clone of the database

```
  CREATE FUNCTION schema_change_notification() RETURNS event_trigger
  LANGUAGE plpgsql
  AS $$
  BEGIN
  PERFORM pg_notify('schema_change', 'schema_change');
  END;
  $$;
  CREATE EVENT TRIGGER schema_change_trigger
  ON "ddl_command_end"
  EXECUTE PROCEDURE schema_change_notification();
```

* Also invalidate fieldNames

* Fix more merge conflicts

* Fix command evaluation

* Update scripts/bash/backendStartDev.sh

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 631: added more value as requirements changed

* Temporarily set tupaia to be superuser when importing a db dump

* Fix merge (and other) bugs in flutracking branch

* Update testDataDump.sql

* 700: Migrate questions to use hook to attach new photo and gps to laos
     schools

* Remove dataElements removed from survey

* Remove extra comma

* Remove reference to population scale

* 631: value changed again, so updating the migration

* Make sure to normalize to percentage for performance scale

* MeasureBuilders now return objects

* Await async function mapMeasureDataToCountries

* Make it clear that function is async

* Add clear error message when a program is missing from DHIS2

Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

* Fix many countries appearing in second access request (#875)

Co-authored-by: Edwin <edmofro@gmail.com>

* [EPIC] PSSS (#462)

* 312 set up ui components package (#334)

* first commit of ui-components package

* Add button stories

* Add semantic ui

* add theme structure

* Update theme and buttons

* Clean up ui components base code

* clean up ui packages code

* update button story

* Add alert component (#342)

* Add alert component

* Refactor alert component

* UI Components Tabs (#352)

* Add tabs component and tabs stories. Add docs and story source storybook addons

* Update Tabs component and add CardTabs component

* move storybook and babel deps to devDeps

* update formatting

* Add custom icons (#371)

* Add custom icons

* Update custom icon styles

* 359 ui components package breadcrumbs (#380)

* Add custom icons

* Update custom icon styles

* Add breadcrumbs component

* update formatting

* Breadcrumbs refactoring

* 335 ui components modal (#381)

* Add modal component and update palette and button styles

* Add eslint and fix lint errors. Update dialog stories

* add useCallback to dialog stories and fix linting errors

* add text field and select inputs (#392)

* add text field and select inputs

* Update select component

* add date picker component (#396)

* UI Components Navbar (#407)

* Add navbar, profile button and home button components

* update tab styles

* Refactor home button to take a source

* Add autocomplete components (#406)

* Add autocomplete components

* remove nav variation of components

* fix eslint

* Update autocomplete component

* fix style

* pass props through autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* fix disabled prop

* fix typo

* fix typo

* 398 ui components button select (#428)

* fix typo

* add button select

* fix typo

* 387 create new psss package (#433)

* Add PSSS package

* add psss to workspaces file

* 388 ui components distribution (#444)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* update build config for production

* added migration~

* create, update and delete endpoints for alerts

* get endpoint for alerts

* started unit tests

* 389 psss routing (#458)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* add useCallback to navbar

* finalised CRUD tests for alerts

* 400 ui components toolbar (#474)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* clean up toolbar

* Update packages/meditrak-server/src/tests/routes/getRecords/alerts.test.js

Co-Authored-By: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* moved alerts tests out of getRecords

* use upsertRecord and clearTestData

* refactored tests, added more helpers

* Update packages/meditrak-server/src/tests/routes/alerts.test.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* remove commented code

* Update packages/meditrak-server/src/tests/testUtilities/database/clearTestData.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* Update packages/meditrak-server/src/tests/testUtilities/database/generateDummyRecord.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* updated columns to use timestamp with timezone

* removed after function

* Add layout component (#479)

* Add header component (#502)

* Add header component

* update prop types

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* add ui-components to getInternalDependencies.sh

* started api layer

* testing

* update docker file

* update get internal dependencies file

* add test script stub

* hot fix add missing icons to ui components

* move ui-components stories directory out of src

* Revert "started api layer"

This reverts commit d73e8af.

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* basic preliminary redux implementation

* add login view

* add private route

* Add redux for psss (#553)

Added a basic redux implementation following tamanu repo's way.
Included an example component tied to an example reducer.

* add auth to redux store and update login form to use store state

* Data Fetching Table Component (#509)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* remove psss changes

* refactor data fetching table component and stories

* clean up tables

* Update names in table and table row

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* continue api integration

* 492 data fetching tables psss (#543)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* add placeholder comments

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* update test data

* 506 ui components bar meter (#545)

* add bar meter

* 507 ui components circle meter (#546)

* add circle meter

* re-factor circle meter api

* add checkboxes (#594)

* update test data

* style tweaks

* Dump test data using 12.2

* psss api layer (#540)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* updated testDataDump

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

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* 401 ui components card (#547)

* add bar meter

* add circle meter

* Add card component

* update card component

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* PSSS Alert Comments endpoint (#494)

tupaia-backlog#385

DB migrations (comment, alert_comment)
Alert Comment endpoint
CRUD operations
Unit tests for the CRUD operations

* 420 update form styles (#600)

* update form styles

* update alert

* update px to rems

* update profile button

* remove old auth folder

* put back auth folder

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* 420 psss auth gateway (#551)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* update placeholder text

* psss drawer component (#674)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* update placeholder text

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* 552 psss ui alert comments (#654)

* started the user message component, familiarised myself with story book

* tweaked more details of the component

* continued work on the UserMessage component. Cards render and stubs for the actions were created

* finalise component, edit/delete supported, actions delegated to handler functions

* updated message prop

* final refactoring

* replace moment with date-fns

* moved ActionsMenu to its own component, use options as array

* moved styles into components

* updated format string

* added ActionsMenu story

* moved UserMessage to single file

* fix bad merge

* UI Components Editable Table Component (#668)

* add editable table component

* Update editable table stories

* clean up editable table component

* add memos

* combine expandable tableBody and tableBody

* Refactor expandable table row

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data-api to get internal dependencies

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* add data-api to get internal dependencies

* Resolve merge conflicts

* Update yarn.lock

* Update testDataDump.sql

* Use `upsertDummyRecord` from db

* Fix soft conflicts

* Fix final soft conflict

* refactor table styles

* add table styles and table loader styles (#699)

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data-api to get internal dependencies

* refactor table styles

* 589 weekly reports state management (#703)

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* 625 first psss unit test (#718)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* update tests

* refactor tests

* refactor test set up

* Update packages/psss/README.md

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 589 weekly reports panel data editing (#720)

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update naming in weekly reports

* remove a link from indicators table template

* rename verifiable table to country report table

* rename indicators table to syndromes table

* rename indicators to syndromes

* rename table state to table status

* rename syndrome table to site report table

* fix some regressions

* editable table fixes

* fix clone of state

* code clean up

* move initialisation of editable table form state

* replace table row data and index with rowData

* add useCallbacks to table components

* fix regressions

* fix useCallback bug

* add react memo to custom table components

* add country flags (#758)

* add country flags and refactor constants

* increase yarn timeout

* 632 weekly reports integration test (#757)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* 626 psss first end to end test (#729)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view (#765)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view

* tidy up alerts styles

* add more descriptive names to styled components

* add outbreaks view & table (#770)

* add out breaks view

* update alerts table

* add archive view & table (#774)

* add out breaks view

* update alerts table

* add archive table

* add tooltips (#777)

* Refactor psss directories (#783)

* add fancy autocomplete

* add async autocomple component

* update header components

* delete list and menu

* update autocomplete

* Add autocomplete components

* update navbar

* update header

* update autocomplet components

* remove nav variation of components

* fix eslint

* update nav select component

* Update autocomplete component

* fix style

* update button select

* pass props through autocomplete

* update autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* wip

* fix disabled prop

* update ButtonSelect

* fix typo

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Add routes to psss

* tidy up psss and remove circular deps

* Clean up place holder layouts

* update browser list config

* Update toolbar

* update routes

* Refactor routes

* update tool bar

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* tweak button

* add drawer

* wip

* Add layout components

* fix typo

* Update header

* update cards

* add circlemeter

* wip data tables

* add nested table

* Style header

* fix merge from table branch

* update meter components

* fix typo

* update cards

* add a dummy login form

* add dummy auth flow

* remove redundant event based country view

* update textfield styles

* update form inputs

* update form fields

* update login screen

* update auth

* clean up wip branch

* update profile button

* update alerts

* update px to rems

* update to latest

* refactor table rows

* wip add tables types to psss

* wip update cards

* wip update drawer styles

* wip

* add address component

* update drawer styles

* wip update editable table

* update editable table

* add table state validation

* update table body

* add controllable table row

* add editable table to ui components

* add controlled expandable table

* add customisable table row expansion container

* add verified button

* add editable table to weekly report pane

* add verifying to editable tables

* add todos

* add verifiable table

* verifiable table refactor

* editable table working

* verifiable table working

* add editable table component

* update editable table

* Update editable table stories

* clean up editable table component

* add memos

* fix merge

* move drawer to psss

* add drawer header content component

* update button select and fake data

* start refactor

* clean up

* tables edit working

* add country weeks to store

* refactor country weeks store

* update connected tables

* fix bad merge

* update tables state

* rename weekly reports state

* refactor weekly reports panel

* add store data to weekly reports panel

* refactor data structure

* add country week data to weekly reports panel

* updating to store from side panel

* connect indicators table to store

* add default expanded to expandable table body

* control row opening

* clearn up

* combine expandable tableBody and tableBody

* refactor styled table components

* add editable table loader

* add table loader

* Refactor expandable table row

* update to match new tables api

* update table styles

* fix table editing bugs

* add loading states

* calculated expandable table rows

* update expandable table

* make expandable row optionally controlled

* update expandable table body

* sync with latest changes

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* add panel to store

* add active id to panel

* refactor active week

* refactor verified data management

* remove metadata from editabletable

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* sync with psss branch

* add weekly reports integration test

* update active week selectors

* add country flags

* add country flags and add constants

* increase yarn timeout to handle material ui icons

* add alerts tab view and alerts table

* remove alert reports view file

* style alerts view

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* alerts table styles

* add outbreaks view

* add archive view

* add tooltip component

* add tooltips to psss

* rename weekly report panel to weekly reports panel

* add alerts panel

* weekly reports panel

* fix alerts store

* refactor component directories

* remove wip changes

* remove wip changes

* move constants into tables directory

* fix merge errors

* update yarn lock

* re-install yarn deps

* add use fetch data hook (#849)

* 724 refactor drawer component (#828)

* split drawer component into multiple files

* move integration tests to containers folder

* fix drawer and webpack

* upgrade yarn deps

* merge in psss

* re-install yarn deps

* tidy up style formatting

* 724 add psss alerts panel (#850)

* add drop down menu component

* tweak menu styles

* style tweaks

* add custom cell components

* add alerts panel and fetch hook

* add use memos

* PR suggestions

* tidy up cell components

* psss DropdownMenu component (#829)

* add drop down menu component

* tweak menu styles

* style tweaks

* add use call backs and fix default value bug

* Update testDataDump.sql

* Delete alerts before data sources

* User Message components (#867)

* add UserMessage components

* style tweaks

* add date format constants

* 724 psss affected sites tab (#869)

* add alerts outbreaks card

* update table header

* update color constants

* fix bugs

* style tweaks

* style tweak

* refactor affected sites tab

* refactor alerts outbreaks card

* refactor Fetch Loader

* formatting and style tweaks

* Add activity tab content (#880)

* Add activity tab content

* update alerts panel state

* rename note link to notes tab link

* tidy up formatting

* Add Notes Tab (#879)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* 725 psss outbreaks panel (#889)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* reformat tests

* add react hook forms (#898)

* add react hook forms

* commit package json

* 641 submit weekly report (#896)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* Add is alert status to fake api

* update modal styles to match designs

* Add alert created modal on submit

* fix tests

* update modal styes

* tidy up formatting

* 725 psss outbreak confirmed modal (#919)

* add create outbreak modal

* update date picker

* remove console log

* refactor for PR suggestions

* add multi select component (#926)

* Add Export Modals (#932)

* Add Export Modals

* add documentation

* update lock file

* add toast and refactor alerts (#938)

* fix tests

* remove debug code

* update test data

* update test data

* Add deployment process for psss

* Add psss to nginx config

* Update test data dump

* add fixes

* add fixes (#977)

* change text to sites reported

* 942 ui components tests setup (#975)

* add test setup to ui components

* update tests setup

* clean up formatting

* add yarn lock file

* 942 ui components first tests (#976)

* add test setup to ui components

* update tests setup

* clean up formatting

* add tests

* remove debug

* update toasts test

* update async test

* fix tests

* remove watwg-fetch from test

* Reinstate alert and comment as gettable types

* Reinstate Andres' work for alert comments

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>

* turn off psss deployment in ci (#1010)

* Allow creating user entity permissions (#1014)

Co-authored-by: Edwin <edmofro@gmail.com>

* Migration to update basline data max date (#983)

Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>

* Synchronise images at the same time as the survey response (#1000)

* Synchronise images at the same time as the survey response

* Allow testing on dev

* Correctly invalidate the alternative hierarchy cache

Co-authored-by: Edwin <edmofro@gmail.com>

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

* Add eslint config for typescript as a package (#1030)

* Define jest at monorepo root (#1034)

* Use jest plugin in typescript eslint config (#1036)

* change unfpa project dashboard permission group (#1037)

Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Alastair <lockealastair@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>
bgoepfert added a commit that referenced this pull request Jul 28, 2020
* 1166: Added % of facilities operational project level dashboards for UNFPA project
- Required making a few changes in aggregator and adding another composite databuilder

* 1166: Consolidated entity aggregation functions into one file
- Added display data for UNFPA charts

* 1166: Added display changes to show fraction with percentage for UNFPA charts

* 1166: Changed chartConfig and databuilder to only display orgUnits that have data for them

* 1166: Re-added yaxis scale

* 1166: Performance improvement on orgUnit name lookup

* merge latest dev into feature branch (#1039)

* 528: Import tupaia data surveys (#886)

* Add unique constraint in data_element_data_group
* Associate survey with data source
* Update admin panel

* 679 Add new binary indicator telephone available (#948)

* 679 Add new binary indicator telephone available

* Add popupHeaderFormat key to new map overlay

* Remove unneeded key from new map overlay

* 679 Fix after testing

* Merging dev into feature branch (#1006)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* Add clear error message when a program is missing from DHIS2

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

* 771 Update demoninator codes for flutracking overlays (#940)

* 771 Update demoninator codes for flutracking overlays

* Use different codes for state and lga

* Remove unneeded const

* 771 Fix typo breaking overlay

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

* 829 update conditions check (#1004)

* 829 Update conditions check

* 829 Update tests

* 829 Remove .only

* 829 Make web config server test setup more involved

* Remove unneeded delete

* Revert unneeded changes as id generation is handled

* 829-update-conditions-check test (#1020)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 914: Fix incorrect data shown for Baseline survey responses for UNFPA SRH services matrix (#962)

* 914: use aggregationType in the column config

* 914: moved aggregationType

* 914-unfpa-srh-matrix-wrong-baseline test (#1005)

* 448 Flutracker participants per capita overlay

* 499 add flutracking overlays and change population scale to neutral

* 448 remove logs

* 448 Remove whitespace from measureBuilder title in migration

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* 449 PR feedback

* 449 allow 0 values for tooltip

* flutracking overlay fixes based on testing

* Use 3.5% as max value for fever and cough overlay

* 460 Add non-participant overlays

* 460 Make data regional

* 460 display lga's at country level if measure is active

* 460 Apply suggestions from code review

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* Allow more general tooltips for shaded polygons

* Fix merge conflicts

* 543: added migration to hide unnecessary DL surveys

* 543: removed console.log

* 543: deleted by ids to be safer

* 543: renamed const

* 543: removed incorrect surveys

* Add projects to flutracking overlays

* 581 allow display

* 581 Add period extremes utils

* 581 Remove unneeded util

* 581 Change return type of measureBuilders to match dataBuilders

* 581 Remove deleted functionality from index files

* 581 Add period extremes and update tests

* 581 Connect everything

* 503: Reworked tableOfValuesForOrgUnits to support custom names for rows
- Previously they had to match the indicator name
- Added unit tests

* 503: Added Laos Schools Binary Matrix District Level Dashboard

* 611 Update indicators

* 503 Use new entity aggregation

* 581 return period from more measureBuilders

* 581 Implement design

* 611 make additional changes

* Remove unneeded import

* 581 Fix failing tests

* 503 Pass project code to export call

* 503 also pass project code through the backend

* Merge conflict bugfix

* 631: Added new hand washing func overlay

* 696: Added distance from main road overlay

* 618: Update percentage of schools bar chart in Laos Schools

* 758: fixed a color issue with shaded polygons. Changed the name of dev
     partner support overlay

* merge fixes

* Fix flutracking overlays with entity aggregation

* Remove logs

* add migration

* add migration

* Change id suffix from National to Regional

* Update 20200710081638-AddUNFPARepHealthProdMOSReportToProvinceLevel-modifies-data.js

Update suffix to National

* 679 Add new indicator to report

* 581 Fix non-awaited promise

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 503 Fix regression in cell order

* 894: fixed broken export because of merge conflict

* Build and watch internal dependencies when running a server

* Copy scripts directory to CI/CD docker container

* Fix COPY statement

* Invalidate model schema after schema change

Addressing beyondessential/tupaia-backlog#670

Unfortunately creating event triggers can't be done using a migration, so we will have to
manually apply the commands below during deployment as the superuser, and then ask everyone
to get a fresh clone of the database

```
  CREATE FUNCTION schema_change_notification() RETURNS event_trigger
  LANGUAGE plpgsql
  AS $$
  BEGIN
  PERFORM pg_notify('schema_change', 'schema_change');
  END;
  $$;
  CREATE EVENT TRIGGER schema_change_trigger
  ON "ddl_command_end"
  EXECUTE PROCEDURE schema_change_notification();
```

* Also invalidate fieldNames

* Fix more merge conflicts

* Fix command evaluation

* Update scripts/bash/backendStartDev.sh

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 631: added more value as requirements changed

* Temporarily set tupaia to be superuser when importing a db dump

* Fix merge (and other) bugs in flutracking branch

* Update testDataDump.sql

* 700: Migrate questions to use hook to attach new photo and gps to laos
     schools

* Remove dataElements removed from survey

* Remove extra comma

* Remove reference to population scale

* 631: value changed again, so updating the migration

* Make sure to normalize to percentage for performance scale

* MeasureBuilders now return objects

* Await async function mapMeasureDataToCountries

* Make it clear that function is async

* Add clear error message when a program is missing from DHIS2

Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

* Fix many countries appearing in second access request (#875)

Co-authored-by: Edwin <edmofro@gmail.com>

* [EPIC] PSSS (#462)

* 312 set up ui components package (#334)

* first commit of ui-components package

* Add button stories

* Add semantic ui

* add theme structure

* Update theme and buttons

* Clean up ui components base code

* clean up ui packages code

* update button story

* Add alert component (#342)

* Add alert component

* Refactor alert component

* UI Components Tabs (#352)

* Add tabs component and tabs stories. Add docs and story source storybook addons

* Update Tabs component and add CardTabs component

* move storybook and babel deps to devDeps

* update formatting

* Add custom icons (#371)

* Add custom icons

* Update custom icon styles

* 359 ui components package breadcrumbs (#380)

* Add custom icons

* Update custom icon styles

* Add breadcrumbs component

* update formatting

* Breadcrumbs refactoring

* 335 ui components modal (#381)

* Add modal component and update palette and button styles

* Add eslint and fix lint errors. Update dialog stories

* add useCallback to dialog stories and fix linting errors

* add text field and select inputs (#392)

* add text field and select inputs

* Update select component

* add date picker component (#396)

* UI Components Navbar (#407)

* Add navbar, profile button and home button components

* update tab styles

* Refactor home button to take a source

* Add autocomplete components (#406)

* Add autocomplete components

* remove nav variation of components

* fix eslint

* Update autocomplete component

* fix style

* pass props through autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* fix disabled prop

* fix typo

* fix typo

* 398 ui components button select (#428)

* fix typo

* add button select

* fix typo

* 387 create new psss package (#433)

* Add PSSS package

* add psss to workspaces file

* 388 ui components distribution (#444)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* update build config for production

* added migration~

* create, update and delete endpoints for alerts

* get endpoint for alerts

* started unit tests

* 389 psss routing (#458)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* add useCallback to navbar

* finalised CRUD tests for alerts

* 400 ui components toolbar (#474)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* clean up toolbar

* Update packages/meditrak-server/src/tests/routes/getRecords/alerts.test.js

Co-Authored-By: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* moved alerts tests out of getRecords

* use upsertRecord and clearTestData

* refactored tests, added more helpers

* Update packages/meditrak-server/src/tests/routes/alerts.test.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* remove commented code

* Update packages/meditrak-server/src/tests/testUtilities/database/clearTestData.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* Update packages/meditrak-server/src/tests/testUtilities/database/generateDummyRecord.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* updated columns to use timestamp with timezone

* removed after function

* Add layout component (#479)

* Add header component (#502)

* Add header component

* update prop types

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* add ui-components to getInternalDependencies.sh

* started api layer

* testing

* update docker file

* update get internal dependencies file

* add test script stub

* hot fix add missing icons to ui components

* move ui-components stories directory out of src

* Revert "started api layer"

This reverts commit d73e8af.

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* basic preliminary redux implementation

* add login view

* add private route

* Add redux for psss (#553)

Added a basic redux implementation following tamanu repo's way.
Included an example component tied to an example reducer.

* add auth to redux store and update login form to use store state

* Data Fetching Table Component (#509)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* remove psss changes

* refactor data fetching table component and stories

* clean up tables

* Update names in table and table row

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* continue api integration

* 492 data fetching tables psss (#543)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* add placeholder comments

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* update test data

* 506 ui components bar meter (#545)

* add bar meter

* 507 ui components circle meter (#546)

* add circle meter

* re-factor circle meter api

* add checkboxes (#594)

* update test data

* style tweaks

* Dump test data using 12.2

* psss api layer (#540)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* updated testDataDump

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

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* 401 ui components card (#547)

* add bar meter

* add circle meter

* Add card component

* update card component

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* PSSS Alert Comments endpoint (#494)

tupaia-backlog#385

DB migrations (comment, alert_comment)
Alert Comment endpoint
CRUD operations
Unit tests for the CRUD operations

* 420 update form styles (#600)

* update form styles

* update alert

* update px to rems

* update profile button

* remove old auth folder

* put back auth folder

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* 420 psss auth gateway (#551)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* update placeholder text

* psss drawer component (#674)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* update placeholder text

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* 552 psss ui alert comments (#654)

* started the user message component, familiarised myself with story book

* tweaked more details of the component

* continued work on the UserMessage component. Cards render and stubs for the actions were created

* finalise component, edit/delete supported, actions delegated to handler functions

* updated message prop

* final refactoring

* replace moment with date-fns

* moved ActionsMenu to its own component, use options as array

* moved styles into components

* updated format string

* added ActionsMenu story

* moved UserMessage to single file

* fix bad merge

* UI Components Editable Table Component (#668)

* add editable table component

* Update editable table stories

* clean up editable table component

* add memos

* combine expandable tableBody and tableBody

* Refactor expandable table row

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data-api to get internal dependencies

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* add data-api to get internal dependencies

* Resolve merge conflicts

* Update yarn.lock

* Update testDataDump.sql

* Use `upsertDummyRecord` from db

* Fix soft conflicts

* Fix final soft conflict

* refactor table styles

* add table styles and table loader styles (#699)

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data-api to get internal dependencies

* refactor table styles

* 589 weekly reports state management (#703)

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* 625 first psss unit test (#718)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* update tests

* refactor tests

* refactor test set up

* Update packages/psss/README.md

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 589 weekly reports panel data editing (#720)

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update naming in weekly reports

* remove a link from indicators table template

* rename verifiable table to country report table

* rename indicators table to syndromes table

* rename indicators to syndromes

* rename table state to table status

* rename syndrome table to site report table

* fix some regressions

* editable table fixes

* fix clone of state

* code clean up

* move initialisation of editable table form state

* replace table row data and index with rowData

* add useCallbacks to table components

* fix regressions

* fix useCallback bug

* add react memo to custom table components

* add country flags (#758)

* add country flags and refactor constants

* increase yarn timeout

* 632 weekly reports integration test (#757)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* 626 psss first end to end test (#729)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view (#765)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view

* tidy up alerts styles

* add more descriptive names to styled components

* add outbreaks view & table (#770)

* add out breaks view

* update alerts table

* add archive view & table (#774)

* add out breaks view

* update alerts table

* add archive table

* add tooltips (#777)

* Refactor psss directories (#783)

* add fancy autocomplete

* add async autocomple component

* update header components

* delete list and menu

* update autocomplete

* Add autocomplete components

* update navbar

* update header

* update autocomplet components

* remove nav variation of components

* fix eslint

* update nav select component

* Update autocomplete component

* fix style

* update button select

* pass props through autocomplete

* update autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* wip

* fix disabled prop

* update ButtonSelect

* fix typo

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Add routes to psss

* tidy up psss and remove circular deps

* Clean up place holder layouts

* update browser list config

* Update toolbar

* update routes

* Refactor routes

* update tool bar

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* tweak button

* add drawer

* wip

* Add layout components

* fix typo

* Update header

* update cards

* add circlemeter

* wip data tables

* add nested table

* Style header

* fix merge from table branch

* update meter components

* fix typo

* update cards

* add a dummy login form

* add dummy auth flow

* remove redundant event based country view

* update textfield styles

* update form inputs

* update form fields

* update login screen

* update auth

* clean up wip branch

* update profile button

* update alerts

* update px to rems

* update to latest

* refactor table rows

* wip add tables types to psss

* wip update cards

* wip update drawer styles

* wip

* add address component

* update drawer styles

* wip update editable table

* update editable table

* add table state validation

* update table body

* add controllable table row

* add editable table to ui components

* add controlled expandable table

* add customisable table row expansion container

* add verified button

* add editable table to weekly report pane

* add verifying to editable tables

* add todos

* add verifiable table

* verifiable table refactor

* editable table working

* verifiable table working

* add editable table component

* update editable table

* Update editable table stories

* clean up editable table component

* add memos

* fix merge

* move drawer to psss

* add drawer header content component

* update button select and fake data

* start refactor

* clean up

* tables edit working

* add country weeks to store

* refactor country weeks store

* update connected tables

* fix bad merge

* update tables state

* rename weekly reports state

* refactor weekly reports panel

* add store data to weekly reports panel

* refactor data structure

* add country week data to weekly reports panel

* updating to store from side panel

* connect indicators table to store

* add default expanded to expandable table body

* control row opening

* clearn up

* combine expandable tableBody and tableBody

* refactor styled table components

* add editable table loader

* add table loader

* Refactor expandable table row

* update to match new tables api

* update table styles

* fix table editing bugs

* add loading states

* calculated expandable table rows

* update expandable table

* make expandable row optionally controlled

* update expandable table body

* sync with latest changes

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* add panel to store

* add active id to panel

* refactor active week

* refactor verified data management

* remove metadata from editabletable

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* sync with psss branch

* add weekly reports integration test

* update active week selectors

* add country flags

* add country flags and add constants

* increase yarn timeout to handle material ui icons

* add alerts tab view and alerts table

* remove alert reports view file

* style alerts view

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* alerts table styles

* add outbreaks view

* add archive view

* add tooltip component

* add tooltips to psss

* rename weekly report panel to weekly reports panel

* add alerts panel

* weekly reports panel

* fix alerts store

* refactor component directories

* remove wip changes

* remove wip changes

* move constants into tables directory

* fix merge errors

* update yarn lock

* re-install yarn deps

* add use fetch data hook (#849)

* 724 refactor drawer component (#828)

* split drawer component into multiple files

* move integration tests to containers folder

* fix drawer and webpack

* upgrade yarn deps

* merge in psss

* re-install yarn deps

* tidy up style formatting

* 724 add psss alerts panel (#850)

* add drop down menu component

* tweak menu styles

* style tweaks

* add custom cell components

* add alerts panel and fetch hook

* add use memos

* PR suggestions

* tidy up cell components

* psss DropdownMenu component (#829)

* add drop down menu component

* tweak menu styles

* style tweaks

* add use call backs and fix default value bug

* Update testDataDump.sql

* Delete alerts before data sources

* User Message components (#867)

* add UserMessage components

* style tweaks

* add date format constants

* 724 psss affected sites tab (#869)

* add alerts outbreaks card

* update table header

* update color constants

* fix bugs

* style tweaks

* style tweak

* refactor affected sites tab

* refactor alerts outbreaks card

* refactor Fetch Loader

* formatting and style tweaks

* Add activity tab content (#880)

* Add activity tab content

* update alerts panel state

* rename note link to notes tab link

* tidy up formatting

* Add Notes Tab (#879)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* 725 psss outbreaks panel (#889)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* reformat tests

* add react hook forms (#898)

* add react hook forms

* commit package json

* 641 submit weekly report (#896)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* Add is alert status to fake api

* update modal styles to match designs

* Add alert created modal on submit

* fix tests

* update modal styes

* tidy up formatting

* 725 psss outbreak confirmed modal (#919)

* add create outbreak modal

* update date picker

* remove console log

* refactor for PR suggestions

* add multi select component (#926)

* Add Export Modals (#932)

* Add Export Modals

* add documentation

* update lock file

* add toast and refactor alerts (#938)

* fix tests

* remove debug code

* update test data

* update test data

* Add deployment process for psss

* Add psss to nginx config

* Update test data dump

* add fixes

* add fixes (#977)

* change text to sites reported

* 942 ui components tests setup (#975)

* add test setup to ui components

* update tests setup

* clean up formatting

* add yarn lock file

* 942 ui components first tests (#976)

* add test setup to ui components

* update tests setup

* clean up formatting

* add tests

* remove debug

* update toasts test

* update async test

* fix tests

* remove watwg-fetch from test

* Reinstate alert and comment as gettable types

* Reinstate Andres' work for alert comments

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>

* turn off psss deployment in ci (#1010)

* Allow creating user entity permissions (#1014)

Co-authored-by: Edwin <edmofro@gmail.com>

* Migration to update basline data max date (#983)

Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>

* Synchronise images at the same time as the survey response (#1000)

* Synchronise images at the same time as the survey response

* Allow testing on dev

* Correctly invalidate the alternative hierarchy cache

Co-authored-by: Edwin <edmofro@gmail.com>

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

* Add eslint config for typescript as a package (#1030)

* Define jest at monorepo root (#1034)

* Use jest plugin in typescript eslint config (#1036)

* change unfpa project dashboard permission group (#1037)

Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Alastair <lockealastair@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Alastair <lockealastair@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>
bgoepfert added a commit that referenced this pull request Jul 28, 2020
* 1166: Added % of facilities operational project level dashboards for UNFPA project
- Required making a few changes in aggregator and adding another composite databuilder

* 1166: Consolidated entity aggregation functions into one file
- Added display data for UNFPA charts

* 1166: Added display changes to show fraction with percentage for UNFPA charts

* 1166: Changed chartConfig and databuilder to only display orgUnits that have data for them

* 1166: Re-added yaxis scale

* 1166: Performance improvement on orgUnit name lookup

* Migration for regional staff traine reports

* trivial change remove comments

* merge latest dev into feature branch (#1007)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

* merge latest dev into feature branch (#1040)

* 528: Import tupaia data surveys (#886)

* Add unique constraint in data_element_data_group
* Associate survey with data source
* Update admin panel

* 679 Add new binary indicator telephone available (#948)

* 679 Add new binary indicator telephone available

* Add popupHeaderFormat key to new map overlay

* Remove unneeded key from new map overlay

* 679 Fix after testing

* Merging dev into feature branch (#1006)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* Add clear error message when a program is missing from DHIS2

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>

* 771 Update demoninator codes for flutracking overlays (#940)

* 771 Update demoninator codes for flutracking overlays

* Use different codes for state and lga

* Remove unneeded const

* 771 Fix typo breaking overlay

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

* 829 update conditions check (#1004)

* 829 Update conditions check

* 829 Update tests

* 829 Remove .only

* 829 Make web config server test setup more involved

* Remove unneeded delete

* Revert unneeded changes as id generation is handled

* 829-update-conditions-check test (#1020)

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 914: Fix incorrect data shown for Baseline survey responses for UNFPA SRH services matrix (#962)

* 914: use aggregationType in the column config

* 914: moved aggregationType

* 914-unfpa-srh-matrix-wrong-baseline test (#1005)

* 448 Flutracker participants per capita overlay

* 499 add flutracking overlays and change population scale to neutral

* 448 remove logs

* 448 Remove whitespace from measureBuilder title in migration

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* 449 PR feedback

* 449 allow 0 values for tooltip

* flutracking overlay fixes based on testing

* Use 3.5% as max value for fever and cough overlay

* 460 Add non-participant overlays

* 460 Make data regional

* 460 display lga's at country level if measure is active

* 460 Apply suggestions from code review

Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>

* Allow more general tooltips for shaded polygons

* Fix merge conflicts

* 543: added migration to hide unnecessary DL surveys

* 543: removed console.log

* 543: deleted by ids to be safer

* 543: renamed const

* 543: removed incorrect surveys

* Add projects to flutracking overlays

* 581 allow display

* 581 Add period extremes utils

* 581 Remove unneeded util

* 581 Change return type of measureBuilders to match dataBuilders

* 581 Remove deleted functionality from index files

* 581 Add period extremes and update tests

* 581 Connect everything

* 503: Reworked tableOfValuesForOrgUnits to support custom names for rows
- Previously they had to match the indicator name
- Added unit tests

* 503: Added Laos Schools Binary Matrix District Level Dashboard

* 611 Update indicators

* 503 Use new entity aggregation

* 581 return period from more measureBuilders

* 581 Implement design

* 611 make additional changes

* Remove unneeded import

* 581 Fix failing tests

* 503 Pass project code to export call

* 503 also pass project code through the backend

* Merge conflict bugfix

* 631: Added new hand washing func overlay

* 696: Added distance from main road overlay

* 618: Update percentage of schools bar chart in Laos Schools

* 758: fixed a color issue with shaded polygons. Changed the name of dev
     partner support overlay

* merge fixes

* Fix flutracking overlays with entity aggregation

* Remove logs

* add migration

* add migration

* Change id suffix from National to Regional

* Update 20200710081638-AddUNFPARepHealthProdMOSReportToProvinceLevel-modifies-data.js

Update suffix to National

* 679 Add new indicator to report

* 581 Fix non-awaited promise

* Clear import/export modal state when it closes

* Clear import modal state when it closes

* Remove react-autobind

* 503 Fix regression in cell order

* 894: fixed broken export because of merge conflict

* Build and watch internal dependencies when running a server

* Copy scripts directory to CI/CD docker container

* Fix COPY statement

* Invalidate model schema after schema change

Addressing https://github.com/beyondessential/tupaia-backlog/issues/670

Unfortunately creating event triggers can't be done using a migration, so we will have to
manually apply the commands below during deployment as the superuser, and then ask everyone
to get a fresh clone of the database

```
  CREATE FUNCTION schema_change_notification() RETURNS event_trigger
  LANGUAGE plpgsql
  AS $$
  BEGIN
  PERFORM pg_notify('schema_change', 'schema_change');
  END;
  $$;
  CREATE EVENT TRIGGER schema_change_trigger
  ON "ddl_command_end"
  EXECUTE PROCEDURE schema_change_notification();
```

* Also invalidate fieldNames

* Fix more merge conflicts

* Fix command evaluation

* Update scripts/bash/backendStartDev.sh

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 631: added more value as requirements changed

* Temporarily set tupaia to be superuser when importing a db dump

* Fix merge (and other) bugs in flutracking branch

* Update testDataDump.sql

* 700: Migrate questions to use hook to attach new photo and gps to laos
     schools

* Remove dataElements removed from survey

* Remove extra comma

* Remove reference to population scale

* 631: value changed again, so updating the migration

* Make sure to normalize to percentage for performance scale

* MeasureBuilders now return objects

* Await async function mapMeasureDataToCountries

* Make it clear that function is async

* Add clear error message when a program is missing from DHIS2

Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>

* Fix many countries appearing in second access request (#875)

Co-authored-by: Edwin <edmofro@gmail.com>

* [EPIC] PSSS (#462)

* 312 set up ui components package (#334)

* first commit of ui-components package

* Add button stories

* Add semantic ui

* add theme structure

* Update theme and buttons

* Clean up ui components base code

* clean up ui packages code

* update button story

* Add alert component (#342)

* Add alert component

* Refactor alert component

* UI Components Tabs (#352)

* Add tabs component and tabs stories. Add docs and story source storybook addons

* Update Tabs component and add CardTabs component

* move storybook and babel deps to devDeps

* update formatting

* Add custom icons (#371)

* Add custom icons

* Update custom icon styles

* 359 ui components package breadcrumbs (#380)

* Add custom icons

* Update custom icon styles

* Add breadcrumbs component

* update formatting

* Breadcrumbs refactoring

* 335 ui components modal (#381)

* Add modal component and update palette and button styles

* Add eslint and fix lint errors. Update dialog stories

* add useCallback to dialog stories and fix linting errors

* add text field and select inputs (#392)

* add text field and select inputs

* Update select component

* add date picker component (#396)

* UI Components Navbar (#407)

* Add navbar, profile button and home button components

* update tab styles

* Refactor home button to take a source

* Add autocomplete components (#406)

* Add autocomplete components

* remove nav variation of components

* fix eslint

* Update autocomplete component

* fix style

* pass props through autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* fix disabled prop

* fix typo

* fix typo

* 398 ui components button select (#428)

* fix typo

* add button select

* fix typo

* 387 create new psss package (#433)

* Add PSSS package

* add psss to workspaces file

* 388 ui components distribution (#444)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* update build config for production

* added migration~

* create, update and delete endpoints for alerts

* get endpoint for alerts

* started unit tests

* 389 psss routing (#458)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* add useCallback to navbar

* finalised CRUD tests for alerts

* 400 ui components toolbar (#474)

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Clean up place holder layouts

* update browser list config

* update routes

* Refactor routes

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* clean up toolbar

* Update packages/meditrak-server/src/tests/routes/getRecords/alerts.test.js

Co-Authored-By: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* moved alerts tests out of getRecords

* use upsertRecord and clearTestData

* refactored tests, added more helpers

* Update packages/meditrak-server/src/tests/routes/alerts.test.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* remove commented code

* Update packages/meditrak-server/src/tests/testUtilities/database/clearTestData.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* Update packages/meditrak-server/src/tests/testUtilities/database/generateDummyRecord.js

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* updated columns to use timestamp with timezone

* removed after function

* Add layout component (#479)

* Add header component (#502)

* Add header component

* update prop types

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* add ui-components to getInternalDependencies.sh

* started api layer

* testing

* update docker file

* update get internal dependencies file

* add test script stub

* hot fix add missing icons to ui components

* move ui-components stories directory out of src

* Revert "started api layer"

This reverts commit d73e8af.

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* basic preliminary redux implementation

* add login view

* add private route

* Add redux for psss (#553)

Added a basic redux implementation following tamanu repo's way.
Included an example component tied to an example reducer.

* add auth to redux store and update login form to use store state

* Data Fetching Table Component (#509)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* remove psss changes

* refactor data fetching table component and stories

* clean up tables

* Update names in table and table row

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* continue api integration

* 492 data fetching tables psss (#543)

* add table component

* Update table component

* add prop types to tables

* refactor table component

* add data accessors

* clean up connectApi

* export DumbDataFetchingTable

* Update data fetching table

* data table style tweaks

* Refactor data tables

* move ui-components stories directory out of src

* cherry pick changes from data tables branch

* clean up tables

* fix merging issues with data tables

* update accessors to be called cells

* export api as a singleton

* refactor table component

* fix typo

* add react memo to tables

* add placeholder comments

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* update test data

* 506 ui components bar meter (#545)

* add bar meter

* 507 ui components circle meter (#546)

* add circle meter

* re-factor circle meter api

* add checkboxes (#594)

* update test data

* style tweaks

* Dump test data using 12.2

* psss api layer (#540)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* updated testDataDump

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

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* 401 ui components card (#547)

* add bar meter

* add circle meter

* Add card component

* update card component

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* PSSS Alert Comments endpoint (#494)

tupaia-backlog#385

DB migrations (comment, alert_comment)
Alert Comment endpoint
CRUD operations
Unit tests for the CRUD operations

* 420 update form styles (#600)

* update form styles

* update alert

* update px to rems

* update profile button

* remove old auth folder

* put back auth folder

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* 420 psss auth gateway (#551)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* update placeholder text

* psss drawer component (#674)

* started api layer

* Revert "started api layer"

This reverts commit d73e8af.

* basic preliminary redux implementation

* add login view

* add private route

* add auth to redux store and update login form to use store state

* continue api integration

* minimal api login and request within a component

* refactored based on PR

* Add logging around test database migration

* update login form styles and integrate login form with real api

* remove admin panel auth handlers

* update psss auth

* remove example code

* update test data

* remove temp code

* update test data

* style tweaks

* remove un-used code

* remove redundant code

* remove unused code

* update form styles

* update alert

* update px to rems

* update profile button

* update form styles

* add profile button to psss

* remove old auth folder

* login form tweaks

* tweak auth gateway

* add drawer component

* update site address component

* fix formatting

* add drawer header content component

* add weekly report pane

* update placeholder text

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin <edmofro@gmail.com>

* 552 psss ui alert comments (#654)

* started the user message component, familiarised myself with story book

* tweaked more details of the component

* continued work on the UserMessage component. Cards render and stubs for the actions were created

* finalise component, edit/delete supported, actions delegated to handler functions

* updated message prop

* final refactoring

* replace moment with date-fns

* moved ActionsMenu to its own component, use options as array

* moved styles into components

* updated format string

* added ActionsMenu story

* moved UserMessage to single file

* fix bad merge

* UI Components Editable Table Component (#668)

* add editable table component

* Update editable table stories

* clean up editable table component

* add memos

* combine expandable tableBody and tableBody

* Refactor expandable table row

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data-api to get internal dependencies

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* add data-api to get internal dependencies

* Resolve merge conflicts

* Update yarn.lock

* Update testDataDump.sql

* Use `upsertDummyRecord` from db

* Fix soft conflicts

* Fix final soft conflict

* refactor table styles

* add table styles and table loader styles (#699)

* add table styles and table loader styles

* update table styles, make button select and expandable table row controllable

* add more styled content to psss

* add data-api to get internal dependencies

* refactor table styles

* 589 weekly reports state management (#703)

* add data to redux store and restructure to mock real data

* style tweaks

* remove redundant code

* add data api to get internal dependencies

* refactor tables

* refactor state management

* fix race condition in thunks

* rename data accessor

* refactor weekly reports store

* 625 first psss unit test (#718)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* update tests

* refactor tests

* refactor test set up

* Update packages/psss/README.md

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>

* 589 weekly reports panel data editing (#720)

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update naming in weekly reports

* remove a link from indicators table template

* rename verifiable table to country report table

* rename indicators table to syndromes table

* rename indicators to syndromes

* rename table state to table status

* rename syndrome table to site report table

* fix some regressions

* editable table fixes

* fix clone of state

* code clean up

* move initialisation of editable table form state

* replace table row data and index with rowData

* add useCallbacks to table components

* fix regressions

* fix useCallback bug

* add react memo to custom table components

* add country flags (#758)

* add country flags and refactor constants

* increase yarn timeout

* 632 weekly reports integration test (#757)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* 626 psss first end to end test (#729)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view (#765)

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* add weekly reports integration test

* update active week selectors

* increase yarn timeout to handle material ui icons

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* add alerts outbreaks view

* tidy up alerts styles

* add more descriptive names to styled components

* add outbreaks view & table (#770)

* add out breaks view

* update alerts table

* add archive view & table (#774)

* add out breaks view

* update alerts table

* add archive table

* add tooltips (#777)

* Refactor psss directories (#783)

* add fancy autocomplete

* add async autocomple component

* update header components

* delete list and menu

* update autocomplete

* Add autocomplete components

* update navbar

* update header

* update autocomplet components

* remove nav variation of components

* fix eslint

* update nav select component

* Update autocomplete component

* fix style

* update button select

* pass props through autocomplete

* update autocomplete

* Added muiProps to autocomplete. Added example stories to autocompletes

* wip

* fix disabled prop

* update ButtonSelect

* fix typo

* add psss package

* Add PSSS package

* add psss to workspaces file

* update storybook config with custom webpack config

* remove browser list config

* wip

* Add routes to psss

* tidy up psss and remove circular deps

* Clean up place holder layouts

* update browser list config

* Update toolbar

* update routes

* Refactor routes

* update tool bar

* fix typos and rename some variables

* Add toolbar component

* fix typo

* add useCallBack to navbar

* tweak button

* add drawer

* wip

* Add layout components

* fix typo

* Update header

* update cards

* add circlemeter

* wip data tables

* add nested table

* Style header

* fix merge from table branch

* update meter components

* fix typo

* update cards

* add a dummy login form

* add dummy auth flow

* remove redundant event based country view

* update textfield styles

* update form inputs

* update form fields

* update login screen

* update auth

* clean up wip branch

* update profile button

* update alerts

* update px to rems

* update to latest

* refactor table rows

* wip add tables types to psss

* wip update cards

* wip update drawer styles

* wip

* add address component

* update drawer styles

* wip update editable table

* update editable table

* add table state validation

* update table body

* add controllable table row

* add editable table to ui components

* add controlled expandable table

* add customisable table row expansion container

* add verified button

* add editable table to weekly report pane

* add verifying to editable tables

* add todos

* add verifiable table

* verifiable table refactor

* editable table working

* verifiable table working

* add editable table component

* update editable table

* Update editable table stories

* clean up editable table component

* add memos

* fix merge

* move drawer to psss

* add drawer header content component

* update button select and fake data

* start refactor

* clean up

* tables edit working

* add country weeks to store

* refactor country weeks store

* update connected tables

* fix bad merge

* update tables state

* rename weekly reports state

* refactor weekly reports panel

* add store data to weekly reports panel

* refactor data structure

* add country week data to weekly reports panel

* updating to store from side panel

* connect indicators table to store

* add default expanded to expandable table body

* control row opening

* clearn up

* combine expandable tableBody and tableBody

* refactor styled table components

* add editable table loader

* add table loader

* Refactor expandable table row

* update to match new tables api

* update table styles

* fix table editing bugs

* add loading states

* calculated expandable table rows

* update expandable table

* make expandable row optionally controlled

* update expandable table body

* sync with latest changes

* add first unit tests

* add test utils alias to eslint

* add login form test

* fix typos

* add data api to get internal dependecies

* refactor with test data

* add user event module

* add panel to store

* add active id to panel

* refactor active week

* refactor verified data management

* remove metadata from editabletable

* remove meta data from ui components

* add verifiable table and indicator table

* refactor table states variables

* update tests and reducer

* fix test providers

* log in form integration test

* add login e2e test

* update login test

* organise test scripts

* add test client to ci

* fix typos

* fix tests

* update tests

* add database fix

* remove ci changes

* fix test config

* clean up merge

* cypress code formatting

* cypress code formatting

* add ffixture

* remove database fixes

* update cypress config

* remove debug code

* format code

* fix soft merge conflict

* refactor test code

* remove debug code

* update readme

* sync with psss branch

* add weekly reports integration test

* update active week selectors

* add country flags

* add country flags and add constants

* increase yarn timeout to handle material ui icons

* add alerts tab view and alerts table

* remove alert reports view file

* style alerts view

* refactor weekly reports e2e test

* add es-lint plugin react hooks

* alerts table styles

* add outbreaks view

* add archive view

* add tooltip component

* add tooltips to psss

* rename weekly report panel to weekly reports panel

* add alerts panel

* weekly reports panel

* fix alerts store

* refactor component directories

* remove wip changes

* remove wip changes

* move constants into tables directory

* fix merge errors

* update yarn lock

* re-install yarn deps

* add use fetch data hook (#849)

* 724 refactor drawer component (#828)

* split drawer component into multiple files

* move integration tests to containers folder

* fix drawer and webpack

* upgrade yarn deps

* merge in psss

* re-install yarn deps

* tidy up style formatting

* 724 add psss alerts panel (#850)

* add drop down menu component

* tweak menu styles

* style tweaks

* add custom cell components

* add alerts panel and fetch hook

* add use memos

* PR suggestions

* tidy up cell components

* psss DropdownMenu component (#829)

* add drop down menu component

* tweak menu styles

* style tweaks

* add use call backs and fix default value bug

* Update testDataDump.sql

* Delete alerts before data sources

* User Message components (#867)

* add UserMessage components

* style tweaks

* add date format constants

* 724 psss affected sites tab (#869)

* add alerts outbreaks card

* update table header

* update color constants

* fix bugs

* style tweaks

* style tweak

* refactor affected sites tab

* refactor alerts outbreaks card

* refactor Fetch Loader

* formatting and style tweaks

* Add activity tab content (#880)

* Add activity tab content

* update alerts panel state

* rename note link to notes tab link

* tidy up formatting

* Add Notes Tab (#879)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* 725 psss outbreaks panel (#889)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* reformat tests

* add react hook forms (#898)

* add react hook forms

* commit package json

* 641 submit weekly report (#896)

* Add Notes Tab

* update button loading stlyes

* update user message component

* add interactions to notes tab

* Add out breaks panel

* fix bugs

* Add is alert status to fake api

* update modal styles to match designs

* Add alert created modal on submit

* fix tests

* update modal styes

* tidy up formatting

* 725 psss outbreak confirmed modal (#919)

* add create outbreak modal

* update date picker

* remove console log

* refactor for PR suggestions

* add multi select component (#926)

* Add Export Modals (#932)

* Add Export Modals

* add documentation

* update lock file

* add toast and refactor alerts (#938)

* fix tests

* remove debug code

* update test data

* update test data

* Add deployment process for psss

* Add psss to nginx config

* Update test data dump

* add fixes

* add fixes (#977)

* change text to sites reported

* 942 ui components tests setup (#975)

* add test setup to ui components

* update tests setup

* clean up formatting

* add yarn lock file

* 942 ui components first tests (#976)

* add test setup to ui components

* update tests setup

* clean up formatting

* add tests

* remove debug

* update toasts test

* update async test

* fix tests

* remove watwg-fetch from test

* Reinstate alert and comment as gettable types

* Reinstate Andres' work for alert comments

Co-authored-by: Andrés Proaño <andres@oventi.org>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>

* turn off psss deployment in ci (#1010)

* Allow creating user entity permissions (#1014)

Co-authored-by: Edwin <edmofro@gmail.com>

* Migration to update basline data max date (#983)

Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>

* Synchronise images at the same time as the survey response (#1000)

* Synchronise images at the same time as the survey response

* Allow testing on dev

* Correctly invalidate the alternative hierarchy cache

Co-authored-by: Edwin <edmofro@gmail.com>

Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: monty-wanty <lockealastair@gmail.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Alastair <alastair@beyondessential.com.au>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

* Add eslint config for typescript as a package (#1030)

* Define jest at monorepo root (#1034)

* Use jest plugin in typescript eslint config (#1036)

* change unfpa project dashboard permission group (#1037)

Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Alastair <lockealastair@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Nick Williams <62525113+nick-beyondessential@users.noreply.github.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>

Co-authored-by: Rohan Port <rohan@beyondessential.com.au>
Co-authored-by: Rohan Port <59544282+rohan-bes@users.noreply.github.com>
Co-authored-by: nick <nickw@ourcomunity.com.au>
Co-authored-by: Andrew <vanbeekandrew@gmail.com>
Co-authored-by: Kostas Karvounis <kos.karvounis.zoumpos@gmail.com>
Co-authored-by: sepidehdd <66226595+sepidehdd@users.noreply.github.com>
Co-authored-by: Kostas Karvounis <kael89@users.noreply.github.com>
Co-authored-by: Alastair <lockealastair@gmail.com>
Co-authored-by: Edwin <edmofro@gmail.com>
Co-authored-by: Edwin Monk-Fromont <edwin.monkfromont@gmail.com>
Co-authored-by: Bindu madhavi tammireddy <41365985+BinduMadhaviTammireddy@users.noreply.github.com>
Co-authored-by: chris-bes <63621318+chris-bes@users.noreply.github.com>
Co-authored-by: Bastien Goepfert <bas.goepfert@gmail.com>
Co-authored-by: Tom Caiger <caigertom@gmail.com>
Co-authored-by: Andrés Proaño <andres@oventi.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants