/
home
/
sjslayjy
/
public_html
/
mosaram
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','Claims'); ?> <?php $__env->startSection('style'); ?> <?php echo e(Html::style("assets/css/bootstrap-datepicker3.min.css")); ?> <style> /* Voice Command Section Styles */ .voice-command-container { text-align: center; background: #fff; padding: 30px; border-radius: 10px; box-shadow: inset 2px 2px 5px #b8b9be, inset -3px -3px 7px #fff !important; margin: 20px auto; max-width: 500px; } .voice-command-title { font-size: 18px; font-weight: bold; margin-bottom: 20px; color: #333; } /* Pulse Effect for Microphone */ .voice-command-microphone { position: relative; width: 100px; height: 100px; margin: 0 auto 20px; cursor: pointer; display: flex; justify-content: center; align-items: center; } .voice-command-microphone::before { content: ''; position: absolute; width: 100%; height: 100%; background: rgba(0, 191, 255, 0.3); border-radius: 50%; animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } .voice-command-icon { font-size: 50px; color: #007bff; position: relative; z-index: 1; } .voice-command-input-group { margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 10px; } .voice-command-input { flex: 1; max-width: 300px; padding: 10px; box-shadow: inset 2px 2px 5px #b8b9be, inset -3px -3px 7px #fff !important; border-radius: 5px; font-size: 16px; } .voice-command-button { background-color: #007bff; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.3s; } .voice-command-button:hover { background-color: #0056b3; } .voice-command-status { margin-top: 20px; font-weight: bold; color: red; } .voice-command-display { margin-top: 10px; color: #555; } </style> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <lui> <i class="ace-icon fa fa-home home-icon"></i> <a href="#"></a> </lui> <li class="active"> Voice Command Based Reports </li> </ul> </div> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue"> Voice Command Based Reports </h3> </div> </div> <div class="voice-command-container"> <h1 class="voice-command-title">Click on the microphone to give a command!</h1> <div id="startVoice" class="voice-command-microphone"> <span class="voice-command-icon"><i class="fa fa-microphone" aria-hidden="true"></i></span> </div> <div class="voice-command-input-group"> <input type="text" id="commandInput" class="voice-command-input" placeholder="Type your command here"> <button id="submitCommand" class="voice-command-button">Submit</button> </div> <p id="status" class="voice-command-status">Status: Not Listening</p> <p id="displayCommand" class="voice-command-display">Command: None</p> </div> </div> </div><!-- /.page-content --> </div><!-- /.main-content --> <?php $__env->startSection('script'); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.min.js")); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.bootstrap.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.buttons.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.flash.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.html5.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.print.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.colVis.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.select.min.js")); ?> <?php echo e(Html::script("assets/js/ace-elements.min.js")); ?> <?php echo e(Html::script("assets/js/ace.min.js")); ?> <?php echo e(Html::script("assets/js/bootstrap-datepicker.min.js")); ?> <script type="text/javascript"> const commands = { "direct labour payment report": "/voice/direct-labour-payment-report", "monthly sales report": "/user/monthly-sales-report", "inventory status": "/user/inventory-status", "employee attendance": "/user/employee-attendance-report", }; // Function to handle command submission (both text and voice) function handleCommand(spokenCommand) { const command = spokenCommand.toLowerCase(); document.getElementById('displayCommand').innerText = `Command: ${command}`; if (commands[command]) { // Redirect to the Laravel route associated with the command window.location.href = commands[command]; } else { document.getElementById('status').innerText = 'An error occurred while processing your command.'; } } // Voice Command Handling document.getElementById('startVoice').addEventListener('click', () => { const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)(); recognition.lang = 'en-US'; recognition.start(); document.getElementById('status').innerText = 'Status: Listening...'; recognition.onresult = (event) => { const spokenCommand = event.results[0][0].transcript; handleCommand(spokenCommand); }; recognition.onerror = (event) => { document.getElementById('status').innerText = 'An error occurred while processing your command.'; console.error('Error occurred:', event.error); }; recognition.onend = () => { document.getElementById('status').innerText = 'Status: Not Listening'; }; }); // Text Command Handling document.getElementById('submitCommand').addEventListener('click', () => { const typedCommand = document.getElementById('commandInput').value; if (typedCommand.trim() !== "") { handleCommand(typedCommand); } else { alert("Please enter a valid command."); } }); </script> <?php $__env->stopSection(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('dashboard.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/pmmsanvp/public_html/sarojMain/resources/views/voice/report-index.blade.php ENDPATH**/ ?>