diff --git a/src/app/dashboard/dashboard-customer.component.html b/src/app/dashboard/dashboard-customer.component.html
index 133719e..7f650f0 100644
--- a/src/app/dashboard/dashboard-customer.component.html
+++ b/src/app/dashboard/dashboard-customer.component.html
@@ -164,34 +164,5 @@
-
-
-
-
-
-
All Purchases by Sector
-
-
-
-
-
- -
-
-
-
{{ sectorNames [sector] || 'N/A' }}
-
-
-
Bought
-
{{ sectorPurchases[i] || 'N/A' }}
-
-
- - sectorLimit && disableSectorButton == false" class="divider text-center">
-
-
-
-
-
-
-
diff --git a/src/app/dashboard/dashboard-customer.component.ts b/src/app/dashboard/dashboard-customer.component.ts
index f6abd47..ab40f2b 100644
--- a/src/app/dashboard/dashboard-customer.component.ts
+++ b/src/app/dashboard/dashboard-customer.component.ts
@@ -23,7 +23,6 @@ export class DashboardCustomerComponent implements OnInit {
username: any;
maxPurchase: number = 0;
- disableSectorButton: boolean = false;
disableCategoryButton: boolean = false;
public chartType = 'doughnut';
@@ -173,12 +172,9 @@ export class DashboardCustomerComponent implements OnInit {
U: 'bg-primary',
}
- sectorLetters: string[] = [];
- sectorPurchases: number[] = [];
- sectorLimit: number = 10;
+ showTotalCategoryList: boolean = false;
totalCategoryLimit: number = 10;
totalCategoryList: any;
- sectorList: any;
// Graph widgets
public widgetList = [
@@ -218,11 +214,10 @@ export class DashboardCustomerComponent implements OnInit {
this.api.customerStats().subscribe(
result => {
this.setWeekPurchaseList(result.weeks);
- this.setSectorList(result.sectors);
this.setWeekData(result);
this.setChartData(result.data.cat_total);
this.totalCategoryList = result.data.cat_list;
- console.log(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 = [
@@ -277,16 +272,6 @@ export class DashboardCustomerComponent implements OnInit {
};
}
- public setSectorList (data: any) {
- this.sectorLetters = Object.keys(data.sectors).map(key => data.sectors[key]);
- this.sectorPurchases = Object.keys(data.purchases).map(key => data.purchases[key]);
- }
-
- private sectorLoadMore () {
- this.disableSectorButton = true;
- this.sectorLimit = 22;
- }
-
private categoryLoadMore () {
this.disableCategoryButton = true;
this.totalCategoryLimit = 30;