-
Notifications
You must be signed in to change notification settings - Fork 347
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
CareUI: Adds UserAutocompleteFormField
and used it in "Assigned To" filter field of Shifting
#5626
Conversation
…ield of Shifting Filter
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@rithviknishad fix the cypress test |
…asafe/care_fe into tailwind/userautocompleteformfield
LGTM |
@rithviknishad 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 🙌. |
WHAT
🤖 Generated by Copilot at 2e4a9c0
This pull request enhances the
useAsyncOptions
hook to support custom query options extraction, refactors theListFilter
component to use the newUserAutocompleteFormField
component for user filtering, and makes some minor cosmetic changes to theUserModel
type and themodels.tsx
file. These changes improve the flexibility, reusability, and user experience of the shifting module.Proposed Changes
UserAutocompleteFormField
to select users. (we could add features like filter by online or filter by facility later on when using in other places.useAsyncOptions
now supports custom query response extractor (since response format is not same for list api's)UserSelect2
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖 Generated by Copilot at 2e4a9c0
UserAutocompleteFormField
that wraps theAutocomplete
component and uses theuseAsyncOptions
hook to fetch and display user options based on a query (link)useAsyncOptions
hook to accept an optionalqueryResponseExtractor
function that can extract the relevant data from the query response object (link,link)UserSelect
component with theUserAutocompleteFormField
component in theListFilter
component, and remove the unnecessary loading state variables and function calls (link,link,link,link,link,link)UserModel
interface to a type alias and terminate it with a semicolon in themodels.tsx
file (link,link)