fixed tslint issues

arabic-version
umasoodch 6 years ago
parent 8f83946c48
commit 05ea5e349f

@ -101,7 +101,7 @@ import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component'; import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component' import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
import {DashboredService} from './services/dashbored/dashbored.service'; import {DashboredService} from './services/dashbored/dashbored.service';
import {NgxGaugeModule} from 'ngx-gauge'; // import {NgxGaugeModule} from 'ngx-gauge';
import { StatsButtonComponent } from './ui/stats-button/stats-button.component'; import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
import { ServicesButtonComponent } from './ui/services-button/services-button.component'; import { ServicesButtonComponent } from './ui/services-button/services-button.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component' import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
@ -125,7 +125,7 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
PdfViewerModule, PdfViewerModule,
NgCircleProgressModule.forRoot(), NgCircleProgressModule.forRoot(),
ChartModule, ChartModule,
NgxGaugeModule // NgxGaugeModule
], ],
declarations: [ declarations: [
FabButtonComponent, FabButtonComponent,
@ -243,7 +243,7 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component';
FileUploderProfileComponent, FileUploderProfileComponent,
AccordinTabCustomComponent, AccordinTabCustomComponent,
AccordinCustomComponent, AccordinCustomComponent,
NgxGaugeModule, // NgxGaugeModule,
StatsButtonComponent, StatsButtonComponent,
ServicesButtonComponent, ServicesButtonComponent,
ConfirmLoginComponent, ConfirmLoginComponent,

@ -37,7 +37,6 @@ export class HomeComponent implements OnInit {
inputDate: string; inputDate: string;
filteredNotificationList: any; filteredNotificationList: any;
isReachEnd = false; isReachEnd = false;
public isAll = true; public isAll = true;
public isPR = false; public isPR = false;
public isPO = false; public isPO = false;
@ -47,11 +46,11 @@ export class HomeComponent implements OnInit {
public isITG = false; public isITG = false;
public isSearch = false; public isSearch = false;
public direction = 'ltr'; public direction = 'ltr';
public ITGCount: number = 0; public ITGCount = 0;
public ITGSegment:{name: string, code:any, data: any, style: boolean} [] =[]; public ITGSegment: {name: string, code: any, data: any, style: boolean} [] = [];
public ITGAllItem: any = []; public ITGAllItem: any = [];
public selectedITGToActive = false; public selectedITGToActive = false;
public ITGItem: any =[] public ITGItem: any = [];
public activeSegment: any; public activeSegment: any;
public currentActiveIndex = 0; public currentActiveIndex = 0;
@ -179,14 +178,14 @@ export class HomeComponent implements OnInit {
} else if (notification.ITEM_TYPE === 'INVMOA') { } else if (notification.ITEM_TYPE === 'INVMOA') {
this.filters[4].value = notification.OPEN_NTF_NUMBER; this.filters[4].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
}else if (notification.ITEM_TYPE === 'ITG') { } else if (notification.ITEM_TYPE === 'ITG') {
this.filters[5].value = notification.OPEN_NTF_NUMBER; this.filters[5].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER;
} }
} }
} }
activeFilter(index: number) { activeFilter(index: number) {
if (this.currentActiveIndex !== index) { if (this.currentActiveIndex !== index) {
@ -269,7 +268,7 @@ export class HomeComponent implements OnInit {
this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : ''; this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3') this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
? moment(this.inputDate).format('DD-MMM-YYYY') : ''; ? moment(this.inputDate).format('DD-MMM-YYYY') : '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : '';; this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; ;
this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : ''; this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : '';
this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1'; this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1';
if (this.selectedValue === '5') { if (this.selectedValue === '5') {
@ -399,8 +398,13 @@ export class HomeComponent implements OnInit {
Count() { Count() {
this.workListService.getITGCount() this.workListService.getITGCount()
.subscribe((result: any) => { .subscribe((result: any) => {
for(let i= 0; i< result.RequestType.length; i++){ for (let i = 0; i < result.RequestType.length; i++) {
this.ITGSegment[i] = {name: result.RequestType[i].RequestTypeName, code: result.RequestType[i].RequestTypeCode, data:result.RequestType[i].RequestDetails, style: false}; this.ITGSegment[i] = {
name: result.RequestType[i].RequestTypeName,
code: result.RequestType[i].RequestTypeCode,
data: result.RequestType[i].RequestDetails,
style: false
};
} }
}); });
} }
@ -427,26 +431,27 @@ export class HomeComponent implements OnInit {
this.isSearch = !this.isSearch; this.isSearch = !this.isSearch;
} }
setActive(selectedSegment){ setActive(selectedSegment) {
this.ITGItem =[]; this.ITGItem = [];
let count=0; let count = 0;
this.activeSegment = selectedSegment; this.activeSegment = selectedSegment;
for(let i =0; i< this.ITGSegment.length; i++){ // tslint:disable-next-line: prefer-for-of
if(this.ITGSegment[i].code === selectedSegment){ for (let i = 0; i < this.ITGSegment.length; i++) {
if (this.ITGSegment[i].code === selectedSegment) {
this.ITGSegment[i].style = true; this.ITGSegment[i].style = true;
this.ITGItem[count] = this.ITGSegment[i].data; this.ITGItem[count] = this.ITGSegment[i].data;
count++; count++;
}else{ } else {
this.ITGSegment[i].style = false; this.ITGSegment[i].style = false;
} }
} }
} }
openITG(segmentInfo){ openITG(segmentInfo) {
this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO); this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO);
this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME); this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME);
this.common.sharedService.setSharedData(this.ITGItem,HomeComponent.ALL_REQUEST); this.common.sharedService.setSharedData(this.ITGItem, HomeComponent.ALL_REQUEST);
this.common.openWorklistITGPage(); this.common.openWorklistITGPage();
} }
} }

Loading…
Cancel
Save