Add missing "payment never made" subscription status to superadmin org list (#2457)
This commit is contained in:
parent
fa05d68292
commit
8078f3866b
@ -703,6 +703,17 @@ export class OrgsList extends BtrixElement {
|
|||||||
description: msg("Canceled"),
|
description: msg("Canceled"),
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case SubscriptionStatus.PaymentNeverMade:
|
||||||
|
subscription = {
|
||||||
|
icon: html`<sl-icon
|
||||||
|
class="text-base text-neutral-400"
|
||||||
|
name="dash-square-fill"
|
||||||
|
label=${msg("Payment Never Made")}
|
||||||
|
>
|
||||||
|
</sl-icon>`,
|
||||||
|
description: msg("Payment Never Made"),
|
||||||
|
};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ export function computeStats(orgData: OrgData[] = []) {
|
|||||||
trialing: 0,
|
trialing: 0,
|
||||||
trialingCancelled: 0,
|
trialingCancelled: 0,
|
||||||
pausedPaymentFailed: 0,
|
pausedPaymentFailed: 0,
|
||||||
|
paymentNeverMade: 0,
|
||||||
cancelled: 0,
|
cancelled: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -50,6 +51,9 @@ export function computeStats(orgData: OrgData[] = []) {
|
|||||||
case SubscriptionStatus.PausedPaymentFailed:
|
case SubscriptionStatus.PausedPaymentFailed:
|
||||||
subscriptions.pausedPaymentFailed++;
|
subscriptions.pausedPaymentFailed++;
|
||||||
break;
|
break;
|
||||||
|
case SubscriptionStatus.PaymentNeverMade:
|
||||||
|
subscriptions.paymentNeverMade++;
|
||||||
|
break;
|
||||||
case SubscriptionStatus.Cancelled:
|
case SubscriptionStatus.Cancelled:
|
||||||
subscriptions.cancelled++;
|
subscriptions.cancelled++;
|
||||||
break;
|
break;
|
||||||
@ -164,6 +168,12 @@ export class Component extends BtrixElement {
|
|||||||
subscriptions.pausedPaymentFailed,
|
subscriptions.pausedPaymentFailed,
|
||||||
)}`}</span
|
)}`}</span
|
||||||
>
|
>
|
||||||
|
${msg("Payment never made")}:
|
||||||
|
<span class="text-left font-bold text-white"
|
||||||
|
>${html`${this.localize.number(
|
||||||
|
subscriptions.paymentNeverMade,
|
||||||
|
)}`}</span
|
||||||
|
>
|
||||||
${msg("Cancelled subscriptions")}:
|
${msg("Cancelled subscriptions")}:
|
||||||
<span class="text-left font-bold text-white"
|
<span class="text-left font-bold text-white"
|
||||||
>${html`${this.localize.number(subscriptions.cancelled)}`}</span
|
>${html`${this.localize.number(subscriptions.cancelled)}`}</span
|
||||||
|
@ -7,6 +7,7 @@ export enum SubscriptionStatus {
|
|||||||
Trialing = "trialing",
|
Trialing = "trialing",
|
||||||
TrialingCanceled = "trialing_canceled",
|
TrialingCanceled = "trialing_canceled",
|
||||||
PausedPaymentFailed = "paused_payment_failed",
|
PausedPaymentFailed = "paused_payment_failed",
|
||||||
|
PaymentNeverMade = "payment_never_made",
|
||||||
Cancelled = "cancelled",
|
Cancelled = "cancelled",
|
||||||
}
|
}
|
||||||
export const subscriptionStatusSchema = z.nativeEnum(SubscriptionStatus);
|
export const subscriptionStatusSchema = z.nativeEnum(SubscriptionStatus);
|
||||||
|
Loading…
Reference in New Issue
Block a user