fixed MOE issues

MOE_DEV
umasoodch 3 years ago
parent 723cdde798
commit 1dc119da79

@ -1289,6 +1289,15 @@ export class AddEitComponent implements OnInit {
) as HTMLSelectElement; ) as HTMLSelectElement;
let val = x.dataset.colmText; let val = x.dataset.colmText;
textValue = x.value; textValue = x.value;
// below code is to handle fields which are hidden and required and has to have default value.
// So if colmText is empty then get value from value attribute which is already been set initially
if (this.eitResponse[i].DISPLAY_FLAG == "N" && this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
const attributeValue = x.getAttribute('value');
val = attributeValue ? attributeValue : '';
textValue = val;
}
if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) { if (this.eitResponse[i].REQUIRED_FLAG == "Y" && !val) {
x.classList.add("requiredClassElm"); x.classList.add("requiredClassElm");
//this.common.showRequiredMsg(); //this.common.showRequiredMsg();

@ -51,6 +51,7 @@ export class HomeComponent implements OnInit {
slidesPerView: 1, slidesPerView: 1,
autoplay:true autoplay:true
}; };
public userData: any;
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll; @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
public options = { public options = {
@ -79,36 +80,7 @@ export class HomeComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName() this.direction = TranslatorService.getCurrentLanguageName()
// this.selEmp = this.common.sharedService.getSharedData( this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
// MenuResponse.SHARED_SEL_EMP,
// false
// );
// if(this.selEmp){}else{
// this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
// if (user) {
// this.selEmp = user.ASSIGNMENT_NUMBER;
// }
// });
// }
// console.log(" this.selEmp" + this.selEmp);
// this.respID = this.common.sharedService.getSharedData(
// MenuResponse.SHARED_SEL_RESP_ID,
// false
// );
// 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();
// this.getProfile(); // this.getProfile();
@ -142,39 +114,13 @@ slidePrev(object, slideView) {
} }
// getProfile() {
// this.authService
// .loadAuthenticatedUser()
// .subscribe((user: AuthenticatedUser) => {
// if (user) {
// this.personalInfo = user;
// if(this.cs.getUpdateImage().status){
// // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img);
// this.imageSrc = "data:image/png;base64,"+this.cs.getUpdateImage().img;
// // alert("this.imageSrc"+ this.imageSrc);
// }else{
// this.imageSrc = user.EMPLOYEE_IMAGE
// ? "data:image/png;base64," + user.EMPLOYEE_IMAGE
// : this.imageSrc;
// console.log("2-"+user);
// }
// }
// else {
// console.log("3-"+user);
// }
// });
// }
getPayslip(){ getPayslip(){
// this.selEmp ="13777";
console.log("this.selEmp????????"+this.selEmp)
this.respID=-999; this.respID=-999;
const request = { const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,//'125346',//this.selEmp, P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,//'125346',//this.selEmp,
P_MENU_TYPE:"E",// '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,

@ -23,7 +23,6 @@ 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);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.api.post(PayslipService.getPayslip, request, onError, errorLabel); 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> {

@ -14,6 +14,7 @@ import { SelectInput } from 'src/app/uI-elements/select.input';
import { TextInput } from 'src/app/uI-elements/text.input'; import { TextInput } from 'src/app/uI-elements/text.input';
import { TimeInput } from 'src/app/uI-elements/time.input'; import { TimeInput } from 'src/app/uI-elements/time.input';
import { ReportServiceService } from '../report-service.service'; import { ReportServiceService } from '../report-service.service';
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({ @Component({
selector: 'app-concurrent-report', selector: 'app-concurrent-report',
@ -42,6 +43,8 @@ export class ConcurrentReportComponent implements OnInit {
selMenu: MenuResponse; selMenu: MenuResponse;
public functionName; public functionName;
public userData: any;
public headerTitle; public headerTitle;
getPassdirfromNotifiPage: boolean = false; getPassdirfromNotifiPage: boolean = false;
@ -54,6 +57,7 @@ export class ConcurrentReportComponent implements OnInit {
constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, public eitService: EitService) { } constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, public eitService: EitService) { }
ngOnInit() { ngOnInit() {
this.userData =this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
this.getPassdirfromNotifiPage = this.cs.sharedService.getSharedData('dirfromNotificationPage'); this.getPassdirfromNotifiPage = this.cs.sharedService.getSharedData('dirfromNotificationPage');
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false); this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
this.getConcurrentProgram(); this.getConcurrentProgram();
@ -65,7 +69,8 @@ export class ConcurrentReportComponent implements OnInit {
getConcurrentProgram() { getConcurrentProgram() {
this.cs.startLoading(); this.cs.startLoading();
this.reports.getConcurrentProgram({ this.reports.getConcurrentProgram({
P_REQUEST_GROUP_ID: this.selectedMenu.REQUEST_GROUP_ID P_REQUEST_GROUP_ID: this.selectedMenu.REQUEST_GROUP_ID,
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
this.cs.stopLoading(); this.cs.stopLoading();
this.programList = response.GetConcurrentProgramsList; this.programList = response.GetConcurrentProgramsList;
@ -75,7 +80,8 @@ export class ConcurrentReportComponent implements OnInit {
getCppDiffStructure(programList) { getCppDiffStructure(programList) {
this.cs.startLoading(); this.cs.startLoading();
this.reports.getCPPDiffStructure({ this.reports.getCPPDiffStructure({
P_DESC_FLEX_NAME: programList.CONCURRENT_PROGRAM_NAME P_DESC_FLEX_NAME: programList.CONCURRENT_PROGRAM_NAME,
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
this.cs.stopLoading(); this.cs.stopLoading();
this.handleDiffStructure(response); this.handleDiffStructure(response);
@ -923,7 +929,7 @@ export class ConcurrentReportComponent implements OnInit {
this.eitRequest = new EitRequest(); this.eitRequest = new EitRequest();
const list: any = this.getElementsValues(); const list: any = this.getElementsValues();
this.eitRequest.EITTransactionTBL = list; this.eitRequest.EITTransactionTBL = list;
this.eitRequest.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; this.eitRequest.P_SELECTED_EMPLOYEE_NUMBER = this.userData.EMPLOYEE_NUMBER;
this.eitRequest.P_MENU_TYPE = this.selectedMenu.MENU_TYPE; this.eitRequest.P_MENU_TYPE = this.selectedMenu.MENU_TYPE;
this.eitRequest.P_SELECTED_RESP_ID = -999;// this.selectedMenu.RESP_ID; // this.selMenu.List_Menu.RESP_ID,//-999, this.eitRequest.P_SELECTED_RESP_ID = -999;// this.selectedMenu.RESP_ID; // this.selMenu.List_Menu.RESP_ID,//-999,
this.eitRequest.P_FUNCTION_NAME = this.functionName; this.eitRequest.P_FUNCTION_NAME = this.functionName;
@ -956,6 +962,8 @@ export class ConcurrentReportComponent implements OnInit {
request.P_SELECTED_RESP_ID = -999; request.P_SELECTED_RESP_ID = -999;
request.P_FUNCTION_NAME = this.functionName; request.P_FUNCTION_NAME = this.functionName;
request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME; request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME;
request.P_SELECTED_EMPLOYEE_NUMBER = this.userData.EMPLOYEE_NUMBER;
this.reports.getTransaction(this.eitRequest, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => { this.reports.getTransaction(this.eitRequest, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
this.cs.stopLoading(); this.cs.stopLoading();

@ -23,7 +23,7 @@ export class ReportServiceService {
getConcurrentProgram(request, onError, errorLabel) { getConcurrentProgram(request, onError, errorLabel) {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad( return this.con.postNoLoad(
ReportServiceService.GET_CONCURRENT_PROGRAM, ReportServiceService.GET_CONCURRENT_PROGRAM,
request, request,
@ -33,7 +33,7 @@ export class ReportServiceService {
} }
getCPPDiffStructure(request, onError, errorLabel) { getCPPDiffStructure(request, onError, errorLabel) {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad( return this.con.postNoLoad(
ReportServiceService.GET_CPP_DIFF_STRUCTURE, ReportServiceService.GET_CPP_DIFF_STRUCTURE,
request, request,
@ -43,7 +43,7 @@ export class ReportServiceService {
} }
submitTransaction(request, onError, errorLabel) { submitTransaction(request, onError, errorLabel) {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad( return this.con.postNoLoad(
ReportServiceService.SUBMIT_CPP_REQUEST, ReportServiceService.SUBMIT_CPP_REQUEST,
request, request,
@ -53,7 +53,7 @@ export class ReportServiceService {
} }
getTransaction(request, onError, errorLabel) { getTransaction(request, onError, errorLabel) {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad( return this.con.postNoLoad(
ReportServiceService.SUBMIT_CPP_TRANSACTION, ReportServiceService.SUBMIT_CPP_TRANSACTION,
request, request,
@ -64,7 +64,7 @@ export class ReportServiceService {
getCppOutput(request, onError, errorLabel) { getCppOutput(request, onError, errorLabel) {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad( return this.con.postNoLoad(
ReportServiceService.GET_CCP_OUTPUT, ReportServiceService.GET_CCP_OUTPUT,
request, request,

@ -6,6 +6,8 @@ import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-respo
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ReportServiceService } from '../report-service.service'; import { ReportServiceService } from '../report-service.service';
import { FileOpener } from '@ionic-native/file-opener/ngx'; import { FileOpener } from '@ionic-native/file-opener/ngx';
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({ @Component({
selector: 'app-transaction-list', selector: 'app-transaction-list',
templateUrl: './transaction-list.component.html', templateUrl: './transaction-list.component.html',
@ -16,10 +18,13 @@ export class TransactionListComponent implements OnInit {
selectedMenu: any; selectedMenu: any;
template: any; template: any;
direction: any; direction: any;
public userData: any;
constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener, constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener,
) { } ) { }
ngOnInit() { ngOnInit() {
this.userData =this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false); this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false); this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false);
this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false); this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false);
@ -94,6 +99,7 @@ export class TransactionListComponent implements OnInit {
request.P_SELECTED_RESP_ID = -999; request.P_SELECTED_RESP_ID = -999;
request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_NAME; request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_NAME;
request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME; request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME;
request.P_SELECTED_EMPLOYEE_NUMBER = this.userData.EMPLOYEE_NUMBER;
this.reports.getTransaction(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => { this.reports.getTransaction(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
this.cs.stopLoading(); this.cs.stopLoading();

@ -2,10 +2,12 @@ import { Component, ElementRef, OnInit } from '@angular/core';
import { FileOpener } from '@ionic-native/file-opener/ngx'; import { FileOpener } from '@ionic-native/file-opener/ngx';
import { File } from '@ionic-native/file/ngx'; import { File } from '@ionic-native/file/ngx';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { userInfo } from 'os';
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 { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ReportServiceService } from '../report-service.service'; import { ReportServiceService } from '../report-service.service';
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({ @Component({
selector: 'app-transactions', selector: 'app-transactions',
@ -18,6 +20,7 @@ export class TransactionsComponent implements OnInit {
template: any; template: any;
direction: any; direction: any;
programList: any = []; programList: any = [];
public userData: any;
constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener, constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService, private platform: Platform, private file: File, private opener: FileOpener,
) { } ) { }
@ -25,10 +28,12 @@ export class TransactionsComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false); this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
this.userData =this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
// this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false); // this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false);
//this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false); //this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false);
this.direction = TranslatorService.getCurrentDirection(); this.direction = TranslatorService.getCurrentDirection();
this.getConcurrentProgram(); this.getConcurrentProgram();
} }
getDate(date) { getDate(date) {
return this.cs.evaluteDate(date); return this.cs.evaluteDate(date);
@ -99,6 +104,7 @@ export class TransactionsComponent implements OnInit {
request.P_SELECTED_RESP_ID = -999; request.P_SELECTED_RESP_ID = -999;
request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_NAME; request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_NAME;
request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME; request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME;
request.P_SELECTED_EMPLOYEE_NUMBER = this.userData.EMPLOYEE_NUMBER;
this.reports.getTransaction(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => { this.reports.getTransaction(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
this.cs.stopLoading(); this.cs.stopLoading();
@ -108,7 +114,8 @@ export class TransactionsComponent implements OnInit {
getConcurrentProgram() { getConcurrentProgram() {
this.cs.startLoading(); this.cs.startLoading();
this.reports.getConcurrentProgram({ this.reports.getConcurrentProgram({
P_REQUEST_GROUP_ID: this.selectedMenu.REQUEST_GROUP_ID P_REQUEST_GROUP_ID: this.selectedMenu.REQUEST_GROUP_ID,
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
this.cs.stopLoading(); this.cs.stopLoading();
this.programList = response.GetConcurrentProgramsList; this.programList = response.GetConcurrentProgramsList;

Loading…
Cancel
Save