profilecity/vidur

Add Admin Dashboard Button on Homepage for Admin Users

Open

#206 opened on Dec 22, 2024

 (2 comments) (0 reactions) (1 assignee)Vue (104 forks)auto 404
enhancementgood first issueui

Repository metrics

Stars
 (428 stars)
PR merge metrics
 (PR metrics pending)

Description

Feature Request

Add a button linking to the Admin Dashboard on the homepage of job postings, visible only when an admin user is logged in.


Details

  • Current Behavior: The homepage of job postings does not display a link or button to the Admin Dashboard.
  • Expected Behavior: If an admin is logged in, a button labeled "Admin Dashboard" should be visible on the homepage. Clicking the button should redirect to the admin dashboard.

Acceptance Criteria

  1. Display the "Admin Dashboard" button on the homepage only when:
    • The logged-in user is an admin.
    • Proper authentication and role checks are performed.
  2. Ensure the button is styled consistently with the website's UI.
  3. Redirect the button to the correct admin dashboard route (e.g., /admin/dashboard).

Suggested Implementation

  • Add a conditional check for the admin role in the homepage component.
  • Use role-based authentication to display the button.
  • Apply existing styles or create a new button style if necessary.

Contributor guide