app.config(function($routeProvider) {
    $routeProvider
        .when('/', {
            templateUrl: 'partials/main.html',
            controller: 'mainCtrl'
        })
        .when('/login', {
            templateUrl: "partials/login.html",
            controller: "loginCtrl",	 
        	controllerAs: 'ctrl'
        })
        .when('/allineamentoSEDA',{
        	templateUrl: 'partials/allineamentoSEDA.html',
    		controller: "allineamentoSEDACtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']

        })
        .when('/incassiSDD',{
        	templateUrl: 'partials/incassiSDD.html',
    		controller: "incassiSDDCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        })
        .when('/incassiSDDEsteri',{
        	templateUrl: 'partials/incassiSDD.html',
    		controller: "incassiSDDEsteriCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        })
        .when('/pagamentiSCT',{
        	templateUrl: 'partials/pagamentiSCT.html',
    		controller: "pagamentiSCTCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        })        
        .when('/pagamentiDOM',{
        	templateUrl: 'partials/pagamentiSCT.html',
    		controller: "pagamentiDOMCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        })        
        .when('/pagamentiSCTInps',{
        	templateUrl: 'partials/pagamentiSCT.html',
    		controller: "pagamentiSCTInpsCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        })     
    	.when('/pagamentiSCT_ESTERI',{
        	templateUrl: 'partials/pagamentiSCT.html',
    		controller: "pagamentiSCTEsteriCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        }) .when('/AssegniIntesa',{
        	templateUrl: 'partials/pagamentiSCT.html',
    		controller: "assegniIntesaCtrl",
    		controllerAs: 'ctrl',
    		reloadOnSearch: false,
    		allowed:['TR','UO','UR','VI','DF']
        }).when('/logSicuraScheduler',{
        	templateUrl: 'partials/logSicuraScheduler.html',
    		controller: "logSicuraSchedulerCtrl",
    		controllerAs: 'ctrl',
    		allowed:['TR','UO','UR','VI','GI']
        })
         .when('/estrattore',{
        	templateUrl: 'partials/estrattore.html',
    		controller: "estrattoreCtrl",
    		controllerAs: 'ctrl',
    		allowed:['TR','VI']
        })
        .when('/ricercaDisposizioni',{
        	templateUrl: 'partials/ricercaDisposizioni.html',
    		controller: "ricercaDisposizioniCtrl",
    		controllerAs: 'ctrl',
    		allowed:['TR','UO','UR','VI']
        })
        .when('/SEDARemuneration',{
        	templateUrl: 'partials/sedaRemuneration.html',
    		controller: "sedaRemunerationCtrl",
    		controllerAs: 'ctrl',
    		allowed:['TR','UO','UR','VI']
        })
        .when('/distinteBanca',{
        	templateUrl: 'partials/distinteBanca.html',
    		controller: "distinteBancaCtrl",
    		controllerAs: 'ctrl',
    		allowed:  ['TR','UO','UR','DF','VI']
        })
           .when('/acquisizioneFlussi',{
        	templateUrl: 'partials/acquisizioneFlussi.html',
    		controller: "acquisizioneFlussiCtrl",
    		controllerAs: 'ctrl',
    		allowed:['TR','UO','UR','VI']
        })
           .when('/funzioni',{
        	templateUrl: 'partials/tabellaFunzioni.html',
    		controller: "tabellaFunzioniCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['TR','VI']
        })
           .when('/tipologie',{
        	templateUrl: 'partials/tipologie.html',
    		controller: "tipologieCtrl",
    		controllerAs: 'ctrl'
        })
           .when('/firme',{
        	templateUrl: 'partials/tabellaFirmeDistinte.html',
    		controller: "tabellaFirmeDistinteCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['TR','VI']
        })
           .when('/SDDnonSEDA',{
        	templateUrl: 'partials/tabellaFlussiNonSeda.html',
    		controller: "tabellaFlussiNonSedaCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['TR','VI']
        })
        .when('/ricercaBanche',{
        	templateUrl: 'templates/ricercaFiliali.html',
    		controller: "ricercaFilialiEstesaCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['TR','VI']
        })
        .when('/anagrafiche',{
        	templateUrl: 'partials/ordinanti.html',
    		controller: "ordinantiCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['TR','VI']
        })
        .when('/utenti',{
        	templateUrl: 'partials/utenti.html',
    		controller: "utentiCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['AS']
        })
        .when('/parametri',{
        	templateUrl: 'partials/parametri.html',
    		controller: "parametriCtrl",
    		controllerAs: 'ctrl',
    		allowed: ['GI']
        })
        .when('/reportPagamenti',{
        	templateUrl: 'partials/reportPagamenti.html',
    		controller: "reportPagamentiCtrl",
    		controllerAs: 'ctrl',
    		allowed:['TR','UO','UR','VI']
        })
        
        ;
;
});

