feat(helpdesk): enrich team ticket table with links, customer name, description, last activity
- Switch gateway from PBI_LV_Tickets to PBI_FP_Tickets to get Description and Company_Contact_Name fields - Ticket number links to ticket detail page - Customer column shows Company_Contact_Name with link to debitor detail - Description column with text-overflow ellipsis - Last activity column shows formatted date (was: age in hours) - Backend provides last_activity ISO string and customer_name per ticket - Table headers use i18n labels via data attributes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -597,9 +597,9 @@ class BcODataGateway
|
||||
*/
|
||||
public function getTicketsForTeam(): array
|
||||
{
|
||||
$url = $this->settingsGateway->buildEntityUrl(self::ENTITY_TICKETS_LV)
|
||||
$url = $this->settingsGateway->buildEntityUrl(self::ENTITY_TICKETS)
|
||||
. '?$top=500'
|
||||
. '&$select=' . rawurlencode('No,Customer_No,Category_1_Code,Escalation_Code,Ticket_State,Last_Activity_Date,Created_On,Process_Stage,Process_Code,Support_User_Name')
|
||||
. '&$select=' . rawurlencode('No,Description,Company_Contact_Name,Ticket_State,Support_User_Name,Created_On,Last_Activity_Date')
|
||||
. '&$orderby=' . rawurlencode('Created_On desc');
|
||||
|
||||
$response = $this->request('GET', $url);
|
||||
|
||||
@@ -1651,12 +1651,18 @@ class DebitorDetailService
|
||||
$globalOpenCount++;
|
||||
}
|
||||
|
||||
$lastActivityRaw = trim((string) ($ticket['Last_Activity_Date'] ?? ''));
|
||||
$lastActivityDisplay = ($lastActivityRaw !== '' && !str_starts_with($lastActivityRaw, '0001'))
|
||||
? $lastActivityRaw
|
||||
: trim((string) ($ticket['Created_On'] ?? ''));
|
||||
|
||||
$agents[$normalizedUser]['open_ticket_details'][] = [
|
||||
'no' => trim((string) ($ticket['No'] ?? '')),
|
||||
'description' => trim((string) ($ticket['Description'] ?? '')),
|
||||
'age_hours' => $ageHours,
|
||||
'critical' => $isCritical,
|
||||
'customer' => trim((string) ($ticket['Customer_No'] ?? '')),
|
||||
'customer_name' => trim((string) ($ticket['Company_Contact_Name'] ?? '')),
|
||||
'last_activity' => $lastActivityDisplay,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user