/**
 * @author monitour
 * created on 27.07.2017
 */
(function() {
    'use strict';

    angular.module('Monitour.pages.user', [])
        .config(routeConfig);

    /** @ngInject */
    function routeConfig($stateProvider) {
        $stateProvider
            .state('main.user', {
                url: '/user',
                templateUrl: 'app/pages/user/user.html',
                title: 'Users',
                abstract: true,
                sidebarMeta: {
                    icon: 'ion-gear-a',
                    order: 100,
                },
                authenticate: true
            })
            .state('main.user.list', {
                url: '/list',
                templateUrl: 'app/pages/user/list/list.html',
                title: 'List users',
                controller: 'userListCtrl',
                controllerAs: 'vm',
                sidebarMeta: {
                    icon: 'ion-stats-bars',
                    order: 150,
                },
                authenticate: true
            })
            .state('main.user.view', {
                url: '/view/:id',
                title: 'View',
                controller: 'userViewCtrl',
                controllerAs: 'vm',
                templateUrl: 'app/pages/user/view/view.html',
                authenticate: true
            })
		   .state('main.user.new', {
                url: '/new',
                templateUrl: 'app/pages/user/new/new.html',
                title: 'Add user',
                controller: 'userNewCtrl',
                controllerAs: 'vm',
                sidebarMeta: {
                    icon: 'ion-stats-bars',
                    order: 150,
                },
                authenticate: true
            })
            .state('main.user.edit', {
                url: '/edit/:id',
                title: 'Edit',
                controller: 'userEditCtrl',
                controllerAs: 'vm',
                templateUrl: 'app/pages/user/edit/edit.html',
                authenticate: true
            });
         


    }

})();