<commit_before>'use strict';

angular.module('impactApp')
  .config(function ($stateProvider) {
    $stateProvider
      .state('dashboard.requests', {
        url: '/demandes',
        templateUrl: 'app/dashboard/requests/requests.html',
        controller: 'RequestsCtrl',
        resolve: {
          users: function(Auth) {
            return Auth.getAllUsers();
          },
          currentUser: function(Auth) {
            return Auth.getCurrentUser();
          },
          pendingRequests: function($http) {
            return $http({method: 'HEAD', url: '/api/requests', params: {evaluator: 'null'}}).then(function(result) {
              return result.headers('count');
            });
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.list', {
        url: '/liste',
        abstract: true,
        template: '<ui-view></ui-view>',
        authenticate: true
      })
      .state('dashboard.requests.list.non_attribue', {
        url: '/non_attribue',
        templateUrl: 'app/dashboard/requests/non_attribue/non_attribue.html',
        controller: 'RequestNonAttribueCtrl',
        resolve: {
          requests: function(RequestResource) {
            return RequestResource.query({evaluator: 'null'}).$promise;
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.list.user', {
        url: '/:userId',
        templateUrl: 'app/dashboard/requests/list/list.html',
        controller: 'RequestListCtrl',
        resolve: {
          requests: function(RequestResource, user) {
            return RequestResource.query({evaluator: user._id}).$promise;
          },
          user: function($http, $stateParams) {
            return $http.get('/api/users/' + $stateParams.userId).then(function(user) {
              return user.data;
            });
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.detail', {
        url: '/:shortId',
        templateUrl: 'app/dashboard/requests/detail/detail.html',
        controller: function($scope, $window, request, user) {
          $scope.request = request;
          $scope.user = user;

          $scope.back = function() {
            $window.history.back();
          };
        },
        resolve: {
          request: function($http, $stateParams) {
            return $http.get('/api/requests/' + $stateParams.shortId).then(function(request) {
              return request.data;
            });
          },
          user: function($http, request) {
            return $http.get('api/users/' + request.user).then(function(result) {
              return result.data;
            });
          },
          vieQuotidienne: function($http) {
            return $http.get('api/questions/vie_quotidienne').then(function(result) {
              return result.data;
            });
          }
        },
        abstract: true,
        authenticate: true
      })
      .state('dashboard.requests.detail.pre_evaluation', {
        url: '/pre_evaluation',
        templateUrl: 'app/dashboard/requests/detail/pre_evaluation/pre_evaluation.html',
        controller: 'RequestPreEvaluationCtrl',
        authenticate: true
      })
      .state('dashboard.requests.detail.evaluation', {
        url: '/evaluation',
        templateUrl: 'app/dashboard/requests/detail/evaluation/evaluation.html',
        controller: 'RequestEvaluationCtrl',
        resolve: {
          sections: function(GevaService, request) {
            return GevaService.getSections(request);
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.detail.evaluation.section', {
        url: '/:sectionId',
        templateUrl: 'app/dashboard/requests/detail/section/section.html',
        controller: 'RequestSectionCtrl',
        authenticate: true
      });
  });<commit_msg>Fix pre-eval url<commit_after>'use strict';

angular.module('impactApp')
  .config(function ($stateProvider) {
    $stateProvider
      .state('dashboard.requests', {
        url: '/demandes',
        templateUrl: 'app/dashboard/requests/requests.html',
        controller: 'RequestsCtrl',
        resolve: {
          users: function(Auth) {
            return Auth.getAllUsers();
          },
          currentUser: function(Auth) {
            return Auth.getCurrentUser();
          },
          pendingRequests: function($http) {
            return $http({method: 'HEAD', url: '/api/requests', params: {evaluator: 'null'}}).then(function(result) {
              return result.headers('count');
            });
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.list', {
        url: '/liste',
        abstract: true,
        template: '<ui-view></ui-view>',
        authenticate: true
      })
      .state('dashboard.requests.list.non_attribue', {
        url: '/non_attribue',
        templateUrl: 'app/dashboard/requests/non_attribue/non_attribue.html',
        controller: 'RequestNonAttribueCtrl',
        resolve: {
          requests: function(RequestResource) {
            return RequestResource.query({evaluator: 'null'}).$promise;
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.list.user', {
        url: '/:userId',
        templateUrl: 'app/dashboard/requests/list/list.html',
        controller: 'RequestListCtrl',
        resolve: {
          requests: function(RequestResource, user) {
            return RequestResource.query({evaluator: user._id}).$promise;
          },
          user: function($http, $stateParams) {
            return $http.get('/api/users/' + $stateParams.userId).then(function(user) {
              return user.data;
            });
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.detail', {
        url: '/:shortId',
        templateUrl: 'app/dashboard/requests/detail/detail.html',
        controller: function($scope, $window, request, user) {
          $scope.request = request;
          $scope.user = user;

          $scope.back = function() {
            $window.history.back();
          };
        },
        resolve: {
          request: function($http, $stateParams) {
            return $http.get('/api/requests/' + $stateParams.shortId).then(function(request) {
              return request.data;
            });
          },
          user: function($http, request) {
            return $http.get('api/users/' + request.user).then(function(result) {
              return result.data;
            });
          },
          vieQuotidienne: function($http) {
            return $http.get('api/questions/vie_quotidienne').then(function(result) {
              return result.data;
            });
          }
        },
        abstract: true,
        authenticate: true
      })
      .state('dashboard.requests.detail.pre_evaluation', {
        url: '/pre_evaluation',
        templateUrl: 'app/dashboard/requests/detail/pre_evaluation/pre_evaluation.html',
        controller: 'RequestPreEvaluationCtrl',
        authenticate: true
      })
      .state('dashboard.requests.detail.evaluation', {
        url: '/evaluation',
        templateUrl: 'app/dashboard/requests/detail/evaluation/evaluation.html',
        controller: 'RequestEvaluationCtrl',
        resolve: {
          sections: function(GevaService, request) {
            return GevaService.getSections(request);
          }
        },
        authenticate: true
      })
      .state('dashboard.requests.detail.evaluation.section', {
        url: '/:sectionId',
        templateUrl: 'app/dashboard/requests/detail/evaluation/section/section.html',
        controller: 'RequestSectionCtrl',
        authenticate: true
      });
  });
{'fraction_non_alphanumeric': 0.1374774310033531, 'fraction_numerical': 0.0, 'mean_word_length': 1.9565383149065956, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1547887', 'n_tokens_mistral': 2088, 'n_tokens_neox': 2105, 'n_words': 324}