From 0d9b6eaf7150629b0323a80867ebda7d72e16332 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 26 Mar 2024 12:18:04 +0000 Subject: [PATCH 1/3] Added supplier details to license view Signed-off-by: snipe --- resources/views/licenses/view.blade.php | 71 +++++++++++++++++++------ 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index b23023f489..8caddd03b9 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -174,23 +174,64 @@ @endif - @if ($license->supplier_id) -
-
- - {{ trans('general.supplier') }} - -
-
- @if ($license->supplier) - + @if ($license->supplier) +
+
+ {{ trans('general.supplier') }} +
+
+ @can('view', \App\Models\Supplier::class) + + {{ $license->supplier->name }} + + @else {{ $license->supplier->name }} - - @else - {{ trans('general.deleted') }} - @endif + @endcan + + @if ($license->supplier->url) +
{{ $license->supplier->url }} + @endif + + @if ($license->supplier->phone) +
+ {{ $license->supplier->phone }} + @endif + + @if ($license->supplier->email) +
{{ $license->supplier->email }} + @endif + + @if ($license->supplier->address) +
{{ $license->supplier->address }} + @endif + @if ($license->supplier->address2) +
{{ $license->supplier->address2 }} + @endif + @if ($license->supplier->city) +
{{ $license->supplier->city }}, + @endif + @if ($license->supplier->state) + {{ $license->supplier->state }} + @endif + @if ($license->supplier->country) + {{ $license->supplier->country }} + @endif + @if ($license->supplier->zip) + {{ $license->supplier->zip }} + @endif + + + + @if ($license->supplier->support_phone) +
+ {{ $license->supplier->support_phone }} + @endif + + @if ($license->supplier->support_email) +
{{ $license->supplier->support_email }} + @endif +
-
@endif From 77dacfcc30e4eb42deb6657f296002b4b6b2046f Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 26 Mar 2024 12:19:29 +0000 Subject: [PATCH 2/3] Show if deleted supplier Signed-off-by: snipe --- resources/views/licenses/view.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 8caddd03b9..62c5ffa67f 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -187,7 +187,7 @@ @else {{ $license->supplier->name }} @endcan - + @if ($license->supplier->url)
{{ $license->supplier->url }} @endif @@ -232,6 +232,8 @@ @endif
+ @else + {{ trans('general.deleted') }} @endif From a4e5ae0938dccc87af3c2172f71e97448d73f884 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 26 Mar 2024 12:20:27 +0000 Subject: [PATCH 3/3] Removed duplicates Signed-off-by: snipe --- resources/views/licenses/view.blade.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 62c5ffa67f..4f47055c27 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -219,17 +219,7 @@ @if ($license->supplier->zip) {{ $license->supplier->zip }} @endif - - - - @if ($license->supplier->support_phone) -
- {{ $license->supplier->support_phone }} - @endif - - @if ($license->supplier->support_email) -
{{ $license->supplier->support_email }} - @endif + @else