Skip to content

Commit

Permalink
#1641 Add a no data message if no stats data are available
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani authored and To-om committed Nov 13, 2020
1 parent 02129b9 commit df06aa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/app/views/components/list/stats-item.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ <h3 class="box-title">{{$cmp.title}}</h3>
</div>
</div>
<div class="box-body">
<div class="empty-message" ng-if="!$cmp.data || ($cmp.data.length === 0)">
No Data
</div>
<table ng-if="$cmp.mode === 'table'" class="table table-condensed">
<tr ng-repeat="item in $cmp.data">
<td class="active">{{$cmp.labels[item.key] || item.key}}</td>
Expand All @@ -17,7 +20,7 @@ <h3 class="box-title">{{$cmp.title}}</h3>
</td>
</tr>
</table>
<donut-Chart ng-if="$cmp.mode === 'chart'" labels="$cmp.labels" data="$cmp.data" title="Cases by Status"
<donut-Chart ng-if="$cmp.mode === 'chart' && $cmp.data.length > 0" labels="$cmp.labels" data="$cmp.data" title="Cases by Status"
on-item-clicked="$cmp.onClick(value)"></donut-chart>
</div>
</div>

0 comments on commit df06aa1

Please sign in to comment.