Previously only 'Seller' role was filtered, but Owner/Colaborador/Entregador roles
were not filtered, causing global admin to appear in pharmacy user lists.
- shipping_handler: Remove auth restriction on GetShippingSettings (buyers need to see sellers' shipping options)
- order_handler: Add role query param parsing (buyer/seller) to filter orders by requester's company ID
Fixes 500 errors on:
- GET /api/v1/shipping/settings/{vendor_id}
- GET /api/v1/orders?role=buyer
- GET /api/v1/orders?role=seller
- ProductOffersModal: Add quantity input for each offer when purchasing
- ProductOffersModal: Display offer info in single line with flex-wrap
- GroupedProductCard: Add whitespace-nowrap to prevent 'oferta' badge wrapping
- ProductSearch: Swap Filters and Location components (Filters now first)
- Backend: Refactored admin routes to use role-based access control
- review_handler: New handler with role-based filtering
- shipping_handler: Added ListShipments with role-based filtering
- domain/models: Added SellerID to ReviewFilter and ShipmentFilter
- postgres.go: Updated ListReviews and ListShipments for SellerID filtering
- server.go: Removed /api/v1/admin routes, updated handlers
- Add tabs: 'Pedidos Feitos' (compras) and 'Pedidos Recebidos' (vendas)
- Add stats bar with totals and pending count
- Add progress tracker for purchase orders
- Improved UI with icons and better styling
- Actions only visible on sales tab
- Move logo to marketplace/src/assets/
- Apply logo in Shell.tsx header
- Add favicon and meta tags to index.html
- Create docs/database-schema.md with ER diagram
- Update README.md with database section
- Update marketplace/README.md with assets section
- Update seeder-api/README.md with new fields
- Updated SeedLean and SeedFull CREATE TABLE statements
- Added new fields to INSERT statements
- Updated generateTenants to include phone (random), operating_hours, is_24_hours
- Fixes 404 on /api/v1/companies/me due to missing columns
Backend:
- Add phone, operating_hours, is_24_hours fields to Tenant model
- Create migration 0005_tenants_operating_hours.sql for new columns
- Update postgres repository queries for new fields
Frontend Company.tsx:
- Expand company edit form with phone, city, state
- Add operating hours section with 24h toggle
- Add user edit/delete buttons with Actions column
- Add user edit modal with name, email, role fields
- Add handleDeleteUser and handleSaveUser functions
- Add companyId field to AuthUser interface in AuthContext
- Extract company_id from JWT payload in Login.tsx
- Use user.companyId to filter products where seller_id matches
- This properly excludes own store products using UUID comparison
- Change modal z-index from z-50 to z-[1000] to appear above Leaflet map
- Replace bg-primary with bg-blue-600 for visible button styling
- Fix 'Adicionar' button in ProductOffersModal
- Fix 'Ver ofertas' button in GroupedProductCard
- Add CartDropdownContent component showing cart items on hover
- Show 'carrinho vazio' message when empty
- Display up to 4 items with name, quantity, price
- Add remove button for each item in dropdown
- Show total and 'Ver carrinho completo' link
- Badge only shows when cart has items (already implemented)
- Add sortBy state with options: price, distance, expiry
- Replace static text with interactive select dropdown
- Implement sorting logic for each option in groupedProducts memo
- Add Shell layout to restore header navigation
- Filter out products from logged-in user's own pharmacy
- Group medications by name (e.g., Losartana 50mg shows as 1 card with '3 offers')
- Create GroupedProductCard component with offer count badge
- Create ProductOffersModal with sorted offers and add-to-cart
- Implement advanced filters (price range, minimum expiry days)
- Add GroupedProduct interface to types
- Sort grouped products by lowest price
- Remove Checkout link from header navigation
- Replace 'Carrinho' text with cart SVG icon
- Add red badge showing cart item count (max 99+)
- Import and use cartStore for real-time count updates
- Add ProductSearch route at /search with access for owner, seller, employee roles
- Add 'Comprar Medicamentos' button to SellerDashboard header
- Add 'Comprar Medicamentos' button and card to EmployeeDashboard
- Remove redirect that was blocking access to the product search page