Subversion Repositories SmartDukaan

Rev

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

Rev 27754 Rev 30522
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
	$(document).on('click', ".lead", function() {
2
	$(document).on('click', ".franchise-visit", function() {
3
		loadFranchiseeVisit("main-content");
3
		loadFranchiseeVisit("main-content");
4
	});
4
	});
-
 
5
 
-
 
6
	$(document).on('click', ".show-franchisee-visit",
-
 
7
		function() {
-
 
8
 
-
 
9
			var authId = $("#authUserFilter").val();
-
 
10
			var yearMonth = $("#monthWise").val();
-
 
11
			doGetAjaxRequestHandler(context + "/getFranchiseVisit?authId="
-
 
12
				+ authId + "&yearMonth=" + yearMonth, function(response) {
-
 
13
					console.log(response)
-
 
14
					$('.franchiseVisitContainer').html(response);
-
 
15
 
-
 
16
				});
-
 
17
		});
-
 
18
 
-
 
19
 
-
 
20
 
-
 
21
	$(document).on('click', ".franchisee-detail",
-
 
22
		function() {
-
 
23
 
-
 
24
			var visitId = $(this).data('visitid');
-
 
25
 
-
 
26
 
-
 
27
			doGetAjaxRequestHandler(context + "/getFranchiseeActivity?visitId="
-
 
28
				+ visitId, function(response) {
-
 
29
 
-
 
30
					$('#franchisee-visit-detail .modal-content').html(response);
-
 
31
 
-
 
32
				});
-
 
33
		});
5
});
34
});
6
 
35
 
7
function loadFranchiseeVisit(domId) {
36
function loadFranchiseeVisit(domId) {
8
	doGetAjaxRequestHandler(context + "/getOpenVisit", function(response) {
37
	doGetAjaxRequestHandler(context + "/franchiseVisit", function(response) {
9
		$('#' + domId).html(response);
38
		$('#' + domId).html(response);
10
	});
39
	});
11
}
40
}