Small layout changes

This commit is contained in:
2024-08-01 07:27:12 +02:00
parent e3d5d97c6c
commit 5e658505d3
4 changed files with 29 additions and 30 deletions

View File

@@ -1,23 +1,23 @@
<tr id="<%= dom_id job %>" class="<%= cycle('bg-gray-50','bg-gray-200') %> ">
<td class="p-3 text-sm text-gray-900"> <%= job.id %> </td>
<td class="p-3 text-sm text-gray-900"> <%= job.fullname %> </td>
<td class="p-3 text-sm text-gray-900"> <%= job.pdf %> </td>
<td class="p-3 text-sm text-gray-900"> <%= job.number_of_plans_a0 %> </td>
<td class="p-3 text-sm text-gray-900"> <%= job.number_of_plans_a1 %> </td>
<td class="p-3 text-sm text-gray-900"> <%= job.number_of_plans_a2 %> </td>
<td class="p-3 text-sm text-gray-900"> <%= job.number_of_plans_a3 %> </td>
<td class="p-3 text-sm text-gray-900">
<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"> <%= job.pdf %> </td>
<td class="p-3 text-sm text-center text-hsrm-gray"> <%= job.number_of_plans_a0 %> </td>
<td class="p-3 text-sm text-center text-hsrm-gray"> <%= job.number_of_plans_a1 %> </td>
<td class="p-3 text-sm text-center text-hsrm-gray"> <%= job.number_of_plans_a2 %> </td>
<td class="p-3 text-sm text-center text-hsrm-gray"> <%= job.number_of_plans_a3 %> </td>
<td class="p-3 text-sm text-center text-hsrm-gray">
<% case job.status.to_sym %>
<% when :open %>
<span class="p-1.5 text-xs font-medium upercase tracking-wieder text-gray-900 bg-gray-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-gray-900 bg-gray-300 rounded-lg"> <%= job.status %> </span>
<% when :printing %>
<span class="p-1.5 text-xs font-medium upercase tracking-wieder text-yellow-900 bg-yellow-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium upercase tracking-wider 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-wieder text-orange-900 bg-orange-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-lime-900 bg-lime-300 rounded-lg"> <%= job.status %> </span>
<% when :paid %>
<span class="p-1.5 text-xs font-medium upercase tracking-wieder text-green-900 bg-green-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-green-900 bg-green-300 rounded-lg"> <%= job.status %> </span>
<% when :cancelled %>
<span class="p-1.5 text-xs font-medium upercase tracking-wieder text-red-900 bg-red-300 rounded-lg"> <%= job.status %> </span>
<span class="p-1.5 text-xs font-medium upercase tracking-wider text-red-900 bg-red-300 rounded-lg"> <%= job.status %> </span>
<% end %>
</td>
</tr>

View File

@@ -1,32 +1,29 @@
<div class="w-full">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<p class="px-3 py-2 bg-green-100 mb-5 text-green-700 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
<% end %>
<% content_for :title, "Current Print Jobs" %>
<div class="flex justify-between items-center py-4">
<h1 class="font-bold text-4xl">Plottaufträge am <%= Date.today.strftime("%d.%m.%Y") %></h1>
<%= link_to "Plottauftrag aufgeben", new_job_path, class: "py-3 px-5 bg-hsrm-red drop-shadow-lg transition-colors duration-100 hover:bg-hsrm-red-light text-white block font-medium" %>
<h1 class="font-bold text-hsrm-gray text-4xl">Plottaufträge am <%= Date.today.strftime("%d.%m.%Y") %></h1>
<%= link_to "Plottauftrag aufgeben", new_job_path, class: "px-3 py-2 bg-hsrm-red drop-shadow-lg transition-colors duration-100 hover:bg-hsrm-red-light text-white block font-medium" %>
</div>
<div id="jobs" class="min-w-full drop-shadow-lg">
<table class="w-full">
<thead class="bg-gray-200 border-b-2 border-gray-400">
<table class="w-full py-8 table-auto">
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-400">
<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"> Name </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"> A0 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left"> A1 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left"> A2 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left"> A3 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-left"> Status </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>
</tr>
</thead>
<tbody>
<%= 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" %>
<%= 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>

View File

@@ -45,7 +45,7 @@
<main class="container mx-auto mt-8 px-5 flex">
<%= yield %>
</main>
<footer>
<footer class="px-4 py-6">
<p></p>
</footer>
</body>