Subversion Repositories SmartDukaan

Rev

Rev 36664 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
36645 vikas 1
$(document).on('click', ".beat-report", function () {
2
    doGetAjaxRequestHandler(context + "/beat-report",
3
        function (response) {
4
            $('#main-content').html(response);
5
        });
6
});
7
 
8
$(document).on('click', '.beat-report-fetch', function () {
9
    var selectedDate = $("#beat-report-date").val();
10
    if (!selectedDate) {
11
        alert("Please select a date!");
12
        return;
13
    }
14
    doGetAjaxRequestHandler(context + "/beat-report/data?date=" + selectedDate,
15
        function (response) {
16
            $('.beat-report-container').html(response);
17
        });
18
});
19
 
20
$(document).on('click', '.user-detail-refresh', function () {
21
    var userId = $(this).data('userid');
22
    var selectedDate = $("#user-detail-date").val();
23
    if (!selectedDate) {
24
        alert("Please select a date!");
25
        return;
26
    }
27
    doGetAjaxRequestHandler(context + "/beat-report/user-detail?userId=" + userId + "&date=" + selectedDate,
28
        function (response) {
29
            $('#main-content').html(response);
30
        });
31
});
32
 
33
$(document).on('click', '.beat-user-detail-link', function () {
34
    var userId = $(this).data('userid');
35
    var selectedDate = $("#beat-report-date").val();
36
    if (!selectedDate) {
37
        selectedDate = new Date().toISOString().split('T')[0];
38
    }
39
    doGetAjaxRequestHandler(context + "/beat-report/user-detail?userId=" + userId + "&date=" + selectedDate,
40
        function (response) {
41
            $('#main-content').html(response);
42
        });
43
});