mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-11 09:53:32 +03:00
edf38cdde4
refs https://github.com/TryGhost/Team/issues/943 - fixes label shown for billing period and subscription status on the table for filtered data
24 lines
682 B
JavaScript
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;
|
|
}
|
|
}
|