You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request adds a new location filter feature to the patient management module. It also adds a disabled prop to the LocationSelect component and its dependent components to control the visibility of the location input based on the facility selection. This improves the user experience and reduces unnecessary API calls.
Add a new optional prop disabled to the LocationSelect component to control its enabled state based on the facility selection (link, link, link, link)
Prevent fetching the location options in the LocationSelect component if the facility id is not defined (link)
Hide the button in the AutoCompleteAsync, Autocomplete, and AutocompleteMultiselect components when the disabled prop is true (link, link, link)
Import the getFacilityAssetLocation action in the ManagePatients.tsx file to fetch the location name based on the facility and location ids (link)
Add a new state variable locationBadgeName in the PatientManager component to store and display the location name as a badge in the patient list filter (link, link)
Add a new query parameter location to the filter object and the useQuery hook in the PatientManager component to filter the patient list by the location id (link, link)
Add a new useCallback hook to define the fetchLocationBadgeName function in the PatientManager component to dispatch the getFacilityAssetLocation action and set the locationBadgeName state (link)
Import and render the LocationSelect component in the PatientFilter component to create a form field with a label and a location select input (link, link)
Add a new property location to the filter, initialFilterData, and filterState objects in the PatientFilter component to store and update the location id value (link, link, link, link)
@Ashesh3 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.
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
🤖 Generated by Copilot at 9d9c810
This pull request adds a new location filter feature to the patient management module. It also adds a
disabled
prop to theLocationSelect
component and its dependent components to control the visibility of the location input based on the facility selection. This improves the user experience and reduces unnecessary API calls.Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
HOW
🤖 Generated by Copilot at 9d9c810
disabled
to theLocationSelect
component to control its enabled state based on the facility selection (link, link, link, link)LocationSelect
component if the facility id is not defined (link)AutoCompleteAsync
,Autocomplete
, andAutocompleteMultiselect
components when thedisabled
prop istrue
(link, link, link)getFacilityAssetLocation
action in theManagePatients.tsx
file to fetch the location name based on the facility and location ids (link)locationBadgeName
in thePatientManager
component to store and display the location name as a badge in the patient list filter (link, link)location
to thefilter
object and theuseQuery
hook in thePatientManager
component to filter the patient list by the location id (link, link)useCallback
hook to define thefetchLocationBadgeName
function in thePatientManager
component to dispatch thegetFacilityAssetLocation
action and set thelocationBadgeName
state (link)LocationSelect
component in thePatientFilter
component to create a form field with a label and a location select input (link, link)location
to thefilter
,initialFilterData
, andfilterState
objects in thePatientFilter
component to store and update the location id value (link, link, link, link)