From bb7c078feb727d7577741d8315857c3cbf6dec30 Mon Sep 17 00:00:00 2001 From: pavlosb Date: Mon, 11 Mar 2024 10:57:32 +0200 Subject: [PATCH] percent in gauges --- application/views/inspectionform.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/views/inspectionform.php b/application/views/inspectionform.php index 6f27fc99..bddcdbc6 100644 --- a/application/views/inspectionform.php +++ b/application/views/inspectionform.php @@ -490,8 +490,9 @@ function uploadFile() { if (!$(this).hasClass('do-not-calc')) { if ($(this).data("sect") === 1) { total1 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val()); - $("#score1").text(total1); - $("#score4").text(total1); + total1pc = 100 * (total1 / 112); + $("#score1").text(total1pc + '%'); + $("#score4").text(total1pc + '%'); } if ($(this).data("sect") === 12) { total2 += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());