From dd5ec26c8c09b6374e379ad523e9953ce75a4417 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 8 Jan 2026 23:44:11 -0500 Subject: wip: black --- .../routes/workspace/[id]/billing/payment-section.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'packages/console/app') diff --git a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx index e51ccc9f5..d21c4edce 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx @@ -1,6 +1,6 @@ import { Billing } from "@opencode-ai/console-core/billing.js" import { query, action, useParams, createAsync, useAction } from "@solidjs/router" -import { For, Show } from "solid-js" +import { For, Match, Show, Switch } from "solid-js" import { withActor } from "~/context/auth.withActor" import { formatDateUTC, formatDateForTable } from "../../common" import styles from "./payment-section.module.css" @@ -77,7 +77,8 @@ export function PaymentSection() { {(payment) => { const date = new Date(payment.timeCreated) - const isCredit = !payment.paymentID + const amount = + payment.enrichment?.type === "subscription" && payment.enrichment.couponID ? 0 : payment.amount return ( @@ -85,13 +86,14 @@ export function PaymentSection() { {payment.id} - ${((payment.amount ?? 0) / 100000000).toFixed(2)} - {isCredit ? " (credit)" : ""} + ${((amount ?? 0) / 100000000).toFixed(2)} + + (credit) + (subscription) + - {isCredit ? ( - - - ) : ( + {payment.paymentID ? ( + ) : ( + - )} -- cgit v1.2.3