Mon commit initial
This commit is contained in:
25
static/js/carnet_carburant.js
Normal file
25
static/js/carnet_carburant.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const $ = (id) => document.getElementById(id);
|
||||
|
||||
const tableau_carnet = new Tabulator("#tableau-carnet", {
|
||||
columns: [
|
||||
{"title": "Date", "field": "date"},
|
||||
{"title": "Nom de la station-service", "field": "nom_station"},
|
||||
{"title": "Type de carburant", "field": "type_carburant"},
|
||||
{"title": "Litres", "field": "litre"},
|
||||
{"title": "Litre/Prix (GNF)", "field": "prix"},
|
||||
{"title": "Montant total (GNF)", "field": "montant_total"},
|
||||
{"title": "Kilometrage", "field": "kilometrage"},
|
||||
{"title": "Observation", "field": "observation"},
|
||||
{"title": "Nom du chauffeur", "field": "nom_chauffeur"},
|
||||
]
|
||||
})
|
||||
|
||||
$("filtreMois").addEventListener("change", function () {
|
||||
tableau_carnet.setData(
|
||||
`${$("filtreMois").dataset.url}`,
|
||||
{
|
||||
"id_vehicule": $("id_vehicule").value,
|
||||
"mois": this.value
|
||||
}
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user