From b18943c26885de4471d7d83663d75ffe71380601 Mon Sep 17 00:00:00 2001 From: piratefinn Date: Wed, 17 Jan 2018 15:02:32 +0000 Subject: [PATCH 01/10] removed unused button on pie --- src/app/panels/pie-panel.component.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/app/panels/pie-panel.component.html b/src/app/panels/pie-panel.component.html index 7e2dd4a..5a6376b 100644 --- a/src/app/panels/pie-panel.component.html +++ b/src/app/panels/pie-panel.component.html @@ -4,15 +4,6 @@

All Purchases

-
- -
Date: Wed, 17 Jan 2018 15:02:53 +0000 Subject: [PATCH 02/10] added just in case for font loading file attribute --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index bdb0cab..60dd516 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,3 +15,9 @@ *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain + +# ensures font files are loaded as binary not text +*.ttf binary +*.eot binary +*.woff binary +*.woff2 binary From 45eb7cb7a11860aee7b3469ffc825ce634a67c11 Mon Sep 17 00:00:00 2001 From: piratefinn Date: Wed, 17 Jan 2018 17:36:28 +0000 Subject: [PATCH 03/10] added new category transaction listing page --- .../dashboard/category-month.component.html | 33 +++++++++++++++ src/app/dashboard/category-month.component.ts | 40 +++++++++++++++++++ src/app/dashboard/dashboard.module.ts | 2 + src/app/dashboard/dashboard.routing.ts | 6 +++ src/app/layouts/full-layout.component.html | 8 ++++ src/app/providers/api-service.ts | 11 +++++ 6 files changed, 100 insertions(+) create mode 100644 src/app/dashboard/category-month.component.html create mode 100644 src/app/dashboard/category-month.component.ts diff --git a/src/app/dashboard/category-month.component.html b/src/app/dashboard/category-month.component.html new file mode 100644 index 0000000..a1f0b30 --- /dev/null +++ b/src/app/dashboard/category-month.component.html @@ -0,0 +1,33 @@ +
+
+
+
+
+
+
+

Purchases this week

+
+
+
+
    +
  • + Placeholder Category + {{ (weekPurchaseList.first || 0 ) }} + ({{ (weekPurchaseList.first || 0 ) / weekPurchaseList.max | percent:'1.0-0' }}) +
    +
    +
    +
    +
    +
  • +
  • + +
  • +
