Ghost/ghost/admin/app/components/gh-members-list-item-column-labs.js
Rishabh edf38cdde4 Updated filtered column labels in table
refs https://github.com/TryGhost/Team/issues/943

- fixes label shown for billing period and subscription status on the table for filtered data
2021-08-16 14:43:37 +05:30

24 lines
682 B
JavaScript

import Component from '@glimmer/component';
export default class GhMembersListItemColumnLabs extends Component {
constructor(...args) {
super(...args);
}
get labels() {
const labelData = this.args.member.get('labels') || [];
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;
}
}