Thanasoft-Hytha/gestion/src/js/apercusToutesFactures.js

34 lines
1.2 KiB
JavaScript

import "@nextcloud/dialogs/dist/index.css";
import "datatables.net-dt/css/jquery.dataTables.css";
import "../css/mycss.css";
import { globalConfiguration } from "./modules/mainFunction.mjs";
import "./listener/main_listener";
import "./listener/invoiceListener";
import { getPDF } from "./pdf";
import { saveDocumentRecap } from "./modules/ajaxRequest.mjs";
import 'select2/dist/css/select2.css';
import 'select2';
window.addEventListener("DOMContentLoaded", function () {
globalConfiguration();
$('#clientselector').select2();
var documentRecap = document.getElementById("documentrecap");
if(documentRecap){
documentRecap.addEventListener("click", async ()=> {
const urlParams = new URLSearchParams(window.location.search);
const filter = urlParams.get('cli');
const year = urlParams.get('annee');
const month = urlParams.get('mois');
const filterType = urlParams.get('filterType') ?? 'client';
saveDocumentRecap({
filter: filter,
year: year,
month: month,
filterType: filterType
});
})
}
});