'use strict';

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