Merge branch 'MOHEMM-Q3-DEV-LATEST' into sultan-q3

# Conflicts:
#	Mohem/src/app/hmg-common/services/connector/connector.service.ts
MOE_DEV_NEW_TEMPORARY_DESIGN
umasoodch 4 years ago
commit e7745d8da3

@ -12,7 +12,7 @@ import { GetLoginInfoResponse } from '../../hmg-common/services/authentication/m
import { SMSCheckRequest } from 'src/app/hmg-common/services/authentication/models/smscheck.request'; import { SMSCheckRequest } from 'src/app/hmg-common/services/authentication/models/smscheck.request';
import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response'; import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response';
import { PushService } from 'src/app/hmg-common/services/push/push.service'; import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { ModalController, Platform } from '@ionic/angular'; import { ModalController, Platform, AlertController } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response'; import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel'; import { LoginModel } from '../models/LoginModel';
import * as moment from 'moment'; import * as moment from 'moment';
@ -20,6 +20,8 @@ import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authenticat
import { NFC } from "@ionic-native/nfc/ngx"; import { NFC } from "@ionic-native/nfc/ngx";
import { DigitalIdComponent } from '../digital-id/digital-id.component'; import { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component'; import { AppUpdateComponent } from '../app-update/app-update.component';
import { Password } from '../models/password';
import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request';
@Component({ @Component({
selector: 'app-confirm-login', selector: 'app-confirm-login',
@ -54,7 +56,7 @@ export class ConfirmLoginComponent implements OnInit {
direction: string; direction: string;
userInfo: any; userInfo: any;
public businessInfo: object; public businessInfo: object;
private checkUserResult: CheckUserAuthenticationResponse;
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
public cs: CommonService, public cs: CommonService,
@ -64,6 +66,7 @@ export class ConfirmLoginComponent implements OnInit {
public pushService: PushService, public pushService: PushService,
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public alertController: AlertController,
private nfc: NFC private nfc: NFC
) { ) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -376,7 +379,7 @@ export class ConfirmLoginComponent implements OnInit {
job_ar: result.MemberInformationList[0].JOB_NAME_Ar, job_ar: result.MemberInformationList[0].JOB_NAME_Ar,
mobile: result.MemberInformationList[0].MobileNumberWithZipCode, mobile: result.MemberInformationList[0].MobileNumberWithZipCode,
qr: result.MemberInformationList[0].BusinessCardQR, qr: result.MemberInformationList[0].BusinessCardQR,
company_logo: result.BC_Logo ? result.BC_Logo: result.CompanyImageURL, company_logo: result.BC_Logo ? result.BC_Logo : result.CompanyImageURL,
company_url: result.BC_Domain, company_url: result.BC_Domain,
company_type: result.CompanyMainCompany, company_type: result.CompanyMainCompany,
email: result.MemberInformationList[0].EMPLOYEE_EMAIL_ADDRESS email: result.MemberInformationList[0].EMPLOYEE_EMAIL_ADDRESS
@ -446,13 +449,77 @@ export class ConfirmLoginComponent implements OnInit {
this.confirm(this.loginType); this.confirm(this.loginType);
} else { } else {
if (result.IsPasswordExpired) { if (result.IsPasswordExpired) {
// alert("dont forget to handelpresentPasswordExpiredDialog() "); this.presentPasswordExpiredDialog();
// this.presentPasswordExpiredDialog(); *****
} }
} }
}); });
} }
async presentPasswordExpiredDialog() {
const alert = await this.alertController.create({
header: this.ts.trPK('general', 'confirm'),
message: this.ts.trPK('login', 'password-expired'),
buttons: [
{
text: this.ts.trPK('general', 'ok'),
handler: () => {
console.log('Confirm Okay');
this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW);
this.userCheck();
}
}
]
});
await alert.present();
}
public userCheck() {
this.cs.startLoading();
const request = new CheckUserAuthenticationRequest();
request.P_USER_NAME = this.username;
this.authService.checkUserAuthentication(
request,
() => {
/* Write code for error */
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
this.cs.stopLoading();
this.sendSMSForForgotPassword();
}
});
}
private sendSMSForForgotPassword() {
this.cs.startLoading();
const changePwdObj = new LoginRequest();
changePwdObj.MobileNumber = this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
changePwdObj.P_USER_NAME = this.username;
changePwdObj.P_MOBILE_NUMBER = this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER;
this.authService.sendPublicSMS(
changePwdObj,
() => {
// this.sendSMSForForgotPassword();
/* Write code for error */
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log('2');
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.sharedData.setSharedData(true, Password.IS_FORGET_PSW);
this.cs.stopLoading();
this.cs.openSMSPage();
}
});
}
private handleAppUpdate(result) { private handleAppUpdate(result) {
this.iosLink = result.IOSLink; this.iosLink = result.IOSLink;
this.androidLink = result.AndroidLink; this.androidLink = result.AndroidLink;
@ -478,14 +545,14 @@ export class ConfirmLoginComponent implements OnInit {
}); });
} }
async appUpdate(msg, result) { async appUpdate(msg, result) {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: AppUpdateComponent, component: AppUpdateComponent,
cssClass: 'app-update-modal-css', cssClass: 'app-update-modal-css',
componentProps: {'msg':msg} componentProps: { 'msg': msg }
}); });
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
this.handleAppUpdate(result); this.handleAppUpdate(result);
}); });
return await modal.present(); return await modal.present();
} }
@ -517,9 +584,9 @@ export class ConfirmLoginComponent implements OnInit {
let buttonSelected; let buttonSelected;
this.buttons.forEach(element => { this.buttons.forEach(element => {
element.forEach(elementValue => { element.forEach(elementValue => {
if(typeNumber === elementValue.value){ if (typeNumber === elementValue.value) {
buttonSelected = elementValue; buttonSelected = elementValue;
}else{ } else {
elementValue.visible = false; elementValue.visible = false;
} }
}); });

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

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-add-cei',
templateUrl: './add-cei.component.html',
styleUrls: ['./add-cei.component.scss'],
})
export class AddCeiComponent implements OnInit {
constructor() { }
ngOnInit() {}
}

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

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-cei-homepage',
templateUrl: './cei-homepage.component.html',
styleUrls: ['./cei-homepage.component.scss'],
})
export class CeiHomepageComponent implements OnInit {
constructor() { }
ngOnInit() {}
}

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

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-confirm-add-cei',
templateUrl: './confirm-add-cei.component.html',
styleUrls: ['./confirm-add-cei.component.scss'],
})
export class ConfirmAddCeiComponent implements OnInit {
constructor() { }
ngOnInit() {}
}

@ -142,7 +142,7 @@ export class AuthenticationService {
} else { } else {
mobileType = 'android'; mobileType = 'android';
} }
request.VersionID = 3.2; request.VersionID = 3.3;//3.2;
request.Channel = 31; request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType; request.MobileType = mobileType;

@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 120 * 1000; public static timeOut = 120 * 1000;
public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://uat.hmgwebservices.com/';
//public static host = 'https://hmgwebservices.com/'; public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient, constructor(public httpClient: HttpClient,
public cs: CommonService, public cs: CommonService,

