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 = (
24
24
tasks : TaskSummary [ ] ,
25
25
workflows : RunningWorkflowSummary [ ] ,
26
26
) : ResultCardItem [ ] => {
27
- const todayIso = dayjs ( ) . toISOString ( ) ;
28
27
const instanceCardObjs = instances . map ( ( instance ) => ( {
29
28
type : "instance" as const ,
30
29
data : instance ,
@@ -33,7 +32,7 @@ const mapToCardObjs = (
33
32
const workflowCardObjs = workflows . map ( ( workflow ) => ( {
34
33
type : "workflow" as const ,
35
34
data : workflow ,
36
- time : todayIso ,
35
+ time : workflow . started ?? dayjs ( ) . toISOString ( ) , // Use the `started` property for workflows
37
36
} ) ) ;
38
37
return [ ...instanceCardObjs , ...taskCardObjs , ...workflowCardObjs ] ;
39
38
} ;
@@ -110,7 +109,7 @@ export const ResultCards = ({
110
109
. sort ( ( a , b ) => {
111
110
const aTime = getTime ( a ) ;
112
111
const bTime = getTime ( b ) ;
113
- return dayjs ( aTime ) . isBefore ( dayjs ( bTime ) ) ? 1 : - 1 ;
112
+ return dayjs ( bTime ) . isBefore ( dayjs ( aTime ) ) ? - 1 : 1 ;
114
113
} )
115
114
. map ( ( item ) => {
116
115
switch ( item . type ) {
You can’t perform that action at this time.
0 commit comments