Skip to content

provider_profile_and_user_dev: Added ProviderProfile Component Code a…#166

Merged
Riyad-Murad merged 1 commit intostagingfrom
provider_profile_and_users_dev
May 20, 2025
Merged

provider_profile_and_user_dev: Added ProviderProfile Component Code a…#166
Riyad-Murad merged 1 commit intostagingfrom
provider_profile_and_users_dev

Conversation

@Riyad-Murad
Copy link
Owner

@Riyad-Murad Riyad-Murad commented May 20, 2025

…nd modified ReadMe file

Summary by Sourcery

Provide an editable provider profile UI backed by a service, integrate a dropdown-based profile menu into the sidebar, clean up dead code in shared components, fix an API endpoint, and update project documentation.

New Features:

  • Introduce ProviderProfile component with a form and service for editing provider details
  • Add ProfileMenu component in the sidebar to handle profile navigation and logout

Bug Fixes:

  • Correct the provider report API endpoint by removing the unnecessary userId parameter

Enhancements:

  • Replace the static sidebar profile link and logout button with the new ProfileMenu component
  • Remove legacy commented code from InputField component

Documentation:

  • Revise README to rename diagrams, add a "Remarkable Features" section, and include a Postman API documentation link

@sourcery-ai
Copy link

sourcery-ai bot commented May 20, 2025

Reviewer's Guide

This PR adds a fully functional ProviderProfile page—complete with controlled form inputs, custom InputField and ActionButton components, and a dedicated service hook for API interaction and navigation—introduces a new ProfileMenu dropdown in the sidebar, cleans up legacy code in InputField, tweaks a minor API URL, enriches styling for the new UI elements, and updates README diagrams and documentation links.

File-Level Changes

Change Details Files
New ProviderProfile component with form-driven state, change handlers, and submission logic
  • Initialize formData with useState
  • Implement handleChange and handleSubmit
  • Render form fields using InputField and ActionButton
  • Integrate react-toastify for feedback
ProviderProfile.jsx
ProviderProfileService hook for updateProfile API calls and navigation
  • Filter out empty fields before request
  • Post to /providers/editProfile via axios
  • Toast success/error messages and navigate on success
ProviderProfile.js
ProfileMenu component providing dropdown for profile and logout
  • Toggleable menu with FontAwesome icons
  • Links to profile route and logout via useLogout hook
  • New CSS for menu positioning and styling
ProfileMenu.jsx
styles.css (ProfileMenu)
Sidebar refactor to use ProfileMenu
  • Removed direct Profile link
  • Replaced LogoutButton with ProfileMenu
ProviderSidebar.jsx
Expanded and refactored CSS for profile page and menu
  • Define layout, card, form-group, button hover states
  • Add full-height centering and responsive widths
  • Style dropdown and menu interactions
styles.css (ProviderProfile)
styles.css (ProfileMenu)
Cleaned up InputField component by removing legacy commented code
  • Deleted outdated V2 commented implementations
InputField.jsx
Minor API endpoint adjustment in power prediction service
  • Removed userId param from URL template
ProviderPowerPredictionService.js
README updates to diagrams and documentation links
  • Renamed and replaced images for architecture and flow diagrams
  • Added Postman API documentation link
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Riyad-Murad Riyad-Murad merged commit 55f39d9 into staging May 20, 2025
1 check passed
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.

1 participant