diff --git a/admin/src/pages/BillingTab.tsx b/admin/src/pages/BillingTab.tsx index 34eedd3..2bc4643 100644 --- a/admin/src/pages/BillingTab.tsx +++ b/admin/src/pages/BillingTab.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useState } from 'react'; -import { api, BillingInterval, downloadFile, Plan, SubscriptionStatus } from '../api'; +import { api, BillingInterval, downloadFile, Plan, PLAN_LABEL, SubscriptionStatus } from '../api'; interface CatalogEntry { plan: Plan; @@ -79,11 +79,34 @@ export function BillingTab({ storeId, contactEmail, onChange }: { storeId: strin const chosenPlan = plan ?? sub?.plan ?? 'PRO'; const chosenInterval = interval ?? sub?.interval ?? 'MONTH'; + const paidTotal = data.invoices.filter((i) => i.paidAt).reduce((n, i) => n + i.amountCents, 0); + const unpaid = data.invoices.filter((i) => !i.paidAt).length; + return ( <> {data.testMode &&
{data.subscribeUrl}
+
+ - Lien permanent (il ne périme pas) : {data.subscribeUrl}. - Le commerçant pourra saisir un code promo sur la page de paiement (codes à créer dans Stripe → Coupons). + Il ne périme pas. Le commerçant peut saisir un code promo sur la page de paiement (codes à créer dans Stripe → Coupons).