@processmaker/screen-builder 2.85.12 → 2.86.0

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.12",
3
+ "version": "2.86.0",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -1,49 +1,47 @@
1
1
  <template>
2
2
  <div>
3
- <template v-for="event in emptyStartEvents">
4
- <div :key="event.id" class="mb-3 card-request">
5
- <div class="card-body">
6
- <div class="d-flex justify-content-between">
7
- <div>
8
- <span v-uni-id="event.id.toString()" class="card-info card-title">
9
- {{ transformedName }}
10
- </span>
11
- <span class="card-info">
12
- {{ event.name }}
13
- </span>
14
- </div>
15
- <div class="d-flex align-items-center">
16
- <button
17
- :aria-expanded="ariaExpanded"
18
- :aria-controls="getComputedId(process, event)"
19
- class="btn btn-ellipsis btn-sm mr-1"
20
- @click="showRequestDetails(process, event)"
21
- >
22
- <i class="fas fa-ellipsis-v"></i>
23
- </button>
24
- <button
25
- v-uni-aria-describedby="event.id.toString()"
26
- :href="getNewRequestLinkHref(process, event)"
27
- class="btn btn-custom btn-sm"
28
- @click.prevent="newRequestLink(process, event)"
29
- >
30
- {{ $t("Start") }}
31
- <i class="fas fa-play mr-1 card-icon"></i>
32
- </button>
33
- </div>
3
+ <div class="mb-3 card-request">
4
+ <div class="card-body">
5
+ <div class="d-flex justify-content-between">
6
+ <div>
7
+ <span v-uni-id="event.id.toString()" class="card-info card-title">
8
+ {{ transformedName }}
9
+ </span>
10
+ <span class="card-info">
11
+ {{ event.name }}
12
+ </span>
13
+ </div>
14
+ <div class="d-flex align-items-center">
15
+ <button
16
+ :aria-expanded="ariaExpanded"
17
+ :aria-controls="getComputedId(process, event)"
18
+ class="btn btn-ellipsis btn-sm mr-1"
19
+ @click="showRequestDetails(process, event)"
20
+ >
21
+ <i class="fas fa-ellipsis-v"></i>
22
+ </button>
23
+ <button
24
+ v-uni-aria-describedby="event.id.toString()"
25
+ :href="getNewRequestLinkHref(process, event)"
26
+ class="btn btn-custom btn-sm"
27
+ @click.prevent="newRequestLink(process, event)"
28
+ >
29
+ {{ $t("Start") }}
30
+ <i class="fas fa-play mr-1 card-icon"></i>
31
+ </button>
34
32
  </div>
35
- <b-collapse
36
- :id="getComputedId(process, event)"
37
- :aria-hidden="ariaHidden"
38
- >
39
- <hr />
40
- <p class="card-text text-muted card-description">
41
- {{ process.description }}
42
- </p>
43
- </b-collapse>
44
33
  </div>
34
+ <b-collapse
35
+ :id="getComputedId(process, event)"
36
+ :aria-hidden="ariaHidden"
37
+ >
38
+ <hr />
39
+ <p class="card-text text-muted card-description">
40
+ {{ process.description }}
41
+ </p>
42
+ </b-collapse>
45
43
  </div>
46
- </template>
44
+ </div>
47
45
  </div>
48
46
  </template>
49
47
 
@@ -54,7 +52,7 @@ const uniqIdsMixin = createUniqIdsMixin();
54
52
 
55
53
  export default {
56
54
  mixins: [uniqIdsMixin],
57
- props: ["name", "description", "filter", "id", "process"],
55
+ props: ["name", "description", "filter", "id", "process", "event"],
58
56
  data() {
59
57
  return {
60
58
  disabled: false,
@@ -1,15 +1,17 @@
1
1
  <template>
2
2
  <div>
3
3
  <div v-if="Object.keys(processes).length && !loading" class="process-list">
4
- <b-container fluid>
5
- <div v-for="(process, index) in processes" :key="`process-${index}`">
6
- <ProcessCard
7
- v-if="hasEmptyStartEvents(process)"
8
- :filter="filter"
9
- :process="process"
10
- />
11
- </div>
12
- </b-container>
4
+ <div class="row">
5
+ <template v-for="(process, index) in processes">
6
+ <div v-for="(event, indexE) in emptyStartEvents(process)" :key="`process-${index}-${indexE}`" class="col-sm-6">
7
+ <ProcessCard
8
+ :filter="filter"
9
+ :process="process"
10
+ :event="event"
11
+ />
12
+ </div>
13
+ </template>
14
+ </div>
13
15
  </div>
14
16
  <div v-else>
15
17
  <formEmpty link="" title="No Request to Start" url="" />
@@ -39,6 +41,12 @@ export default {
39
41
  this.$root.$on("dropdownSelectionStart", this.fetchData);
40
42
  },
41
43
  methods: {
44
+ emptyStartEvents(process) {
45
+ return process.startEvents.filter(
46
+ (event) =>
47
+ !event.eventDefinitions || event.eventDefinitions.length === 0
48
+ );
49
+ },
42
50
  hasEmptyStartEvents(process) {
43
51
  return !!process.events.find(
44
52
  (event) =>