From 454d25347fd39c69f456c9dc0ce8c250c28f74ba Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Sun, 12 Nov 2023 17:56:15 +0200 Subject: [PATCH] Small fix on view support --- cp/resources/views/partials/js-support.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cp/resources/views/partials/js-support.twig b/cp/resources/views/partials/js-support.twig index 5133cbf..0e38767 100644 --- a/cp/resources/views/partials/js-support.twig +++ b/cp/resources/views/partials/js-support.twig @@ -25,7 +25,7 @@ } table = new Tabulator("#supportTable", { - ajaxURL:"/api/records/support_tickets", // Set the URL for your JSON data + ajaxURL:"/api/records/support_tickets?join=ticket_categories", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", paginationSize:10, @@ -41,7 +41,7 @@ {title:"Subject", field:"subject", headerSort:true, responsive:0}, {title:"Status", field:"status", headerSort:true, responsive:2}, {title:"Priority", field:"priority", headerSort:true, responsive:2}, - {title:"Category", field:"category_id", headerSort:false, download:false, responsive:2}, + {title:"Category", field:"category_id.name", headerSort:false, download:false, responsive:2}, {title: "Actions", formatter: actionsFormatter, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }}, ], placeholder:function(){ @@ -59,7 +59,7 @@ String(data.subject).toLowerCase().includes(term) || String(data.status).toLowerCase().includes(term) || String(data.priority).toLowerCase().includes(term) || - String(data.category_id).toLowerCase().includes(term) + String(data.category_id.name).toLowerCase().includes(term) ); }); } else {