@ -12,15 +12,18 @@
<span>{{ts.trPK('work-list','open-analysis')}}</span> <span>{{ts.trPK('work-list','open-analysis')}}</span>
</div> </div>
<div class="result-text-container" [ngStyle]="showChart === false || receivedITGCount === false ? {'visibility': 'hidden'} : {}"> <div class="result-text-container" [ngStyle]="showChart === false || receivedITGCount === false ? {'visibility': 'hidden'} : {}">
<span *ngIf="selectedFilter === 'ALL'">{{newWorkListResponse.length + ITGCount}} {{ts.trPK('work-list','of')}} </span> <!-- <span *ngIf="selectedFilter === 'ALL'">{{newWorkListResponse.length + ITGCount}} {{ts.trPK('work-list','of')}} </span>
<span *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse.length}} {{ts.trPK('work-list','of')}} </span> <span *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse.length}} {{ts.trPK('work-list','of')}} </span> -->
<h2 *ngIf="!showSearchButton">{{totalRequestCount}}</h2> <h2 *ngIf="!showSearchButton">{{totalRequestCount}}</h2>
<h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2> <h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2>
<h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse[0].NO_OF_ROWS}}</h2> <h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse[0].NO_OF_ROWS}}</h2>
<span>{{ts.trPK('work-list','total')}} <br> {{ts.trPK('work-list','open-reqest')}}</span> <span>{{ts.trPK('work-list','total')}} <br> {{ts.trPK('work-list','open-reqest')}}</span>
</div> </div>
<div *ngIf="!showChart || !receivedITGCount" class="spinner-custom-class">
<ion-spinner class="spinner" name="lines"></ion-spinner>
</div>
<p-chart *ngIf="!showChart || !receivedITGCount" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart> <p-chart *ngIf="!showChart || !receivedITGCount" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<p-chart *ngIf="checkLoadingStatus()" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart> <p-chart *ngIf="showChart && receivedITGCount" class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div> </div>
<ion-row class="filters-row" *ngIf="showChart && receivedITGCount"> <ion-row class="filters-row" *ngIf="showChart && receivedITGCount">
@ -42,7 +45,7 @@
<span style="margin-left: 5px;">{{ts.trPK('work-list','clear-search')}}</span> <span style="margin-left: 5px;">{{ts.trPK('work-list','clear-search')}}</span>
<ion-icon name="close" ></ion-icon> <ion-icon name="close" ></ion-icon>
</ion-col> </ion-col>
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter === 'ALL'"> <ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter !== 'ITG'">
<ion-icon name="search" ></ion-icon> <ion-icon name="search" ></ion-icon>
<span>{{ts.trPK('work-list','advanced-search')}}</span> <span>{{ts.trPK('work-list','advanced-search')}}</span>
</ion-col> </ion-col>
@ -102,7 +105,7 @@
</div> </div>
<!-- </div> --> <!-- </div> -->
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="selectedFilter === 'ALL' || itemType !== ''"> <ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="itemType !== ''">
<ion-infinite-scroll-content></ion-infinite-scroll-content> <ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> </ion-infinite-scroll>
</ion-content> </ion-content>

