File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
src/Frontend/src/components/messages2 Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,14 @@ import SagaCompletedNode from "./SagaDiagram/SagaCompletedNode.vue";
18
18
const sagaDiagramStore = useSagaDiagramStore ();
19
19
const { showMessageData } = storeToRefs (sagaDiagramStore );
20
20
21
- const store = useMessageStore ();
22
- const { state : messageState } = storeToRefs (store );
21
+ const messageStore = useMessageStore ();
23
22
24
23
// Watch for message and set saga ID when component mounts or message changes
25
24
watch (
26
- () => messageState .value .data .invoked_saga ,
27
- (newSagas ) => {
28
- if (newSagas .has_saga ) {
29
- sagaDiagramStore .setSagaId (newSagas .saga_id || " " );
30
- } else {
31
- sagaDiagramStore .clearSagaHistory ();
25
+ () => messageStore .state ,
26
+ (newState ) => {
27
+ if (newState .data .invoked_saga .saga_id !== sagaDiagramStore .sagaId ) {
28
+ sagaDiagramStore .setSagaId (newState .data .invoked_saga .saga_id || " " );
32
29
}
33
30
},
34
31
{ immediate: true }
@@ -42,7 +39,7 @@ const vm = computed<SagaViewModel>(() => {
42
39
const completedUpdate = sagaDiagramStore .sagaHistory ?.changes .find ((update ) => update .status === " completed" );
43
40
const completionTime = completedUpdate ? new Date (completedUpdate .finish_time ) : null ;
44
41
45
- const { data } = messageState . value ;
42
+ const { data } = messageStore . state ;
46
43
const { invoked_saga : saga } = data ;
47
44
const sagaHistory = sagaDiagramStore .sagaHistory ;
48
45
You can’t perform that action at this time.
0 commit comments