2022-03-09 10:43:47 +03:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import {inject as service} from '@ember/service';
|
|
|
|
|
2022-10-07 19:09:18 +03:00
|
|
|
export default class MembersListItem extends Component {
|
2022-03-09 10:43:47 +03:00
|
|
|
@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() {
|
2022-10-07 19:03:45 +03:00
|
|
|
const tierData = this.args.member?.tiers || [];
|
2022-05-11 20:11:54 +03:00
|
|
|
return tierData.map(tier => tier.name).join(', ');
|
2022-03-09 10:43:47 +03:00
|
|
|
}
|
|
|
|
}
|