Skip to content

feature/FOUR-12677: "Start This Process" Behavior #5748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 4, 2023
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