Feature #9579
openSaaS Billing Setup + Restore POS, Ecommerce & Landscaping Sidebar for Admin Roles
30%
Description
Implement and fix Evergreen Farms (dbName: evergreen, slug: nursery/evergreen) as the main platform company so it can manage SaaS tenants and still operate POS, ecommerce, and field-service (landscaping) from the sidebar.
Backend
Map SaaS plans to company billingPlan (modules, features, capabilities, saasBilling)
Add tenant billing (renew, upgrade, top-up), usage metering, and Stripe webhooks
Reconcile legacy EVG plan on GET /nus-user/get-company: derive billingPlan.modules from features, map fieldService → landscaping, sync capabilities.*Enabled
Platform company helpers (isMainCompany, tenant filters, billing APIs)
Frontend
Platform admin: Billing & Revenue hub (all tenants, recharge status, payments)
Tenant: Settings → My Plan (usage, renew/upgrade/top-up); EVG shows platform-owner view
Fix sidebar gating so admin / manager / super_admin on EVG see POS, ecommerce, and landscaping menus
Improve platform tenant detection (dbName, slug, company_data) and persist dbName on company load
Acceptance criteria
EVG admin roles see POS, Admin (ecommerce), and Services/Quotes/Jobs (landscaping) in sidebar
get-company returns reconciled billingPlan and correct capability flags
Other tenants remain plan-gated; platform-only menus show only on EVG
Billing hub and My Plan work without “Billing not applicable to platform company” errors
Files
Subtasks
Related issues