@ -355,7 +355,7 @@ z-index: 99;
ion-col{ ion-col{
background: white; background: white;
border-radius: 12px; border-radius: 12px;
padding-right: 30px; // padding-right: 30px;
flex: none; flex: none;
ion-icon{ ion-icon{
margin-right: 3px; margin-right: 3px;
@ -459,4 +459,10 @@ padding: 10px 30px;
} }
.slideCss{ .slideCss{
width: auto !important; width: auto !important;
}
.spinner-custom-class{
position: absolute;
right: 160px;
top: 100px;
} }

@ -68,7 +68,7 @@ export class HomeComponent implements OnInit {
public allFormattedData = []; public allFormattedData = [];
public selectedFilter = 'ALL'; public selectedFilter = 'ALL';
public showSearchButton = false; public showSearchButton = false;
public itemType = ''; public itemType = 'HRSSA';
public receivedITGCount = false; public receivedITGCount = false;
public totalHR = 0; public totalHR = 0;
@ -103,14 +103,6 @@ export class HomeComponent implements OnInit {
}] }]
}; };
public filters = [ public filters = [
{
value: 0,
name: 'All',
active: true,
color: '#124375',
key: 'ALL',
disable: false
},
{ {
value: 0, value: 0,
name: 'HR', name: 'HR',
@ -194,7 +186,7 @@ export class HomeComponent implements OnInit {
this.WorkListObj.P_SEARCH_SENT_DATE = ''; this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ''; this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_PAGE_NUM = 0; this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 50; this.WorkListObj.P_PAGE_LIMIT = 5;
} }
ngOnInit() { ngOnInit() {
@ -202,8 +194,9 @@ export class HomeComponent implements OnInit {
this.isLoading = true; this.isLoading = true;
} }
ionViewWillEnter() { ionViewWillEnter() {
console.log(this.filters);
const loadWorkList = this.common.sharedService.getSharedData('loadWorkList', false); const loadWorkList = this.common.sharedService.getSharedData('loadWorkList', false);
if (loadWorkList) { if (loadWorkList) {
this.receivedITGCount = false; this.receivedITGCount = false;
@ -215,10 +208,11 @@ export class HomeComponent implements OnInit {
} }
this.currentActiveIndex = 0; this.currentActiveIndex = 0;
this.previousActiveIndex = 0; this.previousActiveIndex = 0;
this.itemType = ''; this.itemType = 'HRSSA';
this.selectedFilter = 'ALL'; this.selectedFilter = 'HR';
this.filters[0].active = true;
this.isPostNoLoad = true; this.isPostNoLoad = true;
this.disableFilters(); // this.disableFilters();
this.resetData(); this.resetData();
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
@ -236,6 +230,7 @@ export class HomeComponent implements OnInit {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.worklistNotifications = result; this.worklistNotifications = result;
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.assignDataToFilters();
this.common.sharedService.setSharedData(result, 'worklistNotifications'); this.common.sharedService.setSharedData(result, 'worklistNotifications');
this.Details(); this.Details();
this.callWorkListServices(); this.callWorkListServices();
@ -244,66 +239,30 @@ export class HomeComponent implements OnInit {
} }
assignDataToFilters() { assignDataToFilters() {
this.ngZone.run(() => {
this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.filters[1].value = this.totalHR;
this.filters[2].value = this.totalMR;
this.filters[3].value = this.totalPR;
this.filters[4].value = this.totalPO;
this.filters[6].value = this.totalIC;
});
if (this.totalHR === 0) {
this.data.datasets[0].data[0] = 0;
}
if (this.totalPO === 0) {
this.data.datasets[0].data[1] = 0;
}
if (this.totalPR === 0) {
this.data.datasets[0].data[2] = 0;
}
if (this.totalMR === 0) {
this.data.datasets[0].data[3] = 0;
}
if (this.totalIC === 0) {
this.data.datasets[0].data[5] = 0;
}
if (this.totalStamp === 0) {
this.data.datasets[0].data[6] = 0;
}
const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList;
for (const notification of openNotificationsArray) { for (const notification of openNotificationsArray) {
if (notification.ITEM_TYPE === 'HRSSA') { if (notification.ITEM_TYPE === 'HRSSA') {
this.filters[1].value = this.totalHR; this.filters[0].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'INVMOA') { } else if (notification.ITEM_TYPE === 'INVMOA') {
this.filters[2].value = this.totalMR; this.filters[1].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'REQAPPRV') { } else if (notification.ITEM_TYPE === 'REQAPPRV') {
this.filters[3].value = this.totalPR; this.filters[2].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'POAPPRV') { } else if (notification.ITEM_TYPE === 'POAPPRV') {
this.filters[4].value = this.totalPO; this.filters[3].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 === 'INVITEM') { } else if (notification.ITEM_TYPE === 'INVITEM') {
this.filters[6].value = this.totalIC; this.filters[5].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[5] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[5] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'STAMP') { } else if (notification.ITEM_TYPE === 'STAMP') {
this.filters[7].value = this.totalStamp; this.filters[6].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[6] = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[6] = notification.OPEN_NTF_NUMBER;
} }
} }
// this.data.datasets[0].data[4] = this.ITGCount;
this.showChart = true; this.showChart = true;
// this.common.stopLoading();
this.isLoading = false; this.isLoading = false;
} }
@ -316,7 +275,37 @@ export class HomeComponent implements OnInit {
} }
} }
public initiateNewWorklistData(selectedFilter: any, filterValue: any) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = '1';
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 5;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
this.itemType = this.selectedFilter;
this.newWorkListResponse = [];
this.showFormattedData = [];
this.allFormattedData = [];
if (filterValue > 0) {
this.getAllPushNotificationFun();
} else {
this.common.stopLoading();
}
}
activeFilter(index: number) { activeFilter(index: number) {
if (index !== 4) {
this.common.startLoading();
}
console.log(this.filters); console.log(this.filters);
if (this.currentActiveIndex !== index) { if (this.currentActiveIndex !== index) {
this.previousActiveIndex = this.currentActiveIndex; this.previousActiveIndex = this.currentActiveIndex;
@ -324,8 +313,10 @@ export class HomeComponent implements OnInit {
this.filters[this.previousActiveIndex].active = false; this.filters[this.previousActiveIndex].active = false;
this.filters[this.currentActiveIndex].active = true; this.filters[this.currentActiveIndex].active = true;
this.selectedFilter = this.filters[this.currentActiveIndex].key; this.selectedFilter = this.filters[this.currentActiveIndex].key;
const filterValue = this.filters[this.currentActiveIndex].value;
if (this.selectedFilter !== 'ITG') { if (this.selectedFilter !== 'ITG') {
this.getFilteredData(this.selectedFilter); // this.getFilteredData(this.selectedFilter);
this.initiateNewWorklistData(this.selectedFilter, filterValue);
} }
} }
} }
@ -339,7 +330,6 @@ export class HomeComponent implements OnInit {
if (filter.key === this.itemType) { if (filter.key === this.itemType) {
filter.disable = false; filter.disable = false;
filter.active = true; filter.active = true;
filter.value = 0;
this.selectedFilter = filter.name; this.selectedFilter = filter.name;
} else if (this.itemType === '') { } else if (this.itemType === '') {
filter.disable = false; filter.disable = false;
@ -354,12 +344,15 @@ export class HomeComponent implements OnInit {
} }
} }
async openSearchModal() { async openSearchModal() {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: WorklistAdvancedSearchComponent, component: WorklistAdvancedSearchComponent,
cssClass: 'advanced-search-modal-custom', cssClass: 'advanced-search-modal-custom',
backdropDismiss: false, backdropDismiss: false,
componentProps: {} componentProps: {
itemType: this.itemType
}
}); });
modal.onDidDismiss().then(result => { modal.onDidDismiss().then(result => {
if (result.data) { if (result.data) {
@ -375,14 +368,20 @@ export class HomeComponent implements OnInit {
this.WorkListObj.P_PAGE_NUM = 1; this.WorkListObj.P_PAGE_NUM = 1;
this.newWorkListResponse = []; this.newWorkListResponse = [];
this.showFormattedData = []; this.showFormattedData = [];
this.selectedFilter = 'ALL'; this.allFormattedData = [];
// this.selectedFilter = 'ALL';
if (this.itemType !== '') {
this.disableFilters();
}
this.filters[this.currentActiveIndex].active = false; this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0; this.currentActiveIndex = 0;
this.previousActiveIndex = 0; this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true; this.filters[this.currentActiveIndex].active = true;
if (this.itemType !== '') { // if (this.itemType !== '') {
this.disableFilters(); // this.disableFilters();
} // }
this.isPostNoLoad = false; this.isPostNoLoad = false;
this.getAllPushNotificationFun(); this.getAllPushNotificationFun();
} }
@ -415,21 +414,6 @@ export class HomeComponent implements OnInit {
); );
} }
getFilteredData(filter: string) {
if (filter === 'ALL') {
this.showFormattedData = this.allFormattedData;
} else {
let arrayToFilter;
arrayToFilter = this.newWorkListResponse.filter((workList) => {
return workList.ITEM_TYPE === filter;
});
const categorizeData = this.categorizeData(arrayToFilter);
this.showFormattedData = this.sortArray(categorizeData);
// const sortData = this.sortArray(arrayToFilter);
// this.showFormattedData = this.categorizeData(sortData);
}
}
checkDateExistance(currentDate: any, formattedData: any) { checkDateExistance(currentDate: any, formattedData: any) {
let existsBefore = false; let existsBefore = false;
let index = 0; let index = 0;
@ -446,35 +430,10 @@ export class HomeComponent implements OnInit {
}; };
} }
addCountInFilters(workList: any) {
if (workList.ITEM_TYPE === 'HRSSA') {
this.totalHR = this.totalHR + 1;
} else if (workList.ITEM_TYPE === 'POAPPRV') {
this.totalPO = this.totalPO + 1;
} else if (workList.ITEM_TYPE === 'REQAPPRV') {
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;
} else if (workList.ITEM_TYPE === 'STAMP') {
this.totalStamp = this.totalStamp + 1;
}
}
categorizeData(arrayToCategorize: any) { categorizeData(arrayToCategorize: any) {
this.ngZone.run(() => {
this.totalHR = 0;
this.totalPO = 0;
this.totalPR = 0;
this.totalMR = 0;
this.totalIC = 0;
})
const datePipe = new DatePipe('en-US'); const datePipe = new DatePipe('en-US');
const formattedData = []; const formattedData = [];
for (const workList of arrayToCategorize) { for (const workList of arrayToCategorize) {
this.addCountInFilters(workList);
const currentDate = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y'); const currentDate = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y');
const currentObject = { const currentObject = {
date: '', date: '',
@ -505,6 +464,7 @@ export class HomeComponent implements OnInit {
} }
private handleWorkListResult(result: any) { private handleWorkListResult(result: any) {
this.common.stopLoading();
console.log(this.filters); console.log(this.filters);
const lastItemIndex = result.length - 1; const lastItemIndex = result.length - 1;
const lastitem = result[lastItemIndex]; const lastitem = result[lastItemIndex];
@ -534,13 +494,12 @@ export class HomeComponent implements OnInit {
this.showFormattedData = this.sortArray(categorizedWorkListResponse); this.showFormattedData = this.sortArray(categorizedWorkListResponse);
this.allFormattedData = this.showFormattedData; this.allFormattedData = this.showFormattedData;
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
this.assignDataToFilters(); // this.assignDataToFilters();
} }
} else { } else {
this.newWorkListResponse = []; this.newWorkListResponse = [];
// this.assignDataToFilters();
if (this.showFormattedData.length === 0) { if (this.showFormattedData.length === 0) {
this.resetFiltersUI(); // this.resetFiltersUI();
} }
this.data.datasets[0].data[4] = this.ITGCount; this.data.datasets[0].data[4] = this.ITGCount;
this.showChart = true; this.showChart = true;
@ -555,7 +514,7 @@ export class HomeComponent implements OnInit {
this.filters[1].value = 0; this.filters[1].value = 0;
this.filters[2].value = 0; this.filters[2].value = 0;
this.filters[3].value = 0; this.filters[3].value = 0;
this.filters[4].value = 0; this.filters[5].value = 0;
this.filters[6].value = 0; this.filters[6].value = 0;
this.data.datasets[0].data[0] = 0; this.data.datasets[0].data[0] = 0;
@ -601,24 +560,19 @@ export class HomeComponent implements OnInit {
this.WorkListObj.P_SEARCH_SUBJECT = ''; this.WorkListObj.P_SEARCH_SUBJECT = '';
} }
// initializeWorkList() {
// }
clearSearch() { clearSearch() {
this.common.startLoading(); this.common.startLoading();
this.isLoading = true; this.isLoading = true;
this.itemType = ''; this.itemType = '';
this.selectedFilter = 'ALL'; this.selectedFilter = 'ALL';
this.isPostNoLoad = true; this.isPostNoLoad = true;
this.disableFilters(); // this.disableFilters();
this.resetData(); this.resetData();
this.getAllPushNotificationFun(); this.getAllPushNotificationFun();
} }
doInfinite(infiniteScroll) { doInfinite(infiniteScroll) {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') { if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.common.startLoading();
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.handleWorkListResult(result.GetWorkList); this.handleWorkListResult(result.GetWorkList);
@ -664,8 +618,6 @@ export class HomeComponent implements OnInit {
names[i] = result.RequestType[i].RequestTypeCode; names[i] = result.RequestType[i].RequestTypeCode;
count++; count++;
} }
//this.sortArrayOfAll(this.ITGSegment[0].data)
console.log(this.ITGSegment);
} }
}); });
@ -677,7 +629,7 @@ export class HomeComponent implements OnInit {
this.ITGCount = result.TotalCount; this.ITGCount = result.TotalCount;
this.totalRequestCount = this.totalRequestCount + result.TotalCount; this.totalRequestCount = this.totalRequestCount + result.TotalCount;
this.data.datasets[0].data[4] = this.ITGCount; this.data.datasets[0].data[4] = this.ITGCount;
this.filters[5].value = result.TotalCount; this.filters[4].value = result.TotalCount;
this.receivedITGCount = true; this.receivedITGCount = true;
}); });
} }

