Skip to content

fixed the update inventory in verify medicines page

Vandana reddy Balannagari requested to merge fix/medicine-inventory into develop

What does this MR do and why?

This MR fixes the issue where the medicine status was not updating immediately after clicking "Update Inventory".

Previously:

  • After updating inventory, the status remained "Pending".
  • The updated status (e.g., "Given") was visible only after manually clicking the Refresh button or reloading the page.

Now:

  • After successful inventory update, the UI immediately reflects the updated status.
  • The existing Refresh button continues to call the same GET API to fetch latest data.
  • No functionality or UI layout was changed.
  • Only minimal logic was added to refresh state after successful update. This improves user experience and ensures real-time UI consistency.

References

  • Fixes delayed UI update after inventory change
  • Related to Verify Medicines page (/volunteer/verify-medicines)

Screenshots or screen recordings

| Before | After | |Screenshot_from_2026-02-25_15-13-52|image| | Status remained "Pending" after clicking Update Inventory | Status updates immediately to "Given" without manual refresh | (Optional: Attach screenshots here)

How to set up and validate locally

  1. Pull the latest changes from this branch.
  2. Run the frontend application: npm install npm run dev
  3. Navigate to: 4. Select a medicine with status "Pending".
  4. Click "Update Inventory".
  5. Verify that:
  • Status changes immediately (e.g., to "Given").
  • No page reload is required.
  • Refresh button still works correctly.
  • No other functionality is affected.

MR acceptance checklist

  • No existing functionality changed
  • No API routes modified
  • UI layout unchanged
  • State updates correctly after inventory update
  • Refresh button continues to work
  • Code is clean and minimal
  • No console errors
  • Tested locally
Edited by Vandana reddy Balannagari

Merge request reports

Loading