-
Notifications
You must be signed in to change notification settings - Fork 64
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 unarchive patient support admin page #6299
Conversation
55d36bb
to
46d5a55
Compare
@@ -1,5 +1,6 @@ | |||
query GetOrganizations($identityVerified: Boolean) { | |||
organizations(identityVerified: $identityVerified) { | |||
internalId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetOrganizationsWithFacilities
query requries the org's internalId
as a param
frontend/src/app/supportAdmin/UnarchivePatients/UnarchivePatient.tsx
Outdated
Show resolved
Hide resolved
const [selectedFacilityId, setSelectedFacilityId] = useState<string>(""); | ||
const [archivedPatientsCount, setArchivedPatientsCount] = useState< | ||
number | undefined | ||
>(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined
to differentiate from when we get 0 results or no patients back (for UI purposes)
frontend/src/app/supportAdmin/UnarchivePatients/UnarchivePatient.tsx
Outdated
Show resolved
Hide resolved
await fetchAndSetArchivedPatients(orgId, facilityId, organizations); | ||
await fetchAndSetArchivedPatientsCount(orgId, facilityId, organizations); | ||
// clear pagination on search submit | ||
navigate(`${unarchivePatientPageUrl}${searchParams}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But our pagination component adds /{number}
to the end of the path so if someone was on the 3rd page of results their path would be updated to /admin/unarchive-patient/3
At that point if they select a new facility and new org and click "Search" and that result does not have 3 pages of results it will display "No result" which I found confusing.
The only downside is the get patients query runs 2x in the above scenario (one with the page number of 2 and one with page number of 0)
Let me know if I need to elaborate more 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran axe tool on all the page combos in dev2 and looked good!
@@ -39,6 +40,10 @@ const SupportAdminRoutes: React.FC<Props> = ({ isAdmin }) => { | |||
path="tenant-data-access" | |||
element={<TenantDataAccessFormContainer />} | |||
/> | |||
<Route path={"unarchive-patient"}> | |||
<Route path=":pageNumber" element={<UnarchivePatientContainer />} /> | |||
<Route path="" element={<UnarchivePatientContainer />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to set the route just once and fallback to a default value if no page number is passed?. Also how can the user pass a page number but the facility selected is not needed?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yes! It looks like there is a way to set the route once!
I think the only way a user can pass a page number without having selected a facility is by manipulating the url and appending a page number but nothing would display since they have not selected an org or facility
frontend/src/app/supportAdmin/UnarchivePatients/UnarchivePatientContainer.tsx
Outdated
Show resolved
Hide resolved
Discussed async with @jayna-SkylightDigital and @johanna-skylight to make this page and the manage facilities page (#5847) more aligned with one another.
![]() |
ae66150
to
c06255a
Compare
frontend/src/app/supportAdmin/UnarchivePatients/UnarchivePatient.tsx
Outdated
Show resolved
Hide resolved
fcae57f
to
dfd380b
Compare
2419e3d
to
e54c1ec
Compare
Kudos, SonarCloud Quality Gate passed! |
@BobanL @fzhao99 @johanna-skylight @mehansen Ready for re-review!!! @johanna-skylight I left the loading mask when first loading the page since we have 10k+ orgs in prod (id verified and not deleted -- which, I wonder, if we should switch to a combobox later on if support mentions if it is tough to find the org...) |
yeah I think we want to switch to a combo box now. they had this request on the ghosting screen way back when I first joined and I think a similar issue applies here. |
Oh but that would mean that we also need to change it for the manage facility page. I think we should create a ticket to migrate the dropdown from this page and manage facility as a follow up. Tagging : @mehansen @jayna-SkylightDigital |
Thanks everyone! I'll create a ticket -- feel free to edit and update as you see fit @jayna-SkylightDigital and @mehansen |
@johanna-skylight @fzhao99 @jayna-SkylightDigital @mehansen |
FRONTEND PULL REQUEST
Related Issue
Changes Proposed
Additional Information
Testing
🌈 Now available on dev1 🌈
https://dev.simplereport.gov/app/admin/unarchive-patient
Screenshots / Demos
@jayna-SkylightDigital - Here are some screenshots of the copy we didn't discuss explicitly that I wanted to make sure was OK with you 😸
Instructions copy
No facility in selected org