From 1b2ff33a0b7e8dde31ee0beec434dcaab1e5b943 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Mon, 5 Feb 2024 11:24:26 -0400 Subject: [PATCH 1/2] FOUR-13078: Clicking in view all request shows server error --- src/components/renderer/form-empty-table.vue | 2 +- src/components/renderer/form-requests.vue | 7 ++++++- src/components/renderer/form-tasks.vue | 7 ++++++- src/main.js | 3 +++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/renderer/form-empty-table.vue b/src/components/renderer/form-empty-table.vue index b43126a61..86307c5fb 100644 --- a/src/components/renderer/form-empty-table.vue +++ b/src/components/renderer/form-empty-table.vue @@ -21,7 +21,7 @@ export default { }, methods: { openLink() { - window.open(this.link, "_blank"); + window.open(this.url, "_blank"); } } }; diff --git a/src/components/renderer/form-requests.vue b/src/components/renderer/form-requests.vue index d515ca365..e554d1977 100755 --- a/src/components/renderer/form-requests.vue +++ b/src/components/renderer/form-requests.vue @@ -48,7 +48,7 @@
- +
@@ -81,6 +81,11 @@ export default { ] }; }, + computed: { + noDataUrl() { + return `${window.ProcessMaker?.app?.url}requests`; + } + }, mounted() { this.setFields(); this.pmql = `requester = "${Processmaker.user.username}"`; diff --git a/src/components/renderer/form-tasks.vue b/src/components/renderer/form-tasks.vue index 1fea03d38..004a66f25 100755 --- a/src/components/renderer/form-tasks.vue +++ b/src/components/renderer/form-tasks.vue @@ -46,7 +46,7 @@
- +
@@ -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")`; diff --git a/src/main.js b/src/main.js index c51a98955..8b5e028fc 100644 --- a/src/main.js +++ b/src/main.js @@ -117,6 +117,9 @@ window.ProcessMaker = { id: 1, lang: "en" }, + app: { + url: window.location.href + }, apiClient: { create() { return this; From 17c27bd49934de020e206a9417e5b9756ba039d2 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Mon, 5 Feb 2024 15:32:36 -0400 Subject: [PATCH 2/2] fix Cr notes --- src/components/renderer/form-requests.vue | 2 +- src/components/renderer/form-tasks.vue | 2 +- src/main.js | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/renderer/form-requests.vue b/src/components/renderer/form-requests.vue index e554d1977..3a5d1e6bb 100755 --- a/src/components/renderer/form-requests.vue +++ b/src/components/renderer/form-requests.vue @@ -83,7 +83,7 @@ export default { }, computed: { noDataUrl() { - return `${window.ProcessMaker?.app?.url}requests`; + return `${window.ProcessMaker?.app?.url}/requests`; } }, mounted() { diff --git a/src/components/renderer/form-tasks.vue b/src/components/renderer/form-tasks.vue index 004a66f25..77b247279 100755 --- a/src/components/renderer/form-tasks.vue +++ b/src/components/renderer/form-tasks.vue @@ -84,7 +84,7 @@ export default { }, computed: { noDataUrl() { - return `${window.ProcessMaker?.app?.url}tasks`; + return `${window.ProcessMaker?.app?.url}/tasks`; } }, mounted() { diff --git a/src/main.js b/src/main.js index 9f48b323e..054840fe0 100644 --- a/src/main.js +++ b/src/main.js @@ -110,7 +110,8 @@ 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: { @@ -118,7 +119,7 @@ window.ProcessMaker = { lang: "en" }, app: { - url: window.location.href + url: `${protocol}//${hostname}:${port}` // Create a URL with the current port }, apiClient: { create() {