'use strict';

// Setting up route
angular.module('infrastructureRequests').config(['$stateProvider',
  function ($stateProvider) {
    // InfrastructureRequests state routing
    $stateProvider
      .state('infrastructureRequests', {
        abstract: true,
        url: '/infrastructureRequests',
        template: '<ui-view/>'
      })
      .state('infrastructureRequests.list', {
        url: '/list',
        templateUrl: 'modules/infrastructureRequests/client/views/list-infrastructureRequest.client.view.html'
      })
      .state('infrastructureRequests.createInfrastructureRequest', {
        url: '/createInfrastructureRequest',
        templateUrl: 'modules/infrastructureRequests/client/views/create-InfrastructureRequest.client.view.html',
        data: {
          roles: ['user', 'admin']
        }
      })
      .state('infrastructureRequests.view', {
        url: '/:infrastructureRequestId',
        templateUrl: 'modules/infrastructureRequests/client/views/view-infrastructureRequest.client.view.html'
      })
      .state('infrastructureRequests.edit', {
        url: '/:infrastructureRequestId/edit',
        templateUrl: 'modules/infrastructureRequests/client/views/edit-infrastructureRequest.client.view.html',
        data: {
          roles: ['user', 'admin']
        }
      });
  }
]);
