Refactored snippet bar into seperate component

This commit is contained in:
Tom Bloor 2017-09-07 15:12:49 +01:00
parent 1774f2f0d5
commit cfb131b800
8 changed files with 80 additions and 56 deletions

View file

@ -230,19 +230,6 @@ export class ApiService {
).map( response => response.json() );
}
// Fake Breadcrumb data
public breadcrumb_data(data) {
return Observable.of(
{
"customersthismonth" : 196,
"moneyspentthismonth" : 156.02,
"pointstotal" : 506,
"averagetransactiontoday" : 3.69
}
)
}
// Fake chart data to mimic
public graph_data(data) {

View file

@ -0,0 +1,21 @@
import { Injectable } from '@angular/core';
import { ApiService } from './api-service';
import { Observable } from 'rxjs/Rx';
@Injectable()
export class OrgSnippetsService {
private orgSnippetsUrl = '/v1/organisation/snippets';
constructor(private api: ApiService) { }
public getData(): Observable<any> {
return Observable.of(
{
'customersthismonth' : 196,
'moneyspentthismonth' : 156.02,
'pointstotal' : 506,
'averagetransactiontoday' : 3.69
}
);
}
}