mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 06:25:51 +03:00
c1ad9475d7
closes https://github.com/TryGhost/Team/issues/1029 - allows site owner to filter members on specific tier - needs tiers beta flag enabled and site should have more than 1 paid tiers.
29 lines
842 B
JavaScript
29 lines
842 B
JavaScript
import Component from '@glimmer/component';
|
|
|
|
export default class GhMembersListItemColumn extends Component {
|
|
constructor(...args) {
|
|
super(...args);
|
|
}
|
|
|
|
get labels() {
|
|
const labelData = this.args.member.get('labels') || [];
|
|
return labelData.map(label => label.name).join(', ');
|
|
}
|
|
|
|
get products() {
|
|
const productData = this.args.member.get('products') || [];
|
|
return productData.map(product => product.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;
|
|
}
|
|
}
|