Skip to content

Instantly share code, notes, and snippets.

@basz
Created October 14, 2016 15:14
Show Gist options
  • Select an option

  • Save basz/2490a7549923dbce95b3b4e65c42b645 to your computer and use it in GitHub Desktop.

Select an option

Save basz/2490a7549923dbce95b3b4e65c42b645 to your computer and use it in GitHub Desktop.
import Ember from "ember";
export default Ember.Route.extend({
store: Ember.inject.service(),
account: Ember.inject.service(),
model: Ember.computed('account.selectedCustomer', 'account.selectedCustomerPractice', function () {
return {
selectedCustomer: this.get('account.selectedCustomer'),
selectedCustomerPractice: this.get('account.selectedCustomerPractice'),
availableCustomers: this.store.query('customer/customer', {
filter: {
'owner-only': 1
}
}),
availableCustomerPractices: this.store.query('customer/practice', {
filter: {
'owner-only': 1,
'customer-id': this.get('account.selectedCustomer.id')
}
})
};
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment