A mixin designed to be used by the application route to change the user's department based on the query parameter setdept
if they have access to that department.
In practice, this means that after this mixin is properly set up in application route, passing ?setdept=info
to the end of any url in any app, will change the department
to Informatics before loading the page.
This is how it would be set up in routes/application.js
:
import Ember from 'ember';
import DepartmentTransitionMixin from '@bennerinformatics/ember-fw-gc/mixins/department-transition';
export default Ember.Route.extend(DepartmentTransitionMixin, {
// route code here
});
This mixin is incorporated into the application route by default in the Generator FW, so it should already be in your app. If it is not, please add it to routes/application.js
as described.