const urlListeDocument = document.getElementById('listeDocuments').dataset.urllistedocument;

const table_liste_documents = new Tabulator(document.getElementById('listeDocuments'), {
    layout: "fitColumns",
    placeholder: "Aucun document trouvé",
    columns: [
        { title: "Nom du Document", field: "nom_document" },
        { title: "Numéro", field: "numero" },
        { title: "Date de Validité", field: "date_validite", formatter: "datetime", formatterParams: { 
            inputFormat: "yyyy-MM-dd", 
            outputFormat: "dd/MM/yyyy" 
        } 
        },
        { title: "Lien vers le Document", field: "lien_document", formatter:"link", formatterParams:{
                target:"_blank",
            } 
    },
    ],
    ajaxURL: urlListeDocument,
});