Ghost/ghost/admin/app/components/gh-members-list-item-column-labs.js

24 lines
682 B
JavaScript
Raw Normal View History

import Component from '@glimmer/component';
export default class GhMembersListItemColumnLabs extends Component {
constructor(...args) {
super(...args);
}
get labels() {
const labelData = this.args.member.get('labels') || [];
2021-08-13 16:17:07 +03:00
return labelData.map(label => label.name).join(', ');
}
get subscriptionStatus() {
const subscriptions = this.args.member.get('subscriptions') || [];
return subscriptions[0]?.status;
}
get billingPeriod() {
const subscriptions = this.args.member.get('subscriptions') || [];
const billingPeriod = subscriptions[0]?.price?.interval;
return billingPeriod;
}
}