Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions resources/js/processes-catalogue/components/ProcessOptions.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<template>
<div id="start-events btn-group">
<button
v-if="havelessOneStartEvent"
class="btn btn-success btn-lg start-button p-3"
type="button"
:disabled="processEvents.length === 0"
@click="goToNewRequest(startEvent)"
>
<span class="px-3"> {{ $t('Start this process') }} </span>
</button>
<button
v-else
class="btn btn-success btn-lg dropdown-toggle start-button p-3"
type="button"
data-toggle="dropdown"
Expand Down Expand Up @@ -58,6 +68,8 @@ export default {
data() {
return {
processEvents: [],
havelessOneStartEvent: false,
startEvent: "",
};
},
mounted() {
Expand All @@ -76,6 +88,13 @@ export default {
this.processEvents.push(event);
}
});
if (this.processEvents.length <= 1) {
const event = this.processEvents[0] ?? {};
if (!event.webEntry) {
this.havelessOneStartEvent = true;
this.startEvent = event.id ?? 0;
}
}
},
/**
* Start new request
Expand Down