From a5d22c854460494d5e8e82f0fa8c654eb53989ec Mon Sep 17 00:00:00 2001 From: Teisha McRae Date: Wed, 4 Nov 2026 12:15:07 -0500 Subject: [PATCH 1/2] Fix task row actions on saved searches This commit updates task row button visibility to evaluate per-row conditions, so preview/open actions respect task status instead of a URL-only check. Preview is now hidden for closed tasks while remaining available for active/self-service tasks, including saved searches. It also aligns task cells and separators visually and preserves the task status needed for row-level actions. --- .../tasks/components/TaskListRowButtons.vue | 12 +++++-- resources/js/tasks/components/TasksList.vue | 32 ++++++++----------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/resources/js/tasks/components/TaskListRowButtons.vue b/resources/js/tasks/components/TaskListRowButtons.vue index 41e2b3560f..d8ffd65238 100644 --- a/resources/js/tasks/components/TaskListRowButtons.vue +++ b/resources/js/tasks/components/TaskListRowButtons.vue @@ -5,7 +5,7 @@ -
@@ -51,6 +52,12 @@ showButtons: null }, methods: { + shouldShow(button) { + if (typeof button.show === "function") { + return button.show(this.row); + } + return button.show; + }, show() { this.triggerFloatingButtons(() => { if (!this.showButtons) { @@ -89,6 +96,7 @@ position: relative; display: inline-block; height: 30px; + vertical-align: middle; } .task-vertical-separator { display: inline; diff --git a/resources/js/tasks/components/TasksList.vue b/resources/js/tasks/components/TasksList.vue index 504fd202d5..4e1ba3ff3c 100644 --- a/resources/js/tasks/components/TasksList.vue +++ b/resources/js/tasks/components/TasksList.vue @@ -109,7 +109,7 @@
{{ getNestedPropertyValue(row, header) }}
this.shouldShowPreviewButton(row), }, { id: "openCaseButton", title: this.$t("Open Case"), click: this.redirectToRequest, imgSrc: "/img/smartinbox-images/open-case.svg", - show: !this.verifyURL("saved-searches") || true, + show: true, }, { id: "openTaskButton", title: this.$t("Open Task"), click: this.redirectToTask, icon: "fas fa-external-link-alt", - show: !this.verifyURL("saved-searches") || true, + show: true, }, ], actions: [ @@ -445,6 +444,7 @@ export default { record.process_request, record, ); + record.task_status = record.status; record.status = this.formatStatus(record); record.assignee = this.formatAvatar(record.user); record.request = this.formatRequest(record); @@ -550,7 +550,7 @@ export default { return link; }, previewTasks(info, size = null, fromButton = null) { - if (!info || !this.$refs.preview) { + if (!info || !this.$refs.preview || !this.shouldShowPreviewButton(info)) { return; } this.tooltipFromButton = fromButton; @@ -589,10 +589,7 @@ export default { label = this.$t("Completed"); } - return ` - - ${label} - `; + return `${label}`; }, formatDueDate(date) { return date === null ? "-" : moment(date).format("MM/DD/YY HH:mm"); @@ -752,13 +749,12 @@ export default { this.sortOrder[0].sortField = by; this.sortOrder[0].direction = direction; }, - verifyURL(string) { - const currentUrl = window.location.href; - let isInUrl = currentUrl.includes(string); - if (this.processesIManage) { - isInUrl = false; - } - return isInUrl; + /** + * Preview is available for active/self-service tasks (including on saved searches). + * Completed tasks remain excluded. + */ + shouldShowPreviewButton(row) { + return row?.task_status !== "CLOSED"; }, /** * This method is used in PMColumnFilterPopoverCommonMixin.js From a7bc7900fafcdb44393082beb0c6ceedb6d9d43d Mon Sep 17 00:00:00 2001 From: Teisha McRae Date: Wed, 4 Nov 2026 16:04:56 -0500 Subject: [PATCH 2/2] Enable task preview on saved-search lists Removed the saved-search gate that hid the preview pane for active and self-service tasks, while keeping completed tasks excluded unless the task list explicitly allows preview actions. --- resources/js/tasks/components/TasksList.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/js/tasks/components/TasksList.vue b/resources/js/tasks/components/TasksList.vue index 4e1ba3ff3c..bee44601ca 100644 --- a/resources/js/tasks/components/TasksList.vue +++ b/resources/js/tasks/components/TasksList.vue @@ -751,9 +751,13 @@ export default { }, /** * Preview is available for active/self-service tasks (including on saved searches). - * Completed tasks remain excluded. + * Completed tasks are excluded on normal task lists, but Quick Fill / Inbox Rules + * intentionally preview completed tasks (fromButton: previewTask|fullTask|inboxRules). */ shouldShowPreviewButton(row) { + if (["previewTask", "fullTask", "inboxRules"].includes(this.fromButton)) { + return true; + } return row?.task_status !== "CLOSED"; }, /**