Ghost/ghost/admin/app/components/gh-members-list-item.js
Rishabh 987ec3f742 Added status/tier as default column for members index table
refs https://github.com/TryGhost/Team/issues/1035

- provides context on member's tier/status on default index table
- removes extra membership tier column as information is captured in status column
2022-03-09 14:21:16 +05:30

21 lines
531 B
JavaScript

import Component from '@glimmer/component';
import {get} from '@ember/object';
import {inject as service} from '@ember/service';
export default class GhMembersListItem extends Component {
@service store;
constructor(...args) {
super(...args);
}
get hasMultipleProducts() {
return this.store.peekAll('product')?.length > 1;
}
get products() {
const productData = get(this.args.member, 'products') || [];
return productData.map(product => product.name).join(', ');
}
}