From 180a854c60c9e739c570efae1065eadf178f3805 Mon Sep 17 00:00:00 2001 From: piratefinn Date: Mon, 12 Mar 2018 17:35:18 +0000 Subject: [PATCH] emergency fix for category viewing on purchase --- src/app/dashboard/add-data.component.html | 4 ++-- src/app/dashboard/add-data.component.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/dashboard/add-data.component.html b/src/app/dashboard/add-data.component.html index a756040..329c7d9 100644 --- a/src/app/dashboard/add-data.component.html +++ b/src/app/dashboard/add-data.component.html @@ -85,13 +85,13 @@
- +
- +
diff --git a/src/app/dashboard/add-data.component.ts b/src/app/dashboard/add-data.component.ts index b562721..99a1df4 100644 --- a/src/app/dashboard/add-data.component.ts +++ b/src/app/dashboard/add-data.component.ts @@ -44,7 +44,8 @@ export class AddDataComponent implements OnInit { minDate: any; leftCategoryIdList: number[] = []; rightCategoryIdList: number[] = []; - categoryNameList: string[] = []; + leftCategoryNameList: number[] = []; + rightCategoryNameList: number[] = []; constructor( private formBuilder: FormBuilder, @@ -90,10 +91,12 @@ export class AddDataComponent implements OnInit { private setCategoryList(data: any) { let categoryIdList = Object.keys(data.ids).map(key => data.ids[key]); - this.categoryNameList = Object.keys(data.names).map(key => data.names[key]); + let categoryNameList = Object.keys(data.names).map(key => data.names[key]); let halfLength = Math.floor(categoryIdList.length / 2); this.leftCategoryIdList = categoryIdList.splice(0, halfLength); + this.leftCategoryNameList = categoryNameList.splice(0, halfLength); this.rightCategoryIdList = categoryIdList; + this.rightCategoryNameList = categoryNameList; } getMinDate() {