From 98ba2c024de146ae60e0dcba5864e11cf7c1c414 Mon Sep 17 00:00:00 2001 From: fs Date: Sun, 5 Apr 2026 19:31:58 +0200 Subject: [PATCH] fix(helpdesk): remove title line in team widgets, fix table columns and debitor links - Hide section-title ::after line inside team widgets - Fixed table-layout with consistent column widths (12/25/43/20%) - Debitor link uses customer_no (route param), displays customer_name - Add Customer_No to OData select for debitor link resolution - Add customer_no to open_ticket_details backend structure Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Module/Helpdesk/Service/BcODataGateway.php | 2 +- .../Helpdesk/Service/DebitorDetailService.php | 1 + modules/helpdesk/web/css/helpdesk.css | 18 +++++++++++++++++- modules/helpdesk/web/js/helpdesk-team.js | 8 ++++---- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php b/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php index 09de70d..9d2e9b5 100644 --- a/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php +++ b/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php @@ -599,7 +599,7 @@ class BcODataGateway { $url = $this->settingsGateway->buildEntityUrl(self::ENTITY_TICKETS) . '?$top=500' - . '&$select=' . rawurlencode('No,Description,Company_Contact_Name,Ticket_State,Support_User_Name,Created_On,Last_Activity_Date') + . '&$select=' . rawurlencode('No,Description,Company_Contact_Name,Customer_No,Ticket_State,Support_User_Name,Created_On,Last_Activity_Date') . '&$orderby=' . rawurlencode('Created_On desc'); $response = $this->request('GET', $url); diff --git a/modules/helpdesk/lib/Module/Helpdesk/Service/DebitorDetailService.php b/modules/helpdesk/lib/Module/Helpdesk/Service/DebitorDetailService.php index 07efd43..c7835fa 100644 --- a/modules/helpdesk/lib/Module/Helpdesk/Service/DebitorDetailService.php +++ b/modules/helpdesk/lib/Module/Helpdesk/Service/DebitorDetailService.php @@ -1662,6 +1662,7 @@ class DebitorDetailService 'age_hours' => $ageHours, 'critical' => $isCritical, 'customer_name' => trim((string) ($ticket['Company_Contact_Name'] ?? '')), + 'customer_no' => trim((string) ($ticket['Customer_No'] ?? '')), 'last_activity' => $lastActivityDisplay, ]; } diff --git a/modules/helpdesk/web/css/helpdesk.css b/modules/helpdesk/web/css/helpdesk.css index f225ca1..049b878 100644 --- a/modules/helpdesk/web/css/helpdesk.css +++ b/modules/helpdesk/web/css/helpdesk.css @@ -138,6 +138,10 @@ margin-top: 0; } + .helpdesk-team-widget > .helpdesk-support-section-title::after { + display: none; + } + .helpdesk-team-widget > .helpdesk-team-ticket-table { border: none; border-radius: 0; @@ -179,8 +183,21 @@ border-radius: var(--app-radius, 0.375rem); border-spacing: 0; overflow: hidden; + table-layout: fixed; } + .helpdesk-team-ticket-table th:nth-child(1), + .helpdesk-team-ticket-table td:nth-child(1) { width: 12%; } + + .helpdesk-team-ticket-table th:nth-child(2), + .helpdesk-team-ticket-table td:nth-child(2) { width: 25%; } + + .helpdesk-team-ticket-table th:nth-child(3), + .helpdesk-team-ticket-table td:nth-child(3) { width: 43%; } + + .helpdesk-team-ticket-table th:nth-child(4), + .helpdesk-team-ticket-table td:nth-child(4) { width: 20%; } + .helpdesk-team-ticket-table th { text-align: left; font-weight: 500; @@ -221,7 +238,6 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - max-width: 20ch; } .helpdesk-team-ticket-date { diff --git a/modules/helpdesk/web/js/helpdesk-team.js b/modules/helpdesk/web/js/helpdesk-team.js index 6f932e8..8ba419f 100644 --- a/modules/helpdesk/web/js/helpdesk-team.js +++ b/modules/helpdesk/web/js/helpdesk-team.js @@ -81,11 +81,11 @@ if (container) { } tr.appendChild(noCell); - // Customer name as link to debitor + // Customer name as link to debitor (link uses customer_no) const customerCell = h('td'); - if (debitorBaseUrl && t.customer_name) { - const a = h('a', '', t.customer_name); - a.href = debitorBaseUrl + encodeURIComponent(t.customer_name); + if (debitorBaseUrl && t.customer_no) { + const a = h('a', '', t.customer_name || t.customer_no); + a.href = debitorBaseUrl + encodeURIComponent(t.customer_no); customerCell.appendChild(a); } else { customerCell.textContent = t.customer_name || '—';