@ -31,6 +31,9 @@ export class WorklistMainService {
public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY";
public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY"; public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY";
public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY"; public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY";
public static getPhoneNotificationBody = "Services/ERP.svc/REST/GET_PHONES_NOTIFICATION_BODY";
public static getTerminationNotificationBody = "Services/ERP.svc/REST/GET_TERM_NOTIFICATION_BODY";
public static getContactNotificationBody = "Services/ERP.svc/REST/GET_CONTACT_NOTIFICATION_BODY";
public static getStampMSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_MS_NOTIFICATION_BODY"; public static getStampMSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_MS_NOTIFICATION_BODY";
public static getStampNSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_NS_NOTIFICATION_BODY"; public static getStampNSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_NS_NOTIFICATION_BODY";
public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY"; public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY";
@ -189,6 +192,52 @@ export class WorklistMainService {
); );
} }
public getPhoneNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<any> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getPhoneNotificationBody,
request,
onError,
errorLabel
);
}
public getTerminationNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<any> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getTerminationNotificationBody,
request,
onError,
errorLabel
);
}
public getContactNotificationBody(
WorkListBodyRequest: any,
onError?: any,
errorLabel?: string
): Observable<any> {
const request = WorkListBodyRequest;
this.authService.authenticateRequest(request);
return this.api.post(
WorklistMainService.getContactNotificationBody,
request,
onError,
errorLabel
);
}
public getPOItemHistory( public getPOItemHistory(
POItemHistoryReq: any, POItemHistoryReq: any,
onError?: any, onError?: any,

@ -6,6 +6,7 @@ import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeR
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq'; import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes'; import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
import { Request } from 'src/app/hmg-common/services/models/request';
@Injectable() @Injectable()
@ -16,6 +17,7 @@ export class WorklistService {
public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST'; public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST';
public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY'; public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY';
public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements'; public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements';
public static getFavoriteWithoutImage = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacementsWithoutImage';
public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements'; public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements';
constructor( constructor(
public api: ConnectorService, public api: ConnectorService,
@ -53,6 +55,15 @@ export class WorklistService {
public getFavorite(req: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> { public getFavorite(req: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
this.authService.authenticateRequest(req); this.authService.authenticateRequest(req);
console.log(req);
return this.api.post(WorklistService.getFavorite, req, onError, errorLabel);
}
public getFavoriteByLetter(letter: string, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
const req = new Request();
this.authService.authenticateRequest(req);
req['ItgFilter'] = letter;
console.log(letter);
return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); return this.api.post(WorklistService.getFavorite, req, onError, errorLabel);
} }
public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable<any> { public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable<any> {
@ -63,6 +74,11 @@ export class WorklistService {
return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel); return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel);
} }
public getFavoriteWithoutImage(req: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
this.authService.authenticateRequest(req);
return this.api.post(WorklistService.getFavoriteWithoutImage, req, onError, errorLabel);
}
public getFavoriteMyTeam(req: any, onError?: any, errorLabel?: string): Observable<any> { public getFavoriteMyTeam(req: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(req); this.authService.authenticateRequest(req);
return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); return this.api.post(WorklistService.getFavorite, req, onError, errorLabel);

@ -135,6 +135,16 @@
</ion-list> </ion-list>
<div style="font-weight: bold;" *ngIf="searchKeySelect === '4'">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div>
</ion-slide>
</ion-slides>
</div>
<!-- <ion-item> <!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList"> <ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;"> <ion-item *ngFor="let employee of ReplacementList;let i=index;">

@ -1,280 +1,286 @@
.disabledButton {
opacity: 0.5;
}
.disabledButton{ .radio-label {
opacity:.5; margin: 4px;
position: relative;
} bottom: 4px;
}
.radio-label{ ion-radio {
margin: 4px; --color-checked: #269db8;
position: relative; }
bottom: 4px; .center {
} text-align: center;
ion-radio{ }
--color-checked: #269db8; .boldTxtNav {
} font-weight: bold;
.center{text-align: center;} }
.boldTxtNav{ .employee-details {
font-weight: bold; display: inline-block;
} margin: 10px;
.employee-details{ }
display:inline-block; .empImgeRep {
margin: 10px; display: inline-block;
} height: 40px;
.empImgeRep{ width: 40px;
display: inline-block; }
height: 40px; .star-fav {
width: 40px; float: right;
} margin: 10px;
.star-fav{ }
float: right; .star-fav-left {
margin: 10px; float: left;
} margin: 10px 5px;
.star-fav-left{ }
float: left; .uk-margin {
margin: 10px 5px; margin: 15px 15px 0px 15px;
} font-weight: bold;
.uk-margin{margin: 15px 15px 0px 15px; clear: both;
font-weight: bold; position: relative;
clear: both; top: 10px;
position: relative; }
top: 10px;} .uk-padding {
.uk-padding{ padding: 20px;} padding: 20px;
.uk-padding .employee-details{ }
bottom: 10px; .uk-padding .employee-details {
position: relative;} bottom: 10px;
position: relative;
.filterInput{ }
border: solid var(--gray) 1px;
border-radius: 21px;
padding-left: 10px !important;
}
.filterInput-ar{
border: solid var(--gray) 1px;
border-radius: 21px;
--padding-start: 10px !important;
}
.square-container{
width:100%;
clear: both;
}
.square{
clear: both;
}
.top-radio-row{
font-size: 12px;
}
button.item-button.button.button-md.button-clear.button-clear-md { .filterInput {
background-color: transparent; border: solid var(--gray) 1px;
} border-radius: 21px;
padding-left: 10px !important;
.footer-button { }
background: #dbdbdb; .filterInput-ar {
border-radius: 10px; border: solid var(--gray) 1px;
color: black; border-radius: 21px;
--background: transparent; --padding-start: 10px !important;
font-weight: bold; }
width: 75%; .square-container {
} width: 100%;
clear: both;
// ion-item { }
// margin-top: 5%; .square {
// margin-right: 7%; clear: both;
// width: 100%; }
// } .top-radio-row {
.ionItem{ font-size: 12px;
border: #e4e4e4 solid; }
/* margin: 6px; */
/* padding: 11px; */ button.item-button.button.button-md.button-clear.button-clear-md {
height: 85px; background-color: transparent;
width: 164px; }
border-radius: 5px;
text-align: center; .footer-button {
background: #dbdbdb;
} border-radius: 10px;
color: black;
--background: transparent;
.profileImageDiv{ font-weight: bold;
width: 75%;
z-index: 3; }
position: relative;
top: 0; // ion-item {
// margin-top: 5%;
} // margin-right: 7%;
.profileImage{ // width: 100%;
width:60px !important; // }
.ionItem {
} border: #e4e4e4 solid;
/* margin: 6px; */
.activated{ /* padding: 11px; */
border: #209a83 0.02cm solid ; height: 85px;
} width: 164px;
.deactivated{ border: #e4e4e4 0.02cm solid; border-radius: 5px;
} text-align: center;
.repContentDiv{ }
text-align: center;
width: 85%; .profileImageDiv {
font-size: 14px; z-index: 3;
border: #e4e4e4 solid; position: relative;
border-radius: 5px; top: 0;
padding: 20px 8px 8px 8px; }
margin-top: -9px; .profileImage {
margin-right: -35px width: 60px !important;
}
}
.selIEmpDiv{ .activated {
text-align: right; border: #209a83 0.02cm solid;
margin-bottom: -26px; }
margin-right: 0px; .deactivated {
z-index: 3; border: #e4e4e4 0.02cm solid;
position: relative; }
top: 0; .repContentDiv {
} text-align: center;
width: 85%;
.selIEmpImage{ font-size: 14px;
width:22px !important border: #e4e4e4 solid;
border-radius: 5px;
} padding: 20px 8px 8px 8px;
margin-top: -9px;
.noteInput{ margin-right: -35px;
border: solid var(--gray) 1px; }
border-radius: 15px; .selIEmpDiv {
margin: 8px 17px 0px 17px; text-align: right;
padding: 10px 2px 10px 2px; margin-bottom: -26px;
} margin-right: 0px;
.filterInput{ z-index: 3;
border: solid var(--gray) 1px; position: relative;
border-radius: 21px; top: 0;
padding-left: 10px !important; }
}
.selIEmpImage {
.filterInput-ar{ width: 22px !important;
// border: solid var(--gray) 1px; }
// border-radius: 21px;
// padding-left: 10px !important; .noteInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 21px; border-radius: 15px;
// width:250px margin: 8px 17px 0px 17px;
// padding-left: 145px !important; padding: 10px 2px 10px 2px;
//margin-left: 123px; }
// padding-right: 129px; .filterInput {
//margin-right: -136px; border: solid var(--gray) 1px;
border-radius: 21px;
} padding-left: 10px !important;
.filterBtn{ }
background: var(--newgreen);
--background: var (--newgreen); .filterInput-ar {
border-radius: 50%; // border: solid var(--gray) 1px;
height: 60px; // border-radius: 21px;
width: 60px; // padding-left: 10px !important;
} border: solid var(--gray) 1px;
.filterBtn-ar{ border-radius: 21px;
// background: var(--newgreen); // width:250px
// --background: var (--newgreen); // padding-left: 145px !important;
// border-radius: 50%; //margin-left: 123px;
// height: 60px; // padding-right: 129px;
// width: 60px; //margin-right: -136px;
background: var(--newgreen); }
--background: var (--newgreen); .filterBtn {
border-radius: 50%; background: var(--newgreen);
height: 60px; --background: var (--newgreen);
width: 60px; border-radius: 50%;
margin-left: -183px; height: 60px;
margin-right: 260px; width: 60px;
} }
.filterBtn-ar {
// background: var(--newgreen);
// --background: var (--newgreen);
*{ // border-radius: 50%;
box-sizing: border-box; // height: 60px;
} // width: 60px;
background: var(--newgreen);
.square-container{ --background: var (--newgreen);
// padding: 8px; border-radius: 50%;
width:100%; height: 60px;
} width: 60px;
.square{ margin-left: -183px;
// width:calc(100% / 2); margin-right: 260px;
width:100%; }
float:left;
position: relative; * {
// padding-bottom: calc(100% / 2); box-sizing: border-box;
} }
.square .content{ .square-container {
width: calc(100% - 16px) !important; // padding: 8px;
height: calc(100% - 16px) !important; width: 100%;
margin: 8px; }
padding: 16px; .square {
// position: absolute; // width:calc(100% / 2);
color: white; width: 100%;
border-radius: 9px; float: left;
text-align: center; position: relative;
min-height: 92px; // padding-bottom: calc(100% / 2);
// background-color: #0095ff; }
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
} .square .content {
width: calc(100% - 16px) !important;
.disabledButton{ height: calc(100% - 16px) !important;
opacity:.5; margin: 8px;
padding: 16px;
} // position: absolute;
color: white;
.radio-label{ border-radius: 9px;
font-size: 9px; text-align: center;
margin: 4px; min-height: 92px;
position: relative; // background-color: #0095ff;
bottom: 4px; // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
} }
ion-radio{
--color-checked: #269db8; .disabledButton {
} opacity: 0.5;
.center{text-align: center;padding: 5px;} }
.boldTxtNav{
font-weight: bold; .radio-label {
padding: 5px; font-size: 9px;
} margin: 4px;
.employee-details{ position: relative;
display:inline-block; bottom: 4px;
margin: 10px; }
text-overflow: ellipsis; ion-radio {
white-space: nowrap; --color-checked: #269db8;
width: 70%; }
} .center {
.empImgeRep{ text-align: center;
display: inline-block; padding: 5px;
height: 40px; }
width: 40px; .boldTxtNav {
} font-weight: bold;
.star-fav{ padding: 5px;
float: right; }
margin: 15px 0px 0px 0px; .employee-details {
} display: inline-block;
.uk-margin{margin: 15px 15px 0px 15px; margin: 10px;
font-weight: bold; text-overflow: ellipsis;
clear: both; white-space: nowrap;
position: relative; width: 70%;
top: 10px;} }
.uk-padding{ padding: 20px;} .empImgeRep {
.uk-padding .employee-details{ display: inline-block;
bottom: 10px; height: 40px;
position: relative;} width: 40px;
}
// .star-fav-left{ .star-fav {
// float: left; float: right;
// margin: 10px 5px; margin: 15px 0px 0px 0px;
// } }
.top-radio-row{ .uk-margin {
font-size: 12px; margin: 15px 15px 0px 15px;
display: block; font-weight: bold;
padding-bottom: 25px; clear: both;
padding-top: 15px; position: relative;
} top: 10px;
.textSearchType{ }
padding-top: 8px; .uk-padding {
font-size: 12px; padding: 20px;
} }
.uk-padding .employee-details {
bottom: 10px;
position: relative;
}
// .star-fav-left{
// float: left;
// margin: 10px 5px;
// }
.top-radio-row {
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType {
padding-top: 8px;
font-size: 12px;
}
.isFavLetterActive {
background: #269db8;
width: 55px;
border-radius: 60px;
color: white;
}

@ -40,6 +40,14 @@ export class WorkListReplacementItgComponent implements OnInit {
public direction = ''; public direction = '';
arr = []; arr = [];
delegtedEmp; delegtedEmp;
public slideOptsOne = {
slidesPerView: 6,
spaceBetween: 5
};
public activeSelectedLetter:string;
constructor(public vacationRuleService: VacationRuleServiceService, constructor(public vacationRuleService: VacationRuleServiceService,
public ts: TranslatorService, public ts: TranslatorService,
public cs: CommonService, public cs: CommonService,
@ -308,28 +316,63 @@ export class WorkListReplacementItgComponent implements OnInit {
} }
}); });
} }
favLetter = [];
favIsActive = [];
getFavruite() { getFavruite() {
this.cs.startLoading(); this.cs.startLoading();
this.worklistService.getFavorite({}, () => { this.worklistService.getFavoriteWithoutImage({}, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.stopLoading(); // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; let favList = result['Mohemm_GetFavoriteReplacementsList'];
this.favoriteUserList.forEach((obj) => { favList.forEach((obj) => {
obj.IsFavorite = true; obj.IsFavorite = true;
this.favLetter.push(obj.EMPLOYEE_DISPLAY_NAME.charAt(0).toUpperCase());
}); });
this.relatedList.forEach((obj) => { this.favLetter = this.favLetter.filter((elem, index, self) => {
if (this.favoriteUserList.some(x => x.USER_NAME === obj.EmployeeID)) { return index === self.indexOf(elem);
obj.IsFavorite = true;
} else {
obj.IsFavorite = false;
}
}); });
console.log('enad test'); if (this.activeSelectedLetter) {
console.log(this.relatedList); this.selectedLetter(this.activeSelectedLetter);
} else {
this.favLetter.forEach((obj, index) => {
if(this.activeSelectedLetter) {}
if (index === 0) {
this.selectedLetter(obj);
this.favIsActive.push(true);
} else {
this.favIsActive.push(false);
}
});
}
console.log(this.favLetter);
console.log(this.favIsActive);
} }
}); });
// this.cs.startLoading();
// this.worklistService.getFavorite({}, () => {
// }).subscribe((result) => {
// if (this.cs.validResponse(result)) {
// this.cs.stopLoading();
// this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
// this.favoriteUserList.forEach((obj) => {
// obj.IsFavorite = true;
// });
// this.relatedList.forEach((obj) => {
// if (this.favoriteUserList.some(x => x.USER_NAME === obj.EmployeeID)) {
// obj.IsFavorite = true;
// } else {
// obj.IsFavorite = false;
// }
// });
// console.log('enad test');
// console.log(this.relatedList);
// }
// });
} }
listOfRealted = []; listOfRealted = [];
@ -367,4 +410,30 @@ export class WorkListReplacementItgComponent implements OnInit {
return true; return true;
else { return false; } else { return false; }
} }
selectedLetter(el) {
this.favLetter.forEach((letter, index) => {
if (letter === el) {
this.favIsActive[index] = true;
this.activeSelectedLetter = el;
this.worklistService.getFavoriteByLetter(letter,() => {
}).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList;
this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true;
});
}
});
} else {
this.favIsActive[index] = false;
}
});
}
returnIsActiveFunction(i) {
return this.favIsActive[i];
}
} }

