Created
October 14, 2016 15:14
-
-
Save basz/2490a7549923dbce95b3b4e65c42b645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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