Added edit and cancel button

This commit is contained in:
2024-08-04 13:26:31 +02:00
parent ed0c4408ca
commit 54e0cd5e45
5 changed files with 41 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
<tr id="<%= dom_id job %>" class="<%= cycle('bg-gray-50','bg-gray-100') %> ">
<!-- <td class="p-3 text-sm text-hsrm-gray whitespace-nowrap"> -->
<!-- <span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-status-<%= job.status %> bg-status-<%= job.status %>-light rounded-lg"><%= job.id %></span> -->
<!-- </td> -->
<tr id="<%= dom_id job %>" class="odd:bg-gray-50 even:bg-gray-100">
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-status-<%= job.status %> bg-status-<%= job.status %>-light rounded-lg"><%= job.id %></span>
</td>
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap"> <%= job.fullname %> </td>
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
<% if job.pdf.attached? %>
@@ -15,4 +15,10 @@
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap">
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-status-<%= job.status.to_sym %> bg-status-<%= job.status %>-light rounded-lg"><%= job.status %></span>
</td>
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap">
<%= link_to "edit", edit_job_url(job), class: "p-1.5 ml-2 rounded-lg bg-gray-100 font-medium" %>
<% if job.able_to_cancel? %>
<%= button_to "cancel", cancel_job_url(job), method: :patch, class: "p-1.5 ml-2 rounded-lg bg-gray-100 font-medium" %>
<% end %>
</td>
</tr>