mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
987ec3f742
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
21 lines
531 B
JavaScript
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(', ');
|
|
}
|
|
}
|