From 334d24b6b87352ec827fd8861ea3e76270e4285a Mon Sep 17 00:00:00 2001 From: wartana Date: Sun, 18 Jan 2026 22:17:18 +0800 Subject: [PATCH] feat(dashboard): optimize layout and add village profile header - Add compact Village Profile (Desa, Kecamatan, Kabupaten) header to Dashboard. - Move Chart Legend to the right for better space utilization. - Remove redundant spacing and headers around the Population Chart. --- home/admin.php | 35 ++++++++++++++++++++++++++++++----- home/kaur.php | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 60 insertions(+), 10 deletions(-) diff --git a/home/admin.php b/home/admin.php index 3391afc..cffffbd 100644 --- a/home/admin.php +++ b/home/admin.php @@ -58,8 +58,25 @@ $sql_lansia = $koneksi->query("SELECT COUNT(id_pend) as c FROM tb_pdd WHERE TIMESTAMPDIFF(YEAR, tgl_lh, CURDATE()) >= 60 AND status='Ada'"); if($d = $sql_lansia->fetch_assoc()) $lansia = $d['c']; + // Data Profil + $sql_profil = "SELECT * FROM tb_profil WHERE id_profil='1'"; + $query_profil = mysqli_query($koneksi, $sql_profil); + $data_profil = mysqli_fetch_array($query_profil,MYSQLI_BOTH); ?> + +
+
+
+ PEMERINTAH DESA +
+

+ Kec. , Kab. | +

+
+
+ +
@@ -219,11 +236,6 @@
-
-

- Statistik Penduduk -

-
@@ -320,6 +332,19 @@ var donutOptions = { maintainAspectRatio : false, responsive : true, + plugins: { + title: { + display: true, + text: 'Komposisi Penduduk Berdasarkan Usia', + font: { + size: 16 + } + }, + legend: { + display: true, + position: 'right' + } + } } new Chart(donutChartCanvas, { type: 'doughnut', diff --git a/home/kaur.php b/home/kaur.php index 3391afc..cffffbd 100644 --- a/home/kaur.php +++ b/home/kaur.php @@ -58,8 +58,25 @@ $sql_lansia = $koneksi->query("SELECT COUNT(id_pend) as c FROM tb_pdd WHERE TIMESTAMPDIFF(YEAR, tgl_lh, CURDATE()) >= 60 AND status='Ada'"); if($d = $sql_lansia->fetch_assoc()) $lansia = $d['c']; + // Data Profil + $sql_profil = "SELECT * FROM tb_profil WHERE id_profil='1'"; + $query_profil = mysqli_query($koneksi, $sql_profil); + $data_profil = mysqli_fetch_array($query_profil,MYSQLI_BOTH); ?> + +
+
+
+ PEMERINTAH DESA +
+

+ Kec. , Kab. | +

+
+
+ +
@@ -219,11 +236,6 @@
-
-

- Statistik Penduduk -

-
@@ -320,6 +332,19 @@ var donutOptions = { maintainAspectRatio : false, responsive : true, + plugins: { + title: { + display: true, + text: 'Komposisi Penduduk Berdasarkan Usia', + font: { + size: 16 + } + }, + legend: { + display: true, + position: 'right' + } + } } new Chart(donutChartCanvas, { type: 'doughnut',