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

Fixed malfunction of filters #5362

Merged
merged 4 commits into from
Apr 21, 2023

Conversation

patelaryan7751
Copy link
Contributor

@patelaryan7751 patelaryan7751 commented Apr 20, 2023

WHAT

🤖 Generated by Copilot at 58bab83

This pull request adds or improves filtering and ordering features for various data types, such as assets, shifting, resources, samples, patients, and users. It also fixes a bug where the filter values were not reset when the query parameters changed. It does so by adding a key prop to the filter components, which is set to the current window location search string, and by using constants and functions to map the query values to more descriptive texts. The changes affect several files, such as AssetsList.tsx, BadgesList.tsx, FacilityFilter.tsx, ListFilter.tsx, and UserFilter.tsx.

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 58bab83

  • Add a key prop to various filter components to ensure they are re-rendered when the query parameters change and the filter values are reset accordingly (link, link, link, link, link, link, link, link, link, link)
  • Add a new state variable facilityName to store the fetched name of the selected facility in the AssetsList component and use it to display the facility name badge (link, link, link)
  • Add a new function getDescShiftingFilterOrder to display the ordering filter badge for shifting data with a more descriptive text instead of the query parameter value, using the SHIFTING_FILTER_ORDER constant (link, link, link, link, link)
  • Add a new date range filter option for the modified date of the shifting data in the BadgesList component (link)

@vercel
Copy link

vercel bot commented Apr 20, 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 Apr 21, 2023 3:01pm

@netlify
Copy link

netlify bot commented Apr 20, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 22f27de
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6442a507d2a69400072864c6
😎 Deploy Preview https://deploy-preview-5362--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 settings.

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🚀 LGTM

@sonarcloud
Copy link

sonarcloud bot commented Apr 21, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit ca1e58d into coronasafe:develop Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Slideover is malfunctioning across platform
4 participants