diff --git a/public/js/workorder-notice.js b/public/js/workorder-notice.js index bc34a18..2eec9ea 100644 --- a/public/js/workorder-notice.js +++ b/public/js/workorder-notice.js @@ -1,5 +1,5 @@ -const workordertimer = setInterval(function () { - +function workorderNotice() +{ $.ajax({ url: '/'+window.location.pathname.split('/')[1]+'/workorder_notice', type: 'POST', @@ -65,5 +65,12 @@ const workordertimer = setInterval(function () { } }); +} +$(document).ready(function () { + workorderNotice(); +}); + +const workordertimer = setInterval(function () { + workorderNotice() }, 5000);