Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
25be0dceef
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user