Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Route.extend({
- model: function() {
- return Ember.RSVP.hash({
- transactions: this.store.find('transaction'),
- runResults: this.store.find('run-result'),
- runTypes: this.store.find('run-type'),
- transactionResults: this.store.find('transaction-result').then(function(transactionResults) {
- var transactions = transactionResults.getEach('transaction');
- var runResults = transactionResults.getEach('runResult');
- return Ember.RSVP.all(transactions.concat(runResults)).then(function() {
- return transactionResults;
- })
- })
- });
- },
- setupController: function(controller, model) {
- controller.set('model', model.transactions);
- controller.set('runResults', model.runResults);
- controller.set('transactionResults', model.transactionResults);
- controller.set('runTypes', model.runTypes);
- },
- deactivate: function() {
- this.controller.set('startDate', null);
- this.controller.set('endDate', null);
- this.controller.set('type', null);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement