Initial commit: apps.supersamsev.ru
This commit is contained in:
commit
54475e7d3d
17284 files changed
+98268
No files matched your search
@@ -0,0 +1 @@
|
||||
"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}supersamApp.controller("CalcDoorsStatisticsController",["$scope","$http","$timeout","config","$filter",function($scope,$http,$timeout,config,$filter){var calcDoorsStatistics;return calcDoorsStatistics=function(){var calcDoorsStatistics=/*#__PURE__*/function(){function calcDoorsStatistics(){_classCallCheck(this,calcDoorsStatistics),this.getStatisticsData=this.getStatisticsData.bind(this),$scope.utilities.showContentOnLoad(),config.sortFields={statistics_clients:{field:"name",direction:"asc"}}}return _createClass(calcDoorsStatistics,[{key:"getStatisticsData",value:function getStatisticsData(){var dataToSend,_this=this;if(!this.isLoading)return this.isLoading=!0,dataToSend={year:config.statistics.year,select:config.statistics.select},$http({method:"POST",url:config.urls.calcDoorsGetStatisticsData,data:dataToSend,timeout:3e4}).then(function(response){var data;if(_this.isLoading=!1,response.data){if(data=response.data,data.status&&"success"===data.status)return config.statistics=data.statistics;if(config.statistics.data=!1,data.warning&&toastr.warning(data.warning),data.error)return toastr.warning(data.error)}})["catch"](function(){return config.statistics.data=!1,_this.isLoading=!1,toastr.error(config.global_labels.defaultErrorMessage.value)})}}]),calcDoorsStatistics}();return calcDoorsStatistics.prototype.isLoading=!1,calcDoorsStatistics.prototype.showEmptyRows=!0,calcDoorsStatistics}.call(this),$scope.config=config,$scope.utilities=new UtilitiesClass(config,$filter,$timeout),$scope.statistics=new calcDoorsStatistics}]);
|
||||
Reference in new issue
Block a user