diff --git a/static/scripts/main.js b/static/scripts/main.js index 4eb8ea5..53f2e5e 100644 --- a/static/scripts/main.js +++ b/static/scripts/main.js @@ -102,8 +102,8 @@ async function loadProducts() { } -function removeProduct(element_to_remove){ - umami.track('Remove Product'); +async function removeProduct(element_to_remove){ + await umami.track('Remove Product'); const product_row = document.getElementById('product_row') const products = product_row.children @@ -143,19 +143,19 @@ function removeProduct(element_to_remove){ to_fill_product_index -= 1 } -function payCash() { - umami.track('Pay Cash button'); +async function payCash() { + await umami.track('Pay Cash button'); const total_cost = document.getElementById('totalprice').innerHTML.replace('€ ','') window.location.href = "/pay_cash/" + total_cost } -function payCard() { - umami.track('Pay Card button'); +async function payCard() { + await umami.track('Pay Card button'); const total_cost = document.getElementById('totalprice').innerHTML.replace('€ ','') window.location.href = "/pay_card/" + total_cost } -function toMain() { - umami.track('To Main button'); +async function toMain() { + await umami.track('To Main button'); window.location.href = "/"; } \ No newline at end of file