@processmaker/screen-builder 2.83.4 → 2.83.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/screen-builder",
3
- "version": "2.83.4",
3
+ "version": "2.83.5",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -21,7 +21,7 @@ export default {
21
21
  },
22
22
  methods: {
23
23
  openLink() {
24
- window.open(this.link, "_blank");
24
+ window.open(this.url, "_blank");
25
25
  }
26
26
  }
27
27
  };
@@ -48,7 +48,7 @@
48
48
  </vuetable>
49
49
  </div>
50
50
  <div v-else>
51
- <formEmpty link="Requests" title="No Requests to Show" url="/requests" />
51
+ <formEmpty link="Requests" title="No Requests to Show" :url="noDataUrl" />
52
52
  </div>
53
53
  </template>
54
54
 
@@ -81,6 +81,11 @@ export default {
81
81
  ]
82
82
  };
83
83
  },
84
+ computed: {
85
+ noDataUrl() {
86
+ return `${window.ProcessMaker?.app?.url}/requests`;
87
+ }
88
+ },
84
89
  mounted() {
85
90
  this.setFields();
86
91
  this.pmql = `requester = "${Processmaker.user.username}"`;
@@ -46,7 +46,7 @@
46
46
  <component :is="tasksPreview" ref="preview-sidebar" />
47
47
  </div>
48
48
  <div v-else>
49
- <formEmpty link="Tasks" title="No tasks in sight" url="/tasks" />
49
+ <formEmpty link="Tasks" title="No tasks in sight" :url="noDataUrl" />
50
50
  </div>
51
51
  </template>
52
52
 
@@ -82,6 +82,11 @@ export default {
82
82
  (window.SharedComponents && window.SharedComponents.TasksHome) || {}
83
83
  };
84
84
  },
85
+ computed: {
86
+ noDataUrl() {
87
+ return `${window.ProcessMaker?.app?.url}/tasks`;
88
+ }
89
+ },
85
90
  mounted() {
86
91
  this.setFields();
87
92
  this.pmql = `(user_id = ${ProcessMaker.user.id}) AND (status = "In Progress")`;
package/src/main.js CHANGED
@@ -110,13 +110,17 @@ const cacheEnabled = document.head.querySelector(
110
110
  const cacheTimeout = document.head.querySelector(
111
111
  "meta[name='screen-cache-timeout']"
112
112
  );
113
-
113
+ // Get the current protocol, hostname, and port
114
+ const { protocol, hostname, port } = window.location;
114
115
  window.ProcessMaker = {
115
116
  isStub: true,
116
117
  user: {
117
118
  id: 1,
118
119
  lang: "en"
119
120
  },
121
+ app: {
122
+ url: `${protocol}//${hostname}:${port}` // Create a URL with the current port
123
+ },
120
124
  apiClient: {
121
125
  create() {
122
126
  return this;