diff --git a/apps/mana/apps/web/src/lib/app-registry/apps.ts b/apps/mana/apps/web/src/lib/app-registry/apps.ts index abb981a5b..cc61f2864 100644 --- a/apps/mana/apps/web/src/lib/app-registry/apps.ts +++ b/apps/mana/apps/web/src/lib/app-registry/apps.ts @@ -67,7 +67,6 @@ import { Key, Question, ChatCircleDots, - CreditCard, SquaresFour, Scroll, Spiral, @@ -1189,13 +1188,3 @@ registerApp({ list: { load: () => import('$lib/modules/feedback/ListView.svelte') }, }, }); - -registerApp({ - id: 'subscription', - name: 'Abonnement', - color: '#10B981', - icon: CreditCard, - views: { - list: { load: () => import('$lib/modules/subscription/ListView.svelte') }, - }, -}); diff --git a/apps/mana/apps/web/src/lib/modules/credits/ListView.svelte b/apps/mana/apps/web/src/lib/modules/credits/ListView.svelte index 89fba5632..1eed84f96 100644 --- a/apps/mana/apps/web/src/lib/modules/credits/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/credits/ListView.svelte @@ -1,7 +1,7 @@
- {#each [{ key: 'overview', label: 'Übersicht' }, { key: 'subscriptions', label: 'Abonnements' }, { key: 'transactions', label: 'Transaktionen' }, { key: 'packages', label: 'Kaufen' }, { key: 'costs', label: 'Kosten' }] as tab} + {#each [{ key: 'overview', label: 'Übersicht' }, { key: 'subscriptions', label: 'Abo' }, { key: 'transactions', label: 'Verlauf' }, { key: 'packages', label: 'Kaufen' }, { key: 'costs', label: 'Kosten' }] as tab} +
+
+
+ Zeitraum + {sub.billingInterval === 'year' ? 'Jährlich' : 'Monatlich'} +
+
+ Periode + + {formatDateShort(sub.currentPeriodStart)} – {formatDateShort(sub.currentPeriodEnd)} + +
+
+ {#if sub.cancelAtPeriodEnd} + Endet am + {formatDateShort(sub.currentPeriodEnd)} + + {:else} + Verlängert am + {formatDateShort(sub.currentPeriodEnd)} + + {/if} +
+
+ + {:else} +
+
+ Free Plan + Aktuell +
+ 150 Mana / Monat +
+ {/if} + + +
+ + +
+ + +
+ {#each subPlans as plan} + {@const isCurrent = currentSub?.plan?.id === plan.id} + {@const price = + billingInterval === 'year' ? plan.priceYearlyEuroCents : plan.priceMonthlyEuroCents} + + {/each} +
+ + + {#if invoices.length > 0} +
+ Rechnungen ({invoices.length}) +
+ {#each invoices as inv} +
+
+ {inv.number || '-'} + {formatDateShort(inv.createdAt)} +
+
+ {formatPrice(inv.amountPaidEuroCents)} + + {inv.status === 'paid' ? 'Bezahlt' : inv.status} + + {#if inv.invoicePdfUrl} + PDF + {/if} +
+
+ {/each} +
+
+ {/if} {:else if activeTab === 'transactions'} @@ -485,9 +715,7 @@ {#if toastMessage} -
- {toastMessage} -
+
{toastMessage}
{/if}