From 15b317b5edb1b461a8574faa6068ba0fba6e87f2 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 2 Jan 2020 09:59:49 +0300 Subject: [PATCH] call payslip on init --- .../confirm-login/confirm-login.component.ts | 22 +++++++++---------- Mohem/src/app/payslip/home/home.component.ts | 18 +++++++++------ .../app/payslip/service/payslip.service.ts | 2 +- mohemmionic5 | 1 - 4 files changed, 23 insertions(+), 20 deletions(-) delete mode 160000 mohemmionic5 diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index f661aa72..fcb3a40e 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -568,31 +568,31 @@ export class ConfirmLoginComponent implements OnInit { - // title: 'Biometric Authetnciation', // (Android Only) | optional | Default: " Biometric Sign On" + title: 'Biometric Authetnciation', // (Android Only) | optional | Default: " Biometric Sign On" - // subtitle: 'Coolest Plugin ever' ,// (Android Only) | optional | Default: null + subtitle: 'Coolest Plugin ever' ,// (Android Only) | optional | Default: null - // description: this.ts.trPK("general", "auth-please"),// optional | Default: null + description: this.ts.trPK("general", "auth-please"),// optional | Default: null - // fallbackButtonTitle: this.ts.trPK("general", "use-pin"), // optional | When disableBackup is false defaults to "Use Pin". + fallbackButtonTitle: this.ts.trPK("general", "use-pin"), // optional | When disableBackup is false defaults to "Use Pin". - // // When disableBackup is true defaults to "Cancel" + // When disableBackup is true defaults to "Cancel" - // disableBackup:true, // optional | default: false + disableBackup:true, // optional | default: false - clientId: "Fingerprint Authetnciation", + // clientId: "Fingerprint Authetnciation", - clientSecret: "Ate343_9347lajF", // Only necessary for Android + // clientSecret: "Ate343_9347lajF", // Only necessary for Android - disableBackup: true, // Only for Android(optional) + // disableBackup: true, // Only for Android(optional) - localizedFallbackTitle: this.ts.trPK("general", "use-pin"), // Only for iOS + // localizedFallbackTitle: this.ts.trPK("general", "use-pin"), // Only for iOS - localizedReason: this.ts.trPK("general", "auth-please") // Only for iOS + // localizedReason: this.ts.trPK("general", "auth-please") // Only for iOS }) diff --git a/Mohem/src/app/payslip/home/home.component.ts b/Mohem/src/app/payslip/home/home.component.ts index 22e62ac3..48f79915 100644 --- a/Mohem/src/app/payslip/home/home.component.ts +++ b/Mohem/src/app/payslip/home/home.component.ts @@ -92,7 +92,8 @@ export class HomeComponent implements OnInit { this.GetPayslipList = result.GetPayslipList; } - + this.showPaySlip = this.GetPayslipList[0]; + this.getAllPayslipData(this.GetPayslipList[0].ACTION_CONTEXT_ID); } // showPaymentInfo @@ -101,12 +102,15 @@ export class HomeComponent implements OnInit { const index = parseInt(event.detail.value); this.showPaySlip =this.GetPayslipList[index]; this.ActionContextID=this.GetPayslipList[index].ACTION_CONTEXT_ID; - this.common.sharedService.setSharedData(this.ActionContextID,HomeComponent.ACTION_CONTEXT_ID); - this.getSummeryOfPayment(this.ActionContextID); - this.getPaymentInfo(this.ActionContextID); - this.getDeduction(this.ActionContextID); - this.getEarings(this.ActionContextID); - + this.getAllPayslipData(this.ActionContextID); + } + + getAllPayslipData(ActionContextID){ + this.common.sharedService.setSharedData(ActionContextID,HomeComponent.ACTION_CONTEXT_ID); + this.getSummeryOfPayment(ActionContextID); + this.getPaymentInfo(ActionContextID); + this.getDeduction(ActionContextID); + this.getEarings(ActionContextID); } getSummeryOfPayment(ActionContextID){ diff --git a/Mohem/src/app/payslip/service/payslip.service.ts b/Mohem/src/app/payslip/service/payslip.service.ts index 847438a3..2b3c6bbe 100644 --- a/Mohem/src/app/payslip/service/payslip.service.ts +++ b/Mohem/src/app/payslip/service/payslip.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { ConnectorService } from '../../hmg-common/services/connector/connector.service'; import { AuthenticationService } from '../../hmg-common/services/authentication/authentication.service'; -import { Observable } from 'node_modules/@angular/cli/node_modules/rxjs'; +import { Observable } from 'rxjs'; @Injectable({ diff --git a/mohemmionic5 b/mohemmionic5 deleted file mode 160000 index 2d03ed75..00000000 --- a/mohemmionic5 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2d03ed75f3f34aac5e80668b6a2b75849b18de51