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

Migrate the Justice Counts Publisher frontend #4

Merged
merged 180 commits into from
Sep 13, 2022

Conversation

lilidworkin
Copy link
Collaborator

@lilidworkin lilidworkin commented Aug 29, 2022

Description of the change

Initialize our new GH repo with the Publisher frontend code! I am dumping all of it into a new publisher directory. I imagine this repo will eventually contain a few directories, like publisher, agency-dashboards, and technical-specification.

Type of change

All pull requests must have at least one of the following labels applied (otherwise the PR will fail):

Label Description
Type: Bug non-breaking change that fixes an issue
Type: Feature non-breaking change that adds functionality
Type: Breaking Change fix or feature that would cause existing functionality to not work as expected
Type: Non-breaking refactor change addresses some tech debt item or prepares for a later change, but does not change functionality
Type: Configuration Change adjusts configuration to achieve some end related to functionality, development, performance, or security
Type: Dependency Upgrade upgrades a project dependency - these changes are not included in release notes

Checklists

Development

This box MUST be checked by the submitter prior to merging:

  • Double- and triple-checked that there is no Personally Identifiable Information (PII) being mistakenly added in this pull request

These boxes should be checked by the submitter prior to merging:

  • Tests have been written to cover the code changed/added as part of this pull request

Code review

These boxes should be checked by reviewers prior to merging:

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has been moved out of a Draft state, has no "Work In Progress" label, and has assigned reviewers
  • Potential security implications or infrastructural changes have been considered, if relevant

mxosman and others added 30 commits March 18, 2022 17:29
…d skeleton app (#11622)

* setting up justice-counts frontend subdirectories and skeleton app

* Fixing configuration details in package.json and tsconfig.json

* Set up simple test, fixed minor linting errors, added test and linting instructions to README

Co-authored-by: Mahmoud <[email protected]>
…628)

* setting up justice-counts frontend subdirectories and skeleton app

* Adding Auth Wall component

* Corrected AuthWall useEffect, cleaned up exports, and refactored AuthStore

* Setting up CI test suite

* Adding auth test and fixing import statement

* adjusting CI test suite - removing caching conditional

* Fixed linting issues

* adjusting CI test suite - reintroducing caching conditional

* Add a more descriptive comment to query param logic

* Move auth test to appropriate folder

* Move App test into its own file in src

* Refactored auth component and auth test, added barebones root and api stores.

* Major refactor of auth component, removed AuthProvider and replaced with StoreProvider, connected AuthStore and API store to RootStore

* Minor clean up

* minor clean up in AuthStore

* AuthStore should know about RootStore in order to access the API store for requests made during authentication & logout

* fixing import at src/index

* Refactor AuthStore - define authClient as member of store, initialize once, and refactor getToken method

* Moved getAuthSettings method to RootStore, added todo items on AuthStore & RootStore

* Fixing TODO linting errors

Co-authored-by: Mahmoud <[email protected]>
* setting up justice-counts frontend subdirectories and skeleton app

* Adding Auth Wall component

* Adding auth test and fixing import statement

* adjusting CI test suite - removing caching conditional

* Fixed linting issues

* adjusting CI test suite - reintroducing caching conditional

* Move auth test to appropriate folder

* Move App test into its own file in src

* Refactored auth component and auth test, added barebones root and api stores.

* Major refactor of auth component, removed AuthProvider and replaced with StoreProvider, connected AuthStore and API store to RootStore

* Minor clean up

* AuthStore should know about RootStore in order to access the API store for requests made during authentication & logout

* Refactor AuthStore - define authClient as member of store, initialize once, and refactor getToken method

* Moved getAuthSettings method to RootStore, added todo items on AuthStore & RootStore

* ebase -d test to mock fetch and test application logic

* Minor comment adjustment within the test

* Added check for authorization headers in test

* Fixed and separated authorization header test

* Temp adjustment for the purpose of testing a call to the backend

* Changes made to set up for endpoint testing

* Move AuthWall wrapper to index, remove AuthStore's dependency on RootStore, setup API store test, cleanup typos

* Remove todo comments

* Minor clean up in App and API types

* Add ability to initialize session and retrieve CSRF token, minor clean up in App, AuthStore (logout user to use initialized auth client, clean up redundancy)

* Destructure csrf token response

* Handle logout and redirect, cleanup API store, cleanup API test

* Adjusting .request method to be more flexible and only send response and not json parsed response, adjusting tests and App component

* Fixed typing on API and App