+
+
+
+
+
+
diff --git a/src/app/dashboard/category-month.component.ts b/src/app/dashboard/category-month.component.ts new file mode 100644 index 0000000..cf83e6d --- /dev/null +++ b/src/app/dashboard/category-month.component.ts @@ -0,0 +1,40 @@ +import { Directive, Component, OnInit } from '@angular/core'; +import { ApiService } from '../providers/api-service'; +import { DataType } from '../shared/data-types.enum'; + +@Component({ + templateUrl: 'category-month.component.html' +}) +export class CategoryMonthComponent implements OnInit { + + disableCategoryButtonFirst: boolean = false; + + weekPurchaseList = { + first: 0, + }; + + categoryList: number[] = []; + categoryLimitFirst: number = 10; + + constructor( + private api: ApiService, + ) { + this.api.categoryTransactionList().subscribe( + result => { + console.log(result); + }, + error => { + console.log('Retrieval Error'); + console.log( error._body ); + } + ); + } + + public loadMore () { + this.disableCategoryButtonFirst = true; + this.categoryLimitFirst = 100; + } + + ngOnInit(): void { + } +} diff --git a/src/app/dashboard/dashboard.module.ts b/src/app/dashboard/dashboard.module.ts index d6fcfca..2e47f80 100644 --- a/src/app/dashboard/dashboard.module.ts +++ b/src/app/dashboard/dashboard.module.ts @@ -16,6 +16,7 @@ import { AccountEditComponent } from './account-edit.component'; import { AddDataComponent } from './add-data.component'; import { FeedbackComponent } from './feedback.component'; import { TransactionLogComponent } from './transaction-log.component'; +import { CategoryMonthComponent } from './category-month.component'; import { PayrollLogComponent } from './payroll-log.component'; import { LeaderboardComponent } from './leaderboard.component'; import { MapComponent } from './map.component'; @@ -61,6 +62,7 @@ import { environment } from '../../environments/environment'; OrgResultComponent, OrgTableComponent, TransactionLogComponent, + CategoryMonthComponent, TransactionResultComponent, PayrollLogComponent, PayrollResultComponent, diff --git a/src/app/dashboard/dashboard.routing.ts b/src/app/dashboard/dashboard.routing.ts index 46b9df3..90cb277 100644 --- a/src/app/dashboard/dashboard.routing.ts +++ b/src/app/dashboard/dashboard.routing.ts @@ -12,6 +12,7 @@ import { AccountEditComponent } from './account-edit.component'; import { AddDataComponent } from './add-data.component'; import { FeedbackComponent } from './feedback.component'; import { TransactionLogComponent } from './transaction-log.component'; +import { CategoryMonthComponent } from './category-month.component'; import { PayrollLogComponent } from './payroll-log.component'; import { LeaderboardComponent } from './leaderboard.component'; import { MapComponent } from './map.component'; @@ -58,6 +59,11 @@ const routes: Routes = [ component: TransactionLogComponent, data: { title: 'Transaction Log' }, }, + { + path: 'category-month', + component: CategoryMonthComponent, + data: { title: 'Month Category' }, + }, { path: 'map', component: MapComponent, diff --git a/src/app/layouts/full-layout.component.html b/src/app/layouts/full-layout.component.html index 8a205f9..40d7c98 100644 --- a/src/app/layouts/full-layout.component.html +++ b/src/app/layouts/full-layout.component.html @@ -81,6 +81,14 @@
+
-
  • +
  • @@ -53,7 +53,7 @@
    -
  • +
  • @@ -84,7 +84,7 @@
    -
  • +
  • @@ -115,7 +115,7 @@
    -
  • +
  • diff --git a/src/app/dashboard/category-month.component.ts b/src/app/dashboard/category-month.component.ts index 40fbbdb..1e20a3e 100644 --- a/src/app/dashboard/category-month.component.ts +++ b/src/app/dashboard/category-month.component.ts @@ -18,10 +18,10 @@ export class CategoryMonthComponent implements OnInit { first: 0, }; - weekList1 = {}; - weekList2 = {}; - weekList3 = {}; - weekList4 = {}; + weekList1 = []; + weekList2 = []; + weekList3 = []; + weekList4 = []; categoryList: number[] = []; dayList: any[] = []; @@ -32,7 +32,7 @@ export class CategoryMonthComponent implements OnInit { myWeek4: any; categoryIdList: number[] = []; categoryNameList: string[] = []; - categoryLimit1: number = 6; + categoryLimit1: number = 2; categoryLimit2: number = 6; categoryLimit3: number = 6; categoryLimit4: number = 6; diff --git a/src/app/dashboard/dashboard-customer.component.html b/src/app/dashboard/dashboard-customer.component.html index 46310d0..e8019a4 100644 --- a/src/app/dashboard/dashboard-customer.component.html +++ b/src/app/dashboard/dashboard-customer.component.html @@ -94,7 +94,7 @@ {{ sectorPurchases[i] || 'N/A' }} -
  • +
  • From d674c5b59be18650300af9c4abae45a2ec098680 Mon Sep 17 00:00:00 2001 From: piratefinn Date: Wed, 24 Jan 2018 13:18:51 +0000 Subject: [PATCH 10/10] list fully finished --- .../dashboard/category-month.component.html | 30 ++++++++--------- src/app/dashboard/category-month.component.ts | 33 ++++++++++++++----- src/app/dashboard/dashboard.routing.ts | 2 +- src/app/layouts/full-layout.component.html | 2 +- 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/src/app/dashboard/category-month.component.html b/src/app/dashboard/category-month.component.html index ac5ba47..5b5434d 100644 --- a/src/app/dashboard/category-month.component.html +++ b/src/app/dashboard/category-month.component.html @@ -12,12 +12,12 @@