q1 changes

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

@ -57,6 +57,16 @@
</ion-label> </ion-label>
</ion-item> </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> </ion-list>
<div class="" style="text-align:center"> <div class="" style="text-align:center">
@ -128,6 +138,16 @@
</button> --> </button> -->
</ion-item> </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-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">

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

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; 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 { TranslatorService } from './hmg-common/services/translator/translator.service';
import { CommonService } from './hmg-common/services/common/common.service'; import { CommonService } from './hmg-common/services/common/common.service';
import { AuthenticationService } from './hmg-common/services/authentication/authentication.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 { DomSanitizer } from '@angular/platform-browser';
import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { DigitalIdComponent } from './authentication/digital-id/digital-id.component';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -37,6 +38,8 @@ export class AppComponent implements OnInit {
DeviceToken: string; // this.deviceToken DeviceToken: string; // this.deviceToken
}; };
private digitalIDUser: any;
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
private cs: CommonService, private cs: CommonService,
@ -50,6 +53,7 @@ export class AppComponent implements OnInit {
public pushService: PushService, public pushService: PushService,
private splashScreen: SplashScreen, private splashScreen: SplashScreen,
public router: Router, public router: Router,
public modalController: ModalController
) { ) {
this.events.subscribe('img-change', displayImg => { this.events.subscribe('img-change', displayImg => {
console.log('app compont: ' + displayImg); console.log('app compont: ' + displayImg);
@ -116,6 +120,7 @@ export class AppComponent implements OnInit {
this.events.subscribe('setMenu', () => { this.events.subscribe('setMenu', () => {
const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) { if (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 : 'Powered By Cloud Solutions';
this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME; this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME;
@ -186,6 +191,17 @@ export class AppComponent implements OnInit {
this.menu.toggle(); 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() { private changeImage() {
this.cs.openChangeImagePage(); this.cs.openChangeImagePage();
this.menu.toggle(); this.menu.toggle();

@ -18,10 +18,11 @@ 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';
@NgModule({ @NgModule({
declarations: [AppComponent], declarations: [AppComponent, DigitalIdComponent],
entryComponents: [], entryComponents: [DigitalIdComponent],
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,

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

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

@ -66,4 +66,9 @@
</ion-grid> </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> </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 { SMSCheckRequest } from 'src/app/hmg-common/services/authentication/models/smscheck.request';
import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response'; import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response';
import { PushService } from 'src/app/hmg-common/services/push/push.service'; 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 { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response';
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';
@Component({ @Component({
selector: 'app-confirm-login', selector: 'app-confirm-login',
@ -49,6 +50,8 @@ export class ConfirmLoginComponent implements OnInit {
private iosLink: string; private iosLink: string;
private androidLink: string; private androidLink: string;
public isNFCAvailable = false; public isNFCAvailable = false;
direction:string;
userInfo: any;
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
@ -58,6 +61,7 @@ export class ConfirmLoginComponent implements OnInit {
private faio: FingerprintAIO, private faio: FingerprintAIO,
public pushService: PushService, public pushService: PushService,
public platform: Platform, public platform: Platform,
public modalController: ModalController,
private nfc: NFC private nfc: NFC
) { ) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
@ -75,6 +79,8 @@ export class ConfirmLoginComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.checkNFCStatus(); this.checkNFCStatus();
// **checkIfAvailable FAIO **// // **checkIfAvailable FAIO **//
this.checkIfAvailable(); 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 /> <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 class="login-input" required type="password" [(ngModel)]="password" placeholder="{{ts.trPK('login','password')}}">
</ion-input> </ion-input>
<button ion-button clear class="forgetText" type="button" (click)="forgetPasswordPage()" item-right >
{{ts.trPK('login','forgot-password')}}
</button>
</ion-item> </ion-item>
<div class="centerDiv signupDiv" *ngIf="isAppleStore==false"> <div class="centerDiv signupDiv" *ngIf="isAppleStore==false">
@ -40,6 +37,8 @@
</div> </div>
</div> </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>
@ -47,6 +46,17 @@
<div class="centerDiv" style="margin-top: 20px !important;"> <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> <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> </div>
</ion-content> </ion-content>

@ -141,6 +141,22 @@ img.centerDiv {
--min-height: 1.6cm !important; --min-height: 1.6cm !important;
width: 315px; 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 { .content {
width: 500px; width: 500px;
margin-left: auto; margin-left: auto;
@ -228,3 +244,18 @@ img.centerDiv {
margin-top:20px; margin-top:20px;
margin-right: 15%; 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 { PushService } from 'src/app/hmg-common/services/push/push.service';
import { KeyboardService } from 'src/app/hmg-common/services/keyboard/keyboard.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 { 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({ @Component({
selector: 'login', selector: 'login',
@ -26,6 +28,7 @@ import { KeyboardStatusModel } from 'src/app/hmg-common/services/keyboard/keyboa
}) })
export class LoginComponent implements OnInit, OnDestroy { export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any; deviceToken1: any;
userInfo: any;
constructor( constructor(
public cs: CommonService, public cs: CommonService,
@ -42,7 +45,8 @@ export class LoginComponent implements OnInit, OnDestroy {
public sharedData: SharedDataService, public sharedData: SharedDataService,
public plt: Platform, public plt: Platform,
public pushService: PushService, public pushService: PushService,
public keyboardService: KeyboardService public keyboardService: KeyboardService,
public modalController: ModalController
) { ) {
this.events.subscribe('logoutFlage', logoutFlage => { this.events.subscribe('logoutFlage', logoutFlage => {
console.log('login compont logoutFlage: ' + logoutFlage); console.log('login compont logoutFlage: ' + logoutFlage);
@ -99,6 +103,7 @@ export class LoginComponent implements OnInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.monitorKeyboardChange(); this.monitorKeyboardChange();
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
this.currentLang = TranslatorService.getCurrentLanguageCode(); this.currentLang = TranslatorService.getCurrentLanguageCode();
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) { if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
@ -378,4 +383,13 @@ export class LoginComponent implements OnInit, OnDestroy {
}); });
} }
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 { export class AttendScanService {
location: boolean; location: boolean;
camera: boolean; camera: boolean;
lat: any; lat = 0;
longt: any; longt = 0;
deviceID: string; deviceID: string;
scannedResult: any; scannedResult: any;
userData: any = {}; userData: any = {};
public isFakeLocationUsed = false; public isFakeLocationUsed = false;
public isGpsRequired = false;
constructor(private device: Device, constructor(private device: Device,
private zbar: ZBar, private zbar: ZBar,
@ -51,6 +52,7 @@ export class AttendScanService {
} }
getDeviceLocation() { getDeviceLocation() {
this.isGpsRequired = true;
this.isFakeLocationUsed = false; this.isFakeLocationUsed = false;
const isVirtual = this.device.isVirtual; const isVirtual = this.device.isVirtual;
if (isVirtual === true) { if (isVirtual === true) {
@ -69,7 +71,7 @@ export class AttendScanService {
} }
this.lat = resp.latitude; this.lat = resp.latitude;
this.longt = resp.longitude; this.longt = resp.longitude;
this.attendance(); this.attendance(true);
} else { } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); this.common.presentAlert(this.ts.trPK('home', 'position-error'));
@ -82,7 +84,7 @@ export class AttendScanService {
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(true);
} else { } else {
this.common.presentAlert(this.ts.trPK('home', 'position-error')); 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.permissions.requestCameraAutherization().then(granted => {
this.camera = granted as boolean; this.camera = granted as boolean;
if (this.camera) { if (this.camera) {
@ -130,6 +137,8 @@ export class AttendScanService {
request.Latitude = this.lat; request.Latitude = this.lat;
request.Longitude = this.longt; request.Longitude = this.longt;
request.QRValue = this.scannedResult.text; request.QRValue = this.scannedResult.text;
request.NFCValue = '';
request.WIFIValue = '';
request.UID = this.deviceID; request.UID = this.deviceID;
request.EmployeeID = this.userData.EMPLOYEE_NUMBER; request.EmployeeID = this.userData.EMPLOYEE_NUMBER;
this.attendance_service.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');}) this.attendance_service.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');})
@ -150,6 +159,7 @@ export class AttendScanService {
request.NFCValue = ''; request.NFCValue = '';
request.UID = this.deviceID; request.UID = this.deviceID;
request.UserName = this.userData.EMPLOYEE_NUMBER; request.UserName = this.userData.EMPLOYEE_NUMBER;
request.IsGpsRequired = this.isGpsRequired;
console.log('request'); console.log('request');
console.log(JSON.stringify(request)); console.log(JSON.stringify(request));
this.attendance_service this.attendance_service

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

@ -22,22 +22,9 @@ export class ConnectorService {
}; };
public static retryTimes = 0; public static retryTimes = 0;
public static timeOut = 120 * 1000; 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://uat.hmgwebservices.com/';
public static host = 'https://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) {} constructor(public httpClient: HttpClient, public cs: CommonService) {}

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

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

@ -21,7 +21,7 @@
<ion-row padding> <ion-row padding>
<ion-col size="5" [ngClass]="{'margin-col': direction === 'en', 'disable-attendance': !serviceEnableNFC}" class="buttonStyle" > <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" /> <img src="../assets/imgs/nfc_icon.png" />
<p>{{ "general, nfc-text" | translate }}</p> <p>{{ "general, nfc-text" | translate }}</p>
</div> </div>
@ -42,7 +42,7 @@
<ion-row padding> <ion-row padding>
<ion-col size="5" [ngClass]="{'margin-col': direction === 'en', 'disable-attendance': !serviceEnableWifi}" class="buttonStyle" > <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" /> <img src="../assets/imgs/wifi_icon.png" />
<p>{{ "general, wifi-text" | translate }}</p> <p>{{ "general, wifi-text" | translate }}</p>
</div> </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 { 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 { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
@Component({ @Component({
@ -32,8 +33,15 @@ export class AttendanceOptionsComponent implements OnInit {
public serviceEnableNFC = false; public serviceEnableNFC = false;
public serviceEnableQR = false; public serviceEnableQR = false;
public serviceEnableWifi = false; public serviceEnableWifi = false;
public enableLocationQR = false;
public enableLocationNFC = false;
public enableLocationWIFI = false;
public deviceNFC = false; public deviceNFC = false;
public nfcIOSSuccess = false; public nfcIOSSuccess = false;
public lat = 0;
public longt = 0;
public isFakeLocationUsed = false;
public deviceID: string;
constructor( constructor(
private nfc: NFC, private nfc: NFC,
@ -47,7 +55,9 @@ export class AttendanceOptionsComponent implements OnInit {
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,
public backgroundGeolocation: BackgroundGeolocation
) {} ) {}
ngOnInit() { ngOnInit() {
@ -59,7 +69,6 @@ export class AttendanceOptionsComponent implements OnInit {
this.priviligeList = AuthenticationService.servicePrivilage; this.priviligeList = AuthenticationService.servicePrivilage;
this.setServicesPrivilage(); this.setServicesPrivilage();
this.checkNFCStatus("one"); this.checkNFCStatus("one");
} }
async checkNFCStatus(checkValue: string) { async checkNFCStatus(checkValue: string) {
@ -110,6 +119,24 @@ export class AttendanceOptionsComponent implements OnInit {
) { ) {
this.serviceEnableWifi = true; 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, component: NfcModalComponent,
showBackdrop: true, showBackdrop: true,
backdropDismiss: true, backdropDismiss: true,
componentProps:{ enableLocationNFC: this.enableLocationNFC, lat: this.lat, longt: this.longt},
}); });
modal.cssClass = "nfc-modal"; modal.cssClass = "nfc-modal";
await modal.present(); await modal.present();
@ -138,12 +166,13 @@ export class AttendanceOptionsComponent implements OnInit {
public swipeAttendanceNFC(nfcSerialCode: any) { public swipeAttendanceNFC(nfcSerialCode: any) {
const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest();
request.PointType = 2; request.PointType = 2;
request.Latitude = 0; request.Latitude = this.lat;
request.Longitude = 0; request.Longitude = this.longt;
request.QRValue = ""; request.QRValue = "";
request.NFCValue = nfcSerialCode; request.NFCValue = nfcSerialCode;
request.UID = this.device.uuid; request.UID = this.device.uuid;
request.UserName = this.userData.EMPLOYEE_NUMBER; request.UserName = this.userData.EMPLOYEE_NUMBER;
request.IsGpsRequired = this.enableLocationNFC;
this.attendance_service this.attendance_service
.attendanceSwipeScanner(request, () => { .attendanceSwipeScanner(request, () => {
console.log("Error inside in swipe attendance"); console.log("Error inside in swipe attendance");
@ -171,9 +200,28 @@ export class AttendanceOptionsComponent implements OnInit {
} }
public startQRCode() { public startQRCode() {
if (this.enableLocationQR) {
this.attendScanService.getDeviceLocation(); 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 // Wifi Attendance
public async startWifi() { public async startWifi() {
@ -186,7 +234,6 @@ export class AttendanceOptionsComponent implements OnInit {
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) {
@ -198,30 +245,95 @@ export class AttendanceOptionsComponent implements OnInit {
this.startWifi(); this.startWifi();
}).catch((err) => { }).catch((err) => {
console.debug(err); console.debug(err);
this.showWifiNotEnabled();
}); });
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({
component: WifiModalComponent, component: WifiModalComponent,
showBackdrop: true, showBackdrop: true,
backdropDismiss: false, backdropDismiss: false,
componentProps:{ enableLocationWIFI: this.enableLocationWIFI, lat: this.lat, longt: this.longt},
}); });
modal.cssClass = "wifi-modal"; modal.cssClass = "wifi-modal";
await modal.present(); await modal.present();
} }
}
showWifiNotEnabled(){ showWifiNotEnabled(){
this.common.showErrorMessageDialog(()=>{ this.common.showErrorMessageDialog(()=>{
// this.openNativeSettings.open('wifi').then(()=>{});
}, },
this.ts.trPK("general", "ok"), this.ts.trPK("general", "ok"),
this.ts.trPK("general","wifi-not-enable-text")); 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 PointType: number;
public NFCValue: string; public NFCValue: string;
public WifiValue: string; public WifiValue: string;
public IsGpsRequired: boolean;
} }

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

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

@ -1,7 +1,4 @@
<app-generic-header <app-generic-header *ngIf="!messageSuccess" showBack="true" backLink="/notification/homepage"
*ngIf="!messageSuccess"
showBack="true"
backLink="/notification/homepage"
[headerText]="'worklistMain,title' | translate"> [headerText]="'worklistMain,title' | translate">
</app-generic-header> </app-generic-header>
@ -11,187 +8,38 @@
<!-- add segemnt part --> <!-- add segemnt part -->
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)" <ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)" [value]="activeSegment"
[value]="defaultSegment" class="ion-segment-all"> class="ion-segment-all">
<ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="item-req"
<ion-label>{{'worklistMain , itemReq'| translate}}</ion-label> [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>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, action' | translate}}</ion-label> <ion-label class="no-padding-label"> {{'worklistMain, action' | translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
<ion-label> <ion-label class="no-padding-label">
{{'worklistMain, attach-file' | translate}} {{'worklistMain, attach-file' | translate}}
</ion-label> </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain , info'| translate}}</ion-label> <ion-label class="no-padding-label"> {{'worklistMain , info'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
<ion-slides #slides (ionSlideDidChange)="slideChanged($event)">
<ion-slide>
<!-- <ion-slides pager="true" class="slides-gray-bullets">
<ion-slide class="slide-1"> -->
<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-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>
</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-col *ngIf=" getPassNotificationDetails.RESPONDER == '' ">
<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 *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
</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="labelTotal">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="labelTotal">{{taxvalueH}}</div>
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-grid>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">
{{ 'general, load-more' | translate}}
</button>
</ion-card-content>
</ion-card>
</ng-container>
<!-- </ion-slide> -->
<ng-container *ngIf="activeSegment === 'item-req'"> <ng-container *ngIf="activeSegment === 'item-req'">
<!-- <ion-card class="cardContent"> <!-- <ion-card class="cardContent">
<ion-card-header class="boxHdr"> <ion-card-header class="boxHdr">
@ -203,13 +51,13 @@
<div> <div>
<ion-grid class="gridItemReq"> <ion-grid class="gridItemReq" style="width: 100% !important;">
<!-- <ion-item class="itemReqContent" > --> <!-- <ion-item class="itemReqContent" > -->
<accordin-custom> <accordin-custom>
<accordin-tab-custom *ngFor="let notificationList of notificationBodyRes; let i=index; " <accordin-tab-custom *ngFor="let notificationList of notificationBodyRes; let i=index; "
[header]="notificationList.DESCRIPTION"> [header]="notificationList.DESCRIPTION" [show]="i === 0 ? true: false">
@ -427,12 +275,12 @@
</ion-infinite-scroll> --> </ion-infinite-scroll> -->
</ng-container> </ng-container>
<!-- </ion-slide> --> </ion-slide>
<!-- <ion-slide> --> <ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'"> <ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent"> <ion-card class="cardContent" style="width: 100% !important;">
<ion-card-content> <ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0"> <div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
@ -457,10 +305,12 @@
</button> </button>
</div> --> </div> -->
<div [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'"> <div
[class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge" <img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE"> [src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge" src="../assets/imgs/profile.png"> <img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png">
</div> </div>
</div> </div>
<ion-col> <ion-col>
@ -482,8 +332,8 @@
</div> </div>
<button class="showMore" <button class="showMore" (click)="actionHistory.visible = !actionHistory.visible">{{
(click)="actionHistory.visible = !actionHistory.visible">{{ actionHistory.visible ? 'Show less': 'Show More' }}</button> actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div> </div>
</div> </div>
@ -504,16 +354,19 @@
</ion-list> </ion-list>
</div> </div>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()"> {{ 'general, load-more' | translate}} <button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()"> {{ 'general,
load-more' | translate}}
</button> </button>
</ion-card-content> </ion-card-content>
</ion-card> </ion-card>
<!-- </ion-slide> --> <!-- </ion-slide> -->
</ng-container> </ng-container>
<!-- <ion-slide> --> </ion-slide>
<ion-slide>
<ng-container *ngIf="activeSegment === 'attach'"> <ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent"> <ion-card class="cardContent" style="width: 100% !important;">
<ion-card-content> <ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0"> <div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p> <p>{{ 'general, notAttch' | translate}}</p>
@ -553,10 +406,165 @@
</ion-card-content> </ion-card-content>
</ion-card> </ion-card>
</ng-container> </ng-container>
<!-- </ion-slide> </ion-slide>
</ion-slides> -->
<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-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-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>
</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-col *ngIf=" getPassNotificationDetails.RESPONDER == '' ">
<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 *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
</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="labelTotal">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="labelTotal">{{taxvalueH}}</div>
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-grid>
<button ion-button *ngIf="!IsReachEnd" 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>
@ -575,7 +583,9 @@
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon> <ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled--> <!--filled-->
</ion-col> </ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div> </ion-col> <ion-col size="12">
<div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div>
</ion-col>
</div> </div>
</ion-content> </ion-content>

@ -105,4 +105,10 @@
// font-weight: bold; // 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 { 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 { WorkListBodyRequest } from '../models/NotificationBodyReq'; import { WorkListBodyRequest } from '../models/NotificationBodyReq';
@ -35,6 +35,7 @@ import { MOItemHistoryRes } from '../models/MOItemHistoryRes';
import { MOItemHistoryReq } from '../models/MOItemHistoryReq'; import { MOItemHistoryReq } from '../models/MOItemHistoryReq';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { IonSlides } from '@ionic/angular';
@Component({ @Component({
selector: 'app-worklist-main-mr', selector: 'app-worklist-main-mr',
@ -43,6 +44,7 @@ import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbore
}) })
export class WorklistMainMRComponent implements OnInit { export class WorklistMainMRComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
private WorkListBodyObj: WorkListBodyRequest; private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest; private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest; private WorkListActionObj: WorkListActionRequest;
@ -141,12 +143,57 @@ export class WorklistMainMRComponent implements OnInit {
this.WorkListAttachObj = new WorkListButtonRequest(); this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail(); 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';
} }
public segmentChanged(event: any) { 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 segmentChanged1(event: any) {
this.activeSegment = event.detail.value; this.activeSegment = event.detail.value;
console.log(' event.detail.value: ' + event.detail.value); console.log(' event.detail.value: ' + event.detail.value);
} }

@ -108,3 +108,10 @@
// font-weight: bold; // 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 { 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 { WorkListBodyRequest } from "../models/NotificationBodyReq"; 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 { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { IonSlides } from '@ionic/angular';
@Component({ @Component({
selector: 'app-worklist-main-po', selector: 'app-worklist-main-po',
@ -44,6 +45,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo
styleUrls: ['./worklist-main-po.component.scss'], styleUrls: ['./worklist-main-po.component.scss'],
}) })
export class WorklistMainPoComponent implements OnInit { export class WorklistMainPoComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
private WorkListBodyObj: WorkListBodyRequest; private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest; private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest; private WorkListActionObj: WorkListActionRequest;
@ -148,14 +150,59 @@ export class WorklistMainPoComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.WorkListAttachObj = new WorkListButtonRequest(); this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail(); 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() { intializeNotificationDetail() {
this.approveDis = false; this.approveDis = false;
this.rejectDis = 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; this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value); console.log(" event.detail.value: " + event.detail.value);
} }

@ -1,7 +1,4 @@
<app-generic-header <app-generic-header *ngIf="!messageSuccess" showBack="true" backLink="/notification/homepage"
*ngIf="!messageSuccess"
showBack="true"
backLink="/notification/homepage"
[headerText]="'worklistMain,title' | translate"> [headerText]="'worklistMain,title' | translate">
</app-generic-header> </app-generic-header>
@ -10,220 +7,50 @@
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div> <div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part --> <!-- add segemnt part -->
<ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)" <ion-segment mode="md" color="secondary" (ionChange)="segmentChanged($event)" [value]="activeSegment"
[value]="defaultSegment" class="ion-segment-all"> class="ion-segment-all">
<ion-segment-button value="item-req" <ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, itemReq'| translate}} </ion-label> <ion-label class="no-padding-label margin-left"> {{'worklistMain, itemReq'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, action' | translate}} </ion-label> <ion-label class="no-padding-label"> {{'worklistMain, action' | translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="attach"
<ion-label> {{'worklistMain, attach-file' | translate}} [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
<ion-label class="no-padding-label"> {{'worklistMain, attach-file' | translate}}
</ion-label> </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button checked value="info" <ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{'worklistMain, info'| translate}} </ion-label> <ion-label class="no-padding-label"> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
<ng-container *ngIf="activeSegment === 'info'"> <ion-slides #slides (ionSlideDidChange)="slideChanged($event)">
<ion-slide>
<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'"> <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"> <div [hidden]="PRLines && PRLines.length > 0">
<p>{{ 'general, empty' | translate}}</p> <p>{{ 'general, empty' | translate}}</p>
</div> </div>
<accordin-custom> <accordin-custom>
<accordin-tab-custom *ngFor="let Lines of PRLines; let i=index;" [header]="Lines.DESCRIPTION"> <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;">
<div class="itemReqDiv">
<!-- <ion-row>
<ion-col class="colItemReqHeader">
<label for="">{{i+1}}. {{Lines.DESCRIPTION}} </label>
</ion-col>
</ion-row> -->
<ion-row class="rowBorder"> <ion-row class="rowBorder">
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems"> <ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}} <label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}}
</label> </label>
<br /> <br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.COST_CENTER}} </ion-label> <ion-label class="labelValue" for="">{{Lines.COST_CENTER}} </ion-label>
</ion-col> </ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-col class="colItems"> <ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label> <label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br /> <br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label> <ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col> </ion-col>
</ion-row> </ion-row>
@ -231,55 +58,45 @@
<ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems "> <ion-col [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' " class="colItems ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label> <label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br /> <br />
<ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label> <ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label>
</ion-col> </ion-col>
<ion-col class="colItems"> <ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} ({{ 'general, sar' | translate}})</label> <label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} ({{ 'general, sar'
| translate}})</label>
<br /> <br />
<ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label> <ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label>
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row class="rowBorder"> <ion-row class="rowBorder">
<ion-col class="colItems" [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' "> <ion-col class="colItems" [ngClass]=" direction === 'en' ? 'colBorder' :'colBorder-ar' ">
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} ({{ 'general, sar' | translate}})</label> <label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} ({{ 'general, sar' |
translate}})</label>
<br /> <br />
<ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label> <ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label>
</ion-col> </ion-col>
<ion-col class="colItems"> <ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label> <label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br /> <br />
<ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label> <ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label>
</ion-col> </ion-col>
</ion-row> </ion-row>
<ion-row> <ion-row>
<ion-col class="colItems"> <ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ITEM_AMU')}} </label> <label class="colItemReq" for="">{{ts.trPK('worklistMain','ITEM_AMU')}} </label>
<br /> <br />
<ion-label class="labelValue" for="">{{Lines.ITEM_AMU}} </ion-label> <ion-label class="labelValue" for="">{{Lines.ITEM_AMU}} </ion-label>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
</accordin-tab-custom> </accordin-tab-custom>
</accordin-custom> </accordin-custom>
</ng-container> </ng-container>
</ion-slide>
<ion-slide>
<ng-container *ngIf="activeSegment === 'action-history'"> <ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent"> <ion-card class="cardContent" style="width: 100% i !important;">
<ion-card-content> <ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0"> <div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p> <p>{{ 'general, empty' | translate}}</p>
</div> </div>
@ -287,34 +104,19 @@
<ion-list class="notification-list "> <ion-list class="notification-list ">
<div class="timeline"> <div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes; let index=index"> <ion-item *ngFor="let actionHistory of actionHistoryRes; let index=index">
<div class="timeline-item" slot="start"> <div class="timeline-item" slot="start">
<div
<!-- <div> [class]="direction == 'en'? 'timeline-thumb-en timeline-icon': 'timeline-thumb-ar timeline-icon'">
<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" <img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE"> [src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge" <img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
src="../assets/imgs/profile.png"> src="../assets/imgs/profile.png">
</div> </div>
</div> </div>
<ion-col> <ion-col>
<ion-label style="color:black !important ;font-weight: bold;"> <ion-label style="color:black !important ;font-weight: bold;">
{{actionHistory.NAME}} {{actionHistory.NAME}}
</ion-label> </ion-label>
<div *ngIf="actionHistory.NOTE"> <div *ngIf="actionHistory.NOTE">
<div *ngIf="actionHistory.NOTE != '' "> <div *ngIf="actionHistory.NOTE != '' ">
<div *ngIf="!checkLines(actionHistory.NOTE)"> <div *ngIf="!checkLines(actionHistory.NOTE)">
@ -322,34 +124,24 @@
Note: {{actionHistory.NOTE}} Note: {{actionHistory.NOTE}}
</div> </div>
</div> </div>
<div *ngIf="checkLines(actionHistory.NOTE)"> <div *ngIf="checkLines(actionHistory.NOTE)">
<div class="containerNote"
<div class="containerNote" [ngClass]="actionHistory.visible ? 'show' : '' "> [ngClass]="actionHistory.visible ? 'show' : '' ">
Note: {{actionHistory.NOTE}} Note: {{actionHistory.NOTE}}
</div> </div>
<button class="showMore" <button class="showMore"
(click)="actionHistory.visible = !actionHistory.visible">{{ actionHistory.visible ? 'Show less': 'Show More' }}</button> (click)="actionHistory.visible = !actionHistory.visible">{{
actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div> </div>
</div> </div>
<!-- *ngIf="!checkLines(actionHistory.NOTE)" -->
</div> </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 <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'}" [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> class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory"> <ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''"
class="dateActionHistory">
{{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col> </ion-col>
</ion-item> </ion-item>
@ -358,36 +150,21 @@
</div> </div>
<button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()"> <button ion-button *ngIf="!IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">
{{ 'general, load-more' | translate}} </button> {{ 'general, load-more' | translate}} </button>
</ion-card-content> </ion-card-content>
</ion-card> </ion-card>
</ng-container> </ng-container>
</ion-slide>
<ion-slide>
<ng-container *ngIf="activeSegment === 'attach'"> <ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent"> <ion-card class="cardContent" style="width: 100% !important;">
<ion-card-content> <ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0"> <div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p> <p>{{ 'general, notAttch' | translate}}</p>
</div> </div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 "> <div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid> <ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ; let i=index;"> <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>
<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>
<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"> <ion-label style="color: black !important">
{{i+1}}. {{attachList.FILE_NAME}} </ion-label> {{i+1}}. {{attachList.FILE_NAME}} </ion-label>
@ -395,16 +172,111 @@
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)"> (click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png"> <img class="attachImg" src="../assets/imgs/view.png">
</button> </button>
</ion-item> </ion-item>
</ion-grid> </ion-grid>
</div>
</ion-card-content>
</ion-card>
</ng-container>
</ion-slide>
<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> </div>
</ion-grid>
</ion-grid>
<button *ngIf="!IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">
{{ 'general, load-more' | translate}}
</button>
</ion-card-content> </ion-card-content>
</ion-card> </ion-card>
</ion-col>
</ion-row>
</ion-grid>
</ng-container> </ng-container>
</ion-slide>
</ion-slides>
<ion-row> <ion-row>
<ion-col col-12> <ion-col col-12>
<div id="notificationDynamicFieldsPR"> <div id="notificationDynamicFieldsPR">
@ -415,9 +287,10 @@
<div *ngIf="messageSuccess" class="succssfullMSG"> <div *ngIf="messageSuccess" class="succssfullMSG">
<ion-col size="12"> <ion-col size="12">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon> <ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
</ion-col> </ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div> </ion-col> <ion-col size="12">
<div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div>
</ion-col>
</div> </div>
</ion-content> </ion-content>

@ -104,3 +104,11 @@
// padding-top: 10px; // padding-top: 10px;
// font-weight: bold; // 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 { 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 { WorkListBodyRequest } from '../models/NotificationBodyReq'; 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 { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
import { IonSlides } from '@ionic/angular';
@Component({ @Component({
selector: 'app-worklist-main-pr', selector: 'app-worklist-main-pr',
@ -40,6 +41,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo
styleUrls: ['./worklist-main-pr.component.scss'], styleUrls: ['./worklist-main-pr.component.scss'],
}) })
export class WorklistMainPRComponent implements OnInit { export class WorklistMainPRComponent implements OnInit {
@ViewChild('slides') slides: IonSlides;
public isPostNoLoad = true; public isPostNoLoad = true;
public worklistNotifications: any; public worklistNotifications: any;
public totalRequestCount = 0; public totalRequestCount = 0;
@ -138,13 +140,53 @@ export class WorklistMainPRComponent implements OnInit {
this.WorkListAttachObj = new WorkListButtonRequest(); this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail(); 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() { intializeNotificationDetail() {
@ -209,7 +251,7 @@ export class WorklistMainPRComponent implements OnInit {
this.getPRNotificationDetails(this.WorkListBodyObj); this.getPRNotificationDetails(this.WorkListBodyObj);
} }
} }
public segmentChanged(event: any) { public segmentChanged1(event: any) {
this.activeSegment = event.detail.value; this.activeSegment = event.detail.value;
console.log(' event.detail.value: ' + event.detail.value); console.log(' event.detail.value: ' + event.detail.value);
} }

@ -308,8 +308,15 @@
</ion-slide> </ion-slide>
<ion-slide> <ion-slide>
<ng-container *ngIf="activeSegment === 'info'"> <ng-container *ngIf="activeSegment === 'info'">
<ion-grid>
<ion-row>
<ion-col>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div> <div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<div *ngIf="notificationBodyRes?.length > 0 "> <div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; " style="width: 91%;"> <ion-card *ngFor="let item of notificationBodyRes;let i=index; " style="width: 91%;">
<ion-card-content *ngIf="item.Collection_Notification.length > 0"> <ion-card-content *ngIf="item.Collection_Notification.length > 0">
@ -325,19 +332,14 @@
</ion-row> </ion-row>
</div> </div>
</ion-card-content> </ion-card-content>
</ion-card> </ion-card>
</div> </div>
<div style="margin: 10px;font-weight: bold; " <div style="margin: 10px;font-weight: bold; "
*ngIf="subordinatesleaveList != undefined && subordinatesleaveList?.length > 0"> *ngIf="subordinatesleaveList != undefined && subordinatesleaveList?.length > 0">
{{ts.trPK('worklistMain','employee-on-leave')}} </div> {{ts.trPK('worklistMain','employee-on-leave')}}
</div>
<ion-item lines="none" [ngClass]=" direction === 'en' ? 'subOrdinateList' :'subOrdinateList-Ar' " <ion-item lines="none" [ngClass]=" direction === 'en' ? 'subOrdinateList' :'subOrdinateList-Ar' "
*ngFor="let List of subordinatesleaveList;"> *ngFor="let List of subordinatesleaveList;">
<ion-grid [ngClass]=" direction === 'en' ? 'gridSubordinates' :'gridSubordinates-Ar' "> <ion-grid [ngClass]=" direction === 'en' ? 'gridSubordinates' :'gridSubordinates-Ar' ">
<div [ngClass]=" direction === 'en' ? 'subOrdinateDiv' :'subOrdinateDiv-Ar' "> <div [ngClass]=" direction === 'en' ? 'subOrdinateDiv' :'subOrdinateDiv-Ar' ">
<img *ngIf="List.EMPLOYEE_IMAGE" class="empImgeSub" <img *ngIf="List.EMPLOYEE_IMAGE" class="empImgeSub"
@ -347,14 +349,12 @@
</div> </div>
<ion-row class="rowHeader " <ion-row class="rowHeader "
[ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar' "> [ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar' ">
<ion-col size="9"> <ion-col size="9">
<label style="font-weight: bold; " class="label" for="">{{List.EMPLOYEE_NAME}} <label style="font-weight: bold; " class="label" for="">{{List.EMPLOYEE_NAME}}
</label> </label>
<br /> <br />
<label class="label" for="">{{List.POSITION_TITLE}} </label><br /> <label class="label" for="">{{List.POSITION_TITLE}} </label><br />
</ion-col> </ion-col>
<ion-col class="status" size="3"> <ion-col class="status" size="3">
<label class="label" style="font-size: 11px;" for="label">{{List.STATUS}}</label> <label class="label" style="font-size: 11px;" for="label">{{List.STATUS}}</label>
</ion-col> </ion-col>
@ -362,18 +362,20 @@
<br /> <br />
<ion-row [ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar'"> <ion-row [ngClass]=" direction === 'en' ? 'subOrdinateRow' :'subOrdinateRow-Ar'">
<ion-col> <ion-col>
<label class="label" for=""> {{ts.trPK('worklistMain','from')}}</label><br /> <label class="label" for=""> {{ts.trPK('worklistMain','from')}}</label><br />
<label class="label" for="">{{List.DATE_START |date}}</label> <label class="label" for="">{{List.DATE_START |date}}</label>
</ion-col> </ion-col>
<ion-col> <ion-col>
<label class="label" for="">{{ts.trPK('worklistMain','to')}}</label><br /> <label class="label" for="">{{ts.trPK('worklistMain','to')}}</label><br />
<label class="label" for="">{{List.DATE_END | date}}</label> <label class="label" for="">{{List.DATE_END | date}}</label>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> </ion-grid>
</ion-item> </ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ng-container> </ng-container>
</ion-slide> </ion-slide>
</ion-slides> </ion-slides>

@ -27,24 +27,63 @@
</div> </div>
<ion-grid *ngIf="personalInfo"> <ion-grid *ngIf="personalInfo" style="position: relative; display: block; z-index: 5;">
<div class="gridService"> <div [ngClass]=" direction == 'ltr' ? 'gridService-en' : 'gridService-ar'" style="background: #0B4775; border-radius: 20px;">
<ion-row> <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'"> <ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_YEARS}}</label> <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-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>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'"> <ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_MONTHS}}</label> <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-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>
<ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'"> <ion-col [ngClass]=" direction == 'ltr' ? 'columns' : 'columns-ar'">
<ion-grid>
<ion-row style="text-align:center">
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'service' : 'service-ar'">{{personalInfo.SERVICE_DAYS}}</label> <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-col>
<ion-col>
<label [ngClass]=" direction == 'ltr' ? 'services' : 'services-ar'">{{ts.trPK('absenceList','days')}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
</ion-grid> </ion-grid>

@ -1,11 +1,19 @@
.list-ios { .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-left: 0;
margin-right: 0; margin-right: 0;
margin-top: 32px; margin-top: -15px;
margin-bottom: 32px; margin-bottom: 32px;
border: 1px solid #d8d8d8;
background: var(--ion-item-background, var(--ion-background-color, #fff)); background: var(--ion-item-background, var(--ion-background-color, #fff));
border-radius: 10px;
padding-top: 60px;
} }
.header-toolbar-new{ .header-toolbar-new{
@ -76,33 +84,38 @@
} }
.gridService{ .gridService-en{
// background-color: #269DB8;
margin-top: 87px; margin-top: 87px;
border-radius: 10px; border-radius: 10px;
margin-bottom: -49px; margin-bottom: -49px;
margin-left: 14px; margin-left: 30px;
margin-right: 14px; margin-right: 30px;
} }
.gridService-ar{
margin-top: 87px;
border-radius: 10px;
margin-bottom: -49px;
margin-left: 17px;
margin-right: 17px;
}
.columns{ .columns{
margin: 10px; // margin: 10px;
background: #269DB8; // background: #0B4775;
border-radius: 27px; // border-radius: 27px;
padding-left: 30px; // padding-left: 30px;
padding-right: 6px; // padding-right: 6px;
padding-top: 19px; // padding-top: 19px;
padding-bottom: 26px; // padding-bottom: 26px;
} }
.columns-ar{ .columns-ar{
margin: 10px; // margin: 10px;
background: #269DB8; // background: #0B4775;
border-radius: 27px; // border-radius: 27px;
padding-left: 7px; // padding-left: 7px;
padding-right: 3px; // padding-right: 3px;
padding-top: 19px; // padding-top: 19px;
padding-bottom: 26px; // padding-bottom: 26px;
} }
.service{ .service{
@ -125,7 +138,7 @@
margin-right: 26px; margin-right: 26px;
} }
.services-ar{ .services-ar{
font-size: 14px; font-size: 20px;
color: white; color: white;
margin-right: 25px; margin-right: 25px;
} }
@ -134,8 +147,8 @@
margin-left: 14px; margin-left: 14px;
margin-right: 14px; margin-right: 14px;
border-radius: 10px; border-radius: 10px;
background: white; // background: white;
border: solid #bebbbb !important; border:#bebbbb !important;
padding: 2px; padding: 2px;
} }
.p{ .p{
@ -184,3 +197,20 @@
-webkit-transform: rotate(180deg); -webkit-transform: rotate(180deg);
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; border-radius: 50% !important;
position: relative; position: relative;
color: #7f8c8d; color: #7f8c8d;
height: 35px;
} }
@ -45,7 +46,7 @@ ion-col.colBold, ion-col.colBold > label{
.changeImgBtn-ar{ .changeImgBtn-ar{
position: absolute; position: absolute;
top: 80%; top: 80%;
left: 74%; left: 66%;
} }
.profileImg{ .profileImg{
width: 160px; 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": "إلغاء" "ar": "إلغاء"
}, },
"wifi-connect-message": { "wifi-connect-message": {
"en": "Please wait", "en": "Connecting",
"ar": "أرجو الإنتظار" "ar": "توصيل"
}, },
"success-attendance": { "success-attendance": {
"en": "Your attendance is marked successfully.", "en": "Your attendance is marked successfully.",
"ar": "تم تسجيل حضورك بنجاح" "ar": "تم تسجيل حضورك بنجاح"
},
"digital-id":{
"en":"Employee Digital ID",
"ar":"هوية الموظف الرقمية"
},
"appreciate-service":{
"en":"We appreciate you for completing the service of",
"ar":"نحن نقدر لك استكمال خدمة"
} }
}, },
"home": { "home": {
@ -1060,8 +1068,8 @@
"ar": "بحث متقدم" "ar": "بحث متقدم"
}, },
"No-data-available": { "No-data-available": {
"en": "No Data Available", "en": "No History Available",
"ar": "لا يوجد بيانات" "ar": "لا يوجد محفوظات متاحة"
} }
}, },
"userProfile": { "userProfile": {

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

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

Loading…
Cancel
Save