No description
Permissions & access: - MANAGER gains create_po, submit_po, edit_own_draft_po, view_own_pos, manage_vendors - ACCOUNTS gains manage_vendors - ACCOUNTS added to provide_vendor_id state transition - MANAGER added to DRAFT/EDITS_REQUESTED submit allowed roles - canProvideVendorId now includes ACCOUNTS and any MANAGER/SUPERUSER Vendor required for approval: - approvepo() now returns error if po.vendorId is null - Approval page shows danger banner when vendor is missing Navigation: - MANAGER gets "New PO", "My Purchase Orders", "Import PO", "Vendors" nav items - ACCOUNTS gets "Vendors" nav item Seed data: - Vendors: 12 total (up from 3), with GST, address, contact details - Products: 25 total (up from 4), with lastPrice pre-populated Product fuzzy search in line items editor: - Typing ≥2 chars in description fetches /api/products/search?q= - Dropdown shows code, name, description, last price - Selecting a product auto-fills description and unit price - Linked items show a "✓ linked" indicator - productId passed through FormData to createPo action and stored on POLineItem Excel PO import (/po/import): - MANAGER, SUPERUSER, ADMIN can access - Uploads .xlsx file to /api/po/import which parses the Pelagia PO format - Extracts vendor, line items, quotation ref, T&C, delivery address - Preview step: user selects vessel + account, auto-matches vendor by name - Confirmed import creates PO in DRAFT status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| App/pelagia-portal | ||
| .gitignore | ||