'use strict';

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