* jquery removed

* charts auf lokal umgestellt
* Rechnungen mit Anhang
* neues Interface Sync automatische
This commit is contained in:
Markus
2025-05-17 09:06:12 +02:00
parent 842d9050dc
commit 8f28ed82da
10 changed files with 276 additions and 67 deletions

View File

@@ -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
View 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/';
}

View File

@@ -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,