43f5d7c621
refs https://github.com/TryGhost/Team/issues/1084 - updates offer list to show fixed amount discounts - cleans up offer list usage
21 lines
487 B
JavaScript
21 lines
487 B
JavaScript
import Controller from '@ember/controller';
|
|
import {task} from 'ember-concurrency-decorators';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class MembersController extends Controller {
|
|
@tracked offers = [];
|
|
|
|
constructor() {
|
|
super(...arguments);
|
|
}
|
|
|
|
get offersExist() {
|
|
return this.offers.length > 0;
|
|
}
|
|
|
|
@task({restartable: true})
|
|
*fetchOffersTask() {
|
|
this.offers = yield this.store.query('offer', {limit: 'all'});
|
|
}
|
|
}
|