@@ -461,20 +461,24 @@ qx.Class.define("osparc.dashboard.CardBase", {
461461 let owner = null ;
462462 let workbench = null ;
463463 let defaultHits = null ;
464+ let icon = null ;
464465 switch ( resourceData [ "resourceType" ] ) {
465466 case "study" :
466467 uuid = resourceData . uuid ? resourceData . uuid : null ;
467468 owner = resourceData . prjOwner ? resourceData . prjOwner : "" ;
468469 workbench = resourceData . workbench ? resourceData . workbench : { } ;
470+ icon = osparc . study . Utils . guessIcon ( resourceData ) ;
469471 break ;
470472 case "template" :
471473 uuid = resourceData . uuid ? resourceData . uuid : null ;
472474 owner = resourceData . prjOwner ? resourceData . prjOwner : "" ;
473475 workbench = resourceData . workbench ? resourceData . workbench : { } ;
476+ icon = osparc . study . Utils . guessIcon ( resourceData ) ;
474477 break ;
475478 case "service" :
476479 uuid = resourceData . key ? resourceData . key : null ;
477480 owner = resourceData . owner ? resourceData . owner : resourceData . contact ;
481+ icon = resourceData [ "icon" ] || osparc . dashboard . CardBase . PRODUCT_ICON ;
478482 defaultHits = 0 ;
479483 break ;
480484 }
@@ -489,7 +493,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
489493 lastChangeDate : resourceData . lastChangeDate ? new Date ( resourceData . lastChangeDate ) : null ,
490494 trashedAt : resourceData . trashedAt ? new Date ( resourceData . trashedAt ) : null ,
491495 trashedBy : resourceData . trashedBy || null ,
492- icon : [ "study" , "template" ] . includes ( resourceData . resourceType ) ? osparc . study . Utils . guessIcon ( resourceData ) : osparc . dashboard . CardBase . PRODUCT_ICON ,
496+ icon,
493497 thumbnail : resourceData . thumbnail || this . self ( ) . PRODUCT_THUMBNAIL ,
494498 state : resourceData . state ? resourceData . state : { } ,
495499 classifiers : resourceData . classifiers && resourceData . classifiers ? resourceData . classifiers : [ ] ,
0 commit comments