Subversion Repositories SmartDukaan

Rev

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

Rev 30599 Rev 30651
Line 40... Line 40...
40
	$(document).on('click', 'input.create-offer', function() {
40
	$(document).on('click', 'input.create-offer', function() {
41
		console.log("Click called");
41
		console.log("Click called");
42
		createOfferNew();
42
		createOfferNew();
43
	});
43
	});
44
 
44
 
45
	$(document).on('click', 'a.download_offer', function() {
45
	$(document).on('click', 'a.process_offer', function () {
46
		let $offerTr = $(this).closest('tr');
46
		let $offerTr = $(this).closest('tr');
47
		let offerId = $offerTr.data('offerid');
47
		let offerId = $offerTr.data('offerid');
48
		let fileName = `offer-${$offerTr.find('td:first')}.csv`;
48
		if (confirm("Are your sure you want to process?")) {
49
		doAjaxGetDownload(`${context}\offerDownload?offerId=${offerId}`, fileName);
49
			doGetAjaxRequestHandler(`${context}/offer/process/${offerId}`, function () {
-
 
50
				alert("Offer Processed successfully");
-
 
51
			});
-
 
52
		}
50
	});
53
	});
51
 
54
 
52
	$(document).on('change', 'input[name=schemeType]', function() {
55
	$(document).on('change', 'input[name=schemeType]', function() {
53
		if ($('input[name=schemeType]:checked').val() == 'ACTIVATION') {
56
		if ($('input[name=schemeType]:checked').val() == 'ACTIVATION') {
54
			$("div.activation-brands").show();
57
			$("div.activation-brands").show();