improved rescue workflow
This commit is contained in:
+12
-7
@@ -158,7 +158,6 @@ type AdminSummary = {
|
||||
|
||||
type AdminRescueWorkspace = {
|
||||
workspace: Workspace;
|
||||
ownerEmail: string | null;
|
||||
birdCount: number;
|
||||
memberCount: number;
|
||||
};
|
||||
@@ -1003,6 +1002,16 @@ const formatBillingPlanBirdLimit = (billingPlan: BillingPlan) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
const formatBillingBirdUsage = (billingPlan: BillingPlan, birdCount: number) => {
|
||||
const birdLimit = formatBillingPlanBirdLimit(billingPlan);
|
||||
|
||||
if (!birdLimit) {
|
||||
return `${birdCount} bird${birdCount === 1 ? '' : 's'}`;
|
||||
}
|
||||
|
||||
return `${birdCount} of ${birdLimit} birds used`;
|
||||
};
|
||||
|
||||
const formatSubscriptionStatus = (status: SubscriptionStatus) => {
|
||||
if (status === 'trialing') {
|
||||
return 'Trialing';
|
||||
@@ -4554,7 +4563,7 @@ function App() {
|
||||
{formatRescueVerificationStatus(entry.workspace.rescueVerificationStatus)} • {entry.birdCount} birds • {entry.memberCount} members
|
||||
</span>
|
||||
<small>
|
||||
Owner {entry.ownerEmail ?? 'unknown'} • Billing {entry.workspace.billingEmail ?? 'not set'}
|
||||
Billing {entry.workspace.billingEmail ?? 'not set'}
|
||||
</small>
|
||||
<div className="button-row">
|
||||
<button
|
||||
@@ -5572,11 +5581,7 @@ function App() {
|
||||
<span>Billing contact for invoices, receipts, and account notices.</span>
|
||||
</article>
|
||||
<article className="summary-card">
|
||||
<strong>
|
||||
{workspace && formatBillingPlanBirdLimit(workspace.billingPlan)
|
||||
? `${birds.length} / ${formatBillingPlanBirdLimit(workspace.billingPlan)} birds`
|
||||
: `${birds.length} bird${birds.length === 1 ? '' : 's'}`}
|
||||
</strong>
|
||||
<strong>{workspace ? formatBillingBirdUsage(workspace.billingPlan, birds.length) : `${birds.length} bird${birds.length === 1 ? '' : 's'}`}</strong>
|
||||
<span>
|
||||
{workspace && formatBillingPlanBirdLimit(workspace.billingPlan)
|
||||
? 'Current bird count against your paid plan allowance.'
|
||||
|
||||
Reference in New Issue
Block a user