184 lines
8.3 KiB
Plaintext
184 lines
8.3 KiB
Plaintext
<%= turbo_stream_from 'operator_jobs' %>
|
|
<% content_for :title, "Current Print Jobs" %>
|
|
<div class="grid gap-4 grids-cols-2">
|
|
</div>
|
|
<div class="flex space-x-4 justify-items-center">
|
|
<%= link_to "#openjobs-h", class: "flex-1" do %>
|
|
<div class="flex-1 card-status bg-status-open-light text-status-open">
|
|
<h3 class="p-3 text-2xl font-bold">
|
|
<%= icon("inbox-stack", class: "text-status-open icon icon-nohover") %>
|
|
Open
|
|
<span class="block text-3xl text-right"><%= @openjobs.count %></span>
|
|
</h3>
|
|
</div>
|
|
<% end %>
|
|
<%= link_to "#printingjobs-h", class: "flex-1" do %>
|
|
<div class="flex-1 card-status bg-status-printing-light text-status-printing">
|
|
<h3 class="p-3 text-2xl font-bold">
|
|
<%= icon("printer", class: "text-status-printing icon icon-nohover") %>
|
|
Printing
|
|
<span class="block text-right"><%= @printingjobs.count %></span>
|
|
</h3>
|
|
</div>
|
|
<% end %>
|
|
<%= link_to "#pickupjobs-h", class: "flex-1" do %>
|
|
<div class="flex-1 card-status bg-status-pickup-light text-status-pickup">
|
|
<h3 class="p-3 text-2xl font-bold">
|
|
<%= icon("arrow-up-tray", class: "text-status-pickup icon icon-nohover") %>
|
|
Pickup
|
|
<span class="block text-right"><%= @pickupjobs.count %></span>
|
|
</h3>
|
|
</div>
|
|
<% end %>
|
|
<%= link_to "#paidcanceledjobs-h", class: "flex-1" do %>
|
|
<div class="flex-1 card-status bg-status-paid-light text-status-paid">
|
|
<h3 class="p-3 text-2xl font-bold">
|
|
<%= icon("banknotes", class: "text-status-paid icon icon-nohover") %>
|
|
Paid
|
|
<span class="block text-right"><%= @paidjobs.count %></span>
|
|
</h3>
|
|
</div>
|
|
<% end %>
|
|
<%= link_to "#paidcanceledjobs-h", class: "flex-1" do %>
|
|
<div class="flex-1 card-status bg-status-canceled-light text-status-canceled">
|
|
<h3 class="p-3 text-2xl font-bold">
|
|
<%= icon("x-circle", class: "text-status-canceled icon icon-nohover") %>
|
|
Canceled
|
|
<span class="block text-right"><%= @canceledjobs.count %></span>
|
|
</h3>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div class="w-full">
|
|
<div id="printingjobs-h" class="flex items-center justify-between py-4">
|
|
<h1 class="text-3xl font-bold text-hsrm-gray">
|
|
Printing
|
|
</h1>
|
|
<% if @openjobs.any? %>
|
|
<%= button_to icon("printer",
|
|
class: "icon icon-nohover size-6 mr-2",
|
|
title: "Drucken") + "Start next job (" + @openjobs.count.to_s + ")", operator_job_path(@openjobs.first),
|
|
params: { :job => { status: :printing} },
|
|
method: :patch,
|
|
form_class: "btn bg-green-400 text-black" %>
|
|
<% else %>
|
|
<span class="flex items-center bg-gray-300 bg-opacity-80 btn hover:bg-opacity-80 text-hsrm-gray-light">
|
|
<%= icon("printer", class: "icon icon-nohover size-6 mr-2", title: "") %>
|
|
Start next job
|
|
</span>
|
|
<% end %>
|
|
</div>
|
|
<%# render partial: "job_card", collection: @printingjobs, as: :job %>
|
|
<div class="min-w-full overflow-auto shadow-lg">
|
|
<table class="w-full py-8 table-auto">
|
|
<thead class="font-semibold tracking-wide bg-gray-200 border-b-2 border-gray-300 text text-hsrm-gray">
|
|
<tr>
|
|
<th class="w-1 p-2 py-3 text-center"> ID </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Vorschau </th>
|
|
<th class="w-1 p-2 py-3 text-left"> Auftraggeber </th>
|
|
<th class="p-2 py-3 text-left"> PDF </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A0 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A1 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A2 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A3 </th>
|
|
<th class="w-1 p-2 py-3 text-center text-nowrap"> no DIN </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Kosten </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Status </th>
|
|
<th class="w-1 p-2 py-3 text-center">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id='printingjobs' class="divide-y divivde-gray-300">
|
|
<%= render partial: "job_tr", collection: @printingjobs, 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 id="pickupjobs-h" class="flex items-center justify-between py-4">
|
|
<h1 class="text-3xl font-bold text-hsrm-gray">
|
|
Pickup
|
|
</h1>
|
|
</div>
|
|
<div class="min-w-full overflow-auto shadow-lg">
|
|
<table class="w-full py-8 table-auto">
|
|
<thead class="font-semibold tracking-wide bg-gray-200 border-b-2 border-gray-300 text text-hsrm-gray">
|
|
<tr>
|
|
<th class="w-1 p-2 py-3 text-center"> ID </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Vorschau </th>
|
|
<th class="w-1 p-2 py-3 text-left"> Auftraggeber </th>
|
|
<th class="p-2 py-3 text-left"> PDF </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A0 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A1 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A2 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A3 </th>
|
|
<th class="w-1 p-2 py-3 text-center text-nowrap"> no DIN </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Kosten </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Status </th>
|
|
<th class="w-1 p-2 py-3 text-center">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id='pickupjobs' class="divide-y divivde-gray-300">
|
|
<%= render partial: "job_tr", collection: @pickupjobs, 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 id="openjobs-h" class="flex items-center justify-between py-4">
|
|
<h1 class="text-3xl font-bold text-hsrm-gray">
|
|
Open
|
|
</h1>
|
|
</div>
|
|
<div class="min-w-full overflow-auto shadow-lg">
|
|
<table class="w-full py-8 table-auto">
|
|
<thead class="font-semibold tracking-wide bg-gray-200 border-b-2 border-gray-300 text text-hsrm-gray">
|
|
<tr>
|
|
<th class="w-1 p-2 py-3 text-center"> ID </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Vorschau </th>
|
|
<th class="w-1 p-2 py-3 text-left"> Auftraggeber </th>
|
|
<th class="p-2 py-3 text-left"> PDF </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A0 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A1 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A2 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A3 </th>
|
|
<th class="w-1 p-2 py-3 text-center text-nowrap"> no DIN </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Kosten </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Status </th>
|
|
<th class="w-1 p-2 py-3 text-center">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id='openjobs' class="divide-y divivde-gray-300">
|
|
<%= render partial: "job_tr", collection: @openjobs, 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 id="paidcanceledjobs-h" class="flex items-center justify-between py-4">
|
|
<h1 class="text-3xl font-bold text-hsrm-gray">
|
|
Paid/Canceled
|
|
</h1>
|
|
</div>
|
|
<div class="min-w-full overflow-auto shadow-lg">
|
|
<table class="w-full py-8 table-auto">
|
|
<thead class="font-semibold tracking-wide bg-gray-200 border-b-2 border-gray-300 text text-hsrm-gray">
|
|
<tr>
|
|
<th class="w-1 p-2 py-3 text-center"> ID </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Vorschau </th>
|
|
<th class="w-1 p-2 py-3 text-left"> Auftraggeber </th>
|
|
<th class="p-2 py-3 text-left"> PDF </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A0 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A1 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A2 </th>
|
|
<th class="w-1 p-1 py-3 text-left"> A3 </th>
|
|
<th class="w-1 p-2 py-3 text-center text-nowrap"> no DIN </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Kosten </th>
|
|
<th class="w-1 p-2 py-3 text-center"> Status </th>
|
|
<th class="w-1 p-2 py-3 text-center">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id='paidcanceledjobs' class="divide-y divivde-gray-300">
|
|
<%= render partial: "job_tr", collection: @paidcanceledjobs, 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>
|