fixed SFH issues with refer to MOE

MOHEMM-PHASE-2-SFH
umasoodch 3 years ago
parent 622d36088d
commit 63dadc3d81

@ -10,7 +10,7 @@
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" [ngClass]=" direction === 'en' ? 'approvalTitle' : 'approvalTitle-ar'">{{'general, addAttach' | translate}}</div>
<div size="10" [ngClass]=" direction === 'en' ? 'approvalTitle' : 'approvalTitle-ar'">{{'general, addAttach' | translate}} <span *ngIf="selEmp.ATTACHMENT_REQUIRED ==='Y'">*</span></div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
@ -255,7 +255,7 @@
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="confirmEitOkButton" (click)="openSubmitModal()">{{ts.trPK('confirmAddEit','start')}}</ion-button>
<ion-button class="confirmEitOkButton" (click)="openSubmitModal()" [disabled] ="selEmp.ATTACHMENT_REQUIRED =='Y' && !attachListOver">{{ts.trPK('confirmAddEit','start')}}</ion-button>
</div>
</ion-footer>

@ -219,7 +219,7 @@ ion-card-content.confirm-details{
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
background: #44A7A1;
color: #fff;
border-radius: 50%;
border: 0px;
@ -266,7 +266,7 @@ ion-card-content.confirm-details{
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #29B5BF;
--background: #0ca2de;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

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

@ -123,10 +123,10 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; --border-radius: 10px; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; --border-radius: 10px; " ion-button (click)="closeModal()">
{{'general, cancel' | translate}}</ion-button>
</div>
</ion-footer>

@ -14,7 +14,7 @@
<app-generic-header
showBack="true"
[headerText]="'home,leave-balance' | translate">
[headerText]="headerTitle">
</app-generic-header>

@ -357,7 +357,7 @@ max-height: 4cm;
margin-right: 12px;
}
.used-label-container{
// border-top: 5px solid #c2a16b;
// border-top: 5px solid #292F42;
// padding: 1px 0px;
// margin: 15px 0px
width: 12px;

@ -95,19 +95,20 @@ export class HomeComponent implements OnInit {
false
);
this.leaveAccrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
console.log("this.leaveAccrualBalance>>>>>>>>>>" + this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT);
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
//console.log("this.leaveAccrualBalance>>>>>>>>>>" + this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT);
/***
ACCRUAL_NET_ENTITLEMENT: 24.59
ACCRUAL_USED_ENTITLEMENT: 0
ACCRUAL_YEARLY_ENTITLEMENT: 50.4*/
this.accrualNet = this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.leaveAccrualBalance.ACCRUAL_USED_ENTITLEMENT;
this.accrualYearly = this.leaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT;
this.accrualNet = this.leaveAccrualBalance ? this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT : 0;
this.accrualUsed = this.leaveAccrualBalance ? this.leaveAccrualBalance.ACCRUAL_USED_ENTITLEMENT : 0;
this.accrualYearly = this.leaveAccrualBalance ? this.leaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT : 0;
this.totalnumber = this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber = this.totalnumber.toFixed(3);
this.request = this.common.sharedService.getSharedData('leaveAccrualBalanceDate', false);
console.log("this.request" + this.request.P_EFFECTIVE_DATE);
this.effectiveDate = this.request.P_EFFECTIVE_DATE;
//console.log("this.request" + this.request.P_EFFECTIVE_DATE);
this.effectiveDate = this.request ? this.request.P_EFFECTIVE_DATE : '';
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
@ -262,8 +263,8 @@ export class HomeComponent implements OnInit {
this.balance = result.GetAccrualBalancesList;
}
if (this.balance) {
this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT;
this.accrualNet = this.balance[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUsed = this.balance[1].ACCRUAL_USED_ENTITLEMENT;
// this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT;
// this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly;
this.totalnumber = this.accrualNet + this.accrualUsed;

@ -14,10 +14,11 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #29B5BF;
--background: #44A7A1;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
--border-radius: 16px !important;
}

@ -322,7 +322,8 @@ export class SubmitAbsenceComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else if (feildsList[i].FORMAT_TYPE == "N") {
// number
@ -333,7 +334,8 @@ export class SubmitAbsenceComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else if (feildsList[i].FORMAT_TYPE == "X") {
// standard date
@ -352,7 +354,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.dateInput = new DateInput(
@ -363,7 +366,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
} else if (feildsList[i].FORMAT_TYPE == "Y") {
@ -382,7 +386,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.datetimeInput = new DateTimeInput(
@ -393,7 +398,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
const elem = document.getElementById(
@ -423,7 +429,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.timeInput = new TimeInput(
@ -434,7 +441,8 @@ export class SubmitAbsenceComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
}
@ -448,7 +456,8 @@ export class SubmitAbsenceComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else {
this.selectInput = new SelectInput(
@ -458,7 +467,8 @@ export class SubmitAbsenceComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
this.fillDropdownList(

@ -26,10 +26,15 @@ const routes: Routes = [
{ path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' },
{ path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' },
{ path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' },
{ path: 'sit', loadChildren: './sit/sit.module#SitPageModule' },
{ path: 'reports', loadChildren: './reports/reports.module#ReportsPageModule' },
{ path: 'sit', loadChildren: './sit/sit.module#SitPageModule' },
{ path: 'termination', loadChildren: './termination/termination.module#TerminationPageModule' },
{ path: 'pending-transaction', loadChildren: './pending-transaction/pending-transaction.module#PendingTransactionPageModule' }
];
@NgModule({

@ -1,13 +1,13 @@
<ion-app [dir]="direction">
<ion-app [dir]="direction" id="lang">
<ion-split-pane>
<ion-menu [swipeGesture]="false" side='start' *ngIf="direction ==='ltr'">
<ion-content class="sidebar-menu">
<div class="header-div">
<div>
<ion-button class="closeIcon" (click)="closeMenu()">
<img style= "height: 18px !important;" src="../assets/imgs/close_menu_icon.png "></ion-button>
</div>
<div style="border-bottom: rgb(190, 186, 186) solid 1px;" >
<div class="header-div" style="visibility: hidden;">
<!-- <div>
<img class="closeIcon" (click)="closeMenu()" style= "height: 18px !important;" src="../assets/imgs/close_menu_icon.png ">
</div> -->
<div >
<img class="mohemmLogo" src="../assets/imgs/menu_mohemm_logo.png" >
</div>
<hr>
@ -21,22 +21,29 @@
</div>
</div>
<div style="border-bottom: rgb(190, 187, 187) solid 1px;" >
<div class="border" >
<button class="logout" ion-button (click)="logout();" > {{ts.trPK('home','logout')}}</button>
</div>
<br>
<ion-list class="list-en" >
<!-- <ion-item (click)="profile()">
<ion-item (click)="profile()" lines="none">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left>
<img style= "height: 29px !important; width:16px" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<!-- <ion-item (click)="performanceEvaluation()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','performance-evaluation')}}
</ion-label>
</ion-item> -->
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-item lines="none" [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
@ -45,6 +52,15 @@
</ion-label>
</ion-item>
<!-- <ion-item lines="none" (click)="openEmployeeHierarchy()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/hierarchy.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('myTeam','employee-hierarchy')}}
</ion-label>
</ion-item> -->
<!-- <ion-item (click)="openMyRequestPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/hr-request.png" item-left>
@ -53,10 +69,8 @@
{{ts.trPK('userProfile','HR-Request')}}
</ion-label>
</ion-item> -->
<!-- </ion-item> -->
<div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01' && menu.MENU_TYPE =='E'">
<!-- <div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.MENU_TYPE == 'E'">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/my-request.png" item-left>
</ion-thumbnail>
@ -64,9 +78,9 @@
{{menu.MENU_NAME}}
</ion-label>
</ion-item>
</div>
<!--
<ion-item (click)="oepnTransaction()">
</div> -->
<!-- <ion-item (click)="openTransaction()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left>
</ion-thumbnail>
@ -75,8 +89,17 @@
</ion-label>
</ion-item> -->
<!-- <ion-item lines="none" (click)="openContactUs()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 19px !important;" src="../assets/imgs/help.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('myTeam','help')}}
</ion-label>
</ion-item> -->
<!-- <ion-item (click)="openChangePassword()"> -->
<ion-item (click)="openChangePassword()">
<!-- <ion-item (click)="openChangePassword()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left>
</ion-thumbnail>
@ -84,7 +107,7 @@
{{ts.trPK('login','changepassword')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
</ion-item> -->
<ion-item (click)="openDigitalId()">
<ion-thumbnail slot="start" class="menu-thumb">
@ -108,25 +131,39 @@
</ion-list>
<div class="" style="text-align:center">
<img src="../assets/imgs/SFHLogo.png" class="CompanyImg logoImg">
<!-- <p class="companyTxt">{{companyDesc}}</p> -->
</div>
<!-- <div class="" style="text-align:center">
<img src="../assets/icon/new-design/moe-logo.png" class="CompanyImg logoImg">
</div> -->
</ion-content>
<ion-footer style="padding: 0px;">
<ion-row>
<div class="footer-container">
<ion-col class="colPad" size="9" style="visibility: hidden">
<img class="logoFotor" src="../assets/imgs/menu_mohemm_logo.png" />
</ion-col>
<ion-col class="colPad" size="3">
<img class="moe-logo" src="../assets/icon/moe-logo.png" />
</ion-col>
</div>
</ion-row>
<div class="menuFooter" >
<div> <img src="../assets/imgs/CSLogo.png" class="CompanyImg" ></div>
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-content>
</ion-footer>
</ion-menu>
<ion-menu [swipeGesture]="false" side='end' *ngIf="direction ==='rtl'">
<ion-content class="sidebar-menu">
<div class="header-div">
<div>
<ion-button class="closeIcon" (click)="closeMenu()">
<img style= "height: 18px !important;" src="../assets/imgs/close_menu_icon.png "></ion-button>
</div>
<div style="border-bottom: rgb(190, 186, 186) solid 1px;" >
<div class="header-div" style="visibility: hidden;">
<!-- <div>
<img class="closeIcon" (click)="closeMenu()" style= "height: 18px !important; margin-right: 15px;" src="../assets/imgs/close_menu_icon.png ">
</div> -->
<div>
<img class="mohemmLogo-ar" src="../assets/imgs/menu_mohemm_logo.png" >
</div>
<hr>
@ -139,21 +176,29 @@
</div>
</div>
<div style="border-bottom: rgb(190, 187, 187) solid 1px;" >
<div class="border" >
<button class="logout-ar" ion-button (click)="logout();" > {{ts.trPK('home','logout')}}</button>
</div>
<br>
<ion-list class="list-ar" >
<!-- <ion-item (click)="profile()">
<ion-item (click)="profile()" lines="none">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left>
<img style= "height: 29px !important; width:16px" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','title')}}
</ion-label>
</ion-item>
<!-- <ion-item (click)="performanceEvaluation()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('userProfile','performance-evaluation')}}
</ion-label>
</ion-item> -->
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-item lines="none" [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
@ -161,6 +206,16 @@
{{ts.trPK('myTeam','myTeam-header')}}
</ion-label>
</ion-item>
<!-- <ion-item lines="none" (click)="openEmployeeHierarchy()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/hierarchy.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('myTeam','employee-hierarchy')}}
</ion-label>
</ion-item> -->
<!-- <ion-item (click)="openMyRequestPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
@ -169,10 +224,8 @@
{{ts.trPK('userProfile','HR-Request')}}
</ion-label>
</ion-item> -->
<!-- </ion-item> -->
<div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.REQUEST_GROUP_NAME =='MBL_RG_01' && menu.MENU_TYPE =='E'">
<!-- <div *ngFor="let menu of menuList">
<ion-item (click)="oepnMyRequest(menu)" *ngIf="menu.MENU_TYPE == 'E'">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/my-request.png" item-left>
</ion-thumbnail>
@ -180,9 +233,9 @@
{{menu.MENU_NAME}}
</ion-label>
</ion-item>
</div>
</div> -->
<!-- <ion-item (click)="oepnTransaction()">
<!-- <ion-item (click)="openTransaction()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left>
</ion-thumbnail>
@ -190,8 +243,16 @@
{{ts.trPK('general','pending-transaction')}}
</ion-label>
</ion-item> -->
<ion-item (click)="openChangePassword()">
<!-- <ion-item lines="none" (click)="openContactUs()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 19px !important;" src="../assets/imgs/help.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('myTeam','help')}}
</ion-label>
</ion-item> -->
<!-- <ion-item (click)="openChangePassword()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left>
</ion-thumbnail>
@ -199,13 +260,13 @@
{{ts.trPK('login','changepassword')}}
<ion-badge [ngClass]=" direction === 'rtl' ? 'end-badge' : 'start-badge'" slot="end" color="danger" class="main-badge">{{notBadge}}</ion-badge>
</ion-label>
</ion-label> -->
<!-- <button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" >
</button> -->
</ion-item>
<!-- </ion-item> -->
<ion-item (click)="openDigitalId()">
<ion-thumbnail slot="start" class="menu-thumb">
@ -248,15 +309,31 @@
</ion-item> -->
</ion-list>
<div class="" style="text-align:center">
<img src="{{companyUrl}}" class="CompanyImg" [ngClass]="TeamFlag!='true'? 'logoImg':'logoImgWithMyTeam'">
<!-- <div class="" style="text-align:center"> -->
<!-- <img src="{{companyUrl}}" class="CompanyImg" [ngClass]="TeamFlag!='true'? 'logoImg':'logoImgWithMyTeam'"> -->
<!-- <img src="../assets/icon/new-design/moe-logo.png" class="CompanyImg" [ngClass]="TeamFlag!='true'? 'logoImg':'logoImgWithMyTeam'"> -->
<!-- <p class="companyTxt">{{companyDesc}}</p> -->
</div>
<div class="menuFooter">
<div> <img src="../assets/imgs/CSLogo.png" class="CompanyImg" ></div>
<!-- </div> -->
</ion-content>
<ion-footer style="padding: 0px;" dir="ltr">
<ion-row>
<div class="footer-container">
<ion-col class="colPad" size="9" style="visibility: hidden">
<img class="logoFotor" src="../assets/imgs/menu_mohemm_logo.png" />
</ion-col>
<ion-col class="colPad" size="3">
<img class="moe-logo" src="../assets/icon/moe-logo.png" />
</ion-col>
</div>
</ion-row>
<div class="menuFooter" >
<p class="companyTxt">{{companyDesc}}</p>
</div>
</ion-content>
</ion-footer>
</ion-menu>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>

@ -9,117 +9,121 @@ header
bottom: 0;
}
.mohemmLogo{
.mohemmLogo {
max-width: 46% !important;
border: 0 !important;
margin-left: 70px !important;
margin-right: 70px !important;
margin-top: -24px !important;
margin-bottom: 11px;
margin-bottom: 5px;
margin: auto;
display: block;
}
.mohemmLogo-ar{
.mohemmLogo-ar {
max-width: 46% !important;
border: 0 !important;
margin-right: 70px !important;
margin-top: -24px !important;
margin-bottom: 11px;
margin-bottom: 5px;
}
.closeIcon{
.closeIcon {
height: 10px !important;
margin-left: 255px !important;
margin-top: 0px !important;
background: transparent;
--background: white !important;
position: relative;
top: 10px;
}
hr {
border-width: 1px;
}
.menubutton{
.menubutton {
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 39px;
background: #f0ecec;
font-size: 2rem;
position: absolute;
width: 35px !important;
height: 19px;
box-shadow: 3px 0px 7px 0px #c5c2c2;
border-radius: 50%;
}
.changeIcon{
/* background: #c1c1c1; */
width: 21px;
/* height: 26px; */
border-radius: 50% !important;
position: relative;
color: #7f8c8d;
height: 35px;
}
.changeImgBtn{
color: var(--light);
text-transform: capitalize;
min-height: 39px;
background: #f0ecec;
font-size: 2rem;
position: absolute;
width: 35px !important;
height: 19px;
box-shadow: 3px 0px 7px 0px #c5c2c2;
border-radius: 50%;
}
.changeIcon {
/* background: #c1c1c1; */
width: 21px;
/* height: 26px; */
border-radius: 50% !important;
position: relative;
color: #7f8c8d;
height: 35px;
}
.changeImgBtn {
// margin: 0;
position: absolute;
top: 18%;
left: 68%;
left: 68%;
// -ms-transform: translate(-50%, -50%);
// transform: translate(-50%, -50%);
}
.logout{
background-color:#c2a16b;
.logout {
background-color: #99B8C6;
border: none;
color:white;
// padding: 20px;
color: #004D71;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-left: 120px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
border-radius: 30px;
// width: 40px;
height: 26px;
padding: 6px 24px;
}
.logout-ar{
background-color: #c2a16b;
border: none;
color: white;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-right: 95px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
border-radius: 30px;
height: 26px;
padding: 6px 24px;
}
.menuImg{
width: 105px !important;
height: 105px !important;
margin-left: 90px !important;
display: inline-flex;
overflow: hidden;
background: transparent;
border-radius: 50% !important;
position: relative;
top: 0px;
height: 35px;
margin: auto;
padding: 0px 24px;
display: block;
}
.logout-ar {
background-color: #99B8C6;
border: none;
color: #004D71;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 12px;
margin-right: 95px !important;
margin-top: 15px !important;
margin-bottom: 20px !important;
border-radius: 30px;
height: 35px;
padding: 0px 24px;
}
.menuImg {
width: 105px !important;
height: 105px !important;
margin-left: 90px !important;
display: inline-flex;
overflow: hidden;
background: transparent;
border-radius: 50% !important;
position: relative;
top: 0px;
}
.menu-header .logo {
@ -233,33 +237,35 @@ padding: 6px 24px;
height: 100px;
position: relative;
display: block;
margin-bottom: -28px;
margin-bottom: -10px;
top: 40px;
}
.list-en{
.list-en {
margin-left: 0;
margin-right: 0;
margin-top: -19px;
margin-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0px;
padding-bottom: 8px;
margin-right: 0;
margin-top: -19px;
margin-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0px;
padding-bottom: 8px;
}
.list-ar{
.list-ar {
margin-left: 0;
margin-right: 0;
margin-top: -19px;
margin-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0px;
padding-bottom: 8px;
margin-right: 0;
margin-top: -19px;
margin-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0px;
padding-bottom: 8px;
}
// .sidebar-menu .header-div {
// text-transform: capitalize;
@ -286,21 +292,27 @@ button.menu-item.item.item-block.item-ios {
}
.TxtPlace {
margin: 0;
padding: 0;
text-align: center;
font-weight: bolder;
color: black;
font-size: 16px;
font-size: 20px;
color: #004D71;
font-weight: bold;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 90%;
margin: 10px auto auto auto;
}
.TxtPlaces{
margin: 0;
padding: 0;
text-align: center;
font-weight: bolder;
.TxtPlaces {
font-size: 14px;
color: darkgray;
color: #004D71;
font-weight: bold;
// font-family: 'Inter' !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 90%;
margin: 5px auto;
}
.menuFooter {
@ -309,6 +321,8 @@ button.menu-item.item.item-block.item-ios {
text-align: center;
margin: auto;
width: 100%;
position: absolute;
top: 40px
}
@ -318,59 +332,49 @@ button.menu-item.item.item-block.item-ios {
margin: auto;
}
// .menuFooter .CompanyImg {
// width: 100%;
// height: 100%;
// }
.menuFooter .CompanyImg{
width: 80%;
height: 80%;
margin-bottom: -21px;
.menuFooter .CompanyImg {
width: 65%;
height: 60%;
margin-bottom: -21px;
}
// .logoImg{
// width: 120px;
// position: relative;
// }
.logoImgWithMyTeam {
.logoImgWithMyTeam{
width: 77px;
// position: relative;
margin-top: -1px;
margin-bottom: 70px;
width: 200px;
margin: 20px auto;
}
.logoImg{
// width: 77px;
// margin-top: -1px;
// margin-bottom: 180px;
width: 120px;
margin-top: -1px;
margin-bottom: 135px;
.logoImg {
margin-bottom: 180px;
width: 225px;
}
.companyTxt {
font-size: 12px;
color: var(--customnavy);
color: #004D71;
text-align: center;
font-family: 'Inter' !important;
}
ion-thumbnail.menu-thumb{
width:20px;
height:20px;
ion-thumbnail.menu-thumb {
width: 20px;
height: 20px;
// margin-top: 5px !important;
}
.changepassword{
color: black !important;
font-weight: bolder !important;
}
.profile{
.changepassword {
color: black !important;
font-weight: bolder !important;
}
.profileDiv-ar{
.profile {
color: #5C6F79 !important;
font-weight: bolder !important;
}
.profileDiv-ar {
margin: 5px auto !important;
}
@ -387,14 +391,42 @@ font-weight: bolder !important;
// top: 7px;
// }
.profileImg{
width: 140px;
height: 140px;
display: -webkit-inline-box;
display: inline-flex;
overflow: hidden;
background: transparent;
border-radius: 70% !important;
position: relative;
top: 3px;
.profileImg {
width: 100px;
height: 100px;
display: -webkit-inline-box;
display: inline-flex;
overflow: hidden;
background: transparent;
border-radius: 70% !important;
position: relative;
top: 3px;
}
ion-item,
.border {
border-bottom: #c7c7c7 solid 1px
}
.footer-container {
width: 100%;
display: -webkit-box;
display: flex;
-webkit-box-align: stretch;
align-items: stretch;
}
.footer-container .logoFotor {
margin: 20px;
float: left;
width: 100px !important;
height: 30px !important;
}
.footer-container .moe-logo {
width: 45px;
float: right;
margin-right: 16px;
margin-top: 15px;
}

@ -29,7 +29,7 @@ export class AppComponent implements OnInit {
menuSide = 'left';
notBadge: number;
companyUrl = '../assets/imgs/CSLogo.png';
companyDesc = 'Powered By Cloud Solutions';
companyDesc = '';
direction = 'ltr';
User_Job_name: string;
public logoutFlage: any = false;
@ -156,7 +156,7 @@ export class AppComponent implements OnInit {
localStorage.setItem("digitalIDUser", JSON.stringify(user));
this.digitalIDUser = user//JSON.stringify(user);
this.companyUrl = user.CompanyImageURL ? user.CompanyImageURL : '../assets/imgs/CSLogo.png';
this.companyDesc = user.CompanyImageDescription ? user.CompanyImageDescription : 'Powered By Cloud Solutions';
this.companyDesc = user.CompanyImageDescription ? user.CompanyImageDescription : '';
this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME;
@ -204,11 +204,11 @@ export class AppComponent implements OnInit {
} else {
this.user_image = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : '../assets/imgs/profile.png';
}
this.User_Job_name = user.JOB_NAME;
// let jobTitle = user.POSITION_NAME.split('.');
// this.User_Job_name = user.JOB_NAME;
let jobTitle = user.POSITION_NAME;
// if (jobTitle && jobTitle.length > 1) {
// this.User_Job_name = jobTitle[0] + " " + jobTitle[1];
// }
this.User_Job_name = jobTitle;
// }
//erm channel
// if (!CommonService.SKIP)
// this.cs.navigateForward('/erm-channel/survey');
@ -221,9 +221,11 @@ export class AppComponent implements OnInit {
this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag;
this.menuList = this.cs.sharedService.getSharedData(MenuResponse.MENU_LIST, false);
console.log(this.menuList);
});
}
private initializeDirection() {
if (this.isIOS) {
if (this.router.isActive('/authentication/login', true)) {
@ -261,6 +263,17 @@ export class AppComponent implements OnInit {
this.cs.openMyTeamPage();
}
public openEmployeeHierarchy() {
this.menu.toggle();
this.cs.sharedService.getSharedData('employee-hierarchy', true);
this.cs.openEmployeeHierarchy();
}
public openContactUs() {
this.menu.toggle();
this.cs.openContactPage();
}
public openMyRequestPage() {
this.menu.toggle();
this.cs.openMyRequestPage();
@ -356,10 +369,11 @@ export class AppComponent implements OnInit {
}
oepnMyRequest(menu) {
this.cs.sharedService.setSharedData(menu, MenuResponse.SELECTED_MENU);
this.cs.openConcurrentReport();
// this.cs.openConcurrentReport();
this.cs.openConcurrentTransactionsHome();
this.menu.toggle();
}
oepnTransaction() {
openTransaction() {
this.cs.openTransactions();
this.menu.toggle();
}

@ -8,16 +8,16 @@ import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { ZBar } from '@ionic-native/zbar/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { FilePath } from '@ionic-native/file-path/ngx';
import { File } from '@ionic-native/file/ngx';
import { Base64 } from '@ionic-native/base64/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
import { NFC, Ndef} from "@ionic-native/nfc/ngx"
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
// import { NFC, Ndef} from "@ionic-native/nfc/ngx"
// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { DigitalIdComponent } from './authentication/digital-id/digital-id.component';
import { BusinessCardComponent } from './authentication/business-card/business-card.component';
import { AppUpdateComponent } from './authentication/app-update/app-update.component';
@ -38,17 +38,17 @@ import { AppUpdateComponent } from './authentication/app-update/app-update.compo
providers: [
StatusBar,
SplashScreen,
ZBar,
Geolocation,
// ZBar,
// Geolocation,
Camera,
File,
FilePath,
Base64,
FirebaseX,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
NFC,
Ndef,
WifiWizard2
// NFC,
// Ndef,
// WifiWizard2
],
bootstrap: [AppComponent]
})

@ -5,13 +5,13 @@ ion-grid {
padding:30px 15px;
}
.timer-chart{
background: #6d6e71;
background: #094773;
text-align: center;
line-height: .7cm;
}
.tracking-content{
background: #6d6e71;
background: #053c63;
min-height: 50%;
}

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

@ -1,9 +1,9 @@
<ion-content style="--background: white;">
<div>
<ion-content style="--background: white;" class="biggerPhone">
<div class="rocket-image">
<img src="assets/icon/update_rocket_image.png" style="width: 100%;" />
</div>
<div style="text-align: center;">
<img src="assets/imgs/CSLogo.png" />
<img style="height: 75px" src="assets/icon/moe-logo.png" />
</div>
<h1 style="text-align: center; font-weight: bold"> {{ 'general,app-update' | translate }}</h1>
@ -15,7 +15,7 @@
<ion-grid>
<ion-row class="ion-justify-content-center">
<ion-col [size]="11" [sizeLg]="8" [sizeXl]="6" no-padding>
<ion-button style="font-size: 16px !important; width:100%; --background: #259CB8; background: white;" expand="block"
<ion-button style="font-size: 16px !important; width:100%; --background: #44A7A1; background: white;" expand="block"
(click)='dismiss()'>
{{ 'general,update-now' | translate }}
</ion-button>

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

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

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

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

@ -1,6 +1,7 @@
<app-generic-header
*ngIf="!accessFromOutSide"
showBack="true"
[moeImage]="false"
[headerText]="'login,verify-login' | translate">
</app-generic-header>
@ -31,9 +32,9 @@
-->
</ion-col>
</ion-row>
<div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 2"><p>{{ts.trPK('login','verify-fingerprint')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 3"><p>{{ts.trPK('login','verify-faceId')}}</p></div>
<div *ngIf="onlySMSBox"><p class="p-color">{{ts.trPK('login','verify-login-with')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 2"><p class="p-color">{{ts.trPK('login','verify-fingerprint')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 3"><p class="p-color">{{ts.trPK('login','verify-faceId')}}</p></div>
</ion-col>
</ion-row>
@ -43,7 +44,7 @@
<ng-container *ngFor="let buttonsGroup of buttons">
<ng-container *ngFor="let button of buttonsGroup">
<ion-col [size]="accessFromOutSide ? 12 : 6" *ngIf="button.visible">
<ion-col [size]="accessFromOutSide ? 12 : 6" *ngIf="button.visible && !button.disabled">
<!-- <ng-container *ngFor="let buttonsGroup of buttons">
@ -51,8 +52,8 @@
<ion-col [size]="accessFromOutSide ? 12 : 6" *ngIf="button.visible"> -->
<app-button (click)="checkAccess(button)" [title]="button.title | translate " [icon]="button.icon"
[settings]="button.settings" [strong]="button.txt" [class]="button.class" [disabled]="button.disabled"
*ngIf="button.visible"
[settings]="button.settings" [strong]="button.txt" [class]="button.class"
[buttonClass]="button.buttonClass" [pClass]="button.pClass">
</app-button>

@ -2,12 +2,8 @@
height: 25vh;
}
.rowOutside{
// margin-top: -37px;
}
.button-digital-id{
.button-digital-id {
--background: white !important;
background: white !important;
white-space: normal;
@ -22,16 +18,21 @@
}
.digital-id-en{
.digital-id-en {
color: black;
position: absolute;
right: 20px;
width: 10%;
}
}
.digital-id-ar{
.digital-id-ar {
color: black;
position: absolute;
left: 20px;
width: 10%;
}
}
.p-color {
color: #000000;
font-weight: bold;
}

@ -17,7 +17,7 @@ import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/aut
import { LoginModel } from '../models/LoginModel';
import * as moment from 'moment';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { NFC } from "@ionic-native/nfc/ngx";
// import { NFC } from "@ionic-native/nfc/ngx";
import { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component';
import { Password } from '../models/password';
@ -69,7 +69,7 @@ export class ConfirmLoginComponent implements OnInit {
public platform: Platform,
public modalController: ModalController,
public alertController: AlertController,
private nfc: NFC,
// private nfc: NFC,
private smsRetriever: SmsRetriever
) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -140,17 +140,17 @@ export class ConfirmLoginComponent implements OnInit {
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
},
{
title: 'login,verify-with-whatsapp',
url: null,
icon: 'assets/icon/login/104.png',
settings: new ButtonSettings(true, true, true, true),
value: 4,
visible: false,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
},
// {
// title: 'login,verify-with-whatsapp',
// url: null,
// icon: 'assets/icon/login/104.png',
// settings: new ButtonSettings(true, true, true, true),
// value: 4,
// visible: true,
// buttonClass: 'buttonClassWhite',
// pClass: 'pClassMyFileIconBlack',
// class: 'nationalIdIcon',
// },
{
title: 'login,verify-with-sms',
url: null,
@ -307,7 +307,7 @@ export class ConfirmLoginComponent implements OnInit {
private presentBiometricDialog() {
this.faio.show({
title: 'Biometric Authetnciation', // (Android Only) | optional | Default: "<APP_NAME> Biometric Sign On"
subtitle: 'Mohemm', // (Android Only) | optional | Default: null
subtitle: 'خدماتي', // (Android Only) | optional | Default: null
description: this.ts.trPK('general', 'auth-please'), // optional | Default: null
fallbackButtonTitle: this.ts.trPK('general', 'use-pin'), // optional | When disableBackup is false defaults to "Use Pin".
disableBackup: true, // optional | default: false
@ -353,20 +353,20 @@ export class ConfirmLoginComponent implements OnInit {
}
async checkNFCStatus() {
try {
let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus);
this.isNFCAvailable = true;
} catch (err) {
console.log("Error reading tag", err);
if (err === "NO_NFC") {
this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true;
} else {
this.isNFCAvailable = false;
}
}
// try {
// let nfcStatus = await this.nfc.enabled();
// console.log("nfc status >>>>>>>>>>" + nfcStatus);
// this.isNFCAvailable = true;
// } catch (err) {
// console.log("Error reading tag", err);
// if (err === "NO_NFC") {
// this.isNFCAvailable = false;
// } else if (err === "NFC_DISABLED") {
// this.isNFCAvailable = true;
// } else {
// this.isNFCAvailable = false;
// }
// }
}
public checkSMS() {
@ -380,6 +380,7 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok'))
.subscribe((result: SMSCheckResponse) => {
if (this.cs.validResponse(result)) {
// this.cs.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name');
this.businessInfo = {
show_business: result.BusinessCardPrivilege,
name_en: result.MemberInformationList[0].EMPLOYEE_NAME_En,
@ -439,7 +440,7 @@ export class ConfirmLoginComponent implements OnInit {
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language;
request.P_PASSWORD = this.password;
request.P_PASSWORD = localStorage.getItem('password');
this.authService
.login(request, () => {
console.log('error here');
@ -514,11 +515,12 @@ export class ConfirmLoginComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log('2');
console.log(result);
this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);

@ -1,6 +1,6 @@
.button-login{
--background: #34b9c1 !important;
background: #34b9c1 !important;
--background: #c1272d !important;
background: #c1272d !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
@ -14,17 +14,17 @@
@media only screen and (max-device-height: 640px) {
.digital-id-image-size{
width: 90% !important;
width: 70% !important;
height: 160% !important;
bottom: 0% !important;
position: absolute !important;
border: 1px solid #e6e6e6 !important;
border-radius: 70px !important;
border-radius: 20px !important;
}
}
.digital-id-image-size{
width: 90%;height: 180%; ; bottom: 0%; position: absolute; border: 1px solid #e6e6e6; border-radius: 70px;
width: 70%;height: 180%; ; bottom: 0%; position: absolute; border: 1px solid #e6e6e6; border-radius: 20px;
}

@ -22,11 +22,10 @@ export class DigitalIdComponent implements OnInit {
}
console.log(this.userInfo);
if (this.userInfo) {
// let jobTitle = this.userInfo.POSITION_NAME.split('.');
this.userJobName = this.userInfo.JOB_NAME;
// if (jobTitle && jobTitle.length > 1) {
// this.userJobName = jobTitle[0] + " " + jobTitle[1];
// }
let jobTitle = this.userInfo.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) {
this.userJobName = jobTitle[0] + " " + jobTitle[1];
}
}
}

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

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

@ -1,13 +1,15 @@
<ion-content padding>
<ion-grid class="customGrid">
<ion-row *ngIf="!user">
<div class="content">
<div class="content" dir="ltr">
<div class="first-circle"></div>
<div class="middle-circle"></div>
<div class="last-circle"></div>
</div>
</ion-row>
</ion-grid>
<div class="login-container">
<ion-grid>
<ion-row>
<ion-col *ngIf="!user">
<P class="pageTitle text-caps">{{ts.trPK('login','login')}}</P>
@ -15,14 +17,14 @@
</ion-row>
</ion-grid>
<div *ngIf="!user">
<ion-item class="item-input-login">
<div *ngIf="!user" [dir]="currentLang==1 ?'rtl': 'ltr'">
<ion-item class="item-input-login" lines="none">
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/username.png" item-start />
<ion-input class="login-input" required type="text" [(ngModel)]="username" placeholder="{{ts.trPK('login','username')}}">
</ion-input>
</ion-item>
<ion-item class="item-input-login">
<ion-item class="item-input-login" lines="none">
<img style="margin: 9px 8px 9px 0 !important;" class="item-icon" src="assets/imgs/password.png" item-start />
<ion-input class="login-input" required [type]="inputType" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input>
@ -34,34 +36,39 @@
<a>{{ts.trPK('login','signup')}}</a>
</div>
<div ng class="gridDiv" aria-disabled="true">
<button class="gridBtn" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':currentLang ==2}">English</button>
<button class="gridBtn arTxt" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':currentLang ==1}">عربي</button>
<button class="gridBtn border-moe-right" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':currentLang ==2}">English</button>
<button class="gridBtn arTxt border-moe-left" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':currentLang ==1}">عربي</button>
</div>
</div>
<div *ngIf="!user" class="centerDiv" style="margin: 25px 15px !important;">
<ion-button [ngClass]="{'disable-button-opacity': isValidForm()}" class="button-login" (click)="onLogin()" [disabled]="isValidForm()" style="width: 100% !important;">{{ts.trPK('login','login')}}</ion-button>
</div>
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user">
</welcome-login>
<!-- </div> -->
<div *ngIf="!user" class="centerDiv" style="margin-top: 20px !important;">
<ion-button [ngClass]="{'disable-button-opacity': isValidForm()}" class="button-login" (click)="onLogin()" [disabled]="isValidForm()" style="width: 100% !important;">{{ts.trPK('login','login')}}</ion-button>
<!-- digital ID button -->
<!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" currentLang === '2' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button> -->
<br><br>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
<!-- <br><br> -->
<div style="text-align: center;">
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
</div>
</div>
</ion-content>
<ion-footer *ngIf="!user" [ngStyle]="keyboardOpened === true ? {'display': 'none'} : {}" style="padding: 0px;">
<ion-row>
<ion-col class="colPad">

@ -1,15 +1,21 @@
.signupDiv {
font-size: 14px;
}
.customGrid {
margin-bottom: 20px;
}
.gridBtn.active{
background:var(--customnavy) !important;
color:var(--light) !important;
.gridBtn.active {
background: var(--customnavy) !important;
color: var(--light) !important;
}
.gridDiv{direction: rtl}
.gridDiv {
direction: rtl
}
.pageTitle {
color: var(--dark);
font-size: 23px;
@ -17,6 +23,7 @@
text-align: center;
padding: 0px;
margin: 0px;
font-weight: bold;
}
.TxtPlace {
@ -42,15 +49,14 @@ img.centerDiv {
min-width: 20px;
min-height: 20px;
display: block;
margin-top: 30px;
background: var(--light);
}
.gridDiv {
width: 100%;
height: 40px;
margin-top: 20px;
// margin-bottom: 10px;
padding: 10px 15px;
font-size: 14px;
:root[dir="ltr"] {
@ -92,10 +98,12 @@ img.centerDiv {
}
button.arTxt {
font-family: var(--fontFamilyIOSAR) !important;
:root[dir="rtl"] {
float: right;
color: var(--customnavy) !important;
font-family: var(--fontFamilyIOSAR) !important;
font-weight: bold;
border-radius: 2px 0px 0px 2px !important;
}
@ -107,42 +115,44 @@ img.centerDiv {
border-radius: 0px 2px 2px 0px !important;
}
}
}
.login-input {
border: none;
margin-right: 5px;
font-family: 'Kufi';
}
.item-input{
--min-height: 1.0cm !important;
.item-input {
--min-height: 1.5cm !important;
--border-radius: 12px;
--ion-color-base: white !important;
// --background: color: var(--darkgray) !important;
// background: #7f8c8d !important;
border-radius: 33px;
--border: solid #9999992b !important;
border: solid #9999992b !important;
margin-bottom :12px;
margin-left: 12px;
margin-right: 12px;
border-radius: 33px;
--border: solid #9999992b !important;
border: solid #9999992b !important;
margin-bottom: 12px;
margin-left: 12px;
margin-right: 12px;
}
.button-login{
.button-login {
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
min-height: 1.3cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
}
.button-digital-id{
.button-digital-id {
--background: white !important;
background: white !important;
white-space: normal;
@ -158,28 +168,31 @@ img.centerDiv {
.content {
width: 500px;
margin-left: auto;
margin-right: auto;
width: 500px;
margin-left: auto;
margin-right: auto;
}
.first-circle {
background: var(--newgreen) !important;
background: #29B5BF !important;
border-radius: 50%;
height: 292px;
width: 288px;
height: 310px;
width: 310px;
float: left;
margin-left: -55px;
margin-top: -140px;
}
.middle-circle {
position: relative;
background:#6d6e71 !important;
background: #6d6e71 !important;
border-radius: 50%;
height: 160px;
width: 170px;
width: 190px;
margin: -115px 0px 0px 179px;
}
.last-circle {
position: inherit;
background: #c2a16b !important;
@ -192,10 +205,9 @@ img.centerDiv {
.logoFotor {
width: 45px !important;
height: 45px !important;
}
.welcomeText{
.welcomeText {
justify-content: center;
align-items: center;
text-align: left;
@ -206,56 +218,110 @@ img.centerDiv {
margin-left: 48px;
}
.forgetText{
.forgetText {
background: transparent;
color: var(--darkblue) !important;
}
@media only screen and (max-width: 980px) {
.content{width:100%;}
.content {
width: 100%;
}
}
.circle1{
.circle1 {
width: 15%;
padding-top: 15%;
margin:0 42%;
margin: 0 42%;
background-color: black;
border-radius: 50%;
display:inline-block;
}
.circle2{
display: inline-block;
}
.circle2 {
width: 15%;
padding-top: 15%;
margin-left: 20%;
background-color:darkred;
background-color: darkred;
border-radius: 50%;
display:inline-block;
margin-top:20px;
}
.circle3{
width: 15%;
display: inline-block;
margin-top: 20px;
}
.circle3 {
width: 15%;
padding-top: 15%;
margin-left: 26%;
background-color:gold;
border-radius: 50%;
display:inline-block;
margin-top:20px;
margin-right: 15%;
}
background-color: gold;
border-radius: 50%;
display: inline-block;
margin-top: 20px;
margin-right: 15%;
}
.digital-id-en{
.digital-id-en {
color: black;
position: absolute;
right: 20px;
width: 10%;
}
}
.digital-id-ar{
.digital-id-ar {
color: black;
position: absolute;
left: 20px;
width: 10%;
}
}
.footer-container {
width: 100%;
display: -webkit-box;
display: flex;
-webkit-box-align: stretch;
align-items: stretch;
}
.footer-container .logoFotor {
margin: 20px;
float: left;
width: 100px !important;
height: 30px !important;
}
.footer-container .moe-logo {
width: 45px;
float: right;
margin-right: 16px;
margin-top: 15px;
}
.border-moe-right {
border-top-right-radius: 16px;
border-bottom-right-radius: 16px;
}
.border-moe-left {
border-top-left-radius: 16px;
border-bottom-left-radius: 16px;
}
.menuFooter {
// position: fixed;
bottom: 0px;
text-align: center;
margin: auto;
width: 100%;
position: absolute;
top: 40px
}
.companyTxt {
font-size: 12px;
color: #004D71;
text-align: center;
font-family: 'Inter' !important;
}

@ -1,7 +1,7 @@
import { Component, OnInit, NgZone, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { Router } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';
import { AlertController, Platform, Events } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
@ -22,6 +22,7 @@ import { ModalController } from '@ionic/angular';
import { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component';
@Component({
selector: 'login',
templateUrl: './login.component.html',
@ -30,6 +31,8 @@ import { AppUpdateComponent } from '../app-update/app-update.component';
export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any;
userInfo: any;
companyDesc = '';
constructor(
public cs: CommonService,
@ -47,7 +50,9 @@ export class LoginComponent implements OnInit, OnDestroy {
public plt: Platform,
public pushService: PushService,
public keyboardService: KeyboardService,
public modalController: ModalController
public modalController: ModalController,
public route:ActivatedRoute,
) {
this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage);
@ -68,6 +73,13 @@ export class LoginComponent implements OnInit, OnDestroy {
} else {
this.user = false;
}
// this.route
//.params.subscribe(val => {
console.log("login page called init...")
}
appLang = 1;
@ -103,19 +115,25 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserResult: CheckUserAuthenticationResponse;
public inputType = "password";
ngOnInit() {
this.monitorKeyboardChange();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.currentLang = TranslatorService.getCurrentLanguageCode();
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = "US";
this.changeLanguage('2')
} else {
this.language = "AR";
this.changeLanguage('1')
}
console.log("login page called...");
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
this.currentLang = previousLanguage =='en' ? 2 : 1;
}else{
document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
this.events.subscribe('user', user => { this.user = user; });
this.deviceToken = this.cs.getDeviceToken();
if (this.deviceToken) {
@ -139,6 +157,12 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backClicked();
}
start() {
this.cs.startLoading();
}
ngAfterViewInit(){
}
public changeLanguage(langNumber) {
console.log("current lang: " + this.currentLang)
console.log("click lang: " + langNumber)
@ -154,8 +178,10 @@ export class LoginComponent implements OnInit, OnDestroy {
this.language = 'AR';
}
this.currentLang = TranslatorService.getCurrentLanguageCode();
}
this.currentLang = langNumber;
document.getElementById('lang').lang = this.currentLang == 1 ? 'ar' : 'en';
}
public forgetPasswordPage() {
@ -338,6 +364,14 @@ export class LoginComponent implements OnInit, OnDestroy {
if (anotherUser) {
this.username = '';
this.password = '';
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
this.currentLang = previousLanguage =='en' ? 2 : 1;
}else{
document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
}
console.log('login emit');
console.log('login');
@ -348,6 +382,14 @@ export class LoginComponent implements OnInit, OnDestroy {
loginWithUser() {
console.log('loginWithUser');
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
this.currentLang = previousLanguage =='en' ? 2 : 1;
}else{
document.getElementById('lang').lang = 'en';
TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
this.cs.openConfirmLoginPage();
}
@ -390,19 +432,19 @@ export class LoginComponent implements OnInit, OnDestroy {
return await modal.present();
}
showPassword(){
showPassword() {
this.inputType = 'password';
}
hidePassword(){
hidePassword() {
this.inputType = 'text';
}
async appUpdate(msg, result) {
const modal = await this.modalController.create({
component: AppUpdateComponent,
cssClass: 'app-update-modal-css',
componentProps: {'msg':msg}
component: AppUpdateComponent,
cssClass: 'app-update-modal-css',
componentProps: { 'msg': msg }
});
modal.onDidDismiss().then((data) => {
this.handleAppUpdate(result);

@ -5,7 +5,7 @@
<app-generic-header
showBack="true"
[moeImage]="false"
[headerText]="'verificationcode,verificationcode' | translate">
</app-generic-header>

@ -1,25 +1,26 @@
.header-toolbar{
.header-toolbar {
--background: linear-gradient(45deg, #3ac1f1 0%, #19a163 36%, #19a163 59%, #1a586d 100%);
}
.btnBack{
.btnBack {
background: transparent;
}
ion-img{
ion-img {
width: 180px;
height: 180px;
background:transparent;
background: transparent;
}
h1{
h1 {
font-size: 28px !important;
}
span{
span {
font-weight: bold;
}
.button-login{
.button-login {
--background: var(--newgreen) !important;
background: var(--newgreen) !important;
@ -35,11 +36,11 @@ span{
.leftDiv {
margin: auto;
text-align: left;
display: block;
}
.sms_code{
.sms_code {
margin: 0px;
text-align: center;
}
@ -55,14 +56,16 @@ ion-input {
outline: none;
width: 20%;
transition: all .2s ease-in-out;
border-radius: 3px;
border-radius: 15px;
display: inline-block;
--padding-start: 8px;
&:focus {
border-color:var(--ion-color-secondary) !important;
box-shadow: 0 0 5px var(--ion-color-secondary) !important inset;
border-color: var(--ion-color-secondary) !important;
box-shadow: 0 0 5px var(--ion-color-secondary) !important;
}
&::selection {
background: transparent;
background: transparent;
}
}
}

@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ElementRef } from '@angular/core';
import { NavController, Platform } from '@ionic/angular';
import { IonContent, NavController, Platform } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@ -24,10 +24,11 @@ import { GetLoginInfoRequest } from 'src/app/hmg-common/services/authentication/
import * as moment from 'moment';
import { NFC } from "@ionic-native/nfc/ngx";
// import { NFC } from "@ionic-native/nfc/ngx";
import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
@Component({
selector: 'app-sms-page',
@ -41,7 +42,7 @@ import { SmsRetriever } from '@ionic-native/sms-retriever/ngx';
export class SmsPageComponent implements OnInit {
@ViewChild(IonContent) content: IonContent;
public static LOGIN_DATA = 'LOGIN_DATA';
Channel = 0;
@ -124,7 +125,7 @@ export class SmsPageComponent implements OnInit {
public platform: Platform,
private nfc: NFC,
// private nfc: NFC,
private smsRetriever: SmsRetriever
@ -189,6 +190,7 @@ export class SmsPageComponent implements OnInit {
.then((res: any) => this.checkActivation(res, true))
.catch((error: any) => console.error(error));
this.content.scrollToTop(0);
}
@ -365,33 +367,33 @@ export class SmsPageComponent implements OnInit {
async checkNFCStatus() {
try {
// try {
let nfcStatus = await this.nfc.enabled();
// let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus);
// console.log("nfc status >>>>>>>>>>" + nfcStatus);
this.isNFCAvailable = true;
// this.isNFCAvailable = true;
} catch (err) {
// } catch (err) {
console.log("Error reading tag", err);
// console.log("Error reading tag", err);
if (err === "NO_NFC") {
// if (err === "NO_NFC") {
this.isNFCAvailable = false;
// this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") {
// } else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true;
// this.isNFCAvailable = true;
} else {
// } else {
this.isNFCAvailable = false;
// this.isNFCAvailable = false;
}
// }
}
// }
}
@ -421,7 +423,7 @@ export class SmsPageComponent implements OnInit {
if (this.common.validResponse(result)) {
// this.common.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name')
//save business card info
@ -484,6 +486,7 @@ export class SmsPageComponent implements OnInit {
}
this.common.sharedService.setSharedData(result.MemberInformationList[0].PAYROLL_CODE, "projcet-code");
this.common.sharedService.setSharedData(result.BasicMemberInformation.P_LEGISLATION_CODE, "legislation-code");
this.activeType = this.common.setActiveTypeLogin(0);
@ -596,89 +599,55 @@ export class SmsPageComponent implements OnInit {
onChange() {
// tslint:disable-next-line: only-arrow-functions
const filtered = this.smc_code.filter(function (el) {
if (el) {
return el;
}
});
if (filtered.length === 4 && !this.isAutoRead) {
this.checkVerificationCode();
}
}
goToNextInput(e) {
const key = e.which;
const t = e.target;
const sib = t.nextElementSibling;
goToNextInput(e) {
const key = e.which;
const t = e.target;
const sib = t.nextElementSibling;
const sibPre = t.previousElementSibling;
if (key === undefined && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
if (key === undefined && e.target.value.length == 4 && (this.platform.is('ios') && !this.platform.is('mobileweb'))) {
this.checkActivation(e.target.value, false);
}
if (key !== 9 && (key < 48 || key > 57)) {
if (key === 8 || key === 46) {
return true;
} else {
e.preventDefault();
return false;
}
}
if (key === 9) {
return true;
}
if (sib) {
if (e.target.value === '') {
sibPre.setFocus();
} else {
sib.setFocus();
}
}
}
}

@ -25,7 +25,7 @@
.header-toolbar-new{
--background: #269DB8;
--background: #29B5BF;
}
.addEitOkButton{
white-space: normal !important;
@ -33,7 +33,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #269DB8;
background-color: #29B5BF;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -177,7 +177,8 @@ export class AddCeiComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){// profile/ sql
// this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -192,7 +193,8 @@ export class AddCeiComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){
// this.numberInput = new NumberInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -214,7 +216,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.dateInput = new DateInput(
@ -225,7 +228,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -251,7 +255,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.datetimeInput = new DateTimeInput(
@ -262,7 +267,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
const elem = document.getElementById(
@ -297,7 +303,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.timeInput = new TimeInput(
@ -308,7 +315,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
}
@ -322,7 +330,8 @@ export class AddCeiComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else {
// dropdown list missing open in differnt page
@ -335,7 +344,8 @@ export class AddCeiComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED);

@ -33,8 +33,9 @@ ion-label {
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #29B5BF;
background-color: #44A7A1;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
--border-radius: 16px !important;
}

@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild, ElementRef } from "@angular/core";
import { MenuEntry } from "src/app/hmg-common/services/menu/models/menu.entry";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { EitRequest } from "../models/eit.request";
import { ModalController } from "@ionic/angular";
import { ModalController, Platform } from "@ionic/angular";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { EITTransactionsRequest } from "../models/EITTransactionsReq";
import { EitService } from "../services/eit.service";
@ -73,7 +73,8 @@ export class AddEitComponent implements OnInit {
public cs: CommonService,
private ts: TranslatorService,
private eitService: EitService,
public datePicker: DatePicker
public datePicker: DatePicker,
public platform: Platform
) {
this.direction = TranslatorService.getCurrentLanguageName();
this.selEmp = this.cs.sharedService.getSharedData(
@ -122,6 +123,10 @@ export class AddEitComponent implements OnInit {
EITTransactionsRequest.SUBMIT_EIT_ACTION
);
}
// window.addEventListener('keyboardDidShow', () => {
// document.activeElement.scrollIntoView(false);
// });
}
ngOnInit() {}
@ -181,7 +186,8 @@ export class AddEitComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){// profile/ sql
// this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -196,7 +202,8 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else if(feildsList[i].DEFAULT_TYPE=="P"||feildsList[i].DEFAULT_TYPE=="S"){
// this.numberInput = new NumberInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,this.getDefaultValue(feildsList[i].DESC_FLEX_NAME,feildsList[i].DESC_FLEX_CONTEXT_CODE,feildsList[i].SEGMENT_NAME,feildsList[i].PARENT_SEGMENTS_VS_SplitedVS,feildsList[i].PARENT_SEGMENTS_DV_Splited),containerId,feildsList[i].MOBILE_ENABLED);
@ -218,7 +225,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.dateInput = new DateInput(
@ -229,7 +237,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP,
);
}
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -255,7 +264,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.datetimeInput = new DateTimeInput(
@ -266,7 +276,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
const elem = document.getElementById(
@ -301,7 +312,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
} else {
this.timeInput = new TimeInput(
@ -312,7 +324,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG,
this.direction
this.direction,
feildsList[i].REQ_COL_TIP
);
}
}
@ -326,7 +339,8 @@ export class AddEitComponent implements OnInit {
defaultValText,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
} else {
// dropdown list missing open in differnt page
@ -339,7 +353,8 @@ export class AddEitComponent implements OnInit {
containerId,
feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG
feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
);
// }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED);
@ -391,6 +406,8 @@ export class AddEitComponent implements OnInit {
if (this.validateEitObj && this.validateEitObj.length > 0) {
this.fillEITStructure();
}
this.bindToolTip();
}
addFieldToDOM(
@ -520,17 +537,33 @@ export class AddEitComponent implements OnInit {
option.value = optionList[i].ID_COLUMN_NAME;
select.add(option);
}
if (select.dataset.hiddenval) {
select.value = select.dataset.hiddenval;
//select.dataset.hiddenval="";
} else {
select.value = DV.P_ID_COLUMN_NAME;
if (eitObj.DEFAULT_TYPE == "C" && eitObj.DEFAULT_VALUE) {
select.value = eitObj.DEFAULT_VALUE;
} else {
select.value = DV.P_ID_COLUMN_NAME;
}
}
select.disabled = false;
}
}
bindToolTip () {
const toolTips = Array.from(document.getElementsByClassName('toolTip'));
toolTips.forEach(toolTip => {
toolTip.addEventListener('click', e => {
const toolTipData = toolTip.getAttribute("data-tooltip");
this.cs.yellowToast(toolTipData);
});
});
}
bindHtmlElemEvents(id, obj) {
const isIOS = this.platform.is('ios');
const elem = document.getElementById(id);
console.log(elem);
console.log(obj);
@ -540,6 +573,18 @@ export class AddEitComponent implements OnInit {
if (elemType == "SELECT") changeEvent = "change";
try {
if (isIOS && (obj.FORMAT_TYPE == "N" || obj.FORMAT_TYPE == "C")) {
elem.addEventListener("ionFocus", event => {
setTimeout(()=>{
console.log(event.target as Element);
var e = event.target as Element;
e.scrollIntoView(true);
},1000)
})
}
// elem.addEventListener("change", (e) => {
elem.addEventListener(changeEvent, e => {
//console.log("elem change "+elem.id);
@ -548,6 +593,13 @@ export class AddEitComponent implements OnInit {
// if(!x.value)
// isEmpty=true;
//emptyChildElement
if (obj.FORMAT_TYPE == "N") {
const maxSize = obj.MAXIMUM_SIZE;
const value = (document.getElementById(obj.APPLICATION_COLUMN_NAME) as HTMLInputElement).value;
(document.getElementById(obj.APPLICATION_COLUMN_NAME) as HTMLInputElement).value = value.length > maxSize ? value.substring(0, maxSize) : value;
}
elem.classList.remove("requiredClassElm");
if (
obj.CHILD_SEGMENTS_VS_Splited &&
@ -704,7 +756,8 @@ export class AddEitComponent implements OnInit {
}else{
// console.log("else - " + elem.value);
elem.value = val;
elem.innerText = text;
// elem.innerText = text;
elem.setAttribute("value", val);
// console.log("else - " + elem.value);
}
@ -869,7 +922,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: val,
DESCRIPTION: "",
ID_COLUMN_NAME: idColName,
ID_COLUMN_NAME: idColName ? idColName: '',
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
});
break;
@ -899,7 +952,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: text,
DESCRIPTION: "",
ID_COLUMN_NAME: val,
ID_COLUMN_NAME: val ? val : '' ,
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
});
break;
@ -924,7 +977,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: text,
DESCRIPTION: "",
ID_COLUMN_NAME: val,
ID_COLUMN_NAME: val ? val : '',
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
});
break;
@ -936,6 +989,13 @@ export class AddEitComponent implements OnInit {
) as HTMLInputElement;
let text = x.value;
let val = x.dataset.colmText;
if (this.eitResponse[j].DISPLAY_FLAG == "N" && this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
const attributeValue = x.getAttribute('value');
val = attributeValue ? attributeValue : '';
}
if (
(val == undefined || val == "") &&
parentsList[i].IsRequired == "REQUIRED"
@ -951,7 +1011,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: text,
DESCRIPTION: "",
ID_COLUMN_NAME: val,
ID_COLUMN_NAME: val ? val: '',
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
});
break;
@ -965,7 +1025,8 @@ export class AddEitComponent implements OnInit {
emptyChildElement(segmentName) {
let elem = this.getElementByName(segmentName);
elem.value = null;
elem.innerHTML = "";
// elem.innerHTML = "";
if ("dtvalue" in elem.dataset) {
elem.dataset.dtvalue = "";
}
@ -1229,6 +1290,7 @@ export class AddEitComponent implements OnInit {
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
elem.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg();
return false;
} else {
@ -1267,6 +1329,7 @@ export class AddEitComponent implements OnInit {
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) {
x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg();
return false;
} else {
@ -1287,8 +1350,18 @@ export class AddEitComponent implements OnInit {
) as HTMLSelectElement;
let val = x.dataset.colmText;
textValue = x.value;
// below code is to handle fields which are hidden and required and has to have default value.
// So if colmText is empty then get value from value attribute which is already been set initially
if (this.eitResponse[i].DISPLAY_FLAG == "N" && this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
const attributeValue = x.getAttribute('value');
val = attributeValue ? attributeValue : '';
textValue = val;
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg();
return false;
} else {

@ -63,7 +63,7 @@
<!-- <ion-footer style="background: #f5f5f5 !important;">
<div class="centerDiv" (click)="gotoTransactionsPage()">
<ion-button ion-button style="background: #269db8 !important; --background: #269db8">
<ion-button ion-button style="background: #29B5BF !important; --background: #29B5BF">
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer> -->

@ -22,7 +22,7 @@
<div *ngFor="let item of EITTransactionList.Collection_Transaction">
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''">
<label style="color:#269DB8;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<label style="color:#29B5BF;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br>

@ -47,7 +47,7 @@
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #269DB8;
background: #29B5BF;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
@ -64,7 +64,7 @@
.header-div {
background-color: #269DB8;
background-color: #29B5BF;
text-transform: capitalize;
height: 160px;
// position: relative;
@ -73,11 +73,11 @@
}
.header-toolbar-new{
--background: #269DB8;
--background: #29B5BF;
}
.addClass{
background-color: #269DB8;
background-color: #29B5BF;
width: 80px;
height: 80px;
right: 8%;
@ -94,7 +94,7 @@
.contentEit:before {
position: absolute;
content: "";
// background: #269DB8;
// background: #29B5BF;
height: 140px;
width: 100%;
left: 0;
@ -114,7 +114,7 @@
.content:before {
position: absolute;
content: "";
background: #269DB8;
background: #29B5BF;
height: 140px;
width: 100%;
left: 0;
@ -205,7 +205,7 @@
}
.blue-dote{
background-color: #269DB8;
background-color: #29B5BF;
width: 12px;
height: 12px;
border-radius: 50% !important;
@ -278,7 +278,7 @@
}
.child-dote{
background-color: #269DB8;
background-color: #29B5BF;
width: 15px;
height: 15px;
border-radius: 50% !important;
@ -287,7 +287,7 @@
margin-right: 5px;
}
.child-dote-ar{
background-color: #269DB8;
background-color: #29B5BF;
width: 15px;
height: 15px;
border-radius: 50% !important;
@ -321,7 +321,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #269DB8;
background-color: #29B5BF;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

@ -189,7 +189,7 @@
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
background: #44A7A1;
color: #fff;
border-radius: 50%;
border: 0px;
@ -227,7 +227,7 @@
}
.header-toolbar-new{
--background: #269DB8;
--background: #29B5BF;
}
.title{
margin-top: -37px;
@ -243,7 +243,7 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #269DB8;
background-color: #0ca2de;
width: 80% !important;
color: white!important;
border-radius: 16px !important;

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

@ -1,9 +1,14 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title [ngClass]=" direction === 'en' ? 'title' : 'title-ar'" color="light">{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
</ion-header> -->
<app-generic-header
[showBack]="true"
[headerText]="headerTitle">
</app-generic-header>
<ion-content>
@ -11,10 +16,14 @@
<ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col>
<div size="10" [ngClass]=" direction === 'en' ? 'approvalTitle' : 'approvalTitle-ar'" >{{'general, addAttach' | translate}}</div>
<div style="position: relative" size="10" [ngClass]=" direction === 'en' ? 'approvalTitle' : 'approvalTitle-ar'" >
{{'general, addAttach' | translate}}
<span *ngIf="isAttachment =='Y' || isAttachmentGET_MENU === 'Y'">*</span>
<div *ngIf="selMenu.GetMenuEntriesList.REQ_ATTACHMENT_TIP" (click)="showToolTip(selMenu.GetMenuEntriesList.REQ_ATTACHMENT_TIP)" class='toolTip-inside'><ion-icon style='font-size: 20px' name='information-circle-outline'></ion-icon> </div>
</div>
</ion-col>
<ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv">
<div [ngClass]=" direction === 'en' ? 'fileDiv-en' : 'fileDiv-ar'">
<input end class="inputfile" style="margin-top: 10px;z-index: 99999;position: absolute;opacity: 0;" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" (click)="onFileSelectedclick($event)" />
<label end for="file" class="attachLable">
@ -261,7 +270,7 @@
<ion-footer>
<div class="centerDiv">
<ion-button class="confirmEitOkButton" color="customnavy" ion-button (click)="openSubmitModal()">
<ion-button class="confirmEitOkButton" color="customnavy" ion-button (click)="openSubmitModal()" [disabled] ="isAttachment ==='Y' && attachListOver.length ===0">
{{ (isDelete ? 'general, delete' : 'general, submit') | translate }}</ion-button>
</div>
</ion-footer>

@ -189,7 +189,7 @@
position: absolute;
top: 0px;
z-index: 0;
background: #30b8c6;
background: #44A7A1;
color: #fff;
border-radius: 50%;
border: 0px;
@ -243,10 +243,11 @@
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #29B5BF;
background-color: #44A7A1;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
--border-radius: 16px !important;
}
.approvalTitle-ar{
@ -260,3 +261,12 @@
font-size: 16px;
text-align: left;
}
.fileDiv-en {
// float: right;
}
.fileDiv-ar {
float: left;
}

@ -14,6 +14,7 @@ import { EitService } from '../services/eit.service';
import { AddEitResponse } from '../models/add.eit.response';
import { FileUploader } from 'ng2-file-upload';
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
import { HomeComponent } from 'src/app/notification/home/home.component';
@Component({
selector: 'app-confirm-add-eit',
@ -61,8 +62,9 @@ export class ConfirmAddEitComponent implements OnInit {
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
direction: string;
isAttachment: string = 'N';
isAttachmentGET_MENU: string = 'N';
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
this.direction = TranslatorService.getCurrentLanguageName()
this.isSubmitBtnClicked = false;
@ -77,12 +79,13 @@ export class ConfirmAddEitComponent implements OnInit {
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit;
this.isAttachmentGET_MENU = this.selMenu.GetMenuEntriesList.ATTACHMENT_REQUIRED;
if (this.isResubmitEIT) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true);
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
this.itemKey = this.getPassNotificationDetails.ITEM_KEY;
this.pActionMode = "RESUBMIT";
this.menuType = "E";
@ -100,7 +103,7 @@ export class ConfirmAddEitComponent implements OnInit {
this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID;
this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
this.isAttachment = this.addrespList.SubmitEITTransactionList.P_ATTACHMENT_REQUIRED;
this.getApproversList();
// this.confirmAddEit.submitEit(this.eitRequest).subscribe((result: AddEitResponse) => {
@ -228,12 +231,15 @@ export class ConfirmAddEitComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitEIT==false){
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
// this.cs.openHome();
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
//this.cs.setTotalNumberOfWorklistRequest(true);
this.cs.openNotificationPage();
}
}
@ -249,7 +255,7 @@ export class ConfirmAddEitComponent implements OnInit {
//open the modal with return data
let attachDocID = attachItems.ATTACHED_DOCUMENT_ID;
this.cs.sharedService.setSharedData( this.P_TransactionID, 'TransactionID');
this.cs.sharedService.setSharedData(this.P_TransactionID, 'TransactionID');
this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
const modal = await this.modalController.create({
@ -298,7 +304,7 @@ export class ConfirmAddEitComponent implements OnInit {
/*****submit modal********/
async openSubmitModal() {
this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.attachListOver, 'submitAttachmentList');
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
const modal = await this.modalController.create({
component: SubmitEitModalComponent,
@ -314,7 +320,7 @@ export class ConfirmAddEitComponent implements OnInit {
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
this.startEitApproval();
this.startEitApproval();
}
});
@ -482,7 +488,7 @@ export class ConfirmAddEitComponent implements OnInit {
});
onFileSelectedclick(event){
onFileSelectedclick(event) {
event.target.value = '';
}
@ -529,7 +535,7 @@ export class ConfirmAddEitComponent implements OnInit {
pushObject(fileData, name, type) {
console.log("before push: "+ this.index);
console.log("before push: " + this.index);
//this.attachListOver.length++;
try {
let array = name.split('.');
@ -537,11 +543,11 @@ export class ConfirmAddEitComponent implements OnInit {
this.attachListOver.push(
{
AttachmentID: this.attachListOver.length,
AttachmentID: this.attachListOver.length,
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
P_FILE_DATA: fileData.split(',')[1],
P_FILE_NAME: name,//.split('.')[0],
P_TRANSACTION_ID: this.P_TransactionID
P_TRANSACTION_ID: this.P_TransactionID
})
} catch (e) {
@ -564,5 +570,9 @@ export class ConfirmAddEitComponent implements OnInit {
// }
showToolTip(toolTip: any) {
this.cs.yellowToast(toolTip);
}
}

@ -181,6 +181,9 @@
</ion-row>
<h4> {{'general, noData' | translate}}</h4>
</div>
<div class="terms" *ngIf="getPassMnuEntryObj.REQ_TIP && getResEITTransactionList[0]?.Collection_Transaction">
<p>{{getPassMnuEntryObj.REQ_TIP}}</p>
</div>
<!-- <no-data *ngIf="!getResEITTransactionList || getResEITTransactionList[0]?.Collection_Transaction.length <= 0" txt="{{'general.noData' | translate}}"></no-data> -->
<div *ngIf="getResEITTransactionList && getResEITTransactionList[0]?.Collection_Transaction.length > 0 ">
<!-- <div> -->
@ -200,17 +203,20 @@
<ion-grid>
<div>
<!-- <ion-row>
<!-- <div>
<ion-row>
<ion-col class="colBold">
<label for="">status</label>
</ion-col>
<ion-col>
<label for="">{{EITTransactionList.status}}</label>
</ion-col>
</ion-row> -->
</div>
</ion-row>
</div> -->
<ion-grid class="grids">
<ion-col size="2" *ngIf="getPassMnuEntryObj.UPDATE_BUTTON == 'Y'" (click)="updateEITRrq(i)" >
<img [ngClass]="direction == 'en' ? 'icon-img':'icon-img-ar' " src="../assets/imgs/profile-icons/editing@2x.png" >
</ion-col>
<div *ngFor="let item of EITTransactionList.Collection_Transaction">
<!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold">
@ -246,7 +252,7 @@
</ion-infinite-scroll>
</div>
</ion-content>
<ion-icon class="addClass" name="add" (click)="addEITRrq()"></ion-icon>
<ion-icon *ngIf="addButton == 'Y'" class="addClass" name="add" (click)="addEITRrq()"></ion-icon>
<!-- <ion-footer>
<div class="centerDiv"> -->

@ -332,3 +332,22 @@ z-index: 1;
margin-left: 5px;
}
.icon-img {
width: 20px;
height: 20px;
float: right;
margin-top: 20px;
}
.icon-img-ar {
width: 20px;
height: 20px;
float: left;
margin-top: 20px;
}
.terms {
text-align: center;
color: #004D71;
font-weight: bold;
}

@ -49,6 +49,7 @@ export class EitListComponent implements OnInit {
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
addButton: string = 'Y';
public options = {
cutoutPercentage: 80,
@ -80,6 +81,7 @@ export class EitListComponent implements OnInit {
ngOnInit() {
/////////////
this.addButton = this.selMenu.GetMenuEntriesList.ADD_BUTTON;
this.Sdate = new Date().toISOString();
this.getUserDetails();
////////////////up
@ -227,9 +229,6 @@ export class EitListComponent implements OnInit {
this.pAction = EIT_ACTION.UPDATE;
this.cs.sharedService.setSharedData(this.getResEITTransactionList[i].Collection_Transaction, EITTransactionsRequest.SHARED_DATA);
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
// this.fillEitTransactionTable(i);
// this.navCtrl.push("AddEitPage");
// this.openEit(i);
this.openEitNew(i);
}
deleteEIT(i) {

@ -1,25 +1,25 @@
<ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'eit, update-title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<app-generic-header
showBack="true"
[headerText]="'eit, update-title' | translate">
</app-generic-header>
<ion-content padding>
<!-- <button ion-button (click)="resubmitEit()">next</button> -->
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes; let i=index ">
<ion-card-header class="hrTitle">
<ion-card-header class="hrTitle" style="background: #29B5BF;">
<div class="hrTitle">{{'worklistMain, notfDetails' | translate}} </div>
<!-- <button ion-button icon-only *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<ion-icon name="create"></ion-icon>
</button> -->
<div class="editIconDiv"><button ion-button *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
<div [ngClass]=" direction === 'en' ? 'editIconDiv' : 'editIconDiv-ar'"><button style="background: #29B5BF;" ion-button *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<img class="imgSize" src="../assets/imgs/profile-icons/editingWhite.png"></button>
</div>
</ion-card-header>

@ -14,4 +14,12 @@
right: 10px;
position: absolute;
top: 10px;
}
}
.editIconDiv-ar{
left: 10px;
position: absolute;
top: 10px;
}

@ -5,6 +5,7 @@ import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
import { EitService } from '../services/eit.service';
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
@Component({
selector: 'app-eit-update-list',
@ -23,8 +24,9 @@ export class EitUpdateListComponent implements OnInit {
private eitTransactionTbl: any = [];
private eitRequest: EitRequest;
private descFlex: string;
direction: string;
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController) {
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController, private ts: TranslatorService) {
this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
this.itemKey = notification.ITEM_KEY;
@ -32,6 +34,7 @@ export class EitUpdateListComponent implements OnInit {
this.functionName = notification.FUNCTION_NAME;
this.selEmp = notification.SELECTED_EMPLOYEE_NUMBER;
this.descFlex = notification.DESC_FLEX_CONTEXT_CODE;
this.direction = TranslatorService.getCurrentLanguageName();
this.fillEitTransactionTable();
}
@ -67,12 +70,13 @@ export class EitUpdateListComponent implements OnInit {
}
updateTransactionList(list) {
list.forEach(element => {
const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
if (index != -1)
this.eitTransactionTbl.splice(index, 1);
});
this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
// list.forEach(element => {
// const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
// if (index != -1)
// this.eitTransactionTbl.splice(index, 1);
// });
// this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
this.eitTransactionTbl = list;
}
resubmitEit() {

@ -36,9 +36,9 @@ margin-right:20px;
margin: 5px;
}
ion-footer .footer-button{
--background: #29B5BF;
--background: #259CB8;
width: 80%;
background: #29B5BF;
background: #259CB8;
border-radius: 10px;
}
.skip-btn{

@ -21,7 +21,7 @@ import { TranslatePipe } from './pipes/translate/translate.pipe';
import { DatePipeTransform } from './pipes/date/date.pipe';
import { AlertControllerService } from './ui/alert/alert-controller.service';
import { DateTimePipe } from './pipes/date-time/date-time.pipe';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { LaunchNavigator } from '@ionic-native/launch-navigator/ngx';
import { SafeHtmlPipe } from './pipes/safe-html/safe-html.pipe';
import { BackButtonComponent } from './ui/back-button/back-button.component';
@ -78,7 +78,7 @@ import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component';
import { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
// import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
@ -99,16 +99,17 @@ import { ConfirmLoginComponent } from '../authentication/confirm-login/confirm-l
import { WelcomeComponent } from './ui/welcome-login/welcome.component'
import { FabButtonComponent } from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress';
import { CardFilterComponent } from './ui/card-filter/card-filter.component';
import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component';
import { EmployeeHierarchyCardComponent } from './ui/employee-hierarchy-card/employee-hierarchy-card.component';
import { CircleCalendarComponent } from './ui/circle-calendar/circle-calendar.component';
import { NgCalendarModule } from 'ionic2-calendar';
import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component';
import { ChartModule } from 'primeng/chart';
import { GenericHeaderComponent } from './ui/generic-header/generic-header.component';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { AttendanceOptionsComponent } from '../home/attendance-options/attendance-options.component';
import { CardCalendarComponent } from './ui/card-calendar/card-calendar.component';
import { WorklistSettingComponent } from '../notification/worklist-setting/worklist-setting.component';
@ -196,6 +197,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
ConfirmLoginComponent,
CardFilterComponent,
EmployeeInformationComponent,
EmployeeHierarchyCardComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,
@ -266,6 +268,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
ChartModule,
CardFilterComponent,
EmployeeInformationComponent,
EmployeeHierarchyCardComponent,
ConfirmLoginComponent,
CircleCalendarComponent,
DateInfoModalComponent,
@ -277,7 +280,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
AttendanceOptionsComponent,
CardCalendarComponent,
SubmitAddressModalComponent,
SanitizeHtmlPipe
SanitizeHtmlPipe,
],
providers: [
AttendScanService,
@ -287,7 +290,7 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
Globalization,
SharedDataService,
AlertControllerService,
ThemeableBrowser,
// ThemeableBrowser,
LaunchNavigator,
ProjectsService,
NationalityService,
@ -309,14 +312,14 @@ import { SanitizeHtmlPipe } from '../itemforsale/services/domsafe';
Diagnostic,
AppRate,
RatingService,
InAppBrowser,
// InAppBrowser,
RateService,
Camera,
File,
MenuService,
OpenNativeSettings,
BarcodeScanner,
BackgroundGeolocation,
// BarcodeScanner,
// BackgroundGeolocation,
FileOpener,
FilePath,
FileChooser,

@ -1,9 +1,9 @@
import { Injectable } from "@angular/core";
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
import { Platform } from "@ionic/angular";
declare const cordova: any;
@ -13,10 +13,10 @@ declare const cordova: any;
})
export class HMGUtils {
constructor(
public backgroundGeolocation: BackgroundGeolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public common: CommonService,
public ts: TranslatorService,
private geolocation: Geolocation,
// private geolocation: Geolocation,
public platform: Platform,
public devicePermissionsService:DevicePermissionsService,
) { }
@ -26,11 +26,11 @@ export class HMGUtils {
this.devicePermissionsService.requestLocationAutherization().then( async granted => {
if(granted == true) {
if (this.platform.is('android')) {
// if ((await this.isHuaweiDevice())) {
// this.getHMSLocation(callBack);
// } else {
if ((await this.isHuaweiDevice())) {
this.getHMSLocation(callBack);
} else {
this.getGMSLocation(callBack);
// }
}
} else {
this.getIOSLocation(callBack);
}
@ -42,88 +42,88 @@ export class HMGUtils {
}
// async isHuaweiDevice(): Promise<boolean> {
// const result: any = await new Promise((resolve, reject) => {
// cordova.plugins.CordovaHMSGMSCheckPlugin.isHmsAvailable(
// "index.js",
// (_res) => {
// const hmsAvailable = _res === "true";
// resolve(hmsAvailable);
// },
// (_err) => {
// reject({ "status": false, "error": JSON.stringify(_err) });
// this.common.presentAlert(this.ts.trPK('general', 'huawei-hms-gms-error'));
// }
// );
// });
async isHuaweiDevice(): Promise<boolean> {
const result: any = await new Promise((resolve, reject) => {
cordova.plugins.CordovaHMSGMSCheckPlugin.isHmsAvailable(
"index.js",
(_res) => {
const hmsAvailable = _res === "true";
resolve(hmsAvailable);
},
(_err) => {
reject({ "status": false, "error": JSON.stringify(_err) });
this.common.presentAlert(this.ts.trPK('general', 'huawei-hms-gms-error'));
}
);
});
// return result;
// }
return result;
}
// private getHMSLocation(callBack: Function) {
// try {
// cordova.plugins.CordovaHMSLocationPlugin.requestLocation(
// "index.js",
// (_res) => {
// console.log("Huawei Location Success: [Stop Getting]");
// cordova.plugins.CordovaHMSLocationPlugin.removeLocation("", (_res) => { }, (_err) => { });
// const location = _res.split(',')
// console.log(location);
// if (location.length == 3) {
// let mock = false;
// const lat = Number(_res.split(',')[0]);
// const long = Number(_res.split(',')[1]);
// const mockValue = _res.split(',')[2];
private getHMSLocation(callBack: Function) {
try {
cordova.plugins.CordovaHMSLocationPlugin.requestLocation(
"index.js",
(_res) => {
console.log("Huawei Location Success: [Stop Getting]");
cordova.plugins.CordovaHMSLocationPlugin.removeLocation("", (_res) => { }, (_err) => { });
const location = _res.split(',')
console.log(location);
if (location.length == 3) {
let mock = false;
const lat = Number(_res.split(',')[0]);
const long = Number(_res.split(',')[1]);
const mockValue = _res.split(',')[2];
// // if (mockValue == 'true') {
// // mock = true;
// // } else {
// // mock = false;
// // }
// callBack({"latitude":lat, "longitude":long, "isfake":mock})
// } else {
// this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location'));
// }
// },
// (_err) => {
// console.log("Huawei Location [Getting Error]: " + JSON.stringify(_err));
// this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location'));
// }
// );
// if (mockValue == 'true') {
// mock = true;
// } else {
// mock = false;
// }
callBack({"latitude":lat, "longitude":long, "isfake":mock})
} else {
this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location'));
}
},
(_err) => {
console.log("Huawei Location [Getting Error]: " + JSON.stringify(_err));
this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location'));
}
);
// } catch (_err) {
// console.log("Huawei Location Plugin [Error]: " + + JSON.stringify(_err));
// this.common.presentAlert(this.ts.trPK('general', 'huawei-plugin-issue'));
// }
// }
} catch (_err) {
console.log("Huawei Location Plugin [Error]: " + + JSON.stringify(_err));
this.common.presentAlert(this.ts.trPK('general', 'huawei-plugin-issue'));
}
}
private getGMSLocation(callBack: Function) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) {
const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
const lat = resp.latitude;
const long = resp.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
// if (resp && (resp.latitude && resp.longitude)) {
// const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
// const lat = resp.latitude;
// const long = resp.longitude;
// callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }, (error) => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
}
private getIOSLocation(callBack: Function) {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) {
const lat = resp.coords.latitude;
const long = resp.coords.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":false})
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
// if (resp && resp.coords.latitude && resp.coords.longitude) {
// const lat = resp.coords.latitude;
// const long = resp.coords.longitude;
// callBack({"latitude":lat, "longitude":long, "isfake":false})
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }).catch(error => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
}

@ -2,10 +2,10 @@ import { Injectable } from '@angular/core';
// import { DevicePermissionsService } from '../device-permissions/device-permissions.service';
import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../shared-data-service/shared-data.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { AttendanceService } from 'src/app/home/services/attendance.services';
import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { ZBar } from '@ionic-native/zbar/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
import { AuthenticatedUser } from '../authentication/models/authenticated-user';
import { CommonService } from '../common/common.service';
@ -14,7 +14,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
import { Device } from '@ionic-native/device/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { Platform } from '@ionic/angular';
import { ModalController } from '@ionic/angular';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
@ -37,17 +37,17 @@ export class AttendScanService {
public collection = 'CS';
constructor(private device: Device,
private zbar: ZBar,
private geolocation: Geolocation,
// private zbar: ZBar,
// private geolocation: Geolocation,
private attendance_service: AttendanceService,
private barcodeScanner: BarcodeScanner,
// private barcodeScanner: BarcodeScanner,
private cameraController: Camera,
public sharedData: SharedDataService,
private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService,
public common: CommonService,
public ts: TranslatorService,
public backgroundGeolocation: BackgroundGeolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public platform: Platform,
public modalController: ModalController,
public firebasex: FirebaseX,
@ -135,22 +135,22 @@ export class AttendScanService {
}
scanCode() {
this.barcodeScanner
.scan()
.then(barcodeData => {
if (!barcodeData.cancelled) {
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance();
} else {
this.swipeAttendance();
}
}
})
.catch(err => {
console.log('Error', err);
});
// this.barcodeScanner
// .scan()
// .then(barcodeData => {
// if (!barcodeData.cancelled) {
// this.scannedResult = barcodeData;
// this.deviceID = this.device.uuid;
// if (this.isFakeLocationUsed) {
// this.fakeSwipeAttendance();
// } else {
// this.swipeAttendance();
// }
// }
// })
// .catch(err => {
// console.log('Error', err);
// });
}
fakeSwipeAttendance() {

@ -107,13 +107,16 @@ export class AuthenticationService {
this.setPublicFields(request);
const user = this.getAuthenticatedUser();
// const oracleUserName = this.cs.sharedService.getSharedData('oracle-user-name', false);
if (user) {
// if (user && oracleUserName) {
const userName = this.cs.sharedService.getSharedData(LoginRequest.SHARED_DATA, false);
request.P_SESSION_ID = user.P_SESSION_ID;
request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER;
request.LogInTokenID = user.LogInTokenID;
request.TokenID = user.TokenID;
request.P_USER_NAME = user.EMPLOYEE_NUMBER;
request.UserName = user.EMPLOYEE_NUMBER;
request.P_USER_NAME = userName; // '1100313582' ALWAYS USER NAME
request.UserName = userName; // '1100313582'
request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS;
if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog();
@ -134,6 +137,9 @@ export class AuthenticationService {
public setPublicFields(request: Request): Request {
const isAndroid = this.platform.is('android');
const isIOS = this.platform.is('ios');
// const userData = this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
const userPayrollCode = this.cs.sharedService.getSharedData("projcet-code", false);
const userLegislationCode = this.cs.sharedService.getSharedData("legislation-code", false);
let mobileType = '';
if (isAndroid) {
mobileType = 'android';
@ -142,11 +148,18 @@ export class AuthenticationService {
} else {
mobileType = 'android';
}
request.VersionID = 3.9;
request.VersionID = 5.0;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;
if (userPayrollCode) {
request.PayrollCodeStr = userPayrollCode;
}
if (userLegislationCode) {
request.LegislationCodeStr = userLegislationCode
}
return request;
}
public authenticateAndSetPersonalInformation(
@ -485,7 +498,7 @@ export class AuthenticationService {
return this.con.post(AuthenticationService.activationCodeURL, request, onError, errorLabel);
}
public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string, fromSMS = false )
public checkSMS(request: SMSCheckRequest, onError: any, errorLabel: string, fromSMS = false)
: Observable<SMSCheckResponse> {
this.setPublicFields(request);
return this.con.post(AuthenticationService.smsCheck, request, onError, errorLabel, fromSMS);
@ -575,6 +588,7 @@ export class AuthenticationService {
// tslint:disable-next-line: max-line-length
public insertMobileLoginInfo(request: GetLoginInfoRequest, onError: any, errorLabel: string, isPostNoLoad = false): Observable<GetLoginInfoResponse> {
this.authenticateRequest(request);
request.UserName = localStorage.getItem("user");
if (isPostNoLoad) {
return this.con.postNoLoad(AuthenticationService.insertMobileLoginInfo, request, onError, errorLabel);
} else {

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

@ -13,7 +13,7 @@ import { AlertControllerService } from '../../ui/alert/alert-controller.service'
//import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from '@angular/common';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { BrowserConfig } from './models/browser-config';
import {
LaunchNavigator,
@ -26,7 +26,7 @@ import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
// import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Injectable({
providedIn: 'root'
@ -85,7 +85,8 @@ export class CommonService {
'POAPPRV': 0,
'INVITEM': 0,
"STAMP": 0,
'ITG': 0
'ITG': 0,
'COC': 0
}
private progressLoaders: any[] = [];
@ -104,7 +105,7 @@ export class CommonService {
public toastController: ToastController,
public alertController: AlertControllerService,
public alertControllerIonic: AlertController,
public themeableBrowser: ThemeableBrowser,
// public themeableBrowser: ThemeableBrowser,
public launchNavigation: LaunchNavigator,
public platform: Platform,
public device: Device,
@ -112,7 +113,7 @@ export class CommonService {
public badge: Badge,
public lifeCycle: LifeCycleService,
public diagnostic: Diagnostic,
public iab: InAppBrowser,
// public iab: InAppBrowser,
private menu: MenuController,
) { }
@ -242,6 +243,19 @@ export class CommonService {
});
toast.present();
}
async yellowToast(message: string) {
const toast = await this.toastController.create({
message: message,
showCloseButton: true,
position: 'top',
duration: 3000,
color: 'warning',
closeButtonText: this.ts.trPK('general', 'close')
});
toast.present();
}
async greenToast(message: string) {
const toast = await this.toastController.create({
message: message,
@ -682,52 +696,52 @@ export class CommonService {
onSuccess?,
successURLS?: string[]
) {
this.platform.ready().then(() => {
const browser = this.iab.create(
url,
'_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
);
// browser.executeScript(...);
// browser.insertCSS(...);
browser.on('loaderror').subscribe(event => {
if (onFaild) {
onFaild();
}
browser.close();
});
/*
browser.on('loadstop').subscribe(event => {
// browser.insertCSS({ code: 'body{color: white;}' });
if (onSuccess) {
onSuccess();
}
});
*/
browser.on('exit').subscribe(event => {
if (onExit) {
onExit();
}
});
browser.on('loadstart').subscribe(event => {
if (successURLS) {
successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) {
// alert('load start found success url');
browser.close();
if (onSuccess) {
onSuccess();
}
}
});
}
});
});
// this.platform.ready().then(() => {
// const browser = this.iab.create(
// url,
// '_blank',
// 'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
// );
// // browser.executeScript(...);
// // browser.insertCSS(...);
// browser.on('loaderror').subscribe(event => {
// if (onFaild) {
// onFaild();
// }
// browser.close();
// });
// /*
// browser.on('loadstop').subscribe(event => {
// // browser.insertCSS({ code: 'body{color: white;}' });
// if (onSuccess) {
// onSuccess();
// }
// });
// */
// browser.on('exit').subscribe(event => {
// if (onExit) {
// onExit();
// }
// });
// browser.on('loadstart').subscribe(event => {
// if (successURLS) {
// successURLS.forEach((successURL, index) => {
// if (event.url && event.url.indexOf(successURL) >= 0) {
// // alert('load start found success url');
// browser.close();
// if (onSuccess) {
// onSuccess();
// }
// }
// });
// }
// });
// });
}
public imageFromBase64(base64: string) {
@ -1141,21 +1155,21 @@ export class CommonService {
public openAddEitPage() {
this.nav.navigateForward(['/eit/add-eit']);
}
public openAddSitPage() {
this.nav.navigateForward(['/sit/add-sit']);
}
public openAddCEIPage() {
this.nav.navigateForward(['/eit/add-cei']);
}
public openAddSitPage() {
this.nav.navigateForward(['/sit/add-sit']);
}
public openConfirmEitPage() {
this.nav.navigateForward(['/eit/confirm-add-eit']);
}
public openConfirmSitPage() {
this.nav.navigateForward(['/sit/confirm-add-sit']);
}
public openConfirmCEIPage() {
this.nav.navigateForward(['/eit/confirm-cei']);
}
public openConfirmSitPage() {
this.nav.navigateForward(['/sit/confirm-add-sit']);
}
public openConfirmBasicDetailsPage() {
this.nav.navigateForward(['/profile/confirm-basic']);
}
@ -1199,16 +1213,15 @@ export class CommonService {
public openEITPage() {
this.nav.navigateForward(['/eit/homepage']);
}
public openSITPage() {
this.nav.navigateForward(['/sit/homepage']);
}
public openMyTeamPage() {
console.log('someeeeeeee');
this.nav.navigateForward(['/my-team/home']);
}
public openMyTeamDetailPage() {
this.nav.navigateForward(['/my-team/details']);
}
public openEmployeeHierarchyPage() {
this.nav.navigateForward(['/my-team/employee-hierarchy']);
}
public openSubordinateLeavePage() {
this.nav.navigateForward(['/my-team/subordinate-leave']);
}
@ -1235,6 +1248,19 @@ export class CommonService {
this.alternateNavigate(CommonService.myTeamDetailUrl, 'teamDetail-open', true);
// this.nav.navigateForward(["/my-team/details"]);
}
//employee hierarchy
public static employeeHierarchyUrl = ['/my-team/employee-hierarchy', '/my-team/employee-hierarchy-2']
public openEmployeeHierarchy() {
this.alternateNavigate(CommonService.employeeHierarchyUrl, 'employeeHierarchy-open', true);
// this.nav.navigateForward(["/my-team/details"]);
}
public openContactPage() {
this.nav.navigateForward(['/profile/contact-us']);
}
public openAbsencePage() {
this.nav.navigateForward(['/absence/home']);
}
@ -1352,9 +1378,6 @@ export class CommonService {
public eitUpdate() {
this.nav.navigateForward(['/eit/eit-update-list']);
}
public sitUpdate() {
this.nav.navigateForward(['/sit/sit-update-list']);
}
public openCEIPage() {
this.nav.navigateForward(['/eit/cei-homepage']);
}
@ -1364,14 +1387,22 @@ export class CommonService {
public openAnnouncement() {
this.nav.navigateForward(['/backend-integrations/announcement']);
}
public openConcurrentReport() {
this.nav.navigateForward(['/reports/concurrent-report']);
public openConcurrentReport(value: boolean) {
const navigationExtras: NavigationExtras = {
queryParams: {
fromHome: value
}
};
this.nav.navigateForward(['/reports/concurrent-report'], navigationExtras);
}
public openConcurrentTransaction() {
this.nav.navigateForward(['/reports/transaction-list']);
}
public openConcurrentTransactionsHome() {
this.nav.navigateForward(['/reports/transactions']);
}
public openTermination() {
this.nav.navigateForward(['/termination/termination-form']);
@ -1598,8 +1629,9 @@ export class CommonService {
public totalCounter = 0;
getTotalNumberOfWorklistRequest() {
console.log(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() {
if (this.totalCounter > 0) {
@ -1609,10 +1641,14 @@ export class CommonService {
}
public setFilterValues(data) {
for (const notification of data) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER
if (data.length > 0) {
for (const notification of data) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER
}
} else {
this.filterKeys['HRSSA'] = 0;
}
}
@ -1626,51 +1662,111 @@ export class CommonService {
disable: false,
total: 0
},
{
value: 0,
name: 'PR',
active: false,
color: '#114475',
key: 'REQAPPRV',
disable: false,
total: 0
},
{
value: 0,
name: 'PO',
active: false,
color: '#38c9b3',
key: 'POAPPRV',
disable: false,
total: 0
}
// {
// value: 0,
// name: 'MR',
// active: false,
// color: '#3cb9d5',
// key: 'INVMOA',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'PR',
// active: false,
// color: '#114475',
// key: 'REQAPPRV',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'PO',
// active: false,
// color: '#38c9b3',
// key: 'POAPPRV',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'ITG',
// active: false,
// color: '#cc3232',
// key: 'ITG',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'IC',
// active: false,
// color: '#9e7e97',
// key: 'INVITEM',
// disable: false,
// total: 0
// },
// {
// value: 0,
// name: 'STAMP',
// active: false,
// color: '#ff9800',
// key: 'STAMP',
// disable: false,
// total: 0,
// },
// {
// value: 0,
// name: 'COC',
// active: false,
// color: '#787299',
// key: 'COC',
// disable: true,
// total: 0,
// }
];
public data = {
datasets: [
{
data: [0, 0, 0, 0, 0],
data: [0, 0, 0, 0, 0, 0, 0, 0],
backgroundColor: [
'#18a169',
'#3cb9d5',
'#114475',
'#38c9b3'
'#38c9b3',
'#cc3232',
'#9e7e97',
'#ff9800',
'#787299'
],
borderWidth: 6
}]
};
getFiltersData() {
// for (const notification of openNotificationsArray) {
// if (notification.ITEM_TYPE === 'HRSSA') {
this.filters[0].value = this.filterKeys['HRSSA'];
this.data.datasets[0].data[0] = this.filterKeys['HRSSA'];
// } else if (notification.ITEM_TYPE === 'REQAPPRV') {
this.filters[1].value = this.filterKeys['REQAPPRV'];
this.data.datasets[0].data[1] = this.filterKeys['REQAPPRV'];
// } else if (notification.ITEM_TYPE === 'POAPPRV') {
this.filters[2].value = this.filterKeys['POAPPRV'];
this.data.datasets[0].data[2] = this.filterKeys['POAPPRV'];
// this.filters[1].value = this.filterKeys['INVMOA'];
// this.data.datasets[0].data[1] = this.filterKeys['INVMOA'];
// this.filters[2].value = this.filterKeys['REQAPPRV'];
// this.data.datasets[0].data[2] = this.filterKeys['REQAPPRV'];
// this.filters[3].value = this.filterKeys['POAPPRV'];
// this.data.datasets[0].data[3] = this.filterKeys['POAPPRV'];
// this.filters[5].value = this.filterKeys['INVITEM'];
// this.data.datasets[0].data[5] = this.filterKeys['INVITEM'];
// this.filters[6].value = this.filterKeys['STAMP'];
// this.data.datasets[0].data[6] = this.filterKeys['STAMP'];
// this.filters[7].value = this.filterKeys['COC'];
// this.data.datasets[0].data[7] = this.filterKeys['COC'];
let val = { 'filters': [], 'data': {} };
val.filters = this.filters;

@ -1,64 +1,64 @@
import { ThemeableBrowserOptions } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowserOptions } from '@ionic-native/themeable-browser/ngx';
export class BrowserConfig {
public static OPTIONS: ThemeableBrowserOptions = {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#f0f0f0ff'
},
title: {
color: '#003264ff',
showPageTitle: true
},
backButton: {
image: 'back',
imagePressed: 'back_pressed',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: 'forward',
imagePressed: 'forward_pressed',
align: 'left',
event: 'forwardPressed'
},
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'left',
event: 'closePressed'
},
customButtons: [
{
image: 'share',
imagePressed: 'share_pressed',
align: 'right',
event: 'sharePressed'
}
],
menu: {
image: 'menu',
imagePressed: 'menu_pressed',
title: 'Test',
cancel: 'Cancel',
align: 'right',
items: [
{
event: 'helloPressed',
label: 'Hello World!'
},
{
event: 'testPressed',
label: 'Test!'
}
]
},
backButtonCanClose: true,
clearcache: true,
clearsessioncache: true,
disallowoverscroll: 'yes'
};
// public static OPTIONS: ThemeableBrowserOptions = {
// statusbar: {
// color: '#ffffffff'
// },
// toolbar: {
// height: 44,
// color: '#f0f0f0ff'
// },
// title: {
// color: '#003264ff',
// showPageTitle: true
// },
// backButton: {
// image: 'back',
// imagePressed: 'back_pressed',
// align: 'left',
// event: 'backPressed'
// },
// forwardButton: {
// image: 'forward',
// imagePressed: 'forward_pressed',
// align: 'left',
// event: 'forwardPressed'
// },
// closeButton: {
// image: 'close',
// imagePressed: 'close_pressed',
// align: 'left',
// event: 'closePressed'
// },
// customButtons: [
// {
// image: 'share',
// imagePressed: 'share_pressed',
// align: 'right',
// event: 'sharePressed'
// }
// ],
// menu: {
// image: 'menu',
// imagePressed: 'menu_pressed',
// title: 'Test',
// cancel: 'Cancel',
// align: 'right',
// items: [
// {
// event: 'helloPressed',
// label: 'Hello World!'
// },
// {
// event: 'testPressed',
// label: 'Test!'
// }
// ]
// },
// backButtonCanClose: true,
// clearcache: true,
// clearsessioncache: true,
// disallowoverscroll: 'yes'
// };
}

@ -27,9 +27,12 @@ export class ConnectorService {
public static retryTimes = 0;
public static timeOut = 180 * 1000;
// public static host = 'http://10.10.150.249:1234/';
public static host = 'https://erpuat.sfh.med.sa/'; //https://uat.hmgwebservices.com/
// public static host = 'https://hmgwebservices.com/';
// public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
public static host = 'https://erpuat.sfh.med.sa/'; //UAR SFHP

@ -1,74 +1,74 @@
import { Injectable } from '@angular/core';
import { ThemeableBrowser, ThemeableBrowserOptions, ThemeableBrowserObject } from '@ionic-native/themeable-browser/ngx';
// import { ThemeableBrowser, ThemeableBrowserOptions, ThemeableBrowserObject } from '@ionic-native/themeable-browser/ngx';
import { Platform } from '@ionic/angular';
@Injectable({
providedIn: 'root'
})
export class HmgBrowserService {
static options: ThemeableBrowserOptions = {
statusbar: {
color: '#ffffffff'
},
toolbar: {
height: 44,
color: '#f0f0f0ff'
},
title: {
color: '#60686b',
showPageTitle: true
},
backButton: {
image: 'back',
imagePressed: 'back_pressed',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: 'forward',
imagePressed: 'forward_pressed',
align: 'left',
event: 'forwardPressed'
},
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'left',
event: 'closePressed'
},
/*
customButtons: [
{
image: 'share',
imagePressed: 'share_pressed',
align: 'right',
event: 'sharePressed'
}
],
menu: {
image: 'menu',
imagePressed: 'menu_pressed',
title: 'Test',
cancel: 'Cancel',
align: 'right',
items: [
{
event: 'helloPressed',
label: 'Hello World!'
},
{
event: 'testPressed',
label: 'Test!'
}
]
},
*/
backButtonCanClose: true
};
// static options: ThemeableBrowserOptions = {
// statusbar: {
// color: '#ffffffff'
// },
// toolbar: {
// height: 44,
// color: '#f0f0f0ff'
// },
// title: {
// color: '#60686b',
// showPageTitle: true
// },
// backButton: {
// image: 'back',
// imagePressed: 'back_pressed',
// align: 'left',
// event: 'backPressed'
// },
// forwardButton: {
// image: 'forward',
// imagePressed: 'forward_pressed',
// align: 'left',
// event: 'forwardPressed'
// },
// closeButton: {
// image: 'close',
// imagePressed: 'close_pressed',
// align: 'left',
// event: 'closePressed'
// },
// /*
// customButtons: [
// {
// image: 'share',
// imagePressed: 'share_pressed',
// align: 'right',
// event: 'sharePressed'
// }
// ],
// menu: {
// image: 'menu',
// imagePressed: 'menu_pressed',
// title: 'Test',
// cancel: 'Cancel',
// align: 'right',
// items: [
// {
// event: 'helloPressed',
// label: 'Hello World!'
// },
// {
// event: 'testPressed',
// label: 'Test!'
// }
// ]
// },
// */
// backButtonCanClose: true
// };
private browser: ThemeableBrowserObject;
// private browser: ThemeableBrowserObject;
constructor(
private themeableBrowser: ThemeableBrowser,
// private themeableBrowser: ThemeableBrowser,
private platform: Platform
) { }
@ -81,18 +81,18 @@ export class HmgBrowserService {
}
private registerEvent(eventName: string, event: any) {
if (this.browser) {
this.browser.on(eventName).subscribe((data: any) => {
if (event) {
event();
}
});
}
// if (this.browser) {
// this.browser.on(eventName).subscribe((data: any) => {
// if (event) {
// event();
// }
// });
// }
}
public openURLThemable(url: string) {
this.platform.ready().then(() => {
this.browser = this.themeableBrowser.create(url, '_blank', HmgBrowserService.options);
// this.browser = this.themeableBrowser.create(url, '_blank', HmgBrowserService.options);
});
}

@ -1,13 +1,15 @@
export class MenuEntry {
public MENU_NAME:string;
public ADD_BUTTON:string;
public DELETE_BUTTON:string;
public UPDATE_BUTTON:string;
public ENTRY_SEQUENCE:number;
public FUNCTION_NAME:string;
public LVL:number;
public MENU_ENTRY_TYPE:string;
public PARENT_MENU_NAME:string;
public PROMPT:string;
public REQUEST_TYPE:string;
public MENU_NAME: string;
public ADD_BUTTON: string;
public DELETE_BUTTON: string;
public UPDATE_BUTTON: string;
public ENTRY_SEQUENCE: number;
public FUNCTION_NAME: string;
public LVL: number;
public MENU_ENTRY_TYPE: string;
public PARENT_MENU_NAME: string;
public PROMPT: string;
public REQUEST_TYPE: string;
public ATTACHMENT_REQUIRED: string;
public REQ_ATTACHMENT_TIP: string;
}

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

@ -115,14 +115,18 @@ export class TranslatorService {
public loadResources(onSuccess: any) {
this.platform.ready().then(() => {
this.nativeStorage.getItem(TranslatorService.LNG_KEY).then((previousLanguage: string) => {
var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
if(previousLanguage){
// .then((previousLanguage: string) => {
TranslatorService.CURRENT_LANGUAGE = previousLanguage;
document.getElementById('lang').lang = previousLanguage;
this.loadTranslationAsset(onSuccess);
}, () => {
}else{
document.getElementById('lang').lang = 'en';
this.setCurrentLanguageToDefault();
this.loadTranslationAsset(onSuccess);
});
};
});
}
@ -179,18 +183,24 @@ export class TranslatorService {
public setCurrentLanguage(language: string) {
TranslatorService.CURRENT_LANGUAGE = language;
this.events.publish(TranslatorService.CHANGE_EVENT);
this.nativeStorage.setItem(TranslatorService.LNG_KEY, language).then(() => {
}, () => { });
localStorage.setItem(TranslatorService.LNG_KEY, language);
}
public switchLanguage() {
this.nativeStorage.getItem(TranslatorService.LNG_KEY).then((previousLanguage: string) => {
this.setCurrentLanguage(this.getNextLanguage(previousLanguage));
}, () => {
this.setCurrentLanguage(this.getNextLanguage(TranslatorService.CURRENT_LANGUAGE));
});
// this.nativeStorage.getItem(TranslatorService.LNG_KEY).then((previousLanguage: string) => {
var lang = localStorage.getItem(TranslatorService.LNG_KEY)
if(lang){
this.setCurrentLanguage(this.getNextLanguage(lang));
}else{
this.setCurrentLanguage(this.getNextLanguage(TranslatorService.CURRENT_LANGUAGE));
}
//}, () => {
// });
}
private getNextLanguage(currentLanguage: string) {

@ -46,9 +46,9 @@
margin-left: 0.2cm;
margin-right: 0.2cm;
color: var(--dark);
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden !important;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden !important;
font-size: 16px;
width: 78%;
font-weight: bold !important;

@ -40,9 +40,9 @@
margin-left: 0.2cm;
margin-right: 0.2cm;
color: var(--ion-color-primary);
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden !important;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden !important;
font-size: 0.36cm;
width: 78%;

@ -3,12 +3,10 @@
margin-left: 2%;
margin-right: 2%;
height: 4cm;
box-shadow: 0px 0px 8px 2px #d5d5d5ab;
background: white;
margin-bottom: 0.3cm;
// border-color: #ececec;
border-style: solid;
border-width: 0.02cm;
border-radius: 30px !important;
border: 1.3px solid #8b8b8b;
}
// .custom-button:hover {
@ -19,7 +17,7 @@
.icon{
.icon {
margin-top: 0.7cm;
margin-left: 27%;
margin-right: 27%;

@ -1,4 +1,5 @@
import { Component, OnInit, Input } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-card-calendar',
@ -11,7 +12,9 @@ export class CardCalendarComponent implements OnInit {
@Input() active: boolean;
@Input() color: string;
constructor() { }
constructor(
public ts: TranslatorService,
) { }
ngOnInit() {}

@ -1,7 +1,7 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
<span *ngIf="text != 'All'" class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
<span class="text-span text-span-moe" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
</div>

@ -1,4 +1,5 @@
import { Component, OnInit, Input } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-card-filter',
@ -11,8 +12,16 @@ export class CardFilterComponent implements OnInit {
@Input() active: boolean;
@Input() color: string;
direction: string;
constructor() { }
ngOnInit() {}
ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName();
console.log(this.direction);
if (this.direction == 'ar') {
this.text = 'الموارد البشرية';
}
}
}

@ -7,8 +7,17 @@
[dateFormatter]="calendar.dateFormatter"
(onTimeSelected)="onDayClicked($event)">
</calendar>
<div class="description-box" [ngStyle]="direction == 'en' ? {'left': '15px'} : {'right': '15px'}">
<ion-row>
<ion-col size="4">
<div class="icon absence"></div><ion-label class="label-text">{{ts.trPK('home','absence-name')}}</ion-label>
</ion-col>
<ion-col size="4"> <div class="icon bt"></div><ion-label class="label-text">{{ts.trPK('home','holiday-name')}}</ion-label></ion-col>
<ion-col size="4">
<div class="icon holiday"></div><ion-label class="label-text">{{ts.trPK('home','businesstrip-name')}}</ion-label>
</ion-col>
</ion-row>
</div>
<ng-template #template let-showEventDetail="showEventDetail" let-selectedDate="selectedDate" let-noEventsLabel="noEventsLabel">
</ng-template>

@ -108,4 +108,29 @@
--height: 12cm !important;
--width: 80% !important;
--border-radius: 0.4cm;
}
.icon{
height: 20px;
width: 20px;
border-radius: 50%;
display: inline-block;
}
.absence{
background-color: #db5b6a !important;
}
.bt{
background-color: #004D71 !important;
}
.holiday{
background-color: #43a6a0 !important;
}
.description-box{
position: relative;
bottom: 0;
}
.label-text{
font-size: 12px;
padding: 5px;
position: relative;
bottom: 3px;
}

@ -141,9 +141,8 @@ export class CircleCalendarComponent implements OnInit {
console.log(event.selectedTime.getDate());
const selectedIndex = event.selectedTime.getDate();
this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1];
if (this.selectedIndexData.customPresent) {
const rtpID = this.selectedIndexData.RTP_ID;
this.getScheduleShiftDetails(rtpID);
if (this.selectedIndexData.customPresent || this.selectedIndexData.customDaysOff || this.selectedIndexData.customAbsent) {
this.dateModal(this.selectedIndexData);
}
} else {
this.isFirst = true;

@ -1,9 +1,9 @@
<ion-content>
<ion-slides #slides pager="true" [options]="slideOptsOne" (ionSlideDidChange)="slideChanged($event)" class="slider-container">
<ion-slide *ngFor="let shift of SHIFTDETAILS.GetScheduleShiftsDetailsList; let i=index">
<!-- <ion-slides #slides pager="true" [options]="slideOptsOne" (ionSlideDidChange)="slideChanged($event)" class="slider-container">
<ion-slide *ngFor="let shift of SHIFTDETAILS.GetScheduleShiftsDetailsList; let i=index"> -->
<ion-grid class="headerGrid">
<ion-row style="padding: 5px 10px;">
<ion-col size="8">
<!-- <ion-col size="8">
<div style="width: 100%;">
<div class="result-graph">
<div class="result-text-container" [ngStyle]="direction === 'rtl' ? {'left': '65%'} : {}">
@ -13,8 +13,8 @@
<p-chart [ngClass]="direction == 'ltr'? 'today-graph':'today-graph-ar'" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
</div>
</ion-col>
<ion-col size="4">
</ion-col> -->
<ion-col size="12">
<div class="div" >
<ion-row >
<p class="p0">{{nameDay}}</p>
@ -28,45 +28,45 @@
<ion-row >
<p class="p3">{{year}}</p>
</ion-row>
<ion-row>
<!-- <ion-row>
<p class="p5">{{ts.trPK('attendance','present')}}</p>
</ion-row>
</ion-row> -->
</div>
</ion-col>
</ion-row>
<ion-row class="gridrow">
<ion-col [size]="6" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"> <p>{{shiftTime}}</p> </ion-row>
<ion-col [size]="12" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"> <p>{{TODAYDATE.LEAVE_DESCRIPTION}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','shift-time')}}</p>
</ion-row>
</ion-col>
<ion-col [size]="6" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"><p >{{scheduled}}</p> </ion-row>
<!-- <ion-col [size]="12" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"><p >{{TODAYDATE.ABSENCE_ATTENDANCE_TYPE_NAME}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','shift-type')}}</p>
</ion-row>
</ion-col>
</ion-col> -->
<ion-col [size]="6" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"><p >{{actualCheckIn}}</p> </ion-row>
<ion-col [size]="12" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"><p >{{TODAYDATE.DATE_START}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','actual-check-in')}}</p>
<p >{{ts.trPK('vacation-rule','start-date')}}</p>
</ion-row>
</ion-col>
<ion-col [size]="6" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"> <p >{{actualCheckOut}}</p> </ion-row>
<ion-col [size]="12" style="border-bottom: 1px solid #ccc;">
<ion-row class="amountlabel"> <p >{{TODAYDATE.DATE_END}}</p> </ion-row>
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','actual-check-out')}} </p>
<p >{{ts.trPK('vacation-rule','end-date')}} </p>
</ion-row>
</ion-col>
<!--
<ion-col [size]="6" [ngClass]="direction == 'ltr'? 'col':'col-ar'">
<ion-row class="amountlabel"><p >{{approvedCheckIn}}</p> </ion-row>
<ion-row class="rowlabel">
@ -107,10 +107,10 @@
<ion-row class="rowlabel">
<p >{{ts.trPK('attendance-tracking','early-out')}}</p>
</ion-row>
</ion-col>
</ion-col> -->
</ion-row>
</ion-grid>
</ion-slide>
</ion-slides>
<!-- </ion-slide>
</ion-slides> -->
</ion-content>

@ -74,7 +74,7 @@
margin-right: -70px;
}
.amountlabel{
color: black !important;
color: #29B5BF !important;
font-weight: bold !important;
font-size: 13px !important;
margin-bottom: -29px !important;
@ -208,10 +208,10 @@ height: 360px !important;
}
.col{
border-bottom: 1px solid rgb(204, 204, 204);
border-right: 1px solid rgb(204, 204, 204);
// border-right: 1px solid rgb(204, 204, 204);
}
.col-ar{
border-bottom: 1px solid rgb(204, 204, 204);
border-left: 1px solid rgb(204, 204, 204);
// border-left: 1px solid rgb(204, 204, 204);
}

@ -60,12 +60,21 @@ export class DateInfoModalComponent implements OnInit {
ngOnInit() {
console.log(this.TODAYDATE);
this.excess = this.TODAYDATE.EXCESS_HRS;
this.lateIn = this.TODAYDATE.LATE_IN_HRS;
this.shortage = this.TODAYDATE.SHORTAGE_HRS;
this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ;
this.scheduleDate = this.TODAYDATE.SCHEDULE_DATE;
this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]);
const splitdate = this.TODAYDATE.EVENT_DATE.split(' ');
const date = splitdate[0];
const localDate = date.split('/');
this.day = localDate[1];
this.year = localDate[2];
this.month = parseInt(localDate[0]);
this.nameMonth = this.direction === 'ltr' ? this.common.getMonthName(this.month) : this.common.getMonthNameAr(this.month);
this.nameDay = this.getHeaderDay(new Date(date));
// this.excess = this.TODAYDATE.EXCESS_HRS;
// this.lateIn = this.TODAYDATE.LATE_IN_HRS;
// this.shortage = this.TODAYDATE.SHORTAGE_HRS;
// this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ;
// this.scheduleDate = this.TODAYDATE.EVENT_DATE;
// this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]);
}
assignData(shiftDetails) {

@ -0,0 +1,23 @@
<div class="team-member-container">
<ion-row>
<ion-col [size]="3" (click)="getDetails()">
<div class="user-image-container">
<div class="user-image">
<img [src]="employeeImage" alt="Team Member Image"/>
</div>
</div>
</ion-col>
<ion-col [size]="9" style="padding: 8px 5px 0px;margin-top: 14px;">
<div>
<div *ngIf="employeeSubordinates" [ngClass]="direction == 'en' ? 'numberEmp':'numberEmp-ar' ">{{employeeSubordinates}}</div>
<span [ngClass]=" direction == 'en'? 'employee-name' : 'employee-name-ar'" (click)="getDetails()">
<h2 class="name">{{name}}</h2>
<span class="title">{{title}}</span>
</span>
<a [ngClass]="employeePhoneNumber == '' ? 'disable-phone image-container' : 'image-container'" href="tel:{{employeePhoneNumber}}">
<img src="../assets/imgs/call.svg" >
</a>
</div>
</ion-col>
</ion-row>
</div>

@ -0,0 +1,155 @@
.team-member-container {
background: white;
/* margin-top: 2px; */
font-family: WorkSans-Regular;
border: 1px solid #ccc;
border-radius: 15px;
padding-bottom: 5px;
margin-bottom: 15px;
box-shadow: 0px 1px 5px #cdcdcd;
}
.user-image {
img {
width: 60px;
height: 60px;
border-radius: 30px;
margin: 5px;
}
}
.employee-name {
display: inline-block;
width: 80%;
.name {
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: left;
font-weight: bold;
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
font-family: 'Inter' !important;
}
.title {
font-family: "Inter" !important;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
margin-left: -10px;
margin-top: -15px;
overflow: hidden;
}
}
.employee-name-ar {
display: inline-block;
width: 80%;
.name {
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: right;
font-family: 'Inter' !important;
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
font-weight: bold;
}
.title {
font-family: "Inter" !important;
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
margin-left: -10px;
margin-top: -10px;
overflow: hidden;
}
}
.image-container {
width: 20%;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5px;
position: relative;
top: 12px;
}
.swipe-information {
color: #888;
font-size: 12px;
border-top: 1px solid #ccc;
padding-top: 6px;
margin-top: 6px;
.check-in {
font-size: 12px;
margin-right: 15px;
}
}
.numberEmp {
color: white;
font-size: 11px;
font-weight: bolder;
margin-left: 13px;
width: 22px;
height: 22px;
border-radius: 100%;
background-color: #29B5BF;
z-index: 9;
text-align: center;
padding: 4px 2px 2px;
position: absolute;
right: 10px;
top: -8px;
}
.numberEmp-ar {
color: white;
font-size: 11px;
font-weight: bolder;
margin-left: 13px;
width: 22px;
height: 22px;
border-radius: 100%;
background-color: #29B5BF;
z-index: 9;
text-align: center;
padding: 4px 2px 2px;
position: absolute;
left: 10px;
top: -8px;
}

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

@ -0,0 +1,38 @@
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-employee-hierarchy-card',
templateUrl: './employee-hierarchy-card.component.html',
styleUrls: ['./employee-hierarchy-card.component.scss'],
})
export class EmployeeHierarchyCardComponent implements OnInit {
public direction: string;
public userImage: any = '../assets/imgs/profile.png';
@Input() name: string;
@Input() title: string;
@Input() employeeImage: string;
@Input() employeePhoneNumber: string;
@Input() employeeSubordinates: number;
@Output() onGetDetails = new EventEmitter();
constructor(
public ts: TranslatorService,
) {
this.direction = TranslatorService.getCurrentLanguageName();
}
ngOnInit() {
console.log(this.title);
let jobTitle = this.title.split('.');
if (jobTitle && jobTitle.length > 1) {
this.title = jobTitle[0] + " " + jobTitle[1];
}
}
getDetails() {
this.onGetDetails.emit();
}
}

@ -1,186 +1,122 @@
.team-member-container{
// background: white;
// border-radius: 100px 20px 20px 100px;
// margin-top: 15px;
// font-family: WorkSans-Regular;
// border: 1px solid #ccc;
// border-radius: 15px;
// padding-bottom: 8px;
.team-member-container {
background: white;
/* margin-top: 2px; */
font-family: WorkSans-Regular;
border: 1px solid #ccc;
border-radius: 15px;
padding-bottom: 8px;
margin-bottom: 7px;
padding-bottom: 5px;
margin-bottom: 15px;
box-shadow: 0px 1px 5px #cdcdcd;
}
// .user-image-container{
// position: relative;
// width: 70px;
// height: 70px;
// display: block;
// margin: 0 auto;
// &:before{
// position: absolute;
// content: "";
// width: 20px;
// height: 20px;
// border-radius: 20px;
// border: 1px solid white;
// top: 0;
// right: 0;
// background-color: red;
// z-index: 9;
// }
// &.present:before{
// background-color: green !important;
// }
// }
.user-image{
// overflow: hidden;
// position: relative;
// display: block;
// width: 100%;
// height: 100%;
// border-radius: 80px;
// border: 1px solid #ccc;
// margin: 0px auto 6px;
.user-image {
img {
// width: 100%;
// max-height: 100%;
width: 74%;
max-height: 74%;
margin-top: 4px;
margin-left: 6px;
width: 60px;
height: 60px;
border-radius: 30px;
margin: 5px;
}
}
.employee-name{
.employee-name {
display: inline-block;
width: 80%;
.name{
// font-size: 16px;
// color: black;
// // margin: 0;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// margin-left: -10px;
// margin-top: -5px;
// font-family: 'WorkSans-Bold';
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
.name {
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: left;
font-weight: bold;
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
font-family: 'Inter' !important;
}
.title{
// font-size: 13px;
// color: #888;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// display: block;
// margin-left: -10px;
// margin-top: -6px;
// color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
.title {
font-family: 'Inter' !important;
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
// overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
}
}
.employee-name-ar{
.employee-name-ar {
display: inline-block;
width: 80%;
.name{
// font-size: 16px;
// color: black;
// // margin: 0;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// margin-left: -10px;
// margin-top: -5px;
// font-family: 'WorkSans-Bold';
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: right;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
.name {
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: right;
font-family: 'Inter' !important;
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
font-weight: bold;
}
.title{
// font-size: 13px;
// color: #888;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// display: block;
// margin-left: -10px;
// margin-top: -6px;
// color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
.title {
font-family: 'Inter' !important;
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
}
}
.image-container{
.image-container {
width: 20%;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5px;
position: relative;
top: 12px;
}
.swipe-information{
.swipe-information {
color: #888;
font-size: 12px;
border-top: 1px solid #ccc;
padding-top: 6px;
margin-top: 6px;
.check-in {
font-size: 12px;
margin-right: 15px;
margin-right: 15px;
}
}

@ -12,6 +12,11 @@
<img [src]="userImage"/>
</div>
</ion-col>
<!-- <ion-col *ngIf="!showImage && moeImage" [size]="2" style="padding: 0;">
<div class="profile-image-container">
<img src="../assets/icon/moe-logo.png"/>
</div>
</ion-col> -->
<!-- *ngIf="getPassdirfromNotifiPage == true" -->
<ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()">
@ -19,7 +24,8 @@
<img style="
width: 20px;
height: 20px;
margin-top: 5px;"
position: absolute;
top: -30px;"
[src]="close"
/>
</div>

@ -13,6 +13,7 @@ import { TranslatorService } from '../../services/translator/translator.service'
styleUrls: ['./generic-header.component.scss'],
})
export class GenericHeaderComponent implements OnInit {
@Input() moeImage = true;
@Input() userImage = '';
@Input() showImage = false;
@Input() showMenu = false;

@ -1,23 +1,28 @@
.custom-button {
background: white;
margin-bottom: 0px;
border: 1px solid #ccc;
border-radius: 20px;
width: 100%;
max-width: 105px;
height: 100px;
padding: 10px;
min-width: 96px;
min-width: 100px;
margin-bottom: 5px;
box-shadow: 0px 0px 5px #00000029;
margin-top: 2px;
}
.iconBox {
display: block;
width: 100%;
position: static;
height: 40px;
}
.iconBox img{
margin: 0px auto 10px;
.iconBox img {
margin: 0px auto 10px !important;
display: block;
width: 35px;
height: 33px;
// max-width: 35%;
}
@ -25,15 +30,12 @@
display: block;
}
.pClass {
font-size: 9px;
font-size: 8px;
text-align: center;
margin-top: 10px;
color: black;
color: #004D71;
font-weight: bold;
}
.disable-filter {
pointer-events: none;
opacity: .4;
letter-spacing: 0px;
}

@ -12,7 +12,6 @@ export class ServicesButtonComponent implements OnInit {
@Input() buttonClass: any = '';
@Input() icon: string;
@Input() title: string;
@Input() requestType: any;
@Output() trigger = new EventEmitter();
@Input() focusicon: string;
@Input() disabled = false;
@ -25,9 +24,7 @@ export class ServicesButtonComponent implements OnInit {
public ts: TranslatorService
) {}
ngOnInit() {
console.log(this.requestType);
}
ngOnInit() {}
public onClicked() {}
}

@ -6,7 +6,7 @@
<ion-icon class="iconFab" name="finger-print"></ion-icon>
</div>
<div class="titleBox" [ngStyle]="link === '0' ? {'margin-left': '5px'} : {}">
<span>{{statsValue}}</span>
<span [ngStyle]="link === '4' ? {'visibility': 'hidden'} : {}">{{statsValue}}</span>
<p class="pClass" [ngStyle]="link === '0' ? {'width': '105%', 'margin-top': '12px'} : {}">{{returnTitle(title)}}</p>
</div>
</div>

@ -1,24 +1,28 @@
.custom-button {
box-shadow: 0px 0px 5px #00000029;
background: white;
margin-bottom: 0px;
border: 1px solid #ccc;
margin-bottom: 5px;
border-radius: 20px;
width: 200px;
max-width: 105px;
height: 160px;
padding: 10px;
@media screen and (min-width: 200px) and (max-width:300px) {
width: 80px;
}
}
.iconBox {
display: block;
width: 100%;
position: static;
img {
// display: block;
// max-width: 45%;
// padding-bottom: 5px;
// padding-top: 5px;
display: block;
display: inline-block;
max-width: 67%;
padding-bottom: 9px;
padding-top: 5px;
@ -28,28 +32,54 @@
.titleBox {
display: block;
span {
font-size: 25px;
font-weight: bold;
color: black;
text-align: left;
color: #004D71;
text-align: center;
display: block;
}
}
ion-app[dir="rtl"] .titleBox {
text-align: right;
}
.pClass {
color: black;
width: 85%;
// color: #004D71;
// width: 85%;
// margin-top: 5px;
// font-weight: bold;
// text-align: -webkit-auto;
// display: block;
// font-size: 15px !important;
color: #004D71;
width: 100%;
margin-top: 5px;
font-weight: bold;
text-align: left;
text-align: center;
display: block;
font-size: 14px !important;
letter-spacing: 0px;
}
.iconFab{
.iconFab {
margin-left: -20px;
margin-top: 10px;
width: 100px;
height: 70px;
}
.loader {
position: absolute;
width: 100%;
top: 70px;
left: 2px;
img {
width: 25px;
}
}

@ -1,4 +1,4 @@
<ion-content has-bouncing="false" class="ion-no-padding" >
<ion-content has-bouncing="false" class="ion-no-padding" style="position: inherit !important;">
<ion-grid padding>
<!-- <ion-row>
<ion-col [size]="12">
@ -13,7 +13,7 @@
<ion-row>
<ion-row style="margin-top: 50px;">
<ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p>
@ -49,22 +49,22 @@
</app-button>
</ion-col>
</ion-row>
<ion-row>
<!-- <ion-row>
<ion-col>
<ion-button *ngIf="userInfo" class="button-digital-id" (click)="loginWithDigitalID()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button>
</ion-col>
</ion-row>
<ion-row>
</ion-row> -->
<!-- <ion-row>
<ion-col style="padding-bottom: 100px !important;">
<ion-button *ngIf="showBusinessCard" class="button-digital-id" (click)="loginWithBusinessCard()" >
<p style="color: black;">{{ts.trPK('general','business-card')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button>
</ion-col>
</ion-row>
</ion-row> -->
</ion-grid>
</ion-content>

@ -67,6 +67,10 @@
line-height: 1.5;
}
.heading1{
font-size: 26px !important;
}
.button-digital-id{
--background: white !important;
background: white !important;

@ -1,5 +1,5 @@
import { Component, OnInit, NgZone, VERSION } from "@angular/core";
import { NFC } from "@ionic-native/nfc/ngx";
// import { NFC } from "@ionic-native/nfc/ngx";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { Platform } from "@ionic/angular";
import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service";
@ -13,11 +13,11 @@ import { attendanceSwipeScannerRequest } from "src/app/home/models/attendanceSwi
import { Device } from "@ionic-native/device/ngx";
import { AttendanceService } from "src/app/home/services/attendance.services";
import { Response } from "src/app/hmg-common/services/models/response";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { HMGUtils } from 'src/app/hmg-common/hmg_utils';
@ -53,7 +53,7 @@ export class AttendanceOptionsComponent implements OnInit {
constructor(
private nfc: NFC,
// private nfc: NFC,
public common: CommonService,
public platform: Platform,
public attendScanService: AttendScanService,
@ -62,11 +62,11 @@ export class AttendanceOptionsComponent implements OnInit {
private device: Device,
private attendance_service: AttendanceService,
public ngZone: NgZone,
private wifiWizard2: WifiWizard2,
// private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings,
private devicePermissionsService:DevicePermissionsService,
private geolocation: Geolocation,
public backgroundGeolocation: BackgroundGeolocation,
// private geolocation: Geolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public hmgUtils: HMGUtils
) {}
@ -88,31 +88,31 @@ export class AttendanceOptionsComponent implements OnInit {
}
async checkNFCStatus(checkValue: string) {
try {
let nfcStatus = await this.nfc.enabled();
console.log("nfc status >>>>>>>>>>" + nfcStatus);
if (nfcStatus === "NFC_OK") {
this.deviceNFC = true;
if (checkValue === "two") {
this.startNFC();
}
}
if (nfcStatus === null && checkValue === "two") {
this.startNFC();
}
} catch (err) {
console.log("Error reading tag", err);
if (err === "NO_NFC") {
this.deviceNFC = false;
} else if (err === "NFC_DISABLED") {
this.deviceNFC = true;
if (checkValue === "two") {
this.common.presentAlert(this.ts.trPK("general", "nfc-settings"));
}
} else if (checkValue === "two") {
this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
}
}
// try {
// let nfcStatus = await this.nfc.enabled();
// console.log("nfc status >>>>>>>>>>" + nfcStatus);
// if (nfcStatus === "NFC_OK") {
// this.deviceNFC = true;
// if (checkValue === "two") {
// this.startNFC();
// }
// }
// if (nfcStatus === null && checkValue === "two") {
// this.startNFC();
// }
// } catch (err) {
// console.log("Error reading tag", err);
// if (err === "NO_NFC") {
// this.deviceNFC = false;
// } else if (err === "NFC_DISABLED") {
// this.deviceNFC = true;
// if (checkValue === "two") {
// this.common.presentAlert(this.ts.trPK("general", "nfc-settings"));
// }
// } else if (checkValue === "two") {
// this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
// }
// }
}
public setServicesPrivilage() {
@ -154,15 +154,15 @@ export class AttendanceOptionsComponent implements OnInit {
}
async startIOSNfc() {
try {
let tag = await this.nfc.scanTag();
console.log(JSON.stringify(tag));
const serialNumber = this.nfc.bytesToHexString(tag.id);
this.swipeAttendanceNFC(serialNumber);
} catch (err) {
this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
console.log("Error reading tag", err);
}
// try {
// let tag = await this.nfc.scanTag();
// console.log(JSON.stringify(tag));
// const serialNumber = this.nfc.bytesToHexString(tag.id);
// this.swipeAttendanceNFC(serialNumber);
// } catch (err) {
// this.common.presentAlert(this.ts.trPK("general", "nfc-error"));
// console.log("Error reading tag", err);
// }
}
public async nfcModal() {
@ -243,38 +243,38 @@ export class AttendanceOptionsComponent implements OnInit {
public async startWifi() {
const isAndroid = this.platform.is("android");
const isIOS = this.platform.is("ios");
const isWifiEnabled = await this.wifiWizard2.isWifiEnabled();
// const isWifiEnabled = await this.wifiWizard2.isWifiEnabled();
const versionType = this.device.version;
const versionTypeInt = parseInt(versionType);
console.log('version type: ' + versionType);
console.log('version Type: ' + versionTypeInt);
if(isAndroid && versionTypeInt > 10) {
if(!isWifiEnabled){
this.showWifiNotEnabled();
return;
}
// if(!isWifiEnabled){
// this.showWifiNotEnabled();
// return;
// }
}
if (isIOS) {
if(!isWifiEnabled){
this.showWifiNotEnabled();
return;
}
// if(!isWifiEnabled){
// this.showWifiNotEnabled();
// return;
// }
} else if(isAndroid) {
let locationPermission = await this.devicePermissionsService.requestLocationAutherization();
if (!locationPermission) {
return;
}
if(!isWifiEnabled){
this.wifiWizard2.setWifiEnabled(true).then(()=>{
this.startWifi();
}).catch((err) => {
console.debug(err);
});
return;
}
// if(!isWifiEnabled){
// this.wifiWizard2.setWifiEnabled(true).then(()=>{
// this.startWifi();
// }).catch((err) => {
// console.debug(err);
// });
// return;
// }
}
// opening wifi dailog if all above conditions are passed (isWifiEnabled == true)
let modal = await this.modalController.create({

@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { WorklistMainService } from '../notification/service/work-list.main.service';
import { AttendanceOptionsComponent } from './attendance-options/attendance-options.component';
import { NfcModalComponent } from './nfc-modal/nfc-modal.component';
@ -36,7 +36,7 @@ const routes: Routes = [
WifiModalComponent
],
providers: [
BarcodeScanner,
// BarcodeScanner,
WorklistMainService
],
entryComponents: [

@ -10,6 +10,9 @@
<ion-row *ngIf="showStaticServices" class="slideFullWidth">
<ion-slides [options]="slideOptsOne" class="padding-slide slide">
<ion-slide *ngFor="let button of statsButtons; let i=index;">
<!-- <div class="loader" *ngIf="i === 1 && showLoader">
<img src="../assets/icon/progress-loading.gif" />
</div> -->
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"
@ -22,43 +25,130 @@
</ion-slides>
</ion-row>
<ion-row *ngFor="let menuItem of menuEntries; let i=index">
<ion-row *ngFor="let menuItem of menuEntries; let i=index" class="dynamic-form">
<ion-col [size]="12">
<ion-label>{{menuItem.PROMPT}}</ion-label>
<ion-label class="menu-label">{{menuItem.PROMPT}}</ion-label>
</ion-col>
<ion-slides [options]="slideOptsTwo">
<ion-slide *ngFor="let subMenu of menuItem.children; let j=index">
<app-services-button
(click)="openPage(subMenu)"
[title]="subMenu.PROMPT"
[icon]="subMenu.ICON"
[requestType]="subMenu.REQUEST_TYPE">
<app-services-button
(click)="openPage(subMenu)"
[title]="subMenu.PROMPT"
[icon]="subMenu.ICON">
</app-services-button>
</ion-slide>
<!-- <ion-slide *ngIf="i == 0 && showVcationRule">
<ion-slide *ngIf="i == 0 && showVcationRule">
<app-services-button
(click)="Vacation_Rule()"
[title]="vacationRuleTitle"
>
</app-services-button>
</ion-slide> -->
</ion-slide>
</ion-slides>
<ion-row class="attendance-module" *ngIf="i == 0">
<ion-col [size]="8">
<h3>{{'userProfile,personal-informaion' | translate}}</h3>
<span>{{'home,monthly-time-sheet-view' | translate}}</span>
<ion-button (click)="openPersonalInfo()">
{{'home,view-detail' | translate}}
</ion-button>
</ion-col>
<ion-col [size]="4">
<img src="assets/icon/new-design/profile.png"/>
</ion-col>
</ion-row>
<ion-row class="attendance-module" *ngIf="i == 0">
<ion-col [size]="8">
<h3>{{'userProfile,personal-informaion' | translate}}</h3>
<span>{{'home,monthly-time-sheet-view' | translate}}</span>
<ion-button (click)="openPersonalInfo()">
{{'home,view-detail' | translate}}
</ion-button>
</ion-col>
<ion-col [size]="4">
<img src="assets/icon/new-design/profile.png"/>
</ion-col>
</ion-row>
</ion-row>
<div *ngIf="!menuEntries">
<ion-list style="background: transparent; margin-bottom: 10px;">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
<div class="empty-div">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</div>
<ion-list style="background: transparent">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px;">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
<ion-list style="background: transparent">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
<ion-list style="background: transparent">
<ion-list-header>
<ion-skeleton-text [animated]="true" style="width: 90px"></ion-skeleton-text>
</ion-list-header>
<ion-item lines="none" style="--background: transparent">
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
<ion-thumbnail slot="start" style="height: 100px; width: 100px">
<ion-skeleton-text [animated]="true"></ion-skeleton-text>
</ion-thumbnail>
</ion-item>
</ion-list>
</div>
<!-- <ion-row *ngIf="showStaticServices">
<ion-col size="12">
<ion-label> {{'general,other-services' | translate}} </ion-label>
@ -87,10 +177,10 @@
</ion-grid>
</ion-content>
<!-- <div class="fixed-shift-timer" [ngClass]=" direction === 'en' ? 'fixed-shift-time-en' : 'fixed-shift-time-ar'" *ngIf="isCheckedIn" (click)="openattentracking()">
<div class="fixed-shift-timer" [ngClass]=" direction === 'en' ? 'fixed-shift-time-en' : 'fixed-shift-time-ar'" *ngIf="isCheckedIn" (click)="openattentracking()">
<span class="subTitle"> {{'home,time-left' | translate}} </span>
<circle-progress
[backgroundColor]= "'#6d6e71'"
[backgroundColor]= "'#292F42'"
[percent]="percent"
[radius]="50"
[outerStrokeWidth]="2"
@ -110,7 +200,7 @@
[clockwise]="false"
[renderOnClick]="false">
</circle-progress>
</div> -->
</div>
<!-- <div class="fixed-shift-timer" [ngClass]=" direction === 'en' ? 'fixed-shift-time-en' : 'fixed-shift-time-ar'" *ngIf="isCheckedIn === false">
<fab-button (trigger)="getDeviceLocation()"></fab-button>
<page-trailer [small] = "true"></page-trailer>

@ -3,10 +3,11 @@ ion-row {
margin-top: 10px;
}
.header-toolbar-new{
.header-toolbar-new {
--background: #29B5BF;
}
.profile-image-container{
.profile-image-container {
position: relative;
z-index: 999;
// img {
@ -18,7 +19,8 @@ ion-row {
// // margin-right: 4px;
// }
}
.profile-image{
.profile-image {
width: 32px;
float: right;
// margin-top: -42px;
@ -26,45 +28,54 @@ ion-row {
height: 32px;
// margin-right: 4px;
}
ion-title{
ion-title {
color: white;
position: absolute;
top: 0;
text-align: center;
left:20%;
left: 20%;
right: 20%;
font-size: 0.42cm;
font-weight: bold;
height: 100%;
}
ion-label{
ion-label {
display: block;
color: black !important;
font-size: 14px;
color: #004D71 !important;
font-size: 16px;
font-weight: bold;
letter-spacing: 0.16px;
// margin: 0px 10px 10px 10px;
}
.main-dashboard-container{
.main-dashboard-container {
position: relative;
width: 100%;
--background: #f5f5f5;
}
.contentBg:before {
position: absolute;
content: "";
background: #29B5BF;
height: 100px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.main-container{
content: "";
background: #29B5BF;
height: 100px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.main-container {
position: relative;
z-index: 2;
padding-right: 15px;
padding-left: 15px;
padding-bottom: 130px;
}
.attendance-module{
.attendance-module {
border-radius: 20px;
background-color: #c2a16b;
padding: 10px;
@ -72,36 +83,46 @@ ion-label{
width: 100%;
margin-top: 25px;
margin-bottom: 0px;
h3{
// margin-right: 10px !important;
margin-left: 5px !important;
h3 {
font-size: 18px;
font-weight: bold;
margin: 0;
}
span{
span {
font-size: 13px;
display: block;
margin-top: 5px;
}
img{
img {
display: block;
margin: 10px auto;
width: 80%;
}
ion-button{
ion-button {
border-radius: 10px;
padding: 10px;
background: rgba(0,0,0,.3);
background: rgba(0, 0, 0, 0.3);
letter-spacing: 0px;
--background: transparent;
--box-shadow: none !important;
height: auto;
min-height: inherit;
margin-top: 10px;
margin-top: 15px;
font-size: 12px;
}
}
.swiper-container {
margin: 0 !important;
width: 100% !important;
}
.fixed-shift-time-en {
right: 20px;
}
@ -110,10 +131,11 @@ ion-label{
left: 20px;
}
.fixed-shift-timer{
.fixed-shift-timer {
position: fixed;
bottom: 20px;
z-index: 2;
span.subTitle {
position: absolute;
left: 50%;
@ -156,3 +178,30 @@ ion-label{
// text-transform: uppercase;
// }
// }
.loader {
position: absolute;
width: 100%;
top: 70px;
left: 2px;
img {
width: 25px;
}
}
ion-skeleton-text {
--border-radius: 15px;
--background: rgba(188, 0, 255, 0.065);
--background-rgb: 2, 77, 113;
}
.empty-div {
border-radius: 20px;
padding: 10px;
width: 100%;
margin-bottom: 20px;
margin-left: 5px !important;
height: 140px;
}

@ -7,10 +7,11 @@ import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/mo
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
// import { Geolocation } from '@ionic-native/geolocation/ngx';
// import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest';
import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
@ -36,13 +37,14 @@ import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service';
import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { NFC, Ndef } from "@ionic-native/nfc/ngx"
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
// import { NFC, Ndef } from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
import { TerminationServiceService } from 'src/app/termination/service/termination-service.service';
import * as moment from "moment";
import { count } from 'console';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
@ -52,7 +54,7 @@ export class HomePage implements OnInit {
userData: any = {};
userImage: any = '../assets/imgs/profile.png';
menuList: any = [];
zbarOptions: any;
// zbarOptions: any;
scannedResult: any;
notBadge: any;
lat: any;
@ -64,17 +66,19 @@ export class HomePage implements OnInit {
camera: boolean;
ticketRequestObject: any;
leaveRequestObject: any;
businessLeaveRequestObject: any;
missingSwipeRequestObject: any;
public isShow = false;
public showVcationRule = false;
public showVcationRule = true;
public isFakeLocationUsed = false;
public intervalCountdown: any;
public showLoader = true;
public statsButtons = [
{
title: this.ts.trPK('attendance-tracking', 'title'),
link: '0',
show: true
},
// {
// title: this.ts.trPK('attendance-tracking', 'title'),
// link: '0',
// show: true
// },
{
title: this.ts.trPK('home', 'worklist'),
statsValue: 0,
@ -82,18 +86,32 @@ export class HomePage implements OnInit {
link: '1',
show: true
},
// {
// title: this.ts.trPK('home', 'missing-swipes'),
// statsValue: 0,
// icon: 'assets/icon/new-design/missing_swipe.png',
// link: '2',
// show: true
// },
{
title: this.ts.trPK('home', 'leave-balance'),
statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png',
link: '3',
show: true
show: true,
},
{
title: this.ts.trPK('vacation-rule', 'vacationRule'),
title: this.ts.trPK('home', 'business-balance'),
statsValue: 0,
icon: 'assets/icon/new-design/vacation_rules_icon.png',
link: '999',
icon: 'assets/icon/new-design/BusinessTrip.png',
link: '5',
show: true,
},
{
title: this.ts.trPK('eit', 'my-reports'),
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png',
link: '4',
show: true
}
];
@ -124,6 +142,7 @@ export class HomePage implements OnInit {
direction: string;
public isPostNoLoad = true;
public showStaticServices = false;
public myRequestData: any;
constructor(
public ts: TranslatorService,
@ -133,10 +152,10 @@ export class HomePage implements OnInit {
public common: CommonService,
public events: Events,
private device: Device,
private geolocation: Geolocation,
// private geolocation: Geolocation,
private attendanceService: AttendanceService,
private eitService: EitService,
private barcodeScanner: BarcodeScanner,
// private barcodeScanner: BarcodeScanner,
public actionSheetCtrl: ActionSheetController,
public sharedData: SharedDataService,
private sanitizer: DomSanitizer,
@ -148,9 +167,9 @@ export class HomePage implements OnInit {
public workListService: WorklistMainService,
public router: Router,
private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation,
// public backgroundGeolocation: BackgroundGeolocation,
public modalController: ModalController,
private nfc: NFC,
// private nfc: NFC,
public firebasex: FirebaseX
) {
this.events.subscribe('img-change', displayImg => {
@ -182,11 +201,11 @@ export class HomePage implements OnInit {
public slideSettingsTwo() {
const width = this.platform.width();
this.slideOptsOne = {
slidesPerView: width > 320 ? 3.5 : 3,
slidesPerView: width > 320 ? 3.4 : 3,
spaceBetween: 10
};
this.slideOptsTwo = {
slidesPerView: width > 320 ? 3.2 : 2.5,
slidesPerView: width > 320 ? 3.4 : 2.4,
spaceBetween: width > 320 ? 10 : 5
};
this.showStaticServices = true;
@ -261,32 +280,32 @@ export class HomePage implements OnInit {
this.location = granted as boolean;
if (this.location) {
if (this.platform.is('android')) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) {
if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.isFakeLocationUsed = true;
}
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
// if (resp && (resp.latitude && resp.longitude)) {
// if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
// this.isFakeLocationUsed = true;
// }
// this.lat = resp.latitude;
// this.longt = resp.longitude;
// this.attendance();
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }, (error) => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
} else {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
// this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
// if (resp && resp.coords.latitude && resp.coords.longitude) {
// this.lat = resp.coords.latitude;
// this.longt = resp.coords.longitude;
// this.attendance();
// } else {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// }
// }).catch(error => {
// this.common.presentAlert(this.ts.trPK('home', 'position-error'));
// });
}
} else {
return false;
@ -298,8 +317,8 @@ export class HomePage implements OnInit {
for (const servicePrivilage of AuthenticationService.servicePrivilage) {
if (servicePrivilage.Previlege === false) {
if (servicePrivilage.ServiceName === 'accrualBalance') {
this.statsButtons[2].show = false;
// this.statsButtons[2].show = false;
this.statsButtons[3].show = false;
// this.statsButtons[4].show = false;
}
if (servicePrivilage.ServiceName === 'vacationRule') {
this.showVcationRule = false;
@ -310,8 +329,8 @@ export class HomePage implements OnInit {
// document.getElementById(servicePrivilage.ServiceName).style.filter =
// 'grayscale(1)';
} else {
this.statsButtons[2].show = true;
// this.statsButtons[2].show = true;
this.statsButtons[3].show = true;
this.statsButtons[4].show = true;
this.showVcationRule = true;
}
}
@ -362,18 +381,21 @@ export class HomePage implements OnInit {
callDashboardServices() {
this.getMenu();
this.setServicesPrivilage();
this.statsButtons[1].show = true;
// this.setServicesPrivilage();
if (this.common.getTotalNumberOfWorklistRequest()) {
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.statsButtons[0].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.showLoader = false;
} else {
this.openNotificationsDashbored();
}
// this.showOpenMissingSwipes();
// this.showAttendanceTracking();
//this.showOpenMissingSwipes();
//this.showAttendanceTracking();
var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
if (!accrualBalance)
if (!accrualBalance) {
this.getAccrualBalance();
}
}
public Vacation_Rule() {
@ -391,6 +413,9 @@ export class HomePage implements OnInit {
if (this.common.hasData(result.List_Menu)) {
this.menuList = result.List_Menu;
this.getMenuDetails();
} else {
this.menuEntries = true;
this.common.stopLoading();
}
}
}
@ -416,6 +441,12 @@ export class HomePage implements OnInit {
if (this.menuList[i].MENU_TYPE === 'M') {
this.events.publish('myTeamFlag', 'true');
// this.common.sharedService.setSharedData('true', "myTeamFlag");
} else {
this.events.publish('myTeamFlag', 'false');
}
if (this.menuList[i].MENU_TYPE === 'E') {
this.myRequestData = this.menuList[i];
}
}
@ -447,10 +478,12 @@ export class HomePage implements OnInit {
if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID;
} else {
selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA,
false
);
// selEmpNo = this.common.sharedService.getSharedData(
// LoginRequest.SHARED_DATA,
// false
// );
console.log(this.userData);
selEmpNo = this.userData.EMPLOYEE_NUMBER;
}
nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE,
@ -470,8 +503,9 @@ export class HomePage implements OnInit {
);
this.eitService
.getMenuEntries(request, '', '', false)
.getMenuEntries(request, '', '', this.isPostNoLoad)
.subscribe((result: MenuResponse) => {
this.common.stopLoading();
this.handleMenuEntiresResult(result);
});
}
@ -491,14 +525,18 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < result.GetMenuEntriesList.length; i++) {
// tslint:disable-next-line: triple-equals
if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_SIT_SS') {
if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') {
this.ticketRequestObject = result.GetMenuEntriesList[i];
// tslint:disable-next-line: triple-equals
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HR_LOA_SS') {
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'XXX_HR_EIT_LOA_CREATE_SS') {
this.leaveRequestObject = result.GetMenuEntriesList[i];
// tslint:disable-next-line: triple-equals
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_SIT_SS') {
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') {
this.missingSwipeRequestObject = result.GetMenuEntriesList[i];
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'XXX_HR_EIT_BUSINESS_MISSION_SS') {
this.businessLeaveRequestObject = result.GetMenuEntriesList[i];
} else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'MBL_PERFORMANCE_MANAGEMENT' && result.GetMenuEntriesList[i].REQUEST_TYPE == 'PMS') {
result.GetMenuEntriesList.splice(i, 1);
}
}
this.sortMenuEntires(result.GetMenuEntriesList);
@ -528,22 +566,22 @@ export class HomePage implements OnInit {
}
scanCode() {
this.barcodeScanner
.scan()
.then(barcodeData => {
if (!barcodeData.cancelled) {
this.scannedResult = barcodeData;
this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance();
} else {
this.swipeAttendance();
}
}
})
.catch(err => {
console.log('Error', err);
});
// this.barcodeScanner
// .scan()
// .then(barcodeData => {
// if (!barcodeData.cancelled) {
// this.scannedResult = barcodeData;
// this.deviceID = this.device.uuid;
// if (this.isFakeLocationUsed) {
// this.fakeSwipeAttendance();
// } else {
// this.swipeAttendance();
// }
// }
// })
// .catch(err => {
// console.log('Error', err);
// });
}
fakeSwipeAttendance() {
@ -654,23 +692,76 @@ export class HomePage implements OnInit {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
this.countAllNotification = result[key];
// this.ITGCountAllNotification();
this.statsButtons[1].statsValue = Math.floor(this.countAllNotification);
this.statsButtons[0].statsValue = this.countAllNotification;
this.common.sharedService.setSharedData(this.statsButtons[0].statsValue, 'total-count');
console.log(this.common.sharedService.getSharedData('total-count', false));
console.log(this.common.getTotalNumberOfWorklistRequest());
this.common.stopLoading();
//this.ITGCountAllNotification();
this.common.sharedService.setSharedData(
result,
'worklistNotifications'
);
this.common.setFilterValues(result['GetOpenNotificationsList']);
this.showLoader = false;
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
ITGCountAllNotification() {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount;
this.statsButtons[1].statsValue =
Math.floor(this.countAllNotification + result.TotalCount);
if (this.common.validResponse(result)) {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount;
this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.getCOCNotificationCount();
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
getCOCNotificationCount() {
const request = new COCRequest();
request.ItgPageSize = 1;
request.ItgPageNo = 1;
request.Date = moment(new Date()).format("YYYY-MM-DD");
this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
console.log(result);
if (this.common.validResponse(result)) {
const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
this.common.filterKeys['COC'] = totalCount;
this.statsButtons[1].statsValue = Math.floor(this.statsButtons[1].statsValue + totalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.showLoader = false;
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
@ -712,6 +803,7 @@ export class HomePage implements OnInit {
);
selMenu.GetMenuEntriesList = subMenu;
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
// if (subMenu.REQUEST_TYPE === 'EIT' && subMenu.FUNCTION_NAME === 'XXX_HR_EIT_LOA_CREATE_SS') {
if (subMenu.REQUEST_TYPE === 'ABSENCE') {
this.common.openAbsencePage();
} else if (subMenu.REQUEST_TYPE === 'SIT') {
@ -723,11 +815,18 @@ export class HomePage implements OnInit {
selMenu.GetMenuEntriesList,
'menuEntries'
);
this.common.openSITPage();
} else if (subMenu.FUNCTION_NAME == 'HR_TERM_SS' || subMenu.FUNCTION_NAME == 'HR_TERM_EMP_SS') {
this.common.sharedService.setSharedData(subMenu, TerminationServiceService.TERMINATION_PAGE);
this.common.openTermination();
this.common.openEITPage();
} else if (subMenu.REQUEST_TYPE === 'BASIC_DETAILS') {
this.common.openProfile('basicDetails');
} else if (subMenu.REQUEST_TYPE === 'ADDRESS' || subMenu.REQUEST_TYPE === 'PHONE_NUMBERS') {
this.common.openProfile('contact');
} else if (subMenu.REQUEST_TYPE === 'CONTACT') {
this.common.openProfile('family');
} else if (subMenu.REQUEST_TYPE === 'PAR') {
this.performanceEvaluation();
} else if (subMenu.REQUEST_TYPE === 'CCP') {
this.common.sharedService.setSharedData(subMenu, MenuResponse.SELECTED_MENU);
this.common.openConcurrentReport(true);
}
if (subMenu.REQUEST_TYPE === 'TIME_CARD') {
this.common.openTimeCardPage();
@ -748,18 +847,24 @@ export class HomePage implements OnInit {
this.accrualService.getAccrualBalances(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
if (this.common.validResponse(result)) {
let totalTicketsLeft = 0;
let totalAccuralAvailable = 0;
let totalOldAvailable = 0;
this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'SFHP Annual Leave Plan') {
if (accrualBalance.ACCURAL_PLAN_NAME === 'Annual Vacation Accrual' || accrualBalance.ACCURAL_PLAN_NAME == " خطة استحقاق الاجازة الاعتيادية") {
totalAccuralAvailable = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
} else if (accrualBalance.ACCURAL_PLAN_NAME === 'Business Trip Accrual' || accrualBalance.ACCURAL_PLAN_NAME == "خطة استحقاق الإنتدابات") {
this.statsButtons[2].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance');
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance');
} else {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
} else if (accrualBalance.ACCURAL_PLAN_NAME === 'Old Leave Balance' || accrualBalance.ACCURAL_PLAN_NAME == "خطة فصل الارصدة 1439") {
totalOldAvailable = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
}
}
// this.statsButtons[2].statsValue = Number(totalTicketsLeft.toFixed(2));
const accrualBalanceNew = totalAccuralAvailable + totalOldAvailable;
this.statsButtons[1].statsValue = accrualBalanceNew;
this.common.sharedService.setSharedData(accrualBalanceNew, 'leaveAccrualBalance');
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate');
}
});
}
@ -776,24 +881,19 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: triple-equals
if (link == '0') {
this.isFakeLocationUsed = false;
// this.getDeviceLocation();
this.showAttendanceOptions();
// tslint:disable-next-line: triple-equals
} else if (link == '1') {
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.common.startLoading();
this.common.openNotificationPage();
// tslint:disable-next-line: triple-equals
} else if (link == '2') {
this.openPage(this.missingSwipeRequestObject);
// tslint:disable-next-line: triple-equals
} else if (link == '3') {
this.openPage(this.leaveRequestObject);
// tslint:disable-next-line: triple-equals
} else if (link == '4') {
this.openPage(this.ticketRequestObject);
} else if (link == '999') {
this.Vacation_Rule();
this.common.sharedService.setSharedData(this.myRequestData, MenuResponse.SELECTED_MENU);
this.common.openConcurrentTransactionsHome();
} else if (link == '5') {
this.openPage(this.businessLeaveRequestObject);
}
}
@ -823,4 +923,8 @@ export class HomePage implements OnInit {
openAnnouncement() {
this.common.openAnnouncement();
}
public performanceEvaluation() {
this.common.openPerformanceevaluation();
}
}

@ -1,5 +1,5 @@
import { Component, OnInit, NgZone } from '@angular/core';
import { NFC } from "@ionic-native/nfc/ngx"
// import { NFC } from "@ionic-native/nfc/ngx"
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import {AttendScanService} from '../../hmg-common/services/attend-services/attend-scan.service';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
@ -24,7 +24,7 @@ export class NfcModalComponent implements OnInit {
public longt: number;
constructor(
private nfc: NFC,
// private nfc: NFC,
public common: CommonService,
public attendScanService: AttendScanService,
private device: Device,
@ -45,15 +45,15 @@ export class NfcModalComponent implements OnInit {
}
async startAndroidNfc() {
let flags = this.nfc.FLAG_READER_NFC_A | this.nfc.FLAG_READER_NFC_V;
this.nfcReader = this.nfc.readerMode(flags).subscribe((tag) => {
const serialNumber = this.nfc.bytesToHexString(tag.id);
this.swipeAttendanceNFC(serialNumber);
}, (error) => {
this.modalController.dismiss();
this.common.presentAlert(this.ts.trPK('general', 'nfc-error'));
console.log('error =====>>>>>> + + + =' + error);
});
// let flags = this.nfc.FLAG_READER_NFC_A | this.nfc.FLAG_READER_NFC_V;
// this.nfcReader = this.nfc.readerMode(flags).subscribe((tag) => {
// const serialNumber = this.nfc.bytesToHexString(tag.id);
// this.swipeAttendanceNFC(serialNumber);
// }, (error) => {
// this.modalController.dismiss();
// this.common.presentAlert(this.ts.trPK('general', 'nfc-error'));
// console.log('error =====>>>>>> + + + =' + error);
// });
}
public swipeAttendanceNFC (nfcSerialCode: any) {

@ -8,7 +8,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { Platform } from "@ionic/angular";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
// import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service";
@ -42,7 +42,7 @@ export class WifiModalComponent implements OnInit {
public modalController: ModalController,
public ts: TranslatorService,
public ngZone: NgZone,
private wifiWizard2: WifiWizard2,
// private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings,
private platform: Platform,
public attendScanService: AttendScanService
@ -58,8 +58,8 @@ export class WifiModalComponent implements OnInit {
async getConnectedBSSID(ssid:string){
let avaialbleSSID = await this.wifiWizard2.getConnectedBSSID();
console.log(avaialbleSSID);
// let avaialbleSSID = await this.wifiWizard2.getConnectedBSSID();
// console.log(avaialbleSSID);
}
async startWifiConnection() {
@ -67,49 +67,49 @@ export class WifiModalComponent implements OnInit {
const isIOS = this.platform.is("ios");
if (isAndroid) {
let isWifiAvailable = await this.isWifiAvailable(this.ssid);
console.debug("isWifiAvailable: " + isWifiAvailable);
if(isWifiAvailable){
console.debug("Wifi Credientials: " + this.ssid + " | " + this.password);
this.wifiWizard2.connect(this.ssid, true, this.password, this.algo).then(async (value) =>{
let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => {
this.swipeAttendanceWifi(ssid_);
},2000);
}else{
this.showErrorInvalidWorkspace();
}
})
.catch((err) => {
console.debug(err);
this.showErrorForgetWifiConfiguration();
});
}else{
console.debug("Wifi is not available considered your device is not in range");
this.showErrorInvalidWorkspace();
}
// let isWifiAvailable = await this.isWifiAvailable(this.ssid);
// console.debug("isWifiAvailable: " + isWifiAvailable);
// if(isWifiAvailable){
// console.debug("Wifi Credientials: " + this.ssid + " | " + this.password);
// this.wifiWizard2.connect(this.ssid, true, this.password, this.algo).then(async (value) =>{
// let ssid_ = await this.wifiWizard2.getConnectedSSID();
// if(ssid_ == this.ssid){
// console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
// setTimeout(() => {
// this.swipeAttendanceWifi(ssid_);
// },2000);
// }else{
// this.showErrorInvalidWorkspace();
// }
// })
// .catch((err) => {
// console.debug(err);
// this.showErrorForgetWifiConfiguration();
// });
// }else{
// console.debug("Wifi is not available considered your device is not in range");
// this.showErrorInvalidWorkspace();
// }
} else if (isIOS) {
this.wifiWizard2.iOSConnectNetwork(this.ssid,this.password).then(async (value) => {
let ssid_ = await this.wifiWizard2.getConnectedSSID();
if(ssid_ == this.ssid){
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => {
this.swipeAttendanceWifi(ssid_);
},6000);
}else{
this.showErrorInvalidWorkspace();
}
})
.catch((err) => {
console.debug(err);
this.showErrorInvalidWorkspace();
});
if(this.wifiWizard2.isWifiEnabled){
} else{
this.showWifiNotEnabled();
}
// this.wifiWizard2.iOSConnectNetwork(this.ssid,this.password).then(async (value) => {
// let ssid_ = await this.wifiWizard2.getConnectedSSID();
// if(ssid_ == this.ssid){
// console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
// setTimeout(() => {
// this.swipeAttendanceWifi(ssid_);
// },6000);
// }else{
// this.showErrorInvalidWorkspace();
// }
// })
// .catch((err) => {
// console.debug(err);
// this.showErrorInvalidWorkspace();
// });
// if(this.wifiWizard2.isWifiEnabled){
// } else{
// this.showWifiNotEnabled();
// }
}
}
@ -142,13 +142,13 @@ export class WifiModalComponent implements OnInit {
async disconnectWifi() {
const isAndroid = this.platform.is("android");
const isIOS = this.platform.is("ios");
if(isAndroid){
await this.wifiWizard2.disconnect(this.ssid).catch((error)=>{ console.error(error) });
await this.wifiWizard2.remove(this.ssid).catch((error)=>{ console.error(error) });
console.debug("Wifi Removed");
}else if(isIOS){
await this.wifiWizard2.iOSDisconnectNetwork(this.ssid);
}
// if(isAndroid){
// await this.wifiWizard2.disconnect(this.ssid).catch((error)=>{ console.error(error) });
// await this.wifiWizard2.remove(this.ssid).catch((error)=>{ console.error(error) });
// console.debug("Wifi Removed");
// }else if(isIOS){
// await this.wifiWizard2.iOSDisconnectNetwork(this.ssid);
// }
}
async swipeAttendanceWifi(code:any) {
@ -211,15 +211,15 @@ export class WifiModalComponent implements OnInit {
}
async isWifiAvailable(ssid:string){
let avaialble_wifi = await this.wifiWizard2.scan();
let find = avaialble_wifi.find(element => {
return element.SSID == ssid;
});
// let avaialble_wifi = await this.wifiWizard2.scan();
// let find = avaialble_wifi.find(element => {
// return element.SSID == ssid;
// });
if (find === undefined) {
return false;
} else {
return find.SSID == ssid;
}
// if (find === undefined) {
// return false;
// } else {
// return find.SSID == ssid;
// }
}
}

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

@ -133,11 +133,11 @@ font-weight: bold;
height: 15%;
width: 100%;
position: absolute;
background: #29B5BF;
background: #259CB8;
top: 0;
}
.header-toolbar{
--background: #29B5BF !important;
--background: #259CB8 !important;
}
.bottom{
height: 85%;
@ -321,7 +321,7 @@ ion-footer{
}
.uploader-box{
border-width: 2px;
border-color: #29B5BF;
border-color: #259CB8;
border-style: dotted;
border-radius: 10px;
left: 10px;
@ -339,7 +339,7 @@ ion-footer{
right: 0;
top: 60px;
bottom: 0;
color: #29B5BF;
color: #259CB8;
}
.top img{
position: absolute;

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

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

Loading…
Cancel
Save