Skip to content

A free open source IT asset/license management system

adds location qr code option to labels

Godfrey Ma69133e2aedb
diff --git a/app/View/Label.php b/app/View/Label.php
index 52a53a0437..6dbad39a34 100644
--- a/app/View/Label.php
+++ b/app/View/Label.php
@@ -139,6 +139,9 @@ class Label implements View
case 'plain_serial_number':
$barcode2DTarget = $asset->serial;
break;
+ case 'location':
+ $barcode2DTarget = route('locations.show', $asset->location_id);
+ break;
case 'hardware_id':
default:
$barcode2DTarget = route('hardware.show', $asset);
diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.php
index 92838d72ac..2b3cfbec7e 100644
--- a/resources/views/settings/labels.blade.php
+++ b/resources/views/settings/labels.blade.php
@@ -301,7 +301,7 @@
<x-input.select
name="label2_2d_target"
id="label2_2d_target"
- :options="['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')', 'ht_tag'=>'/ht/{asset_tag}']"
+ :options="['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')', 'ht_tag'=>'/ht/{asset_tag}', 'location' => '/location/{location_id}']"
:selected="old('label2_2d_target', $setting->label2_2d_target)"
class="col-md-4"
aria-label="label2_2d_target"