citModule.controller('citAnalysisMenuController', ['$scope', '$rootScope', '$log', '$translate', '$timeout', '$q',
	'SweetAlert', 'vatSessionService', 'citSessionService',
    function ($scope, $rootScope, $log, $translate, $timeout, $q, SweetAlert, vatSessionService, citSessionService) {
        'use strict';
        $log.debug('citAnalysisMenuController.ctor()...');

        $scope.menus = [
            { name: '.analyzeReport', text: $translate.instant('ModelAnalysis'), icon: 'glyphicon glyphicon-flag', show: true },
            { name: '.organizeDashboard', text: $translate.instant('Dashboard'), icon: 'glyphicon glyphicon-stats', show: true }
        ];
        citSessionService.querySummayDashboardModel = {
            organizationID: vatSessionService.project.organizationID,
            year: (new Date()).getFullYear(),
            month: 13
        };

        citSessionService.dashboardSingelOrganizationId = vatSessionService.project.organizationID;

        var analyzeMenuEvent = function (obj) {
            if (obj.menu.text === $translate.instant('Dashboard')) {
                citSessionService.urlFromAnalyze = true;
                return true;
            }
        };

        (function initialize() {
            $log.debug('citAnalysisMenuController.initialize()...');
            $scope.analyzeMenuEvent = analyzeMenuEvent;
        })();
    }
]);