feat(invoices): Persian line items + elegant client-side PDF download

- Translate persisted English invoice line labels/descriptions/reasons to
  Persian at display time (new lib/invoice-labels.ts), covering both new and
  historical invoices without a data migration.
- Generate a styled, RTL Persian invoice PDF on the client (lib/invoice-pdf.ts)
  with the Abrban logo, line-item table and totals, via html2canvas + jsPDF.
- Wire both the user and admin invoice pages to the translator and new download.
- Add invoices.pdf dictionary keys (fa/en).
- Remove the now-dead ASCII-only backend PDF endpoints and generateInvoicePdf.
- Add frontend/.npmrc (npmmirror registry + high timeouts) for Iran-network installs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
keyhan
2026-06-19 19:59:22 +03:30
parent 78ed95b29b
commit 4d64fda227
11 changed files with 677 additions and 133 deletions
+15
View File
@@ -704,6 +704,21 @@ const fa = {
statusUpdated: 'وضعیت فاکتور به‌روزرسانی شد',
statusUpdateFailed: 'به‌روزرسانی وضعیت فاکتور ناموفق بود',
reasonRequired: 'برای تغییر دستی وضعیت، ذکر دلیل الزامی است',
pdf: {
documentTitle: 'فاکتور',
tagline: 'زیرساخت ابری، در کنترل تو',
invoiceNumberLabel: 'شمارهٔ فاکتور',
colIndex: 'ردیف',
colDesc: 'شرح اقلام',
colAmount: 'مبلغ',
customer: 'مشتری',
application: 'اپلیکیشن',
createdAt: 'تاریخ صدور',
paidAt: 'تاریخ پرداخت',
subtotal: 'جمع جزء',
generatedAt: 'این سند در تاریخ {date} به‌صورت خودکار صادر شده است.',
footer: 'ابربان — abrban.com',
},
},
logs: {
title: 'لاگ‌ها',