Worked on operator view
This commit is contained in:
@@ -6,6 +6,9 @@ class Operator::JobsController < ApplicationController
|
||||
@openjobs = Job.open.order(:created_at)
|
||||
@printingjobs = Job.printing.order(:status_changed_at)
|
||||
@pickupjobs = Job.pickup.order(:status_changed_at)
|
||||
@paidjobs = Job.paid.status_changed_today.order(:status_changed_at)
|
||||
@canceledjobs = Job.canceled.status_changed_today.order(:status_changed_at)
|
||||
@paidcanceledjobs = Job.paidcanceled.status_changed_today.order(:status_changed_at)
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,13 @@ class Job < ApplicationRecord
|
||||
scope :created_on_day, lambda { |date|
|
||||
where("created_at >= ? AND created_at <= ?", date.beginning_of_day, date.end_of_day)
|
||||
}
|
||||
scope :upgraded_today, -> { upgraded_on_day(Time.now) }
|
||||
scope :upgraded_on_day, lambda { |date|
|
||||
where("upgraded_at >= ? AND upgraded_at <= ?", date.beginning_of_day, date.end_of_day)
|
||||
scope :updated_today, -> { updated_on_day(Time.now) }
|
||||
scope :updated_on_day, lambda { |date|
|
||||
where("updated_at >= ? AND updated_at <= ?", date.beginning_of_day, date.end_of_day)
|
||||
}
|
||||
scope :status_changed_today, -> { status_changed_on_day(Time.now) }
|
||||
scope :status_changed_on_day, lambda { |date|
|
||||
where("status_changed_at >= ? AND status_changed_at <= ?", date.beginning_of_day, date.end_of_day)
|
||||
}
|
||||
# Returns all jobs with status: open print pickup and jobs from today with status: paid canceled
|
||||
# paid: only updated_at today
|
||||
@@ -45,11 +49,15 @@ class Job < ApplicationRecord
|
||||
.where("status_changed_at >= ?", Time.now.beginning_of_day))
|
||||
# .in_status_order
|
||||
.order(created_at: :desc)
|
||||
#.order(:costumer_firstname, :costumer_lastname)
|
||||
# .order(:costumer_firstname, :costumer_lastname)
|
||||
.with_attached_pdf # scope from activestorage for .includes(pdf_attachment: :blob)
|
||||
# .references(:pdf_attachment, :blob) # creates big join table
|
||||
end
|
||||
|
||||
def self.paidcanceled
|
||||
Job.where(status: %i[paid canceled])
|
||||
end
|
||||
|
||||
def costumer_fullname
|
||||
[ costumer_firstname, " ", costumer_lastname ].join
|
||||
end
|
||||
@@ -65,13 +73,18 @@ class Job < ApplicationRecord
|
||||
|
||||
def able_to_cancel?
|
||||
open?
|
||||
# TODO: different check for operator and admin
|
||||
end
|
||||
|
||||
# cancel job only if it is still open
|
||||
def canceled!
|
||||
self.status = :canceled if open?
|
||||
if able_to_cancel?
|
||||
self.status = :canceled
|
||||
self.printed_at = nil
|
||||
self.paid_at = nil
|
||||
save
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<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 class="overflow-auto min-w-full drop-shadow-lg">
|
||||
<div class="overflow-auto min-w-full shadow-lg">
|
||||
<table class="w-full py-8 table-auto">
|
||||
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-300">
|
||||
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-300 shadow">
|
||||
<tr>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> ID </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Vorschau </th>
|
||||
|
||||
@@ -30,14 +30,8 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#" class="px-3 py-2 font-semibold bg-hsrm-red hover:bg-hsrm-red-light drop-shadow-lg transition-colors duration-100 bg-opacity-100 flex items-center group text-white">
|
||||
<span class="mr-2">Anmelden</span>
|
||||
<svg class="stroke-current" width="10" height="10" viewBox="0 0 10 10" aria-hidden="true" style="stroke: rgb(255, 255, 255);">
|
||||
<g fill-rule="evenodd">
|
||||
<path class="opacity-0 group-hover:opacity-100 transition ease-in-out duration-200" d="M0 5h7"></path>
|
||||
<path class="HoverArrow__tipPath" d="M1 1l4 4-4 4"></path>
|
||||
</g>
|
||||
</svg>
|
||||
<a href="#" class="px-3 py-2 font-semibold bg-hsrm-red hover:bg-hsrm-red-light shadow-lg transition-colors duration-100 bg-opacity-100 flex items-center group text-white">
|
||||
<span>Anmelden</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
4
app/views/operator/jobs/_job_card.html.erb
Normal file
4
app/views/operator/jobs/_job_card.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="min-w-full shadow-lg">
|
||||
<h1><%= job.pdf.filename %></h1>
|
||||
<iframe src=<%= url_for(job.pdf) %> width="300" height="300" style="border: none;"></iframe>
|
||||
</div>
|
||||
@@ -4,14 +4,15 @@
|
||||
<%= job.id %>
|
||||
</span>
|
||||
</td>
|
||||
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
|
||||
<%= job.costumer_fullname %>
|
||||
</td>
|
||||
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap w-6">
|
||||
<% if job.pdf.attached? %>
|
||||
<%= image_tag url_for(job.pdf.preview(resize_to_limit: [100, 100])) %>
|
||||
<%= link_to_if job.printing?, image_tag(url_for(job.pdf.preview(resize_to_limit: [100, 100]))), job.pdf, download:true, class: "shadow-lg" %>
|
||||
<!--<iframe src=<%= url_for(job.pdf) %> width="500" height="700" style="border: none;"></iframe>-->
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
|
||||
<%= job.costumer_fullname %>
|
||||
</td>
|
||||
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
|
||||
<% if job.pdf.attached? %>
|
||||
<%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %>
|
||||
@@ -22,9 +23,19 @@
|
||||
<% end %>
|
||||
</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">
|
||||
<% if job.printing? %>
|
||||
<span class="p-1 bg-gray-300 bg-opacity-50 font-medium rounded-lg inline-block">
|
||||
<%= button_to icon("chevron-up", class: "size-5 inline", title: "erhöhen"), operator_job_path(job), method: :patch, form_class: "inline" %>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="p-1.5 bg-gray-300 bg-opacity-50 font-medium rounded-lg text-center">
|
||||
<%= job.number_of_plans_a0 %>
|
||||
</span>
|
||||
<% if job.printing? %>
|
||||
<span class="p-1 bg-gray-300 bg-opacity-50 font-medium rounded-lg inline-block">
|
||||
<%= button_to icon("chevron-down", class: "size-5 inline", title: "verringern"), operator_job_path(job), method: :patch, form_class: "inline" %>
|
||||
</span>
|
||||
<% end %>
|
||||
</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">
|
||||
@@ -57,7 +68,27 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="p-3 text-sm text-right text-hsrm-gray whitespace-nowrap">
|
||||
<%= link_to icon("folder-arrow-down", class: "text-hsrm-gray size-8 inline", title: "Download"), job.pdf, download:true %>
|
||||
<%= button_to icon("x-circle", class: "text-hsrm-red size-8 inline", title: "Abbrechen"), cancel_job_path(job), method: :patch, form: {data: {turbo_confirm: 'Den Plottauftrag wirklich abbrechen?'}}, form_class: "inline" %>
|
||||
<!-- TODO: move logic to model -->
|
||||
<% if job.open? %>
|
||||
<%= button_to icon("printer", class: "text-hsrm-gray size-6 inline drop-shadow hover:text-opacity-75", title: "Drucken"), printing_operator_job_path(job), method: :patch, form_class: "inline" %>
|
||||
<% else %>
|
||||
<%= icon("printer", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow", title: "") %>
|
||||
<% end %>
|
||||
<%= link_to_if job.printing?, icon("document-arrow-down", class: "text-hsrm-gray #{ unless job.printing?; 'text-opacity-25' else; 'hover:text-opacity-75'; end} size-6 inline", title: "Download"), job.pdf, download:true %>
|
||||
<% if job.printing? %>
|
||||
<%= button_to icon("check-circle", class: "text-green-700 size-6 inline drop-shadow hover:text-opacity-75", title: "Pläne sind fertig gedruckt"), pickup_operator_job_path(job), method: :patch, form: {data: {turbo_confirm: 'Sind die Pläne gedruckt und die Seitenanzahl und QM korrekt?'}}, form_class: "inline" %>
|
||||
<% else %>
|
||||
<%= icon("check-circle", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow", title: "Kann nicht mehr abgebrochen werden") %>
|
||||
<% end %>
|
||||
<% if job.pickup? %>
|
||||
<%= button_to icon("banknotes", class: "text-status-paid size-6 inline drop-shadow hover:text-opacity-75", title: "Bezahlt"), paid_operator_job_path(job), method: :patch, form_class: "inline" %>
|
||||
<% else %>
|
||||
<%= icon("banknotes", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow ", title: "") %>
|
||||
<% end %>
|
||||
<% if job.open? || job.printing? || job.pickup? %>
|
||||
<%= button_to icon("x-circle", class: "text-hsrm-red size-6 inline drop-shadow hover:text-opacity-75", title: "Abbrechen"), cancel_operator_job_path(job), method: :patch, form: {data: {turbo_confirm: 'Den Plottauftrag wirklich abbrechen?'}}, form_class: "inline" %>
|
||||
<% else %>
|
||||
<%= icon("x-circle", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow", title: "Kann nicht mehr abgebrochen werden") %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,57 +1,73 @@
|
||||
<%= turbo_stream_from 'operator_jobs' %>
|
||||
<% content_for :title, "Current Print Jobs" %>
|
||||
<div class="flex space-x-4">
|
||||
<%= link_to "#openjobs-h" do %>
|
||||
<div class="flex-1 bg-status-open-light bg-opacity-50 text-status-open w-72 min-h-28 shadow-lg">
|
||||
<h3 class="p-5 text-4xl">
|
||||
Open
|
||||
<span class="text-right block"><%= @openjobs.count %></span>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to "#printingjobs-h" do %>
|
||||
<div class="flex-1 bg-status-printing-light bg-opacity-50 text-status-printing w-72 min-h-28 shadow-lg">
|
||||
<h3 class="p-5 text-4xl">
|
||||
Printing
|
||||
<span class="text-right block"><%= @printingjobs.count %></span>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to "#pickupjobs-h" do %>
|
||||
<div class="flex-1 bg-status-pickup-light bg-opacity-50 text-status-pickup w-72 min-h-28 shadow-lg">
|
||||
<h3 class="p-5 text-4xl">
|
||||
Pickup
|
||||
<span class="text-right block"><%= @pickupjobs.count %></span>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to "#paidcanceledjobs-h" do %>
|
||||
<div class="flex-1 bg-status-paid-light bg-opacity-50 text-status-paid w-72 min-h-28 shadow-lg">
|
||||
<h3 class="p-5 text-4xl">
|
||||
Paid
|
||||
<span class="text-right block"><%= @paidjobs.count %></span>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to "#paidcanceledjobs-h" do %>
|
||||
<div class="flex-1 bg-status-canceled-light bg-opacity-50 text-status-canceled w-72 min-h-28 shadow-lg">
|
||||
<h3 class="p-5 text-4xl">
|
||||
Canceled
|
||||
<span class="text-right block"><%= @canceledjobs.count %></span>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<h1 class="font-bold text-hsrm-gray text-4xl">
|
||||
abholbereite Plottaufträge
|
||||
Printing
|
||||
</h1>
|
||||
</div>
|
||||
<div class="overflow-auto min-w-full drop-shadow-lg">
|
||||
<%# render partial: "job_card", collection: @printingjobs, as: :job %>
|
||||
<div id="printingjobs-h" class="overflow-auto min-w-full shadow-lg">
|
||||
<table class="w-full py-8 table-auto">
|
||||
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-300">
|
||||
<tr>
|
||||
<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-center w-1"> ID </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Vorschau </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-left"> Auftraggeber </th>
|
||||
<th colspan="2" 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 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-center w-1"> noDIN </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 w-1"> A0 </th>
|
||||
<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"> 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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='jobs' 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 class="flex justify-between items-center py-4">
|
||||
<h1 class="font-bold text-hsrm-gray text-4xl">
|
||||
aktuell druckende Plottaufträge
|
||||
</h1>
|
||||
</div>
|
||||
<div 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-300">
|
||||
<tr>
|
||||
<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 colspan="2" 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 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-center w-1"> noDIN </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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='jobs' class="divide-y divivde-gray-300">
|
||||
<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>
|
||||
@@ -59,30 +75,89 @@
|
||||
</div>
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<h1 class="font-bold text-hsrm-gray text-4xl">
|
||||
offene Plottaufträge
|
||||
Pickup
|
||||
</h1>
|
||||
</div>
|
||||
<div class="overflow-auto min-w-full drop-shadow-lg">
|
||||
<div id="pickupjobs-h" class="overflow-auto min-w-full shadow-lg">
|
||||
<table class="w-full py-8 table-auto">
|
||||
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-300">
|
||||
<tr>
|
||||
<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-center w-1"> ID </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Vorschau </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-left"> Auftraggeber </th>
|
||||
<th colspan="2" 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"> PDF </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-center w-1"> noDIN </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"> 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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='jobs' class="divide-y divivde-gray-300">
|
||||
<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 class="flex justify-between items-center py-4">
|
||||
<h1 class="font-bold text-hsrm-gray text-4xl">
|
||||
open
|
||||
</h1>
|
||||
</div>
|
||||
<div id="openjobs-h" class="overflow-auto min-w-full shadow-lg">
|
||||
<table class="w-full py-8 table-auto">
|
||||
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-300">
|
||||
<tr>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> ID </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Vorschau </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 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-center w-1"> 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>
|
||||
</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 class="flex justify-between items-center py-4">
|
||||
<h1 class="font-bold text-hsrm-gray text-4xl">
|
||||
Paid/Canceled
|
||||
</h1>
|
||||
</div>
|
||||
<div id="paidcanceledjobs-h" class="overflow-auto min-w-full shadow-lg">
|
||||
<table class="w-full py-8 table-auto">
|
||||
<thead class="bg-gray-200 text-hsrm-gray border-b-2 border-gray-300">
|
||||
<tr>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> ID </th>
|
||||
<th class="p-3 text-sm font-semibold tracking-wide text-center w-1"> Vorschau </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 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-center w-1"> 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>
|
||||
</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>
|
||||
|
||||
@@ -5,7 +5,14 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
namespace :operator do
|
||||
resources :jobs
|
||||
resources :jobs do
|
||||
member do
|
||||
patch "cancel"
|
||||
patch "pickup"
|
||||
patch "printing"
|
||||
patch "paid"
|
||||
end
|
||||
end
|
||||
end
|
||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user