Ajout de la barre de navigation
This commit is contained in:
@@ -179,26 +179,25 @@ const tableau_equipement_rendre = new Tabulator("#tableau-equipement-rendre", {
|
||||
{title:"Libellé", field:"produit"},
|
||||
{title:"Quantite", field:"quantite"},
|
||||
{title:"Detenteur", field:"detenteur"},
|
||||
// {title:"Departement", field:"detenteur"},
|
||||
{title:"Rendu", field:"action", formatter:"tickCross", editor: true},
|
||||
],
|
||||
})
|
||||
|
||||
$("equipementARendreEnregistrer").addEventListener("click", function () {
|
||||
const information_equipement = tableau_equipement_rendre.getData();
|
||||
const csrf = document.querySelector('[name=csrfmiddlewaretoken]').value;
|
||||
fetch(`${$("equipementARendreEnregistrer").dataset.url}`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-CSRFToken": csrf
|
||||
},
|
||||
body: JSON.stringify(information_equipement)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
tableau_equipement_rendre.setData("/equipement-a-rendre");
|
||||
// tableau_equipement_rendre.clearEditedData();
|
||||
})
|
||||
.catch(error => console.error(error))
|
||||
})
|
||||
// $("equipementARendreEnregistrer").addEventListener("click", function () {
|
||||
// const information_equipement = tableau_equipement_rendre.getData();
|
||||
// const csrf = document.querySelector('[name=csrfmiddlewaretoken]').value;
|
||||
// fetch(`${$("equipementARendreEnregistrer").dataset.url}`, {
|
||||
// method: "POST",
|
||||
// headers: {
|
||||
// "Content-Type": "application/json",
|
||||
// "X-CSRFToken": csrf
|
||||
// },
|
||||
// body: JSON.stringify(information_equipement)
|
||||
// })
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// tableau_equipement_rendre.setData("/equipement-a-rendre");
|
||||
// // tableau_equipement_rendre.clearEditedData();
|
||||
// })
|
||||
// .catch(error => console.error(error))
|
||||
// })
|
||||
Reference in New Issue
Block a user