Added audio in panel box inspection stock page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Laravel Pint / pint (pull_request) Successful in 2m34s
Laravel Larastan / larastan (pull_request) Failing after 4m36s

This commit is contained in:
dhanabalan
2026-10-26 11:06:00 +05:30
parent d1ca8b0ea9
commit fcbe328833
2 changed files with 19 additions and 1 deletions

View File

@@ -450,9 +450,10 @@ class PanelBoxInspectionStock extends Page
if ($serialExists) {
Notification::make()
->title('Duplicate Serial Number')
->body("Serial number already exists '$serialNumber' with supplier number '$supplier'.")
->body("Serial number already exists '$serialNumber' with supplier number '$supplier'.<br>Please scan this serial number in Invoice Validation.")
->danger()
->send();
$this->dispatch('play-error-sound');
$this->form->fill([
'plant_id' => $plantId,
'line_id' => $lineId,

View File

@@ -6,4 +6,21 @@
</div>
</div>
<audio id="error-sound" src="{{ asset('sounds/scan_serial_tamil.mp3') }}" preload="auto"></audio>
<script>
document.addEventListener('livewire:init', () => {
Livewire.on('play-error-sound', () => {
const audio = document.getElementById('error-sound');
if (audio) {
audio.currentTime = 0;
audio.play().catch(error => {
console.log('Could not play error sound:', error);
});
}
});
});
</script>
</x-filament-panels::page>