mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-07 03:22:21 +03:00
21 lines
635 B
JavaScript
21 lines
635 B
JavaScript
|
import Component from '@glimmer/component';
|
||
|
import {inject as service} from '@ember/service';
|
||
|
|
||
|
export default class FullAttributionTable extends Component {
|
||
|
@service membersUtils;
|
||
|
|
||
|
get sources() {
|
||
|
const availableSources = this.args.data.sources.filter(source => source.source);
|
||
|
const unavailableSources = this.args.data.sources.filter(sourceData => !sourceData.source).map((sourceData) => {
|
||
|
return {
|
||
|
...sourceData,
|
||
|
source: 'Unavailable'
|
||
|
};
|
||
|
});
|
||
|
return [
|
||
|
...availableSources,
|
||
|
...unavailableSources
|
||
|
];
|
||
|
}
|
||
|
}
|