Subversion Repositories SmartDukaan

Rev

Rev 35499 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35499 Rev 35517
Line 8... Line 8...
8
    doGetAjaxRequestHandler(context + "/trial/all-trial", function (response) {
8
    doGetAjaxRequestHandler(context + "/trial/all-trial", function (response) {
9
        $('#' + domId).html(response);
9
        $('#' + domId).html(response);
10
    });
10
    });
11
}
11
}
12
 
12
 
-
 
13
function getByStatus(status) {
-
 
14
    doGetAjaxRequestHandler(
-
 
15
        `${context}/trial/by-status?status=${status}`,
-
 
16
        function (response) {
-
 
17
            $('#main-content').html(response);
-
 
18
        }
-
 
19
    );
-
 
20
}
-
 
21
 
13
$(function () {
22
$(function () {
14
    $(document).on('click', ".trial_users", function () {
23
    $(document).on('click', ".trial_users", function () {
15
        loadPendingTrialForms("main-content");
24
        loadPendingTrialForms("main-content");
16
    });
25
    });
-
 
26
    $(document).on('change', ".tstatus", function () {
-
 
27
        const status = $(this).val();
-
 
28
 
-
 
29
        if (!status) {
-
 
30
            loadAllTrialForms("main-content");
-
 
31
            return;
-
 
32
        }
-
 
33
 
-
 
34
        getByStatus(status);
-
 
35
    });
-
 
36
 
17
    $(document).on('click', ".verified_trial_users", function () {
37
    $(document).on('click', ".verified_trial_users", function () {
18
        loadVerifiedTrialForms("main-content");
38
        loadVerifiedTrialForms("main-content");
19
    });
39
    });
20
    $(document).on('click', ".all_trial_users", function () {
40
    $(document).on('click', ".all_trial_users", function () {
21
        loadAllTrialForms("main-content");
41
        loadAllTrialForms("main-content");
Line 65... Line 85...
65
            }
85
            }
66
        );
86
        );
67
    });
87
    });
68
 
88
 
69
 
89
 
70
 
-
 
71
    function loadVerifiedTrialForms(domId) {
90
    function loadVerifiedTrialForms(domId) {
72
        doGetAjaxRequestHandler(context + "/trial/verified", function (response) {
91
        doGetAjaxRequestHandler(context + "/trial/verified", function (response) {
73
            $('#' + domId).html(response);
92
            $('#' + domId).html(response);
74
        });
93
        });
75
    }
94
    }