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-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;"> <ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col> <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>
<ion-col style="padding-left: 7%;" size="2"> <ion-col style="padding-left: 7%;" size="2">
<div class="fileDiv"> <div class="fileDiv">
@ -255,7 +255,7 @@
</ion-content> </ion-content>
<ion-footer> <ion-footer>
<div class="centerDiv"> <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> </div>
</ion-footer> </ion-footer>

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

@ -123,10 +123,10 @@
<ion-footer> <ion-footer>
<div class="centerDiv"> <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> {{'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> {{'general, cancel' | translate}}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

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

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

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

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

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

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

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

@ -9,117 +9,121 @@ header
bottom: 0; bottom: 0;
} }
.mohemmLogo{ .mohemmLogo {
max-width: 46% !important; max-width: 46% !important;
border: 0 !important; border: 0 !important;
margin-left: 70px !important; margin-right: 70px !important;
margin-top: -24px !important; margin-top: -24px !important;
margin-bottom: 11px; margin-bottom: 5px;
margin: auto;
display: block;
} }
.mohemmLogo-ar{ .mohemmLogo-ar {
max-width: 46% !important; max-width: 46% !important;
border: 0 !important; border: 0 !important;
margin-right: 70px !important; margin-right: 70px !important;
margin-top: -24px !important; margin-top: -24px !important;
margin-bottom: 11px; margin-bottom: 5px;
} }
.closeIcon{ .closeIcon {
height: 10px !important; height: 10px !important;
margin-left: 255px !important; margin-left: 255px !important;
margin-top: 0px !important; margin-top: 0px !important;
background: transparent; background: transparent;
--background: white !important; --background: white !important;
position: relative;
top: 10px;
} }
hr {
border-width: 1px;
}
.menubutton{
.menubutton {
white-space: normal; white-space: normal;
color: var(--light); color: var(--light);
text-transform: capitalize; text-transform: capitalize;
min-height: 39px; min-height: 39px;
background: #f0ecec; background: #f0ecec;
font-size: 2rem; font-size: 2rem;
position: absolute; position: absolute;
width: 35px !important; width: 35px !important;
height: 19px; height: 19px;
box-shadow: 3px 0px 7px 0px #c5c2c2; box-shadow: 3px 0px 7px 0px #c5c2c2;
border-radius: 50%; border-radius: 50%;
} }
.changeIcon{ .changeIcon {
/* background: #c1c1c1; */ /* background: #c1c1c1; */
width: 21px; width: 21px;
/* height: 26px; */ /* height: 26px; */
border-radius: 50% !important; border-radius: 50% !important;
position: relative; position: relative;
color: #7f8c8d; color: #7f8c8d;
height: 35px; height: 35px;
} }
.changeImgBtn{ .changeImgBtn {
// margin: 0; // margin: 0;
position: absolute; position: absolute;
top: 18%; top: 18%;
left: 68%; left: 68%;
// -ms-transform: translate(-50%, -50%); // -ms-transform: translate(-50%, -50%);
// transform: translate(-50%, -50%); // transform: translate(-50%, -50%);
} }
.logout{ .logout {
background-color:#c2a16b; background-color: #99B8C6;
border: none; border: none;
color:white; color: #004D71;
// padding: 20px;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-block;
font-size: 12px; font-size: 12px;
margin-left: 120px !important;
margin-top: 15px !important; margin-top: 15px !important;
margin-bottom: 20px !important; margin-bottom: 20px !important;
border-radius: 30px; border-radius: 30px;
// width: 40px; height: 35px;
height: 26px; margin: auto;
padding: 6px 24px; padding: 0px 24px;
display: block;
}
}
.logout-ar{
background-color: #c2a16b; .logout-ar {
border: none; background-color: #99B8C6;
color: white; border: none;
text-align: center; color: #004D71;
text-decoration: none; text-align: center;
display: inline-block; text-decoration: none;
font-size: 12px; display: inline-block;
margin-right: 95px !important; font-size: 12px;
margin-top: 15px !important; margin-right: 95px !important;
margin-bottom: 20px !important; margin-top: 15px !important;
border-radius: 30px; margin-bottom: 20px !important;
height: 26px; border-radius: 30px;
padding: 6px 24px; height: 35px;
} padding: 0px 24px;
}
.menuImg{
width: 105px !important; .menuImg {
height: 105px !important; width: 105px !important;
margin-left: 90px !important; height: 105px !important;
display: inline-flex; margin-left: 90px !important;
overflow: hidden; display: inline-flex;
background: transparent; overflow: hidden;
border-radius: 50% !important; background: transparent;
position: relative; border-radius: 50% !important;
top: 0px; position: relative;
top: 0px;
} }
.menu-header .logo { .menu-header .logo {
@ -233,33 +237,35 @@ padding: 6px 24px;
height: 100px; height: 100px;
position: relative; position: relative;
display: block; display: block;
margin-bottom: -28px; margin-bottom: -10px;
top: 40px;
} }
.list-en{ .list-en {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
margin-top: -19px; margin-top: -19px;
margin-bottom: 0; margin-bottom: 0;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
padding-top: 0px; padding-top: 0px;
padding-bottom: 8px; padding-bottom: 8px;
} }
.list-ar{ .list-ar {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
margin-top: -19px; margin-top: -19px;
margin-bottom: 0; margin-bottom: 0;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
padding-top: 0px; padding-top: 0px;
padding-bottom: 8px; padding-bottom: 8px;
} }
// .sidebar-menu .header-div { // .sidebar-menu .header-div {
// text-transform: capitalize; // text-transform: capitalize;
@ -286,21 +292,27 @@ button.menu-item.item.item-block.item-ios {
} }
.TxtPlace { .TxtPlace {
margin: 0; font-size: 20px;
padding: 0; color: #004D71;
text-align: center; font-weight: bold;
font-weight: bolder; text-overflow: ellipsis;
color: black; overflow: hidden;
font-size: 16px; white-space: nowrap;
width: 90%;
margin: 10px auto auto auto;
} }
.TxtPlaces{
margin: 0;
padding: 0; .TxtPlaces {
text-align: center;
font-weight: bolder;
font-size: 14px; 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 { .menuFooter {
@ -309,6 +321,8 @@ button.menu-item.item.item-block.item-ios {
text-align: center; text-align: center;
margin: auto; margin: auto;
width: 100%; width: 100%;
position: absolute;
top: 40px
} }
@ -318,59 +332,49 @@ button.menu-item.item.item-block.item-ios {
margin: auto; margin: auto;
} }
.menuFooter .CompanyImg {
// .menuFooter .CompanyImg { width: 65%;
// width: 100%; height: 60%;
// height: 100%; margin-bottom: -21px;
// }
.menuFooter .CompanyImg{
width: 80%;
height: 80%;
margin-bottom: -21px;
} }
// .logoImg{ .logoImgWithMyTeam {
// width: 120px;
// position: relative;
// }
.logoImgWithMyTeam{ width: 200px;
width: 77px; margin: 20px auto;
// position: relative;
margin-top: -1px;
margin-bottom: 70px;
} }
.logoImg{
// width: 77px; .logoImg {
// margin-top: -1px; margin-bottom: 180px;
// margin-bottom: 180px; width: 225px;
width: 120px;
margin-top: -1px;
margin-bottom: 135px;
} }
.companyTxt { .companyTxt {
font-size: 12px; font-size: 12px;
color: var(--customnavy); color: #004D71;
text-align: center; text-align: center;
font-family: 'Inter' !important;
} }
ion-thumbnail.menu-thumb{
width:20px; ion-thumbnail.menu-thumb {
height:20px; width: 20px;
height: 20px;
// margin-top: 5px !important; // margin-top: 5px !important;
} }
.changepassword{
color: black !important;
font-weight: bolder !important;
} .changepassword {
.profile{
color: black !important; color: black !important;
font-weight: bolder !important; font-weight: bolder !important;
} }
.profileDiv-ar{
.profile {
color: #5C6F79 !important;
font-weight: bolder !important;
}
.profileDiv-ar {
margin: 5px auto !important; margin: 5px auto !important;
} }
@ -387,14 +391,42 @@ font-weight: bolder !important;
// top: 7px; // top: 7px;
// } // }
.profileImg{ .profileImg {
width: 140px; width: 100px;
height: 140px; height: 100px;
display: -webkit-inline-box; display: -webkit-inline-box;
display: inline-flex; display: inline-flex;
overflow: hidden; overflow: hidden;
background: transparent; background: transparent;
border-radius: 70% !important; border-radius: 70% !important;
position: relative; position: relative;
top: 3px; 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'; menuSide = 'left';
notBadge: number; notBadge: number;
companyUrl = '../assets/imgs/CSLogo.png'; companyUrl = '../assets/imgs/CSLogo.png';
companyDesc = 'Powered By Cloud Solutions'; companyDesc = '';
direction = 'ltr'; direction = 'ltr';
User_Job_name: string; User_Job_name: string;
public logoutFlage: any = false; public logoutFlage: any = false;
@ -156,7 +156,7 @@ export class AppComponent implements OnInit {
localStorage.setItem("digitalIDUser", JSON.stringify(user)); localStorage.setItem("digitalIDUser", JSON.stringify(user));
this.digitalIDUser = user//JSON.stringify(user); this.digitalIDUser = user//JSON.stringify(user);
this.companyUrl = user.CompanyImageURL ? user.CompanyImageURL : '../assets/imgs/CSLogo.png'; 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; this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME;
@ -204,11 +204,11 @@ export class AppComponent implements OnInit {
} else { } else {
this.user_image = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'; this.user_image = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : '../assets/imgs/profile.png';
} }
this.User_Job_name = user.JOB_NAME; // this.User_Job_name = user.JOB_NAME;
// let jobTitle = user.POSITION_NAME.split('.'); let jobTitle = user.POSITION_NAME;
// if (jobTitle && jobTitle.length > 1) { // if (jobTitle && jobTitle.length > 1) {
// this.User_Job_name = jobTitle[0] + " " + jobTitle[1]; this.User_Job_name = jobTitle;
// } // }
//erm channel //erm channel
// if (!CommonService.SKIP) // if (!CommonService.SKIP)
// this.cs.navigateForward('/erm-channel/survey'); // this.cs.navigateForward('/erm-channel/survey');
@ -221,9 +221,11 @@ export class AppComponent implements OnInit {
this.events.subscribe('myTeamFlag', myTeamFlag => { this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag; this.TeamFlag = myTeamFlag;
this.menuList = this.cs.sharedService.getSharedData(MenuResponse.MENU_LIST, false); this.menuList = this.cs.sharedService.getSharedData(MenuResponse.MENU_LIST, false);
console.log(this.menuList);
}); });
} }
private initializeDirection() { private initializeDirection() {
if (this.isIOS) { if (this.isIOS) {
if (this.router.isActive('/authentication/login', true)) { if (this.router.isActive('/authentication/login', true)) {
@ -261,6 +263,17 @@ export class AppComponent implements OnInit {
this.cs.openMyTeamPage(); 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() { public openMyRequestPage() {
this.menu.toggle(); this.menu.toggle();
this.cs.openMyRequestPage(); this.cs.openMyRequestPage();
@ -356,10 +369,11 @@ export class AppComponent implements OnInit {
} }
oepnMyRequest(menu) { oepnMyRequest(menu) {
this.cs.sharedService.setSharedData(menu, MenuResponse.SELECTED_MENU); this.cs.sharedService.setSharedData(menu, MenuResponse.SELECTED_MENU);
this.cs.openConcurrentReport(); // this.cs.openConcurrentReport();
this.cs.openConcurrentTransactionsHome();
this.menu.toggle(); this.menu.toggle();
} }
oepnTransaction() { openTransaction() {
this.cs.openTransactions(); this.cs.openTransactions();
this.menu.toggle(); this.menu.toggle();
} }

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

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

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

@ -1,9 +1,9 @@
<ion-content style="--background: white;"> <ion-content style="--background: white;" class="biggerPhone">
<div> <div class="rocket-image">
<img src="assets/icon/update_rocket_image.png" style="width: 100%;" /> <img src="assets/icon/update_rocket_image.png" style="width: 100%;" />
</div> </div>
<div style="text-align: center;"> <div style="text-align: center;">
<img src="assets/imgs/CSLogo.png" /> <img style="height: 75px" src="assets/icon/moe-logo.png" />
</div> </div>
<h1 style="text-align: center; font-weight: bold"> {{ 'general,app-update' | translate }}</h1> <h1 style="text-align: center; font-weight: bold"> {{ 'general,app-update' | translate }}</h1>
@ -15,7 +15,7 @@
<ion-grid> <ion-grid>
<ion-row class="ion-justify-content-center"> <ion-row class="ion-justify-content-center">
<ion-col [size]="11" [sizeLg]="8" [sizeXl]="6" no-padding> <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()'> (click)='dismiss()'>
{{ 'general,update-now' | translate }} {{ 'general,update-now' | translate }}
</ion-button> </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() { ngOnInit() {
this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info')); this.userInfo = JSON.parse(localStorage.getItem('bussiness-card-info'));
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
console.log(this.userInfo);
this.authService this.authService
.loadAuthenticatedUser() .loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => { .subscribe((user: AuthenticatedUser) => {
console.log(user);
if (user) { if (user) {
let jobTitle = user.POSITION_NAME.split('.'); let jobTitle = user.POSITION_NAME.split('.');
if (jobTitle && jobTitle.length > 1) { if (jobTitle && jobTitle.length > 1) {

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

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

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

@ -2,12 +2,8 @@
height: 25vh; height: 25vh;
} }
.rowOutside{
// margin-top: -37px;
} .button-digital-id {
.button-digital-id{
--background: white !important; --background: white !important;
background: white !important; background: white !important;
white-space: normal; white-space: normal;
@ -22,16 +18,21 @@
} }
.digital-id-en{ .digital-id-en {
color: black; color: black;
position: absolute; position: absolute;
right: 20px; right: 20px;
width: 10%; width: 10%;
} }
.digital-id-ar{ .digital-id-ar {
color: black; color: black;
position: absolute; position: absolute;
left: 20px; left: 20px;
width: 10%; 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 { LoginModel } from '../models/LoginModel';
import * as moment from 'moment'; import * as moment from 'moment';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response'; 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 { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component'; import { AppUpdateComponent } from '../app-update/app-update.component';
import { Password } from '../models/password'; import { Password } from '../models/password';
@ -69,7 +69,7 @@ export class ConfirmLoginComponent implements OnInit {
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public alertController: AlertController, public alertController: AlertController,
private nfc: NFC, // private nfc: NFC,
private smsRetriever: SmsRetriever private smsRetriever: SmsRetriever
) { ) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -140,17 +140,17 @@ export class ConfirmLoginComponent implements OnInit {
pClass: 'pClassMyFileIconBlack', pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon', class: 'nationalIdIcon',
}, },
{ // {
title: 'login,verify-with-whatsapp', // title: 'login,verify-with-whatsapp',
url: null, // url: null,
icon: 'assets/icon/login/104.png', // icon: 'assets/icon/login/104.png',
settings: new ButtonSettings(true, true, true, true), // settings: new ButtonSettings(true, true, true, true),
value: 4, // value: 4,
visible: false, // visible: true,
buttonClass: 'buttonClassWhite', // buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack', // pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon', // class: 'nationalIdIcon',
}, // },
{ {
title: 'login,verify-with-sms', title: 'login,verify-with-sms',
url: null, url: null,
@ -307,7 +307,7 @@ export class ConfirmLoginComponent implements OnInit {
private presentBiometricDialog() { private presentBiometricDialog() {
this.faio.show({ this.faio.show({
title: 'Biometric Authetnciation', // (Android Only) | optional | Default: "<APP_NAME> Biometric Sign On" 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 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". fallbackButtonTitle: this.ts.trPK('general', 'use-pin'), // optional | When disableBackup is false defaults to "Use Pin".
disableBackup: true, // optional | default: false disableBackup: true, // optional | default: false
@ -353,20 +353,20 @@ export class ConfirmLoginComponent implements OnInit {
} }
async checkNFCStatus() { 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;
} // }
} // }
} }
public checkSMS() { public checkSMS() {
@ -380,6 +380,7 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok')) this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok'))
.subscribe((result: SMSCheckResponse) => { .subscribe((result: SMSCheckResponse) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
// this.cs.sharedService.setSharedData(result.MemberLoginList.P_ORACLE_USER_NAME, 'oracle-user-name');
this.businessInfo = { this.businessInfo = {
show_business: result.BusinessCardPrivilege, show_business: result.BusinessCardPrivilege,
name_en: result.MemberInformationList[0].EMPLOYEE_NAME_En, name_en: result.MemberInformationList[0].EMPLOYEE_NAME_En,
@ -439,7 +440,7 @@ export class ConfirmLoginComponent implements OnInit {
const request = new LoginRequest(); const request = new LoginRequest();
request.P_USER_NAME = this.username; request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language; request.P_LANGUAGE = 'US'; // this.language;
request.P_PASSWORD = this.password; request.P_PASSWORD = localStorage.getItem('password');
this.authService this.authService
.login(request, () => { .login(request, () => {
console.log('error here'); console.log('error here');
@ -514,11 +515,12 @@ export class ConfirmLoginComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => { }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
this.checkUserResult = result; this.checkUserResult = result;
console.log('2');
console.log(result); console.log(result);
this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username; this.loginData.P_USER_NAME = this.username;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);

@ -1,6 +1,6 @@
.button-login{ .button-login{
--background: #34b9c1 !important; --background: #c1272d !important;
background: #34b9c1 !important; background: #c1272d !important;
white-space: normal; white-space: normal;
color: var(--light); color: var(--light);
text-transform: capitalize; text-transform: capitalize;
@ -14,17 +14,17 @@
@media only screen and (max-device-height: 640px) { @media only screen and (max-device-height: 640px) {
.digital-id-image-size{ .digital-id-image-size{
width: 90% !important; width: 70% !important;
height: 160% !important; height: 160% !important;
bottom: 0% !important; bottom: 0% !important;
position: absolute !important; position: absolute !important;
border: 1px solid #e6e6e6 !important; border: 1px solid #e6e6e6 !important;
border-radius: 70px !important; border-radius: 20px !important;
} }
} }
.digital-id-image-size{ .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); console.log(this.userInfo);
if (this.userInfo) { if (this.userInfo) {
// let jobTitle = this.userInfo.POSITION_NAME.split('.'); let jobTitle = this.userInfo.POSITION_NAME.split('.');
this.userJobName = this.userInfo.JOB_NAME; if (jobTitle && jobTitle.length > 1) {
// if (jobTitle && jobTitle.length > 1) { this.userJobName = jobTitle[0] + " " + jobTitle[1];
// this.userJobName = jobTitle[0] + " " + jobTitle[1]; }
// }
} }
} }

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

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

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

@ -1,15 +1,21 @@
.signupDiv { .signupDiv {
font-size: 14px; font-size: 14px;
} }
.customGrid { .customGrid {
margin-bottom: 20px; margin-bottom: 20px;
} }
.gridBtn.active{
background:var(--customnavy) !important; .gridBtn.active {
color:var(--light) !important; background: var(--customnavy) !important;
color: var(--light) !important;
} }
.gridDiv{direction: rtl}
.gridDiv {
direction: rtl
}
.pageTitle { .pageTitle {
color: var(--dark); color: var(--dark);
font-size: 23px; font-size: 23px;
@ -17,6 +23,7 @@
text-align: center; text-align: center;
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
font-weight: bold;
} }
.TxtPlace { .TxtPlace {
@ -42,15 +49,14 @@ img.centerDiv {
min-width: 20px; min-width: 20px;
min-height: 20px; min-height: 20px;
display: block; display: block;
margin-top: 30px;
background: var(--light); background: var(--light);
} }
.gridDiv { .gridDiv {
width: 100%; width: 100%;
height: 40px; height: 40px;
margin-top: 20px; padding: 10px 15px;
// margin-bottom: 10px;
font-size: 14px; font-size: 14px;
:root[dir="ltr"] { :root[dir="ltr"] {
@ -92,10 +98,12 @@ img.centerDiv {
} }
button.arTxt { button.arTxt {
font-family: var(--fontFamilyIOSAR) !important;
:root[dir="rtl"] { :root[dir="rtl"] {
float: right; float: right;
color: var(--customnavy) !important; color: var(--customnavy) !important;
font-family: var(--fontFamilyIOSAR) !important;
font-weight: bold; font-weight: bold;
border-radius: 2px 0px 0px 2px !important; border-radius: 2px 0px 0px 2px !important;
} }
@ -107,42 +115,44 @@ img.centerDiv {
border-radius: 0px 2px 2px 0px !important; border-radius: 0px 2px 2px 0px !important;
} }
} }
} }
.login-input { .login-input {
border: none; border: none;
margin-right: 5px;
font-family: 'Kufi';
} }
.item-input{ .item-input {
--min-height: 1.0cm !important; --min-height: 1.5cm !important;
--border-radius: 12px; --border-radius: 12px;
--ion-color-base: white !important; --ion-color-base: white !important;
// --background: color: var(--darkgray) !important; // --background: color: var(--darkgray) !important;
// background: #7f8c8d !important; // background: #7f8c8d !important;
border-radius: 33px; border-radius: 33px;
--border: solid #9999992b !important; --border: solid #9999992b !important;
border: solid #9999992b !important; border: solid #9999992b !important;
margin-bottom :12px; margin-bottom: 12px;
margin-left: 12px; margin-left: 12px;
margin-right: 12px; margin-right: 12px;
} }
.button-login{ .button-login {
--background: var(--newgreen) !important; --background: var(--newgreen) !important;
background: var(--newgreen) !important; background: var(--newgreen) !important;
white-space: normal; white-space: normal;
color: var(--light); color: var(--light);
text-transform: capitalize; text-transform: capitalize;
min-height: 1.0cm; min-height: 1.3cm;
--border-radius: 33px !important; --border-radius: 33px !important;
border-radius: 33px !important; border-radius: 33px !important;
--min-height: 1.6cm !important; --min-height: 1.6cm !important;
width: 315px; width: 315px;
} }
.button-digital-id{ .button-digital-id {
--background: white !important; --background: white !important;
background: white !important; background: white !important;
white-space: normal; white-space: normal;
@ -158,28 +168,31 @@ img.centerDiv {
.content { .content {
width: 500px; width: 500px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.first-circle { .first-circle {
background: var(--newgreen) !important; background: #29B5BF !important;
border-radius: 50%; border-radius: 50%;
height: 292px; height: 310px;
width: 288px; width: 310px;
float: left; float: left;
margin-left: -55px; margin-left: -55px;
margin-top: -140px; margin-top: -140px;
} }
.middle-circle { .middle-circle {
position: relative; position: relative;
background:#6d6e71 !important; background: #6d6e71 !important;
border-radius: 50%; border-radius: 50%;
height: 160px; height: 160px;
width: 170px; width: 190px;
margin: -115px 0px 0px 179px; margin: -115px 0px 0px 179px;
} }
.last-circle { .last-circle {
position: inherit; position: inherit;
background: #c2a16b !important; background: #c2a16b !important;
@ -192,10 +205,9 @@ img.centerDiv {
.logoFotor { .logoFotor {
width: 45px !important; width: 45px !important;
height: 45px !important; height: 45px !important;
} }
.welcomeText{ .welcomeText {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: left; text-align: left;
@ -206,56 +218,110 @@ img.centerDiv {
margin-left: 48px; margin-left: 48px;
} }
.forgetText{ .forgetText {
background: transparent; background: transparent;
color: var(--darkblue) !important; color: var(--darkblue) !important;
} }
@media only screen and (max-width: 980px) { @media only screen and (max-width: 980px) {
.content{width:100%;} .content {
width: 100%;
}
} }
.circle1{ .circle1 {
width: 15%; width: 15%;
padding-top: 15%; padding-top: 15%;
margin:0 42%; margin: 0 42%;
background-color: black; background-color: black;
border-radius: 50%; border-radius: 50%;
display:inline-block; display: inline-block;
} }
.circle2{
.circle2 {
width: 15%; width: 15%;
padding-top: 15%; padding-top: 15%;
margin-left: 20%; margin-left: 20%;
background-color:darkred; background-color: darkred;
border-radius: 50%; border-radius: 50%;
display:inline-block; display: inline-block;
margin-top:20px; margin-top: 20px;
} }
.circle3{
width: 15%; .circle3 {
width: 15%;
padding-top: 15%; padding-top: 15%;
margin-left: 26%; margin-left: 26%;
background-color:gold; background-color: gold;
border-radius: 50%; border-radius: 50%;
display:inline-block; display: inline-block;
margin-top:20px; margin-top: 20px;
margin-right: 15%; margin-right: 15%;
} }
.digital-id-en{ .digital-id-en {
color: black; color: black;
position: absolute; position: absolute;
right: 20px; right: 20px;
width: 10%; width: 10%;
} }
.digital-id-ar{ .digital-id-ar {
color: black; color: black;
position: absolute; position: absolute;
left: 20px; left: 20px;
width: 10%; 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 { Component, OnInit, NgZone, OnDestroy } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.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 { AlertController, Platform, Events } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response'; import { 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 { DigitalIdComponent } from '../digital-id/digital-id.component';
import { AppUpdateComponent } from '../app-update/app-update.component'; import { AppUpdateComponent } from '../app-update/app-update.component';
@Component({ @Component({
selector: 'login', selector: 'login',
templateUrl: './login.component.html', templateUrl: './login.component.html',
@ -30,6 +31,8 @@ import { AppUpdateComponent } from '../app-update/app-update.component';
export class LoginComponent implements OnInit, OnDestroy { export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any; deviceToken1: any;
userInfo: any; userInfo: any;
companyDesc = '';
constructor( constructor(
public cs: CommonService, public cs: CommonService,
@ -47,7 +50,9 @@ export class LoginComponent implements OnInit, OnDestroy {
public plt: Platform, public plt: Platform,
public pushService: PushService, public pushService: PushService,
public keyboardService: KeyboardService, public keyboardService: KeyboardService,
public modalController: ModalController public modalController: ModalController,
public route:ActivatedRoute,
) { ) {
this.events.subscribe('logoutFlage', logoutFlage => { this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage); console.log('login compont logoutFlage: ' + logoutFlage);
@ -68,6 +73,13 @@ export class LoginComponent implements OnInit, OnDestroy {
} else { } else {
this.user = false; this.user = false;
} }
// this.route
//.params.subscribe(val => {
console.log("login page called init...")
} }
appLang = 1; appLang = 1;
@ -103,19 +115,25 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserResult: CheckUserAuthenticationResponse; private checkUserResult: CheckUserAuthenticationResponse;
public inputType = "password"; public inputType = "password";
ngOnInit() { ngOnInit() {
this.monitorKeyboardChange(); this.monitorKeyboardChange();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser')); this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.currentLang = TranslatorService.getCurrentLanguageCode();
console.log("login page called...");
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = "US"; var previousLanguage= localStorage.getItem(TranslatorService.LNG_KEY);
this.changeLanguage('2') if(previousLanguage){
} else { this.currentLang = previousLanguage =='en' ? 2 : 1;
this.language = "AR"; }else{
this.changeLanguage('1') document.getElementById('lang').lang = 'en';
} TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
this.currentLang =2;
};
this.events.subscribe('user', user => { this.user = user; }); this.events.subscribe('user', user => { this.user = user; });
this.deviceToken = this.cs.getDeviceToken(); this.deviceToken = this.cs.getDeviceToken();
if (this.deviceToken) { if (this.deviceToken) {
@ -139,6 +157,12 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backClicked(); this.backClicked();
} }
start() {
this.cs.startLoading();
}
ngAfterViewInit(){
}
public changeLanguage(langNumber) { public changeLanguage(langNumber) {
console.log("current lang: " + this.currentLang) console.log("current lang: " + this.currentLang)
console.log("click lang: " + langNumber) console.log("click lang: " + langNumber)
@ -154,8 +178,10 @@ export class LoginComponent implements OnInit, OnDestroy {
this.language = 'AR'; this.language = 'AR';
} }
this.currentLang = TranslatorService.getCurrentLanguageCode(); this.currentLang = TranslatorService.getCurrentLanguageCode();
} }
this.currentLang = langNumber; this.currentLang = langNumber;
document.getElementById('lang').lang = this.currentLang == 1 ? 'ar' : 'en';
} }
public forgetPasswordPage() { public forgetPasswordPage() {
@ -338,6 +364,14 @@ export class LoginComponent implements OnInit, OnDestroy {
if (anotherUser) { if (anotherUser) {
this.username = ''; this.username = '';
this.password = ''; 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 emit');
console.log('login'); console.log('login');
@ -348,6 +382,14 @@ export class LoginComponent implements OnInit, OnDestroy {
loginWithUser() { loginWithUser() {
console.log('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(); this.cs.openConfirmLoginPage();
} }
@ -390,19 +432,19 @@ export class LoginComponent implements OnInit, OnDestroy {
return await modal.present(); return await modal.present();
} }
showPassword(){ showPassword() {
this.inputType = 'password'; this.inputType = 'password';
} }
hidePassword(){ hidePassword() {
this.inputType = 'text'; this.inputType = 'text';
} }
async appUpdate(msg, result) { async appUpdate(msg, result) {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: AppUpdateComponent, component: AppUpdateComponent,
cssClass: 'app-update-modal-css', cssClass: 'app-update-modal-css',
componentProps: {'msg':msg} componentProps: { 'msg': msg }
}); });
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
this.handleAppUpdate(result); this.handleAppUpdate(result);

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

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

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

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

@ -177,7 +177,8 @@ export class AddCeiComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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 // }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); // 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, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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"){ // }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); // 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].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.dateInput = new DateInput( this.dateInput = new DateInput(
@ -225,7 +228,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date // else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -251,7 +255,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.datetimeInput = new DateTimeInput( this.datetimeInput = new DateTimeInput(
@ -262,7 +267,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
const elem = document.getElementById( const elem = document.getElementById(
@ -297,7 +303,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.timeInput = new TimeInput( this.timeInput = new TimeInput(
@ -308,7 +315,8 @@ export class AddCeiComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
} }
@ -322,7 +330,8 @@ export class AddCeiComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
// dropdown list missing open in differnt page // dropdown list missing open in differnt page
@ -335,7 +344,8 @@ export class AddCeiComponent implements OnInit {
containerId, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
// }else{ // }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED); // 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-height: 45px !important;
min-width: 5px !important; min-width: 5px !important;
margin: 8px !important; margin: 8px !important;
background-color: #29B5BF; background-color: #44A7A1;
width: 80% !important; width: 80% !important;
color: white!important; color: white!important;
border-radius: 16px !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 { MenuEntry } from "src/app/hmg-common/services/menu/models/menu.entry";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response"; import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { EitRequest } from "../models/eit.request"; 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 { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { EITTransactionsRequest } from "../models/EITTransactionsReq"; import { EITTransactionsRequest } from "../models/EITTransactionsReq";
import { EitService } from "../services/eit.service"; import { EitService } from "../services/eit.service";
@ -73,7 +73,8 @@ export class AddEitComponent implements OnInit {
public cs: CommonService, public cs: CommonService,
private ts: TranslatorService, private ts: TranslatorService,
private eitService: EitService, private eitService: EitService,
public datePicker: DatePicker public datePicker: DatePicker,
public platform: Platform
) { ) {
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
this.selEmp = this.cs.sharedService.getSharedData( this.selEmp = this.cs.sharedService.getSharedData(
@ -122,6 +123,10 @@ export class AddEitComponent implements OnInit {
EITTransactionsRequest.SUBMIT_EIT_ACTION EITTransactionsRequest.SUBMIT_EIT_ACTION
); );
} }
// window.addEventListener('keyboardDidShow', () => {
// document.activeElement.scrollIntoView(false);
// });
} }
ngOnInit() {} ngOnInit() {}
@ -181,7 +186,8 @@ export class AddEitComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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 // }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); // 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, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, 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"){ // }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); // 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].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.dateInput = new DateInput( this.dateInput = new DateInput(
@ -229,7 +237,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP,
); );
} }
// else if(feildsList[i].DEFAULT_TYPE=="D"){//current date // else if(feildsList[i].DEFAULT_TYPE=="D"){//current date
@ -255,7 +264,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.datetimeInput = new DateTimeInput( this.datetimeInput = new DateTimeInput(
@ -266,7 +276,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
const elem = document.getElementById( const elem = document.getElementById(
@ -301,7 +312,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
this.timeInput = new TimeInput( this.timeInput = new TimeInput(
@ -312,7 +324,8 @@ export class AddEitComponent implements OnInit {
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG, feildsList[i].REQUIRED_FLAG,
this.direction this.direction,
feildsList[i].REQ_COL_TIP
); );
} }
} }
@ -326,7 +339,8 @@ export class AddEitComponent implements OnInit {
defaultValText, defaultValText,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
} else { } else {
// dropdown list missing open in differnt page // dropdown list missing open in differnt page
@ -339,7 +353,8 @@ export class AddEitComponent implements OnInit {
containerId, containerId,
feildsList[i].MOBILE_ENABLED, feildsList[i].MOBILE_ENABLED,
feildsList[i].DISPLAY_FLAG, feildsList[i].DISPLAY_FLAG,
feildsList[i].REQUIRED_FLAG feildsList[i].REQUIRED_FLAG,
feildsList[i].REQ_COL_TIP
); );
// }else{ // }else{
// this.selectInput = new SelectInput(feildsList[i].SEGMENT_PROMPT,feildsList[i].APPLICATION_COLUMN_NAME,"",containerId,feildsList[i].MOBILE_ENABLED); // 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) { if (this.validateEitObj && this.validateEitObj.length > 0) {
this.fillEITStructure(); this.fillEITStructure();
} }
this.bindToolTip();
} }
addFieldToDOM( addFieldToDOM(
@ -520,17 +537,33 @@ export class AddEitComponent implements OnInit {
option.value = optionList[i].ID_COLUMN_NAME; option.value = optionList[i].ID_COLUMN_NAME;
select.add(option); select.add(option);
} }
if (select.dataset.hiddenval) { if (select.dataset.hiddenval) {
select.value = select.dataset.hiddenval; select.value = select.dataset.hiddenval;
//select.dataset.hiddenval=""; //select.dataset.hiddenval="";
} else { } 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; 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) { bindHtmlElemEvents(id, obj) {
const isIOS = this.platform.is('ios');
const elem = document.getElementById(id); const elem = document.getElementById(id);
console.log(elem); console.log(elem);
console.log(obj); console.log(obj);
@ -540,6 +573,18 @@ export class AddEitComponent implements OnInit {
if (elemType == "SELECT") changeEvent = "change"; if (elemType == "SELECT") changeEvent = "change";
try { 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("change", (e) => {
elem.addEventListener(changeEvent, e => { elem.addEventListener(changeEvent, e => {
//console.log("elem change "+elem.id); //console.log("elem change "+elem.id);
@ -548,6 +593,13 @@ export class AddEitComponent implements OnInit {
// if(!x.value) // if(!x.value)
// isEmpty=true; // isEmpty=true;
//emptyChildElement //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"); elem.classList.remove("requiredClassElm");
if ( if (
obj.CHILD_SEGMENTS_VS_Splited && obj.CHILD_SEGMENTS_VS_Splited &&
@ -704,7 +756,8 @@ export class AddEitComponent implements OnInit {
}else{ }else{
// console.log("else - " + elem.value); // console.log("else - " + elem.value);
elem.value = val; elem.value = val;
elem.innerText = text; // elem.innerText = text;
elem.setAttribute("value", val); elem.setAttribute("value", val);
// console.log("else - " + elem.value); // console.log("else - " + elem.value);
} }
@ -869,7 +922,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME, SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: val, VALUE_COLUMN_NAME: val,
DESCRIPTION: "", DESCRIPTION: "",
ID_COLUMN_NAME: idColName, ID_COLUMN_NAME: idColName ? idColName: '',
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
}); });
break; break;
@ -899,7 +952,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME, SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: text, VALUE_COLUMN_NAME: text,
DESCRIPTION: "", DESCRIPTION: "",
ID_COLUMN_NAME: val, ID_COLUMN_NAME: val ? val : '' ,
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
}); });
break; break;
@ -924,7 +977,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME, SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: text, VALUE_COLUMN_NAME: text,
DESCRIPTION: "", DESCRIPTION: "",
ID_COLUMN_NAME: val, ID_COLUMN_NAME: val ? val : '',
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
}); });
break; break;
@ -936,6 +989,13 @@ export class AddEitComponent implements OnInit {
) as HTMLInputElement; ) as HTMLInputElement;
let text = x.value; let text = x.value;
let val = x.dataset.colmText; 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 ( if (
(val == undefined || val == "") && (val == undefined || val == "") &&
parentsList[i].IsRequired == "REQUIRED" parentsList[i].IsRequired == "REQUIRED"
@ -951,7 +1011,7 @@ export class AddEitComponent implements OnInit {
SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME, SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME,
VALUE_COLUMN_NAME: text, VALUE_COLUMN_NAME: text,
DESCRIPTION: "", DESCRIPTION: "",
ID_COLUMN_NAME: val, ID_COLUMN_NAME: val ? val: '',
FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME
}); });
break; break;
@ -965,7 +1025,8 @@ export class AddEitComponent implements OnInit {
emptyChildElement(segmentName) { emptyChildElement(segmentName) {
let elem = this.getElementByName(segmentName); let elem = this.getElementByName(segmentName);
elem.value = null; elem.value = null;
elem.innerHTML = ""; // elem.innerHTML = "";
if ("dtvalue" in elem.dataset) { if ("dtvalue" in elem.dataset) {
elem.dataset.dtvalue = ""; elem.dataset.dtvalue = "";
} }
@ -1229,6 +1290,7 @@ export class AddEitComponent implements OnInit {
} }
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !elemVal) {
elem.classList.add("requiredClassElm"); elem.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();
return false; return false;
} else { } else {
@ -1267,6 +1329,7 @@ export class AddEitComponent implements OnInit {
} }
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) {
x.classList.add("requiredClassElm"); x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();
return false; return false;
} else { } else {
@ -1287,8 +1350,18 @@ export class AddEitComponent implements OnInit {
) as HTMLSelectElement; ) as HTMLSelectElement;
let val = x.dataset.colmText; let val = x.dataset.colmText;
textValue = x.value; 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) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
x.classList.add("requiredClassElm"); x.classList.add("requiredClassElm");
this.cs.redToastPK("eit", "required-text");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();
return false; return false;
} else { } else {

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

@ -22,7 +22,7 @@
<div *ngFor="let item of EITTransactionList.Collection_Transaction"> <div *ngFor="let item of EITTransactionList.Collection_Transaction">
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class=""> <ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''"> <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> <br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label> <label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br> <br>

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

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

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

@ -1,9 +1,14 @@
<ion-header> <!-- <ion-header>
<ion-toolbar class="header-toolbar-new"> <ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons> <nav-buttons></nav-buttons>
<ion-title [ngClass]=" direction === 'en' ? 'title' : 'title-ar'" color="light">{{headerTitle}}</ion-title> <ion-title [ngClass]=" direction === 'en' ? 'title' : 'title-ar'" color="light">{{headerTitle}}</ion-title>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header> -->
<app-generic-header
[showBack]="true"
[headerText]="headerTitle">
</app-generic-header>
<ion-content> <ion-content>
@ -11,10 +16,14 @@
<ion-grid> <ion-grid>
<ion-row style="margin-top: 20px;margin-left: 12px;"> <ion-row style="margin-top: 20px;margin-left: 12px;">
<ion-col> <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>
<ion-col style="padding-left: 7%;" size="2"> <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" <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)" /> (change)="onFileSelected($event)" (click)="onFileSelectedclick($event)" />
<label end for="file" class="attachLable"> <label end for="file" class="attachLable">
@ -261,7 +270,7 @@
<ion-footer> <ion-footer>
<div class="centerDiv"> <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> {{ (isDelete ? 'general, delete' : 'general, submit') | translate }}</ion-button>
</div> </div>
</ion-footer> </ion-footer>

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

@ -181,6 +181,9 @@
</ion-row> </ion-row>
<h4> {{'general, noData' | translate}}</h4> <h4> {{'general, noData' | translate}}</h4>
</div> </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> --> <!-- <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 *ngIf="getResEITTransactionList && getResEITTransactionList[0]?.Collection_Transaction.length > 0 ">
<!-- <div> --> <!-- <div> -->
@ -200,17 +203,20 @@
<ion-grid> <ion-grid>
<div> <!-- <div>
<!-- <ion-row> <ion-row>
<ion-col class="colBold"> <ion-col class="colBold">
<label for="">status</label> <label for="">status</label>
</ion-col> </ion-col>
<ion-col> <ion-col>
<label for="">{{EITTransactionList.status}}</label> <label for="">{{EITTransactionList.status}}</label>
</ion-col> </ion-col>
</ion-row> --> </ion-row>
</div> </div> -->
<ion-grid class="grids"> <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"> <div *ngFor="let item of EITTransactionList.Collection_Transaction">
<!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' "> <!-- <ion-row *ngIf="item.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold"> <ion-col class="colBold">
@ -246,7 +252,7 @@
</ion-infinite-scroll> </ion-infinite-scroll>
</div> </div>
</ion-content> </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> <!-- <ion-footer>
<div class="centerDiv"> --> <div class="centerDiv"> -->

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

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

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

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

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

@ -1,9 +1,9 @@
import { Injectable } from "@angular/core"; 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 { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.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"; import { Platform } from "@ionic/angular";
declare const cordova: any; declare const cordova: any;
@ -13,10 +13,10 @@ declare const cordova: any;
}) })
export class HMGUtils { export class HMGUtils {
constructor( constructor(
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
private geolocation: Geolocation, // private geolocation: Geolocation,
public platform: Platform, public platform: Platform,
public devicePermissionsService:DevicePermissionsService, public devicePermissionsService:DevicePermissionsService,
) { } ) { }
@ -26,11 +26,11 @@ export class HMGUtils {
this.devicePermissionsService.requestLocationAutherization().then( async granted => { this.devicePermissionsService.requestLocationAutherization().then( async granted => {
if(granted == true) { if(granted == true) {
if (this.platform.is('android')) { if (this.platform.is('android')) {
// if ((await this.isHuaweiDevice())) { if ((await this.isHuaweiDevice())) {
// this.getHMSLocation(callBack); this.getHMSLocation(callBack);
// } else { } else {
this.getGMSLocation(callBack); this.getGMSLocation(callBack);
// } }
} else { } else {
this.getIOSLocation(callBack); this.getIOSLocation(callBack);
} }
@ -42,88 +42,88 @@ export class HMGUtils {
} }
// async isHuaweiDevice(): Promise<boolean> { async isHuaweiDevice(): Promise<boolean> {
// const result: any = await new Promise((resolve, reject) => { const result: any = await new Promise((resolve, reject) => {
// cordova.plugins.CordovaHMSGMSCheckPlugin.isHmsAvailable( cordova.plugins.CordovaHMSGMSCheckPlugin.isHmsAvailable(
// "index.js", "index.js",
// (_res) => { (_res) => {
// const hmsAvailable = _res === "true"; const hmsAvailable = _res === "true";
// resolve(hmsAvailable); resolve(hmsAvailable);
// }, },
// (_err) => { (_err) => {
// reject({ "status": false, "error": JSON.stringify(_err) }); reject({ "status": false, "error": JSON.stringify(_err) });
// this.common.presentAlert(this.ts.trPK('general', 'huawei-hms-gms-error')); this.common.presentAlert(this.ts.trPK('general', 'huawei-hms-gms-error'));
// } }
// ); );
// }); });
// return result; return result;
// } }
// private getHMSLocation(callBack: Function) { private getHMSLocation(callBack: Function) {
// try { try {
// cordova.plugins.CordovaHMSLocationPlugin.requestLocation( cordova.plugins.CordovaHMSLocationPlugin.requestLocation(
// "index.js", "index.js",
// (_res) => { (_res) => {
// console.log("Huawei Location Success: [Stop Getting]"); console.log("Huawei Location Success: [Stop Getting]");
// cordova.plugins.CordovaHMSLocationPlugin.removeLocation("", (_res) => { }, (_err) => { }); cordova.plugins.CordovaHMSLocationPlugin.removeLocation("", (_res) => { }, (_err) => { });
// const location = _res.split(',') const location = _res.split(',')
// console.log(location); console.log(location);
// if (location.length == 3) { if (location.length == 3) {
// let mock = false; let mock = false;
// const lat = Number(_res.split(',')[0]); const lat = Number(_res.split(',')[0]);
// const long = Number(_res.split(',')[1]); const long = Number(_res.split(',')[1]);
// const mockValue = _res.split(',')[2]; const mockValue = _res.split(',')[2];
// // if (mockValue == 'true') { // if (mockValue == 'true') {
// // mock = true; // mock = true;
// // } else { // } else {
// // mock = false; // mock = false;
// // } // }
// callBack({"latitude":lat, "longitude":long, "isfake":mock}) callBack({"latitude":lat, "longitude":long, "isfake":mock})
// } else { } else {
// this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location')); this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location'));
// } }
// }, },
// (_err) => { (_err) => {
// console.log("Huawei Location [Getting Error]: " + JSON.stringify(_err)); console.log("Huawei Location [Getting Error]: " + JSON.stringify(_err));
// this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location')); this.common.presentAlert(this.ts.trPK('general', 'invalid-huawei-location'));
// } }
// ); );
// } catch (_err) { } catch (_err) {
// console.log("Huawei Location Plugin [Error]: " + + JSON.stringify(_err)); console.log("Huawei Location Plugin [Error]: " + + JSON.stringify(_err));
// this.common.presentAlert(this.ts.trPK('general', 'huawei-plugin-issue')); this.common.presentAlert(this.ts.trPK('general', 'huawei-plugin-issue'));
// } }
// } }
private getGMSLocation(callBack: Function) { private getGMSLocation(callBack: Function) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) { // if (resp && (resp.latitude && resp.longitude)) {
const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled; // const isFakeLocation = resp.isFromMockProvider || resp.mockLocationsEnabled;
const lat = resp.latitude; // const lat = resp.latitude;
const long = resp.longitude; // const long = resp.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation}) // callBack({"latitude":lat, "longitude":long, "isfake":isFakeLocation})
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}, (error) => { // }, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }
private getIOSLocation(callBack: Function) { private getIOSLocation(callBack: Function) {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) { // if (resp && resp.coords.latitude && resp.coords.longitude) {
const lat = resp.coords.latitude; // const lat = resp.coords.latitude;
const long = resp.coords.longitude; // const long = resp.coords.longitude;
callBack({"latitude":lat, "longitude":long, "isfake":false}) // callBack({"latitude":lat, "longitude":long, "isfake":false})
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}).catch(error => { // }).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-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 { DevicePermissionsService } from '../device-permissions/device-permissions.service';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { SharedDataService } from '../shared-data-service/shared-data.service'; 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 { AttendanceService } from 'src/app/home/services/attendance.services';
import { ZBar } from '@ionic-native/zbar/ngx'; // import { ZBar } from '@ionic-native/zbar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request';
import { AuthenticatedUser } from '../authentication/models/authenticated-user'; import { AuthenticatedUser } from '../authentication/models/authenticated-user';
import { CommonService } from '../common/common.service'; 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 { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service'; import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service';
import { Device } from '@ionic-native/device/ngx'; 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 { Platform } from '@ionic/angular';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
@ -37,17 +37,17 @@ export class AttendScanService {
public collection = 'CS'; public collection = 'CS';
constructor(private device: Device, constructor(private device: Device,
private zbar: ZBar, // private zbar: ZBar,
private geolocation: Geolocation, // private geolocation: Geolocation,
private attendance_service: AttendanceService, private attendance_service: AttendanceService,
private barcodeScanner: BarcodeScanner, // private barcodeScanner: BarcodeScanner,
private cameraController: Camera, private cameraController: Camera,
public sharedData: SharedDataService, public sharedData: SharedDataService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
private permissions: DevicePermissionsService, private permissions: DevicePermissionsService,
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public platform: Platform, public platform: Platform,
public modalController: ModalController, public modalController: ModalController,
public firebasex: FirebaseX, public firebasex: FirebaseX,
@ -135,22 +135,22 @@ export class AttendScanService {
} }
scanCode() { scanCode() {
this.barcodeScanner // this.barcodeScanner
.scan() // .scan()
.then(barcodeData => { // .then(barcodeData => {
if (!barcodeData.cancelled) { // if (!barcodeData.cancelled) {
this.scannedResult = barcodeData; // this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; // this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) { // if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance(); // this.fakeSwipeAttendance();
} else { // } else {
this.swipeAttendance(); // this.swipeAttendance();
} // }
} // }
}) // })
.catch(err => { // .catch(err => {
console.log('Error', err); // console.log('Error', err);
}); // });
} }
fakeSwipeAttendance() { fakeSwipeAttendance() {

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

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

@ -13,7 +13,7 @@ import { AlertControllerService } from '../../ui/alert/alert-controller.service'
//import { Response } from "../models/response"; //import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response'; import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from '@angular/common'; 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 { BrowserConfig } from './models/browser-config';
import { import {
LaunchNavigator, LaunchNavigator,
@ -26,7 +26,7 @@ import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx'; import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service'; import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx'; 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({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -85,7 +85,8 @@ export class CommonService {
'POAPPRV': 0, 'POAPPRV': 0,
'INVITEM': 0, 'INVITEM': 0,
"STAMP": 0, "STAMP": 0,
'ITG': 0 'ITG': 0,
'COC': 0
} }
private progressLoaders: any[] = []; private progressLoaders: any[] = [];
@ -104,7 +105,7 @@ export class CommonService {
public toastController: ToastController, public toastController: ToastController,
public alertController: AlertControllerService, public alertController: AlertControllerService,
public alertControllerIonic: AlertController, public alertControllerIonic: AlertController,
public themeableBrowser: ThemeableBrowser, // public themeableBrowser: ThemeableBrowser,
public launchNavigation: LaunchNavigator, public launchNavigation: LaunchNavigator,
public platform: Platform, public platform: Platform,
public device: Device, public device: Device,
@ -112,7 +113,7 @@ export class CommonService {
public badge: Badge, public badge: Badge,
public lifeCycle: LifeCycleService, public lifeCycle: LifeCycleService,
public diagnostic: Diagnostic, public diagnostic: Diagnostic,
public iab: InAppBrowser, // public iab: InAppBrowser,
private menu: MenuController, private menu: MenuController,
) { } ) { }
@ -242,6 +243,19 @@ export class CommonService {
}); });
toast.present(); 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) { async greenToast(message: string) {
const toast = await this.toastController.create({ const toast = await this.toastController.create({
message: message, message: message,
@ -682,52 +696,52 @@ export class CommonService {
onSuccess?, onSuccess?,
successURLS?: string[] successURLS?: string[]
) { ) {
this.platform.ready().then(() => { // this.platform.ready().then(() => {
const browser = this.iab.create( // const browser = this.iab.create(
url, // url,
'_blank', // '_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no' // 'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
); // );
// browser.executeScript(...); // // browser.executeScript(...);
// browser.insertCSS(...); // // browser.insertCSS(...);
browser.on('loaderror').subscribe(event => { // browser.on('loaderror').subscribe(event => {
if (onFaild) { // if (onFaild) {
onFaild(); // onFaild();
} // }
browser.close(); // browser.close();
}); // });
/* // /*
browser.on('loadstop').subscribe(event => { // browser.on('loadstop').subscribe(event => {
// browser.insertCSS({ code: 'body{color: white;}' }); // // browser.insertCSS({ code: 'body{color: white;}' });
if (onSuccess) { // if (onSuccess) {
onSuccess(); // onSuccess();
} // }
}); // });
*/ // */
browser.on('exit').subscribe(event => { // browser.on('exit').subscribe(event => {
if (onExit) { // if (onExit) {
onExit(); // onExit();
} // }
}); // });
browser.on('loadstart').subscribe(event => { // browser.on('loadstart').subscribe(event => {
if (successURLS) { // if (successURLS) {
successURLS.forEach((successURL, index) => { // successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) { // if (event.url && event.url.indexOf(successURL) >= 0) {
// alert('load start found success url'); // // alert('load start found success url');
browser.close(); // browser.close();
if (onSuccess) { // if (onSuccess) {
onSuccess(); // onSuccess();
} // }
} // }
}); // });
} // }
}); // });
}); // });
} }
public imageFromBase64(base64: string) { public imageFromBase64(base64: string) {
@ -1141,21 +1155,21 @@ export class CommonService {
public openAddEitPage() { public openAddEitPage() {
this.nav.navigateForward(['/eit/add-eit']); this.nav.navigateForward(['/eit/add-eit']);
} }
public openAddSitPage() {
this.nav.navigateForward(['/sit/add-sit']);
}
public openAddCEIPage() { public openAddCEIPage() {
this.nav.navigateForward(['/eit/add-cei']); this.nav.navigateForward(['/eit/add-cei']);
} }
public openAddSitPage() {
this.nav.navigateForward(['/sit/add-sit']);
}
public openConfirmEitPage() { public openConfirmEitPage() {
this.nav.navigateForward(['/eit/confirm-add-eit']); this.nav.navigateForward(['/eit/confirm-add-eit']);
} }
public openConfirmSitPage() {
this.nav.navigateForward(['/sit/confirm-add-sit']);
}
public openConfirmCEIPage() { public openConfirmCEIPage() {
this.nav.navigateForward(['/eit/confirm-cei']); this.nav.navigateForward(['/eit/confirm-cei']);
} }
public openConfirmSitPage() {
this.nav.navigateForward(['/sit/confirm-add-sit']);
}
public openConfirmBasicDetailsPage() { public openConfirmBasicDetailsPage() {
this.nav.navigateForward(['/profile/confirm-basic']); this.nav.navigateForward(['/profile/confirm-basic']);
} }
@ -1199,16 +1213,15 @@ export class CommonService {
public openEITPage() { public openEITPage() {
this.nav.navigateForward(['/eit/homepage']); this.nav.navigateForward(['/eit/homepage']);
} }
public openSITPage() {
this.nav.navigateForward(['/sit/homepage']);
}
public openMyTeamPage() { public openMyTeamPage() {
console.log('someeeeeeee');
this.nav.navigateForward(['/my-team/home']); this.nav.navigateForward(['/my-team/home']);
} }
public openMyTeamDetailPage() { public openMyTeamDetailPage() {
this.nav.navigateForward(['/my-team/details']); this.nav.navigateForward(['/my-team/details']);
} }
public openEmployeeHierarchyPage() {
this.nav.navigateForward(['/my-team/employee-hierarchy']);
}
public openSubordinateLeavePage() { public openSubordinateLeavePage() {
this.nav.navigateForward(['/my-team/subordinate-leave']); this.nav.navigateForward(['/my-team/subordinate-leave']);
} }
@ -1235,6 +1248,19 @@ export class CommonService {
this.alternateNavigate(CommonService.myTeamDetailUrl, 'teamDetail-open', true); this.alternateNavigate(CommonService.myTeamDetailUrl, 'teamDetail-open', true);
// this.nav.navigateForward(["/my-team/details"]); // 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() { public openAbsencePage() {
this.nav.navigateForward(['/absence/home']); this.nav.navigateForward(['/absence/home']);
} }
@ -1352,9 +1378,6 @@ export class CommonService {
public eitUpdate() { public eitUpdate() {
this.nav.navigateForward(['/eit/eit-update-list']); this.nav.navigateForward(['/eit/eit-update-list']);
} }
public sitUpdate() {
this.nav.navigateForward(['/sit/sit-update-list']);
}
public openCEIPage() { public openCEIPage() {
this.nav.navigateForward(['/eit/cei-homepage']); this.nav.navigateForward(['/eit/cei-homepage']);
} }
@ -1364,14 +1387,22 @@ export class CommonService {
public openAnnouncement() { public openAnnouncement() {
this.nav.navigateForward(['/backend-integrations/announcement']); this.nav.navigateForward(['/backend-integrations/announcement']);
} }
public openConcurrentReport() { public openConcurrentReport(value: boolean) {
const navigationExtras: NavigationExtras = {
this.nav.navigateForward(['/reports/concurrent-report']); queryParams: {
fromHome: value
}
};
this.nav.navigateForward(['/reports/concurrent-report'], navigationExtras);
} }
public openConcurrentTransaction() { public openConcurrentTransaction() {
this.nav.navigateForward(['/reports/transaction-list']); this.nav.navigateForward(['/reports/transaction-list']);
} }
public openConcurrentTransactionsHome() {
this.nav.navigateForward(['/reports/transactions']);
}
public openTermination() { public openTermination() {
this.nav.navigateForward(['/termination/termination-form']); this.nav.navigateForward(['/termination/termination-form']);
@ -1598,8 +1629,9 @@ export class CommonService {
public totalCounter = 0; public totalCounter = 0;
getTotalNumberOfWorklistRequest() { getTotalNumberOfWorklistRequest() {
console.log(this.sharedService.getSharedData('total-count', false));
this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false)); this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false));
return this.totalCounter; return this.totalCounter ? this.totalCounter : 0;
} }
setTotalNumberOfWorklistRequest() { setTotalNumberOfWorklistRequest() {
if (this.totalCounter > 0) { if (this.totalCounter > 0) {
@ -1609,10 +1641,14 @@ export class CommonService {
} }
public setFilterValues(data) { public setFilterValues(data) {
for (const notification of data) { if (data.length > 0) {
for (const notification of data) {
this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER this.filterKeys[notification.ITEM_TYPE] = notification.OPEN_NTF_NUMBER
}
} else {
this.filterKeys['HRSSA'] = 0;
} }
} }
@ -1626,51 +1662,111 @@ export class CommonService {
disable: false, disable: false,
total: 0 total: 0
}, },
{ // {
value: 0, // value: 0,
name: 'PR', // name: 'MR',
active: false, // active: false,
color: '#114475', // color: '#3cb9d5',
key: 'REQAPPRV', // key: 'INVMOA',
disable: false, // disable: false,
total: 0 // total: 0
}, // },
{ // {
value: 0, // value: 0,
name: 'PO', // name: 'PR',
active: false, // active: false,
color: '#38c9b3', // color: '#114475',
key: 'POAPPRV', // key: 'REQAPPRV',
disable: false, // disable: false,
total: 0 // 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 = { public data = {
datasets: [ datasets: [
{ {
data: [0, 0, 0, 0, 0], data: [0, 0, 0, 0, 0, 0, 0, 0],
backgroundColor: [ backgroundColor: [
'#18a169', '#18a169',
'#3cb9d5',
'#114475', '#114475',
'#38c9b3' '#38c9b3',
'#cc3232',
'#9e7e97',
'#ff9800',
'#787299'
], ],
borderWidth: 6 borderWidth: 6
}] }]
}; };
getFiltersData() { getFiltersData() {
// for (const notification of openNotificationsArray) {
// if (notification.ITEM_TYPE === 'HRSSA') {
this.filters[0].value = this.filterKeys['HRSSA']; this.filters[0].value = this.filterKeys['HRSSA'];
this.data.datasets[0].data[0] = 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': {} }; let val = { 'filters': [], 'data': {} };
val.filters = this.filters; 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 { export class BrowserConfig {
public static OPTIONS: ThemeableBrowserOptions = { // public static OPTIONS: ThemeableBrowserOptions = {
statusbar: { // statusbar: {
color: '#ffffffff' // color: '#ffffffff'
}, // },
toolbar: { // toolbar: {
height: 44, // height: 44,
color: '#f0f0f0ff' // color: '#f0f0f0ff'
}, // },
title: { // title: {
color: '#003264ff', // color: '#003264ff',
showPageTitle: true // showPageTitle: true
}, // },
backButton: { // backButton: {
image: 'back', // image: 'back',
imagePressed: 'back_pressed', // imagePressed: 'back_pressed',
align: 'left', // align: 'left',
event: 'backPressed' // event: 'backPressed'
}, // },
forwardButton: { // forwardButton: {
image: 'forward', // image: 'forward',
imagePressed: 'forward_pressed', // imagePressed: 'forward_pressed',
align: 'left', // align: 'left',
event: 'forwardPressed' // event: 'forwardPressed'
}, // },
closeButton: { // closeButton: {
image: 'close', // image: 'close',
imagePressed: 'close_pressed', // imagePressed: 'close_pressed',
align: 'left', // align: 'left',
event: 'closePressed' // event: 'closePressed'
}, // },
customButtons: [ // customButtons: [
{ // {
image: 'share', // image: 'share',
imagePressed: 'share_pressed', // imagePressed: 'share_pressed',
align: 'right', // align: 'right',
event: 'sharePressed' // event: 'sharePressed'
} // }
], // ],
menu: { // menu: {
image: 'menu', // image: 'menu',
imagePressed: 'menu_pressed', // imagePressed: 'menu_pressed',
title: 'Test', // title: 'Test',
cancel: 'Cancel', // cancel: 'Cancel',
align: 'right', // align: 'right',
items: [ // items: [
{ // {
event: 'helloPressed', // event: 'helloPressed',
label: 'Hello World!' // label: 'Hello World!'
}, // },
{ // {
event: 'testPressed', // event: 'testPressed',
label: 'Test!' // label: 'Test!'
} // }
] // ]
}, // },
backButtonCanClose: true, // backButtonCanClose: true,
clearcache: true, // clearcache: true,
clearsessioncache: true, // clearsessioncache: true,
disallowoverscroll: 'yes' // disallowoverscroll: 'yes'
}; // };
} }

@ -27,9 +27,12 @@ export class ConnectorService {
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 180 * 1000; public static timeOut = 180 * 1000;
// public static host = 'http://10.10.150.249:1234/'; // public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://erpuat.sfh.med.sa/'; //https://uat.hmgwebservices.com/ // public static host = 'https://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 { 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'; import { Platform } from '@ionic/angular';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class HmgBrowserService { export class HmgBrowserService {
static options: ThemeableBrowserOptions = { // static options: ThemeableBrowserOptions = {
statusbar: { // statusbar: {
color: '#ffffffff' // color: '#ffffffff'
}, // },
toolbar: { // toolbar: {
height: 44, // height: 44,
color: '#f0f0f0ff' // color: '#f0f0f0ff'
}, // },
title: { // title: {
color: '#60686b', // color: '#60686b',
showPageTitle: true // showPageTitle: true
}, // },
backButton: { // backButton: {
image: 'back', // image: 'back',
imagePressed: 'back_pressed', // imagePressed: 'back_pressed',
align: 'left', // align: 'left',
event: 'backPressed' // event: 'backPressed'
}, // },
forwardButton: { // forwardButton: {
image: 'forward', // image: 'forward',
imagePressed: 'forward_pressed', // imagePressed: 'forward_pressed',
align: 'left', // align: 'left',
event: 'forwardPressed' // event: 'forwardPressed'
}, // },
closeButton: { // closeButton: {
image: 'close', // image: 'close',
imagePressed: 'close_pressed', // imagePressed: 'close_pressed',
align: 'left', // align: 'left',
event: 'closePressed' // event: 'closePressed'
}, // },
/* // /*
customButtons: [ // customButtons: [
{ // {
image: 'share', // image: 'share',
imagePressed: 'share_pressed', // imagePressed: 'share_pressed',
align: 'right', // align: 'right',
event: 'sharePressed' // event: 'sharePressed'
} // }
], // ],
menu: { // menu: {
image: 'menu', // image: 'menu',
imagePressed: 'menu_pressed', // imagePressed: 'menu_pressed',
title: 'Test', // title: 'Test',
cancel: 'Cancel', // cancel: 'Cancel',
align: 'right', // align: 'right',
items: [ // items: [
{ // {
event: 'helloPressed', // event: 'helloPressed',
label: 'Hello World!' // label: 'Hello World!'
}, // },
{ // {
event: 'testPressed', // event: 'testPressed',
label: 'Test!' // label: 'Test!'
} // }
] // ]
}, // },
*/ // */
backButtonCanClose: true // backButtonCanClose: true
}; // };
private browser: ThemeableBrowserObject; // private browser: ThemeableBrowserObject;
constructor( constructor(
private themeableBrowser: ThemeableBrowser, // private themeableBrowser: ThemeableBrowser,
private platform: Platform private platform: Platform
) { } ) { }
@ -81,18 +81,18 @@ export class HmgBrowserService {
} }
private registerEvent(eventName: string, event: any) { private registerEvent(eventName: string, event: any) {
if (this.browser) { // if (this.browser) {
this.browser.on(eventName).subscribe((data: any) => { // this.browser.on(eventName).subscribe((data: any) => {
if (event) { // if (event) {
event(); // event();
} // }
}); // });
} // }
} }
public openURLThemable(url: string) { public openURLThemable(url: string) {
this.platform.ready().then(() => { 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 { export class MenuEntry {
public MENU_NAME:string; public MENU_NAME: string;
public ADD_BUTTON:string; public ADD_BUTTON: string;
public DELETE_BUTTON:string; public DELETE_BUTTON: string;
public UPDATE_BUTTON:string; public UPDATE_BUTTON: string;
public ENTRY_SEQUENCE:number; public ENTRY_SEQUENCE: number;
public FUNCTION_NAME:string; public FUNCTION_NAME: string;
public LVL:number; public LVL: number;
public MENU_ENTRY_TYPE:string; public MENU_ENTRY_TYPE: string;
public PARENT_MENU_NAME:string; public PARENT_MENU_NAME: string;
public PROMPT:string; public PROMPT: string;
public REQUEST_TYPE: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_MOBILE_NUMBER: string;
public P_EMAIL_ADDRESS: string; public P_EMAIL_ADDRESS: string;
public P_NOTIFICATION_ID: number; public P_NOTIFICATION_ID: number;
public PayrollCodeStr: string;
public LegislationCodeStr: string;
// public P_LEGISLATION_CODE: string; // public P_LEGISLATION_CODE: string;
// public OTP_SendType: number; // public OTP_SendType: number;

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

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

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

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

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

@ -1,7 +1,7 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}"> <div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div> <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 *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> </div>

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

@ -7,8 +7,17 @@
[dateFormatter]="calendar.dateFormatter" [dateFormatter]="calendar.dateFormatter"
(onTimeSelected)="onDayClicked($event)"> (onTimeSelected)="onDayClicked($event)">
</calendar> </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 #template let-showEventDetail="showEventDetail" let-selectedDate="selectedDate" let-noEventsLabel="noEventsLabel">
</ng-template> </ng-template>

@ -108,4 +108,29 @@
--height: 12cm !important; --height: 12cm !important;
--width: 80% !important; --width: 80% !important;
--border-radius: 0.4cm; --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()); console.log(event.selectedTime.getDate());
const selectedIndex = event.selectedTime.getDate(); const selectedIndex = event.selectedTime.getDate();
this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1]; this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1];
if (this.selectedIndexData.customPresent) { if (this.selectedIndexData.customPresent || this.selectedIndexData.customDaysOff || this.selectedIndexData.customAbsent) {
const rtpID = this.selectedIndexData.RTP_ID; this.dateModal(this.selectedIndexData);
this.getScheduleShiftDetails(rtpID);
} }
} else { } else {
this.isFirst = true; this.isFirst = true;

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

@ -74,7 +74,7 @@
margin-right: -70px; margin-right: -70px;
} }
.amountlabel{ .amountlabel{
color: black !important; color: #29B5BF !important;
font-weight: bold !important; font-weight: bold !important;
font-size: 13px !important; font-size: 13px !important;
margin-bottom: -29px !important; margin-bottom: -29px !important;
@ -208,10 +208,10 @@ height: 360px !important;
} }
.col{ .col{
border-bottom: 1px solid rgb(204, 204, 204); 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{ .col-ar{
border-bottom: 1px solid rgb(204, 204, 204); 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() { ngOnInit() {
console.log(this.TODAYDATE); console.log(this.TODAYDATE);
this.excess = this.TODAYDATE.EXCESS_HRS; const splitdate = this.TODAYDATE.EVENT_DATE.split(' ');
this.lateIn = this.TODAYDATE.LATE_IN_HRS; const date = splitdate[0];
this.shortage = this.TODAYDATE.SHORTAGE_HRS; const localDate = date.split('/');
this.earlyOut = this.TODAYDATE.EARLY_OUT_HRS ; this.day = localDate[1];
this.scheduleDate = this.TODAYDATE.SCHEDULE_DATE; this.year = localDate[2];
this.assignData(this.SHIFTDETAILS.GetScheduleShiftsDetailsList[0]); 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) { 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{ .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;
background: white; background: white;
/* margin-top: 2px; */ /* margin-top: 2px; */
font-family: WorkSans-Regular; font-family: WorkSans-Regular;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 15px; border-radius: 15px;
padding-bottom: 8px; padding-bottom: 5px;
margin-bottom: 7px; margin-bottom: 15px;
box-shadow: 0px 1px 5px #cdcdcd;
} }
// .user-image-container{ .user-image {
// 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;
img { img {
// width: 100%; width: 60px;
// max-height: 100%; height: 60px;
width: 74%;
max-height: 74%; border-radius: 30px;
margin-top: 4px; margin: 5px;
margin-left: 6px;
} }
} }
.employee-name{ .employee-name {
display: inline-block; display: inline-block;
width: 80%; width: 80%;
.name{
// font-size: 16px; .name {
// color: black;
// // margin: 0; font-size: 16px;
// width: 100%; text-overflow: ellipsis;
// text-overflow: ellipsis; white-space: nowrap;
// white-space: nowrap; overflow: hidden;
// overflow: hidden; margin-left: -10px;
// margin-left: -10px; margin-top: -5px;
// margin-top: -5px; text-align: left;
// font-family: 'WorkSans-Bold'; font-weight: bold;
font-size: 16px; line-height: 25px;
text-overflow: ellipsis; letter-spacing: -0.64px;
white-space: nowrap; color: #2B353E;
overflow: hidden; opacity: 1;
margin-left: -10px; font-family: 'Inter' !important;
margin-top: -5px;
text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
} }
.title{ .title {
// font-size: 13px;
// color: #888; font-family: 'Inter' !important;
// width: 100%; line-height: 12px;
// text-overflow: ellipsis; letter-spacing: -0.56px;
// white-space: nowrap; color: #575757;
// overflow: hidden; opacity: 1;
// display: block; font-size: 14px;
// margin-left: -10px; width: 100%;
// margin-top: -6px; text-overflow: ellipsis;
// color: black; white-space: nowrap;
font-family: var(--fontFamilyPoppins-SemiBold, inherit); // overflow: hidden;
line-height: 12px; display: block;
letter-spacing: -0.56px; margin-left: -10px;
color: #575757; margin-top: -10px;
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; display: inline-block;
width: 80%; width: 80%;
.name{
// font-size: 16px; .name {
// color: black; font-size: 16px;
// // margin: 0; text-overflow: ellipsis;
// width: 100%; white-space: nowrap;
// text-overflow: ellipsis; overflow: hidden;
// white-space: nowrap; margin-left: -10px;
// overflow: hidden; margin-top: -5px;
// margin-left: -10px; text-align: right;
// margin-top: -5px; font-family: 'Inter' !important;
// font-family: 'WorkSans-Bold'; line-height: 25px;
font-size: 16px; letter-spacing: -0.64px;
text-overflow: ellipsis; color: #2B353E;
white-space: nowrap; opacity: 1;
overflow: hidden; font-weight: bold;
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;
} }
.title{ .title {
// font-size: 13px;
// color: #888; font-family: 'Inter' !important;
// width: 100%; line-height: 12px;
// text-overflow: ellipsis; letter-spacing: -0.56px;
// white-space: nowrap; color: #575757;
// overflow: hidden; opacity: 1;
// display: block; font-size: 14px;
// margin-left: -10px; width: 100%;
// margin-top: -6px; text-overflow: ellipsis;
// color: black; white-space: nowrap;
font-family: var(--fontFamilyPoppins-SemiBold, inherit); overflow: hidden;
line-height: 12px; display: block;
letter-spacing: -0.56px; margin-left: -10px;
color: #575757; margin-top: -10px;
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%; width: 20%;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
vertical-align: top; vertical-align: top;
margin-top: 5px; margin-top: 5px;
position: relative;
top: 12px;
} }
.swipe-information{
.swipe-information {
color: #888; color: #888;
font-size: 12px; font-size: 12px;
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
padding-top: 6px; padding-top: 6px;
margin-top: 6px; margin-top: 6px;
.check-in { .check-in {
font-size: 12px; font-size: 12px;
margin-right: 15px; margin-right: 15px;
} }
} }

@ -12,6 +12,11 @@
<img [src]="userImage"/> <img [src]="userImage"/>
</div> </div>
</ion-col> </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" --> <!-- *ngIf="getPassdirfromNotifiPage == true" -->
<ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()"> <ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()">
@ -19,7 +24,8 @@
<img style=" <img style="
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-top: 5px;" position: absolute;
top: -30px;"
[src]="close" [src]="close"
/> />
</div> </div>

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

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

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

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

@ -1,24 +1,28 @@
.custom-button { .custom-button {
box-shadow: 0px 0px 5px #00000029;
background: white; background: white;
margin-bottom: 0px; margin-bottom: 5px;
border: 1px solid #ccc;
border-radius: 20px; border-radius: 20px;
width: 200px; width: 200px;
max-width: 105px; max-width: 105px;
height: 160px; height: 160px;
padding: 10px; padding: 10px;
@media screen and (min-width: 200px) and (max-width:300px) {
width: 80px;
}
} }
.iconBox { .iconBox {
display: block; display: block;
width: 100%; width: 100%;
position: static; position: static;
img { img {
// display: block; // display: block;
// max-width: 45%; // max-width: 45%;
// padding-bottom: 5px; // padding-bottom: 5px;
// padding-top: 5px; // padding-top: 5px;
display: block; display: inline-block;
max-width: 67%; max-width: 67%;
padding-bottom: 9px; padding-bottom: 9px;
padding-top: 5px; padding-top: 5px;
@ -28,28 +32,54 @@
.titleBox { .titleBox {
display: block; display: block;
span { span {
font-size: 25px; font-size: 25px;
font-weight: bold; font-weight: bold;
color: black; color: #004D71;
text-align: left; text-align: center;
display: block; display: block;
} }
} }
ion-app[dir="rtl"] .titleBox {
text-align: right;
}
.pClass { .pClass {
color: black; // color: #004D71;
width: 85%; // 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; margin-top: 5px;
font-weight: bold; font-weight: bold;
text-align: left; text-align: center;
display: block; display: block;
font-size: 14px !important; font-size: 14px !important;
letter-spacing: 0px;
} }
.iconFab{ .iconFab {
margin-left: -20px; margin-left: -20px;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
height: 70px; 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-grid padding>
<!-- <ion-row> <!-- <ion-row>
<ion-col [size]="12"> <ion-col [size]="12">
@ -13,7 +13,7 @@
<ion-row> <ion-row style="margin-top: 50px;">
<ion-col [size]="12"> <ion-col [size]="12">
<h1 class="heading1">{{welcome}} </h1> <h1 class="heading1">{{welcome}} </h1>
<p *ngIf="!user" class="text1">{{welcome_txt}} </p> <p *ngIf="!user" class="text1">{{welcome_txt}} </p>
@ -49,22 +49,22 @@
</app-button> </app-button>
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row> <!-- <ion-row>
<ion-col> <ion-col>
<ion-button *ngIf="userInfo" class="button-digital-id" (click)="loginWithDigitalID()"> <ion-button *ngIf="userInfo" class="button-digital-id" (click)="loginWithDigitalID()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p> <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"> <img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button> </ion-button>
</ion-col> </ion-col>
</ion-row> </ion-row> -->
<ion-row> <!-- <ion-row>
<ion-col style="padding-bottom: 100px !important;"> <ion-col style="padding-bottom: 100px !important;">
<ion-button *ngIf="showBusinessCard" class="button-digital-id" (click)="loginWithBusinessCard()" > <ion-button *ngIf="showBusinessCard" class="button-digital-id" (click)="loginWithBusinessCard()" >
<p style="color: black;">{{ts.trPK('general','business-card')}}</p> <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"> <img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button> </ion-button>
</ion-col> </ion-col>
</ion-row> </ion-row> -->
</ion-grid> </ion-grid>
</ion-content> </ion-content>

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

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

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

@ -3,10 +3,11 @@ ion-row {
margin-top: 10px; margin-top: 10px;
} }
.header-toolbar-new{ .header-toolbar-new {
--background: #29B5BF; --background: #29B5BF;
} }
.profile-image-container{
.profile-image-container {
position: relative; position: relative;
z-index: 999; z-index: 999;
// img { // img {
@ -18,7 +19,8 @@ ion-row {
// // margin-right: 4px; // // margin-right: 4px;
// } // }
} }
.profile-image{
.profile-image {
width: 32px; width: 32px;
float: right; float: right;
// margin-top: -42px; // margin-top: -42px;
@ -26,45 +28,54 @@ ion-row {
height: 32px; height: 32px;
// margin-right: 4px; // margin-right: 4px;
} }
ion-title{
ion-title {
color: white; color: white;
position: absolute; position: absolute;
top: 0; top: 0;
text-align: center; text-align: center;
left:20%; left: 20%;
right: 20%; right: 20%;
font-size: 0.42cm; font-size: 0.42cm;
font-weight: bold; font-weight: bold;
height: 100%; height: 100%;
} }
ion-label{
ion-label {
display: block; display: block;
color: black !important; color: #004D71 !important;
font-size: 14px; font-size: 16px;
font-weight: bold; font-weight: bold;
letter-spacing: 0.16px;
// margin: 0px 10px 10px 10px;
} }
.main-dashboard-container{
.main-dashboard-container {
position: relative; position: relative;
width: 100%; width: 100%;
--background: #f5f5f5;
} }
.contentBg:before { .contentBg:before {
position: absolute; position: absolute;
content: ""; content: "";
background: #29B5BF; background: #29B5BF;
height: 100px; height: 100px;
width: 100%; width: 100%;
left: 0; left: 0;
top: 0px; top: 0px;
z-index: 1; z-index: 1;
} }
.main-container{
.main-container {
position: relative; position: relative;
z-index: 2; z-index: 2;
padding-right: 15px; padding-right: 15px;
padding-left: 15px; padding-left: 15px;
padding-bottom: 130px; padding-bottom: 130px;
} }
.attendance-module{
.attendance-module {
border-radius: 20px; border-radius: 20px;
background-color: #c2a16b; background-color: #c2a16b;
padding: 10px; padding: 10px;
@ -72,36 +83,46 @@ ion-label{
width: 100%; width: 100%;
margin-top: 25px; margin-top: 25px;
margin-bottom: 0px; margin-bottom: 0px;
h3{ // margin-right: 10px !important;
margin-left: 5px !important;
h3 {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
} }
span{
span {
font-size: 13px; font-size: 13px;
display: block; display: block;
margin-top: 5px;
} }
img{
img {
display: block; display: block;
margin: 10px auto; margin: 10px auto;
width: 80%; width: 80%;
} }
ion-button{
ion-button {
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
background: rgba(0,0,0,.3); background: rgba(0, 0, 0, 0.3);
letter-spacing: 0px;
--background: transparent; --background: transparent;
--box-shadow: none !important; --box-shadow: none !important;
height: auto; height: auto;
min-height: inherit; min-height: inherit;
margin-top: 10px; margin-top: 15px;
font-size: 12px; font-size: 12px;
} }
} }
.swiper-container { .swiper-container {
margin: 0 !important; margin: 0 !important;
width: 100% !important; width: 100% !important;
} }
.fixed-shift-time-en { .fixed-shift-time-en {
right: 20px; right: 20px;
} }
@ -110,10 +131,11 @@ ion-label{
left: 20px; left: 20px;
} }
.fixed-shift-timer{ .fixed-shift-timer {
position: fixed; position: fixed;
bottom: 20px; bottom: 20px;
z-index: 2; z-index: 2;
span.subTitle { span.subTitle {
position: absolute; position: absolute;
left: 50%; left: 50%;
@ -156,3 +178,30 @@ ion-label{
// text-transform: uppercase; // 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 { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { Geolocation } from '@ionic-native/geolocation/ngx'; // import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; // import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx'; import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'; import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest';
import { Response } from 'src/app/hmg-common/services/models/response'; import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services'; import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request'; import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
@ -36,13 +37,14 @@ import { TimeCardService } from '../time-card/service/time-card.service';
import { WorklistMainService } from '../notification/service/work-list.main.service'; import { WorklistMainService } from '../notification/service/work-list.main.service';
import { isThisISOWeek } from 'date-fns'; import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; // import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { NFC, Ndef } from "@ionic-native/nfc/ngx" // import { NFC, Ndef } from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component"; import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
import { TerminationServiceService } from 'src/app/termination/service/termination-service.service'; import * as moment from "moment";
import { count } from 'console';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
templateUrl: './home.page.html', templateUrl: './home.page.html',
@ -52,7 +54,7 @@ export class HomePage implements OnInit {
userData: any = {}; userData: any = {};
userImage: any = '../assets/imgs/profile.png'; userImage: any = '../assets/imgs/profile.png';
menuList: any = []; menuList: any = [];
zbarOptions: any; // zbarOptions: any;
scannedResult: any; scannedResult: any;
notBadge: any; notBadge: any;
lat: any; lat: any;
@ -64,17 +66,19 @@ export class HomePage implements OnInit {
camera: boolean; camera: boolean;
ticketRequestObject: any; ticketRequestObject: any;
leaveRequestObject: any; leaveRequestObject: any;
businessLeaveRequestObject: any;
missingSwipeRequestObject: any; missingSwipeRequestObject: any;
public isShow = false; public isShow = false;
public showVcationRule = false; public showVcationRule = true;
public isFakeLocationUsed = false; public isFakeLocationUsed = false;
public intervalCountdown: any; public intervalCountdown: any;
public showLoader = true;
public statsButtons = [ public statsButtons = [
{ // {
title: this.ts.trPK('attendance-tracking', 'title'), // title: this.ts.trPK('attendance-tracking', 'title'),
link: '0', // link: '0',
show: true // show: true
}, // },
{ {
title: this.ts.trPK('home', 'worklist'), title: this.ts.trPK('home', 'worklist'),
statsValue: 0, statsValue: 0,
@ -82,18 +86,32 @@ export class HomePage implements OnInit {
link: '1', link: '1',
show: true 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'), title: this.ts.trPK('home', 'leave-balance'),
statsValue: 0, statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png', icon: 'assets/icon/new-design/leave_balance.png',
link: '3', link: '3',
show: true show: true,
}, },
{ {
title: this.ts.trPK('vacation-rule', 'vacationRule'), title: this.ts.trPK('home', 'business-balance'),
statsValue: 0, statsValue: 0,
icon: 'assets/icon/new-design/vacation_rules_icon.png', icon: 'assets/icon/new-design/BusinessTrip.png',
link: '999', 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 show: true
} }
]; ];
@ -124,6 +142,7 @@ export class HomePage implements OnInit {
direction: string; direction: string;
public isPostNoLoad = true; public isPostNoLoad = true;
public showStaticServices = false; public showStaticServices = false;
public myRequestData: any;
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
@ -133,10 +152,10 @@ export class HomePage implements OnInit {
public common: CommonService, public common: CommonService,
public events: Events, public events: Events,
private device: Device, private device: Device,
private geolocation: Geolocation, // private geolocation: Geolocation,
private attendanceService: AttendanceService, private attendanceService: AttendanceService,
private eitService: EitService, private eitService: EitService,
private barcodeScanner: BarcodeScanner, // private barcodeScanner: BarcodeScanner,
public actionSheetCtrl: ActionSheetController, public actionSheetCtrl: ActionSheetController,
public sharedData: SharedDataService, public sharedData: SharedDataService,
private sanitizer: DomSanitizer, private sanitizer: DomSanitizer,
@ -148,9 +167,9 @@ export class HomePage implements OnInit {
public workListService: WorklistMainService, public workListService: WorklistMainService,
public router: Router, public router: Router,
private platform: Platform, private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation, // public backgroundGeolocation: BackgroundGeolocation,
public modalController: ModalController, public modalController: ModalController,
private nfc: NFC, // private nfc: NFC,
public firebasex: FirebaseX public firebasex: FirebaseX
) { ) {
this.events.subscribe('img-change', displayImg => { this.events.subscribe('img-change', displayImg => {
@ -182,11 +201,11 @@ export class HomePage implements OnInit {
public slideSettingsTwo() { public slideSettingsTwo() {
const width = this.platform.width(); const width = this.platform.width();
this.slideOptsOne = { this.slideOptsOne = {
slidesPerView: width > 320 ? 3.5 : 3, slidesPerView: width > 320 ? 3.4 : 3,
spaceBetween: 10 spaceBetween: 10
}; };
this.slideOptsTwo = { this.slideOptsTwo = {
slidesPerView: width > 320 ? 3.2 : 2.5, slidesPerView: width > 320 ? 3.4 : 2.4,
spaceBetween: width > 320 ? 10 : 5 spaceBetween: width > 320 ? 10 : 5
}; };
this.showStaticServices = true; this.showStaticServices = true;
@ -261,32 +280,32 @@ export class HomePage implements OnInit {
this.location = granted as boolean; this.location = granted as boolean;
if (this.location) { if (this.location) {
if (this.platform.is('android')) { if (this.platform.is('android')) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => { // this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) { // if (resp && (resp.latitude && resp.longitude)) {
if (resp.isFromMockProvider || resp.mockLocationsEnabled) { // if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.isFakeLocationUsed = true; // this.isFakeLocationUsed = true;
} // }
this.lat = resp.latitude; // this.lat = resp.latitude;
this.longt = resp.longitude; // this.longt = resp.longitude;
this.attendance(); // this.attendance();
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}, (error) => { // }, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} else { } else {
this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { // this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => {
if (resp && resp.coords.latitude && resp.coords.longitude) { // if (resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude; // this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude; // this.longt = resp.coords.longitude;
this.attendance(); // this.attendance();
} else { // } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
} // }
}).catch(error => { // }).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); // this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}); // });
} }
} else { } else {
return false; return false;
@ -298,8 +317,8 @@ export class HomePage implements OnInit {
for (const servicePrivilage of AuthenticationService.servicePrivilage) { for (const servicePrivilage of AuthenticationService.servicePrivilage) {
if (servicePrivilage.Previlege === false) { if (servicePrivilage.Previlege === false) {
if (servicePrivilage.ServiceName === 'accrualBalance') { if (servicePrivilage.ServiceName === 'accrualBalance') {
this.statsButtons[2].show = false; this.statsButtons[3].show = false;
// this.statsButtons[2].show = false; // this.statsButtons[4].show = false;
} }
if (servicePrivilage.ServiceName === 'vacationRule') { if (servicePrivilage.ServiceName === 'vacationRule') {
this.showVcationRule = false; this.showVcationRule = false;
@ -310,8 +329,8 @@ export class HomePage implements OnInit {
// document.getElementById(servicePrivilage.ServiceName).style.filter = // document.getElementById(servicePrivilage.ServiceName).style.filter =
// 'grayscale(1)'; // 'grayscale(1)';
} else { } else {
this.statsButtons[2].show = true; this.statsButtons[3].show = true;
// this.statsButtons[2].show = true; this.statsButtons[4].show = true;
this.showVcationRule = true; this.showVcationRule = true;
} }
} }
@ -362,18 +381,21 @@ export class HomePage implements OnInit {
callDashboardServices() { callDashboardServices() {
this.getMenu(); this.getMenu();
this.setServicesPrivilage(); this.statsButtons[1].show = true;
// this.setServicesPrivilage();
if (this.common.getTotalNumberOfWorklistRequest()) { if (this.common.getTotalNumberOfWorklistRequest()) {
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest(); this.statsButtons[0].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.showLoader = false;
} else { } else {
this.openNotificationsDashbored(); this.openNotificationsDashbored();
} }
// this.showOpenMissingSwipes(); //this.showOpenMissingSwipes();
// this.showAttendanceTracking(); //this.showAttendanceTracking();
var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false); var accrualBalance = this.common.sharedService.getSharedData('leaveAccrualBalance', false);
if (!accrualBalance) if (!accrualBalance) {
this.getAccrualBalance(); this.getAccrualBalance();
}
} }
public Vacation_Rule() { public Vacation_Rule() {
@ -391,6 +413,9 @@ export class HomePage implements OnInit {
if (this.common.hasData(result.List_Menu)) { if (this.common.hasData(result.List_Menu)) {
this.menuList = result.List_Menu; this.menuList = result.List_Menu;
this.getMenuDetails(); 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') { if (this.menuList[i].MENU_TYPE === 'M') {
this.events.publish('myTeamFlag', 'true'); this.events.publish('myTeamFlag', 'true');
// this.common.sharedService.setSharedData('true', "myTeamFlag"); // this.common.sharedService.setSharedData('true', "myTeamFlag");
} else {
this.events.publish('myTeamFlag', 'false');
}
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') { if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID; request.P_SELECTED_RESP_ID = item.RESP_ID;
} else { } else {
selEmpNo = this.common.sharedService.getSharedData( // selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA, // LoginRequest.SHARED_DATA,
false // false
); // );
console.log(this.userData);
selEmpNo = this.userData.EMPLOYEE_NUMBER;
} }
nationality = this.common.sharedService.getSharedData( nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE, LoginRequest.NATIONALITY_CODE,
@ -470,8 +503,9 @@ export class HomePage implements OnInit {
); );
this.eitService this.eitService
.getMenuEntries(request, '', '', false) .getMenuEntries(request, '', '', this.isPostNoLoad)
.subscribe((result: MenuResponse) => { .subscribe((result: MenuResponse) => {
this.common.stopLoading();
this.handleMenuEntiresResult(result); this.handleMenuEntiresResult(result);
}); });
} }
@ -491,14 +525,18 @@ export class HomePage implements OnInit {
// tslint:disable-next-line: prefer-for-of // tslint:disable-next-line: prefer-for-of
for (let i = 0; i < result.GetMenuEntriesList.length; i++) { for (let i = 0; i < result.GetMenuEntriesList.length; i++) {
// tslint:disable-next-line: triple-equals // 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]; this.ticketRequestObject = result.GetMenuEntriesList[i];
// tslint:disable-next-line: triple-equals // 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]; this.leaveRequestObject = result.GetMenuEntriesList[i];
// tslint:disable-next-line: triple-equals // 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]; 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); this.sortMenuEntires(result.GetMenuEntriesList);
@ -528,22 +566,22 @@ export class HomePage implements OnInit {
} }
scanCode() { scanCode() {
this.barcodeScanner // this.barcodeScanner
.scan() // .scan()
.then(barcodeData => { // .then(barcodeData => {
if (!barcodeData.cancelled) { // if (!barcodeData.cancelled) {
this.scannedResult = barcodeData; // this.scannedResult = barcodeData;
this.deviceID = this.device.uuid; // this.deviceID = this.device.uuid;
if (this.isFakeLocationUsed) { // if (this.isFakeLocationUsed) {
this.fakeSwipeAttendance(); // this.fakeSwipeAttendance();
} else { // } else {
this.swipeAttendance(); // this.swipeAttendance();
} // }
} // }
}) // })
.catch(err => { // .catch(err => {
console.log('Error', err); // console.log('Error', err);
}); // });
} }
fakeSwipeAttendance() { fakeSwipeAttendance() {
@ -654,23 +692,76 @@ export class HomePage implements OnInit {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER'; const key = 'P_OPEN_NTF_NUMBER';
this.countAllNotification = result[key]; this.countAllNotification = result[key];
// this.ITGCountAllNotification(); this.statsButtons[0].statsValue = this.countAllNotification;
this.statsButtons[1].statsValue = Math.floor(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( this.common.sharedService.setSharedData(
result, result,
'worklistNotifications' 'worklistNotifications'
); );
this.common.setFilterValues(result['GetOpenNotificationsList']); this.common.setFilterValues(result['GetOpenNotificationsList']);
this.showLoader = false;
} else {
this.showLoader = false;
this.common.stopLoading();
} }
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
}); });
} }
ITGCountAllNotification() { ITGCountAllNotification() {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => { this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS); if (this.common.validResponse(result)) {
this.common.filterKeys['ITG'] = result.TotalCount; this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.statsButtons[1].statsValue = this.common.filterKeys['ITG'] = result.TotalCount;
Math.floor(this.countAllNotification + result.TotalCount); this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.getCOCNotificationCount();
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
getCOCNotificationCount() {
const request = new COCRequest();
request.ItgPageSize = 1;
request.ItgPageNo = 1;
request.Date = moment(new Date()).format("YYYY-MM-DD");
this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
console.log(result);
if (this.common.validResponse(result)) {
const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
this.common.filterKeys['COC'] = totalCount;
this.statsButtons[1].statsValue = Math.floor(this.statsButtons[1].statsValue + totalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.showLoader = false;
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading(); this.common.stopLoading();
}); });
} }
@ -712,6 +803,7 @@ export class HomePage implements OnInit {
); );
selMenu.GetMenuEntriesList = subMenu; selMenu.GetMenuEntriesList = subMenu;
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); 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') { if (subMenu.REQUEST_TYPE === 'ABSENCE') {
this.common.openAbsencePage(); this.common.openAbsencePage();
} else if (subMenu.REQUEST_TYPE === 'SIT') { } else if (subMenu.REQUEST_TYPE === 'SIT') {
@ -723,11 +815,18 @@ export class HomePage implements OnInit {
selMenu.GetMenuEntriesList, selMenu.GetMenuEntriesList,
'menuEntries' 'menuEntries'
); );
this.common.openSITPage(); this.common.openEITPage();
} else if (subMenu.FUNCTION_NAME == 'HR_TERM_SS' || subMenu.FUNCTION_NAME == 'HR_TERM_EMP_SS') { } else if (subMenu.REQUEST_TYPE === 'BASIC_DETAILS') {
this.common.sharedService.setSharedData(subMenu, TerminationServiceService.TERMINATION_PAGE); this.common.openProfile('basicDetails');
} else if (subMenu.REQUEST_TYPE === 'ADDRESS' || subMenu.REQUEST_TYPE === 'PHONE_NUMBERS') {
this.common.openTermination(); 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') { if (subMenu.REQUEST_TYPE === 'TIME_CARD') {
this.common.openTimeCardPage(); this.common.openTimeCardPage();
@ -748,18 +847,24 @@ export class HomePage implements OnInit {
this.accrualService.getAccrualBalances(request, '', '', this.isPostNoLoad).subscribe((result: any) => { this.accrualService.getAccrualBalances(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
let totalTicketsLeft = 0; let totalTicketsLeft = 0;
let totalAccuralAvailable = 0;
let totalOldAvailable = 0;
this.accrualBalancesList = result.GetAccrualBalancesList; this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of 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.statsButtons[2].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance'); } else if (accrualBalance.ACCURAL_PLAN_NAME === 'Old Leave Balance' || accrualBalance.ACCURAL_PLAN_NAME == "خطة فصل الارصدة 1439") {
this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); totalOldAvailable = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2));
this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance');
} else {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
} }
} }
// 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 // tslint:disable-next-line: triple-equals
if (link == '0') { if (link == '0') {
this.isFakeLocationUsed = false; this.isFakeLocationUsed = false;
// this.getDeviceLocation();
this.showAttendanceOptions(); this.showAttendanceOptions();
// tslint:disable-next-line: triple-equals
} else if (link == '1') { } else if (link == '1') {
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.common.startLoading(); this.common.startLoading();
this.common.openNotificationPage(); this.common.openNotificationPage();
// tslint:disable-next-line: triple-equals
} else if (link == '2') { } else if (link == '2') {
this.openPage(this.missingSwipeRequestObject); this.openPage(this.missingSwipeRequestObject);
// tslint:disable-next-line: triple-equals
} else if (link == '3') { } else if (link == '3') {
this.openPage(this.leaveRequestObject); this.openPage(this.leaveRequestObject);
// tslint:disable-next-line: triple-equals
} else if (link == '4') { } else if (link == '4') {
this.openPage(this.ticketRequestObject); this.common.sharedService.setSharedData(this.myRequestData, MenuResponse.SELECTED_MENU);
} else if (link == '999') { this.common.openConcurrentTransactionsHome();
this.Vacation_Rule(); } else if (link == '5') {
this.openPage(this.businessLeaveRequestObject);
} }
} }
@ -823,4 +923,8 @@ export class HomePage implements OnInit {
openAnnouncement() { openAnnouncement() {
this.common.openAnnouncement(); this.common.openAnnouncement();
} }
public performanceEvaluation() {
this.common.openPerformanceevaluation();
}
} }

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

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

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

@ -133,11 +133,11 @@ font-weight: bold;
height: 15%; height: 15%;
width: 100%; width: 100%;
position: absolute; position: absolute;
background: #29B5BF; background: #259CB8;
top: 0; top: 0;
} }
.header-toolbar{ .header-toolbar{
--background: #29B5BF !important; --background: #259CB8 !important;
} }
.bottom{ .bottom{
height: 85%; height: 85%;
@ -321,7 +321,7 @@ ion-footer{
} }
.uploader-box{ .uploader-box{
border-width: 2px; border-width: 2px;
border-color: #29B5BF; border-color: #259CB8;
border-style: dotted; border-style: dotted;
border-radius: 10px; border-radius: 10px;
left: 10px; left: 10px;
@ -339,7 +339,7 @@ ion-footer{
right: 0; right: 0;
top: 60px; top: 60px;
bottom: 0; bottom: 0;
color: #29B5BF; color: #259CB8;
} }
.top img{ .top img{
position: absolute; 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 }; return { AttachmentID: this.indexLastObj, FileName: res.name, Base64Data: res.data.split(",")[1], ContentType: 'image/' + attachType };
}); });
} catch (e) { } } catch (e) { }
} }
} }

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

Loading…
Cancel
Save