'use strict';
app.controller('transactionDetailsController', ['$scope', '$http', '$modalInstance', '$translate', 'blockUI', 'lib', 'modelId', function ($scope, $http, $modalInstance, $translate, blockUI, lib, modelId) {

	$scope.model = null;

	var init = function () {
		fetch();
	};

	var fetch = function () {
		var url = '/Api/Transactions/' + modelId;
		blockUI.start();
		$http.get(url).then(function (response) {
			$scope.model = response.data;
			blockUI.stop();
		}, lib.handleRestError);
	};

	$scope.close = function () {
		$modalInstance.close();
	};

	init();

}]);
