Skip to content

admin_pages_dev: Added Admin Screens for ReadMe file#174

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

admin_pages_dev: Added Admin Screens for ReadMe file#174
Riyad-Murad merged 1 commit intostagingfrom
admin_pages_dev

Conversation

@Riyad-Murad
Copy link
Owner

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

Summary by Sourcery

Introduce new admin screens for viewing providers and contact messages using a reusable table component, implement corresponding data-fetch services, adjust sidebar layout and update project documentation.

New Features:

  • Add Admin View Providers screen with dynamic data fetch
  • Add Admin Contact Messages screen with dynamic data fetch
  • Introduce a reusable Table component for admin pages
  • Implement API service functions to fetch providers and contact messages

Enhancements:

  • Adjust admin sidebar CSS positioning and content margins
  • Refactor Admin page components to simplify structure and rename wrapper classes

Documentation:

  • Update README to include Contact Us screenshot and new Admin Screens documentation

@sourcery-ai
Copy link

sourcery-ai bot commented May 20, 2025

Reviewer's Guide

This PR implements new Admin sections by adding data-driven Provider and Contact Messages views, backed by API service modules, rendered via a reusable Table component, with supporting CSS adjustments and updated documentation.

File-Level Changes

Change Details Files
Integrate data fetching and table rendering into Admin pages
  • Manage providers/messages state with useState
  • Fetch data on component mount using useEffect
  • Render Table component with dynamic headers and fetched data
amp-client/src/Pages/AdminPages/AdminViewProviders/AdminViewProviders.jsx
amp-client/src/Pages/AdminPages/AdminContactMessages/AdminContactMessages.jsx
Introduce reusable Admin Table component
  • Create Table.jsx mapping headers and data rows
  • Include FontAwesome edit icon in action column
  • Define table theming and layout in styles.css
amp-client/src/Components/AdminComponents/Table/Table.jsx
amp-client/src/Components/AdminComponents/Table/styles.css
Add service modules for API calls
  • Implement fetchAllProviders and fetchContactMessages using axiosInstance
  • Wrap calls in try-catch and return empty arrays on failure
amp-client/src/Pages/AdminPages/Services/AdminViewProvidersService/AdminViewProvidersService.js
amp-client/src/Pages/AdminPages/Services/AdminContactMessagesService/AdminContactMessagesService.js
Adjust Admin sidebar and layout CSS
  • Fix sidebar to a fixed position
  • Rename main-content class and adjust left/right margins
amp-client/src/Components/AdminComponents/AdminSidebar/styles.css
Update README with Admin screens documentation
  • Add Admin Screens section header
  • Include screenshots for View Providers and Contact Messages
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 a3dd820 into staging May 20, 2025
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