feat(frontend): Portal public client + PDF download + Facturi view

- DevizPublicView: standalone public page /p/:token (no auth, no layout)
  - Loads order/tenant/lines from backend API
  - Accept/Reject buttons with feedback banners
  - Mobile-first design with service branding
- usePdf composable: fetch PDF blob from backend and trigger browser download
- PdfDownloadButton component: reusable button for deviz/invoice PDF download
- InvoicesView: table with invoice list from wa-sqlite, PDF download per row
- OrderDetailView: added PDF Deviz download button (visible when not DRAFT)
- Router: added /invoices route, portal /p/:token uses layout: 'none'
- App.vue: supports layout: 'none' for standalone pages
- AppLayout: added Facturi link in sidebar nav

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 17:31:41 +02:00
parent 3a922a50e6
commit efc9545ae6
8 changed files with 371 additions and 5 deletions

View File

@@ -13,8 +13,9 @@ const router = createRouter({
{ path: '/vehicles', component: () => import('../views/vehicles/VehiclesListView.vue'), meta: { requiresAuth: true } },
{ path: '/appointments', component: () => import('../views/appointments/AppointmentsView.vue'), meta: { requiresAuth: true } },
{ path: '/catalog', component: () => import('../views/catalog/CatalogView.vue'), meta: { requiresAuth: true } },
{ path: '/invoices', component: () => import('../views/orders/InvoicesView.vue'), meta: { requiresAuth: true } },
{ path: '/settings', component: () => import('../views/settings/SettingsView.vue'), meta: { requiresAuth: true } },
{ path: '/p/:token', component: () => import('../views/client/DevizPublicView.vue') },
{ path: '/p/:token', component: () => import('../views/client/DevizPublicView.vue'), meta: { layout: 'none' } },
{ path: '/', redirect: '/dashboard' },
],
scrollBehavior: () => ({ top: 0 })