Removed console.log debug statements

This commit is contained in:
Yarne Coppens 2024-08-05 18:05:41 +02:00
parent db06ec4504
commit aeef56e663

View file

@ -28,6 +28,8 @@ async function loadProducts() {
barcodeForm.addEventListener("submit", (e) => { barcodeForm.addEventListener("submit", (e) => {
e.preventDefault(); e.preventDefault();
if (to_fill_product_index < 5) {
const barcode = document.getElementById('barcode_input').value const barcode = document.getElementById('barcode_input').value
var chosen_product var chosen_product
for (index = 0; index < all_products.length; index++) { for (index = 0; index < all_products.length; index++) {
@ -46,13 +48,14 @@ async function loadProducts() {
total_price += chosen_product.price total_price += chosen_product.price
console.log(image_product)
image_product.setAttribute('src', api_url + "/icons/" + chosen_product.image_filename); image_product.setAttribute('src', api_url + "/icons/" + chosen_product.image_filename);
price_product.textContent = "\u20AC " + chosen_product.price price_product.textContent = "\u20AC " + chosen_product.price
total_price_holder.textContent = "\u20AC " + total_price total_price_holder.textContent = "\u20AC " + total_price
to_fill_product_index += 1 to_fill_product_index += 1
}else{
barcode_input.value = ""
}
}); });
} }