From e4f0611ac52b581fe80e75e2fa4536b3788ec3f5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 26 May 2026 13:31:07 +0200 Subject: [PATCH] refactor: replace parseInt with Number.parseInt for consistency and clarity fix: add hidden input to card data labels for improved accessibility refactor: add scope attributes to table headers for better semantic structure --- tienda/templates/tienda/add_review.html | 6 ++-- tienda/templates/tienda/agregar_tarjeta.html | 2 +- tienda/templates/tienda/base.html | 4 +-- tienda/templates/tienda/checkout.html | 30 ++++++++++---------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tienda/templates/tienda/add_review.html b/tienda/templates/tienda/add_review.html index 0ebadc7..a20b57e 100644 --- a/tienda/templates/tienda/add_review.html +++ b/tienda/templates/tienda/add_review.html @@ -86,12 +86,12 @@ document.addEventListener('DOMContentLoaded', function() { stars.forEach(star => { star.addEventListener('click', function() { - const value = parseInt(this.dataset.value); + const value = Number.parseInt(this.dataset.value); updateStars(value); }); star.addEventListener('mouseenter', function() { - const value = parseInt(this.dataset.value); + const value = Number.parseInt(this.dataset.value); stars.forEach((s, index) => { if (index < value) { s.classList.remove('text-secondary'); @@ -101,7 +101,7 @@ document.addEventListener('DOMContentLoaded', function() { }); star.addEventListener('mouseleave', function() { - updateStars(parseInt(ratingInput.value) || 1); + updateStars(Number.parseInt(ratingInput.value) || 1); }); }); }); diff --git a/tienda/templates/tienda/agregar_tarjeta.html b/tienda/templates/tienda/agregar_tarjeta.html index 6f80e03..667417a 100644 --- a/tienda/templates/tienda/agregar_tarjeta.html +++ b/tienda/templates/tienda/agregar_tarjeta.html @@ -44,7 +44,7 @@

- +
diff --git a/tienda/templates/tienda/base.html b/tienda/templates/tienda/base.html index a1e7a3c..2734ec4 100644 --- a/tienda/templates/tienda/base.html +++ b/tienda/templates/tienda/base.html @@ -106,8 +106,8 @@ diff --git a/tienda/templates/tienda/checkout.html b/tienda/templates/tienda/checkout.html index bdb81de..d295cc4 100644 --- a/tienda/templates/tienda/checkout.html +++ b/tienda/templates/tienda/checkout.html @@ -84,11 +84,11 @@ - - - - - + + + + + @@ -104,16 +104,16 @@ - - + + - - + + - - + +
ProductoPrecio (sin IVA)CantidadStock actualSubtotal (con IVA)ProductoPrecio (sin IVA)CantidadStock actualSubtotal (con IVA)
Subtotal:{{ cart.get_total|format_price }}€Subtotal:{{ cart.get_total|format_price }}€
IVA (21%):+{{ cart.get_vat_amount|format_price }}€IVA (21%):+{{ cart.get_vat_amount|format_price }}€
Total:{{ cart.get_total_with_vat|format_price }}€Total:{{ cart.get_total_with_vat|format_price }}€
@@ -125,7 +125,7 @@
2) Selecciona tu método de pago
-