(function() {
	"use strict";

	window.app.controller("DistributionReportController",
	[
		"$scope", "reportSvc", "downloadSvc",
		function($scope, reportSvc, downloadSvc) {
			var vm = this;
			vm.loadData = reportSvc.loadDistributionReport;
			vm.query = reportSvc.distributionQuery;
			vm.distributionData = reportSvc.distributionData;
			vm.export = function(params) {
				reportSvc.exportDistributionReport(params)
					.success(downloadSvc.success);
			};
		}
	]);
})();