Skip to content

Commit

Permalink
Merge pull request #2416 from HHS/main
Browse files Browse the repository at this point in the history
[Prod] Change checkbox label to "OHS standard goals," fix accessibility issues with table, fix accessibility issues with admin TR form
  • Loading branch information
Jones-QuarteyDana authored Oct 17, 2024
2 parents 95804ae + 6467140 commit 539a2ec
Show file tree
Hide file tree
Showing 24 changed files with 676 additions and 40 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,31 @@ The frontend [proxies requests](https://create-react-app.dev/docs/proxying-api-r

Api documentation uses [Redoc](https://github.com/Redocly/redoc) to serve documentation files. These files can be found in the `docs/openapi` folder. Api documentation should be split into separate files when appropriate to prevent huge hard to grasp yaml files.

#### Import Current Production Data

Make sure you have access to all the necessary spaces on Cloud.gov

On a Mac
1. Login to cloud.gov: `cf login -a api.fr.cloud.gov --sso`.
2. Download latest data: `bash ./bin/latest_backup.sh -d` (file will be placed in current directory).
3. Ensure you have `psql` (if not `brew install libpq`).
4. Ensure ttahub docker container is running.
5. Create bounce.sql in repo directory (see below)
6. Load data: `psql postgresql://username:[email protected]:5432/postgres < ./bounce.sql && psql postgresql://username:[email protected]:5432/ttasmarthub < db.sql` (Where username:password are replaced with credentials from .env and db.sql is the file you downloaded and unzipped).
7. Migrate data: `yarn docker:db:migrate`
8. Edit .env and change CURRENT_USER_ID= from 1 to the ID of a production user
9. Restart docker

bounce.sql
```sh
select pg_terminate_backend(pid) from pg_stat_activity where datname='ttasmarthub';
drop database ttasmarthub;
create database ttasmarthub;
```
On Windows
TBD
#### Apple Silicon & Chromium
On a Mac with Apple Silicon, puppeteer install fails with the message:
```"The chromium binary is not available for arm64"```
Expand All @@ -62,6 +87,10 @@ export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=`which chromium`
```
On a Mac with Brew installed Docker, yarn commands may fail due to the absence of `docker-compose` (vs `docker compose`). To resolve:
`brew install docker-compose`
#### Local build
You can also run build commands directly on your host (without docker). Make sure you install dependencies when changing execution method. You could see some odd errors if you install dependencies for docker and then run yarn commands directly on the host, especially if you are developing on windows. If you want to use the host yarn commands be sure to run `yarn deps:local` before any other yarn commands. Likewise if you want to use docker make sure you run `yarn docker:deps`.
Expand Down
24 changes: 24 additions & 0 deletions docs/sequence-diagrams/access.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml

title "TTA Hub"

actor User as TTAProvider
participant "HSES\n Login" as HSESLogin
participant "TTA Hub\n frontend" as TTAHUBF

group Access: Accessing TTA Hub pages
autonumber
TTAProvider -> HSESLogin : Enter credentials
TTAProvider <- HSESLogin : Provide access token
else
TTAProvider <-- HSESLogin : Invalid credentials
end

group Logout: Logging out of TTA Hub pages
autonumber
TTAProvider -> TTAHUBF: Click profile icon
TTAProvider -> TTAHUBF: Click Logout
TTAProvider <- HSESLogin: Login Screen displayed
end

@enduml
21 changes: 21 additions & 0 deletions docs/sequence-diagrams/account-management.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@startuml

title "TTA Hub Admin"

actor TTAUSER as TU
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group Account: Account Management
autonumber 1
TU -> FRONTEND : View Landing Page
TU -> FRONTEND : Navigate to User\Account Management
FRONTEND <- BACKEND : Display Account Management settings for user
TU --> FRONTEND : Create A Group
FRONTEND <-- BACKEND : Display My Groups\Create Group page
TU --> FRONTEND : Create Group Name, Select Recipients, Set Privacy, Co-Owners, Region
FRONTEND <-- BACKEND : Display User\Account Management page with new group
TU --> FRONTEND : Send Verification Mail
end

@enduml
78 changes: 78 additions & 0 deletions docs/sequence-diagrams/activity-reports.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@startuml

title "TTA Hub Activity Reports"

actor User as TTAProvider
participant "TTA Hub\n frontend" as TTAHUBF
participant "TTA Hub\n backend" as TTAHUBB

group View: Activity Reports
autonumber 1
TTAProvider -> TTAHUBF : View landing page
TTAProvider -> TTAHUBF : Navigate to Activity Reports
TTAHUBF -> TTAHUBB : Request Page Data
TTAHUBF <- TTAHUBB : Send display results
TTAProvider -> TTAHUBF : [Optional] Filter results
TTAHUBF -> TTAHUBB : send filter query
TTAHUBF <- TTAHUBB : send display results
TTAProvider -> TTAHUBF : [Optional] select spefic report
TTAHUBF -> TTAHUBB : query specific report
TTAHUBF <- TTAHUBB : send report results
end

group Edit: Edit Activity Reports
autonumber 1
TTAProvider -> TTAHUBF : Navigate to Activity Reports
TTAProvider -> TTAHUBF : Select Report ID
TTAHUBF -> TTAHUBB : Request selected report
TTAHUBF <- TTAHUBB : Send Report Data
TTAProvider -> TTAHUBF : Make changes as needed
TTAProvider -> TTAHUBF : [Optional] Save Draft
TTAHUBF -> TTAHUBB : Send draft report
TTAHUBF <- TTAHUBB : Acknowledge Draft report saved
TTAProvider -> TTAHUBF : [Optional] Submit for approval
TTAHUBF -> TTAHUBB : Send completed report for approval
TTAHUBF <- TTAHUBB : Accept Submission
TTAHUBF -> TTAHUBF : Dispaly Activity Reports page
end

group Create: Create Activity Report
autonumber 1
TTAProvider -> TTAHUBF : Navigate to Activity Reports
TTAProvider -> TTAHUBF : Click New Activity Report button
TTAHUBF -> TTAHUBF : Display New Report Form
TTAProvider -> TTAHUBF : Complete Activity Summary
TTAProvider -> TTAHUBF : [Optional] Save As Draft
TTAHUBF -> TTAHUBB : Send draft report
TTAHUBF <- TTAHUBB : Acknowledge Draft report saved
TTAProvider -> TTAHUBF : Save and Continue
TTAHUBF -> TTAHUBF : Display Goals and Objectives
TTAProvider -> TTAHUBF : Create/Select Goals and Objectives
TTAProvider -> TTAHUBF : [Optional] Save As Draft
TTAHUBF -> TTAHUBB : Send draft report
TTAHUBF <- TTAHUBB : Acknowledge Draft report saved
TTAProvider -> TTAHUBF : Save and Continue
TTAHUBF -> TTAHUBF : Display Supporting Attachments
TTAProvider -> TTAHUBF : [Optional] Add supporting attachments
TTAProvider -> TTAHUBF : [Optional] Save As Draft
TTAHUBF -> TTAHUBB : Send draft report
TTAHUBF <- TTAHUBB : Acknowledge Draft report saved
TTAProvider -> TTAHUBF : Save and Continue
TTAHUBF -> TTAHUBF : Display Next Steps
TTAProvider -> TTAHUBF : Complete Next Steps
TTAProvider -> TTAHUBF : [Optional] Save As Draft
TTAHUBF -> TTAHUBB : Send draft report
TTAHUBF <- TTAHUBB : Acknowledge Draft report saved
TTAProvider -> TTAHUBF : Save and Continue
TTAHUBF -> TTAHUBF : Display Review and Submit
TTAProvider -> TTAHUBF : Complete Submit options
TTAProvider -> TTAHUBF : [Optional] Save As Draft
TTAHUBF -> TTAHUBB : Send draft report
TTAHUBF <- TTAHUBB : Acknowledge Draft report saved
TTAProvider -> TTAHUBF : Save and Submit
TTAHUBF -> TTAHUBB : Send completed report for approval
TTAHUBF <- TTAHUBB : Accept Submission
TTAHUBF -> TTAHUBF : Dispaly Activity Reports page
end

@enduml
38 changes: 38 additions & 0 deletions docs/sequence-diagrams/admin.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@startuml

title "TTA Hub Admin"

actor ADMIN as AD
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group Administration: Admin Options
autonumber 1
AD -> FRONTEND : View landing page
AD -> FRONTEND : Navigate to User\Admin
FRONTEND <- BACKEND : Display Admin Page
AD --> FRONTEND : Select CDI Grants
FRONTEND <-- BACKEND : Display CDI Grant page
AD --> FRONTEND : Select Courses
FRONTEND <-- BACKEND : Display Course page
AD --> FRONTEND : Select Diag
FRONTEND <-- BACKEND : Display Diag page
AD --> FRONTEND : Select Goals
FRONTEND <-- BACKEND : Display Goals page
AD --> FRONTEND : Select Feature Flags
FRONTEND <-- BACKEND : Display Feature Flags page
AD --> FRONTEND : Select National Centers
FRONTEND <-- BACKEND : Display National Centers page
AD --> FRONTEND : Select Site Alerts
FRONTEND <-- BACKEND : Display Site Alerts page
AD --> FRONTEND : Select Training Reports
FRONTEND <-- BACKEND : Display Training Reports page
AD --> FRONTEND : Select Users
FRONTEND <-- BACKEND : Display Users page
AD --> FRONTEND : Select SS
FRONTEND <-- BACKEND : Display Sheet List page
AD --> FRONTEND : Select Redis info
FRONTEND <-- BACKEND : Display Redis info page
end

@enduml
16 changes: 16 additions & 0 deletions docs/sequence-diagrams/notifications.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@startuml

title "TTA Hub Notifications"

actor TTAUSER as TU
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group View: Notifications
autonumber 1
TU -> FRONTEND : View Landing Pages
TU -> FRONTEND : Navigate to User\Notifications
FRONTEND <- BACKEND : Display Notifications page
end

@enduml
15 changes: 15 additions & 0 deletions docs/sequence-diagrams/qa-dashboard.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@startuml

title "TTA QA Dashboard"

actor CREATOR as CR
actor COLLABORATOR as CL
actor REGIONALPOC as RPOC
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group View : Quality Assurance Dashboard
' not yet implemented
end

@enduml
42 changes: 42 additions & 0 deletions docs/sequence-diagrams/regional-dashboard.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@startuml

title "TTA Regional Dashboard"

actor CREATOR as CR
actor COLLABORATOR as CL
actor REGIONALPOC as RPOC
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group View : Regional Dashboard
autonumber 1
CR -> FRONTEND : View Landing Pages
CR -> FRONTEND : Navigate to Regional Dashboard
FRONTEND <- BACKEND: Display Regional Dashboard
CR --> FRONTEND : Adjust Filters
FRONTEND <-- BACKEND : Dipslay Regional Dashboard filter results
CR --> FRONTEND : Click What does each status mean link
FRONTEND <-- FRONTEND : Display help popup
CR --> FRONTEND : Toggle Reason Table/Graph link
FRONTEND <-- FRONTEND : Display selected view
CR --> FRONTEND : Save Screenshot
FRONTEND <-- FRONTEND : Cause browser to download screenshot
CR --> FRONTEND : Toggle TTA Hours Table/Graph link
FRONTEND <-- FRONTEND : Display selected view
CR --> FRONTEND : Toggle Number of Reports High/Low
FRONTEND <-- FRONTEND : Display selected sort
CR --> FRONTEND : Number of Reports Save Screenshot
FRONTEND <-- FRONTEND : Cause browser to download screenshot
CR --> FRONTEND : Toggle Number of Reports Table/Graph link
FRONTEND <-- FRONTEND : Display selected view
CR --> FRONTEND : Export reports
FRONTEND <-- FRONTEND : Cause browser to download csv reports
CR --> FRONTEND : Click Report ID
FRONTEND <-- BACKEND : Dispaly Activity Report page
CR --> FRONTEND : Copy URL Link
FRONTEND <-- FRONTEND : Copy URL link to clipboard
CR --> FRONTEND : Print to PDF
FRONTEND <-- FRONTEND : Cause Print dialog to open
end

@enduml
29 changes: 29 additions & 0 deletions docs/sequence-diagrams/regional-goal-dashboard.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@startuml

title "TTA Regional Goal Dashboard"

actor CREATOR as CR
actor COLLABORATOR as CL
actor REGIONALPOC as RPOC
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group View : Regional Goal Dashboard
autonumber 1
CR -> FRONTEND : View Landing Pages
CR -> FRONTEND : Navigate to Regional Goal Dashboard
FRONTEND <- BACKEND: Display Regional Goal Dashboard
CR --> FRONTEND : Adjust Filters
FRONTEND <-- BACKEND : Dipslay Regional Goal Dashboard filter results
CR --> FRONTEND : Click What does each status mean link
FRONTEND <-- FRONTEND : Display help popup
CR --> FRONTEND : Toggle Status Table/Graph link
FRONTEND <-- FRONTEND : Display selected view
CR --> FRONTEND : Save Screenshot
FRONTEND <-- FRONTEND : Cause browser to download screenshot
CR --> FRONTEND : Toggle TTA Hours Table/Graph link
FRONTEND <-- FRONTEND : Display selected view
end


@enduml
29 changes: 29 additions & 0 deletions docs/sequence-diagrams/resource-dashboard.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@startuml

title "TTA Resource Dashboard"

actor CREATOR as CR
actor COLLABORATOR as CL
actor REGIONALPOC as RPOC
participant "TTA Hub\n frontend" as FRONTEND
participant "TTA Hub\n backend" as BACKEND

group View : Resource Dashboard
autonumber 1
CR -> FRONTEND : View Landing Pages
CR -> FRONTEND : Navigate to Resource Dashboard
FRONTEND <- BACKEND: Display Resource Dashboard
CR --> FRONTEND : Adjust Filters
FRONTEND <-- BACKEND : Dipslay Resource Dashboard filter results
CR --> FRONTEND : Export reports
FRONTEND <-- FRONTEND : Cause browser to download csv reports
CR --> FRONTEND : Select report ID link
FRONTEND <-- BACKEND : Display TTA Activity Report
CR --> FRONTEND : Copy URL Link
FRONTEND <-- FRONTEND : Copy URL link to clipboard
CR --> FRONTEND : Print to PDF
FRONTEND <-- FRONTEND : Cause Print dialog to open
end


@enduml
Loading

0 comments on commit 539a2ec

Please sign in to comment.