Merge remote-tracking branch 'origin/develop'
Some checks are pending
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run

This commit is contained in:
snipe 2024-08-10 19:37:37 +01:00
commit 91874dfe0b
2 changed files with 14 additions and 2 deletions

View file

@ -129,6 +129,12 @@
success : function (data) {
if (data.status == 'success') {
$('#checkedin tbody').prepend("<tr class='success'><td>" + data.payload.asset_tag + "</td><td>" + data.payload.model + "</td><td>" + data.payload.model_number + "</td><td>" + data.messages + "</td><td><i class='fas fa-check text-success'></i></td></tr>");
@if ($user->enable_sounds)
var audio = new Audio('{{ config('app.url') }}/sounds/success.mp3');
audio.play()
@endif
incrementOnSuccess();
} else {
handlecheckinFail(data);
@ -148,6 +154,12 @@
});
function handlecheckinFail (data) {
@if ($user->enable_sounds)
var audio = new Audio('{{ config('app.url') }}/sounds/error.mp3');
audio.play()
@endif
if (data.payload.asset_tag) {
var asset_tag = data.payload.asset_tag;
var model = data.payload.model;

View file

@ -156,7 +156,7 @@
$('#audited tbody').prepend("<tr class='success'><td>" + data.payload.asset_tag + "</td><td>" + data.messages + "</td><td><i class='fas fa-check text-success' style='font-size:18px;'></i></td></tr>");
@if ($user->enable_sounds)
var audio = new Audio('/sounds/success.mp3');
var audio = new Audio('{{ config('app.url') }}/sounds/success.mp3');
audio.play()
@endif
@ -180,7 +180,7 @@
function handleAuditFail (data) {
@if ($user->enable_sounds)
var audio = new Audio('/sounds/error.mp3');
var audio = new Audio('{{ config('app.url') }}/sounds/error.mp3');
audio.play()
@endif
if (data.asset_tag) {