Skip to content

A free open source IT asset/license management system

Fixed #16802 - use asset endpoint for assets assigned to locations

snipe0822aa985da8
diff --git a/resources/views/locations/view.blade.php b/resources/views/locations/view.blade.php
index 2f7cb075b5..90a8016da2 100644
--- a/resources/views/locations/view.blade.php
+++ b/resources/views/locations/view.blade.php
@@ -263,7 +263,7 @@
data-click-to-select="true"
id="assetsListingTable"
class="table table-striped snipe-table"
- data-url="{{route('api.locations.assigned_assets', ['location' => $location]) }}"
+ data-url="{{route('api.assets.index', ['assigned_to' => $location->id, 'assigned_type' => 'App\Models\Location']) }}"
data-export-options='{
"fileName": "export-locations-{{ str_slug($location->name) }}-assets-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]