mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Added sounds to quickscan checkin
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (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
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (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
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
60eb602156
commit
5c6c655cdc
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue