Branchwell

Lumen & Gesso / website · lumengesso.com / app / lib / prodigi-dashboard.ts

1export function prodigiDashboardUrl(orderId?: string | null, sandbox = false): string {
2 const base = sandbox ? 'https://sandbox-beta-dashboard.pwinty.com' : 'https://dashboard.prodigi.com';
3 // Prodigi's dashboard uses the numeric ID without the v4 API's ord_ prefix.
4 return orderId ? `${base}/orders/${encodeURIComponent(orderId.replace(/^ord_/, ''))}/detail` : `${base}/orders`;
5}