From f8aac22d93d7c2dead0b21a51fb199f1f9614dbf Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 08:36:50 +0200 Subject: [PATCH] feat(billing-history-table): Billing-Page bekommt Mock-Rechnungshistorie [tsc:fail] --- .phase24-state.json | 5 +- GENERATION_LOG.md | 17 ++++ apps/web/src/pages/Billing.tsx | 180 +++++++++++++++++++++------------ 3 files changed, 133 insertions(+), 69 deletions(-) diff --git a/.phase24-state.json b/.phase24-state.json index 335f79f..575b158 100644 --- a/.phase24-state.json +++ b/.phase24-state.json @@ -1,8 +1,9 @@ { "completed_features": [], - "current_feature": "workspace-switcher-stub", + "current_feature": "billing-history-table", "started_at": "2026-05-23T08:33:42.059540", "attempted_features": [ - "notification-bell" + "notification-bell", + "workspace-switcher-stub" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index cc51c1b..dbbaf05 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -2821,3 +2821,20 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy +- `08:35:42` **INFO** Committed feature workspace-switcher-stub +- `08:35:42` **INFO** Pushed: rc=0 + +## Phase-3 Feature: billing-history-table (2026-05-23 08:35:42) + +- `08:35:42` **INFO** Description: Billing-Page bekommt Mock-Rechnungshistorie +- `08:35:42` **INFO** Generating apps/web/src/pages/Billing.tsx (ERWEITERT — behalte Plans-Cards. Füge Section 'Rechnungshistorie': Moc…) +- `08:36:48` **INFO** wrote 7601 chars in 65.6s (attempt 1) +- `08:36:48` **INFO** Running tsc --noEmit on api… +- `08:36:50` **WARN** tsc errors: +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'. + Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy diff --git a/apps/web/src/pages/Billing.tsx b/apps/web/src/pages/Billing.tsx index 4fd0a0c..43cb4a7 100644 --- a/apps/web/src/pages/Billing.tsx +++ b/apps/web/src/pages/Billing.tsx @@ -10,6 +10,14 @@ interface Plan { highlighted?: boolean } +interface Invoice { + id: string + date: string + amount: string + status: 'paid' | 'pending' + invoiceUrl: string +} + const PLANS: Plan[] = [ { name: "Free", @@ -32,19 +40,28 @@ const PLANS: Plan[] = [ }, ] +const MOCK_INVOICES: Invoice[] = [ + { id: "INV-001", date: "2023-12-01", amount: "12.00€", status: "paid", invoiceUrl: "#" }, + { id: "INV-002", date: "2023-11-01", amount: "12.00€", status: "paid", invoiceUrl: "#" }, + { id: "INV-003", date: "2023-10-01", amount: "12.00€", status: "pending", invoiceUrl: "#" }, +] + export default function Billing() { const { data: currentUser, isLoading } = useQuery({ queryKey: ["me"], queryFn: () => api.getMe(), }) - // Mocking current plan as 'Free' for now as per requirements const currentPlan = "Free" const handleUpgrade = (planName: string) => { toast.success(`Stripe-Integration for ${planName} comes in v2`) } + const handleDownload = () => { + toast.error("Invoice downloads coming in v2") + } + if (isLoading) { return
Loading billing details...
} @@ -64,76 +81,105 @@ export default function Billing() { -
- {PLANS.map((plan) => ( -
- {plan.highlighted && ( - - MOST POPULAR - - )} - -
-

{plan.name}

-
- {plan.price} - {plan.price !== "Custom" && ( - /user/month - )} -
-

{plan.description}

-
- -
    - {plan.features.map((feature) => ( -
  • - - - - {feature} -
  • - ))} -
- - -
- ))} -
+ {plan.highlighted && ( + + MOST POPULAR + + )} + +
+

{plan.name}

+
+ {plan.price} + {plan.price !== "Custom" && ( + /user/month + )} +
+

{plan.description}

+
-
-

Payment Method

-
-
-
- CARD +
    + {plan.features.map((feature) => ( +
  • + + + + {feature} +
  • + ))} +
+ +
-
-

No card on file

-

Add a payment method to upgrade your plan

-
-
- + ))} +
+
+ +
+
+

Invoice History

+ Last 3 months +
+ +
+ + + + + + + + + + + + {MOCK_INVOICES.map((invoice) => ( + + + + + + + + ))} + +
Invoice IDDateAmountStatusAction
{invoice.id}{invoice.date}{invoice.amount} + + {invoice.status} + + + +