From e2a2723e2809105a77f40976b9d129e8e0ae5530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Thu, 21 Jan 2021 22:29:06 +0300 Subject: [PATCH] document attachment --- app/Abstracts/View/Components/DocumentShow.php | 2 +- resources/views/components/documents/show/attachment.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Abstracts/View/Components/DocumentShow.php b/app/Abstracts/View/Components/DocumentShow.php index 15a41f08a..b9f73d80d 100644 --- a/app/Abstracts/View/Components/DocumentShow.php +++ b/app/Abstracts/View/Components/DocumentShow.php @@ -512,7 +512,7 @@ abstract class DocumentShow extends Base $this->hideNote = $hideNote; $this->hideAttachment = $hideAttachment; - $this->attachment = $attachment; + $this->attachment = !empty($attachment) ? $attachment : !empty($document) ? $document->attachment : ''; $this->textItems = $textItems; $this->textQuantity = $textQuantity; diff --git a/resources/views/components/documents/show/attachment.blade.php b/resources/views/components/documents/show/attachment.blade.php index 67ba75fef..db5d27642 100644 --- a/resources/views/components/documents/show/attachment.blade.php +++ b/resources/views/components/documents/show/attachment.blade.php @@ -1,5 +1,5 @@ @if ($attachment) -
+
@php $file = $attachment;