Added more data to dashboard view

This commit is contained in:
piratefinn 2017-07-05 18:08:23 +01:00
parent 2e1439f435
commit e8dcd22ead
3 changed files with 218 additions and 37 deletions

View file

@ -102,25 +102,42 @@ export class ApiService {
public graph_data(data) {
return Observable.of(
{
// graphstoshow is on server and changes every hour, listing what graphs to display
"graphstoshow" :
{
customersthisweekgraph : true,
customerslastweekgraph : false,
pointsthisweekgraph : true,
pointslastweekgraph : false,
},
"customersthisweek" :
{
day : ['Monday', 'tuesday','wednesday','thursday','friday','saturday','sunday'],
customerno : [1,2,3,4,5,6,7],
},
"customerslastweek" :
{
day : ['Monday', 'tuesday','wednesday','thursday','friday','saturday','sunday'],
customerno : [7,6,5,4,3,2,1],
},
// graphstoshow is on server and changes every hour, listing what graphs to display
"graphstoshow" :
{
customersthisweekgraph : true,
customerslastweekgraph : true,
customerslastmonthgraph : true,
customerslastyeargraph : true,
percentofcustomerssectorgraph : true,
pointsthisweekgraph : true,
pointslastweekgraph : true,
},
"customersthisweek" :
{
day : ['Monday', 'tuesday','wednesday','thursday','friday','saturday','sunday'],
customerno : [1,2,3,4,5,6,7],
},
"customerslastweek" :
{
day : ['Monday', 'tuesday','wednesday','thursday','friday','saturday','sunday'],
customerno : [7,6,5,4,3,2,1],
},
// can take differing size arrays, so any month works. Example here is for April
"customerslastmonth" :
{
day : ['April 1','April 2','April 3','April 4','April 5','April 6','April 7','April 8',
'April 9','April 10','April 11','April 12','April 13','April 14','April 15','April 16',
'April 17','April 18','April 19','April 20','April 21','April 22','April 23','April 24',
'April 25','April 26','April 27','April 28','April 29','April 30'],
customerno : [7,6,5,4,3,2,1,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],
},
"customerslastyear" :
{
day : ['January','February','March','April','May','June','July','August','September','October','November','December'],
customerno : [7,6,5,4,3,2,1,8,9,10,11,12],
},
percentofcustomerssector : 76,
"pointsthisweek" :
{
day : ['Monday', 'tuesday','wednesday','thursday','friday','saturday','sunday'],