q1 changes

enad-Q1-HMG
enadhilal 5 years ago
parent 9774c49d19
commit 3ec34bc23f

@ -56,6 +56,16 @@
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
<ion-item (click)="openDigitalId()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/ID_ico_menu.png" item-left>
</ion-thumbnail>
<ion-label class="changepassword" >
{{ts.trPK('general','digital-id')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
</ion-list>
@ -128,6 +138,16 @@
</button> -->
</ion-item>
<ion-item (click)="openDigitalId()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/ID_ico_menu.png" item-left>
</ion-thumbnail>
<ion-label class="changepassword" >
{{ts.trPK('general','digital-id')}}
<ion-badge class="start-badge main-badge" slot="end" color="danger">{{notBadge}}</ion-badge>
</ion-label>
</ion-item>
<!-- <ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb">

@ -61,6 +61,7 @@ header
border-radius: 50% !important;
position: relative;
color: #7f8c8d;
height: 35px;
}

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Platform, Events, MenuController } from '@ionic/angular';
import { Platform, Events, MenuController, ModalController } from '@ionic/angular';
import { TranslatorService } from './hmg-common/services/translator/translator.service';
import { CommonService } from './hmg-common/services/common/common.service';
import { AuthenticationService } from './hmg-common/services/authentication/authentication.service';
@ -10,6 +10,7 @@ import { LazyLoadingService } from './hmg-common/services/lazy-loading/lazy-load
import { DomSanitizer } from '@angular/platform-browser';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { Router } from '@angular/router';
import { DigitalIdComponent } from './authentication/digital-id/digital-id.component';
@Component({
selector: 'app-root',
@ -37,6 +38,8 @@ export class AppComponent implements OnInit {
DeviceToken: string; // this.deviceToken
};
private digitalIDUser: any;
constructor(
public ts: TranslatorService,
private cs: CommonService,
@ -50,6 +53,7 @@ export class AppComponent implements OnInit {
public pushService: PushService,
private splashScreen: SplashScreen,
public router: Router,
public modalController: ModalController
) {
this.events.subscribe('img-change', displayImg => {
console.log('app compont: ' + displayImg);
@ -116,6 +120,7 @@ export class AppComponent implements OnInit {
this.events.subscribe('setMenu', () => {
const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
this.digitalIDUser = user//JSON.stringify(user);
this.companyUrl = user.CompanyImageURL ? user.CompanyImageURL : '../assets/imgs/CSLogo.png';
this.companyDesc = user.CompanyImageDescription ? user.CompanyImageDescription : 'Powered By Cloud Solutions';
this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME;
@ -186,6 +191,17 @@ export class AppComponent implements OnInit {
this.menu.toggle();
}
async openDigitalId() {
const modal = await this.modalController.create({
component: DigitalIdComponent,
cssClass: 'digital-id-modal-css',
componentProps: {
'userInfo':this.digitalIDUser//JSON.parse(this.digitalIDUser)
}
});
return await modal.present();
}
private changeImage() {
this.cs.openChangeImagePage();
this.menu.toggle();

@ -18,10 +18,11 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { NgCalendarModule } from 'ionic2-calendar';
import { NFC, Ndef} from "@ionic-native/nfc/ngx"
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { DigitalIdComponent } from './authentication/digital-id/digital-id.component';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
declarations: [AppComponent, DigitalIdComponent],
entryComponents: [DigitalIdComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,

@ -82,12 +82,13 @@ const routes: Routes = [
CheckUserComponent,
ChangePasswordComponent,
// ConfirmLoginComponent,
WelcomeComponent
WelcomeComponent,
],
providers:[
FingerprintAIO,
Device,
SplashScreen
]
],
entryComponents:[]
})
export class AuthenticationPageModule { }

@ -23,8 +23,8 @@
<ion-item class="item-input-login">
<img class="item-icon" src="assets/imgs/username.png" item-start />
<ion-label>{{ts.trPK('login','check-user-place-holder')}}</ion-label>
<ion-input class="login-input" required type="text" [(ngModel)]="P_USER_NAME">
<!-- <ion-label>{{ts.trPK('login','check-user-place-holder')}}</ion-label> -->
<ion-input placeholder="{{ts.trPK('login','check-user-place-holder')}}" class="login-input" required type="text" [(ngModel)]="P_USER_NAME">
</ion-input>
</ion-item>
</ion-grid>

@ -66,4 +66,9 @@
</ion-grid>
<!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button> -->
</ion-content>

@ -7,4 +7,31 @@
}
.button-digital-id{
--background: white !important;
background: white !important;
white-space: normal;
color: white;
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
border: 1px solid black;
}
.digital-id-en{
color: black;
position: absolute;
right: 20px;
width: 10%;
}
.digital-id-ar{
color: black;
position: absolute;
left: 20px;
width: 10%;
}

@ -12,12 +12,13 @@ import { GetLoginInfoResponse } from '../../hmg-common/services/authentication/m
import { SMSCheckRequest } from 'src/app/hmg-common/services/authentication/models/smscheck.request';
import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response';
import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { Platform } from '@ionic/angular';
import { ModalController, Platform } from '@ionic/angular';
import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
import { LoginModel } from '../models/LoginModel';
import * as moment from 'moment';
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
import { NFC } from "@ionic-native/nfc/ngx";
import { DigitalIdComponent } from '../digital-id/digital-id.component';
@Component({
selector: 'app-confirm-login',
@ -49,6 +50,8 @@ export class ConfirmLoginComponent implements OnInit {
private iosLink: string;
private androidLink: string;
public isNFCAvailable = false;
direction:string;
userInfo: any;
constructor(
public ts: TranslatorService,
@ -58,6 +61,7 @@ export class ConfirmLoginComponent implements OnInit {
private faio: FingerprintAIO,
public pushService: PushService,
public platform: Platform,
public modalController: ModalController,
private nfc: NFC
) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -75,6 +79,8 @@ export class ConfirmLoginComponent implements OnInit {
}
ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.checkNFCStatus();
// **checkIfAvailable FAIO **//
this.checkIfAvailable();
@ -474,4 +480,12 @@ checkAccess(el: any) {
}
}
async openDigitalId() {
const modal = await this.modalController.create({
component: DigitalIdComponent,
cssClass: 'digital-id-modal-css'
});
return await modal.present();
}
}

@ -0,0 +1,38 @@
<ion-content dir="ltr">
<img *ngIf="userInfo.PAYROLL_CODE === 'CS' " style="width: 100%; max-width: 100%;" src="../assets/imgs/IDTOP.png">
<img *ngIf="userInfo.PAYROLL_CODE !== 'CS' " style="width: 100%; max-width: 100%;" src="../assets/imgs/IDTOP_HMG.png.png">
<ion-grid>
<ion-row>
<ion-col size="6" *ngIf="userInfo.EMPLOYEE_IMAGE != null">
<img style="width: 80%;height: 215%; ; bottom: 0%; position: absolute; border: 1px solid #e6e6e6; border-radius: 20px;"
[src]="'data:image/png;base64,'+userInfo.EMPLOYEE_IMAGE">
</ion-col>
<ion-col size="6" *ngIf="userInfo.EMPLOYEE_IMAGE == null">
<img style="width: 80%;height: 215%; ; bottom: 0%; position: absolute; border: 1px solid #e6e6e6; border-radius: 20px;"
src="../assets/imgs/profilePic.png">
</ion-col>
<ion-col size="6">
<p><b style="font-size: 25px !important; font-family: sans-serif;">{{userInfo.ASSIGNMENT_NUMBER}}</b></p>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<p><b style="font-size: 20px !important;">{{userInfo.EMPLOYEE_DISPLAY_NAME}}</b></p>
<p style="font-size: 15px !important;">{{userInfo.JOB_NAME}}</p>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<img style="width: 65%; max-width: 100%; margin-left: 60px;" [src]="userInfo.EmployeeQR">
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
<ion-footer>
<div class="centerDiv" style="margin-top: 20px !important;">
<ion-button class="button-login" (click)="dismiss()"><b>{{ts.trPK('general','close')}}</b></ion-button>
</div>
</ion-footer>

@ -0,0 +1,13 @@
.button-login{
--background: #c1272d !important;
background: #c1272d !important;
white-space: normal;
color: var(--light);
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
}

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

@ -0,0 +1,29 @@
import { Component, OnInit, Input} from '@angular/core';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-digital-id',
templateUrl: './digital-id.component.html',
styleUrls: ['./digital-id.component.scss'],
})
export class DigitalIdComponent implements OnInit {
@Input() userInfo: any;
constructor(
public modalCtrl: ModalController,
public ts: TranslatorService,
) { }
ngOnInit() {
console.log(this.userInfo);
}
dismiss() {
this.modalCtrl.dismiss({
'dismissed': true
});
}
}

@ -26,9 +26,6 @@
<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="password" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
</ion-item>
<div class="centerDiv signupDiv" *ngIf="isAppleStore==false">
@ -40,6 +37,8 @@
</div>
</div>
<!-- <div *ngIf="welcomeBack"> -->
<welcome-login (onLogin)="login()" (loginWithUser)="loginWithUser()" *ngIf="user ">
</welcome-login>
@ -47,6 +46,17 @@
<div class="centerDiv" style="margin-top: 20px !important;">
<ion-button [ngClass]="{'disable-button-opacity': isValidForm()}" class="button-login" (click)="onLogin()" [disabled]="isValidForm()">{{ts.trPK('login','login')}}</ion-button>
<!-- digital ID button -->
<!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" currentLang === '2' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button> -->
<br><br>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
</div>
</ion-content>

@ -141,6 +141,22 @@ img.centerDiv {
--min-height: 1.6cm !important;
width: 315px;
}
.button-digital-id{
--background: white !important;
background: white !important;
white-space: normal;
color: white;
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 315px;
border: 1px solid black;
}
.content {
width: 500px;
margin-left: auto;
@ -227,4 +243,19 @@ img.centerDiv {
display:inline-block;
margin-top:20px;
margin-right: 15%;
}
.digital-id-en{
color: black;
position: absolute;
right: 20px;
width: 10%;
}
.digital-id-ar{
color: black;
position: absolute;
left: 20px;
width: 10%;
}

@ -18,6 +18,8 @@ import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authenticat
import { PushService } from 'src/app/hmg-common/services/push/push.service';
import { KeyboardService } from 'src/app/hmg-common/services/keyboard/keyboard.service';
import { KeyboardStatusModel } from 'src/app/hmg-common/services/keyboard/keyboard-status.model';
import { ModalController } from '@ionic/angular';
import { DigitalIdComponent } from '../digital-id/digital-id.component';
@Component({
selector: 'login',
@ -26,6 +28,7 @@ import { KeyboardStatusModel } from 'src/app/hmg-common/services/keyboard/keyboa
})
export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any;
userInfo: any;
constructor(
public cs: CommonService,
@ -42,21 +45,22 @@ export class LoginComponent implements OnInit, OnDestroy {
public sharedData: SharedDataService,
public plt: Platform,
public pushService: PushService,
public keyboardService: KeyboardService
public keyboardService: KeyboardService,
public modalController: ModalController
) {
this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage);
// tslint:disable-next-line: triple-equals
if (logoutFlage == true) {
console.log(' subscribe check logoutFlage: ' + logoutFlage);
this.logoutFlage = logoutFlage;
localStorage.setItem('logoutFlage', logoutFlage);
console.log(' subscribe check logoutFlage: ' + logoutFlage);
this.logoutFlage = logoutFlage;
localStorage.setItem('logoutFlage', logoutFlage);
}
});
this.getuser = this.cs.sharedService.getSharedData(
AuthenticationService.IMEI_USER_DATA,
false
);
);
if (this.getuser) {
this.user = true;
@ -91,7 +95,7 @@ export class LoginComponent implements OnInit, OnDestroy {
user = false;
DeviceType: string;
requestGetLoginInfo: any;
logoutFlage: boolean ;
logoutFlage: boolean;
getuser: any = '';
getlastlogin: any;
public keyboardOpened = false;
@ -99,6 +103,7 @@ export class LoginComponent implements OnInit, OnDestroy {
ngOnInit() {
this.monitorKeyboardChange();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.currentLang = TranslatorService.getCurrentLanguageCode();
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
@ -113,19 +118,19 @@ export class LoginComponent implements OnInit, OnDestroy {
this.deviceToken = this.cs.getDeviceToken();
if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken);
} else {
console.log('no deviceToken' );
this.pushService.startReceiving();
}
} else {
console.log('no deviceToken');
this.pushService.startReceiving();
}
// here will delete below part and depdding on user (response from getMobileInfo)
this.username = localStorage.getItem('user');
this.password = localStorage.getItem('password'); // ****//
const remember = localStorage.getItem('remember'); // ****//
this.empname = localStorage.getItem('emp-name');
this.empname = localStorage.getItem('emp-name');
this.logintype = localStorage.getItem('login-type');
// tslint:disable-next-line: triple-equals
if (remember == 'true') { this.remeberMe = true ; } else { this.remeberMe = false; }
if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; }
}
ngOnDestroy(): void {
@ -133,9 +138,9 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public changeLanguage(langNumber) {
console.log("current lang: "+this.currentLang)
console.log("click lang: "+langNumber)
if(this.currentLang == langNumber){
console.log("current lang: " + this.currentLang)
console.log("click lang: " + langNumber)
if (this.currentLang == langNumber) {
this.currentLang = langNumber;
return;
} else {
@ -167,9 +172,9 @@ export class LoginComponent implements OnInit, OnDestroy {
this.remeberMyInfo();
}
public remeberMyInfo() {
if (this.username) {localStorage.setItem('user', this.username); }
if (this.password) {localStorage.setItem('password', this.password); }
localStorage.setItem('remember', 'true');
if (this.username) { localStorage.setItem('user', this.username); }
if (this.password) { localStorage.setItem('password', this.password); }
localStorage.setItem('remember', 'true');
}
public onLogin() {
@ -183,21 +188,21 @@ export class LoginComponent implements OnInit, OnDestroy {
this.checkAppUpdated();
console.log('login enabled second time: ' + this.deviceToken);
}, 1000);
}
}
}
public checkAppUpdated() {
this.authService.checkApplicationVersion(() => {}).subscribe((result: CheckAppVersionResponse) => {
// tslint:disable-next-line: triple-equals
if (result.MessageStatus == 2 && result.ErrorType == 4) {
this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
this.handleAppUpdate(result);
});
this.authService.checkApplicationVersion(() => { }).subscribe((result: CheckAppVersionResponse) => {
// tslint:disable-next-line: triple-equals
if (result.MessageStatus == 2 && result.ErrorType == 4) {
this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
this.handleAppUpdate(result);
});
// tslint:disable-next-line: triple-equals
} else if (result.MessageStatus == 1) {
this.checkUserAuthentication();
}
});
} else if (result.MessageStatus == 1) {
this.checkUserAuthentication();
}
});
}
private handleAppUpdate(result) {
@ -332,7 +337,7 @@ export class LoginComponent implements OnInit, OnDestroy {
login() {
let anotherUser = this.sharedData.getSharedData('anotherUser');
if(anotherUser){
if (anotherUser) {
this.username = '';
this.password = '';
}
@ -340,42 +345,51 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log('login');
// this.loginDiv=true;
this.user = false;
}
}
loginWithUser() {
loginWithUser() {
console.log('loginWithUser');
this.cs.openConfirmLoginPage();
}
}
getLastLoginInfo() {
getLastLoginInfo() {
this.requestGetLoginInfo = {
DeviceType: this.cs.getDeviceType(), // "Android",//this.cs.getDeviceType(),
DeviceToken: this.cs.getDeviceToken()// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
};
this.authService.getLoginInfo(this.requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
this.authService.getLoginInfo(this.requestGetLoginInfo, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) {
if (res.Mohemm_GetMobileLoginInfoList.length > 0) {
if (res.Mohemm_GetMobileLoginInfoList.length > 0) {
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
res.Mohemm_GetMobileLoginInfoList[0],
AuthenticationService.IMEI_USER_DATA
);
this.user = true;
this.cs.sharedService.setSharedData(
// res.Patient_SELECTDeviceIMEIbyIMEIList[0],
res.Mohemm_GetMobileLoginInfoList[0],
AuthenticationService.IMEI_USER_DATA
);
this.user = true;
} else {
this.user = false;
}
}
} else {
this.user = false;
}
}
});
}
}
private monitorKeyboardChange() {
this.events.subscribe(KeyboardService.KEYBOARD_STATUS, (status: KeyboardStatusModel) => {
this.keyboardOpened = status.opened;
});
}
private monitorKeyboardChange() {
this.events.subscribe ( KeyboardService.KEYBOARD_STATUS , ( status: KeyboardStatusModel) => {
this.keyboardOpened = status.opened;
async openDigitalId() {
const modal = await this.modalController.create({
component: DigitalIdComponent,
cssClass: 'digital-id-modal-css'
});
}
return await modal.present();
}
}

@ -25,12 +25,13 @@ import { ModalController } from '@ionic/angular';
export class AttendScanService {
location: boolean;
camera: boolean;
lat: any;
longt: any;
lat = 0;
longt = 0;
deviceID: string;
scannedResult: any;
userData: any = {};
public isFakeLocationUsed = false;
public isGpsRequired = false;
constructor(private device: Device,
private zbar: ZBar,
@ -51,6 +52,7 @@ export class AttendScanService {
}
getDeviceLocation() {
this.isGpsRequired = true;
this.isFakeLocationUsed = false;
const isVirtual = this.device.isVirtual;
if (isVirtual === true) {
@ -69,7 +71,7 @@ export class AttendScanService {
}
this.lat = resp.latitude;
this.longt = resp.longitude;
this.attendance();
this.attendance(true);
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
@ -82,7 +84,7 @@ export class AttendScanService {
if(resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
this.attendance();
this.attendance(true);
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
@ -97,7 +99,12 @@ export class AttendScanService {
});
}
public attendance() {
public attendance(isGPSValue: boolean) {
this.isGpsRequired = isGPSValue;
if (!this.isGpsRequired) {
this.lat = 0;
this.longt = 0;
}
this.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean;
if (this.camera) {
@ -130,6 +137,8 @@ export class AttendScanService {
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = this.scannedResult.text;
request.NFCValue = '';
request.WIFIValue = '';
request.UID = this.deviceID;
request.EmployeeID = this.userData.EMPLOYEE_NUMBER;
this.attendance_service.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');})
@ -150,6 +159,7 @@ export class AttendScanService {
request.NFCValue = '';
request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER;
request.IsGpsRequired = this.isGpsRequired;
console.log('request');
console.log(JSON.stringify(request));
this.attendance_service

@ -133,8 +133,8 @@ export class AuthenticationService {
}else{
mobileType = 'android';
}
request.VersionID = 2.7;
request.Channel = 33;
request.VersionID = 2.8;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;
@ -209,7 +209,7 @@ export class AuthenticationService {
public login(request: LoginRequest, onError: any, errorLabel: string): Observable<Response> {
this.setPublicFields(request);
request.P_APP_VERSION="HMG";
request.P_APP_VERSION="CS";
return this.con.post(AuthenticationService.login, request, onError, errorLabel);
}
@ -464,7 +464,7 @@ export class AuthenticationService {
public checkUserAuthentication(request: CheckUserAuthenticationRequest, onError: any, errorLabel: string)
: Observable<CheckUserAuthenticationResponse> {
this.setPublicFields(request);
request.P_APP_VERSION="HMG";
request.P_APP_VERSION="CS";
return this.con.post(AuthenticationService.userChecking, request, onError, errorLabel);
}

@ -22,22 +22,9 @@ export class ConnectorService {
};
public static retryTimes = 0;
public static timeOut = 120 * 1000;
// public static host = 'http://10.50.100.113:6060/'; // development service
// public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://hmgwebservices.com/';
// public static host = 'http://10.50.100.198:6060/';
// public static host = 'http://10.50.100.113:6060/'; // development service
/* public static host = 'http://10.50.100.198:6060/';
public static host = 'http://10.50.100.198:6060/'; // development service
public static host = 'http://10.50.100.198:4040/'; // UAT service
public static host = 'http://10.50.100.198:4444/'; // production service
public static host = 'http://10.50.100.113:4040/'; // UAT service
public static host = 'http://10.50.100.113:4444/'; // production service
*/
/*
end of connection configuration
*/
constructor(public httpClient: HttpClient, public cs: CommonService) {}

@ -35,8 +35,18 @@ export class PushService {
public startReceiving() {
console.log("startReceiving");
this.processStartReceivingWithFirebase();
}
this.firebasex.hasPermission().then(hasPermission => {
if (!hasPermission) {
this.firebasex.grantPermission().then(hasPermission => {
console.log("Permission was " + (hasPermission ? "granted" : "denied"));
this.processStartReceivingWithFirebase();
});
} else {
this.processStartReceivingWithFirebase();
}
});
}
private processNotification(data: any) {
const notification = new NotificationModel();

@ -11,7 +11,7 @@ export class AccordinTabCustomComponent implements OnInit {
private accordion: AccordinCustomComponent;
private id: number;
public show = false;
@Input() public show = false;
public direction = 'ltr';
@Input() header: string;
@Input() subHeader: string;
@ -30,7 +30,6 @@ export class AccordinTabCustomComponent implements OnInit {
}
public setVisibility(show: boolean) {
this.show = show;
}
public setAccordion(accordion: AccordinCustomComponent) {
@ -38,6 +37,7 @@ export class AccordinTabCustomComponent implements OnInit {
}
public onClick() {
this.show = !this.show;
this.setVisibility(!this.show);
if (this.show) {
if (this.accordion) {

@ -21,7 +21,7 @@
<ion-row padding>
<ion-col size="5" [ngClass]="{'margin-col': direction === 'en', 'disable-attendance': !serviceEnableNFC}" class="buttonStyle" >
<div class="textAndIcon" (click)="checkNFCStatus('two')">
<div class="textAndIcon" (click)="startNFCCode()">
<img src="../assets/imgs/nfc_icon.png" />
<p>{{ "general, nfc-text" | translate }}</p>
</div>
@ -42,7 +42,7 @@
<ion-row padding>
<ion-col size="5" [ngClass]="{'margin-col': direction === 'en', 'disable-attendance': !serviceEnableWifi}" class="buttonStyle" >
<div class="textAndIcon" (click)="startWifi()">
<div class="textAndIcon" (click)="startWIFICode()">
<img src="../assets/imgs/wifi_icon.png" />
<p>{{ "general, wifi-text" | translate }}</p>
</div>

@ -16,7 +16,8 @@ import { Response } from "src/app/hmg-common/services/models/response";
import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx";
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
@Component({
@ -32,8 +33,15 @@ export class AttendanceOptionsComponent implements OnInit {
public serviceEnableNFC = false;
public serviceEnableQR = false;
public serviceEnableWifi = false;
public enableLocationQR = false;
public enableLocationNFC = false;
public enableLocationWIFI = false;
public deviceNFC = false;
public nfcIOSSuccess = false;
public lat = 0;
public longt = 0;
public isFakeLocationUsed = false;
public deviceID: string;
constructor(
private nfc: NFC,
@ -47,7 +55,9 @@ export class AttendanceOptionsComponent implements OnInit {
public ngZone: NgZone,
private wifiWizard2: WifiWizard2,
private openNativeSettings: OpenNativeSettings,
private devicePermissionsService:DevicePermissionsService
private devicePermissionsService:DevicePermissionsService,
private geolocation: Geolocation,
public backgroundGeolocation: BackgroundGeolocation
) {}
ngOnInit() {
@ -59,7 +69,6 @@ export class AttendanceOptionsComponent implements OnInit {
this.priviligeList = AuthenticationService.servicePrivilage;
this.setServicesPrivilage();
this.checkNFCStatus("one");
}
async checkNFCStatus(checkValue: string) {
@ -110,6 +119,24 @@ export class AttendanceOptionsComponent implements OnInit {
) {
this.serviceEnableWifi = true;
}
if (
servicePrivilage.Previlege &&
servicePrivilage.ServiceName === "enableLocationQR"
) {
this.enableLocationQR = true;
}
if (
servicePrivilage.Previlege &&
servicePrivilage.ServiceName === "enableLocationNFC"
) {
this.enableLocationNFC = true;
}
if (
servicePrivilage.Previlege &&
servicePrivilage.ServiceName === "enableLocationWIFI"
) {
this.enableLocationWIFI = true;
}
}
}
@ -130,6 +157,7 @@ export class AttendanceOptionsComponent implements OnInit {
component: NfcModalComponent,
showBackdrop: true,
backdropDismiss: true,
componentProps:{ enableLocationNFC: this.enableLocationNFC, lat: this.lat, longt: this.longt},
});
modal.cssClass = "nfc-modal";
await modal.present();
@ -138,12 +166,13 @@ export class AttendanceOptionsComponent implements OnInit {
public swipeAttendanceNFC(nfcSerialCode: any) {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.PointType = 2;
request.Latitude = 0;
request.Longitude = 0;
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = "";
request.NFCValue = nfcSerialCode;
request.UID = this.device.uuid;
request.UserName = this.userData.EMPLOYEE_NUMBER;
request.IsGpsRequired = this.enableLocationNFC;
this.attendance_service
.attendanceSwipeScanner(request, () => {
console.log("Error inside in swipe attendance");
@ -171,9 +200,28 @@ export class AttendanceOptionsComponent implements OnInit {
}
public startQRCode() {
this.attendScanService.getDeviceLocation();
if (this.enableLocationQR) {
this.attendScanService.getDeviceLocation();
} else {
this.attendScanService.attendance(false);
}
}
public startNFCCode() {
if (this.enableLocationNFC) {
this.getDeviceLocation('NFC');
} else {
this.checkNFCStatus('two');
}
}
public startWIFICode() {
if (this.enableLocationWIFI) {
this.getDeviceLocation('WIFI');
} else {
this.startWifi();
}
}
// Wifi Attendance
public async startWifi() {
@ -181,15 +229,14 @@ export class AttendanceOptionsComponent implements OnInit {
const isIOS = this.platform.is("ios");
const isWifiEnabled = await this.wifiWizard2.isWifiEnabled();
if(isIOS){
if (isIOS) {
if(!isWifiEnabled){
this.showWifiNotEnabled();
return;
}
}else if(isAndroid){
} else if(isAndroid) {
let locationPermission = await this.devicePermissionsService.requestLocationAutherization();
if(!locationPermission){
if (!locationPermission) {
return;
}
@ -198,30 +245,95 @@ export class AttendanceOptionsComponent implements OnInit {
this.startWifi();
}).catch((err) => {
console.debug(err);
this.showWifiNotEnabled();
});
return;
}
}
// opening wifi dailog if all above conditions are passed (isWifiEnabled == true)
let modal = await this.modalController.create({
component: WifiModalComponent,
showBackdrop: true,
backdropDismiss: false,
componentProps:{ enableLocationWIFI: this.enableLocationWIFI, lat: this.lat, longt: this.longt},
});
modal.cssClass = "wifi-modal";
await modal.present();
}
}
showWifiNotEnabled(){
this.common.showErrorMessageDialog(()=>{
// this.openNativeSettings.open('wifi').then(()=>{});
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general","wifi-not-enable-text"));
}
getDeviceLocation(source: string) {
this.isFakeLocationUsed = false;
this.devicePermissionsService.requestLocationAutherization().then(granted => {
this.location = granted as boolean;
if (this.location) {
if (this.platform.is('android')) {
this.backgroundGeolocation.getCurrentLocation({ timeout: 10000, enableHighAccuracy: true, maximumAge: 3000 }).then((resp) => {
if (resp && (resp.latitude && resp.longitude)) {
if (resp.isFromMockProvider || resp.mockLocationsEnabled) {
this.isFakeLocationUsed = true;
this.fakeSwipeAttendance(source);
} else {
this.lat = resp.latitude;
this.longt = resp.longitude;
if (source === 'WIFI') {
this.startWifi();
} else if (source === 'NFC') {
this.checkNFCStatus('two');
}
}
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}, (error) => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
} else {
this.geolocation.getCurrentPosition({maximumAge: 3000, timeout: 10000, enableHighAccuracy: true}).then(resp => {
if(resp && resp.coords.latitude && resp.coords.longitude) {
this.lat = resp.coords.latitude;
this.longt = resp.coords.longitude;
if (source === 'WIFI') {
this.startWifi();
} else if (source === 'NFC') {
this.checkNFCStatus('two');
}
} else {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
}
}).catch(error => {
this.common.presentAlert(this.ts.trPK('home', 'position-error'));
});
}
} else {
return false;
}
});
}
fakeSwipeAttendance(sourceName: string) {
const request: any = {};
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = '';
request.NFCValue = sourceName === 'NFC' ? sourceName : '';
request.WifiValue = sourceName === 'WIFI' ? sourceName : '';
request.UID = this.deviceID;
request.EmployeeID = this.userData.EMPLOYEE_NUMBER;
this.attendance_service.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');})
.subscribe((result: Response) => {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'fake-location'));
}
});
}
}

@ -18,6 +18,7 @@ export class attendanceSwipeScannerRequest extends Request{
public PointType: number;
public NFCValue: string;
public WifiValue: string;
public IsGpsRequired: boolean;
}

@ -19,6 +19,9 @@ export class NfcModalComponent implements OnInit {
public userData: any = {};
public gifStatus = false;
public nfcReader: any;
public enableLocationNFC: boolean;
public lat: number;
public longt: number;
constructor(
private nfc: NFC,
@ -34,6 +37,7 @@ export class NfcModalComponent implements OnInit {
ngOnInit() {
this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
this.startAndroidNfc();
console.log(this.enableLocationNFC);
}
ionViewDidLeave() {
@ -56,12 +60,13 @@ export class NfcModalComponent implements OnInit {
this.nfcReader.unsubscribe();
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.PointType = 2;
request.Latitude = 0;
request.Longitude = 0;
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = "";
request.NFCValue = nfcSerialCode;
request.UID = this.device.uuid;
request.UserName = this.userData.EMPLOYEE_NUMBER;
request.IsGpsRequired = this.enableLocationNFC;
this.attendance_service.attendanceSwipeScanner(request, () => {
console.log('Error inside in swipe attendance');
this.modalController.dismiss();

@ -22,6 +22,9 @@ export class WifiModalComponent implements OnInit {
private ssid = CommonService.MOHEMM_WIFI_SSID;
private password = CommonService.MOHEMM_WIFI_PASSWORD;
private algo = 'WPA';
public enableLocationWIFI: boolean;
public lat: number;
public longt: number;
constructor(
public common: CommonService,
@ -77,7 +80,7 @@ export class WifiModalComponent implements OnInit {
console.debug("Wifi Connected: Verified Access | " + value + " | " + ssid_);
setTimeout(() => {
this.swipeAttendanceWifi(ssid_);
},2000);
},6000);
}else{
this.showErrorInvalidWorkspace();
}
@ -134,13 +137,14 @@ export class WifiModalComponent implements OnInit {
async swipeAttendanceWifi(code:any) {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.PointType = 3;
request.Latitude = 0;
request.Longitude = 0;
request.Latitude = this.lat;
request.Longitude = this.longt;
request.QRValue = "";
request.NFCValue = "";
request.WifiValue = "100";
request.UID = this.device.uuid;
request.UserName = this.userData.EMPLOYEE_NUMBER;
request.IsGpsRequired = this.enableLocationWIFI;
this.attendance_service
.attendanceSwipeScanner(request, () => {

@ -105,4 +105,10 @@
// font-weight: bold;
// }
.no-padding-label {
padding: 0px !important;
}
.margin-left {
margin-left: 30px;
}

@ -1,4 +1,4 @@
import { Component, OnInit, ElementRef } from '@angular/core';
import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListBodyRequest } from '../models/NotificationBodyReq';
@ -35,6 +35,7 @@ import { MOItemHistoryRes } from '../models/MOItemHistoryRes';
import { MOItemHistoryReq } from '../models/MOItemHistoryReq';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-worklist-main-mr',
@ -43,6 +44,7 @@ import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbore
})
export class WorklistMainMRComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest;
@ -141,12 +143,57 @@ export class WorklistMainMRComponent implements OnInit {
this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail();
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
if(this.activeSegment === 'item-req')
{
this.slides.slideTo(0);
}
else if(this.activeSegment === 'action-history')
{
this.slides.slideTo(1);
}
else if(this.activeSegment === 'attach')
{
this.slides.slideTo(2);
}
else if(this.activeSegment === 'info')
{
this.slides.slideTo(3);
}
console.log(" event.detail.value: " + event.detail.value);
}
public slideChanged(event: any) {
this.slides.getActiveIndex().then(index => {
console.log(index);
console.log(event);
if(index === 0)
{
this.activeSegment = 'item-req';
}
else if(index === 1)
{
this.activeSegment = 'action-history';
}
else if(index === 2)
{
this.activeSegment = 'attach';
}
else if(index === 3)
{
this.activeSegment = 'info';
}
console.log(this.activeSegment);
});
}
public segmentChanged(event: any) {
public segmentChanged1(event: any) {
this.activeSegment = event.detail.value;
console.log(' event.detail.value: ' + event.detail.value);
}

@ -107,4 +107,11 @@
// padding-top: 10px;
// font-weight: bold;
// }
.no-padding-label {
padding: 0px !important;
}
.margin-left {
margin-left: 30px;
}

@ -1,4 +1,4 @@
import { Component, OnInit, ElementRef } from "@angular/core";
import { Component, OnInit, ElementRef, ViewChild } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListBodyRequest } from "../models/NotificationBodyReq";
@ -37,6 +37,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-worklist-main-po',
@ -44,6 +45,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo
styleUrls: ['./worklist-main-po.component.scss'],
})
export class WorklistMainPoComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest;
@ -148,14 +150,59 @@ export class WorklistMainPoComponent implements OnInit {
}
ngOnInit() {
this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail();
}//ngOn
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
if(this.activeSegment === 'line_details')
{
this.slides.slideTo(0);
}
else if(this.activeSegment === 'action-history')
{
this.slides.slideTo(1);
}
else if(this.activeSegment === 'attach')
{
this.slides.slideTo(2);
}
else if(this.activeSegment === 'info')
{
this.slides.slideTo(3);
}
console.log(" event.detail.value: " + event.detail.value);
}
public slideChanged(event: any) {
this.slides.getActiveIndex().then(index => {
console.log(index);
console.log(event);
if(index === 0)
{
this.activeSegment = 'line_details';
}
else if(index === 1)
{
this.activeSegment = 'action-history';
}
else if(index === 2)
{
this.activeSegment = 'attach';
}
else if(index === 3)
{
this.activeSegment = 'info';
}
console.log(this.activeSegment);
});
}
}//ngOn
intializeNotificationDetail() {
this.approveDis = false;
this.rejectDis = false;
@ -211,7 +258,7 @@ export class WorklistMainPoComponent implements OnInit {
}
}
public segmentChanged(event: any) {
public segmentChanged1(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
}

@ -1,424 +1,297 @@
<app-generic-header
*ngIf="!messageSuccess"
showBack="true"
backLink="/notification/homepage"
[headerText]="'worklistMain,title' | translate">
<app-generic-header *ngIf="!messageSuccess" showBack="true" backLink="/notification/homepage"
[headerText]="'worklistMain,title' | translate">
</app-generic-header>
<ion-content class="colorBG">
<div *ngIf="!messageSuccess">
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part -->
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, itemReq'| translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, attach-file' | translate}}
<ion-content class="colorBG">
<div *ngIf="!messageSuccess">
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part -->
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)" [value]="activeSegment"
class="ion-segment-all">
<ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label class="no-padding-label margin-left"> {{'worklistMain, itemReq'| translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
<ion-label class="no-padding-label"> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button>
<ion-segment-button value="attach"
[ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
<ion-label class="no-padding-label"> {{'worklistMain, attach-file' | translate}}
</ion-label>
</ion-segment-button>
<ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button>
</ion-segment>
<ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ion-card class="cardContent">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
</ion-card-header> -->
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
</ion-col>
<!-- </ion-row> -->
<!-- <ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' "> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
<br />
</ion-col>
<ion-col>
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
</ion-col>
</ion-row> -->
<!-- notificationBodyRes -->
<div *ngFor="let header of PRHeader">
<ion-row
*ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'">
<!-- *ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"> -->
<ion-col>
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
<br />
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
</ion-col>
</ion-row>
</div>
<br />
<ion-grid>
<div>
<ion-row style="text-align: center !important">
<ion-col *ngIf="totalH">
<div class="colItemReq" style="text-align: center !important">{{totalH}}</div>
<div class="">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="">{{taxvalueH}}</div>
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-grid>
<button *ngIf="!IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">
{{ 'general, load-more' | translate}}
</button>
</ion-card-content>
</ion-card>
</ng-container>
<ng-container *ngIf="activeSegment === 'item-req'">
<!-- <ion-card class="cardContent"> -->
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
</ion-card-header> -->
<!-- <ion-card-content> -->
<div [hidden]="PRLines && PRLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
</ion-segment-button>
<ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label class="no-padding-label"> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button>
</ion-segment>
<accordin-custom>
<accordin-tab-custom *ngFor="let Lines of PRLines; let i=index;" [header]="Lines.DESCRIPTION">
<div class="itemReqDiv">
<!-- <ion-row>
<ion-col class="colItemReqHeader">
<label for="">{{i+1}}. {{Lines.DESCRIPTION}} </label>
<ion-slides #slides (ionSlideDidChange)="slideChanged($event)">
<ion-slide>
<ng-container *ngIf="activeSegment === 'item-req'">
<div [hidden]="PRLines && PRLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<accordin-custom>
<accordin-tab-custom *ngFor="let Lines of PRLines; let i=index;" [header]="Lines.DESCRIPTION" [show]="i === 0 ? true: false">
<div class="itemReqDiv" style="width: 100% !important;">
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}}
</label>
<br />
<ion-label class="labelValue" for="">{{Lines.COST_CENTER}} </ion-label>
</ion-col>
</ion-row> -->
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.COST_CENTER}} </ion-label>
</ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} ({{ 'general, sar' | translate}})</label>
<br />
<ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems" [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} ({{ 'general, sar' | translate}})</label>
<br />
<ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ITEM_AMU')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.ITEM_AMU}} </ion-label>
</ion-col>
</ion-row>
</div>
</accordin-tab-custom>
</accordin-custom>
</ng-container>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent">
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes; let index=index">
<div class="timeline-item" slot="start">
<!-- <div>
<button ion-button
(click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png">
</button>
</div> -->
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png">
</div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;">
{{actionHistory.NAME}}
</ion-label>
<div *ngIf="actionHistory.NOTE">
<div *ngIf="actionHistory.NOTE != '' ">
<div *ngIf="!checkLines(actionHistory.NOTE)">
<div class="containerNote">
Note: {{actionHistory.NOTE}}
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} ({{ 'general, sar'
| translate}})</label>
<br />
<ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems" [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} ({{ 'general, sar' |
translate}})</label>
<br />
<ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ITEM_AMU')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.ITEM_AMU}} </ion-label>
</ion-col>
</ion-row>
</div>
</accordin-tab-custom>
</accordin-custom>
</ng-container>
</ion-slide>
<ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent" style="width: 100% i !important;">
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes; let index=index">
<div class="timeline-item" slot="start">
<div
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png">
</div>
</div>
<div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote" [ngClass]="actionHistory.visible ? 'show' : '' ">
Note: {{actionHistory.NOTE}}
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;">
{{actionHistory.NAME}}
</ion-label>
<div *ngIf="actionHistory.NOTE">
<div *ngIf="actionHistory.NOTE != '' ">
<div *ngIf="!checkLines(actionHistory.NOTE)">
<div class="containerNote">
Note: {{actionHistory.NOTE}}
</div>
</div>
<div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote"
[ngClass]="actionHistory.visible ? 'show' : '' ">
Note: {{actionHistory.NOTE}}
</div>
<button class="showMore"
(click)="actionHistory.visible = !actionHistory.visible">{{
actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div>
</div>
</div>
<button class="showMore"
(click)="actionHistory.visible = !actionHistory.visible">{{ actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div>
</div>
<!-- *ngIf="!checkLines(actionHistory.NOTE)" -->
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''"
class="dateActionHistory">
{{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
</ion-item>
</div>
<!-- [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" -->
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory">
{{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
</ion-item>
</div>
</ion-list>
</div>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">
{{ 'general, load-more' | translate}} </button>
</ion-card-content>
</ion-card>
</ng-container>
<ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent">
</ion-list>
</div>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">
{{ 'general, load-more' | translate}} </button>
</ion-card-content>
</ion-card>
</ng-container>
</ion-slide>
<ion-slide>
<ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent" style="width: 100% !important;">
<ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ; let i=index;">
<!-- <div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
</div>
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'txt'"> <img float-start class="attachImg"
src="../assets/imgs/doc.png">
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div
*ngIf="attachList.FILE_CONTENT_TYPE != 'txt' && attachList.FILE_CONTENT_TYPE != 'PDF' && attachList.FILE_CONTENT_TYPE != 'pdf' && attachList.FILE_CONTENT_TYPE != 'png' && attachList.FILE_CONTENT_TYPE != 'jpeg' && attachList.FILE_CONTENT_TYPE != 'jpg' && attachList.FILE_CONTENT_TYPE != 'PNG' && attachList.FILE_CONTENT_TYPE != 'JPEG' && attachList.FILE_CONTENT_TYPE != 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/nonfile.png">
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ; let i=index;">
<ion-label style="color: black !important">
{{i+1}}. {{attachList.FILE_NAME}} </ion-label>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
</ion-item>
</ion-grid>
</div>
<div
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div> -->
<ion-label style="color: black !important">
{{i+1}}. {{attachList.FILE_NAME}} </ion-label>
</ion-card-content>
</ion-card>
</ng-container>
</ion-slide>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
<ion-slide>
<ng-container *ngIf="activeSegment === 'info'">
<ion-grid>
<ion-row>
<ion-col>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-card class="cardContent" style="width: 90% !important;">
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
</ion-col>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<div *ngFor="let header of PRHeader">
<ion-row
*ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'">
<ion-col>
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
<br />
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
</ion-col>
</ion-row>
</div>
<br />
<ion-grid>
<div>
<ion-row style="text-align: center !important">
<ion-col *ngIf="totalH">
<div class="colItemReq" style="text-align: center !important">{{totalH}}</div>
<div class="">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="">{{taxvalueH}}</div>
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-grid>
<button *ngIf="!IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">
{{ 'general, load-more' | translate}}
</button>
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
</ion-grid>
</ng-container>
</ion-slide>
</ion-slides>
</ion-item>
</ion-grid>
</div>
</ion-card-content>
</ion-card>
</ng-container>
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFieldsPR">
</div>
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFieldsPR">
</div>
</ion-col>
</ion-row>
</div>
<div *ngIf="messageSuccess" class="succssfullMSG">
<ion-col size="12">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
</ion-col>
<ion-col size="12">
<div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div>
</ion-col>
</ion-row>
</div>
<div *ngIf="messageSuccess" class="succssfullMSG">
<ion-col size="12">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
</ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div> </ion-col>
</div>
</div>
</ion-content>
<ion-footer *ngIf="!messageSuccess" class="footerSearchBtn">
@ -487,41 +360,41 @@
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">
<img src="../assets/imgs/action-reject.png">
<!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="requestDis" (click)="actionButton('REQUEST_INFO')">
<img src="../assets/imgs/action-info.png">
<!-- <ion-label> {{'worklistMain, request' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{reqInfo_label}}</ion-label>
<ion-label style="white-space: nowrap"> {{reqInfo_label}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<img src="../assets/imgs/action-skip.png">
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label> {{'worklistMain, more' | translate}}</ion-label>
<ion-label> {{'worklistMain, more' | translate}}</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>

@ -103,4 +103,12 @@
// text-align: center;
// padding-top: 10px;
// font-weight: bold;
// }
// }
.no-padding-label {
padding: 0px !important;
}
.margin-left {
margin-left: 30px;
}

@ -1,4 +1,4 @@
import { Component, OnInit, ElementRef } from '@angular/core';
import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListBodyRequest } from '../models/NotificationBodyReq';
@ -33,6 +33,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-worklist-main-pr',
@ -40,6 +41,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo
styleUrls: ['./worklist-main-pr.component.scss'],
})
export class WorklistMainPRComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
public isPostNoLoad = true;
public worklistNotifications: any;
public totalRequestCount = 0;
@ -138,13 +140,53 @@ export class WorklistMainPRComponent implements OnInit {
this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail();
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
if(this.activeSegment === 'item-req')
{
this.slides.slideTo(0);
}
else if(this.activeSegment === 'action-history')
{
this.slides.slideTo(1);
}
else if(this.activeSegment === 'attach')
{
this.slides.slideTo(2);
}
else if(this.activeSegment === 'info')
{
this.slides.slideTo(3);
}
console.log(" event.detail.value: " + event.detail.value);
}
public slideChanged(event: any) {
this.slides.getActiveIndex().then(index => {
console.log(index);
console.log(event);
if(index === 0)
{
this.activeSegment = 'item-req';
}
else if(index === 1)
{
this.activeSegment = 'action-history';
}
else if(index === 2)
{
this.activeSegment = 'attach';
}
else if(index === 3)
{
this.activeSegment = 'info';
}
console.log(this.activeSegment);
});
}
intializeNotificationDetail() {
@ -209,7 +251,7 @@ export class WorklistMainPRComponent implements OnInit {
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
public segmentChanged(event: any) {
public segmentChanged1(event: any) {
this.activeSegment = event.detail.value;
console.log(' event.detail.value: ' + event.detail.value);
}

@ -308,72 +308,74 @@
</ion-slide>
<ion-slide>
<ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; " style="width: 91%;">
<ion-card-content *ngIf="item.Collection_Notification.length > 0">
<div>
<ion-row *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' ">
<ion-col class="rowBorder"
*ngFor="let notificationBody of item.Collection_Notification;" size="6"
[hidden]="notificationBody.DISPLAY_FLAG == 'N'">
<label class="colItemReq" for="">{{notificationBody.SEGMENT_PROMPT}}</label>
<br />
<label for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
<div style="margin: 10px;font-weight: bold; "
*ngIf="subordinatesleaveList != undefined && subordinatesleaveList?.length > 0">
{{ts.trPK('worklistMain','employee-on-leave')}} </div>
<ion-item lines="none" [ngClass]=" direction === 'en' ? 'subOrdinateList' :'subOrdinateList-Ar' "
*ngFor="let List of subordinatesleaveList;">
<ion-grid>
<ion-row>
<ion-col>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
</ion-col>
</ion-row>
<ion-grid [ngClass]=" direction === 'en' ? 'gridSubordinates' :'gridSubordinates-Ar' ">
<div [ngClass]=" direction === 'en' ? 'subOrdinateDiv' :'subOrdinateDiv-Ar' ">
<img *ngIf="List.EMPLOYEE_IMAGE" class="empImgeSub"
[src]="'data:image/png;base64,'+List.EMPLOYEE_IMAGE">
<img *ngIf="List.EMPLOYEE_IMAGE == null" class="empImgeSub"
src="../assets/imgs/profile.png">
</div>
<ion-row class="rowHeader "
[ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar' ">
<ion-col size="9">
<label style="font-weight: bold; " class="label" for="">{{List.EMPLOYEE_NAME}}
</label>
<br />
<label class="label" for="">{{List.POSITION_TITLE}} </label><br />
</ion-col>
<ion-col class="status" size="3">
<label class="label" style="font-size: 11px;" for="label">{{List.STATUS}}</label>
</ion-col>
</ion-row>
<br />
<ion-row [ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar'">
<ion-col>
<label class="label" for=""> {{ts.trPK('worklistMain','from')}}</label><br />
<label class="label" for="">{{List.DATE_START |date}}</label>
</ion-col>
<ion-col>
<label class="label" for="">{{ts.trPK('worklistMain','to')}}</label><br />
<label class="label" for="">{{List.DATE_END | date}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
<ion-row>
<ion-col>
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; " style="width: 91%;">
<ion-card-content *ngIf="item.Collection_Notification.length > 0">
<div>
<ion-row *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' ">
<ion-col class="rowBorder"
*ngFor="let notificationBody of item.Collection_Notification;" size="6"
[hidden]="notificationBody.DISPLAY_FLAG == 'N'">
<label class="colItemReq" for="">{{notificationBody.SEGMENT_PROMPT}}</label>
<br />
<label for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
<div style="margin: 10px;font-weight: bold; "
*ngIf="subordinatesleaveList != undefined && subordinatesleaveList?.length > 0">
{{ts.trPK('worklistMain','employee-on-leave')}}
</div>
<ion-item lines="none" [ngClass]=" direction === 'en' ? 'subOrdinateList' :'subOrdinateList-Ar' "
*ngFor="let List of subordinatesleaveList;">
<ion-grid [ngClass]=" direction === 'en' ? 'gridSubordinates' :'gridSubordinates-Ar' ">
<div [ngClass]=" direction === 'en' ? 'subOrdinateDiv' :'subOrdinateDiv-Ar' ">
<img *ngIf="List.EMPLOYEE_IMAGE" class="empImgeSub"
[src]="'data:image/png;base64,'+List.EMPLOYEE_IMAGE">
<img *ngIf="List.EMPLOYEE_IMAGE == null" class="empImgeSub"
src="../assets/imgs/profile.png">
</div>
<ion-row class="rowHeader "
[ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar' ">
<ion-col size="9">
<label style="font-weight: bold; " class="label" for="">{{List.EMPLOYEE_NAME}}
</label>
<br />
<label class="label" for="">{{List.POSITION_TITLE}} </label><br />
</ion-col>
<ion-col class="status" size="3">
<label class="label" style="font-size: 11px;" for="label">{{List.STATUS}}</label>
</ion-col>
</ion-row>
<br />
<ion-row [ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar'">
<ion-col>
<label class="label" for=""> {{ts.trPK('worklistMain','from')}}</label><br />
<label class="label" for="">{{List.DATE_START |date}}</label>
</ion-col>
<ion-col>
<label class="label" for="">{{ts.trPK('worklistMain','to')}}</label><br />
<label class="label" for="">{{List.DATE_END | date}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ng-container>
</ion-slide>
</ion-slides>

@ -27,24 +27,63 @@
</div>
<ion-grid *ngIf="personalInfo">
<div class="gridService">
<ion-grid *ngIf="personalInfo" style="position: relative; display: block; z-index: 5;">
<div [ngClass]=" direction == 'ltr' ? 'gridService-en' : 'gridService-ar'" style="background: #0B4775; border-radius: 20px;">
<ion-row>
<ion-col>
<label style="font-size: 12px; color: white; margin: 10px 0px 0px 0px; display: block; text-align: center;font-weight: bold;">
{{ 'general, appreciate-service' | translate}}
</label>
</ion-col>
</ion-row>
<ion-row [ngClass]=" direction == 'ltr' ? 'service-row-en' : 'service-row-ar'">
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_YEARS}}</label>
<br> <label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','years')}}</label>
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_YEARS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','years')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<div class="verticalLine"></div>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_MONTHS}}</label>
<br> <label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','months')}}</label>
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_MONTHS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('userProfile','months')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
<ion-col>
<div class="verticalLine"></div>
</ion-col>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_DAYS}}</label>
<br> <label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('absenceList','days')}}</label>
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_DAYS}}</label>
</ion-col>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col>
</ion-row>
</div>
</ion-grid>

@ -1,11 +1,19 @@
.list-ios {
// margin-left: 0;
// margin-right: 0;
// margin-top: 32px;
// margin-bottom: 32px;
// background: var(--ion-item-background,var(--ion-background-color,#fff));
margin-left: 0;
margin-right: 0;
margin-top: 32px;
margin-top: -15px;
margin-bottom: 32px;
background: var(--ion-item-background,var(--ion-background-color,#fff));
border: 1px solid #d8d8d8;
background: var(--ion-item-background, var(--ion-background-color, #fff));
border-radius: 10px;
padding-top: 60px;
}
.header-toolbar-new{
@ -76,33 +84,38 @@
}
.gridService{
// background-color: #269DB8;
.gridService-en{
margin-top: 87px;
border-radius: 10px;
margin-bottom: -49px;
margin-left: 14px;
margin-right: 14px;
margin-left: 30px;
margin-right: 30px;
}
.gridService-ar{
margin-top: 87px;
border-radius: 10px;
margin-bottom: -49px;
margin-left: 17px;
margin-right: 17px;
}
.columns{
margin: 10px;
background: #269DB8;
border-radius: 27px;
padding-left: 30px;
padding-right: 6px;
padding-top: 19px;
padding-bottom: 26px;
// margin: 10px;
// background: #0B4775;
// border-radius: 27px;
// padding-left: 30px;
// padding-right: 6px;
// padding-top: 19px;
// padding-bottom: 26px;
}
.columns-ar{
margin: 10px;
background: #269DB8;
border-radius: 27px;
padding-left: 7px;
padding-right: 3px;
padding-top: 19px;
padding-bottom: 26px;
// margin: 10px;
// background: #0B4775;
// border-radius: 27px;
// padding-left: 7px;
// padding-right: 3px;
// padding-top: 19px;
// padding-bottom: 26px;
}
.service{
@ -125,7 +138,7 @@
margin-right: 26px;
}
.services-ar{
font-size: 14px;
font-size: 20px;
color: white;
margin-right: 25px;
}
@ -134,8 +147,8 @@
margin-left: 14px;
margin-right: 14px;
border-radius: 10px;
background: white;
border: solid #bebbbb !important;
// background: white;
border:#bebbbb !important;
padding: 2px;
}
.p{
@ -183,4 +196,21 @@
color: grey;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
}
.verticalLine {
width:1%;
height:50px;
background:white;
margin-top: 100%;
// margin-left: 10%;
}
.service-row-en{
width: 79%;
margin: -12px 0px 0px 35px;
}
.service-row-ar{
width: 95%;
margin: -12px 0px 35px 0px;
}

@ -33,6 +33,7 @@ ion-col.colBold, ion-col.colBold > label{
border-radius: 50% !important;
position: relative;
color: #7f8c8d;
height: 35px;
}
@ -45,7 +46,7 @@ ion-col.colBold, ion-col.colBold > label{
.changeImgBtn-ar{
position: absolute;
top: 80%;
left: 74%;
left: 66%;
}
.profileImg{
width: 160px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

@ -932,12 +932,20 @@
"ar": "إلغاء"
},
"wifi-connect-message": {
"en": "Please wait",
"ar": "أرجو الإنتظار"
"en": "Connecting",
"ar": "توصيل"
},
"success-attendance": {
"en": "Your attendance is marked successfully.",
"ar": "تم تسجيل حضورك بنجاح"
},
"digital-id":{
"en":"Employee Digital ID",
"ar":"هوية الموظف الرقمية"
},
"appreciate-service":{
"en":"We appreciate you for completing the service of",
"ar":"نحن نقدر لك استكمال خدمة"
}
},
"home": {
@ -1060,8 +1068,8 @@
"ar": "بحث متقدم"
},
"No-data-available": {
"en": "No Data Available",
"ar": "لا يوجد بيانات"
"en": "No History Available",
"ar": "لا يوجد محفوظات متاحة"
}
},
"userProfile": {

@ -1545,3 +1545,11 @@ table.monthview-datetable th small {
.disable-button-opacity {
opacity: .2;
}
.digital-id-modal-css .modal-wrapper {
height: 90%;
width: 90%;
top: 3%;
position: absolute;
display: block;
}

@ -16,6 +16,7 @@
.itemReqList{
background: #f0efef;
margin-top: 20px;
width: 100%;
// width: 95%;
// margin-left:9px

Loading…
Cancel
Save