mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated Stripe Subscription status label handling (#1784)
refs https://github.com/TryGhost/Ghost/issues/12256 * Replace `_` in stripe's status with space to setup proper status label for subscriptions * Displayed subscription status for cancelled subscriptions Co-authored-by: Fabien O'Carroll <fabien@allou.is>
This commit is contained in:
parent
f476c268b5
commit
1dd2b33499
2 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@
|
|||
<tr>
|
||||
<td class="gh-member-stripe-label">Status</td>
|
||||
<td class="gh-member-stripe-data">
|
||||
{{#if subscription.cancelAtPeriodEnd}}
|
||||
{{#if (and subscription.cancelAtPeriodEnd (not-eq subscription.status 'canceled'))}}
|
||||
<span class="gh-member-cancels-on-label">Cancels on {{subscription.validUntil}}</span>
|
||||
{{else}}
|
||||
<span class="gh-member-stripe-status">{{subscription.statusLabel}}</span>
|
||||
|
|
|
@ -33,7 +33,7 @@ export default Component.extend({
|
|||
let subscriptions = this.member.get('stripe');
|
||||
if (subscriptions && subscriptions.length > 0) {
|
||||
return subscriptions.map((subscription) => {
|
||||
const statusLabel = subscription.status === 'past_due' ? 'Past due' : subscription.status;
|
||||
const statusLabel = subscription.status ? subscription.status.replace('_', ' ') : '';
|
||||
return {
|
||||
id: subscription.id,
|
||||
customer: subscription.customer,
|
||||
|
|
Loading…
Add table
Reference in a new issue