Properly fixed categories showing

This commit is contained in:
Finn 2019-07-03 15:11:02 +01:00
parent bc8f024d41
commit 6649888876
No known key found for this signature in database
GPG key ID: 7455B4B17685B598
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> <h4 class="card-title float-left mb-0">All Purchases by Category</h4>
</div><!--/.col--> </div><!--/.col-->
</div><!--/.row--> </div><!--/.row-->
<div *ngIf="shhowTotalCategoryList" class="chart-wrapper"> <div *ngIf="showTotalCategoryList" class="chart-wrapper">
<ul class="icons-list"> <ul class="icons-list">
<!-- New loop --> <!-- New loop -->
<li *ngFor="let category of totalCategoryList | slice:0:totalCategoryLimit; let i=index"> <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.setWeekData(result);
this.setChartData(result.data.cat_total); this.setChartData(result.data.cat_total);
this.totalCategoryList = result.data.cat_list; 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.purchaseEssential = result.data.essentials.purchase_no_essential_total;
this.purchaseNotEssential = result.data.essentials.purchase_no_total - this.purchaseEssential; this.purchaseNotEssential = result.data.essentials.purchase_no_total - this.purchaseEssential;
this.barChartDataEssential = [ this.barChartDataEssential = [