Properly fixed categories showing

This commit is contained in:
Finn 2019-07-03 15:11:02 +01:00
parent c6fc58ed1f
commit 6376d570af
2 changed files with 4 additions and 2 deletions

View file

@ -143,7 +143,7 @@
<h4 class="card-title float-left mb-0">All Purchases by Category</h4>
</div><!--/.col-->
</div><!--/.row-->
<div *ngIf="shhowTotalCategoryList" class="chart-wrapper">
<div *ngIf="showTotalCategoryList" class="chart-wrapper">
<ul class="icons-list">
<!-- New loop -->
<li *ngFor="let category of totalCategoryList | slice:0:totalCategoryLimit; let i=index">

View file

@ -148,7 +148,9 @@ export class DashboardCustomerComponent implements OnInit {
this.setWeekData(result);
this.setChartData(result.data.cat_total);
this.totalCategoryList = result.data.cat_list;
this.showTotalCategoryList = true;
if (this.totalCategoryList) {
this.showTotalCategoryList = true;
}
this.purchaseEssential = result.data.essentials.purchase_no_essential_total;
this.purchaseNotEssential = result.data.essentials.purchase_no_total - this.purchaseEssential;
this.barChartDataEssential = [