table.ui.compact.definition.table
  tbody
    tr
      td= t 'attributes.project_instance.client_identifier'
      td= validated-input attribute='client_identifier' changeset=model.changeset
    tr
      td= t 'models.project_scenario'
      td
        = ui-dropdown class='selection' selected=model.changeset.project_scenario onChange=(action 'set_project_scenario') as |execute mapper|
          .default.text= t 'action.select_model' modelPath='models.project_scenario'
          i.dropdown.icon
          .menu
            .item data-value='{{map-value mapper null}}' --
            each model.project.sorted_project_scenarios as |project_scenario|
              .item data-value='{{map-value mapper project_scenario}}'
                = project_scenario.name
  tr
    td= t 'attributes.project_instance.reference_date'
    td= ui-calendar-moment type='date' momentValue=(readonly model.changeset.reference_date) onChange=(action 'set_reference_date') placeholder='X'
  if model.project.instance_scope_batch
    tr
      td= t 'attributes.project_instance.batch_size'
      td= number-input numericValue=model.changeset.batch_size
if dependencies_loading
  .ui.active.loader
else
  .ui.bulleted.list
  table.ui.table
    tbody
      each (sort-by 'workflow_group.position' new_project_instance_groups) as |project_instance_group|
        tr.active
          td: strong= project_instance_group.workflow_group.name
          td.actions
        each (sort-by 'workflow_action_definition.position' project_instance_group.project_instance_actions) as |project_instance_action|
          tr
            td= project_instance_action.workflow_action_definition.title
            td.actions= date project_instance_action.date
.modal-actions.sticky
  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.basic.button.modal-rollback{action 'rollback_and_close'}= t 'general.rollback'
  button.ui.basic.button.modal-rollback{action 'close'}= t 'general.close'
  /.ui.buttons
    button.ui.secondary.button{action 'calculate_workflow_based_instances'} Calculate workflow based instances
    /button.ui.secondary.icon.button: i.close.icon
