Add smart adaptive completed_at display for action list as intended hidden feature
This commit is contained in:
@@ -7,6 +7,9 @@ export default Ember.Controller.extend
|
||||
scope_project: null
|
||||
scope_scenario: null
|
||||
scope_organization: null
|
||||
show_completed_at: Ember.computed 'filters.state_in.[]', 'filters.completed_at_gteq', 'filters.completed_at_lteq', ->
|
||||
return true if @get('filters.completed_at_lteq') or @get('filters.completed_at_gteq')
|
||||
JSON.stringify(@get('filters.state_in')) is '["completed"]'
|
||||
filter_query: Ember.computed 'filters.filter_calls', ->
|
||||
@get('filters')?.toProperties() || {}
|
||||
export_human_url: Ember.computed 'filter_query', ->
|
||||
|
||||
@@ -9,6 +9,12 @@ export default Ember.Controller.extend({
|
||||
scope_project: null,
|
||||
scope_scenario: null,
|
||||
scope_organization: null,
|
||||
show_completed_at: Ember.computed('filters.state_in.[]', 'filters.completed_at_gteq', 'filters.completed_at_lteq', function() {
|
||||
if (this.get('filters.completed_at_lteq') || this.get('filters.completed_at_gteq')) {
|
||||
return true;
|
||||
}
|
||||
return JSON.stringify(this.get('filters.state_in')) === '["completed"]';
|
||||
}),
|
||||
filter_query: Ember.computed('filters.filter_calls', function() {
|
||||
var ref;
|
||||
return ((ref = this.get('filters')) != null ? ref.toProperties() : void 0) || {};
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
a href=export_technical_url: span Technical
|
||||
= action-list/project-filter apply_filters=(action 'refresh_list') filters=filters scope_project=scope_project scope_scenario=scope_scenario projects=model.projects
|
||||
= action-list/organization-filter apply_filters=(action 'refresh_list') filters=filters scope_organization=scope_organization organizations=model.organizations
|
||||
table.ui.attached.stiped.table
|
||||
table.ui.attached.stiped.sortable.table
|
||||
thead
|
||||
tr
|
||||
unless scope_project
|
||||
@@ -24,10 +24,15 @@ table.ui.attached.stiped.table
|
||||
th= t 'models.organization'
|
||||
th= t 'models.project_instance_group'
|
||||
th= t 'models.workflow_action_definition'
|
||||
th= t 'models.project_instance'
|
||||
= sortable-table-header filters=filters key='project_instance_client_identifier' model=model.project_instance_actions defaultDirection='asc'
|
||||
= t 'models.project_instance'
|
||||
th= t 'attributes.project_instance_action.state'
|
||||
th= t 'attributes.project_instance_action.notes'
|
||||
th= t 'attributes.project_instance_action.target_date'
|
||||
= sortable-table-header filters=filters key='target_date' model=model.project_instance_actions defaultDirection='asc'
|
||||
= t 'attributes.project_instance_action.target_date'
|
||||
if show_completed_at
|
||||
= sortable-table-header filters=filters key='completed_at' model=model.project_instance_actions defaultDirection='desc'
|
||||
= t 'attributes.project_instance_action.completed_at'
|
||||
th= t 'attributes.project_instance_action.value'
|
||||
table-filters content=model.project_instance_actions filters=filters as |filter|
|
||||
unless scope_project
|
||||
@@ -46,6 +51,8 @@ table.ui.attached.stiped.table
|
||||
= 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
|
||||
if show_completed_at
|
||||
= filter.date-range key='completed_at' expandingTime=true weekSelector=true
|
||||
th
|
||||
tbody
|
||||
if model.project_instance_actions.loading
|
||||
@@ -85,6 +92,8 @@ table.ui.attached.stiped.table
|
||||
'
|
||||
= ui-markdown-popup tagName='i' class='info circle icon' markdown=project_instance_action.workflow_action_definition.extra_info
|
||||
td= format-date project_instance_action.target_date
|
||||
if show_completed_at
|
||||
td= format-date project_instance_action.completed_at format=globals.time_formatting
|
||||
td= project/instance-action-value-display project_instance_action=project_instance_action
|
||||
/each project_instance_action.pointing_project_instance_action_connections as |project_instance_action_connection|
|
||||
if (eq project_instance_action_connection.connection_type 'attached')
|
||||
|
||||
@@ -37,8 +37,8 @@ module.exports = function(environment) {
|
||||
// ENV.APP.LOG_TRANSITIONS = true;
|
||||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
||||
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
||||
ENV.apiHost = "http://localhost:3006"; // when using the stand alone ember server implementation with rails server explicitly as api host (foreman run web)
|
||||
//ENV.apiHost = "https://kpn-staging.panda-suite.com";
|
||||
ENV.apiHost = "http://localhost:3009"; // when using the stand alone ember server implementation with rails server explicitly as api host (foreman run web)
|
||||
//ENV.apiHost = "https://allinq-staging.panda-suite.com";
|
||||
}
|
||||
|
||||
if (environment === 'test') {
|
||||
|
||||
Reference in New Issue
Block a user