Page:
Feature Catalogue
Pages
Architecture
Changelog
Crewing Architecture
Crewing Data Model
Crewing Design Document
Crewing Implementation Spec
Crewing Module
Crewing Roles and Permissions
Crewing Use Cases
Crewing User Stories
Crewing Workflows
Data Model
Deployment and Operations
Design System
E2E Test Framework
E2E Test Plan
Environment Variables
Feature Catalogue
File Storage
Getting Started
Glossary
Home
Inventory and Catalogue
Inventory on Approval
Issue to Deploy Pipeline
Notifications
Open Questions
PO Lifecycle
Pages and Navigation
Planned Features
Playwright Test Design
Purchase Orders
Reports Mockup
Reports
Roles and Permissions
Tech Debt
Test Plan
Test
Testing
Vendors and GST Lookup
Workflows
No results
6
Feature Catalogue
shad0w edited this page 2026-06-24 10:20:48 +00:00
Feature Catalogue
A consolidated index of what the portal does today. Each item links to the page with the detail, or names the code that implements it.
Purchase orders
- Full PO lifecycle — DRAFT → … → CLOSED with manager approval, vendor validation, payment, and receipt confirmation. Enforced by the state machine; every change is an audit row.
- Partial payments & partial receipts —
PARTIALLY_PAID/PARTIALLY_CLOSEDloop until fully settled (deliveredQuantityper line). - Structured PO numbers —
COMPANY/VESSEL/ID/FY(e.g.PMS/HNR1/9000/2024-25); system IDs start at 9000; imported POs keep their original number. See Purchase Orders. - GST-inclusive totals — per-line
gstRate(default 18%); live taxable/GST/ grand-total summary in the form. - Manager line-item editing — managers adjust quantities, prices, GST,
vendor/vessel/account inline before approving (
MANAGER_LINE_EDITaudit). - Editable PO date + compulsory payment date (no future dates).
- Excel PO import → CLOSED — historical records, auto-detecting company, matching vessel, auto-creating vendor/products/prices.
- PDF / XLSX export — gated to
MGR_APPROVED+; approver name + signature on the document; company details populate the header. - Email PO to vendor — one-click Outlook draft to the vendor's primary contact with a 7-day download link to the PO PDF, rendered by the PdfService microservice and stored in R2; the PDF is cached per PO so repeat sends reuse it and just refresh the 7-day link (issues #14 / #127 / #128).
- Discard draft, edit & resubmit, edit-highlight diff on resubmitted POs.
- Unsaved-changes prompt — leaving the PO create/edit screen with unsaved edits offers Save as draft / Discard / Stay (in-app navigation) or the browser's native warning (refresh / close). (issue #18)
Catalogue, vendors, inventory
- Multi-company invoicing — bill a PO under a sister company (PMS/HNR/DEI); details flow to the exported PO. See Data Model.
- 3-level accounting codes — Top → Sub → Leaf (6-digit); only leaf codes selectable, via a searchable combobox.
- Vendor management — submitter-created (unverified) vendors; auto-verify-on-payment; GSTIN lookup via the GST microservice; geocoded vendor-distance sourcing. See Vendors and GST Lookup.
- Product catalogue — editable at
/admin/products, read-only at/inventory/items; per-vendor price history; "Cheapest" / "★ Closest" tags. - Cart — collect items (localStorage) → create a PO pre-filled.
- Site inventory (feature-flagged) — stock per site, daily consumption log;
inventory incremented at PO approval. Gated by
NEXT_PUBLIC_INVENTORY_ENABLED. See Inventory and Catalogue.
Platform
- Auth — Microsoft Entra SSO + credentials; nullable password for SSO users; optional self-set password; approver signature upload.
- Role-based dashboards — submitter / manager / accounts / auditor views.
- Spend analytics — manager dashboard: approved-this-month, spend by cost centre and by month (Recharts).
- In-app notification bell with unread badge, plus email at every transition.
- History & export — filter by date range, cost centre, and multiple
statuses; CSV/PDF export (up to ~200 rows). Open to
export_reportsholders; submitters get read+export access under theNEXT_PUBLIC_SUBMITTER_VIEW_ALL_ENABLEDflag (read-only). See Roles and Permissions. - Mobile experience — manager/accounts get mobile cards + bottom nav; other roles see a "Desktop Required" overlay.
- PPMS rebrand — login, sidebar, and title show "PPMS".
- Environment banner — non-prod banner via
NEXT_PUBLIC_ENV_LABEL(EnvBanner); renders nothing in prod. - SuperUser access requests — request from profile; resolved at
/admin/superuser-requests.
Reports (spend analytics)
- Reports → Purchasing (
view_analytics— Manager / SuperUser / Auditor / Admin) — two report families, each index → drill-down → detail: Cost Centres (spend across vessels) and Accounting Codes (the Heading → Sub → Leaf tree). KPI tiles, comparison + trend charts (one colour per item), Top-N tables, per-row sparklines, and CSV export. Filters (granularity Weekly / Monthly / Yearly, financial year, Top/Bottom-N, an “Add to graph” custom comparison) live in the URL. See Reports.
Operations
- Report Issue button — any signed-in user files a Forgejo issue from the
header (
lib/forgejo.ts). - Automated issue→fix→PR pipeline + tag-triggered deploy. See Issue-to-Deploy Pipeline.
- Staging instance against a daily prod-mirror test DB for smoke testing.
- Microservices — three standalone Express + Playwright services on pms1:
GstService (GSTIN lookup), EpfoService (UAN/EPFO lookup), PdfService
(PO→PDF for “Email to vendor”); auto-deployed on release via
ecosystem.config.js. See Deployment and Operations.
For the screen-by-screen breakdown, see Pages and Navigation. For what shipped recently, see Changelog.
Pelagia Portal (PPMS)
Overview
Build & Run
System
Product
- Feature Catalogue
- Pages and Navigation
- Workflows
- Purchase Orders
- Vendors and GST Lookup
- Inventory and Catalogue
- Inventory on Approval
- Notifications
- File Storage
- Design System
Planned
Quality
Ops
Engineering
Pelagia Portal (PPMS) — internal purchase-order management. Self-hosted on pms1, live at pms.pelagiamarine.com. This wiki tracks the shipped product; authoritative sources are the repo code, App/CLAUDE.md, Docs/, and CHANGELOG.md.