From b4f24f4fcfded9bd3c8a1e984f14bf856b475a98 Mon Sep 17 00:00:00 2001 From: xodivorce Date: Thu, 1 Jan 2026 13:21:33 +0530 Subject: [PATCH] fix: khown bugs, add Medical/Health Issue in reports category --- README.md | 2 +- src/assets/users/_overview.php | 97 +++++++++++++++---------- src/assets/users/_reports.php | 1 + src/core/actions/mail/report_config.php | 3 + src/pages/token/google_oauth_token.php | 2 +- 5 files changed, 63 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index a99267d7..14df7392 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ #### A real-time map-based reporting system for campus infrastructure issues, built to improve visibility, accountability, and resolution efficiency. [![status](https://img.shields.io/badge/status-active-brightgreen.svg?style=flat)](https://github.com/xodivorce/infra-xodivorce-in/) -[![version](https://img.shields.io/badge/version-v1.3.2-yellow.svg?style=flat)](https://github.com/xodivorce/infra-xodivorce-in/) +[![version](https://img.shields.io/badge/version-v1.3.3-yellow.svg?style=flat)](https://github.com/xodivorce/infra-xodivorce-in/) [![PRs](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat)](https://github.com/xodivorce/infra-xodivorce-in/) > **🥰 Like this project? Please consider giving it a Star (🌟) on GitHub to show us your appreciation. Thank you!** diff --git a/src/assets/users/_overview.php b/src/assets/users/_overview.php index 7a0e11ea..053f4a52 100755 --- a/src/assets/users/_overview.php +++ b/src/assets/users/_overview.php @@ -1,12 +1,10 @@ query("SET time_zone = '+05:30'"); -$totalResult = $conn->query("SELECT COUNT(*) FROM reports"); -$totalReports = $totalResult->fetch_row()[0]; +$openedResult = $conn->query("SELECT COUNT(*) FROM reports WHERE status = 'Opened'"); +$openedReports = $openedResult->fetch_row()[0]; -$activeResult = $conn->query("SELECT COUNT(*) FROM reports WHERE status IN ('Opened', 'In Progress')"); -$activeReports = $activeResult->fetch_row()[0]; +$inProgressResult = $conn->query("SELECT COUNT(*) FROM reports WHERE status = 'In Progress'"); +$inProgressReports = $inProgressResult->fetch_row()[0]; $resolvedResult = $conn->query("SELECT COUNT(*) FROM reports WHERE status = 'Resolved'"); $resolvedReports = $resolvedResult->fetch_row()[0]; @@ -21,7 +19,8 @@ $recentResult = $conn->query($recentSql); $recentActivity = $recentResult->fetch_all(MYSQLI_ASSOC); if (!function_exists('time_elapsed_string')) { - function time_elapsed_string($datetime, $full = false) { + function time_elapsed_string($datetime, $full = false) + { $now = new DateTime; $ago = new DateTime($datetime); $diff = $now->diff($ago); @@ -38,51 +37,66 @@ if (!function_exists('time_elapsed_string')) { } } - if (!$full) $string = array_slice($string, 0, 1); + if (!$full) + $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' ago' : 'just now'; } } ?>
- +
-
+
-

Total Reports

-

-

All submissions overview

+

+ Opened Reports +

+

+

Newly reported issues

-
- - + +
+ +
-
+
-

Reports In Progress

-

+

+ Reports In Progress

+

In progress / Open

- +
-
+
-

Resolved Reports

+

+ Resolved Reports

Successfully closed

- +
@@ -96,33 +110,36 @@ if (!function_exists('time_elapsed_string')) {
- + 0): ?> -
-
- - +
+ +
- +

- Issue # + Issue # +

diff --git a/src/assets/users/_reports.php b/src/assets/users/_reports.php index defd8c3d..537e82d5 100755 --- a/src/assets/users/_reports.php +++ b/src/assets/users/_reports.php @@ -404,6 +404,7 @@ $result = $conn->query($sql); + v1.3.2 + class="text-xs font-bold text-blue-400 bg-blue-500/10 px-2 py-0.5 rounded-full border border-blue-500/20">v1.3.3