(function () {
    global.dashModule
        .controller('ordersDetailsCtrl', ['$scope', 'utilsService', 'ordersUtilsService', ordersDetailsCtrl])
        .directive('ordersDetails', [ordersDetailsDirective]);

    function ordersDetailsDirective() {
        return {
            restrict: 'E',
            templateUrl: 'orders/html/ordersDetailsTemplate'
        };
    }

    function ordersDetailsCtrl($scope, utilsService, ordersUtilsService) {
        $scope.getStatusIcon = utilsService.getStatusIcon;
        $scope.hasAgreement = ordersUtilsService.hasAgreement;
        $scope.calculatePrice = ordersUtilsService.calculatePrice;
    }
})();
