Fixed reports
This commit is contained in:
miroman-afk
2023-05-02 15:21:54 +03:00
parent 70120653f7
commit fb46c8e739
78 changed files with 21233 additions and 1892 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
/*!
* Print button for Buttons and DataTables.
* 2016 SpryMedia Ltd - datatables.net/license
*/
!function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(t){return n(t,window,document)}):"object"==typeof exports?module.exports=function(t,e){return t=t||window,(e=e||("undefined"!=typeof window?require("jquery"):require("jquery")(t))).fn.dataTable||require("datatables.net")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e),n(e,t,t.document)}:n(jQuery,window,document)}(function(m,b,t,p){"use strict";function h(t){return n.href=t,-1===(t=n.host).indexOf("/")&&0!==n.pathname.indexOf("/")&&(t+="/"),n.protocol+"//"+t+n.pathname+n.search}var e=m.fn.dataTable,n=t.createElement("a");return e.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(t,e,n,o){function r(t,e){for(var n="<tr>",o=0,r=t.length;o<r;o++){var i=null===t[o]||t[o]===p?"":t[o];n+="<"+e+" "+(s[o]?'class="'+s[o]+'"':"")+">"+i+"</"+e+">"}return n+"</tr>"}var i=e.buttons.exportData(m.extend({decodeEntities:!1},o.exportOptions)),a=e.buttons.exportInfo(o),s=e.columns(o.exportOptions.columns).flatten().map(function(t){return e.settings()[0].aoColumns[e.column(t).index()].sClass}).toArray(),u='<table class="'+e.table().node().className+'">';o.header&&(u+="<thead>"+r(i.header,"th")+"</thead>"),u+="<tbody>";for(var d=0,c=i.body.length;d<c;d++)u+=r(i.body[d],"td");u+="</tbody>",o.footer&&i.footer&&(u+="<tfoot>"+r(i.footer,"th")+"</tfoot>"),u+="</table>";var l=b.open("","");if(l){l.document.close();var f="<title>"+a.title+"</title>";m("style, link").each(function(){f+=function(t){t=m(t).clone()[0];return"link"===t.nodeName.toLowerCase()&&(t.href=h(t.href)),t.outerHTML}(this)});try{l.document.head.innerHTML=f}catch(t){m(l.document.head).html(f)}l.document.body.innerHTML="<h1>"+a.title+"</h1><div>"+(a.messageTop||"")+"</div>"+u+"<div>"+(a.messageBottom||"")+"</div>",m(l.document.body).addClass("dt-print-view"),m("img",l.document.body).each(function(t,e){e.setAttribute("src",h(e.getAttribute("src")))}),o.customize&&o.customize(l,o,e);a=function(){o.autoPrint&&(l.print(),l.close())};navigator.userAgent.match(/Trident\/\d.\d/)?a():l.setTimeout(a,1e3)}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null},e});

View File

