pelagia-portal/App
Hardik 2fcf35235a feat(cart): header cart icon with badge + fix PO pre-population from cart
Cart icon:
- CartIcon component in header: listens to cart-updated events, shows
  item count badge, navigates to /inventory/cart on click
- Visible for TECHNICAL, MANNING, SUPERUSER, MANAGER roles only

PO pre-population:
- /po/new page reads ?cart= searchParam, parses CartItem[] into
  LineItemInput[], passes as initialLineItems prop to NewPoForm
- NewPoForm accepts initialLineItems and seeds useState from them
  instead of always starting with one blank row
- Cart is cleared immediately when "Create Purchase Order" is clicked
  so re-visiting cart doesn't re-submit the same items

Cart fixes:
- Empty state and "Add more items" links corrected from /admin/products
  to /inventory/items and /inventory/vendors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 23:56:38 +05:30
..
pelagia-portal feat(cart): header cart icon with badge + fix PO pre-population from cart 2026-05-15 23:56:38 +05:30