add subscription cancellation instructions for free Group Plans subscriptions (#9606)

This commit is contained in:
Alys
2017-12-05 15:10:15 -05:00
committed by Sabe Jones
parent c56c69d464
commit 444d6889de
3 changed files with 6 additions and 4 deletions

View File

@@ -69,7 +69,7 @@
div(v-if='hasSubscription')
.btn.btn-primary(v-if='canEditCardDetails', @click='showStripeEdit()') {{ $t('subUpdateCard') }}
.btn.btn-sm.btn-danger(v-if='canCancelSubscription && !loading', @click='cancelSubscription()') {{ $t('cancelSub') }}
small(v-if='!canCancelSubscription', v-html='getCancelSubInfo()')
small(v-if='!canCancelSubscription && !hasCanceledSubscription', v-html='getCancelSubInfo()')
.subscribe-pay(v-if='!hasSubscription || hasCanceledSubscription')
h3 {{ $t('subscribeUsing') }}
@@ -260,8 +260,9 @@ export default {
subs.google_6mo.discount = false;
},
getCancelSubInfo () {
// @TODO: String 'cancelSubInfoGroup Plan' not found. ?
return this.$t(`cancelSubInfo${this.user.purchased.plan.paymentMethod}`);
let payMethod = this.user.purchased.plan.paymentMethod || '';
if (payMethod === 'Group Plan') payMethod = 'GroupPlan';
return this.$t(`cancelSubInfo${payMethod}`);
},
},
};