Skip to content

fix: correct specialization redirect, restrict card navigation, add medicine search

Greeshma Kanukunta requested to merge fix/workflow-navigation-consistency into develop

📌 Overview

This MR resolves workflow and UI inconsistencies across Registration, Doctor Directory, and Queue modules. It fixes incorrect navigation behavior, standardizes user interactions, and improves usability by adding search functionality.


What does this MR do and why?

Motivation

  • Incorrect redirection to the Queues page after selecting specialization
  • Inconsistent behavior depending on how the specialization page is accessed
  • Unintended navigation when clicking anywhere on cards
  • Lack of search functionality in Medicine Inventory

Approach

  • Enforced consistent navigation back to Registration page
  • Restricted navigation to only clickable name elements
  • Introduced client-side search for Medicine Inventory
  • Applied fixes uniformly across all relevant modules

🔧 Changes Made

  • Fixed specialization redirect logic
  • Removed queue-based redirection from specialization flow
  • Restricted card click navigation to name elements only
  • Added search bar in Medicine Inventory
  • Standardized behavior across all queue-related modules

🧠 Technical Details

Specialization Redirect Fix

  • Removed conditional navigation logic causing queue redirection
  • Ensured all flows return to Registration page regardless of entry point

Card Navigation Fix

  • Moved navigation handler from card container to name element
  • Prevented unintended navigation using controlled event handling

Medicine Inventory Search

  • Added search input below header
  • Implemented client-side filtering using existing data
  • Supports filtering by name, code, and optional type

🔁 Modules Covered

  • Doctor Directory (Admin)
  • Consultation Queue
  • Medicine Pickup Queue
  • Medicine Dispatch
  • Other queue-based UI components

🧪 Testing & Validation

Test Steps

  1. Register patient → Select specialization
    Expected: Returns to Registration

  2. Access specialization directly
    Expected: Returns to Registration

  3. Go to Medicine Inventory
    Expected: Search filters results

  4. Click doctor cards
    Expected: No navigation

  5. Click doctor name
    Expected: Navigates to profile

  6. Verify behavior in:

    • Doctor Directory
    • Consultation Queue
    • Medicine Pickup
    • Medicine Dispatch

Test Cases

Scenario Expected Result Status
Registration flow Returns to Registration
Direct specialization access Returns to Registration
Search functionality Filters correctly
Card click No navigation
Name click Navigates to profile

Testing Done

  • Manual testing completed
  • Unit tests added

🏷 Type of Change

  • 🐛 Bug fix
  • New feature
  • 🎨 UI/UX improvement

🧹 Code Quality Checklist

Code Standards

  • Clean and consistent code
  • No unused imports
  • No console logs
  • Lint passes

React Best Practices

  • Proper component structure
  • Correct hook usage
  • Optimized event handling

UI & Accessibility

  • Consistent UI
  • Responsive design
  • Accessibility considered

API Handling

  • No API changes
  • Existing data reused

📝 Additional Notes

  • Changes are minimal and scoped to avoid regressions
  • No backend impact
  • Focused on improving UX consistency and navigation reliability

closes issue no: !322 (closed)

MR Acceptance Checklist

https://docs.gitlab.com/development/code_review/#acceptance-checklist

Edited by Greeshma Kanukunta

Merge request reports

Loading