From 664988887648fd4095f690eeb856f2ca98890f48 Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 3 Jul 2019 15:11:02 +0100 Subject: [PATCH] Properly fixed categories showing --- src/app/dashboard/dashboard-customer.component.html | 2 +- src/app/dashboard/dashboard-customer.component.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/dashboard/dashboard-customer.component.html b/src/app/dashboard/dashboard-customer.component.html index 2282d20..07838a1 100644 --- a/src/app/dashboard/dashboard-customer.component.html +++ b/src/app/dashboard/dashboard-customer.component.html @@ -143,7 +143,7 @@

All Purchases by Category

-
+
  • diff --git a/src/app/dashboard/dashboard-customer.component.ts b/src/app/dashboard/dashboard-customer.component.ts index 5b0cb04..6c8cd77 100644 --- a/src/app/dashboard/dashboard-customer.component.ts +++ b/src/app/dashboard/dashboard-customer.component.ts @@ -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 = [