Worked on layout, added model funktions, changed database

Changes to the migration file make it necessary to reimport the
database: db:drop, db:create, db:migrate, db:seed
This commit is contained in:
2024-08-01 00:27:55 +02:00
parent 40ea1910c7
commit e3d5d97c6c
9 changed files with 137 additions and 34 deletions

View File

@@ -0,0 +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">
<% 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>
<% 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>
<% 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>
<% 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>
<% 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>
<% end %>
</td>
</tr>