@ -76,6 +76,7 @@ export class HomeComponent implements OnInit {
public totalPR = 0 ;
public totalMR = 0 ;
public totalIC = 0 ;
public totalStamp = 0 ;
public showChart = false ;
@ -88,16 +89,17 @@ export class HomeComponent implements OnInit {
public data = {
datasets : [
{
data : [ 0 , 0 , 0 , 0 , 0 , 0 ],
data : [ 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
backgroundColor : [
'#18a169' ,
'#3cb9d5' ,
'#114475' ,
'#38c9b3' ,
'#cc3232' ,
'#9e7e97'
'#9e7e97' ,
'#ff9800'
] ,
borderWidth : 5
borderWidth : 6
} ]
} ;
public filters = [
@ -156,6 +158,14 @@ export class HomeComponent implements OnInit {
color : '#9e7e97' ,
key : 'INVITEM' ,
disable : false
} ,
{
value : 0 ,
name : 'STAMP' ,
active : false ,
color : '#ff9800' ,
key : 'STAMP' ,
disable : false
}
] ;
@ -264,6 +274,10 @@ export class HomeComponent implements OnInit {
this . data . datasets [ 0 ] . data [ 5 ] = 0 ;
}
if ( this . totalStamp === 0 ) {
this . data . datasets [ 0 ] . data [ 6 ] = 0 ;
}
const openNotificationsArray = this . worklistNotifications . GetOpenNotificationsList ;
for ( const notification of openNotificationsArray ) {
@ -282,6 +296,9 @@ export class HomeComponent implements OnInit {
} else if ( notification . ITEM_TYPE === 'INVITEM' ) {
this . filters [ 6 ] . value = this . totalIC ;
this . data . datasets [ 0 ] . data [ 5 ] = notification . OPEN_NTF_NUMBER ;
} else if ( notification . ITEM_TYPE === 'STAMP' ) {
this . filters [ 7 ] . value = this . totalStamp ;
this . data . datasets [ 0 ] . data [ 6 ] = notification . OPEN_NTF_NUMBER ;
}
}
// this.data.datasets[0].data[4] = this.ITGCount;
@ -440,6 +457,8 @@ export class HomeComponent implements OnInit {
this . totalMR = this . totalMR + 1 ;
} else if ( workList . ITEM_TYPE === 'INVITEM' ) {
this . totalIC = this . totalIC + 1 ;
} else if ( workList . ITEM_TYPE === 'STAMP' ) {
this . totalStamp = this . totalStamp + 1 ;
}
}