BROKEN: Added wards table
This commit is contained in:
parent
42e310b36a
commit
0644f366a8
5 changed files with 91 additions and 0 deletions
|
@ -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(
|
||||
|
|
Reference in a new issue