Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #10560 - optional ability to play sound on audit #15244

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

snipe
Copy link
Owner

@snipe snipe commented Aug 7, 2024

This adds the ability to optionally play a sound on audit. Fixes #10560

Copy link

what-the-diff bot commented Aug 7, 2024

PR Summary

  • Addition of New User Preference
    In the file ProfileController.php, a modification has been made to allow users to set their preference for sound notifications. This happens through the postIndex method.

  • Database Update
    Added a new file 2024_08_07_204014_add_play_sounds_to_profile.php. This is a migration file used to update our database. It adds a new option 'enable_sounds' for each user in the users table.

  • New Sound Effects
    New sound files named error.mp3 and success.mp3 have been added in the public directory. These MP3 files will be used as sound effects.

  • Interface Update for Sound Effects
    The files resources/lang/en-US/account/general.php, resources/views/account/profile.blade.php, and resources/views/hardware/quickscan.blade.php have been updated. These updates add a new option for enabling sound effects on the user profile view. Also, sound effects are played upon successful or failed audits, which is determined by each user's settings.

Signed-off-by: snipe <[email protected]>
@brianhoganm
Copy link

We would ABSOLUTELY LOVE to have a sound for check in and checkout. I use a wireless scanner to check several hundred students in and I rely on my barcode scanner beep but that's not always as reliable. Lots of great stuff...I see happening in v7. Thanks!

@snipe
Copy link
Owner Author

snipe commented Aug 7, 2024

It’s a little trickier on checkin/checkout unfortunately, because of the way browsers work. Most (all?) browsers now require a click event in order to play sounds. Since we take you to a new page on standard checkin/checkout, the sound doesn’t get a chance to play on the click event, and then on the next page load, no click action is triggered. We’re still working on that tho ;)

@snipe snipe merged commit 900beaa into develop Aug 7, 2024
9 checks passed
@snipe snipe deleted the features/play_sound_on_audit branch August 7, 2024 23:59
@snipe
Copy link
Owner Author

snipe commented Aug 8, 2024

@brianhoganm when you're doing those checkouts, which method are you using? /hardware/bulkcheckout, or something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants