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

Tailwinds / Migrates all usages of RoleButton to ButtonV2 with authorizedFor #5649

Merged
merged 10 commits into from
Jun 21, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Jun 13, 2023

WHAT

🤖 Generated by Copilot at 8e7b5cb

Refactored several components in the Facility module to use new common components ButtonV2 and CareIcon for improved UI and code quality. Deleted unused component RoleButton.

Proposed Changes

  • Fixes Goodbye to Rolebtn component from CARE #4370
  • Replaces RoleButton with ButtonV2 in Doctor Capacity Count Card
  • Replaces RoleButton with ButtonV2 in Inventoy Management: Min. Quantity Page
  • Replaces RoleButton with ButtonV2 in Location Management
  • Adds authorization for buttons in Bed Management Page

Screenshots

image

image

image

image

@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 8e7b5cb

  • Refactor BedManagement, DoctorsCountCard, LocationManagement, and MinQuantityList components to use the new ButtonV2 component instead of the old RoleButton component (link, link, link, link, link, link, link, link)
  • Use the CareIcon component to display icons instead of the i element with font-awesome classes in BedManagement and LocationManagement components (link, link, link, link)
  • Remove the import of React from react in LocationManagement and MinQuantityList components, as it is no longer needed with the new JSX transform (link, link)
  • Remove the import of navigate from raviger in BedManagement, LocationManagement, and MinQuantityList components, as it is no longer used in the files (link, link, link)
  • Add the import of NonReadOnlyUsers from ../../Utils/AuthorizeFor in BedManagement, DoctorsCountCard, LocationManagement, and MinQuantityList components, as it is used in the new ButtonV2 component (link, link, link, link)
  • Add the import of ButtonV2 from ../Common/components/ButtonV2 in BedManagement, DoctorsCountCard, LocationManagement, and MinQuantityList components, as it is used to replace the old RoleButton component (link, link, link, link)
  • Add the import of CareIcon from ../../CAREUI/icons/CareIcon in BedManagement and LocationManagement components, as it is used to display icons (link, link)
  • Remove the import of RoleButton from ../Common/RoleButton in DoctorsCountCard component, as it is no longer used in the file (link)
  • Delete the file src/Components/Common/RoleButton.tsx, as it is no longer used in the project (link)

@rithviknishad rithviknishad requested a review from a team June 13, 2023 06:50
@rithviknishad rithviknishad requested a review from a team as a code owner June 13, 2023 06:50
@netlify
Copy link

netlify bot commented Jun 13, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 9efd685
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6488411eeb41c800085b0170
😎 Deploy Preview https://deploy-preview-5649--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.

@vercel
Copy link

vercel bot commented Jun 13, 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 Jun 13, 2023 10:14am

@nihal467
Copy link
Member

nihal467 commented Jun 13, 2023

@rithviknishad
image

  • make all the three above button, full width in mobile view

image

  • make the above buttons, right most aligned

image

  • make the above content name, left aligned in mobile view

@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 47d410e into develop Jun 21, 2023
28 of 29 checks passed
@khavinshankar khavinshankar deleted the tailwind/4370 branch June 21, 2023 06:55
@github-actions
Copy link

@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 🙌.

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.

Goodbye to Rolebtn component from CARE
3 participants