diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index fc4f266c..d0aae37b 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -75,6 +75,8 @@ export class HomeComponent implements OnInit { public totalPO = 0; public totalPR = 0; public totalMR = 0; + public totalIC = 0; + public showChart = false; public isPostNoLoad = true; @@ -86,13 +88,14 @@ export class HomeComponent implements OnInit { public data = { datasets: [ { - data: [0, 0, 0, 0, 0], + data: [0, 0, 0, 0, 0, 0], backgroundColor: [ '#18a169', '#38c9b3', '#114475', '#3cb9d5', - '#cc3232' + '#cc3232', + '#9e7e97' ], borderWidth: 5 }] @@ -145,6 +148,14 @@ export class HomeComponent implements OnInit { color: '#cc3232', key: 'ITG', disable: false + }, + { + value: 0, + name: 'IC', + active: false, + color: '#9e7e97', + key: 'INVITEM', + disable: false } ]; public slideOptsOne = { @@ -226,6 +237,7 @@ export class HomeComponent implements OnInit { this.filters[2].value = this.totalPO; this.filters[3].value = this.totalPR; this.filters[4].value = this.totalMR; + this.filters[5].value = this.totalIC; if (this.totalHR === 0) { this.data.datasets[0].data[0] = 0; @@ -243,6 +255,10 @@ export class HomeComponent implements OnInit { this.data.datasets[0].data[3] = 0; } + if (this.totalIC === 0) { + this.data.datasets[0].data[5] = 0; + } + const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; for (const notification of openNotificationsArray) { @@ -258,6 +274,9 @@ export class HomeComponent implements OnInit { } else if (notification.ITEM_TYPE === 'INVMOA') { this.filters[4].value = this.totalMR; this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; + } else if (notification.ITEM_TYPE === 'INVITEM') { + this.filters[6].value = this.totalIC; + this.data.datasets[0].data[5] = notification.OPEN_NTF_NUMBER; } } // this.data.datasets[0].data[4] = this.ITGCount; @@ -414,6 +433,8 @@ export class HomeComponent implements OnInit { this.totalPR = this.totalPR + 1; } else if (workList.ITEM_TYPE === 'INVMOA') { this.totalMR = this.totalMR + 1; + } else if (workList.ITEM_TYPE === 'INVITEM') { + this.totalIC = this.totalIC + 1; } } @@ -422,6 +443,7 @@ export class HomeComponent implements OnInit { this.totalPO = 0; this.totalPR = 0; this.totalMR = 0; + this.totalIC = 0; const datePipe = new DatePipe('en-US'); const formattedData = [];