2022-03-09 10:43:47 +03:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
get hasMultipleTiers() {
|
|
|
|
return this.store.peekAll('tier')?.length > 1;
|
2022-03-09 10:43:47 +03:00
|
|
|
}
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
get tiers() {
|
|
|
|
const tierData = get(this.args.member, 'tiers') || [];
|
|
|
|
return tierData.map(tier => tier.name).join(', ');
|
2022-03-09 10:43:47 +03:00
|
|
|
}
|
|
|
|
}
|