diff --git a/app/static/js/kitchen.js b/app/static/js/kitchen.js
index e95a566..2a4c659 100644
--- a/app/static/js/kitchen.js
+++ b/app/static/js/kitchen.js
@@ -4,8 +4,9 @@ let done = document.getElementById("realisee");
let waiting = document.getElementById("attente");
function addcmd(id, plate, ingredient, sauce, drink, dessert, state, client, sandwich) {
- if (!sandwich)
- sandwich = "";
+ for (let i of ["plate", "ingredient", "sauce", "drink", "dessert", "state", "sandwich"])
+ if (!eval(i))
+ eval(`${i} = ""`);
done.insertAdjacentHTML("beforeend", `
${id}
${sandwich}
${client}
${plate} | ${ingredient}
${sauce}
${drink}
${dessert}
`);
let e = document.getElementById(`cmd${id}`);
switch (state) {
diff --git a/app/static/js/pc.js b/app/static/js/pc.js
index fb1a76d..0bfeaed 100644
--- a/app/static/js/pc.js
+++ b/app/static/js/pc.js
@@ -10,8 +10,9 @@ let radios = {"plate": null, "drink": null, "dessert": null};
function addcmd(id, plate, ingredient, sauce, drink, dessert, state, client, sandwich) {
- if (!sandwich)
- sandwich = "";
+ for (let i of ["plate", "ingredient", "sauce", "drink", "dessert", "state", "sandwich"])
+ if (!eval(i))
+ eval(`${i} = ""`);
list.insertAdjacentHTML("beforeend", ` ${id}
${sandwich}
${client}
${plate}
${ingredient}
${sauce}
${drink}
${dessert}
`);
let e = document.querySelector(`.liste #cmd${id}`);
e.addEventListener( "click" ,ev => {