See Allinq epots changelog v1.3.0
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
import Ember from 'ember'
|
||||
{get} = Ember
|
||||
|
||||
export default Ember.Component.extend
|
||||
tagName: 'span'
|
||||
organizations: []
|
||||
relevant_organizations: Ember.computed 'organizations.[]', 'globals.current_user.admin', ->
|
||||
return [] unless user = @get('globals.current_user')
|
||||
organizations = @get('organizations')
|
||||
return organizations if get(user, 'admin')
|
||||
organizations.filter (o) ->
|
||||
user_ids = get(o, 'users').mapBy('id')
|
||||
get(user, 'id') in user_ids
|
||||
actions:
|
||||
apply_filters: ->
|
||||
@get('apply_filters')?()
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
// Generated by CoffeeScript 1.12.5
|
||||
var get,
|
||||
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
import Ember from 'ember';
|
||||
|
||||
get = Ember.get;
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'span',
|
||||
organizations: [],
|
||||
relevant_organizations: Ember.computed('organizations.[]', 'globals.current_user.admin', function() {
|
||||
var organizations, user;
|
||||
if (!(user = this.get('globals.current_user'))) {
|
||||
return [];
|
||||
}
|
||||
organizations = this.get('organizations');
|
||||
if (get(user, 'admin')) {
|
||||
return organizations;
|
||||
}
|
||||
return organizations.filter(function(o) {
|
||||
var ref, user_ids;
|
||||
user_ids = get(o, 'users').mapBy('id');
|
||||
return ref = get(user, 'id'), indexOf.call(user_ids, ref) >= 0;
|
||||
});
|
||||
}),
|
||||
actions: {
|
||||
apply_filters: function() {
|
||||
var base;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Ember from 'ember'
|
||||
|
||||
export default Ember.Component.extend
|
||||
tagName: 'span'
|
||||
classNames: ['project-instance-action-value-display']
|
||||
eventIO: null
|
||||
project_instance_action: null
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'span',
|
||||
classNames: ['project-instance-action-value-display'],
|
||||
eventIO: null,
|
||||
project_instance_action: null,
|
||||
|
||||
@@ -3,7 +3,6 @@ import {create_date_sort} from 'ember-cli-dunlop/utils/date-sort'
|
||||
{get} = Ember
|
||||
date_sort = create_date_sort('reference_date')
|
||||
export default Ember.Controller.extend
|
||||
possible_states: ['uncategorized', 'unplanned', 'planned', 'active', 'overdue', 'any_rejected', 'all_completed']
|
||||
#filter: Ember.Object.create
|
||||
# project_scenario_id_in: []
|
||||
# state_in: []
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
import Ember from 'ember'
|
||||
import PagedRemoteArray from 'ember-cli-pagination/remote/paged-remote-array'
|
||||
export default_filter = Ember.Object.create
|
||||
workflow_group_id_in: []
|
||||
state_in: []
|
||||
s: 'project_instance_reference_date asc'
|
||||
export default Ember.Route.extend
|
||||
queryParams:
|
||||
q:
|
||||
refreshModel: true
|
||||
|
||||
setupController: (controller, model) ->
|
||||
controller.set 'filters', default_filter
|
||||
controller.set 'project', @modelFor('project.show')
|
||||
@_super arguments...
|
||||
|
||||
model: (params) ->
|
||||
#project = @modelFor('project.show')
|
||||
#Ember.RSVP.hash
|
||||
# project: project
|
||||
# project_instance_groups: @store.peekAll('panda/project-instance-group').filterBy('project_instance.project.id', project.get('id'))
|
||||
@modelFor 'project.show'
|
||||
project = @modelFor 'project.show'
|
||||
#@store.findAll('epots/migration-window-planning')
|
||||
default_filter.project_id = project.id
|
||||
otherParams = {q: default_filter.toProperties()}
|
||||
PagedRemoteArray.create
|
||||
modelName: 'panda/project-instance-group'
|
||||
store: @store
|
||||
page: params.page || 1
|
||||
perPage: params.perPage || 30
|
||||
otherParams: otherParams
|
||||
paramMapping:
|
||||
total_pages: 'total-pages'
|
||||
total_count: 'total-count'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Ember from 'ember'
|
||||
import PagedRemoteArray from 'ember-cli-pagination/remote/paged-remote-array'
|
||||
export default_filter = Ember.Object.create
|
||||
state_in: []
|
||||
s: 'reference_date asc'
|
||||
|
||||
export default Ember.Route.extend
|
||||
|
||||
@@ -45,7 +45,7 @@ table.ui.attached.stiped.table
|
||||
th
|
||||
= filter.input key='workflow_action_definition_title_cont'
|
||||
= filter.input key='project_instance_client_identifier_cont'
|
||||
= filter.dropdown-select key='state' options=globals.project_instance_action.states translationPath='attributes.state'
|
||||
= filter.dropdown-select-multiple key='state_in' options=globals.project_instance_action.states translationPath='attributes.state'
|
||||
= filter.input key='notes_cont'
|
||||
= filter.date-range key='target_date' expandingTime=true weekSelector=true
|
||||
th
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.default.text= t 'action.select_model' modelPath='models.organization'
|
||||
i.dropdown.icon
|
||||
.menu
|
||||
each organizations as |organization|
|
||||
each relevant_organizations as |organization|
|
||||
.item data-value='{{map-value mapper organization}}'
|
||||
= organization.name
|
||||
if scope_organization
|
||||
|
||||
@@ -56,7 +56,7 @@ table.ui.stiped.table
|
||||
if filters.workflow_action_definition_id_in.length
|
||||
i.remove.icon{action 'clear_filter' 'workflow_action_definition_id_in'}
|
||||
= filter.input key='project_instance_client_identifier_cont'
|
||||
= filter.dropdown-select key='state' options=globals.project_instance_action.states translationPath='attributes.state'
|
||||
= filter.dropdown-select-multiple key='state_in' options=globals.project_instance_action.states translationPath='attributes.state'
|
||||
filter.date-range key='target_date'
|
||||
/th class=date_filter_active:active-filter
|
||||
ui-dropdown class='right basic labeled top right pointing icon' action='nothing'
|
||||
|
||||
@@ -4,9 +4,12 @@ d-breadcrumbs as |breadcrumb|
|
||||
breadcrumb.item
|
||||
span= t 'models.project'
|
||||
span :
|
||||
= link-to 'project.show' model: span= model.name
|
||||
= link-to 'project.show' project: span= project.name
|
||||
breadcrumb.item active=true
|
||||
span= t 'models.plural.project_instance_group'
|
||||
.ui.right.floated.pagination.menu= page-numbers content=model showFL=true
|
||||
= page-title 'models.plural.project_instance_group'
|
||||
= pagination-progress content=model class='between-brackets'
|
||||
table.ui.stiped.table
|
||||
thead
|
||||
tr
|
||||
@@ -25,8 +28,12 @@ table.ui.stiped.table
|
||||
|
||||
th= t 'models.project_instance'
|
||||
th= t 'attributes.project_instance_group.state'
|
||||
table-filters content=model filters=filters as |filter|
|
||||
= filter.dropdown-select key='workflow_group_id' options=project.sorted_workflow_groups labelPath='name'
|
||||
= filter.input key='project_instance_client_identifier_cont'
|
||||
= filter.dropdown-select-multiple key='state_in' options=globals.project_instance_group.states translationPath='attributes.state'
|
||||
tbody
|
||||
each model.project_instance_groups as |project_instance_group|
|
||||
each model as |project_instance_group|
|
||||
tr
|
||||
td= link-to 'project.show.project-instance-group.show' project_instance_group.project_instance.project project_instance_group
|
||||
span= project_instance_group.workflow_group.name
|
||||
|
||||
@@ -25,7 +25,7 @@ table.ui.table
|
||||
i.upload.icon
|
||||
table-filters content=model filters=filters as |filter|
|
||||
= filter.input key='client_identifier_cont'
|
||||
= filter.dropdown-select key='state' options=possible_states
|
||||
= filter.dropdown-select-multiple key='state_in' options=globals.project_instance.states translationPath='attributes.state'
|
||||
= filter.dropdown-select key='project_scenario_id' options=project.sorted_project_scenarios labelPath='name'
|
||||
= filter.date-range key='reference_date'
|
||||
if project.instance_scope_batch
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
.ten.wide.column= project_instance_action.workflow_action_definition.title
|
||||
.six.wide.column
|
||||
= project/instance-action-value-display project_instance_action=project_instance_action
|
||||
if project_instance_action.target_date
|
||||
'
|
||||
small= format-date project_instance_action.target_date format='ll'
|
||||
/if (or (eq project_instance_action.workflow_action_definition.value_type 'boolean') (eq project_instance_action.workflow_action_definition.value_type 'number'))
|
||||
/ = project_instance_action.value_display
|
||||
/else
|
||||
|
||||
@@ -5,10 +5,12 @@ translations = attributes:
|
||||
uncategorized: 'uncategorized'
|
||||
unplanned: 'unplanned'
|
||||
planned: 'planned'
|
||||
active: 'active'
|
||||
overdue: 'overdue'
|
||||
active: 'active'
|
||||
rejected: 'rejected'
|
||||
completed: 'completed'
|
||||
all_completed: 'All completed'
|
||||
any_rejected: 'Has rejected'
|
||||
user:
|
||||
email: 'E-mail'
|
||||
nickname: 'Nickname'
|
||||
|
||||
@@ -24,8 +24,15 @@ default_globals =
|
||||
instance_scope_options: ['instance', 'batch']
|
||||
workflow_group:
|
||||
batch_element_threshold_unit_options: ['businessday', 'day', 'week']
|
||||
|
||||
project_instance:
|
||||
states: ['uncategorized', 'unplanned', 'planned', 'active', 'overdue', 'any_rejected', 'all_completed']
|
||||
|
||||
project_instance_group:
|
||||
states: ['pending', 'overdue', 'active', 'inquiry', 'rejected', 'completed']
|
||||
|
||||
project_instance_action:
|
||||
states: ['pending', 'planned', 'overdue', 'inquiry', 'rejected', 'completed']
|
||||
states: ['pending', 'planned', 'overdue', 'active', 'inquiry', 'rejected', 'completed']
|
||||
final_states: ['inquiry', 'rejected', 'completed']
|
||||
|
||||
time_formatting: 'LLL'
|
||||
|
||||
Reference in New Issue
Block a user