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 @@ +