Fixed #4589 - Licence deployed to asset issue
This commit is contained in:
parent
e4ab4024c5
commit
aff93d8f2b
2 changed files with 19 additions and 9 deletions
|
@ -315,7 +315,7 @@ class LicensesController extends Controller
|
||||||
$licenseSeat->asset_id = $request->input('asset_id');
|
$licenseSeat->asset_id = $request->input('asset_id');
|
||||||
|
|
||||||
// Override asset's assigned user if available
|
// Override asset's assigned user if available
|
||||||
if ($target->assigned_to!='') {
|
if ($target->checkedOutToUser()) {
|
||||||
$licenseSeat->assigned_to = $target->assigned_to;
|
$licenseSeat->assigned_to = $target->assigned_to;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,34 +56,44 @@
|
||||||
<td>Seat {{ $count }} </td>
|
<td>Seat {{ $count }} </td>
|
||||||
<td>
|
<td>
|
||||||
@if (($licensedto->user) && ($licensedto->deleted_at == NULL))
|
@if (($licensedto->user) && ($licensedto->deleted_at == NULL))
|
||||||
|
|
||||||
@can('users.view')
|
@can('users.view')
|
||||||
<a href="{{ route('users.show', $licensedto->assigned_to) }}">
|
<a href="{{ route('users.show', $licensedto->assigned_to) }}">
|
||||||
|
<i class="fa fa-user"></i>
|
||||||
{{ $licensedto->user->present()->fullName() }}
|
{{ $licensedto->user->present()->fullName() }}
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
|
<i class="fa fa-user"></i>
|
||||||
{{ $licensedto->user->present()->fullName() }}
|
{{ $licensedto->user->present()->fullName() }}
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@elseif (($licensedto->user) && ($licensedto->deleted_at != NULL))
|
@elseif (($licensedto->user) && ($licensedto->deleted_at != NULL))
|
||||||
|
|
||||||
<del>{{ $licensedto->user->present()->fullName() }}</del>
|
<del>{{ $licensedto->user->present()->fullName() }}</del>
|
||||||
@elseif ($licensedto->asset)
|
|
||||||
@if ($licensedto->asset->assigned_to != 0)
|
|
||||||
@can('users.view')
|
|
||||||
{!! $licensedto->asset->assignedTo->present()->nameUrl() !!}
|
|
||||||
@else
|
|
||||||
{{ $licensedto->asset->assignedTo->present()->name() }}
|
|
||||||
@endcan
|
|
||||||
@endif
|
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if ($licensedto->asset)
|
@if ($licensedto->asset)
|
||||||
|
|
||||||
@can('view', $licensedto->asset)
|
@can('view', $licensedto->asset)
|
||||||
<a href="{{ route('hardware.show', $licensedto->asset_id) }}">
|
<a href="{{ route('hardware.show', $licensedto->asset_id) }}">
|
||||||
|
<i class="fa fa-barcode"></i>
|
||||||
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
|
<i class="fa fa-barcode"></i>
|
||||||
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
@if ($licensedto->asset->location)
|
||||||
|
@can('locations.view')
|
||||||
|
({!! $licensedto->asset->location->present()->nameUrl() !!})
|
||||||
|
@else
|
||||||
|
({{ $licensedto->asset->location->present()->name() }})
|
||||||
|
@endcan
|
||||||
|
@endif
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue