Files
plottservice/app/views/jobs/index.html.erb
David Böhm 616bd0cbe7 Added pdf analyzer
Analyzer should be moved to ActiveStorage::Analyzer
First there are many bugs with ActiveStorage that needs to be fixed:
Files are not deleted if job is destroyed (dependent: :purge is set)
If a new file is uploaded the old file is not deleted
(has_one_attechment)
2024-08-08 13:56:36 +02:00

32 lines
1.9 KiB
Plaintext

<%= turbo_stream_from 'jobs' %>
<div class="w-full">
<%#= render partial: 'layouts/flash' %>
<% content_for :title, "Current Print Jobs" %>
<div class="flex justify-between items-center py-4">
<h1 class="font-bold text-hsrm-gray text-4xl">Aktuelle Plottaufträge <span class="font-semibold text-sm"><%= Date.today.strftime("%d.%m.%Y") %></span></h1>
<%= link_to "Plottauftrag aufgeben", new_job_path, class: "px-3 py-2 bg-hsrm-red drop-shadow-lg transition-colors hover:bg-hsrm-red-light text-white block font-medium" %>
</div>
<div class="overflow-auto min-w-full drop-shadow-lg">
<table class="w-full py-8 table-auto">
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-hsrm-gray">
<tr>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> ID </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left"> Auftraggeber </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left"> PDF </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A0 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A1 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A2 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A3 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> qm </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> Status </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> Actions </th>
</tr>
</thead>
<tbody id='jobs' class="divide-y divivde-gray-300">
<%= render partial: "job_tr", collection: @jobs, as: :job %>
<%#= link_to "Show this job", job, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</tbody>
</table>
</div>
</div>