From a14011e11c9ebbd31617781376dff2257c413af7 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Sat, 6 Jun 2026 03:54:51 +0530 Subject: [PATCH] Improve pain scale visual indicator for better clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change checkmark to down arrow (▼) for better visibility in PDFs - Increase arrow size to 20px and make it bold - Use white background for non-selected boxes for stronger contrast - Add thick black border (3px) on selected level for emphasis - Selected box shows colored background with white text - Increase selected label text size and make it bold black - Clear visual distinction between selected (value 2 vs 4) levels now --- app/Controllers/Opd.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/app/Controllers/Opd.php b/app/Controllers/Opd.php index a061b55..7fb5309 100644 --- a/app/Controllers/Opd.php +++ b/app/Controllers/Opd.php @@ -3878,34 +3878,37 @@ class Opd extends BaseController $labels = ['No Pain', 'Mild', 'Moderate', 'Intense', 'Worst']; $colors = ['#22c55e', '#84cc16', '#eab308', '#f97316', '#ef4444']; // green to red gradient - $painImageHtml = ''; + $painImageHtml = '
'; - // Row 1: Tick/checkmark indicator above selected level + // Row 1: Down arrow indicator above selected level (more visible than checkmark) $painImageHtml .= ''; for ($i = 0; $i <= 4; $i++) { $active = $painIndex === $i; - $tick = $active ? '✓' : ''; - $painImageHtml .= ''; + $arrow = $active ? '▼' : ' '; + $painImageHtml .= ''; } $painImageHtml .= ''; - // Row 2: Number boxes with color coding + // Row 2: Number boxes with strong color coding and border $painImageHtml .= ''; for ($i = 0; $i <= 4; $i++) { $active = $painIndex === $i; - $bg = $active ? $colors[$i] : '#f3f4f6'; - $borderColor = $active ? $colors[$i] : '#d1d5db'; - $color = $active ? '#fff' : '#6b7280'; - $painImageHtml .= ''; + $bg = $active ? $colors[$i] : '#ffffff'; + $borderColor = $active ? '#000000' : '#d1d5db'; + $borderWidth = $active ? '3px' : '1px'; + $color = $active ? '#ffffff' : '#374151'; + $painImageHtml .= ''; } $painImageHtml .= ''; - // Row 3: Labels + // Row 3: Labels with bold for selected $painImageHtml .= ''; for ($i = 0; $i <= 4; $i++) { $active = $painIndex === $i; $fontWeight = $active ? '700' : '400'; - $painImageHtml .= ''; + $textColor = $active ? '#000000' : '#6b7280'; + $fontSize = $active ? '9px' : '8px'; + $painImageHtml .= ''; } $painImageHtml .= '
' . $tick . '' . $arrow . '
' . $i . '' . $i . '
' . esc($labels[$i]) . '' . esc($labels[$i]) . '
'; }