table.ui.bottom.attached.striped.table
  thead
    tr
      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

  tbody
    /each (sort-by (route-action 'dateSort' 'target_date') model.project_instance_actions) as |project_instance_action|
    each filtered_project_instance_actions as |project_instance_action|
      tr
        td
          if project_instance_action.project_instance_group.id
            = link-to 'project.show.project-instance-group.show' model.project project_instance_action.project_instance_group.id
              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
