Subversion Repositories SmartDukaan

Rev

Rev 36868 | Rev 37003 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36868 Rev 36984
Line 77... Line 77...
77
        let endPoint = `${context}/downloadDateWiseLead?leadStatus=${status}&color=${color}&startDate=${startDate}&endDate=${endDate}`;
77
        let endPoint = `${context}/downloadDateWiseLead?leadStatus=${status}&color=${color}&startDate=${startDate}&endDate=${endDate}`;
78
        window.location.href = endPoint;
78
        window.location.href = endPoint;
79
 
79
 
80
    });
80
    });
81
 
81
 
-
 
82
    // Existing lead-table Search box: pressing Enter searches ALL leads (server-side) by
-
 
83
    // name / mobile / outlet / city, not just the rows already loaded. Typing still filters
-
 
84
    // the loaded rows via DataTables; clearing the box removes the global results.
-
 
85
    $(document).on('keydown', "#lead-table_filter input", function (e) {
-
 
86
        if (e.which === 13) {
-
 
87
            e.preventDefault();
-
 
88
            var term = $.trim($(this).val() || "");
-
 
89
            if (term === "") {
-
 
90
                $('#global-search-results').html("");
-
 
91
                return;
-
 
92
            }
-
 
93
            doGetAjaxRequestHandler(context + "/globalLeadSearch?searchTerm=" + encodeURIComponent(term),
-
 
94
                function (response) {
-
 
95
                    $('#global-search-results').html(response);
-
 
96
                });
-
 
97
        }
-
 
98
    });
-
 
99
 
-
 
100
    $(document).on('input', "#lead-table_filter input", function () {
-
 
101
        if ($.trim($(this).val() || "") === "") {
-
 
102
            $('#global-search-results').html("");
-
 
103
        }
-
 
104
    });
-
 
105
 
82
 
106
 
83
    $(document).on('click', ".visit-request-plan", function () {
107
    $(document).on('click', ".visit-request-plan", function () {
84
 
108
 
85
        doGetAjaxRequestHandler(context + "/visitPlan", function (response) {
109
        doGetAjaxRequestHandler(context + "/visitPlan", function (response) {
86
            $('#' + 'main-content').html(response);
110
            $('#' + 'main-content').html(response);