@kernhq/module-billing 0.5.7 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kernhq/module-billing",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "Kern billing module: plans, entitlements, subscriptions and Stripe — the mechanism that lets any Kern instance sell seats on itself",
|
|
5
5
|
"homepage": "https://github.com/KernAIO/module-billing#readme",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
package/src/client/i18n.ts
CHANGED
|
@@ -128,6 +128,7 @@ export const en: Record<string, Message> = {
|
|
|
128
128
|
'billing.invoice_date': 'Date',
|
|
129
129
|
'billing.invoice_number': 'Invoice',
|
|
130
130
|
'billing.invoice_view': 'View',
|
|
131
|
+
'billing.invoice_pdf': 'PDF',
|
|
131
132
|
'billing.invoices_empty': 'No invoices yet',
|
|
132
133
|
'billing.invoices_empty_hint': 'An invoice appears here after the first payment.',
|
|
133
134
|
'billing.invoices_section': 'Invoices',
|
|
@@ -287,6 +288,7 @@ const ar: Record<string, Message> = {
|
|
|
287
288
|
'billing.invoice_date': 'التاريخ',
|
|
288
289
|
'billing.invoice_number': 'الفاتورة',
|
|
289
290
|
'billing.invoice_view': 'عرض',
|
|
291
|
+
'billing.invoice_pdf': 'PDF',
|
|
290
292
|
'billing.invoices_empty': 'لا فواتير بعد',
|
|
291
293
|
'billing.invoices_empty_hint': 'تظهر الفاتورة هنا بعد أول عملية دفع.',
|
|
292
294
|
'billing.invoices_section': 'الفواتير',
|
|
@@ -453,6 +455,7 @@ const de: Record<string, Message> = {
|
|
|
453
455
|
'billing.invoice_date': 'Datum',
|
|
454
456
|
'billing.invoice_number': 'Rechnung',
|
|
455
457
|
'billing.invoice_view': 'Ansehen',
|
|
458
|
+
'billing.invoice_pdf': 'PDF',
|
|
456
459
|
'billing.invoices_empty': 'Noch keine Rechnungen',
|
|
457
460
|
'billing.invoices_empty_hint': 'Nach der ersten Zahlung erscheint hier eine Rechnung.',
|
|
458
461
|
'billing.invoices_section': 'Rechnungen',
|
|
@@ -612,6 +615,7 @@ const fa: Record<string, Message> = {
|
|
|
612
615
|
'billing.invoice_date': 'تاریخ',
|
|
613
616
|
'billing.invoice_number': 'صورتحساب',
|
|
614
617
|
'billing.invoice_view': 'نمایش',
|
|
618
|
+
'billing.invoice_pdf': 'PDF',
|
|
615
619
|
'billing.invoices_empty': 'هنوز صورتحسابی نیست',
|
|
616
620
|
'billing.invoices_empty_hint': 'پس از نخستین پرداخت، صورتحساب اینجا میآید.',
|
|
617
621
|
'billing.invoices_section': 'صورتحسابها',
|
|
@@ -770,6 +774,7 @@ const tr: Record<string, Message> = {
|
|
|
770
774
|
'billing.invoice_date': 'Tarih',
|
|
771
775
|
'billing.invoice_number': 'Fatura',
|
|
772
776
|
'billing.invoice_view': 'Görüntüle',
|
|
777
|
+
'billing.invoice_pdf': 'PDF',
|
|
773
778
|
'billing.invoices_empty': 'Henüz fatura yok',
|
|
774
779
|
'billing.invoices_empty_hint': 'İlk ödemeden sonra burada bir fatura görünür.',
|
|
775
780
|
'billing.invoices_section': 'Faturalar',
|
|
@@ -323,7 +323,8 @@ function once(run: () => void) {
|
|
|
323
323
|
</EmptyState>
|
|
324
324
|
{:else}
|
|
325
325
|
<!-- current plan -->
|
|
326
|
-
|
|
326
|
+
<!-- The card's own padding is off so the 20px inside is the only padding, on every side. -->
|
|
327
|
+
<Card padding="none">
|
|
327
328
|
<div class="grid gap-4 p-5">
|
|
328
329
|
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
329
330
|
<div class="grid gap-1">
|
|
@@ -419,15 +420,16 @@ function once(run: () => void) {
|
|
|
419
420
|
last line with the card's padding pooled underneath. The layout lives on an element
|
|
420
421
|
of our own inside the card.
|
|
421
422
|
-->
|
|
422
|
-
<Card
|
|
423
|
-
<div class="grid h-full content-between gap-5">
|
|
423
|
+
<Card padding="none">
|
|
424
|
+
<div class="grid h-full content-between gap-5 p-5">
|
|
424
425
|
<div class="grid gap-2">
|
|
425
426
|
<div class="flex items-center justify-between gap-2">
|
|
426
427
|
<span class="text-[15px] font-medium text-[var(--kern-ink-900)]">{plan.name}</span>
|
|
427
428
|
{#if isCurrent}<Badge tone="accent">{t('current')}</Badge>{/if}
|
|
428
429
|
</div>
|
|
429
430
|
<div class="flex items-baseline gap-1.5">
|
|
430
|
-
|
|
431
|
+
<!-- 22px type at the default line-height leaves a hole above the digits. -->
|
|
432
|
+
<span class="text-[22px] font-medium leading-none text-[var(--kern-ink-900)]">
|
|
431
433
|
{formatMoney(plan.priceMinor, plan.currency, locale)}
|
|
432
434
|
</span>
|
|
433
435
|
<span class="text-[12px] text-[var(--kern-ink-400)]">{priceNote(plan)}</span>
|
|
@@ -512,16 +514,31 @@ function once(run: () => void) {
|
|
|
512
514
|
<TableCell>{day(inv.createdAt)}</TableCell>
|
|
513
515
|
<TableCell end>{formatMoney(inv.totalMinor, inv.currency, locale)}</TableCell>
|
|
514
516
|
<TableCell end>
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
517
|
+
<!-- Both links Stripe gives us: the hosted page (pay, see the receipt) and the PDF
|
|
518
|
+
an accountant files. Neither is ours to render, so nothing is shown when
|
|
519
|
+
Stripe sent none. -->
|
|
520
|
+
<span class="inline-flex items-center gap-3">
|
|
521
|
+
{#if inv.hostedUrl}
|
|
522
|
+
<a
|
|
523
|
+
class="text-[13px] text-[var(--kern-accent-deep)] underline-offset-2 hover:underline"
|
|
524
|
+
href={inv.hostedUrl}
|
|
525
|
+
target="_blank"
|
|
526
|
+
rel="noreferrer noopener"
|
|
527
|
+
>
|
|
528
|
+
{t('invoice_view')}
|
|
529
|
+
</a>
|
|
530
|
+
{/if}
|
|
531
|
+
{#if inv.pdfUrl}
|
|
532
|
+
<a
|
|
533
|
+
class="text-[13px] text-[var(--kern-accent-deep)] underline-offset-2 hover:underline"
|
|
534
|
+
href={inv.pdfUrl}
|
|
535
|
+
target="_blank"
|
|
536
|
+
rel="noreferrer noopener"
|
|
537
|
+
>
|
|
538
|
+
{t('invoice_pdf')}
|
|
539
|
+
</a>
|
|
540
|
+
{/if}
|
|
541
|
+
</span>
|
|
525
542
|
</TableCell>
|
|
526
543
|
</TableRow>
|
|
527
544
|
{/each}
|