@processmaker/screen-builder 2.85.10 → 2.85.12

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.85.10",
3
+ "version": "2.85.12",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -207,10 +207,18 @@ export default {
207
207
 
208
208
  deleteFile(id, token = null) {
209
209
  let url = `files/${id}`;
210
- if (token) {
211
- url += `?token=${token}`;
210
+
211
+ const queryParams = {
212
+ token
213
+ };
214
+
215
+ const taskId = get(window, '_current_task_id', 0);
216
+
217
+ if (taskId) {
218
+ queryParams.task_id = taskId;
212
219
  }
213
- return this.delete(url);
220
+
221
+ return this.delete(url, { params: queryParams });
214
222
  },
215
223
 
216
224
  download(url) {
Binary file
@@ -116,12 +116,6 @@ export default {
116
116
  this.setPrefix();
117
117
  if (this.$refs['uploader']) {
118
118
  this.$refs['uploader'].$forceUpdate();
119
- // Re-upload stored files;
120
- // Files disappear when navigating between pages with the Page Navigation component
121
- if (this.files.length > 0) {
122
- this.$refs.uploader.uploader.addFiles(this.files);
123
- this.uploading = false;
124
- }
125
119
  }
126
120
 
127
121
  this.disabled = _.get(window, 'ProcessMaker.isSelfService', false);
@@ -284,6 +278,7 @@ export default {
284
278
  data_name: this.name,
285
279
  parent: null,
286
280
  row_id: null,
281
+ task_id: _.get(window, '_current_task_id', 0),
287
282
  },
288
283
  testChunks: false,
289
284
  // Setup our headers to deal with API calls
@@ -10,7 +10,8 @@
10
10
  <div class="d-flex flex-wrap p-2">
11
11
  <b-col cols="12">
12
12
  <b-card-text>
13
- <b-embed type="iframe" :src="graphic.link"></b-embed>
13
+ <b-embed v-if="!showChart" type="iframe" :src="graphic.link"></b-embed>
14
+ <img v-else src="../../assets/welcome_default.png" :style="{width:'100%', aspectRatio:21/9}" :alt="$t('Welcome Default')" />
14
15
  </b-card-text>
15
16
  </b-col>
16
17
  </div>
@@ -27,7 +28,8 @@ export default {
27
28
  graphic: [],
28
29
  customStyle: {
29
30
  "border-radius": "8px"
30
- }
31
+ },
32
+ showChart: false,
31
33
  };
32
34
  },
33
35
  watch: {
@@ -41,10 +43,14 @@ export default {
41
43
  if (this.listChartOption && this.listChartOption.name) {
42
44
  this.graphic = this.listChartOption;
43
45
  }
46
+ this.verifyChart();
44
47
  },
45
48
  methods: {
46
49
  openExternalLink() {
47
50
  window.open("/package-analytics-reporting", "_blank");
51
+ },
52
+ verifyChart() {
53
+ this.showChart = this.graphic.name === "PM Analytics Chart" || this.graphic.name === "PM Analytics Dashboard" || this.graphic.length === 0;
48
54
  }
49
55
  }
50
56
  };