@@ -0,0 +1,4 @@
/*! DataTables Bootstrap 3 integration
* ©2011-2015 SpryMedia Ltd - datatables.net/license
*/
!function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,a){return e=e||window,(a=a||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net")(e,a),t(a,0,e.document)}:t(jQuery,window,document)}(function(x,e,n,r){"use strict";var i=x.fn.dataTable;return x.extend(!0,i.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"}),x.extend(i.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"}),i.ext.renderer.pageButton.bootstrap=function(d,e,o,a,l,u){function c(e,a){for(var t,n,r=function(e){e.preventDefault(),x(e.currentTarget).hasClass("disabled")||b.page()==e.data.action||b.page(e.data.action).draw("page")},i=0,s=a.length;i<s;i++)if(t=a[i],Array.isArray(t))c(e,t);else{switch(f=p="",t){case"ellipsis":p="&#x2026;",f="disabled";break;case"first":p=m.sFirst,f=t+(0<l?"":" disabled");break;case"previous":p=m.sPrevious,f=t+(0<l?"":" disabled");break;case"next":p=m.sNext,f=t+(l<u-1?"":" disabled");break;case"last":p=m.sLast,f=t+(l<u-1?"":" disabled");break;default:p=t+1,f=l===t?"active":""}p&&(n=-1!==f.indexOf("disabled"),n=x("<li>",{class:g.sPageButton+" "+f,id:0===o&&"string"==typeof t?d.sTableId+"_"+t:null}).append(x("<a>",{href:n?null:"#","aria-controls":d.sTableId,"aria-disabled":n?"true":null,"aria-label":w[t],"aria-role":"link","aria-current":"active"===f?"page":null,"data-dt-idx":t,tabindex:d.iTabIndex}).html(p)).appendTo(e),d.oApi._fnBindAction(n,{action:t},r))}}var p,f,t,b=new i.Api(d),g=d.oClasses,m=d.oLanguage.oPaginate,w=d.oLanguage.oAria.paginate||{};try{t=x(e).find(n.activeElement).data("dt-idx")}catch(e){}c(x(e).empty().html('<ul class="pagination"/>').children("ul"),a),t!==r&&x(e).find("[data-dt-idx="+t+"]").trigger("focus")},i});

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,85 @@
(function ($, oldFunction) {
$.param = function (a, traditional) {
var s = oldFunction.apply(oldFunction, [a, traditional]);
return s.replace(/\+/g, '%20');
};
})(jQuery, jQuery.param);
(function () {
'use strict';
angular
.module('smart.request', [])
.service('smartRequest', smartRequest);
smartRequest.$inject = ['$http', 'Notification', '$rootScope'];
function smartRequest($http, Notification, $rootScope) {
this.post = function (method, data, callback, error_callback, server_error_callback) {
var xsrf = $.param(data, true);
$http({
method: 'POST',
url: $rootScope.apiUrl + method,
timeout: 10 * 60 * 1000,
data: xsrf,
headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Token': $rootScope.globals.currentUser ? $rootScope.globals.currentUser.token : '' }
}).then(function successCallback(response) {
if (response.data.status !== 'success') {
if (response.data.more) {
Notification.error(response.data.more);
}
if (response.data.message) {
Notification.error(response.data.message);
}
if (typeof error_callback !== typeof undefined) {
error_callback(response.data);
}
}
else {
if (typeof callback !== typeof undefined) {
callback(response.data);
}
}
}, function errorCallback(response) {
if (typeof server_error_callback !== typeof undefined) {
server_error_callback(response);
}
else {
Notification.error('Сервер недоступен');
}
});
};
this.get = function (method, callback, error_callback, server_error_callback) {
$http({
method: 'GET',
url: $rootScope.apiUrl + method,
timeout: 10 * 60 * 1000,
headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Token': $rootScope.globals.currentUser ? $rootScope.globals.currentUser.token : '' }
}).then(function successCallback(response) {
if (response.data.status !== 'success') {
Notification.error(response.data.more);
if (typeof error_callback !== typeof undefined) {
error_callback(response.data);
}
}
else {
if (typeof callback !== typeof undefined) {
callback(response.data);
}
}
}, function errorCallback(response) {
if (typeof server_error_callback !== typeof undefined) {
server_error_callback(response);
}
else {
Notification.error('Сервер недоступен');
}
});
};
}
})();

View File

@@ -22,6 +22,10 @@
<link rel="stylesheet" href="../libs/angular/angular-ui-notification/dist/angular-ui-notification.min.css" />
<link rel="stylesheet" href="../assets/bootstrap/dist/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.3/css/dataTables.bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.3.5/css/buttons.dataTables.min.css" type="text/css" />
<!-- build:css ../assets/styles/app.min.css -->
<link rel="stylesheet" href="../assets/styles/app.css" type="text/css" />
@@ -29,21 +33,7 @@
<link rel="stylesheet" href="../assets/styles/font.css" type="text/css" />
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.hrc.by/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
@@ -52,6 +42,17 @@
<!-- build:js scripts/app.angular.js -->
<!-- jQuery -->
<script src="../libs/jquery/jquery/dist/jquery.js"></script>
<!-- DataTables -->
<script src="../libs/datatables/jquery.dataTables.min.js"></script>
<script src="../libs/datatables/dataTables.buttons.min.js"></script>
<script src="../libs/datatables/buttons.print.min.js"></script>
<script src="../libs/datatables/pdfmake.min.js"></script>
<script src="../libs/datatables/vfs_fonts.js"></script>
<script src="../libs/datatables/buttons.html5.min.js"></script>
<script src="../libs/datatables/jszip.min.js"></script>
<script src="../libs/datatables/dataTables.bootstrap.min.js"></script>
<!-- Bootstrap -->
<script src="scripts/config.js"></script>