Conflicts resolved

NEW-SFH-2022
choudhry masood 3 years ago
commit fabf4a0797

@ -125,6 +125,7 @@
"tslib": "^1.10.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"xlsx": "^0.14.3",
"xml-js": "^1.6.11",
"zone.js": "~0.8.29"
},
"devDependencies": {
@ -242,8 +243,8 @@
"cordova-plugin-filechooser": {}
},
"platforms": [
"android",
"ios"
"ios",
"android"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 B

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@ -15,13 +15,14 @@ import { AbsenceAttachmentComponent } from '../absence-attachment/absence-attach
import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({
selector: 'app-absence-confirm',
templateUrl: './absence-confirm.component.html',
styleUrls: ['./absence-confirm.component.scss']
})
export class AbsenceConfirmComponent implements OnInit {
direction:string;
direction: string;
P_TransactionID: number;
approversList = [];
selEmp: string = '';
@ -58,7 +59,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.P_TransactionID = this.common.sharedService.getSharedData(
AbsenceResponse.SHARED_DATA
);
this.getPassNotificationDetails =this.common.sharedService.getSharedData(
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
AbsenceNotificatonBodyResponse.NOT_WORKLIST,
true
);
@ -89,7 +90,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.getApproversList();
}
ngOnInit() {}
ngOnInit() { }
startAbApproval() {
if (this.attachListOver) {
//first call add attach inside success call submit
@ -126,12 +127,12 @@ export class AbsenceConfirmComponent implements OnInit {
this.startAbsApprovalProcess();
} else {
//stope
let filtered = this.attachListOver.filter(function(el) {
let filtered = this.attachListOver.filter(function (el) {
return el.isSuccess == true;
});
this.attachListOver = filtered;
let msg: string = '';
// msg = this.translate.translate("addAttach.errorMsg");
// msg = this.translate.translate("addAttach.errorMsg");
//this.common.showAlert(msg);
}
}
@ -168,11 +169,12 @@ 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');
this.common.presentAlert(msg);
// let msg: string = this.ts.trPK('general', 'messageSuccess');
// this.common.presentAlert(msg);
this.common.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
}
@ -204,61 +206,61 @@ export class AbsenceConfirmComponent implements OnInit {
// });
const modal = await this.modalCtrl.create({
component: AbsenceAttachmentComponent,
componentProps:{ indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID},
componentProps: { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID },
keyboardClose: true,
animated: false
});
});
modal.onDidDismiss()
.then((data) => {
if (data == 'cancel' || data == 'undefined') {
return;
} else {
if (!str) {
this.updateFile(data, attachDocID);
.then((data) => {
if (data == 'cancel' || data == 'undefined') {
return;
} else {
this.attachListDisplay = data.data;
this.attachItems = this.attachListDisplay.map(function (el) {
var o = Object.assign({}, el);
o.isSuccess = false;
return o;
});
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
if (!str) {
this.updateFile(data, attachDocID);
} else {
this.attachListDisplay = data.data;
this.attachItems = this.attachListDisplay.map(function (el) {
var o = Object.assign({}, el);
o.isSuccess = false;
return o;
});
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
}
}
}
});
});
return await modal.present();
}
/*****submit modal********/
async openSubmitModal() {
this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent,
backdropDismiss: false,
/*****submit modal********/
async openSubmitModal() {
this.common.sharedService.setSharedData(this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == 'cancel' || data.data == undefined) {
return;
} else {
this.startAbApproval();
}
});
if (data.data == 'cancel' || data.data == undefined) {
return;
} else {
this.startAbApproval();
}
});
return await modal.present();
return await modal.present();
}
}
@ -266,7 +268,7 @@ async openSubmitModal() {
removeFile(objectitem) {
if (this.attachListOver) {
let index2 = this.attachListOver.findIndex(item => item == objectitem);
if (index2 > -1) {
@ -300,12 +302,12 @@ async openSubmitModal() {
} // valid it
}
async OpenAttachFiles(value, Type) {
async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage');
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent
});
modal.onDidDismiss()
.then((data) => {
});
@ -314,7 +316,7 @@ async openSubmitModal() {
}
updateFile(attachList, attachDocID) {
let req = {
P_ATTACHED_DOCUMENT_ID: attachDocID,
P_FILE_DATA: attachList[0].P_FILE_DATA,
@ -327,7 +329,7 @@ async openSubmitModal() {
let msg: string = '';
// msg = this.translate.translate("addAttach.attachUpdate");
// this.common.showAlert(msg);
this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID);
}
} // val
@ -345,7 +347,7 @@ async openSubmitModal() {
// });
}
continueDelete(attach) {
let req = {
P_ATTACHED_DOCUMENT_ID: attach.ATTACHED_DOCUMENT_ID
};
@ -367,9 +369,9 @@ async openSubmitModal() {
/*******************Add attchement Functions*************/
/*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({
public uploader: FileUploader = new FileUploader({
allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],
maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true,
@ -386,7 +388,7 @@ async openSubmitModal() {
});
onFileSelectedclick(event){
onFileSelectedclick(event) {
event.target.value = '';
}
@ -430,7 +432,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('.');
@ -438,11 +440,11 @@ async openSubmitModal() {
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {

@ -8,6 +8,7 @@ const routes: Routes = [
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'
},
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' },
@ -29,7 +30,14 @@ const routes: Routes = [
{ path: 'sit', loadChildren: './sit/sit.module#SitPageModule' },
{ path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' },
{ path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' },
{ path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' }
{ path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' },
{ path: 'notification-center', loadChildren: './notification-center/notification-center.module#NotificationCenterPageModule' }
];
@NgModule({

@ -54,9 +54,8 @@
</ion-label>
</ion-item> -->
<!-- </ion-item> -->
<div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01' && menu.MENU_TYPE =='E'">
<!-- <div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01'">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/my-request.png" item-left>
</ion-thumbnail>
@ -64,7 +63,7 @@
{{menu.MENU_NAME}}
</ion-label>
</ion-item>
</div>
</div> -->
<!--
<ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb">
@ -170,9 +169,8 @@
</ion-label>
</ion-item> -->
<!-- </ion-item> -->
<div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01' && menu.MENU_TYPE =='E'">
<!-- <div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01'">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/my-request.png" item-left>
</ion-thumbnail>
@ -180,7 +178,7 @@
{{menu.MENU_NAME}}
</ion-label>
</ion-item>
</div>
</div> -->
<!-- <ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb">

@ -356,7 +356,8 @@ export class AppComponent implements OnInit {
}
oepnMyRequest(menu) {
this.cs.sharedService.setSharedData(menu, MenuResponse.SELECTED_MENU);
this.cs.openConcurrentReport();
// this.cs.openConcurrentReport();
this.cs.openConcurrentTransactionsHome();
this.menu.toggle();
}
oepnTransaction() {

@ -1,5 +1,5 @@
<ion-content style="--background: white;">
<div>
<ion-content style="--background: white;" class="biggerPhone">
<div class="rocket-image">
<img src="assets/icon/update_rocket_image.png" style="width: 100%;" />
</div>
<div style="text-align: center;">

@ -0,0 +1,10 @@
@media only screen and (min-width: 540px) and (max-width: 767px) {
.biggerPhone {
.rocket-image {
img {
height: 350px;
}
}
}
}

@ -26,11 +26,10 @@ export class BusinessCardComponent implements OnInit {
ngOnInit() {
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
this.direction = TranslatorService.getCurrentLanguageName();
console.log(this.userInfo);
this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
console.log(user);
if (user) {
let jobTitle = user.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) {

@ -76,10 +76,10 @@
<img class="item-icon" [src]="checkerFuncation(5)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isRepeatedLetter.text}}</p></ion-label>
</ion-item>
<ion-item lines='none'>
<!-- <ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(6)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isContainSpecialChar.text}}</p></ion-label>
</ion-item>
</ion-item> -->
<ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(7)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{confirmMatchNew.text}}</p></ion-label>

@ -83,13 +83,13 @@ export class ChangePasswordComponent implements OnInit {
text: this.ts.trPK('login', 'repeating-password-validation'),
isMatch: false
};
public isContainSpecialChar = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: this.ts.trPK('login', 'special-character-password-validation'),
isMatch: false
};
// public isContainSpecialChar = {
// blankImg: '../assets/icon/blank.svg',
// greenImg: '../assets/icon/green.svg',
// redImg: '../assets/imgs/close.svg',
// text: this.ts.trPK('login', 'special-character-password-validation'),
// isMatch: false
// };
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
@ -176,8 +176,10 @@ export class ChangePasswordComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
this.cs.toastPK("changePassword", "successChange");
this.cs.greenToastPK("changePassword", "successChange");
this.sharedData.setSharedData(false, Password.IS_EXPIRED_PSW);
// this.cs.sharedService.getSharedData( AuthenticationService.IMEI_USER_DATA);
localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openLogin();
}
});
@ -198,8 +200,10 @@ export class ChangePasswordComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
localStorage.setItem('password', this.P_NEW_PASSWORD);
console.log(result);
this.cs.toastPK("changePassword", "successChange");
this.cs.greenToastPK("changePassword", "successChange");
localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openHome();
}
});
@ -254,8 +258,8 @@ export class ChangePasswordComponent implements OnInit {
return this.isMinLength.blankImg;
case 5:
return this.isRepeatedLetter.blankImg;
case 6:
return this.isContainSpecialChar.blankImg;
// case 6:
// return this.isContainSpecialChar.blankImg;
case 7:
return this.confirmMatchNew.blankImg;
case 8:
@ -311,14 +315,14 @@ export class ChangePasswordComponent implements OnInit {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
}
case 6:
if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
this.isContainSpecialChar.isMatch = true;
return this.isContainSpecialChar.greenImg;
} else {
this.isContainSpecialChar.isMatch = false;
return this.isContainSpecialChar.redImg;
}
// case 6:
// if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
// this.isContainSpecialChar.isMatch = true;
// return this.isContainSpecialChar.greenImg;
// } else {
// this.isContainSpecialChar.isMatch = false;
// return this.isContainSpecialChar.redImg;
// }
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = false;
@ -343,7 +347,7 @@ export class ChangePasswordComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLetterCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.NEW_PASSWORD
&& this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
&& this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}

@ -439,7 +439,7 @@ export class ConfirmLoginComponent implements OnInit {
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language;
request.P_PASSWORD = this.password;
request.P_PASSWORD = localStorage.getItem('password');
this.authService
.login(request, () => {
console.log('error here');
@ -514,11 +514,12 @@ export class ConfirmLoginComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log('2');
console.log(result);
this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);

@ -72,10 +72,10 @@
<img class="item-icon" [src]="checkerFuncation(5)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isRepeatedLetter.text}}</p></ion-label>
</ion-item>
<ion-item lines='none'>
<!-- <ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(6)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isContainSpecialChar.text}}</p></ion-label>
</ion-item>
</ion-item> -->
<ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(7)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{confirmMatchNew.text}}</p></ion-label>

@ -70,13 +70,13 @@ export class ForgotComponent implements OnInit {
text: this.ts.trPK('login', 'repeating-password-validation'),
isMatch: false
};
public isContainSpecialChar = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: this.ts.trPK('login', 'special-character-password-validation'),
isMatch: false
};
// public isContainSpecialChar = {
// blankImg: '../assets/icon/blank.svg',
// greenImg: '../assets/icon/green.svg',
// redImg: '../assets/imgs/close.svg',
// text: this.ts.trPK('login', 'special-character-password-validation'),
// isMatch: false
// };
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
@ -153,7 +153,8 @@ export class ForgotComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
this.cs.toastPK('changePassword', 'successChange');
this.cs.greenToastPK("changePassword", "successChange");
localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openLogin();
}
});
@ -175,8 +176,8 @@ export class ForgotComponent implements OnInit {
return this.isMinLength.blankImg;
case 5:
return this.isRepeatedLetter.blankImg;
case 6:
return this.isContainSpecialChar.blankImg;
// case 6:
// return this.isContainSpecialChar.blankImg;
case 7:
return this.confirmMatchNew.blankImg;
case 8:
@ -232,14 +233,14 @@ export class ForgotComponent implements OnInit {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
}
case 6:
if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
this.isContainSpecialChar.isMatch = true;
return this.isContainSpecialChar.greenImg;
} else {
this.isContainSpecialChar.isMatch = false;
return this.isContainSpecialChar.redImg;
}
// case 6:
// if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
// this.isContainSpecialChar.isMatch = true;
// return this.isContainSpecialChar.greenImg;
// } else {
// this.isContainSpecialChar.isMatch = false;
// return this.isContainSpecialChar.redImg;
// }
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = false;
@ -263,7 +264,7 @@ export class ForgotComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLetterCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.P_NEW_PASSWORD
&& this.P_Confirm_NEW_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
&& this.P_Confirm_NEW_PASSWORD && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}

@ -1,25 +1,26 @@
.header-toolbar{
.header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack{
.btnBack {
background: transparent;
}
ion-img{
ion-img {
width: 180px;
height: 180px;
background:transparent;
background: transparent;
}
h1{
h1 {
font-size: 28px !important;
}
span{
span {
font-weight: bold;
}
.button-login{
.button-login {
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
@ -39,7 +40,7 @@ span{
display: block;
}
.sms_code{
.sms_code {
margin: 0px;
text-align: center;
}
@ -57,12 +58,13 @@ ion-input {
transition: all .2s ease-in-out;
border-radius: 3px;
display: inline-block;
&:focus {
border-color:var(--ion-color-secondary) !important;
box-shadow: 0 0 5px var(--ion-color-secondary) !important inset;
border-color: var(--ion-color-secondary) !important;
box-shadow: 0 0 5px var(--ion-color-secondary) !important;
}
&::selection {
background: transparent;
background: transparent;
}
}
}

@ -482,6 +482,7 @@ export class SmsPageComponent implements OnInit {
}
this.common.sharedService.setSharedData(result.MemberInformationList[0].PAYROLL_CODE, "projcet-code");
this.common.sharedService.setSharedData(result.BasicMemberInformation.P_LEGISLATION_CODE, "legislation-code");
this.activeType = this.common.setActiveTypeLogin(0);
@ -594,89 +595,55 @@ export class SmsPageComponent implements OnInit {
onChange() {
// tslint:disable-next-line: only-arrow-functions
const filtered = this.smc_code.filter(function (el) {
if (el) {
return el;
}
});
if (filtered.length === 4 && !this.isAutoRead) {
this.checkVerificationCode();
}
}
goToNextInput(e) {
const key = e.which;
const t = e.target;
const sib = t.nextElementSibling;
goToNextInput(e) {
const key = e.which;
const t = e.target;
const sib = t.nextElementSibling;
const sibPre = t.previousElementSibling;
if (key === undefined && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
if (key === undefined && e.target.value.length==4 && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
this.checkActivation(e.target.value, false);
}
if (key !== 9 && (key < 48 || key > 57)) {
if (key === 8 || key === 46) {
return true;
} else {
e.preventDefault();
return false;
}
}
if (key === 9) {
return true;
}
if (sib) {
if (e.target.value === '') {
sibPre.setFocus();
} else {
sib.setFocus();
}
}
}
}

@ -60,18 +60,18 @@
<ion-card *ngIf="item.isOpen" (click)="closeAnnouncement(item)" style="margin: 0px;">
<ion-card-header style="background: transparent;">
<ion-card-title style="font-size: 20px; margin: 5px;" *ngIf="direction === 'en'">{{detialData.title_EN}} <br>
<p style="font-size: 12px; color: gray;">{{detialData.date}}</p>
<ion-card-title style="font-size: 20px; margin: 10px;" *ngIf="direction === 'en'">{{detailData.title_EN}} <br>
<p style="font-size: 12px; color: gray;">{{detailData.date}}</p>
</ion-card-title>
<ion-card-title style="font-size: 20px; margin: 5px;" *ngIf="direction === 'ar'">{{detialData.title_AR}} <br>
<p style="font-size: 12px; color: gray;">{{detialData.date}}</p>
<ion-card-title style="font-size: 20px; margin:10px;" *ngIf="direction === 'ar'">{{detailData.title_AR}} <br>
<p style="font-size: 12px; color: gray;">{{detailData.date}}</p>
</ion-card-title>
<img *ngIf='detialData.img' [src]="detialData.img" class="image-center">
<div *ngIf='!detialData.img'></div>
<img *ngIf='detailData.img' [src]="detailData.img" class="image-center">
<div *ngIf='!detailData.img'></div>
</ion-card-header>
<ion-card-content>
<p *ngIf="direction === 'en'"><span [innerHTML]="detialData.body_EN"></span></p>
<p *ngIf="direction === 'ar'"><span [innerHTML]="detialData.body_AR"></span></p>
<p *ngIf="direction === 'en'"><span [innerHTML]="detailData.body_EN"></span></p>
<p *ngIf="direction === 'ar'"><span [innerHTML]="detailData.body_AR"></span></p>
</ion-card-content>
</ion-card>
</div>

@ -5,6 +5,7 @@
margin-right: auto;
height: 190px;
}
.main-card-image {
width: 100%;
display: block;
@ -13,6 +14,7 @@
position: absolute;
height: 100%;
}
.text-style {
margin: 5px;
}
@ -21,19 +23,19 @@
// border: 1px solid lightgray;
// border-radius: 30px;
}
.class-dev-open {
}
.class-dev-open {}
.class-item-open {
border: 1px solid lightgray;
border-radius: 30px;
height: 100px;
}
.class-item-close {
}
.class-item-close {}
.image-item-en {
padding-left: 5px;
padding: 5px;
width: 100px;
min-height: 100px;
border: 5px solid white;
@ -42,8 +44,9 @@
border-right: 0px;
object-fit: cover;
}
.image-item-ar {
padding-right: 5px;
padding: 5px;
width: 100px;
min-height: 100px;
border: 5px solid white;
@ -66,11 +69,13 @@
opacity: 1;
padding-bottom: 5px;
}
.item-list-p-title {
font: normal normal medium 11px/16px Poppins;
letter-spacing: -0.44px;
color: #535353;
}
.item-list-date-title {
font: normal normal 600 10px/16px Poppins;
letter-spacing: -0.4px;
@ -83,11 +88,13 @@
color: #ffffff;
white-space: break-spaces;
}
.item-list-first-p {
font: normal normal normal 12px/17px Poppins;
letter-spacing: -0.12px;
color: #ffffff;
}
.item-list-first-date {
text-align: left;
font: normal normal bold 8px/23px Poppins;
@ -101,6 +108,7 @@
color: #2b353e;
margin-bottom: -34px;
}
.card-style-p {
font: normal normal medium 13px/18px Poppins;
letter-spacing: -0.52px;
@ -118,21 +126,23 @@
position: relative;
min-height: 283px;
}
.main-card-item-list-style {
position: absolute;
bottom: 0px;
--background: transparent;
}
.main-card-label-stle{
margin: 0px;
padding: 0px;
width: 237px;
.main-card-label-stle {
margin: 0px;
padding: 0px;
width: 237px;
}
.main-card-label-style-all{
padding: 0px;
margin: 0px;
width: 200px;
.main-card-label-style-all {
padding: 0px;
margin: 0px;
width: 200px;
}
.item-native {

@ -22,14 +22,15 @@ export class AnnouncementComponent implements OnInit {
public pageSize = 1;
public pageLength = 0;
public lengthCounter = 5;
public detialData: {
id: number,
title_EN: string,
title_AR: string,
body_EN: string,
body_AR: string,
img?: string,
date: Date};
public detailData: {
id: number,
title_EN: string,
title_AR: string,
body_EN: string,
body_AR: string,
img?: string,
date: Date
};
constructor(
public announcementService: AnnouncementService,
@ -63,21 +64,21 @@ export class AnnouncementComponent implements OnInit {
this.common.stopLoading();
if (this.common.validResponse(result)) {
holdData = JSON.parse(result.Mohemm_ITG_ResponseItem);
data = JSON.parse(holdData.result.data)[0];
data = holdData.result.data[0];
console.log(data);
this.detialData = {
this.detailData = {
id: data.rowID,
title_EN: data.Title_EN,
title_AR: data.Title_AR,
body_EN: data.Body_EN,
body_AR: data.Body_AR,
title_EN: data.titleEn,
title_AR: data.titleAr,
body_EN: data.descriptionEn,
body_AR: data.descriptionAr,
date: data.created,
img: data.Banner_Image
img: data.imageContent
};
element.isOpen = !element.isOpen;
// this.common.stopLoading();
}
console.log(this.detialData);
console.log(this.detailData);
});
} else {
element.isOpen = false;
@ -86,7 +87,7 @@ export class AnnouncementComponent implements OnInit {
}
closeAnnouncement(item){
closeAnnouncement(item) {
item.isOpen = false;
}
@ -97,24 +98,24 @@ export class AnnouncementComponent implements OnInit {
this.common.stopLoading();
if (this.common.validResponse(result)) {
holdData = JSON.parse(result.Mohemm_ITG_ResponseItem);
this.listOfAnnouncement = JSON.parse(holdData.result.data);
this.listOfAnnouncement = holdData.result.data;
this.pageLength = this.listOfAnnouncement[0].TotalItems;
for (let i = 0; i < this.listOfAnnouncement.length; i++) {
this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].Title_EN;
this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].Title_AR;
this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].EmailBody_EN;
this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].EmailBody_AR;
this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].titleEn;
this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].titleAr;
this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].descriptionEn;
this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].descriptionAr;
this.arr[i] = {
id: this.listOfAnnouncement[i].rowID,
title_EN: this.listOfAnnouncement[i].Title_EN,
title_AR: this.listOfAnnouncement[i].Title_AR,
body_EN: this.listOfAnnouncement[i].EmailBody_EN,
body_AR: this.listOfAnnouncement[i].EmailBody_AR,
title_EN: this.listOfAnnouncement[i].titleEn,
title_AR: this.listOfAnnouncement[i].titleAr,
body_EN: this.listOfAnnouncement[i].descriptionEn,
body_AR: this.listOfAnnouncement[i].descriptionAr,
date: this.listOfAnnouncement[i].created,
img: this.listOfAnnouncement[i].Banner_Image,
img: this.listOfAnnouncement[i].imageContent,
isopen: false
};
if ( i < this.numberOfListLength){
if (i < this.numberOfListLength) {
this.announcementList.push(this.arr[i]);
}
this.arrList.push(this.arr[i]);

@ -198,8 +198,9 @@ export class ConfirmAddCeiComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
this.cs.openNotificationPage();
}
}

@ -14,6 +14,7 @@ import { EitService } from '../services/eit.service';
import { AddEitResponse } from '../models/add.eit.response';
import { FileUploader } from 'ng2-file-upload';
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({
selector: 'app-confirm-add-eit',
@ -62,7 +63,7 @@ export class ConfirmAddEitComponent implements OnInit {
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
direction: string;
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.direction = TranslatorService.getCurrentLanguageName()
this.isSubmitBtnClicked = false;
@ -81,8 +82,8 @@ export class ConfirmAddEitComponent implements OnInit {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true);
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
this.itemKey = this.getPassNotificationDetails.ITEM_KEY;
this.pActionMode = "RESUBMIT";
this.menuType = "E";
@ -228,12 +229,15 @@ export class ConfirmAddEitComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitEIT==false){
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
// this.cs.openHome();
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
//this.cs.setTotalNumberOfWorklistRequest(true);
this.cs.openNotificationPage();
}
}
@ -249,7 +253,7 @@ export class ConfirmAddEitComponent implements OnInit {
//open the modal with return data
let attachDocID = attachItems.ATTACHED_DOCUMENT_ID;
this.cs.sharedService.setSharedData( this.P_TransactionID, 'TransactionID');
this.cs.sharedService.setSharedData(this.P_TransactionID, 'TransactionID');
this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
const modal = await this.modalController.create({
@ -298,7 +302,7 @@ export class ConfirmAddEitComponent implements OnInit {
/*****submit modal********/
async openSubmitModal() {
this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
const modal = await this.modalController.create({
component: SubmitEitModalComponent,
@ -314,7 +318,7 @@ export class ConfirmAddEitComponent implements OnInit {
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startEitApproval();
this.startEitApproval();
}
});
@ -482,7 +486,7 @@ export class ConfirmAddEitComponent implements OnInit {
});
onFileSelectedclick(event){
onFileSelectedclick(event) {
event.target.value = '';
}
@ -529,7 +533,7 @@ export class ConfirmAddEitComponent implements OnInit {
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
console.log("before push: " + this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
@ -537,11 +541,11 @@ export class ConfirmAddEitComponent implements OnInit {
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {

@ -277,7 +277,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
AttendanceOptionsComponent,
CardCalendarComponent,
SubmitAddressModalComponent,
SanitizeHtmlPipe
SanitizeHtmlPipe,
],
providers: [
AttendScanService,

@ -134,6 +134,9 @@ export class AuthenticationService {
public setPublicFields(request: Request): Request {
const isAndroid = this.platform.is('android');
const isIOS = this.platform.is('ios');
// const userData = this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
const userPayrollCode = this.cs.sharedService.getSharedData("projcet-code", false);
const userLegislationCode = this.cs.sharedService.getSharedData("legislation-code", false);
let mobileType = '';
if (isAndroid) {
mobileType = 'android';
@ -142,11 +145,18 @@ export class AuthenticationService {
} else {
mobileType = 'android';
}
request.VersionID = 3.9;
request.VersionID = 3.8;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;
if (userPayrollCode) {
request.PayrollCodeStr = userPayrollCode;
}
if (userLegislationCode) {
request.LegislationCodeStr = userLegislationCode
}
return request;
}
public authenticateAndSetPersonalInformation(
@ -485,7 +495,7 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.activationCodeURL, request, onError, errorLabel);
}
public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string, fromSMS = false )
public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string, fromSMS = false)
: Observable<SMSCheckResponse> {
this.setPublicFields(request);
return this.con.post(AuthenticationService.smsCheck, request, onError, errorLabel, fromSMS);

@ -3,6 +3,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { AuthenticatedUser } from './authenticated-user';
import { PrivilageModel } from './privilage-model';
export class SMSCheckResponse extends Response {
BasicMemberInformation: any = {};
AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[];
Privilege_List:PrivilageModel[];

@ -85,7 +85,8 @@ export class CommonService {
'POAPPRV': 0,
'INVITEM': 0,
"STAMP": 0,
'ITG': 0
'ITG': 0,
'COC': 0
}
private progressLoaders: any[] = [];
@ -1372,6 +1373,10 @@ export class CommonService {
this.nav.navigateForward(['/reports/transaction-list']);
}
public openConcurrentTransactionsHome() {
this.nav.navigateForward(['/reports/transactions']);
}
public openTermination() {
this.nav.navigateForward(['/termination/termination-form']);
@ -1440,7 +1445,9 @@ export class CommonService {
public openLogin() {
this.nav.navigateRoot(['/authentication/login']);
}
public openNotificationCenter() {
this.nav.navigateRoot(['/notification-center']);
}
public openUserForgot() {
this.nav.navigateForward(['/authentication/checkuser']);
}
@ -1599,7 +1606,7 @@ export class CommonService {
public totalCounter = 0;
getTotalNumberOfWorklistRequest() {
this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false));
return this.totalCounter;
return this.totalCounter ? this.totalCounter : 0;
}
setTotalNumberOfWorklistRequest() {
if (this.totalCounter > 0) {
@ -1643,17 +1650,57 @@ export class CommonService {
key: 'POAPPRV',
disable: false,
total: 0
}
},
// {
// value: 0,
// name: 'ITG',
// active: false,
// color: '#cc3232',
// key: 'ITG',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'IC',
// active: false,
// color: '#9e7e97',
// key: 'INVITEM',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'STAMP',
// active: false,
// color: '#ff9800',
// key: 'STAMP',
// disable: false,
// total: 0,
// },
// {
// value: 0,
// name: 'COC',
// active: false,
// color: '#787299',
// key: 'COC',
// disable: true,
// total: 0,
// }
];
public data = {
datasets: [
{
data: [0, 0, 0, 0, 0],
data: [0, 0, 0, 0, 0, 0, 0, 0],
backgroundColor: [
'#18a169',
'#114475',
'#38c9b3'
'#38c9b3',
'#cc3232',
'#9e7e97',
'#ff9800',
'#787299'
],
borderWidth: 6
}]
@ -1671,6 +1718,8 @@ export class CommonService {
this.filters[2].value = this.filterKeys['POAPPRV'];
this.data.datasets[0].data[2] = this.filterKeys['POAPPRV'];
// this.filters[7].value = this.filterKeys['COC'];
// this.data.datasets[0].data[7] = this.filterKeys['COC'];
let val = { 'filters': [], 'data': {} };
val.filters = this.filters;

@ -18,6 +18,8 @@ export class Request {
public P_MOBILE_NUMBER: string;
public P_EMAIL_ADDRESS: string;
public P_NOTIFICATION_ID: number;
public PayrollCodeStr: string;
public LegislationCodeStr: string;
// public P_LEGISLATION_CODE: string;
// public OTP_SendType: number;

@ -40,13 +40,13 @@ export class PushService {
this.firebasex.grantPermission().then(hasPermission => {
console.log("Permission was " + (hasPermission ? "granted" : "denied"));
this.processStartReceivingWithFirebase();
});
});
} else {
this.processStartReceivingWithFirebase();
}
});
}
});
}
private processNotification(data: any) {
const notification = new NotificationModel();
@ -67,7 +67,7 @@ export class PushService {
this.sharedService.setSharedData(notification, NotificationModel.SHARED_DATA);
} else if (type === NotificationModel.TYPE_CONFERENCE) {
const session = data.additionalData.sessionId;
this.sharedService.setSharedData( new SessionModel(session) , SessionModel.SHARED_DATA);
this.sharedService.setSharedData(new SessionModel(session), SessionModel.SHARED_DATA);
} else {
if (type === NotificationModel.TYPE_VIDEO) {
notification.MessageType = 'video';
@ -87,7 +87,7 @@ export class PushService {
}
private registerInBackend(data: any) {
console.log('firebasex Token ID: ' + data);
console.log('firebasex Token ID: ' + data);
if (data) {
this.cs.sharedService.setSharedData(data, AuthenticationService.DEVICE_TOKEN);
localStorage.setItem('deviceToken', data);
@ -101,11 +101,11 @@ export class PushService {
request.DeviceToken = deviceToken;
request.DeviceType = this.getDeviceType();
const user = this.authService.getAuthenticatedUser();
// request.PatientMobileNumber = user.MobileNo;
// request.PatientMobileNumber = user.MobileNo;
// request.NationalID = user.IdentificationNo;
request.Gender = user.Gender;
request.PatientID = user.PatientID;
// request.PatientOutSA = user.PatientOutSA ? 1 : 0;
// request.PatientOutSA = user.PatientOutSA ? 1 : 0;
// request.LoginType = user.biometricEnabled ? 2 : 1; // 1 sms , 2 touch id
request.MACAddress = '00:00:00:00:00:00';
return this.con.postNoLoad(PushService.loggedInUserURL, request
@ -138,12 +138,24 @@ export class PushService {
private processStartReceivingWithFirebase() {
console.log("processStartReceivingWithFirebase");
this.firebasex.getToken().then(token => {
// alert("token: "+ token);
// alert("token: "+ token);
this.cs.sharedService.setSharedData(token, "new-device-token");
localStorage.setItem('deviceToken', token);
this.cs.setDeviceToken(token); //last way to set the device Token to get it through getDeviceToken
this.registerInBackend(token);
}).catch(error => console.error('Error getting token', error));
this.firebasex.onMessageReceived().subscribe(data => {
console.log("onMessageReceived");
console.log(data);
this.firebasex.clearAllNotifications();
if (data.notification_type == 3) {
this.cs.sharedService.setSharedData(data, NotificationModel.SHARED_DATA);
this.cs.openNotificationCenter();
}
});
}
public onPushReceived(payload: any) {

@ -53,3 +53,13 @@
width: 100px;
height: 70px;
}
.loader {
position: absolute;
width: 100%;
top: 70px;
left: 2px;
img {
width: 25px;
}
}

@ -10,6 +10,9 @@
<ion-row *ngIf="showStaticServices" class="slideFullWidth">
<ion-slides [options]="slideOptsOne" class="padding-slide slide">
<ion-slide *ngFor="let button of statsButtons; let i=index;">
<!-- <div class="loader" *ngIf="i === 1">
<img src="../assets/icon/progress-loading.gif" />
</div> -->
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"

@ -156,3 +156,14 @@ ion-label{
// text-transform: uppercase;
// }
// }
.loader {
position: absolute;
width: 100%;
top: 70px;
left: 2px;
img {
width: 25px;
}
}

@ -11,6 +11,7 @@ import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest';
import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
@ -42,6 +43,9 @@ import { DigitalIdComponent } from '../authentication/digital-id/digital-id.comp
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
import { TerminationServiceService } from 'src/app/termination/service/termination-service.service';
import * as moment from "moment";
import { count } from 'console';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({
selector: 'app-home',
@ -69,6 +73,7 @@ export class HomePage implements OnInit {
public showVcationRule = false;
public isFakeLocationUsed = false;
public intervalCountdown: any;
public showLoader = true;
public statsButtons = [
{
title: this.ts.trPK('attendance-tracking', 'title'),
@ -365,6 +370,7 @@ export class HomePage implements OnInit {
this.setServicesPrivilage();
if (this.common.getTotalNumberOfWorklistRequest()) {
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.showLoader = false;
} else {
this.openNotificationsDashbored();
}
@ -416,6 +422,8 @@ export class HomePage implements OnInit {
if (this.menuList[i].MENU_TYPE === 'M') {
this.events.publish('myTeamFlag', 'true');
// this.common.sharedService.setSharedData('true', "myTeamFlag");
} else {
this.events.publish('myTeamFlag', 'false');
}
}
@ -661,16 +669,63 @@ export class HomePage implements OnInit {
'worklistNotifications'
);
this.common.setFilterValues(result['GetOpenNotificationsList']);
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
ITGCountAllNotification() {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount;
this.statsButtons[1].statsValue =
Math.floor(this.countAllNotification + result.TotalCount);
if (this.common.validResponse(result)) {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount;
this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.getCOCNotificationCount();
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
getCOCNotificationCount() {
const request = new COCRequest();
request.ItgPageSize = 1;
request.ItgPageNo = 1;
request.Date = moment(new Date()).format("YYYY-MM-DD");
this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
console.log(result);
if (this.common.validResponse(result)) {
const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
this.common.filterKeys['COC'] = totalCount;
this.statsButtons[1].statsValue = Math.floor(this.statsButtons[1].statsValue + totalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.showLoader = false;
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}

@ -4,9 +4,7 @@
navigate="false"
backlink="false"
[headerText]="'general,filter-offers' | translate">
</app-generic-header>
</app-generic-header>
<ion-content>
<div class="container-icon" *ngIf="categories.length>0">
@ -15,14 +13,12 @@
{{key.title}}
</ion-label>
<ion-label *ngIf="direction =='rtl'">
{{key.title_ar}}
{{key.title_Ar}}
</ion-label>
<ion-thumbnail slot="start">
<div class="top-filter" [innerHTML]="key.content | sanitizeHTMLPipe"></div>
</ion-thumbnail>
</ion-item>
</div>
<ion-footer >

@ -301,15 +301,6 @@ export class HomeComponent implements OnInit {
return { AttachmentID: this.indexLastObj, FileName: res.name, Base64Data: res.data.split(",")[1], ContentType: 'image/' + attachType };
});
} catch (e) { }
}
}

@ -526,4 +526,7 @@ select option[data-default] {
.button-native {
box-shadow: none!important;
}
.gridAH{
text-align: justify;
}

@ -54,9 +54,9 @@ export class HrRequestFormComponent implements OnInit {
public sectionDep: any;
public projectCode;
public SelectedServiceType: any;
public depType: any ="";
public secType: any ="";
public topicType: any ="";
public depType: any = "";
public secType: any = "";
public topicType: any = "";
indexLastObj: any;
addAttachRequest: any = [];
TransactionID: any;
@ -73,17 +73,17 @@ export class HrRequestFormComponent implements OnInit {
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
];
projctid:any;
employeeNumber:any;
ticketType: any =[];
projctid: any;
employeeNumber: any;
ticketType: any = [];
public direction: string;
HRServices = '';
Complaints='';
Inquiry='';
input = document.getElementById ("firstLabel");
Complaints = '';
Inquiry = '';
input = document.getElementById("firstLabel");
constructor(
public ts: TranslatorService,
public cs: CommonService,
@ -100,20 +100,20 @@ export class HrRequestFormComponent implements OnInit {
}
ngOnInit() {
this.projectCode = this.cs.sharedService.getSharedData("projcet-code",false);
this.projectCode = this.cs.sharedService.getSharedData("projcet-code", false);
this.getTicketTypes();
this.getProject();
}
public isValidForm(): boolean {
if (this.depType && this.SelectedServiceType && this.secType && this.topicType) {
return false;
return false;
}
return true;
}
}
onSelectChange(event, type) {
@ -121,20 +121,20 @@ export class HrRequestFormComponent implements OnInit {
console.log(value);
// this.topicTypeList =[];
// this.sectionTypeList =[];
if(type==1){
if (type == 1) {
this.depType = value;
this.sectionTypeList =[];
this.topicTypeList =[];
this.sectionTypeList = [];
this.topicTypeList = [];
this.getDepartmentSections(value);
}else if(type==2){
} else if (type == 2) {
this.getSectionTopics(value);
this.topicTypeList =[];
this.topicTypeList = [];
}
}
onFileSelectedclick(event){
}
onFileSelectedclick(event) {
event.target.value = '';
}
@ -158,8 +158,8 @@ export class HrRequestFormComponent implements OnInit {
})
}
handlegetTicketTypesResult(result) {
this.ticketType =result.Mohemm_Itg_TicketTypesList;
this.ticketType = result.Mohemm_Itg_TicketTypesList;
}
/////////////////////////////////////////////////
@ -177,11 +177,11 @@ export class HrRequestFormComponent implements OnInit {
}
handlegetProjectResult(result) {
this.Projectresult = result.Mohemm_Itg_ProjectsList;
this.projctid=this.Projectresult[0].projectId;
this.projctid = this.Projectresult[0].projectId;
this.getProjectDepartments();
}
////////////////////////////////////////////////////
////////////////////////////////////////////////////
getProjectDepartments() {
const request = {
EmployeeNumber: "",
@ -204,7 +204,7 @@ export class HrRequestFormComponent implements OnInit {
getDepartmentSections(value) {
const request = {
EmployeeNumber: "",
ItgProjectDepartmentId: value ?value : this.departTypeList.projectDepartmentId,
ItgProjectDepartmentId: value ? value : this.departTypeList.projectDepartmentId,
};
@ -218,11 +218,11 @@ export class HrRequestFormComponent implements OnInit {
// this.getSectionTopics();
}
getSectionTopics(value=null) {
getSectionTopics(value = null) {
const request = {
EmployeeNumber: "",
// ItgDepartmentSectionId: this.sectionTypeList.departmentSectionId,
ItgDepartmentSectionId: value ?value : this.sectionTypeList.departmentSectionId,
ItgDepartmentSectionId: value ? value : this.sectionTypeList.departmentSectionId,
};
this.MowadhafiService.getSectionTopics(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
@ -238,41 +238,57 @@ export class HrRequestFormComponent implements OnInit {
}
/*******************Create Ticket Function*************/
/*******************Create Ticket Function*************/
CreateTicket() {
var authUser =this.authService.getAuthenticatedRequest();
var authUser = this.authService.getAuthenticatedRequest();
this.cs.startLoading();
var request = new FormData();
request.append('ticketTypeId', this.SelectedServiceType);
request.append('projectId', this.projctid);
request.append('departmentId', this.depType);
request.append('sectionId', this.secType);
request.append('sectionTopicId', this.topicType);
request.append('description', this.Description);
console.log("TEST:______")
console.log(this.selectedFile);
if(this.selectedFile && this.selectedFile !== undefined){
request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
}
request.append('employeeNumber', authUser.P_USER_NAME);
request.append('ticketStatus', 'new');
request.append('channelId', '3');
request.append('Channel', authUser.Channel.toString());
request.append('LogInToken', authUser.LogInTokenID);
request.append('Token', authUser.TokenID);
request.append('EmployeeNumber', authUser.P_USER_NAME);
request.append('MobileNo', authUser.MobileNumber);
// var request = new FormData();
// request.append('ticketTypeId', this.SelectedServiceType);
// request.append('projectId', this.projctid);
// request.append('departmentId', this.depType);
// request.append('sectionId', this.secType);
// request.append('sectionTopicId', this.topicType);
// request.append('description', this.Description);
// if(this.selectedFile && this.selectedFile !== undefined){
// request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
// }
// request.append('employeeNumber', authUser.P_USER_NAME);
// request.append('ticketStatus', 'new');
// request.append('channelId', '3');
// request.append('Channel', authUser.Channel.toString());
// request.append('LogInToken', authUser.LogInTokenID);
// request.append('Token', authUser.TokenID);
// request.append('EmployeeNumber', authUser.P_USER_NAME);
// request.append('MobileNo', authUser.MobileNumber);
var request = {
"TokenID": authUser.LogInTokenID, "EmployeeNumber": authUser.P_USER_NAME, "ItgImageCollList": this.addAttachRequest,
"ticketTypeId": this.SelectedServiceType,
"projectId": this.projctid,
"departmentId": this.depType,
"sectionId": this.secType,
"sectionTopicId": this.topicType,
"description": this.Description,
"employeeNumber": authUser.P_USER_NAME,
"ticketStatus": "new",
"channelId": 3,
"Channel": authUser.Channel.toString(),
"LogInToken": authUser.LogInTokenID,
"Token": authUser.TokenID,
"MobileNo": authUser.MobileNumber,
}
this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
if(this.cs.validResponse(result)){
if (this.cs.validResponse(result)) {
this.cs.stopLoading();
this.checkERM('After Service Submission');
this.cs.greenToastPK("general", "success-create");
this.cs.openMyRequestPage();
}else{
} else {
this.cs.stopLoading();
this.cs.redToastPK("general", "try-again");
}
@ -329,7 +345,7 @@ export class HrRequestFormComponent implements OnInit {
else {
const file = input.target.files[0];
this.selectedFile = input.target.files;
this.getBase64(file).then(data =>
this.pushObject(data, file.name, file.type)
@ -348,18 +364,21 @@ export class HrRequestFormComponent implements OnInit {
}
pushObject(fileData, name, type) {
this.indexLastObj++;
try {
let array = name.split(".");
let attachType: string = array[array.length - 1];
this.addAttachRequest.push({
AttachmentID: this.indexLastObj,
P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1],
P_FILE_DATA: fileData.split(",")[1],
P_FILE_NAME: name, //.split('.')[0],
P_TRANSACTION_ID: this.TransactionID
// AttachmentID: this.indexLastObj,
// P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1],
// P_FILE_DATA: fileData.split(",")[1],
// P_FILE_NAME: name, //.split('.')[0],
// P_TRANSACTION_ID: this.TransactionID
Base64Data: fileData.split(",")[1],
FileName: name,
ContentType: 'image/' + attachType
});
} catch (e) { }
}

@ -19,7 +19,7 @@ export class MowadhafiService {
public static getTicketStatisticsByEmp = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee';
public static getTicketTransaction = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction';
public static getTicketDetails = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails';
public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicket';
public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicketMobile';
constructor(
public con: ConnectorService,
@ -108,16 +108,17 @@ export class MowadhafiService {
const request = absence;
this.authService.authenticateRequest(request);
request.employeeNumber = request.P_USER_NAME;
const HttpUploadOptions = {
headers: new HttpHeaders({ "Content-Type": "multipart/form-data", })
}
return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel);
// const HttpUploadOptions = {
// headers: new HttpHeaders({ "Content-Type": "multipart/form-data", })
// }
// return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel);
return this.http.post(ConnectorService.host + MowadhafiService.getCreateTicket, absence, {
// reportProgress: true,
// observe: 'events'
}
)
//return this.http.post(ConnectorService.host + MowadhafiService.getCreateTicket, absence, {
// reportProgress: true,
// observe: 'events'
//}
// )
}
}

@ -1,6 +1,5 @@
<app-generic-header
showBack="true"
subordinateLeave='false'
backLink="/home"
[headerText]="'myTeam, myTeam-header' | translate">
</app-generic-header>

@ -0,0 +1,29 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { NotificationCenterPage } from './notification-center.page';
import { DetailComponent } from './notification-detail/detail.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
const routes: Routes = [
{
path: '',
component: DetailComponent
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
HmgCommonModule,
RouterModule.forChild(routes)
],
declarations: [NotificationCenterPage, DetailComponent]
})
export class NotificationCenterPageModule { }

@ -0,0 +1,6 @@
<ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

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

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-notification-center',
templateUrl: './notification-center.page.html',
styleUrls: ['./notification-center.page.scss'],
})
export class NotificationCenterPage implements OnInit {
constructor() { }
ngOnInit() {
}
}

@ -0,0 +1,21 @@
<ion-content class="item-background" padding>
<div class="close-icon">
<img src="assets/imgs/close.svg" (click)="backLogin()" />
</div>
<ion-grid>
<ion-row class="ion-justify-content-center">
<ion-col [size]="11">
<p>{{data.image_Text}}</p>
</ion-col>
</ion-row>
<ion-row class="ion-justify-content-center">
<ion-col [size]="11">
<img [src]="data.image_URL" class="full-width">
</ion-col>
</ion-row>
</ion-grid>
<page-trailer></page-trailer>
</ion-content>

@ -0,0 +1,84 @@
.vertical_space {
height: 0.5cm;
width: 100%;
}
.title {
font-size: 0.38cm;
font-weight: bold;
}
.info-icon ion-icon {
font-size: 90px;
margin: 10px auto;
display: block;
margin-bottom: 0;
color: var(--ion-color-danger);
}
.info-icon h1 {
margin: auto;
font-size: 22px;
text-align: center;
margin-top: 10%;
}
.info-icon {
padding: 20px;
background: #fff;
margin: 20px;
margin-top: 15%;
border-radius: 15px;
}
.info-icon .line {
width: 100%;
height: 1px;
background: #ccddcc;
margin: 15px auto;
}
.info-icon .instruction p {
display: block;
margin: 0px;
margin-top: 7%;
color: #000;
text-align: center;
}
.info-icon b {
bottom: 11px;
margin: 18px;
color: var(--ion-color-danger);
}
.instruction b {
color: var(--ion-color-danger);
font-weight: bolder;
}
.stop-icon {
display: flex;
margin: 10px auto;
width: 45%;
margin-top: 40px;
}
p.otherwise {
font-size: 20px !important;
}
.close-icon {
position: relative;
height: 60px;
padding: 10px;
}
.close-icon img {
height: 35px;
width: 35px;
right: 0;
position: absolute;
}

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

@ -0,0 +1,42 @@
import { Component, OnInit } from '@angular/core';
import { NotificationModel } from 'src/app/hmg-common/services/push/models/notification.model';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
// import { NotificationsCenterService } from '../service/notifications-center.service';
import { Route, Router, ActivatedRoute, ActivationEnd } from '@angular/router';
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'app-detail',
templateUrl: './detail.component.html',
styleUrls: ['./detail.component.scss']
})
export class DetailComponent implements OnInit {
public notification: NotificationModel;
public video_link: string;
public trustedVideoUrl: SafeResourceUrl;
public direction: any;
public data: any;
constructor(
public cs: CommonService,
public ts: TranslatorService,
public sharedData: SharedDataService,
// public notifyService: NotificationsCenterService,
public router: Router,
private domSanitizer: DomSanitizer,
public route: ActivatedRoute
) {
}
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
this.data = this.sharedData.getSharedData(NotificationModel.SHARED_DATA, true);
}
backLogin() {
this.cs.openLogin();
}
}

@ -100,8 +100,8 @@
</div>
</div>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="itemType !== ''">
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="itemType !== '' && worklistLength >= 25">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>

@ -12,6 +12,7 @@ import { DatePipe } from '@angular/common';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { COCRequest } from '../models/COCRequest';
@Component({
selector: 'app-home',
@ -77,6 +78,7 @@ export class HomeComponent implements OnInit {
public totalPR = 0;
public totalIC = 0;
public totalStamp = 0;
public worklistLength = 0;
public showChart = false;
@ -190,7 +192,12 @@ export class HomeComponent implements OnInit {
this.resetData();
this.direction = TranslatorService.getCurrentLanguageName();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
this.openNotificationsDashboard();
var isWorklistChanged = this.common.sharedService.getSharedData(HomeComponent.COUNT_CHANGED);
if (isWorklistChanged) {
this.openNotificationsDashboard()
}
this.openNotificationsDashboardLocal();
}
}
@ -198,28 +205,10 @@ export class HomeComponent implements OnInit {
this.getAllPushNotificationFun();
}
openNotificationsDashboard() {
// if (this.countChanged) {
// this.DS.getOpenNotifications('', '', this.isPostNoLoad).subscribe((result: GetOpenNotificationsResponse) => {
// if (this.common.validResponse(result)) {
// this.countChanged = false;
// this.worklistNotifications = result;
// this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
//this.resetFiltersUI();
// this.assignDataToFilters();
// this.common.sharedService.setSharedData(result, 'worklistNotifications');
openNotificationsDashboardLocal() {
// this.Details();
this.callWorkListServices();
// }
// });
// } else {
// this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
// this.resetFiltersUI();
// this.assignDataToFilters();
// this.Details();
// this.callWorkListServices();
// }
}
assignDataToFilters() {
@ -278,7 +267,7 @@ export class HomeComponent implements OnInit {
}
activeFilter(index: number) {
if (index !== this.currentActiveIndex) {
if (index !== this.currentActiveIndex && index !== 7) {
if (index !== 4) {
this.common.startLoading();
}
@ -389,6 +378,7 @@ export class HomeComponent implements OnInit {
}
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) {
this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList);
}
}
@ -553,6 +543,7 @@ export class HomeComponent implements OnInit {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) {
this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList);
}
});
@ -603,30 +594,10 @@ export class HomeComponent implements OnInit {
}
Details() {
// var result = this.common.sharedService.getSharedData(MenuResponse.ITG_COUNTS, false);
// if (this.countChanged) {
// this.workListService.getITGDetails('', '', this.isPostNoLoad)
// .subscribe((result: any) => {
// this.countChanged = false;
// this.ITGCount = result.TotalCount;
// // this.totalRequestCount = this.totalRequestCount + result.TotalCount;
// this.data.datasets[0].data[4] = this.ITGCount;
// this.filters[4].value = result.TotalCount;
// this.receivedITGCount = true;
// })
// } else {
//this.workListService.getITGDetails('', '', this.isPostNoLoad)
//.subscribe((result: any) => {
this.ITGCount = this.common.filterKeys['ITG'];//result.TotalCount;
// this.totalRequestCount = this.totalRequestCount + result.TotalCount;
this.data.datasets[0].data[3] = this.common.filterKeys['ITG'];//this.ITGCount;
this.filters[3].value = this.common.filterKeys['ITG'];
this.data.datasets[0].data[4] = this.common.filterKeys['ITG'];//this.ITGCount;
this.filters[4].value = this.common.filterKeys['ITG'];
this.receivedITGCount = true;
//});
//}
}
searchBtn() {
@ -683,4 +654,58 @@ export class HomeComponent implements OnInit {
}
this.openITG(ITEM, NAME);
}
openNotificationsDashboard() {
this.common.startLoading();
this.totalRequestCount = 0;
this.DS.getOpenNotifications('', '', false).subscribe((result: GetOpenNotificationsResponse) => {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
// this.totalRequestCount = ;
this.ITGCountAllNotification(result[key]);
this.common.sharedService.setSharedData(
result,
'worklistNotifications'
);
this.common.setFilterValues(result['GetOpenNotificationsList']);
}
});
}
ITGCountAllNotification(count) {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount;
const values = this.common.getFiltersData();
this.data = values.data;
this.filters = values.filters;
this.totalRequestCount = Math.floor(count + result.TotalCount);
this.common.sharedService.setSharedData(this.totalRequestCount, 'total-count');
this.getCOCNotificationCount();
this.common.stopLoading();
});
}
getCOCNotificationCount() {
const request = new COCRequest();
request.ItgPageSize = 1;
request.ItgPageNo = 1;
request.Date = moment(new Date()).format("YYYY-MM-DD");
this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
console.log(result);
const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
this.common.filterKeys['COC'] = totalCount;
this.totalRequestCount = Math.floor(this.totalRequestCount + totalCount);
this.common.sharedService.setSharedData(this.totalRequestCount, 'total-count');
this.common.stopLoading();
});
}
}

@ -0,0 +1,8 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class COCRequest extends Request {
public ItgPageSize: number;
public ItgPageNo: number;
public Date: string;
public EmployeeNumber: string;
}

@ -20,6 +20,8 @@ import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
import { Request } from 'src/app/hmg-common/services/models/request';
import { LoginModel } from '../../authentication/models/LoginModel';
import { itgRequest } from '../models/itgFormDetailsRequest';
import { COCRequest } from '../models/COCRequest';
import { UserItemTypes } from "../models/userItemTypeRequest";
@Injectable()
@ -48,6 +50,7 @@ export class WorklistMainService {
public static getQutationAnalysisUrl = "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
public static getITGFormTaskCount = 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
public static getITGFormTaskDetails = 'Services/COCWS.svc/REST/ITGFormsPendingTasks';
public static getCOCCount = 'Services/COCWS.svc/REST/Mohemm_ITG_ReviewerAdmin_Pending_Tasks';
public static getITGFormDetails = 'Services/COCWS.svc/REST/ITGGetFormDetials';
public static getWorklistNotificationURL = 'Services/ERP.svc/REST/GET_USER_ITEM_TYPES';
public static updateWorklistNotificationURL = 'Services/ERP.svc/REST/UPDATE_USER_ITEM_TYPES';
@ -447,6 +450,28 @@ export class WorklistMainService {
}
}
public getCOCCount( request: COCRequest, onError?: any, errorLabel?: string, isPostNoLoad = false): Observable<any> {
// const request = new Request();
console.log(request);
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.UserName;
if (isPostNoLoad) {
return this.api.postNoLoad(
WorklistMainService.getCOCCount,
request,
onError,
errorLabel
);
} else {
return this.api.post(
WorklistMainService.getCOCCount,
request,
onError,
errorLabel
);
}
}
public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(itgrequest);

@ -566,7 +566,7 @@
</ion-tab-button>
<ion-tab-button (click)="skip()">
<ion-tab-button (click)="skip('skip')">
<img src="../assets/imgs/mohemm-action/Skip.png" class="footer-btn-img">
<ion-label style="font-size: 10px;">Skip</ion-label>
</ion-tab-button>

@ -193,12 +193,14 @@ export class WorkListMainItgComponent implements OnInit {
});
}
skip() {
skip(flag?) {
// check if the user clicked on all type of request
this.common.setTotalNumberOfWorklistRequest();
// this.common.assignDataToFilters(this.common.sharedService.getSharedData('worklistNotifications', false), 'ITG');
if (this.common.filterKeys['ITG'] != 0)
this.common.filterKeys['ITG'] = (this.common.filterKeys['ITG'] - 1)
if (flag != 'skip') {
this.common.setTotalNumberOfWorklistRequest();
// this.common.assignDataToFilters(this.common.sharedService.getSharedData('worklistNotifications', false), 'ITG');
if (this.common.filterKeys['ITG'] != 0)
this.common.filterKeys['ITG'] = (this.common.filterKeys['ITG'] - 1)
}
if (this.is_all_items_sents) {
for (let i = 1; i < this.all_request_names.length; i++) {
for (let j = 0; j < this.all_request_names[i].data.length; j++) {
@ -218,6 +220,7 @@ export class WorkListMainItgComponent implements OnInit {
}
} else if (this.index === this.all_request_names.length) { // if its the end request redirecte to worklist home
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
return false;
}
@ -233,6 +236,7 @@ export class WorkListMainItgComponent implements OnInit {
return;
} else {
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
return;
}
@ -240,6 +244,7 @@ export class WorkListMainItgComponent implements OnInit {
}
}
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
return;
}
@ -498,8 +503,8 @@ export class WorkListMainItgComponent implements OnInit {
}
if (this.actionSelected === 'Delegate') {
this.common.sharedService.setSharedData(info, 'selectedEmpInfo'),
this.common.sharedService.setSharedData('Delegate','pressedBtn')
this.presentModal(4);
this.common.sharedService.setSharedData('Delegate', 'pressedBtn')
this.presentModal(4);
}
if (this.actionSelected === 'Doable') {
this.actionService(1, this.commentText);
@ -517,7 +522,7 @@ export class WorkListMainItgComponent implements OnInit {
this.actionService(2, this.commentText);
}
if (this.actionSelected === 'RequestInformation') {
this.common.sharedService.setSharedData('RequestInformation','pressedBtn')
this.common.sharedService.setSharedData('RequestInformation', 'pressedBtn')
this.presentModal(3);
}
if (this.actionSelected === 'ReportGenerated') {

@ -170,6 +170,10 @@
</ion-list>
<div class="square-selected" *ngIf="searchKey"><div class="profileImageDiv">
<ion-label class="employee-details sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated"><span>{{searchKey}}</span></ion-label>
<div class="star-fav" ><img src="assets/imgs/close.svg" (click)="resetSelected()"></div></div></div>
<!-- <div style="font-weight: bold;" *ngIf="searchKeySelect === '4' && !isFavoriteLetterActive">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index">

@ -7,34 +7,42 @@
position: relative;
bottom: 4px;
}
ion-radio {
--color-checked: #269db8;
}
.center {
text-align: center;
}
.boldTxtNav {
text-align: start;
font-weight: bold;
padding: 12px;
}
.employee-details {
display: inline-block;
margin: 10px;
}
.empImgeRep {
display: inline-block;
height: 40px;
width: 40px;
}
.star-fav {
float: right;
margin: 10px;
}
.star-fav-left {
float: left;
margin: 10px 5px;
}
.uk-margin {
margin: 15px 15px 0px 15px;
font-weight: bold;
@ -42,9 +50,11 @@ ion-radio {
position: relative;
top: 10px;
}
.uk-padding {
padding: 20px;
}
.uk-padding .employee-details {
bottom: 10px;
position: relative;
@ -55,18 +65,22 @@ ion-radio {
border-radius: 21px;
padding-left: 10px !important;
}
.filterInput-ar {
border: solid var(--gray) 1px;
border-radius: 21px;
--padding-start: 10px !important;
}
.square-container {
width: 100%;
clear: both;
}
.square {
clear: both;
}
.top-radio-row {
font-size: 12px;
}
@ -104,6 +118,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative;
top: 0;
}
.profileImage {
width: 60px !important;
}
@ -111,9 +126,11 @@ button.item-button.button.button-md.button-clear.button-clear-md {
.activated {
border: #209a83 0.02cm solid;
}
.deactivated {
border: #e4e4e4 0.02cm solid;
}
.repContentDiv {
text-align: center;
width: 85%;
@ -124,6 +141,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-top: -9px;
margin-right: -35px;
}
.selIEmpDiv {
text-align: right;
margin-bottom: -26px;
@ -143,6 +161,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
.filterInput {
border: solid var(--gray) 1px;
border-radius: 21px;
@ -161,6 +180,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding-right: 129px;
//margin-right: -136px;
}
.filterBtn {
background: var(--newgreen);
--background: var (--newgreen);
@ -168,6 +188,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
height: 60px;
width: 60px;
}
.filterBtn-ar {
// background: var(--newgreen);
// --background: var (--newgreen);
@ -191,6 +212,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding: 8px;
width: 100%;
}
.square {
// width:calc(100% / 2);
width: 100%;
@ -223,17 +245,21 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative;
bottom: 4px;
}
ion-radio {
--color-checked: #269db8;
}
.center {
text-align: center;
padding: 5px;
}
.boldTxtNav {
font-weight: bold;
padding: 5px;
}
.employee-details {
display: inline-block;
margin: 10px;
@ -241,15 +267,18 @@ ion-radio {
white-space: nowrap;
width: 70%;
}
.empImgeRep {
display: inline-block;
height: 40px;
width: 40px;
}
.star-fav {
float: right;
margin: 15px 0px 0px 0px;
}
.uk-margin {
margin: 15px 15px 0px 15px;
font-weight: bold;
@ -257,9 +286,11 @@ ion-radio {
position: relative;
top: 10px;
}
.uk-padding {
padding: 20px;
}
.uk-padding .employee-details {
bottom: 10px;
position: relative;
@ -275,6 +306,7 @@ ion-radio {
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType {
padding-top: 8px;
font-size: 12px;
@ -282,32 +314,56 @@ ion-radio {
.isFavLetterActive {
color: #269db8;
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
}
.vl {
border-left: 2px solid lightgray;
height: 42px;
}
.searchText{
.searchText {
background: transparent;
color: #269db8;
font-weight: bold;
text-decoration: underline;
}
.letterDiv{
font-weight: bold;
width: 10%;
.letterDiv {
font-weight: bold;
width: 10%;
float: right;
}
.letterDivLoop{
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
.letterDivLoop {
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
}
.square-selected {
box-shadow: 5px 2px 8px #ccc;
padding: 0px 10px 0px 10px;
margin: 0px 15px;
border-radius: 10px;
position: relative;
bottom: 20px;
}
.square-selected img {
height: 20px;
width: 20px;
bottom: 3px;
position: relative;
}
.square-selected span {
white-space: normal;
}

@ -48,7 +48,7 @@ export class WorkListReplacementItgComponent implements OnInit {
spaceBetween: 5
};
public activeSelectedLetter:string;
public activeSelectedLetter: string;
constructor(public vacationRuleService: VacationRuleServiceService,
public ts: TranslatorService,
@ -368,7 +368,7 @@ export class WorkListReplacementItgComponent implements OnInit {
this.selectedLetter(this.activeSelectedLetter);
} else {
this.favLetter.forEach((obj, index) => {
if(this.activeSelectedLetter) {}
if (this.activeSelectedLetter) { }
if (index === 0) {
// this.selectedLetter(obj);
this.favIsActive.push(true);
@ -446,7 +446,7 @@ export class WorkListReplacementItgComponent implements OnInit {
if (letter === el) {
this.favIsActive[index] = true;
this.activeSelectedLetter = el;
this.worklistService.getFavoriteByLetter(letter,() => {
this.worklistService.getFavoriteByLetter(letter, () => {
}).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.cs.stopLoading();
@ -466,4 +466,10 @@ export class WorkListReplacementItgComponent implements OnInit {
returnIsActiveFunction(i) {
return this.favIsActive[i];
}
resetSelected() {
this.searchKey = '';
this.userSelected = false;
}
}

@ -90,7 +90,7 @@
<ion-row>
<ion-col size="7">
<div *ngIf="isFilter" style="height: 0px;">
<ion-searchbar style="padding-top: 1px;" class="filterClass" mode='md' (ionInput)="filterList($event)" placeholder="Filter">
<ion-searchbar [(ngModel)]="inputSearch" style="padding-top: 1px;" class="filterClass" mode='md' (ionInput)="filterList($event)" placeholder="Filter">
</ion-searchbar>
</div>
<ion-input *ngIf="!isFilter" class='replacmentSearchBar' clearInput="true"
@ -125,7 +125,12 @@
</ion-row>
</ion-grid>
</ion-list>
<div class="square-selected" *ngIf="inputSearch"><div class="profileImageDiv">
<ion-label class="employee-details sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated"><span>{{inputSearch}}</span></ion-label>
<div class="star-fav" ><img src="assets/imgs/close.svg" (click)="resetSelected()"></div></div></div>
<div class="letterDiv" *ngIf="searchBy === '4' && !isFavoriteLetterActive && !userSelected">
<!-- <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> -->

@ -31,6 +31,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative;
top: 0;
}
.profileImage {
width: 60px !important;
}
@ -38,9 +39,11 @@ button.item-button.button.button-md.button-clear.button-clear-md {
.activated {
border: #209a83 0.02cm solid;
}
.deactivated {
border: #e4e4e4 0.02cm solid;
}
.repContentDiv {
text-align: center;
width: 85%;
@ -51,6 +54,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-top: -9px;
margin-right: -35px;
}
.selIEmpDiv {
text-align: right;
margin-bottom: -26px;
@ -70,6 +74,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
.filterInput {
border: solid var(--gray) 1px;
border-radius: 21px;
@ -88,6 +93,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding-right: 129px;
//margin-right: -136px;
}
.filterBtn {
background: var(--newgreen);
--background: var (--newgreen);
@ -95,6 +101,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
height: 60px;
width: 60px;
}
.filterBtn-ar {
// background: var(--newgreen);
// --background: var (--newgreen);
@ -118,6 +125,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding: 8px;
width: 100%;
}
.square {
// width:calc(100% / 2);
width: 100%;
@ -150,19 +158,22 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative;
bottom: 4px;
}
ion-radio{
--color-checked: #29B5BF;
}
.center{text-align: center;padding: 5px;}
.boldTxtNav{
font-weight: bold;
ion-radio {
--color-checked: #269db8;
}
.center {
text-align: center;
padding: 5px;
}
.boldTxtNav {
text-align: start;
font-weight: bold;
padding: 12px;
}
.employee-details {
display: inline-block;
margin: 10px;
@ -170,15 +181,18 @@ ion-radio{
white-space: nowrap;
width: 70%;
}
.empImgeRep {
display: inline-block;
height: 40px;
width: 40px;
}
.star-fav {
float: right;
margin: 15px 0px 0px 0px;
}
.uk-margin {
margin: 15px 15px 0px 15px;
font-weight: bold;
@ -186,9 +200,11 @@ ion-radio{
position: relative;
top: 10px;
}
.uk-padding {
padding: 20px;
}
.uk-padding .employee-details {
bottom: 10px;
position: relative;
@ -198,57 +214,86 @@ ion-radio{
float: left;
margin: 10px 5px;
}
.top-radio-row {
font-size: 12px;
display: block;
padding-bottom: 25px;
padding-top: 15px;
}
.textSearchType {
padding-top: 8px;
font-size: 12px;
}
.isFavLetterActive {
// background: #269db8;
// width: 55px;
// border-radius: 60px;
color: #269db8;
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
}
.vl {
border-left: 2px solid lightgray;
height: 42px;
}
.clearText{
.clearText {
background: transparent;
color: #D55D5C;
font-weight: bold;
text-decoration: underline;
}
.searchText{
.searchText {
background: transparent;
color: #269db8;
font-weight: bold;
text-decoration: underline;
}
.filterClass input{
.filterClass input {
box-shadow: none !important;
-webkit-box-shadow: none !important;
}
.letterDiv{
font-weight: bold;
width: 10%;
.letterDiv {
font-weight: bold;
width: 10%;
float: right;
}
.letterDivLoop{
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
.letterDivLoop {
display: block;
width: 60%;
float: right;
transition-duration: 0ms;
height: 35px;
}
.square-selected {
box-shadow: 5px 2px 8px #ccc;
padding: 0px 10px 0px 10px;
margin: 0px 15px;
border-radius: 10px;
position: relative;
bottom: 20px;
}
.square-selected img {
height: 20px;
width: 20px;
bottom: 3px;
position: relative;
}
.square-selected span {
white-space: normal;
}

@ -682,4 +682,10 @@ export class WorkListReplacementRollComponent implements OnInit {
clearSearchInput() {
this.inputSearch = '';
}
resetSelected() {
this.inputSearch = '';
this.userSelected = false;
}
}

@ -7,6 +7,7 @@ import { WorklistService } from '../service/worklist.service';
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 { HomeComponent } from '../home/home.component';
@Component({
selector: 'app-work-list-rfc',
@ -39,7 +40,7 @@ export class WorkListRfcComponent implements OnInit {
public ts: TranslatorService,
public workListMainService: WorklistMainService,
public modalCtrl: ModalController
) {
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
@ -125,7 +126,7 @@ export class WorkListRfcComponent implements OnInit {
if (result.MessageStatus == 1) {
this.cs.sharedService.setSharedData(true, 'loadWorkList');
this.messageSuccess = true;
setTimeout(() => {
@ -138,6 +139,7 @@ export class WorkListRfcComponent implements OnInit {
});
}, 5000);
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage();
}
@ -178,18 +180,18 @@ export class WorkListRfcComponent implements OnInit {
this.modalCtrl.dismiss();
}
select(selectEmp,index){
select(selectEmp, index) {
console.log(selectEmp.USER_NAME);
console.log(selectEmp.SEQ);
this.radioButtonValue=selectEmp.USER_NAME
this.radioButtonValue = selectEmp.USER_NAME
this.seqNo = selectEmp.SEQ;
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
// let emp: any = this.RFCEmployeeListListRes[v];
// this.seqNo = emp.SEQ;
// this.radioButtonValue = emp.USER_NAME;
this.active=index;
this.active = index;
}
}

@ -202,13 +202,18 @@
<ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-col size="12" *ngIf="showActionHistoryLoading">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</ion-col>
<ion-card class="cardContent" style="width: 100%;">
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<div class="noDataDiv" *ngIf = "actionHistoryRes && actionHistoryRes.length === 0 && !showActionHistoryLoading">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 && !showActionHistoryLoading ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes">
@ -414,7 +419,7 @@
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVE')">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVED')">
<img src="../assets/imgs/mohemm-action/Approve.png">
<ion-label class="action-btn"> {{approve_label}}</ion-label>
@ -426,7 +431,7 @@
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
<img src="../assets/imgs/mohemm-action/Reject.png">
<ion-label class="action-btn"> {{reject_label}}</ion-label>
</ion-tab-button>
@ -435,7 +440,7 @@
<img src="../assets/imgs/mohemm-action/info.png">
<ion-label class="action-btn"> {{reqInfo_label}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<ion-tab-button (click)="nextNotfification('skip')">
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label class="action-btn"> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>

@ -129,8 +129,8 @@ export class WorklistMainIcComponent implements OnInit {
reqInfo_label: any;
closeDis: boolean = false;
selectedFilter: string;
;
close_label: any;
public showActionHistoryLoading = true;
constructor(
public common: CommonService,
@ -429,10 +429,11 @@ export class WorklistMainIcComponent implements OnInit {
this.common.sharedService.setSharedData(true, 'loadWorkList');
// this.messageSuccess = true;
this.common.greenToastPK('worklist', 'done-successfully');
this.common.setTotalNumberOfWorklistRequest();
setTimeout(() => {
this.common.setTotalNumberOfWorklistRequest();
this.nextNotfification();
}, 5000);
}, 300);
} else {
this.common.redToastPK('worklist', 'save-error');
}
@ -460,7 +461,7 @@ export class WorklistMainIcComponent implements OnInit {
// }
// }
public nextNotfification() {
public nextNotfification(flag?) {
if (document.getElementById('notificationDynamicFieldsPO') != null) {
document.getElementById('notificationDynamicFieldsPO').innerHTML = '';
}
@ -469,7 +470,7 @@ export class WorklistMainIcComponent implements OnInit {
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
let previousRequestType = this.notificationArray[index].ITEM_TYPE;
if (this.common.filterKeys[previousRequestType] != 0)
if (this.common.filterKeys[previousRequestType] != 0 && flag != 'skip')
this.common.filterKeys[previousRequestType] = (this.common.filterKeys[previousRequestType] - 1)
index += 1;
@ -482,10 +483,12 @@ export class WorklistMainIcComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
//this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
//this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
@ -494,16 +497,16 @@ export class WorklistMainIcComponent implements OnInit {
checkRequestType(index) {
if (this.notificationArray[index].REQUEST_TYPE === 'PO') {
this.intializeNotificationDetail();
} else
if (this.notificationArray[index].REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPOPage();
} else if (this.notificationArray[index].REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage();
} else
if (this.notificationArray[index].REQUEST_TYPE === 'MO') {
} else if (this.notificationArray[index].REQUEST_TYPE === 'MO') {
this.common.openWorklistMainMRPage();
} else {
} else if (this.notificationArray[index].REQUEST_TYPE === 'ITEM_CREATION') {
this.intializeNotificationDetail();
} else {
this.common.openWorklistMainPage();
}
}
}
actionButton(action) {
@ -541,8 +544,8 @@ export class WorklistMainIcComponent implements OnInit {
// }
if (
ButtonAction == "APPROVE" ||
ButtonAction == "REJECT" ||
ButtonAction == "APPROVED" ||
ButtonAction == "REJECTED" ||
ButtonAction == "DEL" ||
ButtonAction == "CLOSE"
) {
@ -557,10 +560,10 @@ export class WorklistMainIcComponent implements OnInit {
// this.WorkListActionObj,
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO
// );
if (ButtonAction == "APPROVE") {
if (ButtonAction == "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction == "REJECT") {
else if (ButtonAction == "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
@ -650,7 +653,8 @@ export class WorklistMainIcComponent implements OnInit {
ButtonAction == "TRANSFER" ||
ButtonAction == "TRANSFER_INFO" ||
ButtonAction == "APPROVE_AND_FORWARD" ||
ButtonAction == "FORWARD"
ButtonAction == "FORWARD" ||
ButtonAction == "RETURNED"
) {
@ -871,6 +875,7 @@ export class WorklistMainIcComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
this.showActionHistoryLoading = false;
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
@ -1219,10 +1224,11 @@ export class WorklistMainIcComponent implements OnInit {
// this.openNotificationsDashboard();
// this.messageSuccess = true;
this.common.greenToastPK('worklist', 'done-successfully');
this.common.setTotalNumberOfWorklistRequest();
setTimeout(() => {
this.common.setTotalNumberOfWorklistRequest();
this.nextNotfification();
}, 100);
}, 300);
// this.nextNotfification();
} else {

@ -437,13 +437,19 @@
<ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-col size="12" *ngIf="showActionHistoryLoading">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</ion-col>
<ion-card class="cardContent" style="width: 100%;">
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<div class="noDataDiv" *ngIf = "actionHistoryRes && actionHistoryRes.length === 0 && !showActionHistoryLoading">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 && !showActionHistoryLoading ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes">
@ -665,7 +671,7 @@
<!-- <ion-label> {{'worklistMain, request' | translate}}</ion-label> -->
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<ion-tab-button (click)="nextNotfification('skip')">
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>

@ -118,6 +118,7 @@ export class WorklistMainMRComponent implements OnInit {
close_label: any;
closeDis: boolean = false;
selectedFilter: string;
public showActionHistoryLoading = true;
constructor(
@ -406,7 +407,7 @@ export class WorklistMainMRComponent implements OnInit {
// }
public nextNotfification() {
public nextNotfification(flag?) {
//let itemExist = false;
if (document.getElementById("notificationDynamicFieldsMR") != null) {
document.getElementById("notificationDynamicFieldsMR").innerHTML = "";
@ -417,7 +418,7 @@ export class WorklistMainMRComponent implements OnInit {
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
let previousRequestType = this.notificationArray[index].ITEM_TYPE;
if (this.common.filterKeys[previousRequestType] != 0)
if (this.common.filterKeys[previousRequestType] != 0 && flag != 'skip')
this.common.filterKeys[previousRequestType] = (this.common.filterKeys[previousRequestType] - 1)
index += 1;
@ -430,10 +431,12 @@ export class WorklistMainMRComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
//this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
//this.common.setTotalNumberOfWorklistRequest(true);
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
@ -807,6 +810,7 @@ export class WorklistMainMRComponent implements OnInit {
}
handleWorkListActionHistoryResult(result) {
this.showActionHistoryLoading = false;
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;

@ -170,13 +170,19 @@
<ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-col size="12" *ngIf="showActionHistoryLoading">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;"
src="../assets/icon/progress-loading.gif" /></p>
</ion-col>
<ion-card class="cardContent" style="width: 100%;">
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<div class="noDataDiv" *ngIf = "actionHistoryRes && actionHistoryRes.length === 0 && !showActionHistoryLoading">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 && !showActionHistoryLoading ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes">
@ -633,7 +639,7 @@
<img src="../assets/imgs/mohemm-action/info.png">
<ion-label class = "action-btn"> {{reqInfo_label}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<ion-tab-button (click)="nextNotfification('skip')">
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label class = "action-btn"> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save