fixed all issues while making prod build

MOE_DEV_NEW_TEMPORARY_DESIGN
umasoodch 6 years ago
parent 4e3d0b0298
commit d31b76bc44

@ -75,7 +75,7 @@
(click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<button float-end [disabled]="!isResubmitEIT" class="attachImgBtn" (click)="delelteFile(attachRes)"><img
<button float-end class="attachImgBtn" (click)="delelteFile(attachRes)"><img
class="attachImg" src="../assets/imgs/deletegray.png"></button>
</ion-col>
@ -100,7 +100,7 @@
<ion-grid class="approvalList">
<div class="approvalTitle">{{'confirmAddEit, approverList' | translate}}</div>
<div class="noDataDiv" *ngIf="approversList?.length == 0">
<div class="noDataDiv" *ngIf="approversList.length == 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div style="background-color: white;border-radius: 32px;border: 1px solid #c8c4c4;" *ngIf="approversList?.length > 0">

@ -1,6 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ApproversList } from '../models/approvers';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { WorkListButtonRequest } from 'src/app/eit/models/NotificationButtonReq';
@ -16,23 +16,23 @@ import { WorkListAttachViewComponent } from 'src/app/notification/work-list-atta
import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
@Component({
selector: "app-absence-confirm",
templateUrl: "./absence-confirm.component.html",
styleUrls: ["./absence-confirm.component.scss"]
selector: 'app-absence-confirm',
templateUrl: './absence-confirm.component.html',
styleUrls: ['./absence-confirm.component.scss']
})
export class AbsenceConfirmComponent implements OnInit {
direction:string;
P_TransactionID: number;
approversList: ApproversList;
selEmp: string = "";
approversList = [];
selEmp: string = '';
respID: number;
absComments: string = "";
absComments: string = '';
selMenu: MenuResponse;
attachItems: any;
attachListDisplay: any;
isTrue: any = 0;
getPassNotificationDetails: any;
menuType: string = "";
menuType: string = '';
attachmentRes: any;
objIndex1: any;
attachListOver: any = [];
@ -63,7 +63,7 @@ export class AbsenceConfirmComponent implements OnInit {
true
);
this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
this.menuType = "E";
this.menuType = 'E';
this.respID = -999;
// this.getApproversList();
// console.log("this.getPassNotificationDetails.P_NOTIFICATION_ID :"+this.getPassNotificationDetails.NOTIFICATION_ID);
@ -130,7 +130,7 @@ export class AbsenceConfirmComponent implements OnInit {
return el.isSuccess == true;
});
this.attachListOver = filtered;
let msg: string = "";
let msg: string = '';
// msg = this.translate.translate("addAttach.errorMsg");
//this.common.showAlert(msg);
}
@ -168,7 +168,7 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.common.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitAbs==false){
let msg: string = this.ts.trPK("general", "messageSuccess");
let msg: string = this.ts.trPK('general', 'messageSuccess');
this.common.presentAlert(msg);
// }
@ -180,7 +180,7 @@ export class AbsenceConfirmComponent implements OnInit {
getApproversList() {
let body: any = {
P_TRANSACTION_ID: this.P_TransactionID,
P_AME_TRANSACTION_TYPE: "SSHRMS",
P_AME_TRANSACTION_TYPE: 'SSHRMS',
P_PAGE_NUM: 1,
P_PAGE_LIMIT: 1000
};
@ -210,7 +210,7 @@ export class AbsenceConfirmComponent implements OnInit {
});
modal.onDidDismiss()
.then((data) => {
if (data == "cancel" || data == "undefined") {
if (data == 'cancel' || data == 'undefined') {
return;
} else {
if (!str) {
@ -246,7 +246,7 @@ async openSubmitModal() {
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else {
this.startAbApproval();
@ -324,7 +324,7 @@ async openSubmitModal() {
this.submitConService.updateAttach(req).subscribe((result: any) => {
if (this.common.validResponse(result)) {
if (result.MessageStatus == 1) {
let msg: string = "";
let msg: string = '';
// msg = this.translate.translate("addAttach.attachUpdate");
// this.common.showAlert(msg);
@ -351,7 +351,7 @@ async openSubmitModal() {
};
this.submitConService.delteAttach(req).subscribe((result: any) => {
if (this.common.validResponse(result)) {
if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") {
if (result.DeleteAttachmentList.P_RETURN_STATUS === 'S') {
this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID);
// let msg: string = "";
// msg = this.translate.translate("addAttach.deleteAttach");
@ -391,8 +391,8 @@ async openSubmitModal() {
// this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = "";
msg = this.ts.trPK("general", "notSupport");
let msg: string = '';
msg = this.ts.trPK('general', 'notSupport');
this.common.presentAlert(msg);
return
} // todo: show alert that you tried uploading wrong files
@ -427,7 +427,7 @@ async openSubmitModal() {
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
console.log('before push: '+ this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');

@ -186,9 +186,9 @@ getAbsenceTransaction() {
}
}
}
doInfinite() {
doInfinite(event: any) {
if (!this.IsReachEnd) {
//this.P_PAGE_NUM++;
// this.P_PAGE_NUM++;
const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE,

@ -9,9 +9,9 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
styleUrls: ['./submit-absence-modal.component.scss'],
})
export class SubmitAbsenceModalComponent implements OnInit {
submitAbsAttachmentList :any =[];
submitAbsAttachmentList: any = [];
absComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
constructor( public ts: TranslatorService, private modalCtrl: ModalController, private cs: CommonService){
this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false);
this.absComments = this.cs.sharedService.getSharedData('absComments', false);
}

@ -1,21 +1,21 @@
import { Component, OnInit } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { ModalController } from "@ionic/angular";
import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component";
import { AbsenceAttahcment } from "../models/abs.attach";
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular';
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { AbsenceAttahcment } from '../models/abs.attach';
import { AbsenceAttahcmentResponse } from '../models/abs.attach.response';
@Component({
selector: "app-view-attachments",
templateUrl: "./view-attachments.component.html",
styleUrls: ["./view-attachments.component.scss"]
selector: 'app-view-attachments',
templateUrl: './view-attachments.component.html',
styleUrls: ['./view-attachments.component.scss']
})
export class ViewAttachmentsComponent implements OnInit {
AttachmentList: AbsenceAttahcment[];
constructor(
public common: CommonService,
public modalCtrl: ModalController,
private ts: TranslatorService
public ts: TranslatorService
) {}
ngOnInit() {
@ -26,7 +26,7 @@ export class ViewAttachmentsComponent implements OnInit {
async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData(
{ displayData: value, TypeData: Type },
"WorkListAttachViewPage"
'WorkListAttachViewPage'
);
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent

@ -33,7 +33,7 @@ export class HomeComponent implements OnInit {
}
});
}
private getAccrualBalance() {
public getAccrualBalance() {
if (this.Sdate) {
let today = new Date(this.Sdate);
let day = today.getDate();

@ -23,7 +23,7 @@
</div>
<div class="centerDiv homeBox" (click)="openPersonalInfo()">
<div class="centerDiv homeBox">
<div [ngClass]="direction==='ltr'? 'profileDiv':'profileDiv-ar'">
<!-- <ion-img class="profileImg" src="{{user_image}}"></ion-img> -->
<img class="profileImg" [src]="user_image">
@ -150,7 +150,7 @@
<div class="" style="text-align:center">
<img src="{{companyUrl}}" class="CompanyImg logoImg">
<p class="companyTxt">{{CompanyImageDescription}}</p>
<p class="companyTxt">{{companyDesc}}</p>
</div>
<div class="menuFooter">
<!-- <div> <img src="../assets/imgs/CS.png" class="CompanyImg"></div> -->

@ -1,6 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-home',
@ -9,39 +11,38 @@ import { ZBar, ZBarOptions } from '@ionic-native/zbar/ngx';
})
export class HomeComponent implements OnInit {
zbarOptions:any;
scannedResult:any;
lat : any;
longt : any;
constructor(private zbar: ZBar, private geolocation: Geolocation) {
zbarOptions: any;
scannedResult: any;
lat: any;
longt: any;
constructor(public ts: TranslatorService, private zbar: ZBar, private geolocation: Geolocation) {
this.zbarOptions = {
flash: 'off',
drawSight: false
}
console.log("your currnt location is");
};
console.log('your currnt location is');
this.geolocation.getCurrentPosition().then((resp) => {
// resp.coords.latitude
// resp.coords.longitude
//console.log("Loc 2");
// console.log("Loc 2");
console.log(resp.coords.latitude);
console.log(resp.coords.longitude);
this.lat=resp.coords.latitude;
this.longt=resp.coords.longitude;
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
}).catch((error) => {
console.log('Error getting location', error);
});
this.scanCode();
this.scanCode();
}
ngOnInit() {}
onClick()
{
onClick() {
this.scanCode();
}
scanCode(){
scanCode() {
this.zbar.scan(this.zbarOptions)
.then(result => {
console.log(result); // Scanned code

@ -44,7 +44,7 @@
</ion-row>
<ion-row [ngClass]=" accessFromOutSide ? 'rowOutside' : ''" [dir]="direction" class="zoomIn">
<ion-row [ngClass]=" accessFromOutSide ? 'rowOutside' : ''" class="zoomIn">
<ng-container *ngFor="let buttonsGroup of buttons">
<ng-container *ngFor="let button of buttonsGroup">

@ -59,7 +59,7 @@
</ion-item>
<div class="centerDiv signupDiv" *ngIf="isAppleStore==false">
<a (click)="signUp()">{{ts.trPK('login','signup')}}</a>
<a>{{ts.trPK('login','signup')}}</a>
</div>
<div class="gridDiv" aria-disabled="true">
<button class="gridBtn" ion-button (click)="changeLanguage()" [ngClass]="{'active':this.currentLang ==1}">English</button>

@ -1,56 +1,28 @@
import { Component, OnInit, NgZone, OnDestroy } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { Router } from "@angular/router";
import { AlertController, Platform, Events } from "@ionic/angular";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { CheckUserAuthenticationResponse } from "src/app/hmg-common/services/authentication/models/check-user-auth.response";
import { SmsReaderService } from "src/app/hmg-common/services/sms/sms-reader.service";
import { FingerprintAIO } from "@ionic-native/fingerprint-aio/ngx";
import { Device } from "@ionic-native/device/ngx";
import { SplashScreen } from "@ionic-native/splash-screen/ngx";
import { SharedDataService } from "src/app/hmg-common/services/shared-data-service/shared-data.service";
import { LoginModel } from "../models/LoginModel";
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
import { Component, OnInit, NgZone, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Router } from '@angular/router';
import { AlertController, Platform, Events } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { SmsReaderService } from 'src/app/hmg-common/services/sms/sms-reader.service';
import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
import { Device } from '@ionic-native/device/ngx';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { LoginModel } from '../models/LoginModel';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
import { Password } from '../models/password';
import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { PushService } from 'src/app/hmg-common/services/push/push.service';
@Component({
selector: "login",
templateUrl: "./login.component.html",
styleUrls: ["./login.component.scss"]
selector: 'login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit, OnDestroy {
appLang: number = 1;
isExpired: boolean = false;
isSupportAr: boolean = false;
isAppleStore: boolean = false;
memberLogin: any = {};
private password: string;
private language: string;
private username: string;
private remeberMe: boolean;
private iosLink: string;
private androidLink: string;
private currentLang: any = 1;
private patientOutSA: boolean;
private loginTokenID: string;
private isMobileFingerPrint: boolean;
private FingerPrintPatientIdentificationID: string;
private loginData = new LoginModel();
private empname:any;
private logintype:any;
public loginDiv:boolean =true;
public welcomeBack:boolean =false;
public logo = "assets/icon/login/password.png";
deviceToken: any="";
user: boolean =false;
DeviceType: string;
requestGetLoginInfo:any;
logoutFlage: boolean ;
getuser:any="";
constructor(
public cs: CommonService,
@ -60,20 +32,21 @@ export class LoginComponent implements OnInit, OnDestroy {
public ts: TranslatorService,
public smsService: SmsReaderService,
private faio: FingerprintAIO,
public events:Events,
public events: Events,
public ngZone: NgZone,
public device: Device,
public splash: SplashScreen,
public sharedData: SharedDataService,
public plt: Platform,
public pushService: PushService
) {
this.events.subscribe("logoutFlage", logoutFlage => {
console.log("login compont logoutFlage: "+logoutFlage);
if(logoutFlage == true){
console.log(" subscribe check logoutFlage: "+logoutFlage);
) {
this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage);
// tslint:disable-next-line: triple-equals
if (logoutFlage == true) {
console.log(' subscribe check logoutFlage: ' + logoutFlage);
this.logoutFlage = logoutFlage;
localStorage.setItem('logoutFlage',logoutFlage);
localStorage.setItem('logoutFlage', logoutFlage);
}
});
@ -82,20 +55,49 @@ export class LoginComponent implements OnInit, OnDestroy {
false
);
// alert(" this.getuser "+this.getuser);
if(this.getuser){
if (this.getuser) {
this.user = true;
}
else{
} else {
this.user = false;
}
}
appLang = 1;
isExpired = false;
isSupportAr = false;
isAppleStore = false;
memberLogin: any = {};
public password: string;
private language: string;
public username: string;
public remeberMe: boolean;
private iosLink: string;
private androidLink: string;
public currentLang: any = 1;
private patientOutSA: boolean;
private loginTokenID: string;
private isMobileFingerPrint: boolean;
private FingerPrintPatientIdentificationID: string;
private loginData = new LoginModel();
private empname: any;
private logintype: any;
public loginDiv = true;
public welcomeBack = false;
public logo = 'assets/icon/login/password.png';
deviceToken: any = '';
user = false;
DeviceType: string;
requestGetLoginInfo: any;
logoutFlage: boolean ;
getuser: any = '';
private checkUserResult: CheckUserAuthenticationResponse;
ngOnInit() {
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// console.log("get deviceToken login"+ this.deviceToken)
// this.getuser = this.cs.sharedService.getSharedData(
// AuthenticationService.IMEI_USER_DATA,
@ -108,61 +110,62 @@ export class LoginComponent implements OnInit, OnDestroy {
// }
this.events.subscribe("user", user => {
console.log("login compont: "+user);
this.events.subscribe('user', user => {
console.log('login compont: ' + user);
this.user = user;
});
this.deviceToken= localStorage.getItem('devicyeToken');
console.log("let deviceToken" + this.deviceToken);
if (this.deviceToken) {
this.deviceToken = localStorage.getItem('devicyeToken');
console.log('let deviceToken' + this.deviceToken);
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
} else {
console.log("no deviceToken" );
console.log('no deviceToken' );
this.pushService.startReceiving();
setTimeout(() => {
this.pushService.startReceiving();
setTimeout(() => {
// alert('login enabled second time: ' + this.deviceToken);
}, 1000);
}
// setTimeout(() => {
// alert("this.logoutFlage in setTime" +localStorage.getItem('logoutFlage'));
// alert("this.this.user in setTime" + this.user);
// if(localStorage.getItem('logoutFlage')== "true"){
// this.getLastLoginInfo();
// }
// },1000);
//here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem("user");
this.password = localStorage.getItem("password"); //****//
let remember = localStorage.getItem("remember");//****//
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
if (remember == "true") { this.remeberMe = true } else { this.remeberMe = false }
//here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
if(this.user){
// here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem('user');
this.password = localStorage.getItem('password'); // ****//
const remember = localStorage.getItem('remember'); // ****//
this.empname = localStorage.getItem('emp-name');
this.logintype = localStorage.getItem('login-type');
// tslint:disable-next-line: triple-equals
if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; }
// here will be check on user if exite then s part and depdding on user (response from getMobileInfo)
if (this.user) {
// this.loginDiv=false;
// this.welcomeBack=true;
}else{
} else {
// this.user=true;
// this.welcomeBack=false;
}
@ -180,14 +183,15 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public changeLanguage() {
this.ts.switchLanguage();
// tslint:disable-next-line: triple-equals
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = "US";
this.language = 'US';
} else {
this.language = "AR";
this.language = 'AR';
}
this.currentLang = TranslatorService.getCurrentLanguageCode();
}
private forgetPasswordPage() {
public forgetPasswordPage() {
this.cs.openUserForgot();
}
private hideSplashScreen(stopLoading = false) {
@ -198,15 +202,15 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public addValue(e): void {
// console.log(e.currentTarget.checked);
this.remeberMe = true;//e.currentTarget.checked;
// console.log(e.currentTarget.checked);
this.remeberMe = true; // e.currentTarget.checked;
this.remeberMyInfo();
}
public remeberMyInfo() {
// if (this.remeberMe) {
if(this.username){localStorage.setItem("user", this.username);}
if(this.password){localStorage.setItem("password", this.password);}
localStorage.setItem("remember", "true");
if (this.username) {localStorage.setItem('user', this.username); }
if (this.password) {localStorage.setItem('password', this.password); }
localStorage.setItem('remember', 'true');
// } else {
// localStorage.setItem("user", "");
// localStorage.setItem("password", "");
@ -215,21 +219,21 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public onLogin() {
console.log("onLogin");
console.log('onLogin');
// this.checkAppUpdated();
// this.checkUserAuthentication();
this.deviceToken = localStorage.getItem('deviceToken');
console.log("let deviceToken" + this.deviceToken);
this.deviceToken = localStorage.getItem('deviceToken');
console.log('let deviceToken' + this.deviceToken);
if (this.deviceToken) {
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
this.checkAppUpdated();
} else {
console.log("no deviceToken" );
console.log('no deviceToken' );
this.pushService.startReceiving();
setTimeout(() => {
this.pushService.startReceiving();
setTimeout(() => {
this.deviceToken = localStorage.getItem('deviceToken');
this.checkAppUpdated();
console.log('login enabled second time: ' + this.deviceToken);
@ -242,31 +246,34 @@ export class LoginComponent implements OnInit, OnDestroy {
() => {
/* Write code for error */
}).subscribe((result: CheckAppVersionResponse) => {
// tslint:disable-next-line: triple-equals
if (result.MessageStatus == 2 && result.ErrorType == 4) {
this.cs.presentAcceptDialog(result.ErrorEndUserMessage,()=>{
this.handleAppUpdate(result)
this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
this.handleAppUpdate(result);
});
// tslint:disable-next-line: triple-equals
} else if (result.MessageStatus == 1) {
this.checkUserAuthentication();
}
});
}
private handleAppUpdate(result){
private handleAppUpdate(result) {
this.iosLink = result.IOSLink;
this.androidLink = result.AndroidLink;
if (this.plt.is('android')) {
if (this.androidLink)
if (this.androidLink) {
window.open(this.androidLink, '_system');
}
else if (this.plt.is('ios')) {
if (this.iosLink)
}
} else if (this.plt.is('ios')) {
if (this.iosLink) {
window.open(this.iosLink, '_system');
}
}
}
private checkUserAuthentication() {
console.log("debug Here!!");
console.log('debug Here!!');
console.log(this.username);
console.log(this.language);
console.log(this.password);
@ -279,13 +286,13 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log(request);
this.authService
.login(request, () => {
console.log("error here");
//console.log(result.MessageStatus);
//this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW);
//this.userCheck();
}, this.ts.trPK("general", "ok"))
console.log('error here');
// console.log(result.MessageStatus);
// this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW);
// this.userCheck();
}, this.ts.trPK('general', 'ok'))
.subscribe((result: CheckUserAuthenticationResponse) => {
console.log("success");
console.log('success');
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME);
@ -297,14 +304,14 @@ export class LoginComponent implements OnInit, OnDestroy {
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo();
//this.cs.openSMSPage(); phase#1 one type of OTP
// this.cs.openSMSPage(); phase#1 one type of OTP
// if(!this.welcomeBack){
this.cs.openConfirmLoginPage();//phase#2 add 4 types for OTP
this.cs.openConfirmLoginPage(); // phase#2 add 4 types for OTP
// }
} else {
console.log("result.IsPasswordExpired");
console.log('result.IsPasswordExpired');
console.log(result.IsPasswordExpired);
if (result.IsPasswordExpired) {
this.presentPasswordExpiredDialog();
@ -319,11 +326,11 @@ export class LoginComponent implements OnInit, OnDestroy {
async presentPasswordExpiredDialog() {
const alert = await this.alertController.create({
header: this.ts.trPK("general", "confirm"),
message: this.ts.trPK("login", "password-expired"),
header: this.ts.trPK('general', 'confirm'),
message: this.ts.trPK('login', 'password-expired'),
buttons: [
{
text: this.ts.trPK("general", "ok"),
text: this.ts.trPK('general', 'ok'),
handler: () => {
console.log('Confirm Okay');
this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW);
@ -356,23 +363,21 @@ export class LoginComponent implements OnInit, OnDestroy {
});
}
private checkUserResult: CheckUserAuthenticationResponse;
private sendSMSForForgotPassword() {
this.cs.startLoading();
let changePwdObj = new LoginRequest();
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();
// 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('2');
console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
@ -388,31 +393,31 @@ export class LoginComponent implements OnInit, OnDestroy {
}
login() {
console.log("login emit");
console.log("login");
// this.checkUserAuthentication();
//this.loginDiv=true;
this.user=false;
console.log('login emit');
console.log('login');
// this.checkUserAuthentication();
// this.loginDiv=true;
this.user = false;
}
loginWithUser() {
console.log("loginWithUser")
console.log('loginWithUser');
this.cs.openConfirmLoginPage();
}
///
getLastLoginInfo(){
this.requestGetLoginInfo= {
DeviceType:this.cs.getDeviceType(),//"Android",//this.cs.getDeviceType(),
DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
}
this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
getLastLoginInfo() {
this.requestGetLoginInfo = {
DeviceType: this.cs.getDeviceType(), // "Android",//this.cs.getDeviceType(),
DeviceToken: this.deviceToken// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
};
this.authService.getLoginInfo(this.requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
if(res.Mohemm_GetMobileLoginInfoList.length > 0){
if (res.Mohemm_GetMobileLoginInfoList.length > 0) {
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
@ -421,15 +426,14 @@ export class LoginComponent implements OnInit, OnDestroy {
);
this.user = true;
}
else{
this.user=false
} else {
this.user = false;
}
}
});
}
}

@ -24,7 +24,7 @@ export class ConfirmAddEitComponent implements OnInit {
private P_TransactionID: number;
private eitRequest: EitRequest;
approversList: ApproversList;
approversList = [];
addrespList: any;//EitRespModel;
eitComments: string = "";
menuType: string = "";
@ -36,7 +36,7 @@ export class ConfirmAddEitComponent implements OnInit {
headerTitle: string = "";
isTrue: any = 0;
attachItems: any;
private isResubmitEIT: boolean = false;
public isResubmitEIT: boolean = false;
private itemKey: string = "";
private pActionMode: string = "SUBMIT";
attachReqObj: WorkListButtonRequest = new WorkListButtonRequest();

@ -19,27 +19,26 @@ export class EitListComponent implements OnInit {
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
IsReachEnd: boolean = false;
IsReachEnd = false;
userName: any;
isDelete: boolean = false;
isDelete = false;
getResEITTransactionList: any = [];
eitAddedList: any = [];
getPassMnuEntryObj: any;
selMenu: MenuResponse = new MenuResponse();
//getMenuResponse :MenuResponse=new MenuResponse
EITTransactionsListObj: EITTransactionsRequest = new EITTransactionsRequest();
selEmp: string;
respID: number;
transactionNo: number = 0;
menuType: string = "";
private functionName: string = "";
transactionNo = 0;
menuType = '';
public functionName = '';
private eitRequest: EitRequest;
private eitTransactionTbl: any = [];
private validEitTransactionTbl: any = [];
private desxFlexCode: string = "";
private desxFlexCode = '';
private selectedIndex: number;
private pAction: number = 0;
public headerTitle: string = "";
private pAction = 0;
public headerTitle = '';
data: any;
accrualNetInfants: any;
accrualUNetChild: any;
@ -49,15 +48,16 @@ export class EitListComponent implements OnInit {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
gaugeType = 'full';
accrualBalancesList: any;
common: any;
direction: string;
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(private cs: CommonService, private EITService: EitService, private ts: TranslatorService, private modalCtrl: ModalController) {
this.direction = TranslatorService.getCurrentLanguageName()
// tslint:disable-next-line: max-line-length
constructor(private cs: CommonService, private EITService: EitService, public ts: TranslatorService, private modalCtrl: ModalController) {
this.direction = TranslatorService.getCurrentLanguageName();
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
@ -65,32 +65,31 @@ export class EitListComponent implements OnInit {
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
this.transactionNo = 0;
this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME;
console.log("fN>>>>>>>>>>>>>>>>>"+this.functionName);
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.validEitTransactionTbl = [];
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
}
ngOnInit() {
ngOnInit() {
this.getEITTransactions();
this.accrualBalancesList = this.cs.sharedService.getSharedData('tickitsbalance', false);
// accrualNetInfants
// accrualUNetChild
// accrualNetAdult
this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
this. accrualNetInfants= this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
this. accrualNetInfants = this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [
'#1FA269',
'#22C6B3',
'#3CB9D5',],
'#22C6B3',
'#3CB9D5', ],
borderWidth: 2
}
]
@ -98,7 +97,7 @@ export class EitListComponent implements OnInit {
}
getEITTransactions() {
console.log("jkfdjkdfsffjhfsdahffg");
console.log('jkfdjkdfsffjhfsdahffg');
this.IsReachEnd = false;
this.EITTransactionsListObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.EITTransactionsListObj.P_PAGE_NUM = this.P_PAGE_NUM;
@ -118,9 +117,10 @@ export class EitListComponent implements OnInit {
this.getResEITTransactionList = result.GetEITTransactionList;
this.P_PAGE_NUM++;
this.EITTransactionsListObj.P_PAGE_NUM = this.P_PAGE_NUM;
let lastItemIndex = this.getResEITTransactionList.length - 1;
const lastItemIndex = this.getResEITTransactionList.length - 1;
if (result.GetEITTransactionList[lastItemIndex] && result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0]) {
let lastitem = result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0];
const lastitem = result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0];
// tslint:disable-next-line: triple-equals
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
@ -152,31 +152,33 @@ export class EitListComponent implements OnInit {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll)
// this.P_PAGE_NUM++;
if (infiniteScroll) {
infiniteScroll.target.complete();
}
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
} else {
if (infiniteScroll)
if (infiniteScroll) {
infiniteScroll.target.complete();
}
}
}
addEITRrq(i) {
addEITRrq(i?) {
this.pAction = EIT_ACTION.ADD;
// this.sharedData.setSharedData(this.getResEITTransactionList[i].Collection_Transaction,EITTransactionsRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
// this.navCtrl.push("AddEitPage");
//this.openEit(i);
// this.openEit(i);
this.openEitNew(i);
}
updateEITRrq(i) {
this.pAction = EIT_ACTION.UPDATE;
this.cs.sharedService.setSharedData(this.getResEITTransactionList[i].Collection_Transaction, EITTransactionsRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
//this.fillEitTransactionTable(i);
//this.navCtrl.push("AddEitPage");
//this.openEit(i);
// this.fillEitTransactionTable(i);
// this.navCtrl.push("AddEitPage");
// this.openEit(i);
this.openEitNew(i);
}
deleteEIT(i) {
@ -190,21 +192,22 @@ export class EitListComponent implements OnInit {
}
deleteEITRrq(i) {
let list: any = this.getResEITTransactionList[i];
const list: any = this.getResEITTransactionList[i];
// tslint:disable-next-line: triple-equals
if (list.statusID != 2) {
this.selectedIndex = i;
// if(this.transactionNo==0)
this.transactionNo++;
this.pAction = EIT_ACTION.DELETE;
//this.sharedData.setSharedData(this.getResEITTransactionList[i].Collection_Transaction,EITTransactionsRequest.SHARED_DATA);
// this.sharedData.setSharedData(this.getResEITTransactionList[i].Collection_Transaction,EITTransactionsRequest.SHARED_DATA);
// this.sharedData.setSharedData(EIT_ACTION.DELETE,EITTransactionsRequest.SUBMIT_EIT_ACTION);
this.fillEitTransactionTable(i);
this.validateEITTransaction();
// this.submitEit();
//this.navCtrl.push("AddEitPage");
// this.navCtrl.push("AddEitPage");
} else {
let msg: string = "";
msg = this.ts.trPK("general", "attemptDel");
let msg = '';
msg = this.ts.trPK('general', 'attemptDel');
this.cs.presentAlert(msg);
// alert("You are attempting to delete a row that has already been deleted.");
@ -212,19 +215,24 @@ export class EitListComponent implements OnInit {
}
openEitNew(index) {
let item: any = [];
if (this.pAction == EIT_ACTION.UPDATE)
if (this.pAction == EIT_ACTION.UPDATE) {
item = this.getResEITTransactionList[index].Collection_Transaction;
}
this.transactionNo++;
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData')
// tslint:disable-next-line: max-line-length
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData');
this.cs.openAddEitPage();
// this.navCtrl.push('AddEitPage', { dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo });
}
async openEit(index) {
let item: any = [];
if (this.pAction == EIT_ACTION.UPDATE)
// tslint:disable-next-line: triple-equals
if (this.pAction == EIT_ACTION.UPDATE) {
item = this.getResEITTransactionList[index].Collection_Transaction;
}
this.transactionNo++;
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData')
// tslint:disable-next-line: max-line-length
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData');
const modalPage = await this.modalCtrl.create({
component: AddEitComponent
});
@ -234,26 +242,29 @@ export class EitListComponent implements OnInit {
.then((data: any) => {
if (data) {
// this.transactionNo++;
//this.updatedData=this.updatedData?this.updatedData.concat(data.updated):data.updated;
// this.updatedData=this.updatedData?this.updatedData.concat(data.updated):data.updated;
// this.notificationBodyRes[index].Collection_Transaction=data.updated;
this.selectedIndex = index;
this.desxFlexCode = data.eitRequest.P_DESC_FLEX_CONTEXT_CODE;
// tslint:disable-next-line: triple-equals
if (this.pAction == EIT_ACTION.ADD) {
index = this.eitAddedList.length + 1;
let status = this.ts.trPK("eit", ".added");
let statusID = EIT_ACTION.ADD;
let obj = { status: status, statusID: statusID, Collection_Transaction: data.updated };
const status = this.ts.trPK('eit', '.added');
const statusID = EIT_ACTION.ADD;
const obj = { status, statusID, Collection_Transaction: data.updated };
this.eitAddedList.push(obj);
} else {
let status = this.ts.trPK("eit", ".updated");
let statusID = EIT_ACTION.UPDATE;
const status = this.ts.trPK('eit', '.updated');
const statusID = EIT_ACTION.UPDATE;
this.getResEITTransactionList[this.selectedIndex].status = status;
this.getResEITTransactionList[this.selectedIndex].statusID = statusID;
}
this.updateTransactionList(data.eitRequest.EITTransactionTBL, false);
} else {
if (this.transactionNo != 0)
// tslint:disable-next-line: triple-equals
if (this.transactionNo != 0) {
this.transactionNo--;
}
}
});
@ -288,14 +299,18 @@ export class EitListComponent implements OnInit {
}
fillEitTransactionTable(index) {
var obj = { peiObjVer: null, peiExtraInfoID: null };
let list: any = this.getResEITTransactionList[index].Collection_Transaction;
let obj = { peiObjVer: null, peiExtraInfoID: null };
const list: any = this.getResEITTransactionList[index].Collection_Transaction;
let valuseArr: any = [];
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < list.length; i++) {
let item = list[i];
if (item.APPLICATION_COLUMN_NAME != "PEI_ACTION" && item.APPLICATION_COLUMN_NAME != "PEI_EXTRA_INFO_ID" && item.APPLICATION_COLUMN_NAME != "PEI_OBJECT_VERSION_NUMBER") {
const item = list[i];
// tslint:disable-next-line: triple-equals
// tslint:disable-next-line: max-line-length
if (item.APPLICATION_COLUMN_NAME != 'PEI_ACTION' && item.APPLICATION_COLUMN_NAME != 'PEI_EXTRA_INFO_ID' && item.APPLICATION_COLUMN_NAME != 'PEI_OBJECT_VERSION_NUMBER') {
this.desxFlexCode = item.DESC_FLEX_CONTEXT_CODE;
if (item.DATE_VALUE == "") {
// tslint:disable-next-line: triple-equals
if (item.DATE_VALUE == '') {
item.DATE_VALUE = null;
}
valuseArr.push(
@ -306,17 +321,19 @@ export class EitListComponent implements OnInit {
NUMBER_VALUE: item.NUMBER_VALUE,
DATE_VALUE: item.DATE_VALUE,
}
)
);
} else {
if (item.APPLICATION_COLUMN_NAME == "PEI_OBJECT_VERSION_NUMBER")
if (item.APPLICATION_COLUMN_NAME == 'PEI_OBJECT_VERSION_NUMBER') {
obj.peiObjVer = item.NUMBER_VALUE;
else if (item.APPLICATION_COLUMN_NAME == "PEI_EXTRA_INFO_ID")
}
else if (item.APPLICATION_COLUMN_NAME == 'PEI_EXTRA_INFO_ID') {
obj.peiExtraInfoID = item.NUMBER_VALUE;
}
}
}// end for
//}
valuseArr = this.fillExtraInformation(valuseArr, "DELETE_ROW", obj.peiExtraInfoID, obj.peiObjVer, this.transactionNo);
}// end for
// }
valuseArr = this.fillExtraInformation(valuseArr, 'DELETE_ROW', obj.peiExtraInfoID, obj.peiObjVer, this.transactionNo);
this.eitTransactionTbl = valuseArr;
}
@ -324,7 +341,7 @@ export class EitListComponent implements OnInit {
values.push(
{
TRANSACTION_NUMBER: transNo,
NAME: "PEI_ACTION",
NAME: 'PEI_ACTION',
VARCHAR2_VALUE: peiAction,
NUMBER_VALUE: null,
DATE_VALUE: null
@ -332,7 +349,7 @@ export class EitListComponent implements OnInit {
values.push(
{
TRANSACTION_NUMBER: transNo,
NAME: "PEI_EXTRA_INFO_ID",
NAME: 'PEI_EXTRA_INFO_ID',
VARCHAR2_VALUE: null,
NUMBER_VALUE: peiExtraInfoID,
DATE_VALUE: null
@ -340,7 +357,7 @@ export class EitListComponent implements OnInit {
values.push(
{
TRANSACTION_NUMBER: transNo,
NAME: "PEI_OBJECT_VERSION_NUMBER",
NAME: 'PEI_OBJECT_VERSION_NUMBER',
VARCHAR2_VALUE: null,
NUMBER_VALUE: peiObjVer,
DATE_VALUE: null
@ -351,11 +368,11 @@ export class EitListComponent implements OnInit {
submitEit() {
this.eitRequest = new EitRequest();
let list: any = this.fixTransactionNo();
const list: any = this.fixTransactionNo();
this.eitRequest.EITTransactionTBL = list;
this.eitRequest.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
this.eitRequest.P_MENU_TYPE = this.menuType;
this.eitRequest.P_SELECTED_RESP_ID = this.respID;//this.selMenu.List_Menu.RESP_ID,//-999,
this.eitRequest.P_SELECTED_RESP_ID = this.respID; // this.selMenu.List_Menu.RESP_ID,//-999,
this.eitRequest.P_FUNCTION_NAME = this.functionName;
this.eitRequest.P_DESC_FLEX_CONTEXT_CODE = this.desxFlexCode;
@ -367,14 +384,14 @@ export class EitListComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.cs.sharedService.setSharedData(this.eitRequest, EitRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(result, AddEitResponse.SHARED_DATA);
//this.addrespList=result.SubmitEITTransactionList;
// this.addrespList=result.SubmitEITTransactionList;
// this.itemKey=this.addrespList.P_ITEM_KEY;
// this.P_TransactionID=result.SubmitEITTransactionList.P_TRANSACTION_ID;
// this.sharedData.setSharedData(result,AddEitResponse.SHARED_DATA);
// //this.cs.sharedService.setSharedData(result.SubmitEITTransactionList.P_TRANSACTION_ID,"TransactionIDResubmit");
// // this.sharedData.setSharedData(this.eitRequest,EitRequest.SHARED_DATA);
this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData')
this.cs.sharedService.setSharedData({ isResubmit: false, isDelete: this.isDelete }, 'confirmAddEITData');
this.cs.openConfirmEitPage();
// this.navCtrl.push("ConfirmAddEitPage", { isResubmit: false, isDelete: this.isDelete });
}
@ -388,7 +405,7 @@ export class EitListComponent implements OnInit {
P_FUNCTION_NAME: this.functionName,
P_DESC_FLEX_CONTEXT_CODE: this.desxFlexCode,
EITTransactionTBL: this.eitTransactionTbl
}
};
this.EITService.validateEITTransaction(this.eitRequest).subscribe((result: any) => {
this.handleEITValidateTr(result);
@ -397,22 +414,23 @@ export class EitListComponent implements OnInit {
private handleEITValidateTr(result) {
if (this.cs.validResponse(result)) {
// public static SHARED_DATA = 'login-request';
//this.sharedData.setSharedData(this.eitRequest, EitRequest.SHARED_DATA);
let status = this.ts.trPK("eit", ".deleted");
let statusID = EIT_ACTION.DELETE;
// this.sharedData.setSharedData(this.eitRequest, EitRequest.SHARED_DATA);
const status = this.ts.trPK('eit', '.deleted');
const statusID = EIT_ACTION.DELETE;
this.isDelete = true;
this.getResEITTransactionList[this.selectedIndex].status = status;
this.getResEITTransactionList[this.selectedIndex].statusID = statusID;
this.updateTransactionList(this.eitTransactionTbl, false);
this.submitEit();
} else {
if (this.transactionNo != 0)
if (this.transactionNo != 0) {
this.transactionNo--;
}
}
}
updateTransactionList(list, isRemove) {
//let newlist = this.validEitTransactionTbl.map(a => a.NAME='PEI_EXTRA_INFO_ID');
let isAnewRow: boolean = false;
// let newlist = this.validEitTransactionTbl.map(a => a.NAME='PEI_EXTRA_INFO_ID');
let isAnewRow = false;
let updateDelTransNo: number;
if (this.cs.hasData(this.validEitTransactionTbl)) {
this.validEitTransactionTbl.forEach(element => {
@ -426,42 +444,45 @@ export class EitListComponent implements OnInit {
}
list.forEach(element => {
// NAME=PEI_EXTRA_INFO_ID
//const index = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
// const index = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
// let newlist = this.validEitTransactionTbl.map(a => a.NAME==='PEI_EXTRA_INFO_ID');
if (isAnewRow == true) {
let index: number = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
//if(index!=-1)
//this.validEitTransactionTbl.splice(index, 1);
const index: number = this.validEitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
// if(index!=-1)
// this.validEitTransactionTbl.splice(index, 1);
} else {
let index: number = this.validEitTransactionTbl.findIndex(x => x.NAME === 'PEI_EXTRA_INFO_ID' && x.NUMBER_VALUE === element.NUMBER_VALUE);
const index: number = this.validEitTransactionTbl.findIndex(x => x.NAME === 'PEI_EXTRA_INFO_ID' && x.NUMBER_VALUE === element.NUMBER_VALUE);
if (index != -1) {
//this.validEitTransactionTbl.splice(index, 1);
if (!updateDelTransNo)
// this.validEitTransactionTbl.splice(index, 1);
if (!updateDelTransNo) {
updateDelTransNo = this.validEitTransactionTbl[index].TRANSACTION_NUMBER;
}
}
}
});
if (updateDelTransNo)
if (updateDelTransNo) {
this.removeItems(updateDelTransNo);
if (isRemove == false)
}
if (isRemove == false) {
this.validEitTransactionTbl = this.validEitTransactionTbl ? this.validEitTransactionTbl.concat(list) : list;
}
}
fixTransactionNo(): any[] {
let list: any = [];
let newIndex: number = 1;
let length: number = this.validEitTransactionTbl.length;
const list: any = [];
let newIndex = 1;
const length: number = this.validEitTransactionTbl.length;
for (let i = 0; i < length; i++) {
// let item :any={};
const item = Object.assign({}, this.validEitTransactionTbl[i]);
let transNo: number = item.TRANSACTION_NUMBER;
let obj: any = item;
const transNo: number = item.TRANSACTION_NUMBER;
const obj: any = item;
if (i == 0) {
obj.TRANSACTION_NUMBER = newIndex;
list.push(obj);
} else {
let prevEl: any = this.validEitTransactionTbl[i - 1].TRANSACTION_NUMBER;
const prevEl: any = this.validEitTransactionTbl[i - 1].TRANSACTION_NUMBER;
if (transNo == prevEl) {
obj.TRANSACTION_NUMBER = newIndex;
list.push(obj);
@ -475,19 +496,21 @@ export class EitListComponent implements OnInit {
return list;
}
removeItems(transNo) {
let list = [];
const list = [];
for (let i = 0; i < this.validEitTransactionTbl.length; i++) {
if (this.validEitTransactionTbl[i].TRANSACTION_NUMBER != transNo)
if (this.validEitTransactionTbl[i].TRANSACTION_NUMBER != transNo) {
list.push(this.validEitTransactionTbl[i]);
}
}
this.validEitTransactionTbl = list;
}
removeAddedItem(index) {
let list = [];
const list = [];
let item: any = [];
for (let i = 0; i < this.eitAddedList.length; i++) {
if (i != index)
if (i != index) {
list.push(this.eitAddedList[i]);
}
}
item = this.eitAddedList[index];
this.eitAddedList = list;

@ -15,7 +15,7 @@
<!--From Home List-->
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" [hidden]="pageType=='myteam'" *ngIf="pageType=='home'">
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" *ngIf="pageType=='home'">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu.children; let i=index"
(click)="openPage(menuItem, i);">
<ion-row style="width: 100%;">
@ -33,7 +33,7 @@
<!-- Child Pages -->
<ion-list [hidden]="selectedMenu != i" lines="full">
<ion-item lines="full" class="" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
(click)="openPage(subPage)">
(click)="openPage(subPage, i2)">
<!-- <ion-row>
<ion-col size="10" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span> -->
<ion-label><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span>
@ -54,7 +54,7 @@
<!--From My Team List-->
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" [hidden]="pageType=='home'" *ngIf="pageType=='myteam'">
<ion-list style="margin-top: 40px;border-top: 1px solid #c8c8c8;" *ngIf="pageType=='myteam'">
<ion-item lines="none" class="custCollabs ion-item-styling" *ngFor="let menuItem of menu; let i=index"
(click)="openPage(menuItem, i);">
<ion-row style="width: 100%;">
@ -72,7 +72,7 @@
<!-- Child Pages -->
<ion-list [hidden]="selectedMenu != i" lines="full">
<ion-item lines="full" class="" *ngFor="let subPage of menuItem.children;let i2=index" text-wrap
(click)="openPage(subPage)">
(click)="openPage(subPage, i2)">
<!-- <ion-row>
<ion-col size="10" class="menu-name"><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span> -->
<ion-label><span ion-text color="color2">&nbsp;{{subPage.PROMPT}} </span>

@ -17,10 +17,10 @@ export class HomeComponent implements OnInit {
// Selected Side Menu
selectedMenu: any;
direction: string;
pageType :string;
pageType: string;
constructor(private cs: CommonService, private ts: TranslatorService) {
this.direction = TranslatorService.getCurrentLanguageName()
this.direction = TranslatorService.getCurrentLanguageName();
this.menu = this.cs.sharedService.getSharedData('menuEntries', false);
this.pageType = this.cs.sharedService.getSharedData('homemenuentries', false);
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
@ -44,7 +44,7 @@ export class HomeComponent implements OnInit {
this.selectedMenu = index;
}
}
console.log("selected>>>>>>>"+this.selectedMenu);
console.log('selected>>>>>>>' + this.selectedMenu);
}
goToRequest(menuEntry) {
@ -57,7 +57,7 @@ export class HomeComponent implements OnInit {
} else if (menuEntry.REQUEST_TYPE === 'EIT') {
this.cs.openEitListPage();
}
if (menuEntry.REQUEST_TYPE === 'PAYSLIP'){
if (menuEntry.REQUEST_TYPE === 'PAYSLIP') {
this.cs.openPayslipPage();
}
if (menuEntry.REQUEST_TYPE === 'TIME_CARD') {

@ -11,7 +11,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
export class SubmitEitModalComponent implements OnInit {
submitAttachmentList :any =[];
eitComments: string;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
constructor( public ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){
this.submitAttachmentList = this.cs.sharedService.getSharedData('submitAttachmentList', false);
this.eitComments = this.cs.sharedService.getSharedData('eitComments', false);
}

@ -55,7 +55,7 @@ import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component';
import { PageTrailerComponent } from './ui/spacer/page-trailer/page-trailer.component';
// import { GeofencingService } from './services/geofencing/geofencing.service';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { ButtonComponent } from './ui/button/button.component';
import { ButtonComponent, Modal } from './ui/button/button.component';
import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component';
import { ListboxModule } from 'primeng/listbox';
import { GenderSelectComponent } from './ui/gender-select/gender-select.component';
@ -91,7 +91,8 @@ import { RateService } from './services/rate/rate.service';
// import { PaymentService } from './ui/payment/service/payment.service';
import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
import { FileSelectDirective } from 'ng2-file-upload';
import { FileUploadModule } from 'ng2-file-upload';
// import { FileSelectDirective } from 'ng2-file-upload';
import { PdfViewerModule } from 'ng2-pdf-viewer';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
@ -129,7 +130,8 @@ import { ChartModule } from 'primeng/chart';
NgCircleProgressModule.forRoot(),
NgCalendarModule,
ChartModule,
NgxGaugeModule
NgxGaugeModule,
FileUploadModule
],
declarations: [
FabButtonComponent,
@ -183,7 +185,7 @@ import { ChartModule } from 'primeng/chart';
DetailButtonComponent,
HeaderButtonComponent,
ReplacementListComponent,
FileSelectDirective,
// FileSelectDirective,
WorkListAttachViewComponent,
FileUploderProfileComponent,
AccordinTabCustomComponent,
@ -195,8 +197,8 @@ import { ChartModule } from 'primeng/chart';
EmployeeInformationComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent
DateInfoModalComponent,
Modal
],
exports: [
FabButtonComponent,
@ -247,7 +249,7 @@ import { ChartModule } from 'primeng/chart';
DetailButtonComponent,
HeaderButtonComponent,
ReplacementListComponent,
FileSelectDirective,
// FileSelectDirective,
WorkListAttachViewComponent,
FileUploderProfileComponent,
AccordinTabCustomComponent,
@ -264,8 +266,9 @@ import { ChartModule } from 'primeng/chart';
CircleCalendarComponent,
DateInfoModalComponent,
NgCalendarModule,
ChartModule
ChartModule,
FileUploadModule,
Modal
],
providers: [
AttendScanService,

@ -1,5 +1,5 @@
<calendar #slider [dateFormatter]="calendar.dateFormatter"
<calendar #slider
[monthviewEventDetailTemplate]="template"
[calendarMode]="calendar.mode"
[currentDate]="currentDateParent"

@ -89,7 +89,7 @@ export class FileUploaderComponent implements OnInit {
const fileInput = this.getFileElement();
fileInput.click();
}
private deleteFiles(index: number) {
public deleteFiles(index: number) {
this.inputFiles.splice(index, 1);
this.fileSelected.emit( {
name: null,

@ -26,11 +26,10 @@
<div *ngIf="data" class="uploader-icons">
<!-- <div *ngIf="data" class="uploader-icons">
<ion-item lines="none">
<p slot="start"> <img [src]="attachmentImg" /> {{data.name}}</p>
<p slot="end"><img [src]="deleteImg" (click)="deleteFiles(i)"></p>
</ion-item>
</div>
</div> -->

@ -1,13 +1,11 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ActionSheetController,Events, NavController } from '@ionic/angular';
import {CameraOptions,Camera,PictureSourceType} from '@ionic-native/Camera/ngx';
// import { FileChooser } from '@ionic-native/file-chooser';
import { FilePath } from "@ionic-native/file-path/ngx";
import { File } from "@ionic-native/file/ngx";
import { ActionSheetController, Events, NavController } from '@ionic/angular';
import {CameraOptions, Camera, PictureSourceType} from '@ionic-native/Camera/ngx';
import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx';
import { TranslatorService } from '../../services/translator/translator.service';
import { Base64 } from "@ionic-native/base64/ngx";
import { Base64 } from '@ionic-native/base64/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
// import { Chooser } from '@ionic-native/chooser';
@Component({
selector: 'app-file-uploder-profile',
@ -15,7 +13,6 @@ import { DevicePermissionsService } from '../../services/device-permissions/devi
styleUrls: ['./file-uploder-profile.component.scss'],
})
export class FileUploderProfileComponent implements OnInit {
@Input() multiupload = false;
@Input() attachmentname = 'attachment-loader';
public attachmentData: string;
@ -26,22 +23,22 @@ export class FileUploderProfileComponent implements OnInit {
public attachmentImg = 'assets/icon/attachment.png';
public deleteImg = 'assets/icon/delete.png';
public defultProfile = '../../../../assets/imgs/profile.png';
public selectedImage:any;
public selectedImage: any;
public nativePath: any;
public errorMsg:any;
public allowdType: any = ["jpg", "jpeg", "png"];
camera: boolean
constructor(
public cameraController:Camera,
public actionSheetCtrl:ActionSheetController,
public event:Events,
public errorMsg: any;
public allowdType: any = ['jpg', 'jpeg', 'png'];
camera: boolean;
constructor(
public cameraController: Camera,
public actionSheetCtrl: ActionSheetController,
public event: Events,
public nav: NavController,
private filePath: FilePath,
// public FileChooser:FileChooser,
private file: File,
public ts: TranslatorService,
public base64:Base64,
public base64: Base64,
private permissions: DevicePermissionsService
// private chooser: Chooser
@ -60,10 +57,10 @@ export class FileUploderProfileComponent implements OnInit {
return this.image;
}
//open the presentsheet
//selected attach
//need convert
//insert or display
// open the presentsheet
// selected attach
// need convert
// insert or display
private permissionsToOpenCamera() {
this.permissions.requestCameraAutherization().then(granted => {
@ -75,8 +72,8 @@ export class FileUploderProfileComponent implements OnInit {
);
}
async openFile(){
async openFile() {
const actionSheet = await this.actionSheetCtrl.create({
header: 'Change Profile Photo',
buttons: [{
@ -96,7 +93,7 @@ export class FileUploderProfileComponent implements OnInit {
}
}, {
text: 'Choose from Library',
icon: 'images',
handler: () => {
@ -117,35 +114,35 @@ export class FileUploderProfileComponent implements OnInit {
}
public takePicture(sourceType: PictureSourceType) {
console.log("sourceType: "+sourceType);
console.log('sourceType: ' + sourceType);
const options: CameraOptions = {
quality: 50,
destinationType: this.cameraController.DestinationType.DATA_URL,
encodingType: this.cameraController.EncodingType.JPEG,
sourceType: sourceType,
correctOrientation:true,
sourceType,
correctOrientation: true,
targetWidth: 512,
targetHeight: 512
};
this.cameraController.getPicture(options).then(imageData => {
const data = "data:image/jpeg;base64," + imageData;
this.event.publish('Image', {message:"hello"});
this.selectedImage = "data:image/jpeg;base64, " + imageData;
this.cameraController.getPicture(options).then(imageData => {
const data = 'data:image/jpeg;base64,' + imageData;
this.event.publish('Image', {message: 'hello'});
this.selectedImage = 'data:image/jpeg;base64, ' + imageData;
this.onimgLoad.emit(this.selectedImage);
});
}
public deleteCurrent(){
public deleteCurrent() {
// send empty image
//this.onimgLoad.emit("");
console.log("deleteCurrent");
// this.onimgLoad.emit("");
console.log('deleteCurrent');
this.encodeFiles(this.defultProfile);
}
readFile(fileUrl: any) {
this.filePath.resolveNativePath(fileUrl).then(filePathResult => {
this.nativePath = filePathResult;
@ -155,7 +152,7 @@ export class FileUploderProfileComponent implements OnInit {
this.errorMsg = null;
this.encodeFiles(entry);
} else {
this.errorMsg = this.ts.trPK("general", "large-file");
this.errorMsg = this.ts.trPK('general', 'large-file');
}
});
});
@ -163,15 +160,15 @@ export class FileUploderProfileComponent implements OnInit {
}
encodeFiles(entry) {
alert("encodeFiles")
this.base64.encodeFile(entry).then(
alert('encodeFiles');
this.base64.encodeFile(entry).then(
(base64File: string) => {
// const type = this.nativePath.substr(
// this.nativePath.lastIndexOf(".") + 1
// );
alert("base64File 1" + base64File);
alert('base64File 1' + base64File);
// if (this.allowdType.includes(type.toLowerCase())) {
// } else {
@ -184,6 +181,6 @@ export class FileUploderProfileComponent implements OnInit {
}
);
}
}

@ -34,6 +34,7 @@ export class InternationalMobileComponent implements OnInit {
public options: OptionModel[];
private dataLoaded = false;
private phoneSetProgramatically = false;
public default = '';
@ViewChild( SearchableSelectComponent) searchableSelectComponent: SearchableSelectComponent;
constructor(
public cs: CommonService,

@ -25,12 +25,12 @@
<ion-item>
<!-- <ion-label>{{'verificationcode.verificationcode' | translate}}</ion-label> -->
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> -->
<ion-input required type="tel" [(ngModel)]="activationCode" placeholder="{{ts.trPK('verificationcode','verificationcode')}}"></ion-input>
<!-- <ion-input required type="tel" [(ngModel)]="activationCode" placeholder="{{ts.trPK('verificationcode','verificationcode')}}"></ion-input> -->
</ion-item>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<button ion-button (click)="checkVerificationCode()">{{'general.submit' | translate}}</button>
<!-- <button ion-button (click)="checkVerificationCode()">{{'general.submit' | translate}}</button> -->
</div>
</ion-footer>

@ -18,31 +18,14 @@ import { AlertController } from '@ionic/angular';
styleUrls: ['./sms.page.scss'],
})
export class SmsPage implements OnInit {
public timeInSeconds : number ;
public time : number;
public runTimer : boolean;
public static SHARED_DATA = 'h2o-login-details';
public hasStarted : boolean;
public countryCode: CountryCode;
public hasFinished : boolean;
public remainingTime : number;
public displayTime : string = "";
// public userData: UserDetailsModel;
public mobile : string;
public country_code : string;
public id : string;
public MobileNumber : string;
public token : string;
public resend : boolean = false;
public smc_code : any;
constructor(public cs: CommonService,
public ts: TranslatorService,
public alertController: AlertController,
public smsService: SmsReaderService,
public sharedData: SharedDataService,
private modalCtrl:ModalController,
private navParams: NavParams,
public smsservice: SMSService) {
public ts: TranslatorService,
public alertController: AlertController,
public smsService: SmsReaderService,
public sharedData: SharedDataService,
private modalCtrl: ModalController,
private navParams: NavParams,
public smsservice: SMSService) {
this.initTimer();
this.startTimer();
@ -59,13 +42,30 @@ export class SmsPage implements OnInit {
// }
// });
}
public static SHARED_DATA = 'h2o-login-details';
public timeInSeconds: number ;
public time: number;
public runTimer: boolean;
public hasStarted: boolean;
public countryCode: CountryCode;
public hasFinished: boolean;
public remainingTime: number;
public displayTime = '';
// public userData: UserDetailsModel;
public mobile: string;
// tslint:disable-next-line: variable-name
public country_code: string;
public id: string;
public MobileNumber: string;
public token: string;
public resend = false;
public smc_code: any;
ngOnInit() {
}
closeModal()
{
closeModal() {
this.modalCtrl.dismiss();
}
@ -74,8 +74,8 @@ export class SmsPage implements OnInit {
}
initTimer() {
if (!this.timeInSeconds) {
this.timeInSeconds = 60;
if (!this.timeInSeconds) {
this.timeInSeconds = 60;
}
this.time = this.timeInSeconds;
this.runTimer = false;
@ -84,22 +84,22 @@ export class SmsPage implements OnInit {
this.remainingTime = this.timeInSeconds;
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
}
startTimer() {
this.runTimer = true;
this.hasStarted = true;
this.resend = false;
this.timerTick();
}
pauseTimer() {
this.runTimer = false;
}
resumeTimer() {
this.startTimer();
}
timerTick() {
setTimeout(() => {
if (!this.runTimer) { return; }
@ -107,31 +107,29 @@ export class SmsPage implements OnInit {
this.displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
if (this.remainingTime > 0) {
this.timerTick();
}
else {
} else {
this.hasFinished = true;
this.resend = true;
}
}, 1000);
}
getSecondsAsDigitalClock(inputSeconds: number) {
var sec_num = parseInt(inputSeconds.toString(), 10); // don't forget the second param
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
var seconds = sec_num - (hours * 3600) - (minutes * 60);
var hoursString = '';
var minutesString = '';
var secondsString = '';
hoursString = (hours < 10) ? "0" + hours : hours.toString();
minutesString = (minutes < 10) ? "0" + minutes : minutes.toString();
secondsString = (seconds < 10) ? "0" + seconds : seconds.toString();
let sec_num = parseInt(inputSeconds.toString(), 10); // don't forget the second param
let hours = Math.floor(sec_num / 3600);
let minutes = Math.floor((sec_num - (hours * 3600)) / 60);
let seconds = sec_num - (hours * 3600) - (minutes * 60);
let hoursString = '';
let minutesString = '';
let secondsString = '';
hoursString = (hours < 10) ? '0' + hours : hours.toString();
minutesString = (minutes < 10) ? '0' + minutes : minutes.toString();
secondsString = (seconds < 10) ? '0' + seconds : seconds.toString();
return minutesString + ':' + secondsString;
}
validate()
{
//this.checkSMSActivationCode(this.smc_code);
validate() {
// this.checkSMSActivationCode(this.smc_code);
SMSService.code = this.smc_code;
this.stopSMSMonitoring();
this.modalCtrl.dismiss();
@ -160,16 +158,15 @@ export class SmsPage implements OnInit {
this.smsService.stopSMSMonitoring();
}
public ResendOTP()
{
this.id= SMSService.national_id;
this.mobile= SMSService.mobile_number;
this.country_code= SMSService.country_code;
public ResendOTP() {
this.id = SMSService.national_id;
this.mobile = SMSService.mobile_number;
this.country_code = SMSService.country_code;
console.log(this.id);
console.log(this.mobile);
console.log(this.country_code);
let zip =this.country_code;
const zip = this.country_code;
// if (this.country_code.indexOf('+') !== -1) {
// zip = this.country_code.substring(this.country_code.indexOf('+') + 1);
// }

@ -133,7 +133,7 @@ export class HomeComponent implements OnInit {
}
}
private getSpecialistInfo(i) {
public getSpecialistInfo(i) {
// this.navCtrl.push("MyTeamPage", { employee: this.specialistEmpList[i], isSpecialist: true });
this.cs.sharedService.setSharedData(this.specialistEmpList[i], MyTeamService.EMPLOYEE_SHARED_DATA);
this.cs.sharedService.setSharedData(true, 'isSpecialist');

@ -25,7 +25,7 @@ export class ApplyActionModalComponent implements OnInit {
messageSuccess: boolean;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
constructor( public ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false);

@ -26,7 +26,7 @@ export class ItemHistoryComponent implements OnInit {
constructor(
public worklistMainService: WorklistMainService,
private cs: CommonService,
private ts: TranslatorService,
public ts: TranslatorService,
private modalCtrl: ModalController,
public worklistService: WorklistService
) {

@ -11,7 +11,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
export class MoreActionModalComponent implements OnInit {
actionBtns :any =[];
radioButtonValue: any;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){}
constructor( public ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){}
ngOnInit() {
console.log("modal");

@ -27,9 +27,9 @@ import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis
import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component';
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component';
import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component';
import { MoItemHistoryComponent } from './mo-item-history/mo-item-history.component';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component'
import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component'
import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component';
@ -148,7 +148,8 @@ const routes: Routes = [
WorklistMainMRComponent,
WorklistAdvancedSearchComponent,
WorkListMainItgComponent,
WorkListReplacementItgComponent
WorkListReplacementItgComponent,
MoItemHistoryComponent
// WorklistMainComponent
],
entryComponents: [

@ -28,7 +28,7 @@ export class QutationAnalysisComponent implements OnInit {
doInfiniteReq: any;
constructor(public worklistMainService: WorklistMainService,
private cs: CommonService,
private ts: TranslatorService,
public ts: TranslatorService,
private modalCtrl: ModalController,
public worklistService: WorklistService) {
this.getPassPOItemID = this.cs.sharedService.getSharedData('passPOInfo',false);

@ -8,7 +8,7 @@
</ion-header>
<ion-content class="colorBG">
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChangedClick($event)"
<ion-segment mode="md" color="secondary" (ionChange)="segmentChangedClick($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="{{segmentVal.name}}"
@ -74,8 +74,9 @@
<img src="../assets/imgs/noteSmall.png">
</button>
<div
[ngClass]="{'bg-blue-dot' : approvalInfo.Action === 'Submit', 'bg-green-dot':approvalInfo.Action === 'Approved', 'bg-red-dot':approvalInfo.Action === 'Rejected', 'bg-gray-dot':approvalInfo.Action === 'Pending', 'bg-gray-dot':approvalInfo.Action === ''}"
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
[ngClass]="{'bg-blue-dot' : approvalInfo.Action === 'Submit', 'bg-green-dot':approvalInfo.Action === 'Approved', 'bg-red-dot':approvalInfo.Action === 'Rejected', 'bg-gray-dot':approvalInfo.Action === 'Pending'}"
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'"
[ngClass]="{'bg-gray-dot' : approvalInfo.Action === ''}">
</div>
<p style="margin-left: -20%; font-size: 12px !important;">{{approvalInfo.Action}}</p>
</div>

@ -53,6 +53,7 @@ export class WorkListMainItgComponent implements OnInit {
public actionBTN: { name: string, image: string, isAvailable: boolean }[] = [];
index2: number;
direction: string;
defaultSegment = '';
constructor(
public common: CommonService,
public ts: TranslatorService,

@ -14,7 +14,7 @@
<!-- add segemnt part -->
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChanged($event)"
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)"
[value]="defaultSegment" class="ion-segment-all">

@ -1,17 +1,17 @@
import { Component, OnInit, ElementRef } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListBodyRequest } from "../models/NotificationBodyReq";
import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes";
import { NotificatonButtonResponse } from "../models/NotificationButtonRes";
import { WorkListActionRequest } from "../models/NotificationActionReq";
import { WorkListButtonRequest } from "../models/NotificationButtonReq";
import { Component, OnInit, ElementRef } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListBodyRequest } from '../models/NotificationBodyReq';
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
import { NotificatonButtonResponse } from '../models/NotificationButtonRes';
import { WorkListActionRequest } from '../models/NotificationActionReq';
import { WorkListButtonRequest } from '../models/NotificationButtonReq';
// import { isDate } from 'angular6-json-schema-form';
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
import { WorklistMainService } from "../service/work-list.main.service";
import { HomeComponent } from "src/app/notification/home/home.component";
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
import { WorklistMainService } from '../service/work-list.main.service';
import { HomeComponent } from 'src/app/notification/home/home.component';
import { TextInput } from 'src/app/uI-elements/text.input';
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
@ -45,17 +45,17 @@ export class WorklistMainMRComponent implements OnInit {
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
private WorkListAttachObj: WorkListButtonRequest;
private PRList: PRNotificatonBodyList
public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
public static PASS_ACTION_MODE = "passActionMode";
public static PASS_NOTIFICATION_INFO = 'passNotificationInfo';
public static PASS_ACTION_MODE = 'passActionMode';
getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr";
public static PASS_RES_ATTR = 'passResAttr';
TransactionID: number = -999;
notificationBodyRes: any;
actionHistoryRes: any;
notificationButtonRes: any;
actionMode: any;
pInformation: string = "";
pQuestion: string = "";
pInformation: string = '';
pQuestion: string = '';
RespondAttributesListRes: any;
schemaNotific: any;
NotRespondAttributeList: any;
@ -66,7 +66,7 @@ export class WorklistMainMRComponent implements OnInit {
dataOfAttr: any;
P_RESPOND_ATTRIBUTES_TBL: any;
selEmployeeID: any;
actionType: string = "";
actionType: string = '';
notificationArray: any;
notificationDynamicAttributeArr: any;
private textInput: TextInput;
@ -87,7 +87,7 @@ export class WorklistMainMRComponent implements OnInit {
confirmMsg: string;
delMsg: string;
closeMsg: string;
activeSegment: any = "item-req";
activeSegment: any = 'item-req';
lines_note_limit: any = 24;
orgNote: string;
truncating: boolean;
@ -100,7 +100,7 @@ export class WorklistMainMRComponent implements OnInit {
rejectDis: boolean = false;
requestDis: boolean = false;
direction: string;
defaultSegment = '';
constructor(
@ -133,14 +133,14 @@ export class WorklistMainMRComponent implements OnInit {
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
console.log(' event.detail.value: ' + event.detail.value);
}
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
document.getElementById('notificationDynamicFields').innerHTML = '';
}
console.log("intializeNotificationDetail");
console.log('intializeNotificationDetail');
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
false
@ -163,9 +163,9 @@ export class WorklistMainMRComponent implements OnInit {
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = "";
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = '';
this.WorkListActionObj.P_ACTION_MODE = '';
this.WorkListActionObj.P_COMMENTS = '';
this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
@ -178,15 +178,15 @@ export class WorklistMainMRComponent implements OnInit {
this.getNotificationResAttr(this.WorkListButtonsObj);
this.getActionHistory(this.WorkListActionHistoryObj);
this.getAttachmentNotification(this.WorkListAttachObj);
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
this.getEITNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PO') {
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'MO') {
this.getMONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PR') {
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
@ -195,7 +195,7 @@ export class WorklistMainMRComponent implements OnInit {
this.worklistMainService
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PR");
this.handleWorkListBodyResult(result, 'PR');
});
}
@ -203,7 +203,7 @@ export class WorklistMainMRComponent implements OnInit {
this.worklistMainService
.getMONotificationBody(notificationBodyObj)
.subscribe((result: MONotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "MO");
this.handleWorkListBodyResult(result, 'MO');
});
}
@ -212,7 +212,7 @@ export class WorklistMainMRComponent implements OnInit {
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
this.handleWorkListBodyResult(result, "PO");
this.handleWorkListBodyResult(result, 'PO');
});
}
@ -220,7 +220,7 @@ export class WorklistMainMRComponent implements OnInit {
this.worklistMainService
.getEITNotificationBody(notificationBodyObj)
.subscribe((result: EITNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "EIT");
this.handleWorkListBodyResult(result, 'EIT');
});
}
@ -228,7 +228,7 @@ export class WorklistMainMRComponent implements OnInit {
this.worklistMainService
.getAbsencesNotificationBody(notificationBodyObj)
.subscribe((result: AbsenceNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "ABSENCE");
this.handleWorkListBodyResult(result, 'ABSENCE');
});
}
@ -237,7 +237,7 @@ export class WorklistMainMRComponent implements OnInit {
if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION;
if (Type == "MO") {
if (Type == 'MO') {
if (result.GetMoNotificationBodyList) {
this.notificationBodyRes =
result.GetMoNotificationBodyList;
@ -262,16 +262,16 @@ export class WorklistMainMRComponent implements OnInit {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetNotificationButtonsList != null) {
this.notificationButtonRes = result.GetNotificationButtonsList;
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore');
console.log('test' + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") {
if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") {
if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') {
this.requestDis = true;
} // if result == null
} // valid it
@ -328,7 +328,7 @@ export class WorklistMainMRComponent implements OnInit {
}
actionButton(action) {
console.log("actionButton" + action);
console.log('actionButton' + action);
// alert("don't forget");
//let ButtonAction: string = this.actionType;
let ButtonAction: string = action;
@ -337,13 +337,13 @@ export class WorklistMainMRComponent implements OnInit {
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') {
obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
@ -351,20 +351,20 @@ export class WorklistMainMRComponent implements OnInit {
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
repUserName = '';
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
if (
ButtonAction == "APPROVE" ||
ButtonAction == "REJECT" ||
ButtonAction == "DEL" ||
ButtonAction == "CLOSE"
ButtonAction == 'APPROVE' ||
ButtonAction == 'REJECT' ||
ButtonAction == 'DEL' ||
ButtonAction == 'CLOSE'
) {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = '';
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_COMMENTS = '';
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
//sheardData
@ -374,18 +374,18 @@ export class WorklistMainMRComponent implements OnInit {
);
/////////////////////////////////////////////
if (ButtonAction == "APPROVE") {
if (ButtonAction == 'APPROVE') {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction == "REJECT") {
else if (ButtonAction == 'REJECT') {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
else if (ButtonAction == "DEL") {
else if (ButtonAction == 'DEL') {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction == "CLOSE") {
else if (ButtonAction == 'CLOSE') {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
@ -416,7 +416,7 @@ export class WorklistMainMRComponent implements OnInit {
////////////this.applyAction(this.WorkListActionObj);
}
if (ButtonAction == "RFC") {
if (ButtonAction == 'RFC') {
// alert("Return For Correction");
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
// this.navCtrl.push("WorkListRfcPage", {
@ -438,9 +438,9 @@ export class WorklistMainMRComponent implements OnInit {
);
// this.common.openWorklistRFCPage();
this.openRFCModal();
} else if (ButtonAction == "ANSWER_INFO") {
} else if (ButtonAction == 'ANSWER_INFO') {
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion');
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
WorklistMainMRComponent.PASS_NOTIFICATION_INFO
@ -456,12 +456,12 @@ export class WorklistMainMRComponent implements OnInit {
//this.common.openWorklistRollReplacement();
this.openReplacementRoll();
} else if (
ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" ||
ButtonAction == "TRANSFER" ||
ButtonAction == "TRANSFER_INFO" ||
ButtonAction == "APPROVE_AND_FORWARD" ||
ButtonAction == "FORWARD"
ButtonAction == 'DELEGATE' ||
ButtonAction == 'REQUEST_INFO' ||
ButtonAction == 'TRANSFER' ||
ButtonAction == 'TRANSFER_INFO' ||
ButtonAction == 'APPROVE_AND_FORWARD' ||
ButtonAction == 'FORWARD'
) {
@ -487,10 +487,10 @@ export class WorklistMainMRComponent implements OnInit {
// this.common.openWorklistRollReplacement();
this.openReplacementRoll();
} else if (
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
ButtonAction == 'UPDATE_ACTION' ||
ButtonAction == 'CONTINUE_ACTION'
) {
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
EITNotificatonBodyResponse.SHARED_DATA
@ -500,7 +500,7 @@ export class WorklistMainMRComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("EitUpdateListPage");
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
AbsenceNotificatonBodyResponse.SHARED_DATA
@ -518,15 +518,15 @@ export class WorklistMainMRComponent implements OnInit {
}
else if (this.notificationButtonRes.length > 0 && !ButtonAction) {
(this.elementRef.nativeElement.querySelectorAll(
"ion-item"
'ion-item'
) as HTMLElement[]).forEach(x => {
if (x.classList.contains("requiredItem")) {
x.classList.add("ng-touched");
x.classList.remove("ng-untouched");
if (x.classList.contains('requiredItem')) {
x.classList.add('ng-touched');
x.classList.remove('ng-untouched');
}
});
this.common.presentAlert(
this.ts.trPK("worklistMain", "actionRequird")
this.ts.trPK('worklistMain', 'actionRequird')
);
}
}
@ -569,7 +569,7 @@ export class WorklistMainMRComponent implements OnInit {
this.NotRespondAttributeList =
result.NotificationGetRespondAttributesList;
if (
result.NotificationRespondRolesList != "" &&
result.NotificationRespondRolesList != '' &&
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null &&
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined
) {
@ -592,20 +592,20 @@ export class WorklistMainMRComponent implements OnInit {
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', '');
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') {
}
}
}
openNotificationBody() {
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
EITNotificatonBodyResponse.SHARED_DATA
@ -615,9 +615,9 @@ export class WorklistMainMRComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
this.common.sharedService.setSharedData("EIT", "NotBodyType");
this.common.sharedService.setSharedData('EIT', 'NotBodyType');
this.common.openNotificationDetailsPage();
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
AbsenceNotificatonBodyResponse.SHARED_DATA
@ -626,7 +626,7 @@ export class WorklistMainMRComponent implements OnInit {
this.getPassNotificationDetails,
AbsenceNotificatonBodyResponse.NOT_WORKLIST
);
this.common.sharedService.setSharedData("ABSENCE", "NotBodyType");
this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType');
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
this.common.openNotificationDetailsPage();
}
@ -641,7 +641,7 @@ export class WorklistMainMRComponent implements OnInit {
if (this.notificationCount <= 0) {
this.notificationCount = null;
}
this.events.publish("getNotCount", this.notificationCount);
this.events.publish('getNotCount', this.notificationCount);
}
});
}
@ -699,7 +699,7 @@ export class WorklistMainMRComponent implements OnInit {
async openNoteDetail(note, sender) {
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
// modalPage.present();
console.log("note" + note);
console.log('note' + note);
this.common.sharedService.setSharedData(note, 'ViewNoteModalPage')
this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender')
@ -715,7 +715,7 @@ export class WorklistMainMRComponent implements OnInit {
}
doInfinite(infiniteScroll) {
console.log("doInfinite action history MR");
console.log('doInfinite action history MR');
if (!this.IsReachEnd) {
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
@ -800,7 +800,7 @@ export class WorklistMainMRComponent implements OnInit {
doInfiniteNotificationBody(infiniteScroll) {
console.log("doInfiniteNotificationBody MR");
console.log('doInfiniteNotificationBody MR');
if (!this.IsReachEnd) {
this.worklistMainService.getMONotificationBody(this.WorkListActionHistoryObj).
subscribe((result: any) => {
@ -835,9 +835,9 @@ export class WorklistMainMRComponent implements OnInit {
loadMoreNotificationBody() {
console.log("loadMoreNotificationBody MR");
console.log('loadMoreNotificationBody MR');
if (!this.IsReachEnd) {
console.log("this.IsReachEnd" + this.IsReachEnd);
console.log('this.IsReachEnd' + this.IsReachEnd);
this.worklistMainService.getMONotificationBody(this.WorkListBodyObj).
subscribe((result: any) => {
@ -855,7 +855,7 @@ export class WorklistMainMRComponent implements OnInit {
this.notificationBodyRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("test")
console.log('test')
);
}// if list length >0
else {
@ -872,7 +872,7 @@ export class WorklistMainMRComponent implements OnInit {
}
}//end infiniteScroll
loadMoreActionHistory() {
console.log("doInfinite action history MR");
console.log('doInfinite action history MR');
if (!this.IsReachEnd) {
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
@ -891,7 +891,7 @@ export class WorklistMainMRComponent implements OnInit {
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
console.log('TEST'));
}// if list length >0
else {
this.IsReachEnd = true;
@ -922,7 +922,7 @@ export class WorklistMainMRComponent implements OnInit {
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else {
@ -945,7 +945,7 @@ export class WorklistMainMRComponent implements OnInit {
///////////////////////////////////////////
public checkLines(note) {
console.log(note.split("\n").length);
console.log(note.split('\n').length);
console.log(note.length);
if (note && note != null) {
@ -970,7 +970,7 @@ export class WorklistMainMRComponent implements OnInit {
}
this.actionHistoryRes = actionHis;
console.log("test");
console.log('test');
}
@ -986,9 +986,9 @@ export class WorklistMainMRComponent implements OnInit {
modal.onDidDismiss().then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else if (data.data == "Success") {
} else if (data.data == 'Success') {
this.getNotificationCountAfterSubmit();
this.nextNotfification();
@ -1018,9 +1018,9 @@ export class WorklistMainMRComponent implements OnInit {
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else if (data.data == "Success") {
} else if (data.data == 'Success') {
this.getNotificationCountAfterSubmit();
this.nextNotfification();

@ -15,7 +15,7 @@
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part -->
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChanged($event)"
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="line_details"

@ -116,7 +116,7 @@ export class WorklistMainPoComponent implements OnInit {
rejectDis: boolean = false;
requestDis: boolean = false;
direction: string;
defaultSegment = '';
constructor(
public common: CommonService,

@ -12,7 +12,7 @@
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part -->
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChanged($event)"
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="item-req"

@ -1,17 +1,17 @@
import { Component, OnInit, ElementRef } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListBodyRequest } from "../models/NotificationBodyReq";
import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes";
import { NotificatonButtonResponse } from "../models/NotificationButtonRes";
import { WorkListActionRequest } from "../models/NotificationActionReq";
import { WorkListButtonRequest } from "../models/NotificationButtonReq";
import { Component, OnInit, ElementRef } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListBodyRequest } from '../models/NotificationBodyReq';
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
import { NotificatonButtonResponse } from '../models/NotificationButtonRes';
import { WorkListActionRequest } from '../models/NotificationActionReq';
import { WorkListButtonRequest } from '../models/NotificationButtonReq';
// import { isDate } from 'angular6-json-schema-form';
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
import { WorklistMainService } from "../service/work-list.main.service";
import { HomeComponent } from "src/app/notification/home/home.component";
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
import { WorklistMainService } from '../service/work-list.main.service';
import { HomeComponent } from 'src/app/notification/home/home.component';
import { TextInput } from 'src/app/uI-elements/text.input';
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
@ -45,17 +45,17 @@ export class WorklistMainPRComponent implements OnInit {
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
private WorkListAttachObj: WorkListButtonRequest;
private PRList: PRNotificatonBodyList
public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
public static PASS_ACTION_MODE = "passActionMode";
public static PASS_NOTIFICATION_INFO = 'passNotificationInfo';
public static PASS_ACTION_MODE = 'passActionMode';
getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr";
public static PASS_RES_ATTR = 'passResAttr';
TransactionID: number = -999;
notificationBodyRes: any;
actionHistoryRes: any;
notificationButtonRes: any;
actionMode: any;
pInformation: string = "";
pQuestion: string = "";
pInformation: string = '';
pQuestion: string = '';
RespondAttributesListRes: any;
schemaNotific: any;
NotRespondAttributeList: any;
@ -66,7 +66,7 @@ export class WorklistMainPRComponent implements OnInit {
dataOfAttr: any;
P_RESPOND_ATTRIBUTES_TBL: any;
selEmployeeID: any;
actionType: string = "";
actionType: string = '';
notificationArray: any;
notificationDynamicAttributeArr: any;
private textInput: TextInput;
@ -96,11 +96,12 @@ export class WorklistMainPRComponent implements OnInit {
demoeAttach: any = [];
notiActionBtnMore: any = [];
messageSuccess: boolean = false;
activeSegment: any = "item-req";
activeSegment: any = 'item-req';
approveDis: boolean;
rejectDis: boolean;
requestDis: boolean;
direction: string;
defaultSegment = '';
constructor(
@ -137,10 +138,10 @@ export class WorklistMainPRComponent implements OnInit {
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
document.getElementById('notificationDynamicFields').innerHTML = '';
}
console.log("intializeNotificationDetail");
console.log('intializeNotificationDetail');
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
false
@ -163,9 +164,9 @@ export class WorklistMainPRComponent implements OnInit {
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = "";
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = '';
this.WorkListActionObj.P_ACTION_MODE = '';
this.WorkListActionObj.P_COMMENTS = '';
this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
@ -179,28 +180,28 @@ export class WorklistMainPRComponent implements OnInit {
this.getActionHistory(this.WorkListActionHistoryObj);
this.getAttachmentNotification(this.WorkListAttachObj);
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
this.getEITNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PO') {
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'MO') {
this.getMONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PR') {
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
console.log(' event.detail.value: ' + event.detail.value);
}
getPRNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PR");
this.handleWorkListBodyResult(result, 'PR');
});
}
@ -217,7 +218,7 @@ export class WorklistMainPRComponent implements OnInit {
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
this.handleWorkListBodyResult(result, "PO");
this.handleWorkListBodyResult(result, 'PO');
});
}
@ -225,7 +226,7 @@ export class WorklistMainPRComponent implements OnInit {
this.worklistMainService
.getEITNotificationBody(notificationBodyObj)
.subscribe((result: EITNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "EIT");
this.handleWorkListBodyResult(result, 'EIT');
});
}
@ -233,7 +234,7 @@ export class WorklistMainPRComponent implements OnInit {
this.worklistMainService
.getAbsencesNotificationBody(notificationBodyObj)
.subscribe((result: AbsenceNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "ABSENCE");
this.handleWorkListBodyResult(result, 'ABSENCE');
});
}
@ -242,20 +243,20 @@ export class WorklistMainPRComponent implements OnInit {
if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION;
if (Type == "EIT") {
if (Type == 'EIT') {
if (result.GetEITCollectionNotificationBodyList) {
this.notificationBodyRes =
result.GetEITCollectionNotificationBodyList;
}
} else if (Type == "ABSENCE") {
console.log("ABSENCE");
} else if (Type == 'ABSENCE') {
console.log('ABSENCE');
if (result.GetAbsenceCollectionNotificationBodyList) {
this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList;
}
} else if (Type == "PR") {
} else if (Type == 'PR') {
if (result.GetPrNotificationBodyList) {
console.log("PR");
console.log('PR');
this.PRHeader = result.GetPrNotificationBodyList.PRHeader;
this.PRLines = result.GetPrNotificationBodyList.PRLines;
@ -296,16 +297,16 @@ export class WorklistMainPRComponent implements OnInit {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetNotificationButtonsList != null) {
this.notificationButtonRes = result.GetNotificationButtonsList;
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore');
console.log('test' + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") {
if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") {
if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') {
this.requestDis = true;
} // if result == null
} // valid it
@ -361,7 +362,7 @@ export class WorklistMainPRComponent implements OnInit {
actionButton(action) {
console.log("actionButton" + action);
console.log('actionButton' + action);
//alert("don't forget");
//let ButtonAction: string = this.actionType;
let ButtonAction: string = action;
@ -372,13 +373,13 @@ export class WorklistMainPRComponent implements OnInit {
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') {
obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
@ -386,20 +387,20 @@ export class WorklistMainPRComponent implements OnInit {
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
repUserName = '';
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
if (
ButtonAction == "APPROVE" ||
ButtonAction == "REJECT" ||
ButtonAction == "DEL" ||
ButtonAction == "CLOSE"
ButtonAction == 'APPROVE' ||
ButtonAction == 'REJECT' ||
ButtonAction == 'DEL' ||
ButtonAction == 'CLOSE'
) {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = '';
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_COMMENTS = '';
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
//sheardData
@ -407,18 +408,18 @@ export class WorklistMainPRComponent implements OnInit {
// this.WorkListActionObj,
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO
// );
if (ButtonAction == "APPROVE") {
if (ButtonAction == 'APPROVE') {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction == "REJECT") {
else if (ButtonAction == 'REJECT') {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
else if (ButtonAction == "DEL") {
else if (ButtonAction == 'DEL') {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction == "CLOSE") {
else if (ButtonAction == 'CLOSE') {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
@ -448,7 +449,7 @@ export class WorklistMainPRComponent implements OnInit {
////////////this.applyAction(this.WorkListActionObj);
}
if (ButtonAction == "RFC") {
if (ButtonAction == 'RFC') {
// alert("Return For Correction");
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
// this.navCtrl.push("WorkListRfcPage", {
@ -470,14 +471,14 @@ export class WorklistMainPRComponent implements OnInit {
);
// this.common.openWorklistRFCPage();
this.openRFCModal();
} else if (ButtonAction == "ANSWER_INFO") {
} else if (ButtonAction == 'ANSWER_INFO') {
// this.navCtrl.push("WorkListReplacmentRollPage", {
// pQuestion: this.pQuestion,
// passNotificationInfo: this.getPassNotificationDetails,
// passActionMode: ButtonAction,
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
// });
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion');
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
WorklistMainPRComponent.PASS_NOTIFICATION_INFO
@ -493,12 +494,12 @@ export class WorklistMainPRComponent implements OnInit {
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" ||
ButtonAction == "TRANSFER" ||
ButtonAction == "TRANSFER_INFO" ||
ButtonAction == "APPROVE_AND_FORWARD" ||
ButtonAction == "FORWARD"
ButtonAction == 'DELEGATE' ||
ButtonAction == 'REQUEST_INFO' ||
ButtonAction == 'TRANSFER' ||
ButtonAction == 'TRANSFER_INFO' ||
ButtonAction == 'APPROVE_AND_FORWARD' ||
ButtonAction == 'FORWARD'
) {
@ -524,10 +525,10 @@ export class WorklistMainPRComponent implements OnInit {
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
ButtonAction == 'UPDATE_ACTION' ||
ButtonAction == 'CONTINUE_ACTION'
) {
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
EITNotificatonBodyResponse.SHARED_DATA
@ -537,7 +538,7 @@ export class WorklistMainPRComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("EitUpdateListPage");
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
AbsenceNotificatonBodyResponse.SHARED_DATA
@ -555,15 +556,15 @@ export class WorklistMainPRComponent implements OnInit {
}
else if (this.notificationButtonRes.length > 0 && !ButtonAction) {
(this.elementRef.nativeElement.querySelectorAll(
"ion-item"
'ion-item'
) as HTMLElement[]).forEach(x => {
if (x.classList.contains("requiredItem")) {
x.classList.add("ng-touched");
x.classList.remove("ng-untouched");
if (x.classList.contains('requiredItem')) {
x.classList.add('ng-touched');
x.classList.remove('ng-untouched');
}
});
this.common.presentAlert(
this.ts.trPK("worklistMain", "actionRequird")
this.ts.trPK('worklistMain', 'actionRequird')
);
}
}
@ -606,7 +607,7 @@ export class WorklistMainPRComponent implements OnInit {
this.NotRespondAttributeList =
result.NotificationGetRespondAttributesList;
if (
result.NotificationRespondRolesList != "" &&
result.NotificationRespondRolesList != '' &&
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null &&
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined
) {
@ -629,20 +630,20 @@ export class WorklistMainPRComponent implements OnInit {
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', '');
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') {
}
}
}
openNotificationBody() {
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
EITNotificatonBodyResponse.SHARED_DATA
@ -652,9 +653,9 @@ export class WorklistMainPRComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
this.common.sharedService.setSharedData("EIT", "NotBodyType");
this.common.sharedService.setSharedData('EIT', 'NotBodyType');
this.common.openNotificationDetailsPage();
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
AbsenceNotificatonBodyResponse.SHARED_DATA
@ -663,7 +664,7 @@ export class WorklistMainPRComponent implements OnInit {
this.getPassNotificationDetails,
AbsenceNotificatonBodyResponse.NOT_WORKLIST
);
this.common.sharedService.setSharedData("ABSENCE", "NotBodyType");
this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType');
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
this.common.openNotificationDetailsPage();
}
@ -678,7 +679,7 @@ export class WorklistMainPRComponent implements OnInit {
if (this.notificationCount <= 0) {
this.notificationCount = null;
}
this.events.publish("getNotCount", this.notificationCount);
this.events.publish('getNotCount', this.notificationCount);
}
});
}
@ -735,7 +736,7 @@ export class WorklistMainPRComponent implements OnInit {
async openNoteDetail(note, sender) {
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
// modalPage.present();
console.log("note" + note);
console.log('note' + note);
this.common.sharedService.setSharedData(note, 'ViewNoteModalPage')
this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender')
@ -832,9 +833,9 @@ export class WorklistMainPRComponent implements OnInit {
loadMoreNotificationBody() {
console.log("loadMoreNotificationBody PR");
console.log('loadMoreNotificationBody PR');
if (!this.IsReachEnd) {
console.log("this.IsReachEnd" + this.IsReachEnd);
console.log('this.IsReachEnd' + this.IsReachEnd);
this.worklistMainService.getPRNotificationBody(this.WorkListBodyObj).
subscribe((result: any) => {
@ -852,7 +853,7 @@ export class WorklistMainPRComponent implements OnInit {
this.notificationBodyRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("test")
console.log('test')
);
}// if list length >0
else {
@ -869,7 +870,7 @@ export class WorklistMainPRComponent implements OnInit {
}
}//end infiniteScroll
loadMoreActionHistory() {
console.log("doInfinite action history MR");
console.log('doInfinite action history MR');
if (!this.IsReachEnd) {
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
@ -887,7 +888,7 @@ export class WorklistMainPRComponent implements OnInit {
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
console.log('TEST'));
}// if list length >0
else {
this.IsReachEnd = true;
@ -905,7 +906,7 @@ export class WorklistMainPRComponent implements OnInit {
////////////////////////////////////////////////////////
public checkLines(note) {
console.log(note.split("\n").length);
console.log(note.split('\n').length);
console.log(note.length);
if (note && note != null) {
@ -935,7 +936,7 @@ export class WorklistMainPRComponent implements OnInit {
// return obj;
// })
this.actionHistoryRes = actionHis;
console.log("test");
console.log('test');
}
@ -955,7 +956,7 @@ export class WorklistMainPRComponent implements OnInit {
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else {
@ -989,9 +990,9 @@ export class WorklistMainPRComponent implements OnInit {
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else if (data.data == "Success") {
} else if (data.data == 'Success') {
this.getNotificationCountAfterSubmit();
this.nextNotfification();
@ -1020,7 +1021,7 @@ export class WorklistMainPRComponent implements OnInit {
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
if (data.data == 'cancel' || data.data == undefined) {
return;
} else {

@ -10,7 +10,7 @@
<div *ngIf="!messageSuccess">
<!-- add segemnt part -->
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChanged($event)"
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)"
[value]="defaultSegment" class="ion-segment-all">

@ -95,6 +95,7 @@ export class WorklistMainComponent implements OnInit {
requestDis: boolean = false;
moreDisabled: boolean = true;
direction: string;
defaultSegment = '';
constructor(
public worklistService: WorklistService,

@ -76,7 +76,7 @@
</div>
<ion-slides [options]="slideOptsOne" #slideWithNav (ionSlideDidChange)="SlideDidChange(sliderOne,slideWithNav)">
<ion-slides [options]="slideOptsOne" #slideWithNav>
<ion-slide >
<ion-grid class="headerGrid">

@ -8,7 +8,7 @@
<div>
<div class="centerDiv homeBox" (click)="openPersonalInfo()">
<div class="centerDiv homeBox">
<!-- <div class="profileDiv"> -->
<img class="profileImg" [src]="user_image">
</div>

@ -1,9 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { Platform, Events, MenuController } from "@ionic/angular";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { Platform, Events, MenuController } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
@ -19,13 +19,13 @@ import { DomSanitizer } from '@angular/platform-browser';
export class EditProfileComponent implements OnInit {
User_name_Emp: string = "";
User_name_Emp: string = '';
User_Job_name: string;
public direction: string;
private menu: MenuController;
setImage:any;
// imageSrc: any = "../assets/imgs/profile.png";
user_image: any = "../assets/imgs/profile.png";
user_image: any = '../assets/imgs/profile.png';
personalInfo: any;
appraisalArr :any =[];
public performanceData: any=[];
@ -45,9 +45,9 @@ export class EditProfileComponent implements OnInit {
)
{
this.direction = TranslatorService.getCurrentDirection();
this.events.subscribe("img-change", displayImg => {
console.log("app compont: "+displayImg);
this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg);
this.events.subscribe('img-change', displayImg => {
console.log('app compont: '+displayImg);
this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg);
});
@ -59,7 +59,7 @@ export class EditProfileComponent implements OnInit {
}
getProfile() {
console.log("getProfile");
console.log('getProfile');
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
@ -68,16 +68,16 @@ export class EditProfileComponent implements OnInit {
this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME;
this.User_Job_name=this.personalInfo.JOB_NAME;
if(this.cs.getUpdateImage().status){
this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img);
this.user_image =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img);
}else{
this.user_image = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: "../assets/imgs/profile.png";
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: '../assets/imgs/profile.png';
}
console.log("name: "+ this.personalInfo.EMPLOYEE_NAME);
console.log("user name: "+ user.EMPLOYEE_NAME);
console.log("name: "+ this.personalInfo.JOB_NAME);
console.log("job name: "+ user.JOB_NAME);
console.log('name: '+ this.personalInfo.EMPLOYEE_NAME);
console.log('user name: '+ user.EMPLOYEE_NAME);
console.log('name: '+ this.personalInfo.JOB_NAME);
console.log('job name: '+ user.JOB_NAME);
}});
@ -110,7 +110,7 @@ private handlePerformanceAppraisalResult(result){
for(let i=0;i<this.appraisalArr.length;i++){
this.performanceData.push({name:this.appraisalArr[i].APPRAISAL_YEAR,value :parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed()});
}
console.log("PerformanceAppraisalResponse");
console.log('PerformanceAppraisalResponse');
this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
//localStorage.setItem("performanceData", this.performanceData)
this.cs.openPerformanceevaluation();

@ -28,7 +28,7 @@
<!-- <div class="centerDiv profileDiv"> -->
<div class="centerDiv homeBox">
<div class="centerDiv homeBox" (click)="openPersonalInfo()">
<div class="centerDiv homeBox">
<!-- <div class="profileDiv"> -->
<img class="profileImg" [src]="imageSrc">
</div>

@ -1,19 +1,19 @@
import { Component, OnInit } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { Events } from "@ionic/angular";
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { Events } from '@ionic/angular';
import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"]
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
personalInfo: any;
setImage:any;
imageSrc: any = "../assets/imgs/profile.png";
imageSrc: any = '../assets/imgs/profile.png';
public direction: string;
// user_image: any = "../assets/imgs/profile.png";
constructor(
@ -26,11 +26,11 @@ export class HomeComponent implements OnInit {
) {
this.direction = TranslatorService.getCurrentDirection();
this.events.subscribe("img-change", displayImg => {
this.events.subscribe('img-change', displayImg => {
// alert("1 - profile home : "+displayImg);
//this.user_image = "data:image/png;base64"+displayImg;
this.setImage = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg);
this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg);
this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg);
this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg);
});
@ -41,33 +41,33 @@ export class HomeComponent implements OnInit {
this.getProfile();
}
getProfile() {
console.log("getProfile");
console.log('getProfile');
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.personalInfo = user;
console.log("name: "+ this.personalInfo.EMPLOYEE_NAME);
console.log("user name: "+ user.EMPLOYEE_NAME);
console.log('name: '+ this.personalInfo.EMPLOYEE_NAME);
console.log('user name: '+ user.EMPLOYEE_NAME);
if(this.cs.getUpdateImage().status){
// this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img);
this.imageSrc =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img);
this.imageSrc =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img);
}else{
this.imageSrc = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: this.imageSrc;
console.log("2-"+user);
console.log('2-'+user);
}
}
else {
console.log("3-"+user);
console.log('3-'+user);
}
});
}
private ChangeImage() {
public ChangeImage() {
this.cs.openChangeImagePage();
}
}

@ -32,7 +32,7 @@
<!-- [showText]="showText" -->
<ngx-charts-gauge [view]="view" [scheme]="colorScheme" [results]="performanceData" [min]="0" [max]="100"
[angleSpan]="240" [startAngle]="-120" [bigSegments]="5"
[smallSegments]="10" (select)="onSelect($event)">
[smallSegments]="10">
</ngx-charts-gauge>

@ -1,13 +1,13 @@
import { Component, OnInit, NgModule } from '@angular/core';
import { Platform, Events, MenuController } from "@ionic/angular";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { Platform, Events, MenuController } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response';
// import { DomSanitizer } from '@angular/platform-browser';
// import {NgxGaugeModule} from 'ngx-gauge';
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
@ -18,7 +18,7 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo
})
export class PerformanceEvaluationComponent implements OnInit {
personalInfo: any;
user_image: any = "../assets/imgs/profile.png";
user_image: any = '../assets/imgs/profile.png';
setImage: any;
view: any = [380, 450];
public performanceData: any = [];
@ -64,7 +64,7 @@ export class PerformanceEvaluationComponent implements OnInit {
for (let i = 0; i < this.performanceData.length; i++) {
this.performanceData[i].color = this.colorScheme.domain[i];
console.log(i + " : " + this.performanceData[i].name)
console.log(i + ' : ' + this.performanceData[i].name)
}
console.log(this.performanceData[0].color)
@ -72,19 +72,19 @@ export class PerformanceEvaluationComponent implements OnInit {
}
ngAfterViewInit() {
document.querySelector("svg .gauge.chart > text").remove();
document.querySelector('svg .gauge.chart > text').remove();
}
getProfile() {
console.log("getProfile");
console.log('getProfile');
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) {
this.personalInfo = user;
this.user_image = user.EMPLOYEE_IMAGE
? "data:image/png;base64," + user.EMPLOYEE_IMAGE
: "../assets/imgs/profile.png";
? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE
: '../assets/imgs/profile.png';
}

@ -13,6 +13,7 @@ export class SelectPeriodComponent implements OnInit {
public dateFrom: any;
public dateTo: any;
public selectedShiftType: any;
public Select = '';
public filtersArray: any = [
{

@ -27,6 +27,8 @@ export class HomeComponent implements OnInit {
RespondAttributeList: any;
add:any='add';
button: ButtonInput;
direction = '';
notBadge = '';
// dateTime: DateTimeInput;
// date: DateInput;
// numberInput: NumberInput;

Loading…
Cancel
Save