mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated member detail screen to handle free memberships
This commit is contained in:
parent
015bf9da0c
commit
3bc06608b9
1 changed files with 10 additions and 4 deletions
|
@ -14,13 +14,19 @@ export default Controller.extend({
|
|||
member: alias('model'),
|
||||
|
||||
subscription: computed('member.subscriptions', function () {
|
||||
let subscriptions = this.member.get('subscriptions') || [];
|
||||
let subscriptions = this.member.get('subscriptions');
|
||||
if (!subscriptions) {
|
||||
return {
|
||||
amount: '...',
|
||||
status: '...',
|
||||
plan: '...'
|
||||
};
|
||||
}
|
||||
let subscription = subscriptions[0] || {};
|
||||
return {
|
||||
amount: subscription.amount ? (subscription.amount / 100) : '...',
|
||||
status: subscription.status || '...',
|
||||
amount: subscription.amount ? (subscription.amount / 100) : 0,
|
||||
status: subscription.status || '-',
|
||||
plan: subscription.plan || 'Free'
|
||||
|
||||
};
|
||||
}),
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue