File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ const mapToCardObjs = (
2424 tasks : TaskSummary [ ] ,
2525 workflows : RunningWorkflowSummary [ ] ,
2626) : ResultCardItem [ ] => {
27- const todayIso = dayjs ( ) . toISOString ( ) ;
2827 const instanceCardObjs = instances . map ( ( instance ) => ( {
2928 type : "instance" as const ,
3029 data : instance ,
@@ -33,7 +32,7 @@ const mapToCardObjs = (
3332 const workflowCardObjs = workflows . map ( ( workflow ) => ( {
3433 type : "workflow" as const ,
3534 data : workflow ,
36- time : todayIso ,
35+ time : workflow . started ?? dayjs ( ) . toISOString ( ) , // Use the `started` property for workflows
3736 } ) ) ;
3837 return [ ...instanceCardObjs , ...taskCardObjs , ...workflowCardObjs ] ;
3938} ;
@@ -110,7 +109,7 @@ export const ResultCards = ({
110109 . sort ( ( a , b ) => {
111110 const aTime = getTime ( a ) ;
112111 const bTime = getTime ( b ) ;
113- return dayjs ( aTime ) . isBefore ( dayjs ( bTime ) ) ? 1 : - 1 ;
112+ return dayjs ( bTime ) . isBefore ( dayjs ( aTime ) ) ? - 1 : 1 ;
114113 } )
115114 . map ( ( item ) => {
116115 switch ( item . type ) {
You can’t perform that action at this time.
0 commit comments