<commit_before>angular.module('bitvagas.jobs.controllers',[])
.controller('JobListController', JobListController)
.controller('JobShowController', JobShowController);

JobListController.$inject = ['$scope','$state','JobService', 'UserService'];
JobShowController.$inject = ['$scope','$state','JobService'];

function JobListController($scope, $state, JobService, UserService){

    if(Object.getOwnPropertyNames(UserService.current).length === 0){
        JobService.findAll().then(function(data){
            $scope.jobs = data.data;
        });
    } else
        $scope.jobs = UserService.current.jobs;
}

function JobShowController($scope, $state, JobService){
    var id = $state.params.id;
    JobService.findById(id).then(function(data){
        $scope.job = data.data;
    });
}

<commit_msg>fixed, get jobs on dashboard by current user<commit_after>angular.module('bitvagas.jobs.controllers',[])
.controller('JobListController', JobListController)
.controller('JobShowController', JobShowController);

JobListController.$inject = ['$scope','$state','JobService', 'UserService'];
JobShowController.$inject = ['$scope','$state','JobService'];

function JobListController($scope, $state, JobService, UserService){

    if(!$state.current.authenticate){
        JobService.findAll().then(function(data){
            $scope.jobs = data.data;
        });
    } else
        $scope.jobs = UserService.current.jobs;

}

function JobShowController($scope, $state, JobService){
    var id = $state.params.id;
    JobService.findById(id).then(function(data){
        $scope.job = data.data;
    });

    $scope.apply = function(){
        $scope.applied = true;
    }
}


{'fraction_non_alphanumeric': 0.16417016177351706, 'fraction_numerical': 0.0005991611743559018, 'mean_word_length': 4.457516339869281, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5101097', 'n_tokens_mistral': 503, 'n_tokens_neox': 487, 'n_words': 76}