Conflicts resolved

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

@ -125,6 +125,7 @@
"tslib": "^1.10.0", "tslib": "^1.10.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"xlsx": "^0.14.3", "xlsx": "^0.14.3",
"xml-js": "^1.6.11",
"zone.js": "~0.8.29" "zone.js": "~0.8.29"
}, },
"devDependencies": { "devDependencies": {
@ -242,8 +243,8 @@
"cordova-plugin-filechooser": {} "cordova-plugin-filechooser": {}
}, },
"platforms": [ "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 { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component';
import { FileUploader } from 'ng2-file-upload'; import { FileUploader } from 'ng2-file-upload';
import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component'; import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({ @Component({
selector: 'app-absence-confirm', selector: 'app-absence-confirm',
templateUrl: './absence-confirm.component.html', templateUrl: './absence-confirm.component.html',
styleUrls: ['./absence-confirm.component.scss'] styleUrls: ['./absence-confirm.component.scss']
}) })
export class AbsenceConfirmComponent implements OnInit { export class AbsenceConfirmComponent implements OnInit {
direction:string; direction: string;
P_TransactionID: number; P_TransactionID: number;
approversList = []; approversList = [];
selEmp: string = ''; selEmp: string = '';
@ -58,7 +59,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.P_TransactionID = this.common.sharedService.getSharedData( this.P_TransactionID = this.common.sharedService.getSharedData(
AbsenceResponse.SHARED_DATA AbsenceResponse.SHARED_DATA
); );
this.getPassNotificationDetails =this.common.sharedService.getSharedData( this.getPassNotificationDetails = this.common.sharedService.getSharedData(
AbsenceNotificatonBodyResponse.NOT_WORKLIST, AbsenceNotificatonBodyResponse.NOT_WORKLIST,
true true
); );
@ -89,7 +90,7 @@ export class AbsenceConfirmComponent implements OnInit {
this.getApproversList(); this.getApproversList();
} }
ngOnInit() {} ngOnInit() { }
startAbApproval() { startAbApproval() {
if (this.attachListOver) { if (this.attachListOver) {
//first call add attach inside success call submit //first call add attach inside success call submit
@ -126,12 +127,12 @@ export class AbsenceConfirmComponent implements OnInit {
this.startAbsApprovalProcess(); this.startAbsApprovalProcess();
} else { } else {
//stope //stope
let filtered = this.attachListOver.filter(function(el) { let filtered = this.attachListOver.filter(function (el) {
return el.isSuccess == true; return el.isSuccess == true;
}); });
this.attachListOver = filtered; this.attachListOver = filtered;
let msg: string = ''; let msg: string = '';
// msg = this.translate.translate("addAttach.errorMsg"); // msg = this.translate.translate("addAttach.errorMsg");
//this.common.showAlert(msg); //this.common.showAlert(msg);
} }
} }
@ -168,11 +169,12 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.isSubmitBtnClicked = true; this.isSubmitBtnClicked = true;
//if(this.isResubmitAbs==false){ //if(this.isResubmitAbs==false){
let msg: string = this.ts.trPK('general', 'messageSuccess'); // let msg: string = this.ts.trPK('general', 'messageSuccess');
this.common.presentAlert(msg); // this.common.presentAlert(msg);
this.common.greenToastPK("eit", "approval-message-success")
// } // }
// this.navCtrl.popToRoot(); // this.navCtrl.popToRoot();
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
} }
} }
@ -204,61 +206,61 @@ export class AbsenceConfirmComponent implements OnInit {
// }); // });
const modal = await this.modalCtrl.create({ const modal = await this.modalCtrl.create({
component: AbsenceAttachmentComponent, component: AbsenceAttachmentComponent,
componentProps:{ indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID}, componentProps: { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID },
keyboardClose: true, keyboardClose: true,
animated: false animated: false
}); });
modal.onDidDismiss() modal.onDidDismiss()
.then((data) => { .then((data) => {
if (data == 'cancel' || data == 'undefined') { if (data == 'cancel' || data == 'undefined') {
return; return;
} else {
if (!str) {
this.updateFile(data, attachDocID);
} else { } else {
this.attachListDisplay = data.data; if (!str) {
this.attachItems = this.attachListDisplay.map(function (el) { this.updateFile(data, attachDocID);
var o = Object.assign({}, el); } else {
o.isSuccess = false; this.attachListDisplay = data.data;
return o; this.attachItems = this.attachListDisplay.map(function (el) {
}); var o = Object.assign({}, el);
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems; o.isSuccess = false;
return o;
});
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
}
} }
} });
});
return await modal.present(); return await modal.present();
} }
/*****submit modal********/ /*****submit modal********/
async openSubmitModal() { async openSubmitModal() {
this.common.sharedService.setSharedData( this.attachListOver, 'submitAbsAttachmentList'); this.common.sharedService.setSharedData(this.attachListOver, 'submitAbsAttachmentList');
this.common.sharedService.setSharedData(this.absComments, 'absComments'); this.common.sharedService.setSharedData(this.absComments, 'absComments');
const modal = await this.modalCtrl.create({ const modal = await this.modalCtrl.create({
component: SubmitAbsenceModalComponent, component: SubmitAbsenceModalComponent,
backdropDismiss: false, backdropDismiss: false,
}); });
modal.cssClass = 'note-modal'; modal.cssClass = 'note-modal';
modal.onDidDismiss() modal.onDidDismiss()
.then((data) => { .then((data) => {
console.log(data.data); console.log(data.data);
if (data.data == 'cancel' || data.data == undefined) { if (data.data == 'cancel' || data.data == undefined) {
return; return;
} else { } else {
this.startAbApproval(); this.startAbApproval();
} }
}); });
return await modal.present(); return await modal.present();
} }
@ -300,7 +302,7 @@ async openSubmitModal() {
} // valid it } // valid it
} }
async OpenAttachFiles(value, Type) { async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage'); this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage');
const modal = await this.modalCtrl.create({ const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent component: WorkListAttachViewComponent
@ -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'], 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, maxFileSize: 10 * 1024 * 1024,
formatDataFunctionIsAsync: true, formatDataFunctionIsAsync: true,
@ -386,7 +388,7 @@ async openSubmitModal() {
}); });
onFileSelectedclick(event){ onFileSelectedclick(event) {
event.target.value = ''; event.target.value = '';
} }
@ -430,7 +432,7 @@ async openSubmitModal() {
pushObject(fileData, name, type) { pushObject(fileData, name, type) {
console.log('before push: '+ this.index); console.log('before push: ' + this.index);
//this.attachListOver.length++; //this.attachListOver.length++;
try { try {
let array = name.split('.'); let array = name.split('.');
@ -438,11 +440,11 @@ async openSubmitModal() {
this.attachListOver.push( this.attachListOver.push(
{ {
AttachmentID: this.attachListOver.length, AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1], P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0], P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID P_TRANSACTION_ID: this.P_TransactionID
}) })
} catch (e) { } catch (e) {

@ -8,6 +8,7 @@ const routes: Routes = [
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule' path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'
}, },
{ path: 'home', loadChildren: './home/home.module#HomePageModule' }, { path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' }, { path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }, { path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' },
{ path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' }, { 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: 'sit', loadChildren: './sit/sit.module#SitPageModule' },
{ path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' }, { path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' },
{ path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' }, { 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({ @NgModule({

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

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

@ -1,5 +1,5 @@
<ion-content style="--background: white;"> <ion-content style="--background: white;" class="biggerPhone">
<div> <div class="rocket-image">
<img src="assets/icon/update_rocket_image.png" style="width: 100%;" /> <img src="assets/icon/update_rocket_image.png" style="width: 100%;" />
</div> </div>
<div style="text-align: center;"> <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() { ngOnInit() {
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
console.log(this.userInfo);
this.authService this.authService
.loadAuthenticatedUser() .loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => { .subscribe((user: AuthenticatedUser) => {
console.log(user);
if (user) { if (user) {
let jobTitle = user.POSITION_NAME.split('.'); let jobTitle = user.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) { if (jobTitle && jobTitle.length > 1) {

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

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

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

@ -1,25 +1,26 @@
.header-toolbar{ .header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%); --background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
} }
.btnBack{ .btnBack {
background: transparent; background: transparent;
} }
ion-img{ ion-img {
width: 180px; width: 180px;
height: 180px; height: 180px;
background:transparent; background: transparent;
} }
h1{ h1 {
font-size: 28px !important; font-size: 28px !important;
} }
span{ span {
font-weight: bold; font-weight: bold;
} }
.button-login{
.button-login {
--background: var(--newgreen) !important; --background: var(--newgreen) !important;
background: var(--newgreen) !important; background: var(--newgreen) !important;
@ -39,7 +40,7 @@ span{
display: block; display: block;
} }
.sms_code{ .sms_code {
margin: 0px; margin: 0px;
text-align: center; text-align: center;
} }
@ -57,12 +58,13 @@ ion-input {
transition: all .2s ease-in-out; transition: all .2s ease-in-out;
border-radius: 3px; border-radius: 3px;
display: inline-block; display: inline-block;
&:focus { &:focus {
border-color:var(--ion-color-secondary) !important; border-color: var(--ion-color-secondary) !important;
box-shadow: 0 0 5px var(--ion-color-secondary) !important inset; box-shadow: 0 0 5px var(--ion-color-secondary) !important;
} }
&::selection { &::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.MemberInformationList[0].PAYROLL_CODE, "projcet-code");
this.common.sharedService.setSharedData(result.BasicMemberInformation.P_LEGISLATION_CODE, "legislation-code");
this.activeType = this.common.setActiveTypeLogin(0); this.activeType = this.common.setActiveTypeLogin(0);
@ -594,89 +595,55 @@ export class SmsPageComponent implements OnInit {
onChange() { onChange() {
// tslint:disable-next-line: only-arrow-functions // tslint:disable-next-line: only-arrow-functions
const filtered = this.smc_code.filter(function (el) { const filtered = this.smc_code.filter(function (el) {
if (el) { if (el) {
return el; return el;
} }
}); });
if (filtered.length === 4 && !this.isAutoRead) { if (filtered.length === 4 && !this.isAutoRead) {
this.checkVerificationCode(); 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; const sibPre = t.previousElementSibling;
if (key === undefined && e.target.value.length==4 && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
if (key === undefined && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
this.checkActivation(e.target.value, false); this.checkActivation(e.target.value, false);
} }
if (key !== 9 && (key < 48 || key > 57)) { if (key !== 9 && (key < 48 || key > 57)) {
if (key === 8 || key === 46) { if (key === 8 || key === 46) {
return true; return true;
} else { } else {
e.preventDefault(); e.preventDefault();
return false; return false;
} }
} }
if (key === 9) { if (key === 9) {
return true; return true;
} }
if (sib) { if (sib) {
if (e.target.value === '') { if (e.target.value === '') {
sibPre.setFocus(); sibPre.setFocus();
} else { } else {
sib.setFocus(); sib.setFocus();
} }
} }
} }
} }

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

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

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

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

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

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

@ -134,6 +134,9 @@ export class AuthenticationService {
public setPublicFields(request: Request): Request { public setPublicFields(request: Request): Request {
const isAndroid = this.platform.is('android'); const isAndroid = this.platform.is('android');
const isIOS = this.platform.is('ios'); 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 = ''; let mobileType = '';
if (isAndroid) { if (isAndroid) {
mobileType = 'android'; mobileType = 'android';
@ -142,11 +145,18 @@ export class AuthenticationService {
} else { } else {
mobileType = 'android'; mobileType = 'android';
} }
request.VersionID = 3.9; request.VersionID = 3.8;
request.Channel = 31; request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType; request.MobileType = mobileType;
if (userPayrollCode) {
request.PayrollCodeStr = userPayrollCode;
}
if (userLegislationCode) {
request.LegislationCodeStr = userLegislationCode
}
return request; return request;
} }
public authenticateAndSetPersonalInformation( public authenticateAndSetPersonalInformation(
@ -485,7 +495,7 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.activationCodeURL, request, onError, errorLabel); 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> { : Observable<SMSCheckResponse> {
this.setPublicFields(request); this.setPublicFields(request);
return this.con.post(AuthenticationService.smsCheck, request, onError, errorLabel, fromSMS); 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 { AuthenticatedUser } from './authenticated-user';
import { PrivilageModel } from './privilage-model'; import { PrivilageModel } from './privilage-model';
export class SMSCheckResponse extends Response { export class SMSCheckResponse extends Response {
BasicMemberInformation: any = {};
AuthenticationTokenID: string; AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[]; MemberInformationList:AuthenticatedUser[];
Privilege_List:PrivilageModel[]; Privilege_List:PrivilageModel[];

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

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

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

@ -53,3 +53,13 @@
width: 100px; width: 100px;
height: 70px; 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-row *ngIf="showStaticServices" class="slideFullWidth">
<ion-slides [options]="slideOptsOne" class="padding-slide slide"> <ion-slides [options]="slideOptsOne" class="padding-slide slide">
<ion-slide *ngFor="let button of statsButtons; let i=index;"> <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 <app-stats-button
[title]="button.title" [title]="button.title"
[statsValue]="button.statsValue" [statsValue]="button.statsValue"

@ -156,3 +156,14 @@ ion-label{
// text-transform: uppercase; // 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 { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx'; import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'; 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 { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services'; import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request'; 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 { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component"; import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
import { TerminationServiceService } from 'src/app/termination/service/termination-service.service'; 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({ @Component({
selector: 'app-home', selector: 'app-home',
@ -69,6 +73,7 @@ export class HomePage implements OnInit {
public showVcationRule = false; public showVcationRule = false;
public isFakeLocationUsed = false; public isFakeLocationUsed = false;
public intervalCountdown: any; public intervalCountdown: any;
public showLoader = true;
public statsButtons = [ public statsButtons = [
{ {
title: this.ts.trPK('attendance-tracking', 'title'), title: this.ts.trPK('attendance-tracking', 'title'),
@ -365,6 +370,7 @@ export class HomePage implements OnInit {
this.setServicesPrivilage(); this.setServicesPrivilage();
if (this.common.getTotalNumberOfWorklistRequest()) { if (this.common.getTotalNumberOfWorklistRequest()) {
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest(); this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.showLoader = false;
} else { } else {
this.openNotificationsDashbored(); this.openNotificationsDashbored();
} }
@ -416,6 +422,8 @@ export class HomePage implements OnInit {
if (this.menuList[i].MENU_TYPE === 'M') { if (this.menuList[i].MENU_TYPE === 'M') {
this.events.publish('myTeamFlag', 'true'); this.events.publish('myTeamFlag', 'true');
// this.common.sharedService.setSharedData('true', "myTeamFlag"); // this.common.sharedService.setSharedData('true', "myTeamFlag");
} else {
this.events.publish('myTeamFlag', 'false');
} }
} }
@ -661,16 +669,63 @@ export class HomePage implements OnInit {
'worklistNotifications' 'worklistNotifications'
); );
this.common.setFilterValues(result['GetOpenNotificationsList']); this.common.setFilterValues(result['GetOpenNotificationsList']);
} else {
this.showLoader = false;
this.common.stopLoading();
} }
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
}); });
} }
ITGCountAllNotification() { ITGCountAllNotification() {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => { this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS); if (this.common.validResponse(result)) {
this.common.filterKeys['ITG'] = result.TotalCount; this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.statsButtons[1].statsValue = this.common.filterKeys['ITG'] = result.TotalCount;
Math.floor(this.countAllNotification + 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(); this.common.stopLoading();
}); });
} }

@ -5,8 +5,6 @@
backlink="false" backlink="false"
[headerText]="'general,filter-offers' | translate"> [headerText]="'general,filter-offers' | translate">
</app-generic-header> </app-generic-header>
<ion-content> <ion-content>
<div class="container-icon" *ngIf="categories.length>0"> <div class="container-icon" *ngIf="categories.length>0">
@ -15,14 +13,12 @@
{{key.title}} {{key.title}}
</ion-label> </ion-label>
<ion-label *ngIf="direction =='rtl'"> <ion-label *ngIf="direction =='rtl'">
{{key.title_ar}} {{key.title_Ar}}
</ion-label> </ion-label>
<ion-thumbnail slot="start"> <ion-thumbnail slot="start">
<div class="top-filter" [innerHTML]="key.content | sanitizeHTMLPipe"></div> <div class="top-filter" [innerHTML]="key.content | sanitizeHTMLPipe"></div>
</ion-thumbnail> </ion-thumbnail>
</ion-item> </ion-item>
</div> </div>
<ion-footer > <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 }; return { AttachmentID: this.indexLastObj, FileName: res.name, Base64Data: res.data.split(",")[1], ContentType: 'image/' + attachType };
}); });
} catch (e) { } } catch (e) { }
} }
} }

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

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

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

@ -1,6 +1,5 @@
<app-generic-header <app-generic-header
showBack="true" showBack="true"
subordinateLeave='false'
backLink="/home" backLink="/home"
[headerText]="'myTeam, myTeam-header' | translate"> [headerText]="'myTeam, myTeam-header' | translate">
</app-generic-header> </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();
}
}

@ -101,7 +101,7 @@
</div> </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-content></ion-infinite-scroll-content>
</ion-infinite-scroll> </ion-infinite-scroll>
</ion-content> </ion-content>

@ -12,6 +12,7 @@ import { DatePipe } from '@angular/common';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { COCRequest } from '../models/COCRequest';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
@ -77,6 +78,7 @@ export class HomeComponent implements OnInit {
public totalPR = 0; public totalPR = 0;
public totalIC = 0; public totalIC = 0;
public totalStamp = 0; public totalStamp = 0;
public worklistLength = 0;
public showChart = false; public showChart = false;
@ -190,7 +192,12 @@ export class HomeComponent implements OnInit {
this.resetData(); this.resetData();
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
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(); this.getAllPushNotificationFun();
} }
openNotificationsDashboard() { openNotificationsDashboardLocal() {
// 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');
// this.Details(); // this.Details();
this.callWorkListServices(); this.callWorkListServices();
// }
// });
// } else {
// this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
// this.resetFiltersUI();
// this.assignDataToFilters();
// this.Details();
// this.callWorkListServices();
// }
} }
assignDataToFilters() { assignDataToFilters() {
@ -278,7 +267,7 @@ export class HomeComponent implements OnInit {
} }
activeFilter(index: number) { activeFilter(index: number) {
if (index !== this.currentActiveIndex) { if (index !== this.currentActiveIndex && index !== 7) {
if (index !== 4) { if (index !== 4) {
this.common.startLoading(); this.common.startLoading();
} }
@ -389,6 +378,7 @@ export class HomeComponent implements OnInit {
} }
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList); this.handleWorkListResult(result.GetWorkList);
} }
} }
@ -553,6 +543,7 @@ export class HomeComponent implements OnInit {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') { if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.worklistLength = result.GetWorkList.length;
this.handleWorkListResult(result.GetWorkList); this.handleWorkListResult(result.GetWorkList);
} }
}); });
@ -603,30 +594,10 @@ export class HomeComponent implements OnInit {
} }
Details() { 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.ITGCount = this.common.filterKeys['ITG'];//result.TotalCount;
// this.totalRequestCount = this.totalRequestCount + result.TotalCount; this.data.datasets[0].data[4] = this.common.filterKeys['ITG'];//this.ITGCount;
this.data.datasets[0].data[3] = this.common.filterKeys['ITG'];//this.ITGCount; this.filters[4].value = this.common.filterKeys['ITG'];
this.filters[3].value = this.common.filterKeys['ITG'];
this.receivedITGCount = true; this.receivedITGCount = true;
//});
//}
} }
searchBtn() { searchBtn() {
@ -683,4 +654,58 @@ export class HomeComponent implements OnInit {
} }
this.openITG(ITEM, NAME); 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 { Request } from 'src/app/hmg-common/services/models/request';
import { LoginModel } from '../../authentication/models/LoginModel'; import { LoginModel } from '../../authentication/models/LoginModel';
import { itgRequest } from '../models/itgFormDetailsRequest'; import { itgRequest } from '../models/itgFormDetailsRequest';
import { COCRequest } from '../models/COCRequest';
import { UserItemTypes } from "../models/userItemTypeRequest"; import { UserItemTypes } from "../models/userItemTypeRequest";
@Injectable() @Injectable()
@ -48,6 +50,7 @@ export class WorklistMainService {
public static getQutationAnalysisUrl = "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS"; public static getQutationAnalysisUrl = "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
public static getITGFormTaskCount = 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; public static getITGFormTaskCount = 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
public static getITGFormTaskDetails = 'Services/COCWS.svc/REST/ITGFormsPendingTasks'; 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 getITGFormDetails = 'Services/COCWS.svc/REST/ITGGetFormDetials';
public static getWorklistNotificationURL = 'Services/ERP.svc/REST/GET_USER_ITEM_TYPES'; public static getWorklistNotificationURL = 'Services/ERP.svc/REST/GET_USER_ITEM_TYPES';
public static updateWorklistNotificationURL = 'Services/ERP.svc/REST/UPDATE_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> { public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(itgrequest); this.authService.authenticateRequest(itgrequest);

@ -566,7 +566,7 @@
</ion-tab-button> </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"> <img src="../assets/imgs/mohemm-action/Skip.png" class="footer-btn-img">
<ion-label style="font-size: 10px;">Skip</ion-label> <ion-label style="font-size: 10px;">Skip</ion-label>
</ion-tab-button> </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 // check if the user clicked on all type of request
this.common.setTotalNumberOfWorklistRequest(); if (flag != 'skip') {
// this.common.assignDataToFilters(this.common.sharedService.getSharedData('worklistNotifications', false), 'ITG'); this.common.setTotalNumberOfWorklistRequest();
if (this.common.filterKeys['ITG'] != 0) // this.common.assignDataToFilters(this.common.sharedService.getSharedData('worklistNotifications', false), 'ITG');
this.common.filterKeys['ITG'] = (this.common.filterKeys['ITG'] - 1) if (this.common.filterKeys['ITG'] != 0)
this.common.filterKeys['ITG'] = (this.common.filterKeys['ITG'] - 1)
}
if (this.is_all_items_sents) { if (this.is_all_items_sents) {
for (let i = 1; i < this.all_request_names.length; i++) { for (let i = 1; i < this.all_request_names.length; i++) {
for (let j = 0; j < this.all_request_names[i].data.length; j++) { 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 } 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, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
return false; return false;
} }
@ -233,6 +236,7 @@ export class WorkListMainItgComponent implements OnInit {
return; return;
} else { } else {
this.common.sharedService.setSharedData(true, 'loadWorkList'); this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
return; return;
} }
@ -240,6 +244,7 @@ export class WorkListMainItgComponent implements OnInit {
} }
} }
this.common.sharedService.setSharedData(true, 'loadWorkList'); this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage(); this.common.openNotificationPage();
return; return;
} }
@ -498,8 +503,8 @@ export class WorkListMainItgComponent implements OnInit {
} }
if (this.actionSelected === 'Delegate') { if (this.actionSelected === 'Delegate') {
this.common.sharedService.setSharedData(info, 'selectedEmpInfo'), this.common.sharedService.setSharedData(info, 'selectedEmpInfo'),
this.common.sharedService.setSharedData('Delegate','pressedBtn') this.common.sharedService.setSharedData('Delegate', 'pressedBtn')
this.presentModal(4); this.presentModal(4);
} }
if (this.actionSelected === 'Doable') { if (this.actionSelected === 'Doable') {
this.actionService(1, this.commentText); this.actionService(1, this.commentText);
@ -517,7 +522,7 @@ export class WorkListMainItgComponent implements OnInit {
this.actionService(2, this.commentText); this.actionService(2, this.commentText);
} }
if (this.actionSelected === 'RequestInformation') { if (this.actionSelected === 'RequestInformation') {
this.common.sharedService.setSharedData('RequestInformation','pressedBtn') this.common.sharedService.setSharedData('RequestInformation', 'pressedBtn')
this.presentModal(3); this.presentModal(3);
} }
if (this.actionSelected === 'ReportGenerated') { if (this.actionSelected === 'ReportGenerated') {

@ -170,6 +170,10 @@
</ion-list> </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"> <!-- <div style="font-weight: bold;" *ngIf="searchKeySelect === '4' && !isFavoriteLetterActive">
<ion-slides [options]="slideOptsOne"> <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> <ion-slide *ngFor="let filter of favLetter; let i=index">

@ -7,34 +7,42 @@
position: relative; position: relative;
bottom: 4px; bottom: 4px;
} }
ion-radio { ion-radio {
--color-checked: #269db8; --color-checked: #269db8;
} }
.center { .center {
text-align: center; text-align: center;
} }
.boldTxtNav { .boldTxtNav {
text-align: start; text-align: start;
font-weight: bold; font-weight: bold;
padding: 12px; padding: 12px;
} }
.employee-details { .employee-details {
display: inline-block; display: inline-block;
margin: 10px; margin: 10px;
} }
.empImgeRep { .empImgeRep {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.star-fav { .star-fav {
float: right; float: right;
margin: 10px; margin: 10px;
} }
.star-fav-left { .star-fav-left {
float: left; float: left;
margin: 10px 5px; margin: 10px 5px;
} }
.uk-margin { .uk-margin {
margin: 15px 15px 0px 15px; margin: 15px 15px 0px 15px;
font-weight: bold; font-weight: bold;
@ -42,9 +50,11 @@ ion-radio {
position: relative; position: relative;
top: 10px; top: 10px;
} }
.uk-padding { .uk-padding {
padding: 20px; padding: 20px;
} }
.uk-padding .employee-details { .uk-padding .employee-details {
bottom: 10px; bottom: 10px;
position: relative; position: relative;
@ -55,18 +65,22 @@ ion-radio {
border-radius: 21px; border-radius: 21px;
padding-left: 10px !important; padding-left: 10px !important;
} }
.filterInput-ar { .filterInput-ar {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 21px; border-radius: 21px;
--padding-start: 10px !important; --padding-start: 10px !important;
} }
.square-container { .square-container {
width: 100%; width: 100%;
clear: both; clear: both;
} }
.square { .square {
clear: both; clear: both;
} }
.top-radio-row { .top-radio-row {
font-size: 12px; font-size: 12px;
} }
@ -104,6 +118,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative; position: relative;
top: 0; top: 0;
} }
.profileImage { .profileImage {
width: 60px !important; width: 60px !important;
} }
@ -111,9 +126,11 @@ button.item-button.button.button-md.button-clear.button-clear-md {
.activated { .activated {
border: #209a83 0.02cm solid; border: #209a83 0.02cm solid;
} }
.deactivated { .deactivated {
border: #e4e4e4 0.02cm solid; border: #e4e4e4 0.02cm solid;
} }
.repContentDiv { .repContentDiv {
text-align: center; text-align: center;
width: 85%; width: 85%;
@ -124,6 +141,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-top: -9px; margin-top: -9px;
margin-right: -35px; margin-right: -35px;
} }
.selIEmpDiv { .selIEmpDiv {
text-align: right; text-align: right;
margin-bottom: -26px; margin-bottom: -26px;
@ -143,6 +161,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin: 8px 17px 0px 17px; margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px; padding: 10px 2px 10px 2px;
} }
.filterInput { .filterInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 21px; border-radius: 21px;
@ -161,6 +180,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding-right: 129px; // padding-right: 129px;
//margin-right: -136px; //margin-right: -136px;
} }
.filterBtn { .filterBtn {
background: var(--newgreen); background: var(--newgreen);
--background: var (--newgreen); --background: var (--newgreen);
@ -168,6 +188,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
height: 60px; height: 60px;
width: 60px; width: 60px;
} }
.filterBtn-ar { .filterBtn-ar {
// background: var(--newgreen); // background: var(--newgreen);
// --background: var (--newgreen); // --background: var (--newgreen);
@ -191,6 +212,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding: 8px; // padding: 8px;
width: 100%; width: 100%;
} }
.square { .square {
// width:calc(100% / 2); // width:calc(100% / 2);
width: 100%; width: 100%;
@ -223,17 +245,21 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative; position: relative;
bottom: 4px; bottom: 4px;
} }
ion-radio { ion-radio {
--color-checked: #269db8; --color-checked: #269db8;
} }
.center { .center {
text-align: center; text-align: center;
padding: 5px; padding: 5px;
} }
.boldTxtNav { .boldTxtNav {
font-weight: bold; font-weight: bold;
padding: 5px; padding: 5px;
} }
.employee-details { .employee-details {
display: inline-block; display: inline-block;
margin: 10px; margin: 10px;
@ -241,15 +267,18 @@ ion-radio {
white-space: nowrap; white-space: nowrap;
width: 70%; width: 70%;
} }
.empImgeRep { .empImgeRep {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.star-fav { .star-fav {
float: right; float: right;
margin: 15px 0px 0px 0px; margin: 15px 0px 0px 0px;
} }
.uk-margin { .uk-margin {
margin: 15px 15px 0px 15px; margin: 15px 15px 0px 15px;
font-weight: bold; font-weight: bold;
@ -257,9 +286,11 @@ ion-radio {
position: relative; position: relative;
top: 10px; top: 10px;
} }
.uk-padding { .uk-padding {
padding: 20px; padding: 20px;
} }
.uk-padding .employee-details { .uk-padding .employee-details {
bottom: 10px; bottom: 10px;
position: relative; position: relative;
@ -275,6 +306,7 @@ ion-radio {
padding-bottom: 25px; padding-bottom: 25px;
padding-top: 15px; padding-top: 15px;
} }
.textSearchType { .textSearchType {
padding-top: 8px; padding-top: 8px;
font-size: 12px; font-size: 12px;
@ -288,26 +320,50 @@ ion-radio {
transition-duration: 0ms; transition-duration: 0ms;
height: 35px; height: 35px;
} }
.vl { .vl {
border-left: 2px solid lightgray; border-left: 2px solid lightgray;
height: 42px; height: 42px;
} }
.searchText{
.searchText {
background: transparent; background: transparent;
color: #269db8; color: #269db8;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
.letterDiv{ .letterDiv {
font-weight: bold; font-weight: bold;
width: 10%; width: 10%;
float: right; float: right;
} }
.letterDivLoop{
.letterDivLoop {
display: block; display: block;
width: 60%; width: 60%;
float: right; float: right;
transition-duration: 0ms; transition-duration: 0ms;
height: 35px; 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 spaceBetween: 5
}; };
public activeSelectedLetter:string; public activeSelectedLetter: string;
constructor(public vacationRuleService: VacationRuleServiceService, constructor(public vacationRuleService: VacationRuleServiceService,
public ts: TranslatorService, public ts: TranslatorService,
@ -368,7 +368,7 @@ export class WorkListReplacementItgComponent implements OnInit {
this.selectedLetter(this.activeSelectedLetter); this.selectedLetter(this.activeSelectedLetter);
} else { } else {
this.favLetter.forEach((obj, index) => { this.favLetter.forEach((obj, index) => {
if(this.activeSelectedLetter) {} if (this.activeSelectedLetter) { }
if (index === 0) { if (index === 0) {
// this.selectedLetter(obj); // this.selectedLetter(obj);
this.favIsActive.push(true); this.favIsActive.push(true);
@ -446,7 +446,7 @@ export class WorkListReplacementItgComponent implements OnInit {
if (letter === el) { if (letter === el) {
this.favIsActive[index] = true; this.favIsActive[index] = true;
this.activeSelectedLetter = el; this.activeSelectedLetter = el;
this.worklistService.getFavoriteByLetter(letter,() => { this.worklistService.getFavoriteByLetter(letter, () => {
}).subscribe((result) => { }).subscribe((result) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.cs.stopLoading(); this.cs.stopLoading();
@ -466,4 +466,10 @@ export class WorkListReplacementItgComponent implements OnInit {
returnIsActiveFunction(i) { returnIsActiveFunction(i) {
return this.favIsActive[i]; return this.favIsActive[i];
} }
resetSelected() {
this.searchKey = '';
this.userSelected = false;
}
} }

@ -90,7 +90,7 @@
<ion-row> <ion-row>
<ion-col size="7"> <ion-col size="7">
<div *ngIf="isFilter" style="height: 0px;"> <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> </ion-searchbar>
</div> </div>
<ion-input *ngIf="!isFilter" class='replacmentSearchBar' clearInput="true" <ion-input *ngIf="!isFilter" class='replacmentSearchBar' clearInput="true"
@ -126,6 +126,11 @@
</ion-grid> </ion-grid>
</ion-list> </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"> <div class="letterDiv" *ngIf="searchBy === '4' && !isFavoriteLetterActive && !userSelected">
<!-- <ion-slides [options]="slideOptsOne"> <!-- <ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of favLetter; let i=index"> --> <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; position: relative;
top: 0; top: 0;
} }
.profileImage { .profileImage {
width: 60px !important; width: 60px !important;
} }
@ -38,9 +39,11 @@ button.item-button.button.button-md.button-clear.button-clear-md {
.activated { .activated {
border: #209a83 0.02cm solid; border: #209a83 0.02cm solid;
} }
.deactivated { .deactivated {
border: #e4e4e4 0.02cm solid; border: #e4e4e4 0.02cm solid;
} }
.repContentDiv { .repContentDiv {
text-align: center; text-align: center;
width: 85%; width: 85%;
@ -51,6 +54,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin-top: -9px; margin-top: -9px;
margin-right: -35px; margin-right: -35px;
} }
.selIEmpDiv { .selIEmpDiv {
text-align: right; text-align: right;
margin-bottom: -26px; margin-bottom: -26px;
@ -70,6 +74,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
margin: 8px 17px 0px 17px; margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px; padding: 10px 2px 10px 2px;
} }
.filterInput { .filterInput {
border: solid var(--gray) 1px; border: solid var(--gray) 1px;
border-radius: 21px; border-radius: 21px;
@ -88,6 +93,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding-right: 129px; // padding-right: 129px;
//margin-right: -136px; //margin-right: -136px;
} }
.filterBtn { .filterBtn {
background: var(--newgreen); background: var(--newgreen);
--background: var (--newgreen); --background: var (--newgreen);
@ -95,6 +101,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
height: 60px; height: 60px;
width: 60px; width: 60px;
} }
.filterBtn-ar { .filterBtn-ar {
// background: var(--newgreen); // background: var(--newgreen);
// --background: var (--newgreen); // --background: var (--newgreen);
@ -118,6 +125,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// padding: 8px; // padding: 8px;
width: 100%; width: 100%;
} }
.square { .square {
// width:calc(100% / 2); // width:calc(100% / 2);
width: 100%; width: 100%;
@ -150,19 +158,22 @@ button.item-button.button.button-md.button-clear.button-clear-md {
position: relative; position: relative;
bottom: 4px; bottom: 4px;
} }
ion-radio{
--color-checked: #29B5BF; ion-radio {
} --color-checked: #269db8;
.center{text-align: center;padding: 5px;} }
.boldTxtNav{
font-weight: bold; .center {
text-align: center;
padding: 5px; padding: 5px;
} }
.boldTxtNav { .boldTxtNav {
text-align: start; text-align: start;
font-weight: bold; font-weight: bold;
padding: 12px; padding: 12px;
} }
.employee-details { .employee-details {
display: inline-block; display: inline-block;
margin: 10px; margin: 10px;
@ -170,15 +181,18 @@ ion-radio{
white-space: nowrap; white-space: nowrap;
width: 70%; width: 70%;
} }
.empImgeRep { .empImgeRep {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
width: 40px; width: 40px;
} }
.star-fav { .star-fav {
float: right; float: right;
margin: 15px 0px 0px 0px; margin: 15px 0px 0px 0px;
} }
.uk-margin { .uk-margin {
margin: 15px 15px 0px 15px; margin: 15px 15px 0px 15px;
font-weight: bold; font-weight: bold;
@ -186,9 +200,11 @@ ion-radio{
position: relative; position: relative;
top: 10px; top: 10px;
} }
.uk-padding { .uk-padding {
padding: 20px; padding: 20px;
} }
.uk-padding .employee-details { .uk-padding .employee-details {
bottom: 10px; bottom: 10px;
position: relative; position: relative;
@ -198,16 +214,19 @@ ion-radio{
float: left; float: left;
margin: 10px 5px; margin: 10px 5px;
} }
.top-radio-row { .top-radio-row {
font-size: 12px; font-size: 12px;
display: block; display: block;
padding-bottom: 25px; padding-bottom: 25px;
padding-top: 15px; padding-top: 15px;
} }
.textSearchType { .textSearchType {
padding-top: 8px; padding-top: 8px;
font-size: 12px; font-size: 12px;
} }
.isFavLetterActive { .isFavLetterActive {
// background: #269db8; // background: #269db8;
// width: 55px; // width: 55px;
@ -219,36 +238,62 @@ ion-radio{
transition-duration: 0ms; transition-duration: 0ms;
height: 35px; height: 35px;
} }
.vl { .vl {
border-left: 2px solid lightgray; border-left: 2px solid lightgray;
height: 42px; height: 42px;
} }
.clearText{
.clearText {
background: transparent; background: transparent;
color: #D55D5C; color: #D55D5C;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
.searchText{
.searchText {
background: transparent; background: transparent;
color: #269db8; color: #269db8;
font-weight: bold; font-weight: bold;
text-decoration: underline; text-decoration: underline;
} }
.filterClass input{
.filterClass input {
box-shadow: none !important; box-shadow: none !important;
-webkit-box-shadow: none !important; -webkit-box-shadow: none !important;
} }
.letterDiv{ .letterDiv {
font-weight: bold; font-weight: bold;
width: 10%; width: 10%;
float: right; float: right;
} }
.letterDivLoop{
.letterDivLoop {
display: block; display: block;
width: 60%; width: 60%;
float: right; float: right;
transition-duration: 0ms; transition-duration: 0ms;
height: 35px; 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() { clearSearchInput() {
this.inputSearch = ''; 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 { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { HomeComponent } from '../home/home.component';
@Component({ @Component({
selector: 'app-work-list-rfc', selector: 'app-work-list-rfc',
@ -39,7 +40,7 @@ export class WorkListRfcComponent implements OnInit {
public ts: TranslatorService, public ts: TranslatorService,
public workListMainService: WorklistMainService, public workListMainService: WorklistMainService,
public modalCtrl: ModalController public modalCtrl: ModalController
) { ) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo'); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr'); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
@ -138,6 +139,7 @@ export class WorkListRfcComponent implements OnInit {
}); });
}, 5000); }, 5000);
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.openNotificationPage(); this.cs.openNotificationPage();
} }
@ -178,18 +180,18 @@ export class WorkListRfcComponent implements OnInit {
this.modalCtrl.dismiss(); this.modalCtrl.dismiss();
} }
select(selectEmp,index){ select(selectEmp, index) {
console.log(selectEmp.USER_NAME); console.log(selectEmp.USER_NAME);
console.log(selectEmp.SEQ); console.log(selectEmp.SEQ);
this.radioButtonValue=selectEmp.USER_NAME this.radioButtonValue = selectEmp.USER_NAME
this.seqNo = selectEmp.SEQ; this.seqNo = selectEmp.SEQ;
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// let emp: any = this.RFCEmployeeListListRes[v]; // let emp: any = this.RFCEmployeeListListRes[v];
// this.seqNo = emp.SEQ; // this.seqNo = emp.SEQ;
// this.radioButtonValue = emp.USER_NAME; // this.radioButtonValue = emp.USER_NAME;
this.active=index; this.active = index;
} }
} }

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

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

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

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

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

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

Loading…
Cancel
Save