diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 13add5f0..c26fd2c5 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -638,33 +638,35 @@ export class HomeComponent implements OnInit { this.ITGItem = []; this.workListService.getITGCount('', '', this.isPostNoLoad) .subscribe((result: any) => { - if (result.RequestType.length > 0) { - this.ITGSegment[0] = { - name: 'All', - code: 'All', - data: null, - style: false - }; - this.ITGSegment[0].data = datas; - this.ITGSegment[0].names = names; - this.setActive(this.ITGSegment[0].code); - } - console.log(result.RequestType); - let count = 1; - for (let i = 0; i < result.RequestType.length; i++) { - console.log() - this.ITGSegment[count] = { - name: result.RequestType[i].RequestTypeName, - code: result.RequestType[i].RequestTypeCode, - data: result.RequestType[i].RequestDetails, - style: false - }; - datas[i] = result.RequestType[i].RequestDetails; - names[i] = result.RequestType[i].RequestTypeCode; - count++; + if (result.RequestType) { + if (result.RequestType.length > 0) { + this.ITGSegment[0] = { + name: 'All', + code: 'All', + data: null, + style: false + }; + this.ITGSegment[0].data = datas; + this.ITGSegment[0].names = names; + this.setActive(this.ITGSegment[0].code); + } + console.log(result.RequestType); + let count = 1; + for (let i = 0; i < result.RequestType.length; i++) { + console.log() + this.ITGSegment[count] = { + name: result.RequestType[i].RequestTypeName, + code: result.RequestType[i].RequestTypeCode, + data: result.RequestType[i].RequestDetails, + style: false + }; + datas[i] = result.RequestType[i].RequestDetails; + names[i] = result.RequestType[i].RequestTypeCode; + count++; + } + //this.sortArrayOfAll(this.ITGSegment[0].data) + console.log(this.ITGSegment); } - //this.sortArrayOfAll(this.ITGSegment[0].data) - console.log(this.ITGSegment); }); } diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html index d6286590..e7dec45b 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html @@ -112,10 +112,15 @@
{{'worklist, loading'| translate}} ![]()
{{'worklist, loading'| translate}} ![]()
{{ 'general, empty' | translate}}
{{'worklist, loading'| translate}} ![]()
{{'worklist, loading'| translate}} ![]()
{{ 'general, empty' | translate}}
-{{ 'general, empty' | translate}}
+