Subversion Repositories SmartDukaan

Rev

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

Rev 29762 Rev 30054
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
	$(document).on('click', ".create-scheme", function() {
2
	$(document).on('click', ".create-scheme", function() {
3
		loadScheme("main-content");
3
		loadScheme("main-content");
4
	});
4
	});
5
 
5
 
-
 
6
	
6
	$(document).on('click', "#schemes-paginated .next",
7
	$(document).on('click', "#schemes-paginated .next",
7
		function() {
8
		function() {
8
			var category = $('#partner-category').val();
9
			var category = $('#partner-category').val();
9
			var searchText = $("#scheme-item-search-text").val();
10
			var searchText = $("#scheme-item-search-text").val();
10
 
11
 
Line 135... Line 136...
135
			if (extendDatetime) {
136
			if (extendDatetime) {
136
				if (confirm("Are you sure you want to Extend expireDateTime for Scheme!") == true) {
137
				if (confirm("Are you sure you want to Extend expireDateTime for Scheme!") == true) {
137
					extendSchemeById(schemeId)
138
					extendSchemeById(schemeId)
138
				}
139
				}
139
			} else {
140
			} else {
140
				alert("feild can't be blank");
141
				alert("field can't be blank");
141
			}	
142
			}	
142
		});
143
		});
143
	
144
	
144
	
145
	
145
	$(document).on('click', ".monthy-investment",
146
	$(document).on('click', ".monthy-investment",
Line 147... Line 148...
147
		console.log("hello evaluateActualInvestmentPayout");
148
		console.log("hello evaluateActualInvestmentPayout");
148
		window.location.href = context + "/evaluateActualInvestmentPayout";		
149
		window.location.href = context + "/evaluateActualInvestmentPayout";		
149
		
150
		
150
			});
151
			});
151
	
152
	
152
	$(document).on('click', ".process-investment", function() {
153
$(document).on('click', ".process-investment", function() {
153
		if (confirm("Are you sure you want to Process Investment")) {
154
		if (confirm("Are you sure you want to Process Investment")) {
154
			processInvestment();
155
			processInvestment();
155
		}
156
		}
156
	});
157
	});
157
 
158
 
-
 
159
	
158
	$(document).on('click', ".processInvestmentDryRun",
160
	$(document).on('click', ".processInvestmentDryRun",
159
			function() {
161
			function() {
160
		console.log("processInvestmentDryRun");
162
		console.log("processInvestmentDryRun");
161
		window.location.href = context + "/processInvestmentDryRun";		
163
		window.location.href = context + "/processInvestmentDryRun";		
162
		
164
		
163
			});
165
			});
164
	
166
	
-
 
167
	$(document).on('click', ".brand-wise-income",
-
 
168
			function() {
-
 
169
	var	brand = $(this).data('brand');
-
 
170
	
-
 
171
	var	status = $(this).data('status');
-
 
172
	var month = 	$(this).data('month');
-
 
173
	
-
 
174
		brandWiseIncome(brand,month,status);
-
 
175
		
-
 
176
			});
-
 
177
	
-
 
178
	$(document).on('click', ".imei_wise_income",
-
 
179
			function() {
-
 
180
		
-
 
181
		
-
 
182
	var	catalogItemId = $(this).data('catalogitemid');
-
 
183
	var month = 	$(this).data('month');
-
 
184
	
-
 
185
  console.log(catalogItemId);
-
 
186
  imeiWiseIncome(catalogItemId,month);
-
 
187
		
-
 
188
			});
-
 
189
	
-
 
190
	 $(document).on('change', "#month-wise-income", function() {
-
 
191
	       	var month = 	$(this).val();
-
 
192
	       	
-
 
193
	        monthWiseIncome(month,"main-content");
-
 
194
	              	});
165
	
195
	
166
	
196
	
167
	
197
	
168
 
198
 
169
	$(document).on('click', ".schemes", function() {
199
	$(document).on('click', ".schemes", function() {
Line 447... Line 477...
447
		response) {
477
		response) {
448
		$('#' + domId).html(response);
478
		$('#' + domId).html(response);
449
	});
479
	});
450
}
480
}
451
 
481
 
-
 
482
function brandWiseIncome(brand,month,status) {
-
 
483
	console.log(brand);
-
 
484
	console.log(month);
-
 
485
	
-
 
486
	doGetAjaxRequestHandler(context + "/brandWiseIncome?brand=" + brand + "&month=" + month + "&status=" + status, function(
-
 
487
		response) {
-
 
488
		$('.imei-wise-income-container').html('');
-
 
489
		 $('.brand-wise-income-container').html(response);
-
 
490
	});
-
 
491
}
-
 
492
 
-
 
493
function monthWiseIncome(month,domId) {
-
 
494
	console.log(month);
-
 
495
	doGetAjaxRequestHandler(context + "/monthWisePartnerIncome/" + month ,function (response) {
-
 
496
			console.log(response);
-
 
497
			$('#' + domId).html(response);
-
 
498
		})
-
 
499
}
-
 
500
function imeiWiseIncome(catalogItemId,month) {
-
 
501
	console.log(catalogItemId);
-
 
502
	console.log(month);
-
 
503
	
-
 
504
	doGetAjaxRequestHandler(context + "/getLastMonthImeiWiseIncome?catalogItemId=" + catalogItemId + "&month=" + month, function(
-
 
505
		response) {
-
 
506
		 $('.imei-wise-income-container').html(response);
-
 
507
	});
-
 
508
}
-
 
509
 
452
function updateSingleScheme(shcemeIds, itemIds) {
510
function updateSingleScheme(shcemeIds, itemIds) {
453
	doPostAjaxRequestWithJsonHandler(context + '/addItemToScheme', JSON
511
	doPostAjaxRequestWithJsonHandler(context + '/addItemToScheme', JSON
454
		.stringify({
512
		.stringify({
455
			"itemIds": itemIds.split(",").map(Number),
513
			"itemIds": itemIds.split(",").map(Number),
456
			"schemeIds": schemeIds.split(",").map(Number)
514
			"schemeIds": schemeIds.split(",").map(Number)