<%= job.id %> <% if job.pdf.attached? %> <%= link_to_if job.printing?, image_tag(url_for(job.pdf.preview(resize_to_limit: [100, 100]))), job.pdf, target: "_blank", class: "shadow-lg" %> <% end %> <%= job.costumer_fullname %> <% if job.pdf.attached? %> <%= 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 %> <%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %> <%= link_to_if job.printing?, job.pdf.filename, job.pdf, download:true %> <%=number_to_human_size job.pdf.blob.byte_size%> <% end %> <% Job::AVAILABLE_PAGE_FORMATS.each do |din| %> <% if job.printing? %>
<%= button_to icon("chevron-up", class: "size-5 inline", title: "erhöhen"), increment_page_operator_job_path(job, din:), method: :patch, form_class: "inline" %> <% end %> <%= job.public_send("number_of_plans_#{din}") if job.respond_to? "number_of_plans_#{din}" %> <% if job.printing? %> <%= button_to icon("chevron-down", class: "size-5 inline", title: "verringern"), decrement_page_operator_job_path(job, din:), method: :patch, form_class: "inline" %>
<% end %> <% end %> <%= job.costum_qm_plan.round(2) %> m² <%= job.cost.round(2) %> € <%= job.status %> <% if job.printing? || job.canceled? || job.paid? %> <%= button_to icon("inbox-stack", class: "text-hsrm-gray size-6 inline drop-shadow hover:text-opacity-75", title: "Zurück in die Warteschlange"), operator_job_path(job), method: :patch, params: {:job => {status: :open}}, form_class: "inline" %> <% else %> <%= icon("inbox-stack", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow", title: "") %> <% end %> <% if job.open? || job.canceled? || job.paid? %> <%= button_to icon("printer", class: "text-hsrm-gray size-6 inline drop-shadow hover:text-opacity-75", title: "Drucken"), operator_job_path(job), method: :patch, params: {:job => {status: :printing}}, form_class: "inline" %> <% else %> <%= icon("printer", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow", title: "") %> <% end %> <% if job.printing? || job.paid? %> <% job.printing? && turbo_confirm = 'Sind die Pläne gedruckt und die Seitenanzahl und QM korrekt?' %> <%= button_to icon("arrow-up-tray", class: "text-hsrm-gray size-6 inline drop-shadow hover:text-opacity-75", title: "Pläne sind fertig gedruckt und bereit abgeholt zu werden."), operator_job_path(job), method: :patch, params: {:job => {status: :pickup}}, form: {data: {turbo_confirm: turbo_confirm}}, form_class: "inline" %> <% else %> <%= icon("arrow-up-tray", class: "text-hsrm-gray text-opacity-25 size-6 inline drop-shadow", title: "") %> <% end %> <% if job.pickup? || job.printing? %> <% job.printing? && turbo_confirm = 'Sind die Pläne gedruckt und die Seitenanzahl und QM korrekt?' %> <%= button_to icon("banknotes", class: "text-hsrm-gray size-6 inline drop-shadow hover:text-opacity-75", title: "Bezahlt"), operator_job_path(job), method: :patch, params: {:job => {status: :paid}}, form: {data: {turbo_confirm: turbo_confirm}}, 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"), operator_job_path(job), method: :patch, params: {:job => {status: :canceled}}, 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 %>