From 09f09501b7c2d739e649b6e7698601852f84ea44 Mon Sep 17 00:00:00 2001 From: Hariprasath S <113695067+Hariprasath4022@users.noreply.github.com> Date: Thu, 8 Oct 2026 13:08:50 +0530 Subject: [PATCH] Changes in Road works dashboard - added physical and financial percentage --- .../service/WorksService.java | 2 +- .../templates/modules/works/dashboard.html | 121 +++++++++++++++++- 2 files changed, 119 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gcc/commissionerreview/service/WorksService.java b/src/main/java/com/gcc/commissionerreview/service/WorksService.java index c125741..e20e1d5 100644 --- a/src/main/java/com/gcc/commissionerreview/service/WorksService.java +++ b/src/main/java/com/gcc/commissionerreview/service/WorksService.java @@ -854,7 +854,7 @@ public class WorksService { " wd.project_name, " + " wd.estimation_amount, " + " wd.est_val_with_oh, " + - " wd.percentage, " + + " wd.percentage,wd.financial_percentage, " + " dm.dept_name, " + " CASE " + diff --git a/src/main/resources/templates/modules/works/dashboard.html b/src/main/resources/templates/modules/works/dashboard.html index 3f088e6..e9bdd0e 100644 --- a/src/main/resources/templates/modules/works/dashboard.html +++ b/src/main/resources/templates/modules/works/dashboard.html @@ -73,7 +73,7 @@ /* physical progress css */ - .physical-progress-table { + /* .physical-progress-table { width: 100%; border-collapse: collapse; table-layout: fixed; @@ -126,7 +126,7 @@ .physical-progress-table .financial-value { width: 12%; - } + } */ .dashboard-content { @@ -261,6 +261,42 @@ background-color: #003366 !important; color: white; } + +.physical-progress { + display: flex; + align-items: center; + gap: 8px; + min-width: 120px; +} + +.physical-progress-bar-container { + flex: 1; + height: 8px; + background: #f0f1f3; + border-radius: 20px; + overflow: hidden; +} + +.physical-progress-bar { + height: 100%; + background: #16c765; + border-radius: 20px; + transition: width 0.6s ease; +} + +.financial-progress-bar { + height: 100%; + background: red; + border-radius: 20px; + transition: width 0.6s ease; +} + +.physical-progress-value { + min-width: 40px; + font-weight: 600; + font-size: 13px; + text-align: right; +}
@@ -1269,7 +1305,7 @@| Zone | Wards | Estimate Amount | +Physical % | +Financial % | Status | Action | @@ -1405,6 +1443,23 @@ }); } }, + + { + data: 'percentage', + className: 'text-center', + + render: function (data) { + return getPhysicalProgressBar(data); + } + }, + + { + data: 'financial_percentage', + className: 'text-center', + render: function (data) { + return getfinancialProgressBar(data); + } + }, { data: 'status', @@ -1462,6 +1517,66 @@ }); + function getfinancialProgressBar(percentage) { + + const value = Number(percentage || 0); + + const safeValue = Math.max( + 0, + Math.min(value, 100) + ); + + return ` +
|---|