@@ -122,6 +122,21 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
122122 . then ( notifications => {
123123 osparc . notification . Notifications . getInstance ( ) . addNotifications ( notifications ) ;
124124 } ) ;
125+
126+ // Show "Contact Us" message if services.length === 0
127+ // Most probably is a product-stranger user (it can also be that the catalog is down)
128+ osparc . store . Services . getServicesLatest ( )
129+ . then ( services => {
130+ if ( Object . keys ( services ) . length === 0 ) {
131+ let msg = this . tr ( "It seems you don't have access to this product." ) ;
132+ msg += "</br>" ;
133+ msg += this . tr ( "Please contact us:" ) ;
134+ msg += "</br>" ;
135+ const supportEmail = osparc . store . VendorInfo . getInstance ( ) . getSupportEmail ( ) ;
136+ msg += supportEmail ;
137+ osparc . FlashMessenger . getInstance ( ) . logAs ( msg , "WARNING" ) ;
138+ }
139+ } ) ;
125140 } )
126141 . catch ( err => {
127142 console . error ( err ) ;
@@ -269,28 +284,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
269284 }
270285 } ) ;
271286
272- // Show "Contact Us" message if services.length === 0
273- // Most probably is a product-stranger user (it can also be that the catalog is down)
274- osparc . store . Services . getServicesLatest ( )
275- . then ( services => {
276- if ( Object . keys ( services ) . length === 0 ) {
277- const noAccessText = new qx . ui . basic . Label ( ) . set ( {
278- selectable : true ,
279- rich : true ,
280- font : "text-18" ,
281- paddingTop : 20
282- } ) ;
283- let msg = this . tr ( "It seems you don't have access to this product." ) ;
284- msg += "</br>" ;
285- msg += "</br>" ;
286- msg += this . tr ( "Please contact us:" ) ;
287- msg += "</br>" ;
288- const supportEmail = osparc . store . VendorInfo . getInstance ( ) . getSupportEmail ( ) ;
289- noAccessText . setValue ( msg + supportEmail ) ;
290- this . _addToLayout ( noAccessText ) ;
291- }
292- } ) ;
293-
294287 this . _loadingResourcesBtn . setFetching ( true ) ;
295288 this . _loadingResourcesBtn . setVisibility ( "visible" ) ;
296289 this . __getNextStudiesRequest ( )
0 commit comments