* Minor adjustment to API tests and remove the need for RootStore to be an observable for now

Co-authored-by: Mahmoud <[email protected]>
* setting up justice-counts frontend subdirectories and skeleton app

* Adding Auth Wall component

* Corrected AuthWall useEffect, cleaned up exports, and refactored AuthStore

* Setting up CI test suite

* Adding auth test and fixing import statement

* adjusting CI test suite - removing caching conditional

* Fixed linting issues

* adjusting CI test suite - reintroducing caching conditional

* Add a more descriptive comment to query param logic

* Move auth test to appropriate folder

* Move App test into its own file in src

* Refactored auth component and auth test, added barebones root and api stores.

* Major refactor of auth component, removed AuthProvider and replaced with StoreProvider, connected AuthStore and API store to RootStore

* Minor clean up

* minor clean up in AuthStore

* AuthStore should know about RootStore in order to access the API store for requests made during authentication & logout

* fixing import at src/index

* Refactor AuthStore - define authClient as member of store, initialize once, and refactor getToken method

* Moved getAuthSettings method to RootStore, added todo items on AuthStore & RootStore

* ebase -d test to mock fetch and test application logic

* Minor comment adjustment within the test

* Added check for authorization headers in test

* Fixed and separated authorization header test

* Temp adjustment for the purpose of testing a call to the backend

* Changes made to set up for endpoint testing

* Move AuthWall wrapper to index, remove AuthStore's dependency on RootStore, setup API store test, cleanup typos

* Remove todo comments

* Minor clean up in App and API types

* Add ability to initialize session and retrieve CSRF token, minor clean up in App, AuthStore (logout user to use initialized auth client, clean up redundancy)

* Destructure csrf token response

* Handle logout and redirect, cleanup API store, cleanup API test

* Adjusting .request method to be more flexible and only send response and not json parsed response, adjusting tests and App component

* Fixed typing on API and App

* Adding basic navigation and UI scaffolding

* Adding basic tests

* Refactor ui and navigation to be closer to newer mocks. Set up rough ui scaffolding.

* Fleshs out more UI for a decent starting point

* Minor styling adjustments

* Iterate further on UI and move logout function to menu

* Minor clean up in packages and changed name of dummy navigation function in Menu

Co-authored-by: Mahmoud <[email protected]>
* setting up justice-counts frontend subdirectories and skeleton app

* Adding Auth Wall component

* Corrected AuthWall useEffect, cleaned up exports, and refactored AuthStore

* Setting up CI test suite

* Adding auth test and fixing import statement

* adjusting CI test suite - removing caching conditional

* Fixed linting issues

* adjusting CI test suite - reintroducing caching conditional

* Add a more descriptive comment to query param logic

* Move auth test to appropriate folder

* Move App test into its own file in src

* Refactored auth component and auth test, added barebones root and api stores.

* Major refactor of auth component, removed AuthProvider and replaced with StoreProvider, connected AuthStore and API store to RootStore

* Minor clean up

* minor clean up in AuthStore

* AuthStore should know about RootStore in order to access the API store for requests made during authentication & logout

* fixing import at src/index

* Refactor AuthStore - define authClient as member of store, initialize once, and refactor getToken method

* Moved getAuthSettings method to RootStore, added todo items on AuthStore & RootStore

* ebase -d test to mock fetch and test application logic

* Minor comment adjustment within the test

* Added check for authorization headers in test

* Fixed and separated authorization header test

* Temp adjustment for the purpose of testing a call to the backend

* Changes made to set up for endpoint testing

* Move AuthWall wrapper to index, remove AuthStore's dependency on RootStore, setup API store test, cleanup typos

* Remove todo comments

* Minor clean up in App and API types

* Add ability to initialize session and retrieve CSRF token, minor clean up in App, AuthStore (logout user to use initialized auth client, clean up redundancy)

* Destructure csrf token response

* Handle logout and redirect, cleanup API store, cleanup API test

* Adjusting .request method to be more flexible and only send response and not json parsed response, adjusting tests and App component

* Fixed typing on API and App

* Adding basic navigation and UI scaffolding

* Adding basic tests

* Refactor ui and navigation to be closer to newer mocks. Set up rough ui scaffolding.

* Fleshs out more UI for a decent starting point

* Minor styling adjustments

* Iterate further on UI and move logout function to menu

* Adds thin UserStore and functionality to ping user endpoint on login

* Fleshed out more properties on UserStore based on backend response

* Adjustments based on reviewer feedback. Renaming and changing endpoint request method to POST

