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

Filing process routing - Phase 2 (Live data) #406

Merged
merged 54 commits into from Apr 30, 2024

Conversation

meissadia
Copy link
Collaborator

@meissadia meissadia commented Apr 17, 2024

Closes #404

Changes

  • [Filing] Automatically creates a new Filing when needed
  • [Filing overview] Determines latest incomplete Filing step and links to it
  • [Filing sub-pages] Creates placeholder pages for Errors, Warnings, Point of contact, and Complete
  • [Filing sub-pages] Displays the status of all Steps at the top of each sub-page
  • [Styling] Updates step label's font-weight and color based on the steps status (complete, incomplete)
  • [Styling] Only displays a step as Complete (Dark blue bar, semibold font) when a user has navigated beyond the step in the Filing flow (i.e. When viewing Warnings, Errors would show complete)

How to test this PR

  1. Start fresh
  2. Landing page - Verify all associated institutions are ready for Upload (which indicates that the Filing for this period has automatically been created)
  3. Upload a "failing" data file. Verify that you cannot navigate beyond the Upload page (Save.. button disabled)
  4. Upload a "passing" data file. Verify that you can navigate to the Errors page (Save.. button enabled). Also verify that the step indicator at the top of the page updates to reflect the status of upcoming steps.
  5. Return to the Landing page, verify that the Institution that you have uploaded data for now links to the latest "Incomplete" step (probably "Point of Contact").

Screenshots (Updated 4/25)

filing-steps-4-25.mov

…flatten the routing structure and hopefully simplify maintenance
- Filing creation
- Rename fetchFilingSubmissionLatest to fetchSubmissionLatest
- Created useFilingAndSubmissionInfo
@meissadia
Copy link
Collaborator Author

@shindigira @billhimmelsbach Issue with infinite loading state has been resolved. All other PR comments have been addressed.

This is ready for one last review.

Copy link
Contributor

@shindigira shindigira left a comment

Choose a reason for hiding this comment

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

Looks awesome! Looks pretty much g2g except one last item.

src/utils/useFilingAndSubmissionInfo.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@billhimmelsbach billhimmelsbach left a comment

Choose a reason for hiding this comment

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

Looks good @meissadia! Thanks so much for your hard work on this one! 🥳

Chatted with @meissadia about consolidating the filing status definitions, which we can do in a later PR. 👍

@meissadia meissadia dismissed shindigira’s stale review April 30, 2024 17:42

Concerns have been addressed

@meissadia
Copy link
Collaborator Author

Chatted with @meissadia about consolidating the filing status definitions, which we can do in a later PR. 👍

@billhimmelsbach Added a ticket for this so I don't let it slip: #433

@meissadia meissadia merged commit 687e466 into main Apr 30, 2024
2 checks passed
@meissadia meissadia deleted the 331-filing-routing_phase2-live-data branch April 30, 2024 17:44
shindigira added a commit that referenced this pull request May 6, 2024
closes #333 
closes #401 

## Note (05/02/24)
The `sbl-filing` branch used is `main` -- latest working commit
`0ddf51bd4bd0ab7aefac8cbb02c7797077885620`

branched off
[331-filing-routing_phase2-live-data](#406)

## Changes
- feat(Resolve Errors): Single-Field Errors
- feat(Resolve Errors): Multi-Field Errors
- feat(Resolve Errors): Register-Level Errors
- feat(Resolve Errors): Alerts present depending on errors or no errors
- feat(Resolve Errors): Swappable between Step 1 (Syntax Errors) and
Step 2 (Logical Errors/Register Errors); navigates to `warnings` on Step
2 (no errors)
- enhancement(Upload): added an `enableLongPolling` boolean to
`useGetSubmissionLatest`; default false
- enhancement(Resolve Errors): Implemented 'react-markdown' --
Validation Description
- chore(Resolve Errors): TypeScript handling in
`FilingErrors.helpers.ts`
- [chore(Upload): Hide FilingNavButtons if still
loading](d380708)
- feat(Resolve Errors): if a get submission latest fails, there is an
Alert that pops up


## Next PRs
- Pagination
- Accessibility pass
- Table styling size adjustments
- Download linking the validation report

## How to Test

1. `yarn install` to install `react-markdown`
2. Select an institution and upload with the csv files provided (Syntax
Errors and then Logical/Register Errors)
3. Ensure the right Alert occurs based on the error (or no errors) per
segment
4. Verify all proper data is present per field-level section

#### Test CSV's to use

[all-errors-warnings-no-syntax-errors.csv](https://github.com/cfpb/sbl-frontend/files/15182232/all-errors-warnings-no-syntax-errors.csv)

[sblar_syntax_errors_large.csv](https://github.com/cfpb/sbl-frontend/files/15182233/sblar_syntax_errors_large.csv)

[sblar_syntax_errors.csv](https://github.com/cfpb/sbl-frontend/files/15182234/sblar_syntax_errors.csv)

Note: If Syntax Errors are present, then validation for the logical
errors/warnings do not occur. Hence, why the test CSV's has either
syntax errors or logical errors; not both.

## Screenshots
|Markdown|
|--|
|<img width="602" alt="Screenshot 2024-05-02 at 2 40 05 AM"
src="https://github.com/cfpb/sbl-frontend/assets/13324863/c277389e-46c3-4374-8195-740e3b04b193">|

| SingleFieldErrors | Success | Register-Level |
|--|--|--|
|<img width="411" alt="Screenshot 2024-05-01 at 4 44 52 PM"
src="https://github.com/cfpb/sbl-frontend/assets/13324863/776da07d-7c9a-4dca-9fe9-24e106ac00e2">|<img
width="400" alt="Screenshot 2024-05-01 at 4 45 10 PM"
src="https://github.com/cfpb/sbl-frontend/assets/13324863/4682d70c-52dc-40fb-9f8b-a3e0c72d8247">|<img
width="403" alt="Screenshot 2024-05-01 at 4 45 45 PM"
src="https://github.com/cfpb/sbl-frontend/assets/13324863/c1b6e28e-c6e1-4b1a-902b-b7803aa91f77">|

---------

Co-authored-by: Meis <meissadia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Navigation] Filing routing - Phase 2 - Live data
3 participants