2017-08-31 16:06:47 +01:00
import { Directive , Component , OnInit } from '@angular/core' ;
import { ApiService } from '../providers/api-service' ;
import { Router } from '@angular/router' ;
import { GraphWidget } from '../widgets/graph-widget.component' ;
2017-12-12 15:10:44 +00:00
import { CustBarSnippetComponent } from '../snippets/cust-snippet-bar.component' ;
2017-12-13 12:37:11 +00:00
import { PiePanel } from '../panels/pie-panel.component' ;
2017-12-12 15:10:44 +00:00
import { DataType } from '../shared/data-types.enum' ;
2017-08-31 16:06:47 +01:00
@Component ( {
2017-08-31 18:44:17 +01:00
templateUrl : 'dashboard-customer.component.html'
2017-08-31 16:06:47 +01:00
} )
2017-08-31 18:44:17 +01:00
export class DashboardCustomerComponent implements OnInit {
/* Setting up dashboard's main variables*/
name : any ;
2017-09-19 15:04:49 +01:00
email : any ;
2017-08-31 18:44:17 +01:00
myPearPoints : any ;
trends : any ;
myRank : any ;
username : any ;
2017-12-13 12:37:11 +00:00
// PolarArea
public polarAreaChartLabels : string [ ] = [ 'Local' , 'Not Local' ] ;
public polarAreaChartData : number [ ] = [ 400 , 100 ] ;
public polarAreaLegend = true ;
public polarAreaChartType = 'polarArea' ;
2017-12-12 15:10:44 +00:00
public widgetList = [
{
type : 'graph' ,
name : 'total_last_week' ,
icon : 'icon-diamond' ,
title : 'Last Week Total' ,
dataType : DataType.currency ,
} ,
{
type : 'graph' ,
name : 'avg_spend_last_week' ,
icon : 'icon-diamond' ,
title : 'Last Week Avg. Spend' ,
dataType : DataType.currency ,
} ,
{
type : 'graph' ,
name : 'total_last_month' ,
title : 'Last Month Total' ,
dataType : DataType.currency ,
} ,
{
type : 'graph' ,
name : 'avg_spend_last_month' ,
title : 'Last Month Avg. Spend' ,
dataType : DataType.currency ,
} ,
] ;
2017-08-31 16:06:47 +01:00
constructor (
private api : ApiService ,
) {
}
ngOnInit ( ) : void {
}
}