feat(helpdesk): add Description and Cust_Name from LV entity to team table
PBI_LV_Tickets exposes Description and Cust_Name (not Company_Contact_Name which is FP-only). Add both to select. Table now shows 5 columns: Ticket (link) | Customer name (link) | Description (ellipsis) | Category | Last activity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -599,7 +599,7 @@ class BcODataGateway
|
||||
{
|
||||
$url = $this->settingsGateway->buildEntityUrl(self::ENTITY_TICKETS_LV)
|
||||
. '?$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,Customer_No,Cust_Name,Category_1_Code,Escalation_Code,Ticket_State,Last_Activity_Date,Created_On,Process_Stage,Process_Code,Support_User_Name')
|
||||
. '&$orderby=' . rawurlencode('Created_On desc');
|
||||
|
||||
$response = $this->request('GET', $url);
|
||||
|
||||
@@ -1658,10 +1658,11 @@ class DebitorDetailService
|
||||
|
||||
$agents[$normalizedUser]['open_ticket_details'][] = [
|
||||
'no' => trim((string) ($ticket['No'] ?? '')),
|
||||
'description' => trim((string) ($ticket['Description'] ?? '')),
|
||||
'category' => trim((string) ($ticket['Category_1_Code'] ?? '')),
|
||||
'age_hours' => $ageHours,
|
||||
'critical' => $isCritical,
|
||||
'customer_name' => trim((string) ($ticket['Company_Contact_Name'] ?? '')),
|
||||
'customer_name' => trim((string) ($ticket['Cust_Name'] ?? (string) ($ticket['Company_Contact_Name'] ?? ''))),
|
||||
'customer_no' => trim((string) ($ticket['Customer_No'] ?? '')),
|
||||
'last_activity' => $lastActivityDisplay,
|
||||
];
|
||||
|
||||
@@ -26,6 +26,7 @@ $periodLabels = [
|
||||
data-debitor-base-url="<?php e(lurl('helpdesk/debitor/')); ?>"
|
||||
data-label-ticket="<?php e(t('Ticket')); ?>"
|
||||
data-label-customer="<?php e(t('Debtor')); ?>"
|
||||
data-label-description="<?php e(t('Description')); ?>"
|
||||
data-label-category="<?php e(t('Category')); ?>"
|
||||
data-label-last-activity="<?php e(t('Last activity')); ?>"
|
||||
>
|
||||
|
||||
@@ -219,6 +219,13 @@
|
||||
color: var(--app-muted-color);
|
||||
}
|
||||
|
||||
.helpdesk-team-ticket-desc {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 18ch;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
.helpdesk-team-ticket-no a,
|
||||
.helpdesk-team-ticket-table td a {
|
||||
|
||||
@@ -92,6 +92,9 @@ if (container) {
|
||||
}
|
||||
tr.appendChild(customerCell);
|
||||
|
||||
// Description (ellipsis)
|
||||
tr.appendChild(h('td', 'helpdesk-team-ticket-desc', t.description || '—'));
|
||||
|
||||
// Category
|
||||
tr.appendChild(h('td', '', t.category || '—'));
|
||||
|
||||
@@ -129,6 +132,7 @@ if (container) {
|
||||
const headRow = h('tr');
|
||||
headRow.appendChild(h('th', '', container.dataset.labelTicket || 'Ticket'));
|
||||
headRow.appendChild(h('th', '', container.dataset.labelCustomer || 'Customer'));
|
||||
headRow.appendChild(h('th', '', container.dataset.labelDescription || 'Description'));
|
||||
headRow.appendChild(h('th', '', container.dataset.labelCategory || 'Category'));
|
||||
headRow.appendChild(h('th', '', container.dataset.labelLastActivity || 'Last activity'));
|
||||
thead.appendChild(headRow);
|
||||
|
||||
Reference in New Issue
Block a user