OpenPayslip from dashboard

production
Mohamed Mekawy 6 years ago
parent fefdc5b8c3
commit 2a1ca91daa

@ -37,7 +37,7 @@
"@ionic-native/diagnostic": "^5.17.0", "@ionic-native/diagnostic": "^5.17.0",
"@ionic-native/file": "^5.17.0", "@ionic-native/file": "^5.17.0",
"@ionic-native/file-path": "^5.17.0", "@ionic-native/file-path": "^5.17.0",
"@ionic-native/fingerprint-aio": "^5.16.0", "@ionic-native/fingerprint-aio": "^5.17.1",
"@ionic-native/geolocation": "^5.10.0", "@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.17.0", "@ionic-native/globalization": "^5.17.0",
"@ionic-native/health": "^5.4.0", "@ionic-native/health": "^5.4.0",

@ -568,31 +568,31 @@ export class ConfirmLoginComponent implements OnInit {
// title: 'Biometric Authetnciation', // (Android Only) | optional | Default: "<APP_NAME> Biometric Sign On" title: 'Biometric Authetnciation', // (Android Only) | optional | Default: "<APP_NAME> Biometric Sign On"
// // subtitle: '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
}) })
@ -712,7 +712,7 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.setAuthenticatedUser(result).subscribe(() => { this.authService.setAuthenticatedUser(result).subscribe(() => {
if (this.platform.is("mobile")) { if (this.platform.is("cordova")) {
this.insertMobileLogin(); this.insertMobileLogin();

@ -26,9 +26,9 @@
<h1 text-center>{{displayTime}}</h1> <h1 text-center>{{displayTime}}</h1>
<br/><br/> <br/><br/>
<ion-item> <ion-item>
<ion-label>{{'verificationcode,verificationcode' | translate}}</ion-label> <!-- <ion-label>{{'verificationcode,verificationcode' | translate}}</ion-label> -->
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> --> <!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> -->
<ion-input required type="tel" maxlength="4" (keyup)="checkOTPLength()" [(ngModel)]="activationCode"></ion-input> <ion-input required type="tel" maxlength="4" (keyup)="checkOTPLength()" placeholder="{{translate.trPK('verificationcode','verificationcode')}}" [(ngModel)]="activationCode"></ion-input>
</ion-item> </ion-item>
</div> </div>
</ion-content> </ion-content>

@ -339,7 +339,7 @@ export class SmsPageComponent implements OnInit {
if (this.platform.is("mobile")) { if (this.platform.is("cordova")) {
this.insertMobileLogin(); this.insertMobileLogin();

@ -24,8 +24,8 @@ export class ConnectorService {
public static timeOut = 30 * 1000; public static timeOut = 30 * 1000;
// public static host = 'http://10.50.100.113:6060/'; // development service // 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.198:6060/';
// public static host = 'http://10.50.100.113:6060/'; // development service // 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/';

@ -23,9 +23,9 @@
<h1 text-center>{{displayTime}}</h1> <h1 text-center>{{displayTime}}</h1>
<br/><br/> <br/><br/>
<ion-item> <ion-item>
<ion-label>{{'verificationcode.verificationcode' | translate}}</ion-label> <!-- <ion-label>{{'verificationcode.verificationcode' | translate}}</ion-label> -->
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> --> <!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> -->
<ion-input required type="tel" [(ngModel)]="activationCode"></ion-input> <ion-input required type="tel" [(ngModel)]="activationCode" placeholder="{{ts.trPK('verificationcode','verificationcode')}}"></ion-input>
</ion-item> </ion-item>
</div> </div>
</ion-content> </ion-content>

@ -78,7 +78,7 @@
</ion-col> </ion-col>
<ion-col size="6" class="col-grid"> <ion-col size="6" class="col-grid">
<button ion-button block class="serviceItem" (click)="Change_password()"> <button ion-button block class="serviceItem" (click)="openPayslip()">
<ion-img class="serviceItemImg" src="../assets/imgs/home/paySlip.png"></ion-img> <ion-img class="serviceItemImg" src="../assets/imgs/home/paySlip.png"></ion-img>
<p>{{ts.trPK('login','payslip')}}</p> <p>{{ts.trPK('login','payslip')}}</p>
</button> </button>

@ -306,8 +306,6 @@ export class HomePage implements OnInit {
this.common.openChangePassword(); this.common.openChangePassword();
} }
private openPayslip() { private openPayslip() {
this.common.openPayslipPage(); this.common.openPayslipPage();
} }
private attendance() { private attendance() {

@ -234,9 +234,16 @@ export class HomeComponent implements OnInit {
} }
} }
for (let i = 0; i < this.WorkListResObj.length; i++) { for (let i = 0; i < this.WorkListResObj.length; i++) {
if (reqType == this.WorkListResObj[i].REQUEST_TYPE) { if(reqType=="HR"){
filterdType.push(this.WorkListResObj[i]); if ("EIT" == this.WorkListResObj[i].REQUEST_TYPE || "ABSENCE" == this.WorkListResObj[i].REQUEST_TYPE) {
filterdType.push(this.WorkListResObj[i]);
}
}else{
if (reqType == this.WorkListResObj[i].REQUEST_TYPE) {
filterdType.push(this.WorkListResObj[i]);
}
} }
} }
this.filteredNotificationList = filterdType; this.filteredNotificationList = filterdType;

@ -4,6 +4,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl
import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
templateUrl: './home.component.html', templateUrl: './home.component.html',
@ -25,38 +26,52 @@ export class HomeComponent implements OnInit {
public ts: TranslatorService, public ts: TranslatorService,
public common: CommonService, public common: CommonService,
public sharedData: SharedDataService, public sharedData: SharedDataService,
public authService: AuthenticationService
) {} ) {}
ngOnInit() { ngOnInit() {
console.log("test"); // this.selEmp = this.common.sharedService.getSharedData(
// MenuResponse.SHARED_SEL_EMP,
this.selEmp = this.common.sharedService.getSharedData( // false
MenuResponse.SHARED_SEL_EMP, // );
false // if(this.selEmp){}else{
); // this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
console.log(" this.selEmp" + this.selEmp); // if (user) {
this.respID = this.common.sharedService.getSharedData( // this.selEmp = user.ASSIGNMENT_NUMBER;
MenuResponse.SHARED_SEL_RESP_ID,
false // }
); // });
console.log(" this.respID" + this.respID); // }
this.selMenu = new MenuResponse(); // console.log(" this.selEmp" + this.selEmp);
this.selMenu = this.common.sharedService.getSharedData( // this.respID = this.common.sharedService.getSharedData(
MenuResponse.SHARED_DATA, // MenuResponse.SHARED_SEL_RESP_ID,
false // false
); // );
console.log(" this.selMenu" + this.selMenu); // if(this.respID){}else{
// this.respID=-999;
// }
// console.log(" this.respID" + this.respID);
// this.selMenu = new MenuResponse();
// this.selMenu = this.common.sharedService.getSharedData(
// MenuResponse.SHARED_DATA,
// false
// );
// console.log(" this.selMenu" + this.selMenu);
this.getPayslip(); this.getPayslip();
} }
getPayslip(){ getPayslip(){
// this.selEmp ="13777";
console.log("this.selEmp????????"+this.selEmp)
this.respID=-999;
const request = { const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,//'125346',//this.selEmp, P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,//'125346',//this.selEmp,
P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE,// 'E',//this.selMenu.List_Menu.MENU_TYPE, P_MENU_TYPE:"E",// 'E',//this.selMenu.List_Menu.MENU_TYPE,
P_SELECTED_RESP_ID:this.respID//"-999" //this.respID, P_SELECTED_RESP_ID: this.respID//"-999" //this.respID,
// P_PAGE_NUM: this.P_PAGE_NUM, // P_PAGE_NUM: this.P_PAGE_NUM,
// P_PAGE_LIMIT: this.P_PAGE_LIMIT // P_PAGE_LIMIT: this.P_PAGE_LIMIT
}; };

@ -3,6 +3,7 @@ import { ConnectorService } from '../../hmg-common/services/connector/connector.
import { AuthenticationService } from '../../hmg-common/services/authentication/authentication.service'; import { AuthenticationService } from '../../hmg-common/services/authentication/authentication.service';
import { Observable } from 'node_modules/@angular/cli/node_modules/rxjs'; import { Observable } from 'node_modules/@angular/cli/node_modules/rxjs';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
@ -19,10 +20,11 @@ export class PayslipService {
) { } ) { }
public getPayslip(PayslipRequest: any, onError?: any,errorLabel?: string): Observable<any> { public getPayslip(PayslipRequest: any , onError?: any,errorLabel?: string): Observable<any> {
const request = PayslipRequest; const request = PayslipRequest;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.api.post(PayslipService.getPayslip,request,onError,errorLabel); request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.api.post(PayslipService.getPayslip, request, onError, errorLabel);
} }
public getSummeryOFPayment(PayslipRequest: any, onError?: any,errorLabel?: string): Observable<any> { public getSummeryOFPayment(PayslipRequest: any, onError?: any,errorLabel?: string): Observable<any> {
const request = PayslipRequest; const request = PayslipRequest;

Loading…
Cancel
Save