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

Fix: Asset tab facility and location badges are malfunctioning #6474

Merged
merged 9 commits into from
Oct 26, 2023

Conversation

Pranshu1902
Copy link
Contributor

@Pranshu1902 Pranshu1902 commented Oct 19, 2023

WHAT

🤖 Generated by Copilot at 91b364d

This pull request improves the user interface and functionality of the assets list component. It adds state variables to show the facility name and location in the filter section, and uses the useQuery hook to refetch data based on filter changes.

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 91b364d

  • Add a state variable facility_location to store and display the location name of the selected facility in the assets list (link, link, link)
  • Add a state variable facility_name to store and display the facility name of the selected facility in the assets list (link)
  • Rename the variable location to locationData to avoid confusion with facility_location in AssetsList.tsx (link)
  • Add a new option refetchOnUpdate to the QueryOptions interface in useQuery.ts to allow refetching the query data when the query parameters change (link)
  • Use the refetchOnUpdate option in the query to get the facility asset location in AssetsList.tsx to update the location name when the facility changes (link, link)

@Pranshu1902 Pranshu1902 requested a review from a team October 19, 2023 10:52
@Pranshu1902 Pranshu1902 requested a review from a team as a code owner October 19, 2023 10:52
@Pranshu1902 Pranshu1902 requested a review from gigincg October 19, 2023 10:52
@vercel
Copy link

vercel bot commented Oct 19, 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 Oct 26, 2023 10:18am

@netlify
Copy link

netlify bot commented Oct 19, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 5f94d55
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/653a3cbf27ca840007a2ff16
😎 Deploy Preview https://deploy-preview-6474--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.

src/Utils/request/useQuery.ts Outdated Show resolved Hide resolved
src/Components/Assets/AssetFilter.tsx Outdated Show resolved Hide resolved
src/Components/Assets/AssetsList.tsx Show resolved Hide resolved
@rithviknishad rithviknishad added the P1 breaking issue or vital feature label Oct 26, 2023
@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 2cf1348 into ohcnetwork:develop Oct 26, 2023
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 breaking issue or vital feature tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asset tab facility and location badges are malfunctioning
4 participants