Merge pull request #14494 from snipe/features/add_supplier_address_to_licenses

Added supplier details to license view
This commit is contained in:
snipe 2024-03-26 12:20:57 +00:00 committed by GitHub
commit 1f29eb1875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -174,23 +174,56 @@
@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
</div>
</div>
</div>
@else
{{ trans('general.deleted') }}
@endif