Minor style upgrades

This commit is contained in:
2024-08-02 07:31:09 +02:00
parent 884ee53748
commit 9a3777be44
3 changed files with 26 additions and 26 deletions

View File

@@ -1,27 +1,27 @@
<tr id="<%= dom_id job %>" class="<%= cycle('bg-gray-50','bg-gray-200') %> ">
<td class="p-3 text-sm text-hsrm-gray"> <%= job.id %> </td>
<td class="p-3 text-sm text-hsrm-gray"> <%= job.fullname %> </td>
<td class="p-3 text-sm text-hsrm-gray">
<tr id="<%= dom_id job %>" class="<%= cycle('bg-gray-50','bg-gray-100') %> ">
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap"> <%= job.id %> </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? %>
<%= job.pdf.filename %><span class="p-1.5 bg-gray-300 font-medium rounded-lg shadow-lg ml-2"><%=number_to_human_size job.pdf.blob.byte_size%></span>
<% end %>
</td>
<td class="p-3 text-sm text-center text-hsrm-gray"><span class="p-1.5 bg-gray-300 font-medium rounded-lg"> <%= job.number_of_plans_a0 %></span> </td>
<td class="p-3 text-sm text-center text-hsrm-gray"><span class="p-1.5 bg-gray-300 font-medium rounded-lg"><%= job.number_of_plans_a1 %></span> </td>
<td class="p-3 text-sm text-center text-hsrm-gray"><span class="p-1.5 bg-gray-300 font-medium rounded-lg"><%= job.number_of_plans_a2 %> </span></td>
<td class="p-3 text-sm text-center text-hsrm-gray"><span class="p-1.5 bg-gray-300 font-medium rounded-lg"><%= job.number_of_plans_a3 %></span> </td>
<td class="p-3 text-sm text-center text-hsrm-gray">
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap"><span class="p-1.5 bg-gray-300 bg-opacity-50 font-medium rounded-lg"> <%= job.number_of_plans_a0 %></span> </td>
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap"><span class="p-1.5 bg-gray-300 bg-opacity-50 font-medium rounded-lg"><%= job.number_of_plans_a1 %></span> </td>
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap"><span class="p-1.5 bg-gray-300 bg-opacity-50 font-medium rounded-lg"><%= job.number_of_plans_a2 %> </span></td>
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap"><span class="p-1.5 bg-gray-300 bg-opacity-50 font-medium rounded-lg"><%= job.number_of_plans_a3 %></span> </td>
<td class="p-3 text-sm text-left text-hsrm-gray whitespace-nowrap">
<% case job.status.to_sym %>
<% when :open %>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-gray-900 bg-gray-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-gray-900 bg-gray-300 rounded-lg"> <%= job.status %> </span>
<% when :printing %>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-yellow-900 bg-yellow-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-yellow-900 bg-yellow-300 rounded-lg"> <%= job.status %> </span>
<% when :ready_for_pickup %>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-lime-900 bg-lime-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-lime-900 bg-lime-300 rounded-lg"> <%= job.status %> </span>
<% when :paid %>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-green-900 bg-green-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-green-900 bg-green-300 rounded-lg"> <%= job.status %> </span>
<% when :canceled %>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-red-900 bg-red-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-red-900 bg-red-300 rounded-lg"> <%= job.status %> </span>
<% end %>
</td>
</tr>

View File

@@ -7,21 +7,21 @@
<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 id="jobs" class="min-w-full drop-shadow-lg">
<div id="jobs" 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-gray-400">
<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"> ID </th>
<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-center"> A0 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center"> A1 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center"> A2 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center"> A3 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center"> Status </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"> Status </th>
</tr>
</thead>
<tbody>
<tbody 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>