@@ -41,9 +41,12 @@ import {
4141 fetchEventStatistics ,
4242 openModalTab ,
4343 fetchEventDetailsTobira ,
44+ fetchHasActiveTransactions ,
4445} from "../../../../slices/eventDetailsSlice" ;
45- import { removeNotificationWizardForm } from "../../../../slices/notificationSlice" ;
46+ import { addNotification , removeNotificationByKey , removeNotificationWizardForm } from "../../../../slices/notificationSlice" ;
4647import DetailsTobiraTab from "../ModalTabsAndPages/DetailsTobiraTab" ;
48+ import { NOTIFICATION_CONTEXT } from "../../../../configs/modalConfig" ;
49+ import { unwrapResult } from "@reduxjs/toolkit" ;
4750
4851export enum EventDetailsPage {
4952 Metadata ,
@@ -84,6 +87,32 @@ const EventDetails = ({
8487 dispatch ( fetchSchedulingInfo ( eventId ) ) ;
8588 dispatch ( fetchEventStatistics ( eventId ) ) ;
8689 dispatch ( fetchAssetUploadOptions ( ) ) ;
90+
91+ dispatch ( fetchHasActiveTransactions ( eventId ) ) . then ( ( fetchTransactionResult ) => {
92+ const result = unwrapResult ( fetchTransactionResult )
93+ if ( result . active !== undefined && result . active ) {
94+ dispatch (
95+ addNotification ( {
96+ type : "warning" ,
97+ key : "ACTIVE_TRANSACTION" ,
98+ duration : - 1 ,
99+ parameter : undefined ,
100+ context : NOTIFICATION_CONTEXT ,
101+ noDuplicates : true
102+ } )
103+ )
104+ }
105+ if ( result . active !== undefined && ! result . active ) {
106+ dispatch (
107+ removeNotificationByKey ( {
108+ key : "ACTIVE_TRANSACTION" ,
109+ context : NOTIFICATION_CONTEXT
110+ } )
111+ )
112+ }
113+ } ) ;
114+
115+
87116 dispatch ( fetchEventDetailsTobira ( eventId ) ) ;
88117 // eslint-disable-next-line react-hooks/exhaustive-deps
89118 } , [ ] ) ;
0 commit comments