diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index dd2464f0..d7d81683 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3723,6 +3723,7 @@ class EmployeeRestController extends AdminController if (! empty($emp_ticket_data)) { + $received_relationship = $received_data['relationship'] ?? null; unset($received_data['relationship']); $fetchData = $emp_ticket_data[0]; @@ -3750,8 +3751,8 @@ class EmployeeRestController extends AdminController $fetchData = array_merge($fetchData, $received_data); - // $fetchData['relationship'] = strtolower($fetchData['relationship']) ?? $fetchData['relationship']; - $fetchData['relationship'] = isset($fetchData['relationship']) ? strtolower($fetchData['relationship']) : null; + // $fetchData['relationship'] = isset($fetchData['relationship']) ? strtolower($fetchData['relationship']) : null; + $fetchData['relationship'] = strtolower($received_relationship ?? $fetchData['relationship'] ?? '') ?: null; $fetchData['created_by'] = $fetchData['emp_id']; $fetchData['claim_created_by'] = "USER"; diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 928f630a..32a3eeb9 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -503,6 +503,7 @@ class TicketController extends BaseController 'tm.id', 'tm.ticket_type_id', 'tm.claim_status_id', + 'tm.claim_created_by', 'tm.is_head_approved', 'tcs.claim_status AS status', 'tm.claim_number AS claim_no', @@ -640,6 +641,7 @@ class TicketController extends BaseController 'tcs.claim_status AS status', 'tm.claim_number AS claim_no', 'tm.claim_status_id', + 'tm.claim_created_by', 'tm.is_head_approved', 'tm.tpa_id', 'tm.tpa_no', diff --git a/app/Views/ticket_list.php b/app/Views/ticket_list.php index 98681079..9bedf618 100644 --- a/app/Views/ticket_list.php +++ b/app/Views/ticket_list.php @@ -30,6 +30,46 @@ table.dataTable tbody td { color: #6c757d !important; } +/* Claim source pill — text only, fixed width (DUMP_TPA); hidden when no value */ +.claim-source-badge { + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0 4px; + border-radius: 999px; + font-size: 0.52rem; + font-weight: 600; + line-height: 1.3; + white-space: nowrap; + text-align: center; + overflow: hidden; + text-overflow: ellipsis; + width: 8.75em; + min-width: 8.75em; + max-width: 8.75em; +} +.claim-source-badge--tpa { + background: #d1fae5; + color: #047857; +} +.claim-source-badge--user { + background: #dbeafe; + color: #1d4ed8; +} +.claim-source-badge--dump-tpa { + background: #ede9fe; + color: #6d28d9; +} +.claim-source-badge--dump { + background: #ffedd5; + color: #c2410c; +} +.claim-source-badge--crm { + background: #fce7f3; + color: #9d174d; +} +