Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
vadivelJ96 2025-10-31 17:33:32 +05:30
commit 25be0dceef
3 changed files with 14 additions and 2 deletions

View File

@ -886,3 +886,15 @@ if (!function_exists('removeNumberFormatting')) {
return (float) str_replace(',', '', trim($number));
}
}
if (!function_exists('formatKey')) {
function formatKey($key, $len = 3)
{
$words = explode('_', $key);
$formatted = array_map(function ($word) use ($len) {
return strlen($word) < $len ? strtoupper($word) : ucfirst(strtolower($word));
}, $words);
return implode(' ', $formatted);
}
}

View File

@ -27,7 +27,7 @@ class InsurerBranchModel extends Model
public function getInsurerBranchesWithInsurerNames()
{
$query = $this->select('insurer_branch.*, I.short_name as insurer_name')
$query = $this->select('insurer_branch.*, I.short_name as insurer_name, I.category')
->join('insurers I', 'insurer_branch.insurer_id = I.id', 'left')
->find();
return $query;

View File

@ -226,7 +226,7 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
$bgColor = $colorShades[$colorSetIndex][$shadeIndex];
?>
<?php
$formattedStatus = strlen($key) < 5 ? strtoupper($key) : ucwords(str_replace('_', ' ', $key));
$formattedStatus = strlen($key) < 5 ? strtoupper($key) : formatKey($key, 4);
$truncatedStatus = strlen($formattedStatus) > 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus;
$showTooltip = strlen($formattedStatus) > 20;
?>