Implemented status changes operator index

This commit is contained in:
2024-08-13 23:37:31 +02:00
parent 8732f07dd6
commit 3be019b58b
7 changed files with 42 additions and 42 deletions

View File

@@ -47,6 +47,19 @@
<h1 class="font-bold text-hsrm-gray text-4xl">
Printing
</h1>
<% if @openjobs.any? %>
<%= button_to icon("printer",
class: "text-hsrm-gray size-6 inline drop-shadow hover:text-opacity-75 mr-2",
title: "Drucken") + "Start next job (" + @openjobs.count.to_s + ")", operator_job_path(@openjobs.first),
params: { :job => { status: :printing} },
method: :patch,
form_class: "inline px-3 py-2 font-semibold bg-green-500 hover:opacity-90 shadow-lg transition-colors duration-100 bg-opacity-100 flex items-center group text-hsrm-gray" %>
<% else %>
<span class="px-3 py-2 font-semibold bg-gray-300 shadow-lg transition-colors duration-100 bg-opacity-100 flex items-center group text-white">
<%= icon("printer", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow mr-2", title: "") %>
Start next job
</span>
<% end %>
</div>
<%# render partial: "job_card", collection: @printingjobs, as: :job %>
<div id="printingjobs-h" class="overflow-auto min-w-full shadow-lg">
@@ -61,10 +74,10 @@
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> A1 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> A2 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> A3 </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1 text-nowrap"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Kosten </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Status </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"></th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-40">Action</th>
</tr>
</thead>
<tbody id='printingjobs' class="divide-y divivde-gray-300">
@@ -90,10 +103,10 @@
<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-center w-1"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1 text-nowrap"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Kosten </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Status </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"></th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1">Action</th>
</tr>
</thead>
<tbody id='pickupjobs' class="divide-y divivde-gray-300">
@@ -119,10 +132,10 @@
<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-center w-1"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1 text-nowrap"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Kosten </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Status </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"></th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1">Action</th>
</tr>
</thead>
<tbody id='openjobs' class="divide-y divivde-gray-300">
@@ -148,7 +161,7 @@
<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-center w-1"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1 text-nowrap"> no DIN </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Kosten </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Status </th>
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"></th>