diff --git a/src/app/dashboard/more-graphs-and-tables.component.ts b/src/app/dashboard/more-graphs-and-tables.component.ts
index 3b702da..546a47f 100644
--- a/src/app/dashboard/more-graphs-and-tables.component.ts
+++ b/src/app/dashboard/more-graphs-and-tables.component.ts
@@ -20,11 +20,14 @@ export class MoreStuffComponent implements OnInit {
isBubbleChartLoaded:boolean = false;
isLineChartLoaded:boolean = false;
isSupplierChartLoaded:boolean = false;
+ wardList: any;
+ wardListAvailable = false;
constructor(
private api: ApiService,
private currencyPipe: CurrencyPipe,
) {
+ this.tableSummary();
this.bubbleChartBegin = moment().format('YYYY-MM-DD');
this.bubbleChartEnd = moment().format('YYYY-MM-DD');
this.lineChartBegin = moment().format('YYYY-MM-DD');
@@ -178,6 +181,21 @@ export class MoreStuffComponent implements OnInit {
return `${value.supplier}: ${this.currencyPipe.transform(value.value, 'GBP', 'symbol', '1.2-2')} over ${value.count} purchases`;
}
+ private tableSummary() {
+ this.api.loadMiscUrl('organisation/external/lcc_tables').subscribe(
+ result => {
+ this.wardList = result.wards;
+ if (this.wardList) {
+ this.wardListAvailable = true;
+ }
+ },
+ error => {
+ console.log('Retrieval Error');
+ console.log( error._body );
+ }
+ )
+ }
+
private loadYearSpend() {
this.api.loadMiscUrl('organisation/external/year_spend').subscribe(
diff --git a/src/app/shared/ward-result.component.html b/src/app/shared/ward-result.component.html
new file mode 100644
index 0000000..1d5246f
--- /dev/null
+++ b/src/app/shared/ward-result.component.html
@@ -0,0 +1,3 @@
+
{{ward.ward}} |
+{{ward.count}} |
+{{ward.sum | currency:'GBP':'symbol':'1.2-2' }} |
diff --git a/src/app/shared/ward-result.component.ts b/src/app/shared/ward-result.component.ts
new file mode 100644
index 0000000..d147f1a
--- /dev/null
+++ b/src/app/shared/ward-result.component.ts
@@ -0,0 +1,19 @@
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+
+interface WardData {
+ ward: string;
+ sum: number;
+ count: number;
+}
+
+@Component({
+ // tslint:disable-next-line
+ selector: '[ward-result]',
+ templateUrl: 'ward-result.component.html',
+})
+export class WardResultComponent implements OnInit {
+ @Input() public ward: WardData;
+
+ ngOnInit(): void {
+ }
+}