* readding file (#11992)

* [Pathways] choose one location per person per day in supervision_population_time_series  (#11728)

* deduplicate supervision_population_time_series

* fix typo

* update to use andrew's query

* update calc docs

* don't count null values

* cast dimensions as uppercase when comparing against uppercase values

* [BQ views] Move BigQueryAddress to its own file (#11970)

Moves BigQueryAddress out of big_query_view.py so that code that references BigQueryAddress can also be imported into big_query_view.py.

* Adds a new raw data config field to classify the data as "source" or "validation" (#11941)

* Implement data classification

* Add data class to all existing yamls

* add comment

* [US_PA] Another dbo_Miscon raw data migration [skip validation ingest_docs] (#11999)

Found another instance where PA has changed the control number associated with a misconduct row to the control number of a completely different person. (See another reference PR here: #8894, #9885)

* [Bug Fix] Fixing validation view (#12006)

Fixes broken normalized_entities_unique_ids view.

* Add UserStore to RootStore, fix race condition with /init and /user endpoints, add console.log confirmations to test

* US_TN Compliant Reporting Views - Add C4 Eligibility (#11994)

* add c4 eligibility

* add comment

* [US_TN] Updating yaml to incorporate additional columns present in InterestedPartyComment raw data file (#11946)

* Updating yaml to incorporate additional columns present in raw data file sent

* Adding in todos as comments

* Remove console.log

* parent 8e1d97019255fc2d2c830ddab98b2d620b7b92b2
author Genevieve Heidkamp <[email protected]> 1649261979 -0700
committer Mahmoud <[email protected]> 1649268962 -0500

parent 8e1d97019255fc2d2c830ddab98b2d620b7b92b2
author Genevieve Heidkamp <[email protected]> 1649261979 -0700
committer Mahmoud <[email protected]> 1649268957 -0500

parent 8e1d97019255fc2d2c830ddab98b2d620b7b92b2
author Genevieve Heidkamp <[email protected]> 1649261979 -0700
committer Mahmoud <[email protected]> 1649268952 -0500

parent 8e1d97019255fc2d2c830ddab98b2d620b7b92b2
author Genevieve Heidkamp <[email protected]> 1649261979 -0700
committer Mahmoud <[email protected]> 1649268947 -0500

parent 8e1d97019255fc2d2c830ddab98b2d620b7b92b2
author Genevieve Heidkamp <[email protected]> 1649261979 -0700
committer Mahmoud <[email protected]> 1649268946 -0500

parent 8e1d97019255fc2d2c830ddab98b2d620b7b92b2
author Genevieve Heidkamp <[email protected]> 1649261979 -0700
committer Mahmoud <[email protected]> 1649268946 -0500

[US_TN] Updating yaml to incorporate additional columns present in InterestedPartyComment raw data file (#11946)

* Updating yaml to incorporate additional columns present in raw data file sent

* Adding in todos as comments

Setting up CI test suite

adjusting CI test suite - removing caching conditional

adjusting CI test suite - reintroducing caching conditional

minor clean up in AuthStore

Remove todo comments

Minor styling adjustments

Adds thin UserStore and functionality to ping user endpoint on login

Fleshed out more properties on UserStore based on backend response

Adjustments based on reviewer feedback. Renaming and changing endpoint request method to POST

Add UserStore to RootStore, fix race condition with /init and /user endpoints, add console.log confirmations to test

Remove console.log

Co-authored-by: Mahmoud <[email protected]>
Co-authored-by: Emily Chao (they/them) <[email protected]>
Co-authored-by: Dana Hoffman <[email protected]>
Co-authored-by: Anna Geiduschek <[email protected]>
Co-authored-by: Colin Adams <[email protected]>
Co-authored-by: Julia Dressel <[email protected]>
Co-authored-by: Damini Sharma <[email protected]>
Co-authored-by: Genevieve Heidkamp <[email protected]>
…ow object (#12021)

* setting up justice-counts frontend subdirectories and skeleton app

* Adding Auth Wall component

* Corrected AuthWall useEffect, cleaned up exports, and refactored AuthStore

* Setting up CI test suite

* Adding auth test and fixing import statement

* adjusting CI test suite - removing caching conditional

* Fixed linting issues

* adjusting CI test suite - reintroducing caching conditional

* Add a more descriptive comment to query param logic

* Move auth test to appropriate folder

* Move App test into its own file in src

* Refactored auth component and auth test, added barebones root and api stores.

* Major refactor of auth component, removed AuthProvider and replaced with StoreProvider, connected AuthStore and API store to RootStore

* Minor clean up

* minor clean up in AuthStore

* AuthStore should know about RootStore in order to access the API store for requests made during authentication & logout

* fixing import at src/index

* Refactor AuthStore - define authClient as member of store, initialize once, and refactor getToken method

* Moved getAuthSettings method to RootStore, added todo items on AuthStore & RootStore

* ebase -d test to mock fetch and test application logic

* Minor comment adjustment within the test

* Added check for authorization headers in test

* Fixed and separated authorization header test

* Temp adjustment for the purpose of testing a call to the backend

* Changes made to set up for endpoint testing

* Move AuthWall wrapper to index, remove AuthStore's dependency on RootStore, setup API store test, cleanup typos

* Remove todo comments

* Minor clean up in App and API types

* Add ability to initialize session and retrieve CSRF token, minor clean up in App, AuthStore (logout user to use initialized auth client, clean up redundancy)

* Destructure csrf token response

* Handle logout and redirect, cleanup API store, cleanup API test

* Adjusting .request method to be more flexible and only send response and not json parsed response, adjusting tests and App component

* Fixed typing on API and App

* Adding basic navigation and UI scaffolding

* Adding basic tests

* Refactor ui and navigation to be closer to newer mocks. Set up rough ui scaffolding.

* Fleshs out more UI for a decent starting point

* Minor styling adjustments

* Iterate further on UI and move logout function to menu

* Adds ability to retrieve auth0 public config from window object

* Correct failing test due to new way of getting auth0 public config

* Fixing merge conflict resolution crumbs on yarn.lock

* Adding a custom error boundary incase auth0 configs are not successfully retrieved onload

* Successfully tested, removed previous .env code

Co-authored-by: Mahmoud <[email protected]>
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…034)

* Add styled components for reports page, add initial color palette, styling clean up

* Rename prop name from completed to published per feedback

* PR feedback: fix palette names, correct body font color value, update palette names on Report styles

* Create GlobalStyles to house palette, remove inherit and use actual values

Co-authored-by: Mahmoud <[email protected]>
… Mock Reports List] (#12036)

* Add styled components for reports page, add initial color palette, styling clean up

* PR feedback: fix palette names, correct body font color value, update palette names on Report styles

* Add ReportStore, add mock reports list JSON, add functionality to fetch and render mock reports list

* Update last_modified to last_modified_at and strongly typed report frequency

* Extract date logic into shared util folder

* Extract string manipulation logic to helper util

* Add typing to report status

* PR feedback: change name - listOfReports to reports

* PR feedback - replace NOT STARTED in mocks with NOT_STARTED and update associated dependencies

* Adding comment on useEffect

Co-authored-by: Mahmoud <[email protected]>
…Marker] (#12037)

* Add report year marker functionality

* Sort list of reports before displaying report year marker

* Rebase fixes

* Remove sorting logic for now since it's sorted in descending order in the backend

* Fix rebase crumbs

Co-authored-by: Mahmoud <[email protected]>
…ts By Status] (#12040)

* Add functionality to filter reports list by status in store and view

* Clean up rebase crumbs and fix typings

* PR feedback: extract string normalization into helper function, move report filter function to view, remove unnecessary clone of reports

* Fix minor typings

* Add tests

* PR feedback - decouple filtering logic from store - all credit for this elegant memoized solution goes to terry, clean up tests

* PR feedback - rename ReportStatus enum, remove selectedFilter logic and simplify the filter status highlighter

* Fix minor styling colors, remove snake casing to accommodate backend sending NOT_STARTED

Co-authored-by: Mahmoud <[email protected]>
…nd user ids to obtain reports (#12237)

* Update ReportStore and UserStore to utilize agency and user ids to obtain list of reports

* PR feedback: handle undefined cases, add todos, add userInfoLoaded flag in UserStore, clean up ReportStore

* Update mobX when to read from userInfoLoaded

* Fix errors retrieving reports, adjust date util to accept string dates

* Add error handling and display when no agencies are tied to a user

Co-authored-by: Mahmoud <[email protected]>
* Initial rough work on create report section

* Clean up on initial work, added month names to dateUtil, create Forms folder to house form UI components, add form components, add CreateReports page, add createReport functionality, add basic styling

* Fix agencyID variable in request

* Update reportstore conditional to not handle 0 as false, clean up error handling

* Adjust reportoverview last_modified_at typing, add test

* Update conditional in getReports function to allow for IDs of value 0

* Fix tests

* Trying to figure out why this test is passing locally, but failing CI frontend test

* Trying to figure out why this test is passing locally, but failing CI frontend test - 2

* Debugging CI frontend test

* Debugging CI frontend test - 2

* Debugging CI frontend test - 3 - CI is using a different date than my local date to test

* Debugging CI frontend test - 3 - CI is using a different date than my local date to test - 2

Co-authored-by: Mahmoud <[email protected]>
* Update palette names and corresponding components that use the palette properties

* Fix header and table styles

* Adjust reports view to align with mocks in style and shape

* Remove all rgba or hex values and replace with appropriate palette colors

Co-authored-by: Mahmoud <[email protected]>
… stores (#12342)

* Store report info and report metrics in seperate key value stores

* rename to ReportOverview

* test sorting

* check before accessing
…a simple page (#12408)

* mock report response and display mocked response on a simple page

* mockGetReport

* last_modified_at should be a string

* revert last_modified_at changes
…n (#12424)

* Only show Create Report if user has permission

* Add tests

* move utils to src, create shared folder to store constants, update relevant imports

* Clean up moving types to shared folder and updating their dependencies, clean up linting issues, replace constant with enum

* Fix linting

Co-authored-by: Mahmoud <[email protected]>
…d styling (#12350)

* Initial work on form components

* Clean up comments

* Extends TextInput to optionally have the styling of the Additional Context field

* Fix padding on Input

* Create px to rem conversion util, styling clean up and matching 1/n

* Finish styling clean up

* Another styling spot check, clean up comments

* Sort out resetBinaryInputs logic, comment clean up, styling clean up

* -

* Styling adjustments

* Fix input padding (right)

* Add a bit of responsiveness

* Remove max-width

* Add tests

* Fix linting issues

* Temporarily re-add FormComponents route for visibility - will be merged with ReportDataEntry in next PR

Co-authored-by: Mahmoud <[email protected]>
…egations) (#12421)

* Playing around with a custom form hook

* Initial work on useForm hook

* Sort out radio button mapping to object

* Sorted out and tested handler and reset logic, created mini-object view for testing, post rebase clean up

* Extended handler logic to handle updating multiple metrics

* Finish sorting out resetField logic incase we need this functionality

* Fix imports

* Merge form components with ReportDataEntry page, breakout data entry page into 3 components - form and panels, minor adjustments to enable mock to work for development

* Create flattened data structure and update handler and form logic to accommodate, general clean up, add comments, fix TS errors

* Fix and add test

* Remove duplicate utils folder

* Might as well add some comments to the dateUtils while I'm here

* Remove resetFields until behavior is required

* Update AdditionalContextToggle name to DisaggregationToggle

* Finalize handler logic, map flat report to metric report logic, update minor unrelated comments,

* Restoring files to undo temp changes to test

* Change name of toggle to DisaggregationToggle, update imports, remove extraneous type

* Add data entry form tests

* PR feedback - clean up

Co-authored-by: Mahmoud <[email protected]>
* Add Account Settings page, update links, update userstore to store the users name

* Switch from authStore to userStore within Settings page

Co-authored-by: Mahmoud <[email protected]>
* Initial work on FormStore

* Move FormReport types to shared folder, create initialization functions within the FormStore

* Merge handler and other logic from hook to FormStore

* Add reset and submit functionality, clean up, fix tests, connect publish data panel to store

* Add comment to publish data submit button

* Add return types to FormStore methods

* Fix TS recommendation

* Side mission - correct minor report view styling

* Add labels to the test object view

* Implementing Terrys brilliant idea to isolate form component rerenders - successfully isolated all form components - still need to do some clean up

* Clean up and refactor: extract form components to their own file, update tests, adjust entry form and components, add types

* Adjusting names and order

* Fix types

* Add one more test

* PR Feedback: remove dateUtil escape hatch, refactor formStore handlers, refactor form components value prop, remove init and load functions from formStore

* Fix tests, clean up and revert back temp bypasses for development

Co-authored-by: Mahmoud <[email protected]>
* Initial work on Confirmation Page

* Cosmetic changes, quick side mission to fix header stylings

* Move submitReport function to dialogue component

Co-authored-by: Mahmoud <[email protected]>
* Initial work on errors and validation

* Add comments and adjust variable name

* Fix error conditional, key errors by metricID

* Fix error prop with an optional chaining operator

* Add tests, add id prop to inputs

* Fix tests and rebase adjustments

* Add key concat helper function, refactor validation

* Fix linting issues

* Cleanup, side: add reportID to PublishDataPanel

Co-authored-by: Mahmoud <[email protected]>
* Initial work on Report Summary Panel

* Continued iterations and exploration on Report Summary Panel

* Remove comment

* Fix lint and test issues

Co-authored-by: Mahmoud <[email protected]>
mxosman and others added 6 commits August 25, 2022 08:44
…emplate Buttons & Ungate Data Upload button (#14836)

* Fix button issue - should download if you click anywhere on the download button

* Ungate data upload feature

* Move key to anchor tag

Co-authored-by: Mahmoud <[email protected]>
terryttsai and others added 8 commits August 29, 2022 12:20
…14856)

* Attempting scroll based updates instead of IntersectionObserver

* Clean up unnecessary logic

* Clean up - remove old IO references, merge other scroll listener

* Add comments

* Side: clean up lint warnings

* Create header height constant - update other styles

* adjust threshold, create new constants file to house top level CSS constants

* early return

Co-authored-by: Mahmoud <[email protected]>
… Between Metrics (#14877)

* Add divisor logic to DE form - clean up out of sync mobx issues

* Progress isolating mobx out of sync issue, adjust system title styles

* styling adjustments from feedback

Co-authored-by: Mahmoud <[email protected]>
…#14876)

* Add new filtering based on user systems, adjust styles, update types

* Refactor filtered metric settings based on feedback

* Clean up

Co-authored-by: Mahmoud <[email protected]>
…ata visualizations (#14894)

* get all agency metric dimensions and render them in data viz

* pass in dimension names to tooltip component

* fix bug with sorting undefined

* rename for consistency

* always render legend when disaggregation is selected

* update tests

* fix more tests

* remove print statement

* fix selecting aggregate instead of disaggregate data
* render data viz insights row

* tweak text

* format percent number

* get rid of period and mon formatting in year
* remove data upload from reports page

* Move data upload button to menu, adjust styles, add icons as svgs

* add new route for data upload

* Refactor component as its own page, wait for user info to load before fetching, refactor styling

* More refactoring, adding svg icons

* create state for user systems

* Remove uploadedfiles list logic until more clarity on where that lives - we might not need to update ui state since this is now a sequenced flow before we get to the uploaded files list

* More heavy refactoring, update rendering logic, update upload logic, update drag drop logic

* Flesh out system select, add svg check icon, add placeholder confirmation page, add temp error state, add loading state

* Add border bottom to non-upload page header, change button color to red

* Add header background

* Clean up rendering logic, add error and warning icon svgs

* Initial work on error page components nad styling

* Add hard-coded errors

* Adjust styles, play with dynamically rendering errors

* Clean up - add resetUpload logic

* Fix useEffect dependency

* Fix bug for reuploading

* Fix key warning

* Quick fix

* Add ability to download template in error screen, clean up

* add file name to error page

* Fix spacing

* Add comments

* Styling adjustments

* Add component for additional info, set loading state for uploading

* Clean up

* Comment clean up

* Fix error bug

* Reorganizing styles

* Remove dropdown from Add Data button

* Extract Upload File page into own component

* Big refactor and clean up to simplify

* Have new upload button clear error state

* Clean up

* Fix loading

* Add placeholder navigation after successful upload, fix selectedFile bug

* add selected system state and clean up

* Include ingest_on_upload in formdata

* Remove uploaded error in conditional, go back to previous page on cancel

* Extract SystemSelection to own component

Co-authored-by: Mahmoud <[email protected]>
Copy link
Contributor

@mxosman mxosman left a comment

Choose a reason for hiding this comment

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

Thank you for doing all of this, Lili!

@lilidworkin lilidworkin merged commit b6f7cef into main Sep 13, 2022
@lilidworkin lilidworkin deleted the ldworkin/migrate-frontend branch September 13, 2022 16:03
terryttsai added a commit that referenced this pull request Sep 15, 2022
…#16)

* Migrate the Justice Counts Publisher frontend (#4)

* clear report and datapoints state when switching agencies

* handle case when switching agencies on the data entry form page

Co-authored-by: lilidworkin <[email protected]>
terryttsai added a commit that referenced this pull request Sep 15, 2022
…ay Review Metrics page with basic styling (#6)

* Migrate the Justice Counts Publisher frontend (#4)

* review metrics page using datapoints store as data

* fix display index

* fix months

* remove console log

* fix types

* sort dimensions

* metric display name

* add comments

* PR

Co-authored-by: lilidworkin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants