mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
Check for user on enable_sounds
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
if (data.status == 'success') {
|
||||
$('#audited tbody').prepend("<tr class='success'><td>" + data.payload.asset_tag + "</td><td>" + data.messages + "</td><td>" + data.payload.status_label + " (" + data.payload.status_type + ")</td><td>" + data.payload.note + "</td><td><i class='fas fa-check text-success' style='font-size:18px;'></i></td></tr>");
|
||||
|
||||
@if ($user->enable_sounds)
|
||||
@if ($user?->enable_sounds)
|
||||
var audio = new Audio('{{ config('app.url') }}/sounds/success.mp3');
|
||||
audio.play()
|
||||
@endif
|
||||
@@ -182,7 +182,7 @@
|
||||
});
|
||||
|
||||
function handleAuditFail (data, asset_tag) {
|
||||
@if ($user->enable_sounds)
|
||||
@if ($user?->enable_sounds)
|
||||
var audio = new Audio('{{ config('app.url') }}/sounds/error.mp3');
|
||||
audio.play()
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user