@@ -2,6 +2,7 @@ import Component from '@glimmer/component';
2
2
import { LinkTo } from ' @ember/routing' ;
3
3
4
4
import AccessionSummary from ' repository/components/accession-summary' ;
5
+ import DetailsCount from ' repository/components/details-count' ;
5
6
import ProgressLabel from ' repository/components/progress-label' ;
6
7
import ValidityBadge from ' repository/components/validity-badge' ;
7
8
import formatDate from ' repository/helpers/format-datetime' ;
@@ -40,50 +41,55 @@ export default class extends Component<Signature> {
40
41
Renew Accession
41
42
</LinkTo >
42
43
43
- <table class =" table" >
44
- <thead >
45
- <tr >
46
- <th >ID</th >
47
- <th >Created</th >
48
- <th >Started</th >
49
- <th >Finished</th >
50
- <th >Progress</th >
51
- <th >Validity</th >
52
- </tr >
53
- </thead >
54
-
55
- <tbody >
56
- {{#each this . renewals as | renewal | }}
44
+ {{#if this . renewals }}
45
+ <table class =" table" >
46
+ <thead >
57
47
<tr >
58
- <td >
59
- <LinkTo @ route =" accession_renewal" @ model ={{renewal.id }} >
60
- #{{renewal.id }}
61
- </LinkTo >
62
- </td >
63
-
64
- <td >{{formatDate renewal.created_at }} </td >
65
-
66
- <td >
67
- {{#if renewal.started_at }}
68
- {{formatDate renewal.started_at }}
69
- {{else }}
70
- -
71
- {{/if }}
72
- </td >
73
-
74
- <td >
75
- {{#if renewal.finished_at }}
76
- {{formatDate renewal.finished_at }}
77
- {{else }}
78
- -
79
- {{/if }}
80
- </td >
81
-
82
- <td ><ProgressLabel @ progress ={{renewal.progress }} /></td >
83
- <td ><ValidityBadge @ validity ={{renewal.validity }} /></td >
48
+ <th >ID</th >
49
+ <th >Created</th >
50
+ <th >Started</th >
51
+ <th >Finished</th >
52
+ <th >Progress</th >
53
+ <th >Validity</th >
84
54
</tr >
85
- {{/each }}
86
- </tbody >
87
- </table >
55
+ </thead >
56
+
57
+ <tbody >
58
+ {{#each this . renewals as | renewal | }}
59
+ <tr >
60
+ <td >
61
+ <LinkTo @ route =" accession_renewal" @ model ={{renewal.id }} >
62
+ #{{renewal.id }}
63
+ </LinkTo >
64
+ </td >
65
+
66
+ <td >{{formatDate renewal.created_at }} </td >
67
+
68
+ <td >
69
+ {{#if renewal.started_at }}
70
+ {{formatDate renewal.started_at }}
71
+ {{else }}
72
+ -
73
+ {{/if }}
74
+ </td >
75
+
76
+ <td >
77
+ {{#if renewal.finished_at }}
78
+ {{formatDate renewal.finished_at }}
79
+ {{else }}
80
+ -
81
+ {{/if }}
82
+ </td >
83
+
84
+ <td ><ProgressLabel @ progress ={{renewal.progress }} /></td >
85
+ <td >
86
+ <ValidityBadge @ validity ={{renewal.validity }} />
87
+ <DetailsCount @ results ={{renewal.validation_details }} />
88
+ </td >
89
+ </tr >
90
+ {{/each }}
91
+ </tbody >
92
+ </table >
93
+ {{/if }}
88
94
</template >
89
95
}
0 commit comments