Ghost/ghost/admin/app/controllers/offers.js
Rishabh 43f5d7c621 Refined offers list screen
refs https://github.com/TryGhost/Team/issues/1084

- updates offer list to show fixed amount discounts
- cleans up offer list usage
2021-10-08 01:39:42 +05:30

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'});
}
}