@ -84,6 +84,16 @@
</ion-list> </ion-list>
<div style="font-weight: bold;" *ngIf="searchBy === '4'">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">
<div [ngClass]="returnIsActiveFunction(i)? 'isFavLetterActive':''">
<p (click)='selectedLetter(favLetter[i])'>{{filter}}</p>
</div>
</ion-slide>
</ion-slides>
</div>
<div class="noteInput" *ngIf="isAnswer==true"> <div class="noteInput" *ngIf="isAnswer==true">
<ion-label class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} : <ion-label class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :

@ -16,7 +16,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// margin-right: 7%; // margin-right: 7%;
// width: 100%; // width: 100%;
// } // }
.ionItem{ .ionItem {
border: #e4e4e4 solid; border: #e4e4e4 solid;
/* margin: 6px; */ /* margin: 6px; */
/* padding: 11px; */ /* padding: 11px; */
@ -24,28 +24,24 @@ button.item-button.button.button-md.button-clear.button-clear-md {
width: 164px; width: 164px;
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
} }
.profileImageDiv {
.profileImageDiv{
z-index: 3; z-index: 3;
position: relative; position: relative;
top: 0; top: 0;
} }
.profileImage{ .profileImage {
width:60px !important; width: 60px !important;
} }
.activated{ .activated {
border: #209a83 0.02cm solid ; border: #209a83 0.02cm solid;
} }
.deactivated{ border: #e4e4e4 0.02cm solid; .deactivated {
border: #e4e4e4 0.02cm solid;
} }
.repContentDiv{ .repContentDiv {
text-align: center; text-align: center;
width: 85%; width: 85%;
font-size: 14px; font-size: 14px;
@ -53,10 +49,9 @@ button.item-button.button.button-md.button-clear.button-clear-md {
border-radius: 5px; border-radius: 5px;
padding: 20px 8px 8px 8px; padding: 20px 8px 8px 8px;
margin-top: -9px; margin-top: -9px;
margin-right: -35px margin-right: -35px;
} }
.selIEmpDiv{ .selIEmpDiv {
text-align: right; text-align: right;
margin-bottom: -26px; margin-bottom: -26px;
margin-right: 0px; margin-right: 0px;
@ -65,24 +60,23 @@ button.item-button.button.button-md.button-clear.button-clear-md {
top: 0; top: 0;
} }
.selIEmpImage{ .selIEmpImage {
width:22px !important width: 22px !important;
} }
.noteInput{ .noteInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 15px; border-radius: 15px;
margin: 8px 17px 0px 17px; margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px; padding: 10px 2px 10px 2px;
} }
.filterInput{ .filterInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 21px; border-radius: 21px;
padding-left: 10px !important; padding-left: 10px !important;
} }
.filterInput-ar{ .filterInput-ar {
// border: solid var(--gray) 1px; // border: solid var(--gray) 1px;
// border-radius: 21px; // border-radius: 21px;
// padding-left: 10px !important; // padding-left: 10px !important;
@ -93,16 +87,15 @@ button.item-button.button.button-md.button-clear.button-clear-md {
//margin-left: 123px; //margin-left: 123px;
// padding-right: 129px; // padding-right: 129px;
//margin-right: -136px; //margin-right: -136px;
} }
.filterBtn{ .filterBtn {
background: var(--newgreen); background: var(--newgreen);
--background: var (--newgreen); --background: var (--newgreen);
border-radius: 50%; border-radius: 50%;
height: 60px; height: 60px;
width: 60px; width: 60px;
} }
.filterBtn-ar{ .filterBtn-ar {
// background: var(--newgreen); // background: var(--newgreen);
// --background: var (--newgreen); // --background: var (--newgreen);
// border-radius: 50%; // border-radius: 50%;
@ -117,25 +110,23 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-right: 260px; margin-right: 260px;
} }
* {
*{
box-sizing: border-box; box-sizing: border-box;
} }
.square-container{ .square-container {
// padding: 8px; // padding: 8px;
width:100%; width: 100%;
} }
.square{ .square {
// width:calc(100% / 2); // width:calc(100% / 2);
width:100%; width: 100%;
float:left; float: left;
position: relative; position: relative;
// padding-bottom: calc(100% / 2); // padding-bottom: calc(100% / 2);
} }
.square .content{ .square .content {
width: calc(100% - 16px) !important; width: calc(100% - 16px) !important;
height: calc(100% - 16px) !important; height: calc(100% - 16px) !important;
margin: 8px; margin: 8px;
@ -149,64 +140,75 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
} }
.disabledButton{ .disabledButton {
opacity:.5; opacity: 0.5;
} }
.radio-label{ .radio-label {
font-size: 9px; font-size: 9px;
margin: 4px; margin: 4px;
position: relative; position: relative;
bottom: 4px; bottom: 4px;
} }
ion-radio{ ion-radio {
--color-checked: #269db8; --color-checked: #269db8;
} }
.center{text-align: center;padding: 5px;} .center {
.boldTxtNav{ text-align: center;
padding: 5px;
}
.boldTxtNav {
font-weight: bold; font-weight: bold;
padding: 5px; padding: 5px;
} }
.employee-details{ .employee-details {
display:inline-block; display: inline-block;
margin: 10px; margin: 10px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
width: 70%; width: 70%;
} }
.empImgeRep{ .empImgeRep {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.star-fav{ .star-fav {
float: right; float: right;
margin: 15px 0px 0px 0px; margin: 15px 0px 0px 0px;
} }
.uk-margin{margin: 15px 15px 0px 15px; .uk-margin {
margin: 15px 15px 0px 15px;
font-weight: bold; font-weight: bold;
clear: both; clear: both;
position: relative; position: relative;
top: 10px;} top: 10px;
.uk-padding{ padding: 20px;} }
.uk-padding .employee-details{ .uk-padding {
padding: 20px;
}
.uk-padding .employee-details {
bottom: 10px; bottom: 10px;
position: relative;} position: relative;
}
.star-fav-left{
float: left;
margin: 10px 5px;
}
.top-radio-row{
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType{
padding-top: 8px;
font-size: 12px;
}
.star-fav-left {
float: left;
margin: 10px 5px;
}
.top-radio-row {
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType {
padding-top: 8px;
font-size: 12px;
}
.isFavLetterActive {
background: #269db8;
width: 55px;
border-radius: 60px;
color: white;
}

@ -49,6 +49,14 @@ export class WorkListReplacementRollComponent implements OnInit {
arr = []; arr = [];
favoriteUserList: any = []; favoriteUserList: any = [];
isFilter = true; isFilter = true;
public slideOptsOne = {
slidesPerView: 6,
spaceBetween: 5
};
public activeSelectedLetter:string;
constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1; this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50; this.P_PAGE_LIMIT = 50;
@ -433,7 +441,7 @@ export class WorkListReplacementRollComponent implements OnInit {
} }
selectedType; selectedType;
counter=0; counter = 0;
onChangeSelect(select) { onChangeSelect(select) {
let selectValue = select.detail.value; let selectValue = select.detail.value;
@ -442,15 +450,14 @@ export class WorkListReplacementRollComponent implements OnInit {
this.isFilter = true; this.isFilter = true;
this.selectedType = 1; this.selectedType = 1;
this.listOfRealted = this.actionHistory; this.listOfRealted = this.actionHistory;
if(this.counter > 0) if (this.counter > 0) {
{
this.actionHistory.forEach((obj, i) => { this.actionHistory.forEach((obj, i) => {
if(this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) { if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) {
this.actionHistory[i].IsFavorite = true; this.actionHistory[i].IsFavorite = true;
}else{ } else {
this.actionHistory[i].IsFavorite = false; this.actionHistory[i].IsFavorite = false;
} }
}); });
} }
this.counter = 1; this.counter = 1;
} else if (selectValue === '4') { } else if (selectValue === '4') {
@ -474,9 +481,9 @@ export class WorkListReplacementRollComponent implements OnInit {
this.ReplacementList = []; this.ReplacementList = [];
clearTimeout(this.typingTimer); clearTimeout(this.typingTimer);
// this.typingTimer = setTimeout(() => { // this.typingTimer = setTimeout(() => {
// if (this.inputSearch.length > 2) { // if (this.inputSearch.length > 2) {
this.getreplacmentemployee(); this.getreplacmentemployee();
// } // }
// }, 3000); // }, 3000);
@ -490,26 +497,58 @@ export class WorkListReplacementRollComponent implements OnInit {
} }
getPlaceHolder() { getPlaceHolder() {
return this.searchBy === '1' ? return this.searchBy === '1' ?
this.ts.trPK('replacementRoll', 'searchbyname') : this.ts.trPK('replacementRoll', 'searchbyname') :
this.searchBy === '2' ? this.searchBy === '2' ?
this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyusername') :
this.ts.trPK('replacementRoll', 'searchbyemail'); this.ts.trPK('replacementRoll', 'searchbyemail');
} }
favLetter = [];
favIsActive = [];
getFavruite() { getFavruite() {
this.cs.startLoading(); this.cs.startLoading();
this.worklistService.getFavorite({}, () => { this.worklistService.getFavoriteWithoutImage({}, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.stopLoading(); // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; let favList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList; favList.forEach((obj) => {
this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true; obj.IsFavorite = true;
this.favLetter.push(obj.EMPLOYEE_DISPLAY_NAME.charAt(0).toUpperCase());
}); });
this.favLetter = this.favLetter.filter((elem, index, self) => {
return index === self.indexOf(elem);
});
if (this.activeSelectedLetter) {
this.selectedLetter(this.activeSelectedLetter);
} else {
this.favLetter.forEach((obj, index) => {
if(this.activeSelectedLetter) {}
if (index === 0) {
this.selectedLetter(obj);
this.favIsActive.push(true);
} else {
this.favIsActive.push(false);
}
});
}
console.log(this.favLetter);
console.log(this.favIsActive);
} }
}); });
// this.worklistService.getFavorite({}, () => {
// }).subscribe((result) => {
// if (this.cs.validResponse(result)) {
// this.cs.stopLoading();
// this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
// this.listOfFav = this.favoriteUserList;
// this.favoriteUserList.forEach((obj) => {
// obj.IsFavorite = true;
// });
// }
// });
} }
saveUserFavruiteList(request, isFav: boolean) { saveUserFavruiteList(request, isFav: boolean) {
@ -523,7 +562,7 @@ export class WorkListReplacementRollComponent implements OnInit {
} }
this.getFavruite(); this.getFavruite();
} }
}) });
} }
setFavorite(selEmp) { setFavorite(selEmp) {
@ -586,6 +625,7 @@ export class WorkListReplacementRollComponent implements OnInit {
listOfRealted: any = []; listOfRealted: any = [];
listOfFav: any = []; listOfFav: any = [];
filterList(event) { filterList(event) {
const val = event.target.value; const val = event.target.value;
if (this.selectedType === 1) { if (this.selectedType === 1) {
@ -608,4 +648,30 @@ export class WorkListReplacementRollComponent implements OnInit {
return; return;
} }
} }
selectedLetter(el) {
this.favLetter.forEach((letter, index) => {
if (letter === el) {
this.favIsActive[index] = true;
this.activeSelectedLetter = el;
this.worklistService.getFavoriteByLetter(letter,() => {
}).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList'];
this.listOfFav = this.favoriteUserList;
this.favoriteUserList.forEach((obj) => {
obj.IsFavorite = true;
});
}
});
} else {
this.favIsActive[index] = false;
}
});
}
returnIsActiveFunction(i) {
return this.favIsActive[i];
}
} }

