Subversion Repositories SmartDukaan

Rev

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

Rev 32331 Rev 34575
Line 199... Line 199...
199
        			processSellout(fofoOrderInvoiceNumber);
199
        			processSellout(fofoOrderInvoiceNumber);
200
        		}
200
        		}
201
 
201
 
202
    });
202
    });
203
 
203
 
204
 
-
 
205
 
-
 
206
	$(document).on('click', ".delete-schemes", function() {
204
	$(document).on('click', ".delete-schemes", function() {
207
		if (confirm("Delete model from Scheme?") == true) {
205
		if (confirm("Delete model from Scheme?") == true) {
208
			schemeId = $(this).data('schemeid');
206
			schemeId = $(this).data('schemeid');
209
			catalogId = $(this).data('catalogid');
207
			catalogId = $(this).data('catalogid');
210
			deleteScheme(schemeId, catalogId);
208
			deleteScheme(schemeId, catalogId);
Line 244... Line 242...
244
			console.log("reeffff")
242
			console.log("reeffff")
245
			alert("Data No Found")
243
			alert("Data No Found")
246
		}
244
		}
247
	});
245
	});
248
 
246
 
249
 
-
 
250
	$(document).on('click', "#scheme-imei-search-button", function() {
247
	$(document).on('click', "#scheme-imei-search-button", function() {
251
		var searchText = $("#scheme-imei-search-text").val();
248
		var searchText = $("#scheme-imei-search-text").val();
252
		var date = $(".schemes-date").val();
249
		var date = $(".schemes-date").val();
253
		if (typeof (searchText) == "undefined" || !searchText) {
250
		if (typeof (searchText) == "undefined" || !searchText) {
254
			searchText = "";
251
			searchText = "";
Line 262... Line 259...
262
			console.log("reeffff")
259
			console.log("reeffff")
263
			alert("Data No Found")
260
			alert("Data No Found")
264
		}
261
		}
265
	});
262
	});
266
 
263
 
267
 
-
 
268
	$(document).on('click', "#scheme-imei-wise-search-button", function() {
264
	$(document).on('click', "#scheme-imei-wise-search-button", function() {
269
		var searchText = $("#scheme-imei-wise-search-text").val();
265
		var searchText = $("#scheme-imei-wise-search-text").val();
270
		var date = $(".schemes-date").val();
266
		var date = $(".schemes-date").val();
271
		if (typeof (searchText) === "undefined" || !searchText) {
267
		if (typeof (searchText) === "undefined" || !searchText) {
272
			searchText = "";
268
			searchText = "";
Line 288... Line 284...
288
			console.log("reeffff");
284
			console.log("reeffff");
289
			alert("Data No Found");
285
			alert("Data No Found");
290
		}
286
		}
291
	});
287
	});
292
	$(document).on('click', ".categoryWiseSchemeHistory",
288
	$(document).on('click', ".categoryWiseSchemeHistory",
293
		function() {
289
	function() {
294
			var category = $('#partner-category').val();
290
		var category = $('#partner-category').val();
295
			console.log(category);
291
		console.log(category);
-
 
292
 
-
 
293
		doGetAjaxRequestHandler(context + "/getSchemes?partnerType="
-
 
294
			+ category, function(response) {
-
 
295
				$('#' + "main-content").html(response);
-
 
296
				$('#partner-category').val(category);
-
 
297
				window.dispatchEvent(new Event('resize'));
-
 
298
			});
296
 
299
 
297
			doGetAjaxRequestHandler(context + "/getSchemes?partnerType="
-
 
298
				+ category, function(response) {
-
 
299
					$('#' + "main-content").html(response);
-
 
300
					$('#partner-category').val(category);
-
 
301
					window.dispatchEvent(new Event('resize'));
-
 
302
				});
-
 
303
 
-
 
304
		});
300
	});
305
 
301
 
306
	$(document).on("keyup", "#scheme-item-search-text", function(e) {
302
	$(document).on("keyup", "#scheme-item-search-text", function(e) {
307
		var keyCode = e.keyCode || e.which;
303
		var keyCode = e.keyCode || e.which;
308
		if (keyCode == 13) {
304
		if (keyCode == 13) {
309
			$("#scheme-item-search-button").click();
305
			$("#scheme-item-search-button").click();
Line 357... Line 353...
357
		});
353
		});
358
}
354
}
359
 
355
 
360
function activeScheme(schemeId, offset, domId) {
356
function activeScheme(schemeId, offset, domId) {
361
	doPutAjaxRequestHandler(context + "/activeSchemeById?schemeId=" + schemeId
357
	doPutAjaxRequestHandler(context + "/activeSchemeById?schemeId=" + schemeId
362
		+ "&offset=" + offset, function(response) {
358
	+ "&offset=" + offset, function(response) {
363
			$('#' + domId).html(response);
359
		$('#' + domId).html(response);
364
			$('#scheme-details-container').html('');
360
		$('#scheme-details-container').html('');
365
		});
361
	});
366
 
-
 
367
}
362
}
368
 
363
 
369
function expireScheme(schemeId, expireDate, domId) {
364
function expireScheme(schemeId, expireDate, domId) {
370
	doPutAjaxRequestHandler(context + "/expireSchemeById?schemeId=" + schemeId
365
	doPutAjaxRequestHandler(context + "/expireSchemeById?schemeId=" + schemeId
371
		+ "&expireTimestamp=" + expireDate, function(
366
		+ "&expireTimestamp=" + expireDate, function(
Line 628... Line 623...
628
function loadSchemeImeiSearchInfo(selectedImei, date) {
623
function loadSchemeImeiSearchInfo(selectedImei, date) {
629
 
624
 
630
	loadSearchImeiScheme("main-content", selectedImei, date);
625
	loadSearchImeiScheme("main-content", selectedImei, date);
631
}
626
}
632
 
627
 
-
 
628
$(document).on('click', ".mark-active", function() {
-
 
629
	let activeScheme=$("#activeSchemes").val();
-
 
630
	if (confirm("Are you sure you want to Active schemes?")) {
-
 
631
		console.log("activeScheme",activeScheme);
-
 
632
		if (activeScheme.trim().length === 0) {
-
 
633
			alert("fields shouldn't be blank");
-
 
634
			return;
-
 
635
		}
-
 
636
		doPutAjaxRequestHandler(context + "/activeSchemeByIds?schemeId=" + activeScheme, function(response) {
-
 
637
			if (response){
-
 
638
				alert("schemes activated")
-
 
639
			}
-
 
640
		});
-
 
641
	}
-
 
642
 
-
 
643
});
633
644