Rev 36645 | Rev 36806 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(document).on('click', ".beat-report", function () {doGetAjaxRequestHandler(context + "/beat-report",function (response) {$('#main-content').html(response);});});$(document).on('click', '.beat-report-fetch', function () {var selectedDate = $("#beat-report-date").val();if (!selectedDate) {alert("Please select a date!");return;}doGetAjaxRequestHandler(context + "/beat-report/data?date=" + selectedDate,function (response) {$('.beat-report-container').html(response);});});$(document).on('click', '.user-detail-refresh', function () {var userId = $('#user-detail-user').val() || $(this).data('userid');var selectedDate = $("#user-detail-date").val();if (!selectedDate) {alert("Please select a date!");return;}doGetAjaxRequestHandler(context + "/beat-report/user-detail?userId=" + userId + "&date=" + selectedDate,function (response) {$('#main-content').html(response);});});$(document).on('change', '#user-detail-level', function () {var level = $(this).val();var userSelect = $('#user-detail-user');userSelect.html('<option value="">Select User</option>');if (!level) return;$.ajax({url: context + "/beatPlan/getAuthUsers", type: "GET", dataType: "json",data: { categoryId: 4, escalationType: level },success: function (r) {var data = r.response || r;var html = '<option value="">Select User</option>';data.forEach(function (u) {html += '<option value="' + u.id + '">' + u.name + '</option>';});userSelect.html(html);}});});$(document).on('change', '#user-detail-user', function () {var authUserId = $(this).val();if (!authUserId) return;var selectedDate = $("#user-detail-date").val();if (!selectedDate) {selectedDate = new Date().toISOString().split('T')[0];}doGetAjaxRequestHandler(context + "/beat-report/user-detail?authUserId=" + authUserId + "&date=" + selectedDate,function (response) {$('#main-content').html(response);});});$(document).on('click', '.beat-user-detail-link', function () {var userId = $(this).data('userid');var selectedDate = $("#beat-report-date").val();if (!selectedDate) {selectedDate = new Date().toISOString().split('T')[0];}doGetAjaxRequestHandler(context + "/beat-report/user-detail?userId=" + userId + "&date=" + selectedDate,function (response) {$('#main-content').html(response);});});