angular.module('admin', ['ngRoute', 'menuDirective', 'angularUtils.directives.dirPagination', 'phoneMask'])
.config(function($routeProvider, $httpProvider){

  $httpProvider.interceptors.push('tokenInterceptor');

  // login
  $routeProvider.when('/', {
      templateUrl: 'partials/login.html',
      controller: 'LoginController'
  });

  //lista de sellers
  $routeProvider.when('/orders', {
    templateUrl: 'partials/orders/ordersList.html',
    controller: 'OrderListController'
  });

  //detalhes do pedido
  $routeProvider.when('/orders/:orderId', {
    templateUrl: 'partials/orders/ordersId.html',
    controller: 'OrderIdController'
  });

  // faturados
  $routeProvider.when('/invoiced', {
    templateUrl: 'partials/orders/ordersList.html',
    controller: 'InvoicedController'
  });

  // cancelados
  $routeProvider.when('/canceled', {
    templateUrl: 'partials/orders/ordersList.html',
    controller: 'CanceledController'
  });

  // para faturar
  $routeProvider.when('/ready', {
    templateUrl: 'partials/orders/ordersList.html',
    controller: 'ReadyController'
  });

  //lista de sellers
  $routeProvider.when('/sellers', {
    templateUrl: 'partials/sellers/sellerList.html',
    controller: 'SellerListController'
  });

  //detalhes do seller
  $routeProvider.when('/details-seller/:id', {
    templateUrl: 'partials/sellers/sellerDetail.html',
    controller: 'DetailsSellerControler'
  });

  //novo seller
  $routeProvider.when('/seller/new', {
    templateUrl: 'partials/sellers/newSeller.html',
    controller: 'NewSellerControler'
  });

  //alterar seller
  $routeProvider.when('/alteration-seller/:id', {
    templateUrl: 'partials/sellers/altSeller.html',
    controller: 'NewSellerControler'
  });

});