@ -54,6 +54,7 @@
<ion-select-option value="REQAPPRV">PR</ion-select-option> <ion-select-option value="REQAPPRV">PR</ion-select-option>
<ion-select-option value="INVMOA">MR</ion-select-option> <ion-select-option value="INVMOA">MR</ion-select-option>
<ion-select-option value="INVITEM">IC</ion-select-option> <ion-select-option value="INVITEM">IC</ion-select-option>
<ion-select-option value="STAMP">STAMP</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>

@ -15,7 +15,7 @@ export class WorklistAdvancedSearchComponent implements OnInit {
public inputSearch = ''; public inputSearch = '';
public selectedValue = ''; public selectedValue = '';
public notificationType = ''; public notificationType = '';
public itemType = ''; public itemType;
public direction: string; public direction: string;
constructor( constructor(

@ -47,8 +47,11 @@
<ion-row> <ion-row>
<!-- NOT ADDRESS & BASIC_DETAILS --> <!-- NOT ADDRESS & BASIC_DETAILS -->
<ion-col <ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' &&
*ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' && getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' "> getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'CONTACT' &&
getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">
<div *ngIf="showInformation"> <div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;" <p>{{'worklist, loading'| translate}} <img style="width: 3%;"
@ -171,7 +174,7 @@
<label class="colItemReq"> <label class="colItemReq">
Actual Swipe(s)</label> Actual Swipe(s)</label>
<br /> <br />
<ion-col size="6"> <ion-col size="6">
<label class="colItemReq"> <label class="colItemReq">
Start</label> Start</label>
<br /> <br />
@ -180,7 +183,7 @@
<label <label
*ngIf="item.SHT_ACTUAL_START_TIME == ''">--</label> *ngIf="item.SHT_ACTUAL_START_TIME == ''">--</label>
</ion-col> </ion-col>
<ion-col size="6"> <ion-col size="6">
<label class="colItemReq"> <label class="colItemReq">
End</label> End</label>
<br /> <br />
@ -291,9 +294,12 @@
</ion-item> </ion-item>
</ion-col> </ion-col>
<!-- IF BASIC_DETAILS --> <!-- IF BASIC_DETAILS OR ADDRESS OR CONTACT -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' || <ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' ||
getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS'"> getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS' ||
getPassNotificationDetails?.REQUEST_TYPE == 'CONTACT' &&
getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">
<div *ngIf="showInformation"> <div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;" <p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p> src="../assets/icon/progress-loading.gif" /></p>
@ -337,8 +343,67 @@
</ion-card> </ion-card>
</div> </div>
</ion-col> </ion-col>
</ion-row>
<!-- IF PHONE -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' &&
getPassNotificationDetails?.REQUEST_TYPE == 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">
<div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</div>
<div class="no-data-div" *ngIf="notificationBodyRes?.length === 0 && !showInformation">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;">
<ion-card-content>
<div>
<ion-row *ngFor="let item of notificationBodyRes;let i=index;">
<ion-col class="rowBorder" [hidden]="item.UPDATED_FLAG == 'N'">
<label class="colItemReq">{{item.PHONE_TYPE_MEANING}}</label>
<br />
<label>{{item.PROPOSED_PHONE_NUMBER}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
<!-- IF TERMINATION -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' &&
getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' &&
getPassNotificationDetails?.REQUEST_TYPE == 'TERMINATION'">
<div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</div>
<div class="no-data-div" *ngIf="notificationBodyRes?.length === 0 && !showInformation">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;">
<ion-card-content>
<div>
<ion-row *ngFor="let item of notificationBodyRes;let i=index;">
<ion-col class="rowBorder" [hidden]="item.UPDATED_FLAG == 'N'">
<label class="colItemReq">{{item.SEGMENT_PROMPT}}</label>
<br />
<label>{{item.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-col>
</ion-row>
</ion-grid> </ion-grid>
</ng-container> </ng-container>
</ion-slide> </ion-slide>

@ -288,6 +288,12 @@ export class WorklistMainComponent implements OnInit {
this.getStampMSNotification(this.WorkListBodyObj); this.getStampMSNotification(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'STAMP_NS') { } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'STAMP_NS') {
this.getStampNSNotification(this.WorkListBodyObj); this.getStampNSNotification(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'TERMINATION') {
this.getTerminationNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'PHONE_NUMBERS') {
this.getPhoneNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'CONTACT') {
this.getContactNotificationDetails(this.WorkListBodyObj);
} }
} }
@ -307,6 +313,30 @@ export class WorklistMainComponent implements OnInit {
}); });
} }
getTerminationNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getTerminationNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "TERMINATION");
});
}
getPhoneNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPhoneNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PHONE_NUMBERS");
});
}
getContactNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getContactNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "CONTACT");
});
}
getBasicDetailsNotification(notificationBodyObj) { getBasicDetailsNotification(notificationBodyObj) {
this.worklistMainService this.worklistMainService
.getBasicDetailNotificationBody(notificationBodyObj) .getBasicDetailNotificationBody(notificationBodyObj)
@ -421,6 +451,27 @@ export class WorklistMainComponent implements OnInit {
console.log(result); console.log(result);
} }
} }
else if (Type === "PHONE_NUMBERS"){
if (result.GetPhonesNotificationBodyList) {
this.notificationBodyRes =
result.GetPhonesNotificationBodyList;
console.log(result);
}
}
else if (Type === "TERMINATION"){
if (result.GetTermNotificationBodyList) {
this.notificationBodyRes =
result.GetTermNotificationBodyList;
console.log(result);
}
}
else if (Type === "CONTACT"){
if (result.GetContactNotificationBodyList) {
this.notificationBodyRes =
result.GetContactNotificationBodyList.ContactNotificationBody;
console.log(result);
}
}
} }
} //End handleWorkListBodyResult } //End handleWorkListBodyResult

@ -1176,7 +1176,7 @@ border:0px
} }
.logoHeader { .logoHeader {
max-width: 130%; max-width: 90%;
width: 130%; width: 130%;
border: 0px; border: 0px;
} }

Loading…
Cancel
Save