50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
// Generated by CoffeeScript 1.12.5
|
|
import Ember from 'ember';
|
|
|
|
import PagedRemoteArray from 'ember-cli-dunlop/utils/paged-remote-array';
|
|
|
|
export var filters = Ember.Object.create({
|
|
filter_calls: 0,
|
|
workflow_action_definition_id_in: [],
|
|
project_instance_group_workflow_group_id: '',
|
|
project_id: '',
|
|
project_instance_project_scenario_id: '',
|
|
workflow_action_definition_organization_id: '',
|
|
workflow_action_definition_title_cont: '',
|
|
project_instance_client_identifier_cont: '',
|
|
target_date_not_null: 1,
|
|
state_in: [],
|
|
target_date_gteq: null,
|
|
target_date_lteq: null,
|
|
s: 'target_date asc'
|
|
});
|
|
|
|
export default Ember.Route.extend({
|
|
queryParams: {
|
|
q: {
|
|
refreshModel: true
|
|
}
|
|
},
|
|
modelName: 'panda/project-instance-action',
|
|
setupController: function(controller) {
|
|
controller.set('filters', filters);
|
|
return this._super.apply(this, arguments);
|
|
},
|
|
model: function(params) {
|
|
return Ember.RSVP.hash({
|
|
projects: this.store.findAll('panda/project'),
|
|
organizations: this.store.findAll('panda/organization'),
|
|
project_instance_actions: PagedRemoteArray.create({
|
|
modelName: this.modelName,
|
|
store: this.store,
|
|
filters: filters,
|
|
page: params.page || 1,
|
|
perPage: params.perPage || 30,
|
|
otherParams: {
|
|
include: 'action-list'
|
|
}
|
|
})
|
|
});
|
|
}
|
|
});
|