Skip to content

Commit 3f2b9b3

Browse files
authored
Hide the saga tab if the endpoint is not part of a saga (#2385)
* Hide the saga tab if the endpoint is not part of a saga
1 parent a422379 commit 3f2b9b3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/Frontend/src/components/messages2/MessageView.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const isMassTransitConnected = useIsMassTransitConnected();
3131
const store = useMessageStore();
3232
const { state } = storeToRefs(store);
3333
const backLink = ref<RouteLocationAsPathGeneric>({ path: routeLinks.failedMessage.failedMessages.link });
34+
35+
const hasParticipatedInSaga = computed(() => store.state.data.invoked_saga?.has_saga);
36+
3437
const tabs = computed(() => {
3538
const currentTabs = [
3639
{
@@ -59,10 +62,13 @@ const tabs = computed(() => {
5962
text: "Sequence Diagram",
6063
component: SequenceDiagram,
6164
});
62-
currentTabs.push({
63-
text: "Saga Diagram",
64-
component: SagaDiagram,
65-
});
65+
// Add the "Saga Diagram" tab only if the saga has been participated in
66+
if (hasParticipatedInSaga?.value) {
67+
currentTabs.push({
68+
text: "Saga Diagram",
69+
component: SagaDiagram,
70+
});
71+
}
6672
}
6773
6874
return currentTabs;

0 commit comments

Comments
 (0)