User statistics updates
This commit is contained in:
@@ -19,11 +19,12 @@ export filters = Ember.Object.create
|
||||
|
||||
export default Ember.Route.extend
|
||||
queryParams:
|
||||
state: {refreshModel: true}
|
||||
project: {refreshModel: true}
|
||||
action: {refreshModel: true}
|
||||
page: {refreshModel: true}
|
||||
perPage: {refreshModel: true}
|
||||
state: {refreshModel: true}
|
||||
project: {refreshModel: true}
|
||||
action: {refreshModel: true}
|
||||
page: {refreshModel: true}
|
||||
perPage: {refreshModel: true}
|
||||
organization_id: {refreshModel: true}
|
||||
modelName: 'panda/project-instance-action'
|
||||
setupController: (controller) ->
|
||||
controller.set 'filters', filters
|
||||
@@ -53,8 +54,9 @@ export default Ember.Route.extend
|
||||
# 'pointing_project_instance_action_connections.project_instance_action.workflow_action_definition.~organization'
|
||||
# 'pointing_project_instance_action_connections.project_instance_action.workflow_action_definition.~workflow_action_offsets'
|
||||
#]
|
||||
filters.state_in = [params.state] if params.state
|
||||
filters.workflow_action_definition_identifier_in = [params.action] if params.action
|
||||
filters.set('state_in', params.state.split(',')) if params.state
|
||||
filters.set('workflow_action_definition_identifier_in', params.action.split(',')) if params.action
|
||||
filters.set('workflow_action_definition_organization_id', params.organization_id) if params.organization_id
|
||||
Ember.RSVP.hash
|
||||
projects: @store.findAll('panda/project')
|
||||
organizations: @store.findAll('panda/organization')
|
||||
@@ -66,5 +68,4 @@ export default Ember.Route.extend
|
||||
page: params.page || 1
|
||||
perPage: params.perPage || 30
|
||||
otherParams:
|
||||
#include: includes.join(',')
|
||||
include: 'action-list'
|
||||
|
||||
@@ -35,6 +35,9 @@ export default Ember.Route.extend({
|
||||
},
|
||||
perPage: {
|
||||
refreshModel: true
|
||||
},
|
||||
organization_id: {
|
||||
refreshModel: true
|
||||
}
|
||||
},
|
||||
modelName: 'panda/project-instance-action',
|
||||
@@ -44,10 +47,13 @@ export default Ember.Route.extend({
|
||||
},
|
||||
model: function(params) {
|
||||
if (params.state) {
|
||||
filters.state_in = [params.state];
|
||||
filters.set('state_in', params.state.split(','));
|
||||
}
|
||||
if (params.action) {
|
||||
filters.workflow_action_definition_identifier_in = [params.action];
|
||||
filters.set('workflow_action_definition_identifier_in', params.action.split(','));
|
||||
}
|
||||
if (params.organization_id) {
|
||||
filters.set('workflow_action_definition_organization_id', params.organization_id);
|
||||
}
|
||||
return Ember.RSVP.hash({
|
||||
projects: this.store.findAll('panda/project'),
|
||||
|
||||
Reference in New Issue
Block a user