Skip to content
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

Show only those facilties that aren't linked to user #6191

Closed
wants to merge 4 commits into from

Conversation

Pranshu1902
Copy link
Contributor

@Pranshu1902 Pranshu1902 commented Aug 31, 2023

WHAT

🤖 Generated by Copilot at 97c2bb7

Added a feature to exclude the facilities that are already linked to a user from the facility select options in the UserFacilities component. This required passing the username prop from the ManageUsers component and modifying the FacilitySelect component.

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at 97c2bb7

  • Add username prop to FacilitySelectProps interface and FacilitySelect component to filter out linked facilities from facility select options (link, link)
  • Import getUserListFacility action from Redux actions module and dispatch it with username parameter to get the linked facilities of a user (link, link)
  • Declare linkedFacilities and linkedIDs variables to store the results of the action and the ids of the linked facilities (link)
  • Modify the loadOptions function of the AutoCompleteAsync component to use the filter method on the res?.data?.results array and exclude the facilities that have ids matching the linkedIDs array (link)
  • Pass the username prop from the user object to the UserFacilities component in the ManageUsers component (link)

@Pranshu1902 Pranshu1902 requested a review from a team August 31, 2023 08:27
@Pranshu1902 Pranshu1902 requested a review from a team as a code owner August 31, 2023 08:27
@vercel
Copy link

vercel bot commented Aug 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 8:21am

@netlify
Copy link

netlify bot commented Aug 31, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 2c038aa
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64f83670533cf60008c35290
😎 Deploy Preview https://deploy-preview-6191--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nihal467
Copy link
Member

nihal467 commented Sep 5, 2023

@Pranshu1902 check the cypress, it's a huge failure, fix that too

@nihal467 nihal467 added changes required cypress failed pull request with cypress test failure and removed needs testing labels Sep 5, 2023
@Pranshu1902
Copy link
Contributor Author

Efficient to solve it in Backend, issues raised

@Pranshu1902 Pranshu1902 closed this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't show already Linked Facilities on Link New Facility on User page
2 participants