* jquery removed
* charts auf lokal umgestellt * Rechnungen mit Anhang * neues Interface Sync automatische
This commit is contained in:
@@ -1,14 +1,23 @@
|
||||
var datatable;
|
||||
var colomnspez = columns;
|
||||
colomnspez.splice(3, 0, { title: "Quelle",orderable:false, data: "source",className:"dt-source" });
|
||||
function createSearchData(data, type, row){
|
||||
let details = "";
|
||||
data.forEach(function(item){
|
||||
details += item.comment+' '+item.description+' ';
|
||||
details += new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(item.subamount);
|
||||
});
|
||||
return details;
|
||||
}
|
||||
|
||||
colomnspez.splice(3, 0, { title: "Quelle",orderable:false, data: "source",className:"dt-source" });
|
||||
colomnspez.splice(6, 0, { title: "Details",orderable:false, visible:false, searchable:true, data: "details",className:"",render: createSearchData});
|
||||
$(document).ready(function(){
|
||||
datatable = $('#bookings').DataTable({
|
||||
paging: false,
|
||||
searching:true,
|
||||
scrollX:false,
|
||||
info:false,
|
||||
order: [[ 1, 'desc' ]],
|
||||
order: [[ 1, 'desc' ],[ 0, 'desc' ]],
|
||||
"processing": true,
|
||||
ajax: {
|
||||
type : 'POST',
|
||||
@@ -22,7 +31,7 @@ $(document).ready(function(){
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Neu Rechnung',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
{text:'Neue Rechnung',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/newBill/';
|
||||
}},
|
||||
{text:'Neuer Transfer',className:'btn-sm mx-2',action: function ( e, dt, node, config ) {
|
||||
|
||||
26
public/js/menue.js
Normal file
26
public/js/menue.js
Normal file
@@ -0,0 +1,26 @@
|
||||
function syncScheduled(){
|
||||
$('#mySnycModal').modal('show');
|
||||
$('#mySnycModal').find('.modal-title').html("Synchronisierte Einträge!");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/syncScheduled/",
|
||||
data: {}, // serializes the form's elements.
|
||||
success: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalText.innerHTML = data;
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
},
|
||||
error: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalFenster.classList.add("alert");
|
||||
modalFenster.classList.add("alert-danger");
|
||||
modalText.textContent = 'Fehler bei der Ausführung!';
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
}
|
||||
});
|
||||
// location.href = '/syncScheduled/';
|
||||
}
|
||||
@@ -1,33 +1,6 @@
|
||||
var datatable;
|
||||
var todos;
|
||||
|
||||
function syncScheduled(){
|
||||
$('#mySnycModal').modal('show');
|
||||
$('#mySnycModal').find('.modal-title').html("Synchronisierte Einträge!");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/syncScheduled/",
|
||||
data: {}, // serializes the form's elements.
|
||||
success: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalText.innerHTML = data;
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
},
|
||||
error: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalFenster.classList.add("alert");
|
||||
modalFenster.classList.add("alert-danger");
|
||||
modalText.textContent = 'Fehler bei der Ausführung!';
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
}
|
||||
});
|
||||
// location.href = '/syncScheduled/';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
datatable = $('#bookings').DataTable({
|
||||
paging: false,
|
||||
|
||||
Reference in New Issue
Block a user