Skip to content

Commit a916767

Browse files
committed
Show the QR code on the asset page regardless of label settings
Signed-off-by: snipe <[email protected]>
1 parent 1c57bfa commit a916767

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

app/Http/Controllers/Assets/AssetsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public function getQrCode(Asset $asset) : Response | BinaryFileResponse | string
519519
{
520520
$settings = Setting::getSettings();
521521

522-
if (($settings->qr_code == '1') && ($settings->label2_2d_type !== 'none')) {
522+
if ($settings->label2_2d_type !== 'none') {
523523

524524
if ($asset) {
525525
$size = Helper::barcodeDimensions($settings->label2_2d_type);

resources/views/hardware/view.blade.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,12 +405,9 @@ class="form-inline"
405405
</ul>
406406
</div>
407407
@endif
408-
@if ($snipeSettings->qr_code=='1')
409-
<div class="col-md-12 text-center" style="padding-top: 15px;">
410-
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail" style="height: 150px; width: 150px; margin-right: 10px;" alt="QR code for {{ $asset->getDisplayNameAttribute() }}">
411-
</div>
412-
@endif
413-
408+
<div class="col-md-12 text-center" style="padding-top: 15px;">
409+
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail" style="height: 150px; width: 150px; margin-right: 10px;" alt="QR code for {{ $asset->getDisplayNameAttribute() }}">
410+
</div>
414411
<br><br>
415412
</div>
416413

0 commit comments

Comments
 (0)