mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge branch 'develop'
This commit is contained in:
commit
a705c714ab
|
@ -460,8 +460,14 @@ class AssetsController extends Controller
|
||||||
$asset->location_id = ($target) ? $target->id : '';
|
$asset->location_id = ($target) ? $target->id : '';
|
||||||
|
|
||||||
} elseif (request('checkout_to_type')=='asset') {
|
} elseif (request('checkout_to_type')=='asset') {
|
||||||
|
|
||||||
|
if (request('assigned_asset') == $assetId) {
|
||||||
|
return redirect()->back()->with('error', 'You cannot check an asset out to itself.');
|
||||||
|
}
|
||||||
|
|
||||||
$target = Asset::where('id','!=',$assetId)->find(request('assigned_asset'));
|
$target = Asset::where('id','!=',$assetId)->find(request('assigned_asset'));
|
||||||
$asset->location_id = $target->rtd_location_id;
|
$asset->location_id = $target->rtd_location_id;
|
||||||
|
|
||||||
// Override with the asset's location_id if it has one
|
// Override with the asset's location_id if it has one
|
||||||
if ($target->location_id!='') {
|
if ($target->location_id!='') {
|
||||||
$asset->location_id = ($target) ? $target->location_id : '';
|
$asset->location_id = ($target) ? $target->location_id : '';
|
||||||
|
|
|
@ -627,19 +627,24 @@
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="table table-striped snipe-table"
|
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||||
data-toolbar="#toolbar"
|
data-cookie-id-table="assetsTable"
|
||||||
|
data-pagination="true"
|
||||||
|
data-id-table="assetsTable"
|
||||||
|
data-search="true"
|
||||||
|
data-side-pagination="server"
|
||||||
|
data-show-columns="true"
|
||||||
data-show-export="true"
|
data-show-export="true"
|
||||||
data-show-refresh="true"
|
data-show-refresh="true"
|
||||||
data-export-options='{
|
data-sort-order="asc"
|
||||||
"fileName": "{{ str_slug($asset->asset_tag) }}-assets-export",
|
id="assetsListingTable"
|
||||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
class="table table-striped snipe-table"
|
||||||
}'
|
|
||||||
data-search="false"
|
|
||||||
data-url="{{route('api.assets.index',['assigned_to' => $asset->id, 'assigned_type' => 'App\Models\Asset']) }}"
|
data-url="{{route('api.assets.index',['assigned_to' => $asset->id, 'assigned_type' => 'App\Models\Asset']) }}"
|
||||||
data-show-footer="true"
|
data-export-options='{
|
||||||
data-cookie-id-table="assetAssetsTable"
|
"fileName": "export-assets-{{ str_slug($asset->name) }}-assets-{{ date('Y-m-d') }}",
|
||||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||||
|
}'>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
class="table table-striped snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"
|
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"
|
||||||
data-export-options='{
|
data-export-options='{
|
||||||
"fileName": "export-locations-{{ str_slug($statuslabel->name) }}-assets-{{ date('Y-m-d') }}",
|
"fileName": "export-assets-{{ str_slug($statuslabel->name) }}-assets-{{ date('Y-m-d') }}",
|
||||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||||
}'>
|
}'>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue