/* ** Views/Partial/LCA/PowerUsage.cshtml is using this controller */ angular.module('CarbonFootprint') .controller('LCAPowerUsageCtrl', ['$q', '$scope', '$http', '$routeParams', '$cookies', '$timeout', 'ParameterCacheService', 'LCADetailCacheService', 'DATE_CONSTANTS', 'UploadFile', 'MultiLanguageService', 'ExportCsvService', function ($q, $scope, $http, $routeParams, $cookies, $timeout, ParameterCacheService, LCADetailCacheService, DATE_CONSTANTS, UploadFile, MultiLanguageService, ExportCsvService) { // Multi-language resource object var Resource; // This property controlls modal form , will be passed to table-edit-modal directive $scope.modalFormOption = {}; $scope.Editable = false; $scope.dataQualityOption = {}; $scope.dataQualityOption.data = {}; $scope.yearSelected = {}; //Record the amount of months in one of the two types of power, in order to correct the data when import $scope.monthAmount = 0; // set $scope.baseUrl var baseUrl = $scope.baseUrl; if (typeof (baseUrl) === 'undefined' || baseUrl == null) { var arr = window.location.href.split("/"); if (arr[3].indexOf('app') == 0) baseUrl = ''; else baseUrl = '/' + arr[3]; $scope.baseUrl = baseUrl; } // Sync 'ParameterID' based on 'Source', because ngModel of