push to merge with worklist work

itg-new-design
enadhilal 6 years ago
parent 5208584999
commit b27f976bc9

File diff suppressed because it is too large Load Diff

@ -38,7 +38,7 @@
"@ionic-native/file": "^5.18.0", "@ionic-native/file": "^5.18.0",
"@ionic-native/file-path": "^5.18.0", "@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.18.0", "@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.19.1", "@ionic-native/firebase-x": "^5.21.5",
"@ionic-native/geolocation": "^5.10.0", "@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0", "@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0", "@ionic-native/health": "^5.4.0",
@ -83,7 +83,7 @@
"cordova-plugin-file": "^6.0.2", "cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6", "cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0", "cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^7.0.1", "cordova-plugin-firebasex": "^7.0.2",
"cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0", "cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0", "cordova-plugin-inappbrowser": "^3.1.0",

@ -1172,6 +1172,9 @@ public getMonthNameAr(value: number): string {
public openWorklistMainMRPage() { public openWorklistMainMRPage() {
this.nav.navigateForward(['/notification/worklist-main-MR']); this.nav.navigateForward(['/notification/worklist-main-MR']);
} }
public openWorklistITGPage() {
this.nav.navigateForward(['/notification/worklist-main-ITG']);
}
public openMySpecialistPage() { public openMySpecialistPage() {
this.nav.navigateForward(['/my-specialist/home']); this.nav.navigateForward(['/my-specialist/home']);
} }

@ -50,7 +50,19 @@
</ion-row> </ion-row>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''"> <ion-row *ngIf='selectedFilter === "ITG"'>
<ion-col>
<ion-slides>
<ion-slide class='slideCss' *ngFor="let segment of ITGSegment">
<span [ngClass]="segment.style? 'text-span-active': 'text-span'" (click)="setActive(segment.name)">
{{segment.name}}
</span>
</ion-slide>
</ion-slides>
</ion-col>
</ion-row>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf='selectedFilter != "ITG"'>
<div *ngFor="let data of showFormattedData | keyvalue; let i = index"> <div *ngFor="let data of showFormattedData | keyvalue; let i = index">
<span class="date-span">{{data.key}}</span> <span class="date-span">{{data.key}}</span>
<div class="date-data" *ngFor="let workList of data.value; let j = index"> <div class="date-data" *ngFor="let workList of data.value; let j = index">
@ -58,9 +70,24 @@
</div> </div>
</div> </div>
</div> </div>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf="selectedFilter == 'ITG'" >
<div *ngFor='let segmentInfo of ITGItem[0]; let i= index' (click)='openITG(segmentInfo)'>
<span class="date-span">{{segmentInfo.ModifiedDate |date}}</span>
<div class="date-data">
<p>{{segmentInfo.Title}}</p>
</div>
</div>
</div>
<div class="no-data-available" *ngIf="!isEmptyObject()"> <div class="no-data-available" *ngIf="!isEmptyObject()">
<span>No Data Available</span> <span>No Data Available</span>
</div> </div>
</div>
<div>
</div> </div>
<ion-infinite-scroll *ngIf="selectedFilter === 'ALL'" (ionInfinite)="doInfinite($event)"> <ion-infinite-scroll *ngIf="selectedFilter === 'ALL'" (ionInfinite)="doInfinite($event)">

@ -390,3 +390,25 @@ ion-content {
pointer-events: none; pointer-events: none;
opacity: .3; opacity: .3;
} }
.text-span{
font-size: 14px;
color: #888;
background-color: white;
width: 93%;
height: 30px;
border: 1px solid;
border-radius: 15px;
}
.text-span-active{
font-size: 14px;
color: #888;
background-color:#22c6b3;
width: 93%;
height: 30px;
border: 1px solid;
border-radius: 15px;
}
.slideCss{
width: 200px !important;
}

