==
<audio id="myAudio">
<source src="{{asset('public/assets/back-end/sound/notification.mp3')}}" type="audio/mpeg">
</audio>
<script>
var audio = document.getElementById("myAudio");
function playAudio() {
audio.play();
}
function pauseAudio() {
audio.pause();
}
</script>
<script>
@if(\App\CPU\Helpers::module_permission_check('order_management') && env('APP_MODE')!='dev')
setInterval(function () {
$.get({
url: '{{route('admin.get-order-data')}}',
dataType: 'json',
success: function (response) {
let data = response.data;
if (data.new_order > 0) {
playAudio();
$('#popup-modal').appendTo("body").modal('show');
}
},
});
}, 10000);
@endif
function check_order() {
location.href = '{{route('admin.orders.list',['status'=>'all'])}}';
}
</script>
==
No comments:
Post a Comment