Subversion Repositories SmartDukaan

Rev

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

Rev 30599 Rev 34261
Line 109... Line 109...
109
 
109
 
110
		});
110
		});
111
 
111
 
112
});
112
});
113
 
113
 
-
 
114
 
-
 
115
// [id^="downloadAddWalletRequest"] - all id that start with downloadAddWalletRequest
-
 
116
$(document).on('click', '[id^="downloadAddWalletRequest"]', function() {
-
 
117
	const startDate = $('input[name="from"]').val();
-
 
118
	const endDate = $('input[name="to"]').val();
-
 
119
	const buttonId = $(this).attr('id');
-
 
120
 
-
 
121
	console.log("startDate - ", startDate);
-
 
122
	console.log("endDate - ", endDate);
-
 
123
	const reportTypes = {
-
 
124
		'downloadAddWalletRequestPendingReport': 'pending',
-
 
125
		'downloadAddWalletRequestApprovedReport': 'approved',
-
 
126
		'downloadAddWalletRequestRejectReport': 'rejected'
-
 
127
	};
-
 
128
 
-
 
129
	const reportType = reportTypes[buttonId];
-
 
130
	console.log("reportType - ", reportType);
-
 
131
	if (reportType) {
-
 
132
		window.location.href = `${context}/downloadAddWalletRequestReport?status=${reportType}&startDate=${startDate}&endDate=${endDate}`;
-
 
133
	}
-
 
134
});
-
 
135
 
114
function loadManualPayment(domId) {
136
function loadManualPayment(domId) {
115
	doGetAjaxRequestHandler(context + "/manualPayment", function (response) {
137
	doGetAjaxRequestHandler(context + "/manualPayment", function (response) {
116
		$('#' + domId).html(response);
138
		$('#' + domId).html(response);
117
	});
139
	});
118
}
140
}