From 26be4326b875062793f0ca937427e1036a676bb3 Mon Sep 17 00:00:00 2001 From: tatyabicchu Date: Wed, 19 Jun 2024 12:29:43 +0530 Subject: [PATCH 1/2] =?UTF-8?q?Resolves=20[BUG=20=F0=9F=90=9E=20]-Test=20O?= =?UTF-8?q?ption=20is=20not=20rendering=20in=20the=20pdf=20=20#4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/pdf/allOptions.blade.php | 74 ++++++++++++++++++++++++ resources/views/pdf/invoice.blade.php | 11 +++- 2 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 resources/views/pdf/allOptions.blade.php diff --git a/resources/views/pdf/allOptions.blade.php b/resources/views/pdf/allOptions.blade.php new file mode 100644 index 0000000..0d6ce1b --- /dev/null +++ b/resources/views/pdf/allOptions.blade.php @@ -0,0 +1,74 @@ + + + + Test Options + + + +
+

Test Options

+ + + + + + + + + + @foreach($data['allOptions'] as $option) + + + + + + @endforeach + +
NameDescriptionValue
{{ $option['text'] }}{{ $option['description'] ?? 'N/A' }}{{ $option['value'] !== null ? $option['value'] : 'null' }}
+
+ + diff --git a/resources/views/pdf/invoice.blade.php b/resources/views/pdf/invoice.blade.php index ad0c8ce..d99bedd 100644 --- a/resources/views/pdf/invoice.blade.php +++ b/resources/views/pdf/invoice.blade.php @@ -39,12 +39,15 @@ + @include('pdf.cover') - +
- + @include('pdf.foreword') - + +
+ @include('pdf.allOptions')
@include('pdf.description') @@ -60,6 +63,8 @@ @endif @include('pdf.heuristics') + + From 5dca597bd7c1b733cfe76983692d772e0c0b85b0 Mon Sep 17 00:00:00 2001 From: tatyabicchu Date: Wed, 19 Jun 2024 12:39:21 +0530 Subject: [PATCH 2/2] added if statements and fineTuned testOption pdf render --- resources/views/pdf/allOptions.blade.php | 2 ++ resources/views/pdf/invoice.blade.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/resources/views/pdf/allOptions.blade.php b/resources/views/pdf/allOptions.blade.php index 0d6ce1b..f61863f 100644 --- a/resources/views/pdf/allOptions.blade.php +++ b/resources/views/pdf/allOptions.blade.php @@ -49,6 +49,7 @@ +@if(isset($data['allOptions']) && $data['allOptions'] != '')

Test Options

@@ -70,5 +71,6 @@
+@endif diff --git a/resources/views/pdf/invoice.blade.php b/resources/views/pdf/invoice.blade.php index d99bedd..bf70175 100644 --- a/resources/views/pdf/invoice.blade.php +++ b/resources/views/pdf/invoice.blade.php @@ -47,7 +47,9 @@ @include('pdf.foreword')
+ @if(isset($data['allOptions']) && $data['allOptions'] != '') @include('pdf.allOptions') + @endif
@include('pdf.description')