Mon commit initial
This commit is contained in:
24
static/js/detail_gestion_vehicule.js
Normal file
24
static/js/detail_gestion_vehicule.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// document.getElementById("id_mois_concerne").addEventListener("change", function () {
|
||||
// fetch(`/gestion-produit/recuperer-fournisseur-categorie/${this.value}`)
|
||||
// .then(response => response.json())
|
||||
// .then(data => {
|
||||
// champs_fournisseur.innerHTML = "";
|
||||
// data.forEach(fournisseur => {
|
||||
// const option = document.createElement("option");
|
||||
// option.value = fournisseur.id;
|
||||
// option.text = fournisseur.nom_fournisseur;
|
||||
// champs_fournisseur.appendChild(option);
|
||||
// });
|
||||
// })
|
||||
// })
|
||||
|
||||
carnetBordMois = document.querySelector("#carnetBordForm #id_mois_concerne");
|
||||
|
||||
carnetBordMois.addEventListener("change", function () {
|
||||
fetch (`/gestion-vehicule/carnet-vehicule-information/${carnetBordMois.value}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
document.getElementById("id_km_debut_mois").value = data.km_debut;
|
||||
document.getElementById("id_km_fin_mois").value = data.km_fin;
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user