Skip to content

Commit

Permalink
Merge pull request #1529 from ProcessMaker/bugfix/FOUR-13078
Browse files Browse the repository at this point in the history
FOUR-13078: Clicking in view all request shows server error
  • Loading branch information
ryancooley authored Feb 6, 2024
2 parents 431ffae + 7342244 commit 6f51502
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/renderer/form-empty-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
},
methods: {
openLink() {
window.open(this.link, "_blank");
window.open(this.url, "_blank");
}
}
};
Expand Down
7 changes: 6 additions & 1 deletion src/components/renderer/form-requests.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</vuetable>
</div>
<div v-else>
<formEmpty link="Requests" title="No Requests to Show" url="/requests" />
<formEmpty link="Requests" title="No Requests to Show" :url="noDataUrl" />
</div>
</template>

Expand Down Expand Up @@ -81,6 +81,11 @@ export default {
]
};
},
computed: {
noDataUrl() {
return `${window.ProcessMaker?.app?.url}/requests`;
}
},
mounted() {
this.setFields();
this.pmql = `requester = "${Processmaker.user.username}"`;
Expand Down
7 changes: 6 additions & 1 deletion src/components/renderer/form-tasks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<component :is="tasksPreview" ref="preview-sidebar" />
</div>
<div v-else>
<formEmpty link="Tasks" title="No tasks in sight" url="/tasks" />
<formEmpty link="Tasks" title="No tasks in sight" :url="noDataUrl" />
</div>
</template>

Expand Down Expand Up @@ -82,6 +82,11 @@ export default {
(window.SharedComponents && window.SharedComponents.TasksHome) || {}
};
},
computed: {
noDataUrl() {
return `${window.ProcessMaker?.app?.url}/tasks`;
}
},
mounted() {
this.setFields();
this.pmql = `(user_id = ${ProcessMaker.user.id}) AND (status = "In Progress")`;
Expand Down
6 changes: 5 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,17 @@ const cacheEnabled = document.head.querySelector(
const cacheTimeout = document.head.querySelector(
"meta[name='screen-cache-timeout']"
);

// Get the current protocol, hostname, and port
const { protocol, hostname, port } = window.location;
window.ProcessMaker = {
isStub: true,
user: {
id: 1,
lang: "en"
},
app: {
url: `${protocol}//${hostname}:${port}` // Create a URL with the current port
},
apiClient: {
create() {
return this;
Expand Down

0 comments on commit 6f51502

Please sign in to comment.