<%# Display GoodJob job information with associated details %>
<div class="d-flex align-items-center gap-2">
  <div class="d-flex align-items-center gap-2">
    <span class="badge bg-primary">
      <i class="fa-solid fa-gears me-1"></i>
      <%= link_to "/jobs/jobs/#{job.id}", class: "text-white" do %>
        <%= job.job_class %>
      <% end %>
    </span>
    <% if job.queue_name.present? %>
      <span class="badge bg-info">
        <i class="fa-solid fa-list me-1"></i><%= job.queue_name %>
      </span>
    <% end %>
    <% if job.priority.present? %>
      <span class="badge bg-secondary">
        <i class="fa-solid fa-arrow-up me-1"></i>Priority: <%= job.priority %>
      </span>
    <% end %>
  </div>
  <div class="d-flex align-items-center ms-auto gap-2">
    <% if job.error.present? %>
      <span class="badge bg-danger" title="<%= job.error %>">
        <i class="fa-solid fa-exclamation-triangle me-1"></i>Error
      </span>
    <% end %>
    <% if job.executions_count && job.executions_count > 0 %>
      <span class="badge bg-secondary">
        <i class="fa-solid fa-rotate me-1"></i>Attempts: <%= job.executions_count %>
      </span>
    <% end %>
    <% if job.scheduled_at.present? %>
      <span class="badge bg-light text-dark" title="Scheduled for <%= job.scheduled_at.strftime("%Y-%m-%d %H:%M:%S") %>">
        <i class="fa-regular fa-clock me-1"></i>Scheduled
      </span>
    <% end %>
    <% if job.performed_at.present? %>
      <span class="badge <%= job.finished_at.present? ? "bg-success" : "bg-warning text-dark" %>">
        <i class="fa-solid <%= job.finished_at.present? ? "fa-check" : "fa-spinner fa-spin" %> me-1"></i>
        <%= job.finished_at.present? ? "Completed" : "Running" %>
      </span>
    <% end %>
  </div>
</div>
