Fixed view#jobs and edit#jobs with jobs without pdf

This commit is contained in:
2025-08-05 00:51:05 +02:00
parent b534e45792
commit 624b046db4
2 changed files with 12 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
<div id="<%= dom_id job %>" class="flex flex-row space-x-4 shadow">
<div>
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>" width="600px" height="800px" class="" />
<% if @job.pdf.attached? && job.pdf.previewable? %>
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>" width="600px" height="800px" class="" />
<% end %>
</div>
<div>
<p class="my-3">

View File

@@ -1,6 +1,14 @@
<div id="<%= dom_id @job %>" class="flex flex-row space-x-4 shadow">
<div>
<embed type="application/pdf" src="<%= url_for(@job.pdf) %>#view=Fit" width="700px" height="900px" class="" />
<% if @job.pdf.attached? && @job.pdf.previewable? %>
<embed
type="application/pdf"
src="<%= url_for(@job.pdf) %> #view=Fit"
width="700px"
height="900px"
class=""
/>
<% end %>
</div>
<div>
<%= render "form", job: @job %>