Skip to content

Commit ac5e35b

Browse files
authored
Merge pull request #8310 from ProcessMaker/bugfix/FOUR-23617
FOUR-23617: When reloading the page, the completed status filter show all clear
2 parents cdd6121 + e9558d2 commit ac5e35b

4 files changed

Lines changed: 15 additions & 26 deletions

File tree

ProcessMaker/Traits/TaskControllerIndexMethods.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@ private function indexBaseQuery($request)
2727

2828
$query = ProcessRequestToken::exclude(['data']);
2929

30-
// If all_inbox is true and user has process requests, filter to only show the latest process
31-
if ($request->has('all_inbox') && $request->input('all_inbox') === 'false') {
32-
$latestProcessRequest = ProcessRequestToken::where('user_id', auth()->id())
33-
->orderBy('created_at', 'desc')
34-
->first();
35-
36-
if ($latestProcessRequest) {
37-
$query->where('process_id', $latestProcessRequest->process_id);
38-
}
39-
}
40-
4130
$query = $query->with([
4231
'processRequest' => function ($q) use ($includeData) {
4332
if (!$includeData) {

resources/js/tasks/components/ListMixin.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,6 @@ const ListMixin = {
9393
if (this.additionalIncludes) {
9494
include.push(...this.additionalIncludes);
9595
}
96-
const currentUrl = window.location.href;
97-
const path = new URL(currentUrl).pathname.split("/").pop();
98-
99-
let getAllTasksInbox = "";
100-
if (path === "inbox") {
101-
if (this.$parent.allInbox) {
102-
getAllTasksInbox = "&all_inbox=true";
103-
} else {
104-
getAllTasksInbox = "&all_inbox=false";
105-
}
106-
} else {
107-
getAllTasksInbox = "&all_inbox=true";
108-
}
10996
// Load from our api client
11097
ProcessMaker.apiClient
11198
.get(
@@ -115,7 +102,6 @@ const ListMixin = {
115102
this.perPage + this.sumCards
116103
}${filterParams}${this.getSortParam()}&non_system=true` +
117104
`&processesIManage=${this.processesIManage ? "true" : "false"}` +
118-
getAllTasksInbox +
119105
advancedFilter +
120106
this.columnsQuery,
121107
{

resources/js/tasks/components/ParticipantHomeScreen.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ export default {
281281
},
282282
getAllTasks() {
283283
this.selectedProcess = "inbox";
284-
this.allInbox = true;
284+
if (this.$route.name !== 'inbox') {
285+
this.$router.push({
286+
name: "inbox",
287+
});
288+
}
285289
this.$refs.processesDashboardsMenu?.clearSelection();
286290
this.callingTaskList();
287291
},

resources/js/tasks/router.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ const router = new VueRouter({
2121
ellipsisPermission: window.ProcessMaker.ellipsisPermission
2222
})
2323
},
24+
{
25+
path: "",
26+
name: "inbox",
27+
component: Process,
28+
props: route => ({
29+
processId: null,
30+
process: null,
31+
ellipsisPermission: window.ProcessMaker.ellipsisPermission
32+
})
33+
},
2434
{
2535
path: "/dashboard/:dashboardId",
2636
name: "dashboard",

0 commit comments

Comments
 (0)