instance-action notes display enhancements and trigger refresh on action deletion
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default } from 'ember-panda/components/project-instance-action/compact-notes-display';
|
||||
+11
@@ -169,6 +169,17 @@ Component =
|
||||
# else
|
||||
# workflow_action_constraint.deleteRecord()
|
||||
# @set 'new_workflow_action_constraint_warning', ''
|
||||
destroy_workflow_action_definition: ->
|
||||
project = @get('model.project')
|
||||
@modal 'confirm',
|
||||
title_path: @get('modal_options.destroy_text_path') || 'general.destroy.are_you_sure'
|
||||
model: @get('model')
|
||||
ok: ->
|
||||
model = @get("model")
|
||||
model = model.get("_content") if model.__changeset__
|
||||
model.destroyRecord().then -> project.incrementProperty('update_revision')
|
||||
@send 'closeModal' unless @preventClose
|
||||
|
||||
|
||||
destroyWorkflowActionOffset: (workflow_action_offset) ->
|
||||
if workflow_action_offset.get('isNew')
|
||||
|
||||
@@ -36,6 +36,7 @@ export default Ember.Controller.extend
|
||||
filters: Ember.Object.create
|
||||
state_in: []
|
||||
workflow_group_name_cont: ''
|
||||
notes_cont: ''
|
||||
workflow_action_definition_title_cont: ''
|
||||
target_date_lteq: null
|
||||
target_date_gteq: null
|
||||
@@ -50,6 +51,9 @@ export default Ember.Controller.extend
|
||||
if title_filter = @get('filters.workflow_action_definition_title_cont')
|
||||
matcher = new RegExp(title_filter, 'i')
|
||||
actions = actions.filter (record) -> matcher.test record.get('workflow_action_definition.title')
|
||||
if notes_filter = @get('filters.notes_cont')
|
||||
matcher = new RegExp(notes_filter, 'i')
|
||||
actions = actions.filter (record) -> matcher.test record.get('notes')
|
||||
actions.sort target_date_sort
|
||||
|
||||
actions:
|
||||
|
||||
@@ -88,14 +88,7 @@ table.ui.attached.stiped.sortable.table
|
||||
else
|
||||
= project_instance_action.project_instance.client_identifier
|
||||
td= state-badge project_instance_action.state action=(action 'edit_project_instance_action' project_instance_action)
|
||||
td
|
||||
if (gt project_instance_action.notes.length 14)
|
||||
= ui-markdown-popup tagName='i' class='pointable sticky note outline icon' markdown=project_instance_action.notes on='click'
|
||||
else if project_instance_action.notes
|
||||
= project_instance_action.notes
|
||||
if project_instance_action.workflow_action_definition.extra_info
|
||||
'
|
||||
= ui-markdown-popup tagName='i' class='pointable info circle icon' markdown=project_instance_action.workflow_action_definition.extra_info on='click'
|
||||
td= project-instance-action/compact-notes-display record=project_instance_action
|
||||
td= format-date project_instance_action.target_date format=globals.date_formatting
|
||||
if show_completed_at
|
||||
td= format-date project_instance_action.completed_at format=globals.time_formatting
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
if (gt record.notes.length 14)
|
||||
= ui-markdown-popup tagName='i' class='pointable sticky note outline icon' markdown=record.notes on='click'
|
||||
else if record.notes
|
||||
= record.notes
|
||||
if record.workflow_action_definition.extra_info
|
||||
'
|
||||
= ui-markdown-popup tagName='i' class='pointable info circle icon' markdown=record.workflow_action_definition.extra_info on='click'
|
||||
= yield
|
||||
@@ -26,6 +26,7 @@ table.ui.bottom.attached.stiped.table
|
||||
th= t 'models.workflow_action_definition'
|
||||
th= t 'models.project_instance'
|
||||
th= t 'attributes.project_instance_action.state'
|
||||
th= t 'attributes.project_instance_action.notes'
|
||||
/ ui-dropdown class='right basic labeled icon' action='nothing'
|
||||
i.dropdown.icon
|
||||
span.ui.tiny.header class=filter.state_in.length:active-filter
|
||||
@@ -68,6 +69,7 @@ table.ui.bottom.attached.stiped.table
|
||||
= filter.dropdown-select-multiple key='workflow_action_definition_id_in' options=project.sorted_workflow_action_definitions labelPath='title'
|
||||
= filter.input key='project_instance_client_identifier_cont'
|
||||
= 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 class=date_filter_active:active-filter
|
||||
ui-dropdown class='right basic labeled top right pointing icon' action='nothing'
|
||||
@@ -95,5 +97,6 @@ table.ui.bottom.attached.stiped.table
|
||||
td= link-to 'project.show.project-instance.show' project_instance_action.project_instance.project.id project_instance_action.project_instance.id
|
||||
span= project_instance_action.project_instance.client_identifier
|
||||
td= state-badge project_instance_action.state
|
||||
td= project-instance-action/compact-notes-display record=project_instance_action
|
||||
td= format-date project_instance_action.target_date format=globals.date_formatting
|
||||
td= project/instance-action-value-display project_instance_action=project_instance_action
|
||||
|
||||
@@ -4,12 +4,14 @@ table.ui.bottom.attached.striped.table
|
||||
th= t 'models.project_instance_group'
|
||||
th= t 'models.workflow_action_definition'
|
||||
th= t 'attributes.project_instance_action.state'
|
||||
th= t 'attributes.project_instance_action.notes'
|
||||
th= t 'attributes.project_instance_action.target_date'
|
||||
th= t 'attributes.project_instance_action.value'
|
||||
table-filters filters=filters as |filter|
|
||||
= filter.input key='workflow_group_name_cont'
|
||||
= filter.input key='workflow_action_definition_title_cont'
|
||||
= filter.dropdown-select-multiple key='state_in' options=globals.project_instance_action.states translationPath='attributes.state' eager_filter=true
|
||||
= filter.input key='notes_cont'
|
||||
th
|
||||
th
|
||||
|
||||
@@ -23,5 +25,6 @@ table.ui.bottom.attached.striped.table
|
||||
span= project_instance_action.project_instance_group.workflow_group.name
|
||||
td= project_instance_action.workflow_action_definition.title
|
||||
td= state-badge project_instance_action.state action=(action 'edit_project_instance_action' project_instance_action)
|
||||
td= project-instance-action/compact-notes-display record=project_instance_action
|
||||
td= format-date project_instance_action.target_date format=globals.date_formatting
|
||||
td= project/instance-action-value-display project_instance_action=project_instance_action
|
||||
|
||||
@@ -242,4 +242,4 @@ each non_deleted_working_pointing_workflow_action_connections as |pointing_conne
|
||||
button.ui.basic.button.modal-rollback{ action 'rollback_and_close'}= t 'general.rollback'
|
||||
push-action type='position' action='positionInProject'
|
||||
button.ui.primary.button.modal-save.pull-right{action 'saveRecord'}= t 'general.save'
|
||||
button.ui.negative.button.modal-destroy.pull-right{ action 'destroyRecord'}= t 'general.destroy.button'
|
||||
button.ui.negative.button.modal-destroy.pull-right{ action 'destroy_workflow_action_definition'}= t 'general.destroy.button'
|
||||
|
||||
Reference in New Issue
Block a user