mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #15383 from snipe/re-adds-checkout-button
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Fixed #15378 - Corrected gate on checkin button on asset view
This commit is contained in:
commit
c589140ea0
|
@ -190,7 +190,7 @@
|
||||||
|
|
||||||
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
|
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
|
||||||
@if (($asset->assigned_to != '') && ($asset->deleted_at==''))
|
@if (($asset->assigned_to != '') && ($asset->deleted_at==''))
|
||||||
@can('checkin', \App\Models\Asset::class)
|
@can('checkin', $asset)
|
||||||
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
||||||
<span class="tooltip-wrapper"{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}>
|
<span class="tooltip-wrapper"{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}>
|
||||||
<a role="button" href="{{ route('hardware.checkin.create', $asset->id) }}" class="btn btn-sm btn-primary bg-purple btn-social btn-block hidden-print{{ (!$asset->model ? ' disabled' : '') }}">
|
<a role="button" href="{{ route('hardware.checkin.create', $asset->id) }}" class="btn btn-sm btn-primary bg-purple btn-social btn-block hidden-print{{ (!$asset->model ? ' disabled' : '') }}">
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
@elseif (($asset->assigned_to == '') && ($asset->deleted_at==''))
|
@elseif (($asset->assigned_to == '') && ($asset->deleted_at==''))
|
||||||
@can('checkout', Asset::class)
|
@can('checkout', $asset)
|
||||||
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
||||||
<span class="tooltip-wrapper"{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}>
|
<span class="tooltip-wrapper"{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}>
|
||||||
<a href="{{ route('hardware.checkout.create', $asset->id) }}" class="btn btn-sm bg-maroon btn-social btn-block hidden-print{{ (!$asset->model ? ' disabled' : '') }}">
|
<a href="{{ route('hardware.checkout.create', $asset->id) }}" class="btn btn-sm bg-maroon btn-social btn-block hidden-print{{ (!$asset->model ? ' disabled' : '') }}">
|
||||||
|
|
Loading…
Reference in a new issue