|
@@ -129,14 +129,17 @@ async function printWorkspace(workspaceID: string) {
|
|
|
booked: BillingTable.timeSubscriptionBooked,
|
|
booked: BillingTable.timeSubscriptionBooked,
|
|
|
enrichment: BillingTable.subscription,
|
|
enrichment: BillingTable.subscription,
|
|
|
},
|
|
},
|
|
|
|
|
+ timeSubscriptionSelected: BillingTable.timeSubscriptionSelected,
|
|
|
})
|
|
})
|
|
|
.from(BillingTable)
|
|
.from(BillingTable)
|
|
|
.where(eq(BillingTable.workspaceID, workspace.id))
|
|
.where(eq(BillingTable.workspaceID, workspace.id))
|
|
|
.then(
|
|
.then(
|
|
|
(rows) =>
|
|
(rows) =>
|
|
|
rows.map((row) => ({
|
|
rows.map((row) => ({
|
|
|
- ...row,
|
|
|
|
|
balance: `$${(row.balance / 100000000).toFixed(2)}`,
|
|
balance: `$${(row.balance / 100000000).toFixed(2)}`,
|
|
|
|
|
+ reload: row.reload ? "yes" : "no",
|
|
|
|
|
+ customerID: row.customerID,
|
|
|
|
|
+ subscriptionID: row.subscriptionID,
|
|
|
subscription: row.subscriptionID
|
|
subscription: row.subscriptionID
|
|
|
? [
|
|
? [
|
|
|
`Black ${row.subscription.enrichment!.plan}`,
|
|
`Black ${row.subscription.enrichment!.plan}`,
|
|
@@ -145,7 +148,7 @@ async function printWorkspace(workspaceID: string) {
|
|
|
`(ref: ${row.subscriptionID})`,
|
|
`(ref: ${row.subscriptionID})`,
|
|
|
].join(" ")
|
|
].join(" ")
|
|
|
: row.subscription.booked
|
|
: row.subscription.booked
|
|
|
- ? `Waitlist ${row.subscription.plan} plan`
|
|
|
|
|
|
|
+ ? `Waitlist ${row.subscription.plan} plan${row.timeSubscriptionSelected ? " (selected)" : ""}`
|
|
|
: undefined,
|
|
: undefined,
|
|
|
}))[0],
|
|
}))[0],
|
|
|
),
|
|
),
|