File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
services/static-webserver/client/source/class/osparc/ui/basic Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,15 @@ qx.Class.define("osparc.ui.basic.DateAndBy", {
7878 __applyDate : function ( value ) {
7979 if ( value ) {
8080 const label = this . getChildControl ( "date-text" ) ;
81- label . set ( {
82- value : osparc . utils . Utils . formatDateAndTime ( value ) ,
83- } ) ;
81+ const today = new Date ( ) ;
82+ const yesterday = new Date ( ) ;
83+ if ( today . toDateString ( ) === value . toDateString ( ) ) {
84+ label . setValue ( osparc . utils . Utils . formatDateAndTime ( value ) ) ; // show date and time
85+ } else if ( yesterday . toDateString ( ) === value . toDateString ( ) ) {
86+ label . setValue ( osparc . utils . Utils . formatDateAndTime ( value ) ) ; // show date and time
87+ } else {
88+ label . setValue ( osparc . utils . Utils . formatDate ( value ) ) ; // show date only
89+ }
8490 }
8591 } ,
8692
@@ -92,7 +98,7 @@ qx.Class.define("osparc.ui.basic.DateAndBy", {
9298 atom . setLabel ( "by me" ) ;
9399 } else {
94100 atom . setLabel ( "by" ) ;
95- osparc . dashboard . CardBase . addHintFromGids ( atom , [ groupId ] ) ;
101+ osparc . dashboard . CardBase . addHintFromGids ( atom , [ groupId ] ) ;
96102 }
97103 }
98104 } ,
You can’t perform that action at this time.
0 commit comments