@@ -206,23 +206,25 @@ const ApplicationDetail = ({anonymous, refreshUser}) => {
206206 setAccessChoice ( "ALL" )
207207 }
208208
209- const doRequestConnection = withConfirmation => {
209+ const doRequestConnection = ( withConfirmation , modalOption ) => {
210210 if ( withConfirmation ) {
211+ let newModalOption ;
212+ if ( ! isAdminUser ) {
213+ newModalOption = confirmationModalOptions . requestConnectionByMember ;
214+ } else if ( connectWithoutInteraction ) {
215+ newModalOption = confirmationModalOptions . makeConnection ;
216+ } else {
217+ newModalOption = confirmationModalOptions . requestConnection ;
218+ }
219+ setConfirmationModalOption ( newModalOption ) ;
211220 setConfirmation ( {
212221 open : true ,
213222 cancel : ( ) => cancelConfirmation ( ) ,
214- action : ( ) => doRequestConnection ( false ) ,
223+ action : ( ) => doRequestConnection ( false , newModalOption ) ,
215224 title : null ,
216225 question : null ,
217226 okButton : I18n . t ( ! isAdminUser ? "applicationConnect.sendMessage" : "forms.proceed" )
218227 } ) ;
219- if ( ! isAdminUser ) {
220- setConfirmationModalOption ( confirmationModalOptions . requestConnectionByMember ) ;
221- } else if ( connectWithoutInteraction ) {
222- setConfirmationModalOption ( confirmationModalOptions . makeConnection ) ;
223- } else {
224- setConfirmationModalOption ( confirmationModalOptions . requestConnection ) ;
225- }
226228 } else {
227229 cancelConfirmation ( ) ;
228230 setLoading ( true ) ;
@@ -236,10 +238,11 @@ const ApplicationDetail = ({anonymous, refreshUser}) => {
236238 setFlash ( I18n . t ( "applicationConnect.flash.requestConnectionByMember" ) ) ;
237239 setMemberRequestSend ( true ) ;
238240 } else {
239- setFlash ( I18n . t ( `applicationConnect.flash.${ confirmationModalOption } ` ) ) ;
241+ setFlash ( I18n . t ( `applicationConnect.flash.${ modalOption } ` ) ) ;
240242 //Because user is an useEffect dependency, everything will reload. Including change requests
241243 refreshUser ( ( ) => {
242- setLoading ( false ) ;
244+ //a small timeout to prevent flickering - connecting apps does not happen that often
245+ setTimeout ( ( ) => setLoading ( false ) , 175 ) ;
243246 } ) ;
244247
245248 }
@@ -423,7 +426,7 @@ const ApplicationDetail = ({anonymous, refreshUser}) => {
423426 < div className = "right" >
424427 < p className = "license" > { I18n . t ( `applicationDetail.license.${ metaData [ 'coin:ss:license_status' ] || 'license_not_required' } ` ) } </ p >
425428 < p className = "info" > { I18n . t ( "applicationDetail.quickLinks" ) } </ p >
426- < div className = "info-block" >
429+ < div className = "app- info-block" >
427430 { APPLICATION_LINKS . map ( ( link , index ) =>
428431 externalLink ( link , metaData , index )
429432 ) }
@@ -442,7 +445,7 @@ const ApplicationDetail = ({anonymous, refreshUser}) => {
442445 < p > { I18n . t ( "applicationDetail.contractualInfoOrganization" ,
443446 { name : providerOrganizationName ( I18n . locale , serviceProvider ) } ) } </ p >
444447 < p className = "info" > { I18n . t ( "applicationDetail.supportedEntityCategories" ) } </ p >
445- < div className = "info-block" >
448+ < div className = "app- info-block" >
446449 { [ 1 , 2 , 3 , 4 ] . map ( nbr =>
447450 externalLink ( {
448451 locale : "applicationDetail.entityCategory" ,
0 commit comments