@ -45,6 +45,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 ITGSegment:{name: string, data: any, style: boolean} [] =[];
public ITGAllItem: any = [];
public selectedITGToActive = false;
public ITGItem: any =[]
public currentActiveIndex = 0; public currentActiveIndex = 0;
public previousActiveIndex = 0; public previousActiveIndex = 0;
@ -150,6 +155,8 @@ export class HomeComponent implements OnInit {
// this.direction = TranslatorService.getCurrentDirection(); // this.direction = TranslatorService.getCurrentDirection();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.Details();
this.Count();
this.assignDataToFilters(); this.assignDataToFilters();
this.getAllPushNotificationFun(); this.getAllPushNotificationFun();
} }
@ -228,7 +235,6 @@ export class HomeComponent implements OnInit {
componentProps: {} componentProps: {}
}); });
modal.onDidDismiss().then(result => { modal.onDidDismiss().then(result => {
console.log(result.data);
if (result.data) { if (result.data) {
if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') { if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
this.showSearchButton = true; this.showSearchButton = true;
@ -320,7 +326,6 @@ export class HomeComponent implements OnInit {
this.newWorkListResponse = this.newWorkListResponse.concat(result); this.newWorkListResponse = this.newWorkListResponse.concat(result);
} }
this.newWorkListResponse = this.sortArray(this.newWorkListResponse); this.newWorkListResponse = this.sortArray(this.newWorkListResponse);
console.log(this.newWorkListResponse);
this.allFormattedData = this.categorizeData(this.newWorkListResponse); this.allFormattedData = this.categorizeData(this.newWorkListResponse);
this.showFormattedData = this.allFormattedData; this.showFormattedData = this.allFormattedData;
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
@ -330,7 +335,6 @@ export class HomeComponent implements OnInit {
} }
openNotificationDetail(obj) { openNotificationDetail(obj) {
console.log(obj);
this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA); this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
// this.common.openWorklistMainPage(); // this.common.openWorklistMainPage();
if (obj.REQUEST_TYPE === 'PR') { if (obj.REQUEST_TYPE === 'PR') {
@ -346,7 +350,7 @@ export class HomeComponent implements OnInit {
} }
isEmptyObject() { isEmptyObject() {
return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0)); return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0) || this.ITGItem.length > 0);
} }
clearSearch() { clearSearch() {
@ -394,8 +398,9 @@ export class HomeComponent implements OnInit {
Count() { Count() {
this.workListService.getITGCount() this.workListService.getITGCount()
.subscribe((result: any) => { .subscribe((result: any) => {
console.log('ENAD ITG COUNT:'); for(let i= 0; i< result.RequestType.length; i++){
console.log(result); this.ITGSegment[i] = {name: result.RequestType[i].RequestTypeName, data:result.RequestType[i].RequestDetails, style: false};
}
}); });
} }
@ -437,8 +442,7 @@ export class HomeComponent implements OnInit {
Details() { Details() {
this.workListService.getITGDetails() this.workListService.getITGDetails()
.subscribe((result: any) => { .subscribe((result: any) => {
console.log('ENAD ITG Details:'); this.filters[5].value = result.TotalCount;
console.log(result);
}); });
} }
@ -455,4 +459,24 @@ export class HomeComponent implements OnInit {
searchBtn() { searchBtn() {
this.isSearch = !this.isSearch; this.isSearch = !this.isSearch;
} }
setActive(selectedSegment){
this.ITGItem =[];
let count=0;
for(let i =0; i< this.ITGSegment.length; i++){
if(this.ITGSegment[i].name === selectedSegment){
this.ITGSegment[i].style = true;
this.ITGItem[count] = this.ITGSegment[i].data;
count++;
}else{
this.ITGSegment[i].style = false;
}
}
}
openITG(segmentInfo){
console.log(segmentInfo);
this.common.openWorklistITGPage();
}
} }

@ -26,6 +26,7 @@ import { ItemHistoryComponent } from './item-history/item-history.component';
import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis.component'; import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis.component';
import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component'; import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component';
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component'; import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component';
import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component'; // import { WorklistMainComponent } from './worklist-main/worklist-main.component';
@ -100,6 +101,10 @@ const routes: Routes = [
{ {
path: 'worklist-main-MR', path: 'worklist-main-MR',
component: WorklistMainMRComponent component: WorklistMainMRComponent
},
{
path: 'worklist-main-ITG',
component: WorkListMainItgComponent
} }
] ]
} }
@ -131,7 +136,8 @@ const routes: Routes = [
ItemHistoryComponent, ItemHistoryComponent,
QutationAnalysisComponent, QutationAnalysisComponent,
WorklistMainMRComponent, WorklistMainMRComponent,
WorklistAdvancedSearchComponent WorklistAdvancedSearchComponent,
WorkListMainItgComponent
// WorklistMainComponent // WorklistMainComponent
], ],
entryComponents: [ entryComponents: [

@ -44,9 +44,9 @@ export class WorklistMainService {
public static getQutationAnalysisUrl = public static getQutationAnalysisUrl =
"Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS"; "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
public static getITGFormTaskCount = public static getITGFormTaskCount =
'http://10.80.100.124:7086/Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
public static getITGFormTaskDetails = public static getITGFormTaskDetails =
'http://10.80.100.124:7086/Services/COCWS.svc/REST/ITGFormsPendingTasks'; 'Services/COCWS.svc/REST/ITGFormsPendingTasks';
@ -241,7 +241,7 @@ export class WorklistMainService {
const request = new Request; const request = new Request;
console.log(request) console.log(request)
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.api.postToken( return this.api.post(
WorklistMainService.getITGFormTaskCount, WorklistMainService.getITGFormTaskCount,
request, request,
onError, onError,
@ -254,7 +254,7 @@ export class WorklistMainService {
const request = new Request; const request = new Request;
console.log(request) console.log(request)
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.api.postToken( return this.api.post(
WorklistMainService.getITGFormTaskDetails, WorklistMainService.getITGFormTaskDetails,
request, request,
onError, onError,

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WorkListMainItgComponent } from './work-list-main-itg.component';
describe('WorkListMainItgComponent', () => {
let component: WorkListMainItgComponent;
let fixture: ComponentFixture<WorkListMainItgComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WorkListMainItgComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WorkListMainItgComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-work-list-main-itg',
templateUrl: './work-list-main-itg.component.html',
styleUrls: ['./work-list-main-itg.component.scss'],
})
export class WorkListMainItgComponent implements OnInit {
constructor() { }
ngOnInit() {}
}
Loading…
Cancel
Save