Added supplier details to license view

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-03-26 12:18:04 +00:00
parent 02a37e2f89
commit 0d9b6eaf71

View file

@ -174,23 +174,64 @@
@endif
@if ($license->supplier_id)
<div class="row">
<div class="col-md-3">
<strong>
{{ trans('general.supplier') }}
</strong>
</div>
<div class="col-md-9">
@if ($license->supplier)
<a href="{{ route('suppliers.show', $license->supplier_id) }}">
@if ($license->supplier)
<div class="row">
<div class="col-md-3">
<strong>{{ trans('general.supplier') }}</strong>
</div>
<div class="col-md-9">
@can('view', \App\Models\Supplier::class)
<a href="{{ route('suppliers.show', $license->supplier->id) }}">
{{ $license->supplier->name }}
</a>
@else
{{ $license->supplier->name }}
</a>
@else
{{ trans('general.deleted') }}
@endif
@endcan
@if ($license->supplier->url)
<br><i class="fas fa-globe-americas" aria-hidden="true"></i> <a href="{{ $license->supplier->url }}" rel="noopener">{{ $license->supplier->url }}</a>
@endif
@if ($license->supplier->phone)
<br><i class="fas fa-phone" aria-hidden="true"></i>
<a href="tel:{{ $license->supplier->phone }}">{{ $license->supplier->phone }}</a>
@endif
@if ($license->supplier->email)
<br><i class="far fa-envelope" aria-hidden="true"></i> <a href="mailto:{{ $license->supplier->email }}">{{ $license->supplier->email }}</a>
@endif
@if ($license->supplier->address)
<br>{{ $license->supplier->address }}
@endif
@if ($license->supplier->address2)
<br>{{ $license->supplier->address2 }}
@endif
@if ($license->supplier->city)
<br>{{ $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)
<br><i class="fas fa-phone" aria-hidden="true"></i>
<a href="tel:{{ $license->supplier->support_phone }}">{{ $license->supplier->support_phone }}</a>
@endif
@if ($license->supplier->support_email)
<br><i class="far fa-envelope" aria-hidden="true"></i> <a href="mailto:{{ $license->supplier->support_email }}">{{ $license->supplier->support_email }}</a>
@endif
</div>
</div>
</div>
@endif