@processmaker/screen-builder 2.28.0 → 2.28.1-RC4.patch.FOUR.6050

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.28.0",
3
+ "version": "2.28.1-RC4.patch.FOUR.6050",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -198,7 +198,7 @@ export default {
198
198
  this.filesInfo.push(fileInfo);
199
199
  } else {
200
200
  window.ProcessMaker.alert(
201
- this.$t('File Download Missing File'),
201
+ this.$t('File ID does not exist'),
202
202
  'danger'
203
203
  );
204
204
  }
@@ -18,7 +18,7 @@
18
18
  >
19
19
  <uploader-unsupport/>
20
20
 
21
- <uploader-drop v-if="this.$refs['uploader']" class="form-control-file">
21
+ <uploader-drop v-if="uploaderLoaded" class="form-control-file">
22
22
  <p>{{ $t('Drop a file here to upload or') }}</p>
23
23
  <uploader-btn
24
24
  :attrs="nativeButtonAttrs"
@@ -46,7 +46,7 @@
46
46
  <div v-if="nativeFiles[file.id]" style="flex: 1" class="overflow-hidden" :data-cy="file.file_name.replace(/[^0-9a-zA-Z\-]/g, '-')">
47
47
  <uploader-file :file="nativeFiles[file.id]" :list="true" />
48
48
  </div>
49
- <div v-else style="flex: 1">
49
+ <div v-else class="text-truncate" :title="file.file_name" style="flex: 1">
50
50
  <i class="fas fa-paperclip"/> {{ file.file_name }}
51
51
  </div>
52
52
  <div class="pt-1">
@@ -287,10 +287,13 @@ export default {
287
287
  disabled: false,
288
288
  files: [],
289
289
  nativeFiles: {},
290
- uploading: false,
290
+ uploading: false,
291
291
  };
292
292
  },
293
293
  methods: {
294
+ uploaderLoaded() {
295
+ return this.$refs['uploader'];
296
+ },
294
297
  setFiles() {
295
298
  if (_.isEqual(this.filesData, this.files)) {
296
299
  return;
@@ -38,10 +38,11 @@ export default {
38
38
  computed: {
39
39
  classList() {
40
40
  let variant = this.variant || 'primary';
41
+ let isInvalid = this.$store.getters['globalErrorsModule/isValidScreen'] === false;
41
42
  return {
42
43
  btn: true,
43
44
  ['btn-' + variant]: true,
44
- disabled: this.errors,
45
+ disabled: this.event === 'submit' && isInvalid,
45
46
  };
46
47
  },
47
48
  options() {
@@ -327,17 +327,25 @@ export default {
327
327
  this.redirecting = task.process_request_id;
328
328
  this.$emit('redirect', task.id, true);
329
329
  return;
330
- } else if (this.task && requestId == this.task.process_request_id && this.parentRequest && this.task.process_request.status === 'COMPLETED') {
331
- // Only emit completed after getting the subprocess tasks and there are no tasks and process is completed
332
- this.$emit('completed', this.parentRequest);
330
+ } else {
331
+ this.emitIfTaskCompleted(requestId);
333
332
  }
334
333
  this.taskId = task.id;
335
334
  this.nodeId = task.element_id;
336
- } else if (this.parentRequest) {
335
+ } else if (this.parentRequest && ['COMPLETED', 'CLOSED'].includes(this.task.process_request.status)) {
337
336
  this.$emit('completed', this.parentRequest);
338
337
  }
339
338
  });
340
339
  },
340
+ emitIfTaskCompleted(requestId) {
341
+ // Only emit completed after getting the subprocess tasks and there are no tasks and process is completed
342
+ if (this.task
343
+ && this.parentRequest
344
+ && requestId == this.task.process_request_id
345
+ && this.task.process_request.status === 'COMPLETED') {
346
+ this.$emit('completed', this.parentRequest);
347
+ }
348
+ },
341
349
  classHeaderCard(status) {
342
350
  let header = 'bg-success';
343
351
  switch (status) {
@@ -4,6 +4,7 @@ export default {
4
4
  pageNavigate() {},
5
5
  pageNavigationProperties({ properties }) {
6
6
  properties['@page-navigate'] = 'pageNavigate';
7
+ properties[':validate'] = '$v';
7
8
  },
8
9
  pageNavigationBuild(screen) {
9
10
  this.addData(screen, 'currentPage__', 'this._initialPage');
@@ -19,7 +20,7 @@ export default {
19
20
  mounted() {
20
21
  this.extensions.push({
21
22
  onloadproperties(params) {
22
- if (params.componentName === 'FormButton') {
23
+ if (params.element.component === 'FormButton' && params.element.config.event === 'pageNavigate') {
23
24
  this.pageNavigationProperties(params);
24
25
  }
25
26
  },