Hide location filter unless facility is selected #6682
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHAT
🤖[deprecated] Generated by Copilot at 19a3d9f
This pull request contains several improvements to the code quality, performance, and user interface of some components in the
care_fe
frontend. It reorganizes imports, simplifies logic, avoids unnecessary rendering, refactors components, and changes layout and styling. It also fixes a minor type issue in theLocationSelect
component.Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖[deprecated] Generated by Copilot at 19a3d9f
errors
prop optional inLocationSelectProps
interface (link)FacilityUsers.tsx
,FormField.tsx
, andPatientFilter.tsx
(link, link, link)showDelete
function inFacilityUsers.tsx
(link)FacilityUsers.tsx
to only allow state admins (link)FieldErrorText
component in conditional rendering inFormField.tsx
to avoid unnecessary rendering (link)AutoCompleteAsync
andSelectMenuV2
components to import statements inPatientFilter.tsx
to use them in the filter component (link)PatientFilter.tsx
to reduce clutter and improve readability (link)div
elements withgrid
class withsection
elements withspace-y-4
class inPatientFilter.tsx
to improve semantics and spacing (link, link)LocationSelect
component in conditional rendering inPatientFilter.tsx
to only show it when facility filter is selected (link)flex-none
class fromdiv
elements containing LSG body and district filters inPatientFilter.tsx
to prevent shrinking in smaller screens (link, link)