Subversion Repositories SmartDukaan

Rev

Rev 27754 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function() {
        $(document).on('click', ".franchise-visit", function() {
                loadFranchiseeVisit("main-content");
        });

        $(document).on('click', ".show-franchisee-visit",
                function() {

                        var authId = $("#authUserFilter").val();
                        var yearMonth = $("#monthWise").val();
                        doGetAjaxRequestHandler(context + "/getFranchiseVisit?authId="
                                + authId + "&yearMonth=" + yearMonth, function(response) {
                                        console.log(response)
                                        $('.franchiseVisitContainer').html(response);

                                });
                });



        $(document).on('click', ".franchisee-detail",
                function() {

                        var visitId = $(this).data('visitid');


                        doGetAjaxRequestHandler(context + "/getFranchiseeActivity?visitId="
                                + visitId, function(response) {

                                        $('#franchisee-visit-detail .modal-content').html(response);

                                });
                });
});

function loadFranchiseeVisit(domId) {
        doGetAjaxRequestHandler(context + "/franchiseVisit", function(response) {
                $('#' + domId).html(response);
        });
}