diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.ts b/Mohem/src/app/eit/add-eit/add-eit.component.ts
index cfa380bf..b57a1330 100644
--- a/Mohem/src/app/eit/add-eit/add-eit.component.ts
+++ b/Mohem/src/app/eit/add-eit/add-eit.component.ts
@@ -1289,6 +1289,15 @@ export class AddEitComponent implements OnInit {
) as HTMLSelectElement;
let val = x.dataset.colmText;
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) {
x.classList.add("requiredClassElm");
//this.common.showRequiredMsg();
diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts
index 7b883a2c..db3ae547 100644
--- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts
+++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts
@@ -27,11 +27,11 @@ export class ConnectorService {
public static retryTimes = 0;
public static timeOut = 180 * 1000;
- public static host = 'https://uat.hmgwebservices.com/';
+ // public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
- // public static host = 'http://riyt-mohemm1:1010/' //MOE
- // public static host = 'http://riyt-mohemm1.mopm.gov.sa:1010/'
- // public static host = 'http://mohemm-app-test.srca.org.sa:1010/'
+ // public static host = 'http://riyt-mohemm1:1010/' //MOE inside
+ // public static host = 'http://riyt-mohemm1.mopm.gov.sa:1010/' // MOE vpn
+ public static host = 'http://mohemm-app-test.srca.org.sa:1010/' // SRCA
// public static host = 'http://10.254.212.41:1010/'
diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html
index 562c27c4..97857bc4 100644
--- a/Mohem/src/app/home/home.page.html
+++ b/Mohem/src/app/home/home.page.html
@@ -47,18 +47,18 @@
-
+
+
+ {{'userProfile,personal-informaion' | translate}}
+ {{'home,monthly-time-sheet-view' | translate}}
+
+ {{'home,view-detail' | translate}}
+
+
+
+
+
+
![Team Member Image]()
@@ -52,7 +51,7 @@
-
+
{{ts.trPK('myTeam','profile-details')}}
-
+
{{ts.trPK('vacation-rule','create-request')}}
-
+
{{ts.trPK('myTeam','view-attendence')}}
-
-
+ -->
+
{
const request = PayslipRequest;
this.authService.authenticateRequest(request);
- 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 {
diff --git a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts
index c064e86b..85715324 100644
--- a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts
+++ b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts
@@ -14,6 +14,7 @@ import { SelectInput } from 'src/app/uI-elements/select.input';
import { TextInput } from 'src/app/uI-elements/text.input';
import { TimeInput } from 'src/app/uI-elements/time.input';
import { ReportServiceService } from '../report-service.service';
+import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({
selector: 'app-concurrent-report',
@@ -42,6 +43,8 @@ export class ConcurrentReportComponent implements OnInit {
selMenu: MenuResponse;
public functionName;
+ public userData: any;
+
public headerTitle;
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) { }
ngOnInit() {
+ this.userData =this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
this.getPassdirfromNotifiPage = this.cs.sharedService.getSharedData('dirfromNotificationPage');
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
this.getConcurrentProgram();
@@ -65,7 +69,8 @@ export class ConcurrentReportComponent implements OnInit {
getConcurrentProgram() {
this.cs.startLoading();
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.cs.stopLoading();
this.programList = response.GetConcurrentProgramsList;
@@ -75,7 +80,8 @@ export class ConcurrentReportComponent implements OnInit {
getCppDiffStructure(programList) {
this.cs.startLoading();
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.cs.stopLoading();
this.handleDiffStructure(response);
@@ -923,7 +929,7 @@ export class ConcurrentReportComponent implements OnInit {
this.eitRequest = new EitRequest();
const list: any = this.getElementsValues();
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_SELECTED_RESP_ID = -999;// this.selectedMenu.RESP_ID; // this.selMenu.List_Menu.RESP_ID,//-999,
this.eitRequest.P_FUNCTION_NAME = this.functionName;
@@ -956,6 +962,8 @@ export class ConcurrentReportComponent implements OnInit {
request.P_SELECTED_RESP_ID = -999;
request.P_FUNCTION_NAME = this.functionName;
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.cs.stopLoading();
diff --git a/Mohem/src/app/reports/report-service.service.ts b/Mohem/src/app/reports/report-service.service.ts
index 9196cb2c..d9157598 100644
--- a/Mohem/src/app/reports/report-service.service.ts
+++ b/Mohem/src/app/reports/report-service.service.ts
@@ -23,7 +23,7 @@ export class ReportServiceService {
getConcurrentProgram(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
- request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
+ // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CONCURRENT_PROGRAM,
request,
@@ -33,7 +33,7 @@ export class ReportServiceService {
}
getCPPDiffStructure(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
- request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
+ // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CPP_DIFF_STRUCTURE,
request,
@@ -43,7 +43,7 @@ export class ReportServiceService {
}
submitTransaction(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
- request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
+ // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.SUBMIT_CPP_REQUEST,
request,
@@ -53,7 +53,7 @@ export class ReportServiceService {
}
getTransaction(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
- request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
+ // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.SUBMIT_CPP_TRANSACTION,
request,
@@ -64,7 +64,7 @@ export class ReportServiceService {
getCppOutput(request, onError, errorLabel) {
this.authService.authenticateRequest(request);
- request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
+ // request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.postNoLoad(
ReportServiceService.GET_CCP_OUTPUT,
request,
diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.ts b/Mohem/src/app/reports/transaction-list/transaction-list.component.ts
index 53449f9d..957f0b58 100644
--- a/Mohem/src/app/reports/transaction-list/transaction-list.component.ts
+++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.ts
@@ -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 { ReportServiceService } from '../report-service.service';
import { FileOpener } from '@ionic-native/file-opener/ngx';
+import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
+
@Component({
selector: 'app-transaction-list',
templateUrl: './transaction-list.component.html',
@@ -16,10 +18,13 @@ export class TransactionListComponent implements OnInit {
selectedMenu: any;
template: 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,
) { }
ngOnInit() {
+ this.userData =this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false);
this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, 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_FUNCTION_NAME = this.selectedMenu.FUNCTION_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.cs.stopLoading();
diff --git a/Mohem/src/app/reports/transactions/transactions.component.ts b/Mohem/src/app/reports/transactions/transactions.component.ts
index 9755fb4a..42bb0d87 100644
--- a/Mohem/src/app/reports/transactions/transactions.component.ts
+++ b/Mohem/src/app/reports/transactions/transactions.component.ts
@@ -2,10 +2,12 @@ import { Component, ElementRef, OnInit } from '@angular/core';
import { FileOpener } from '@ionic-native/file-opener/ngx';
import { File } from '@ionic-native/file/ngx';
import { Platform } from '@ionic/angular';
+import { userInfo } from 'os';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ReportServiceService } from '../report-service.service';
+import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
@Component({
selector: 'app-transactions',
@@ -18,6 +20,7 @@ export class TransactionsComponent implements OnInit {
template: any;
direction: 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,
) { }
@@ -25,10 +28,12 @@ export class TransactionsComponent implements OnInit {
ngOnInit() {
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.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false);
this.direction = TranslatorService.getCurrentDirection();
this.getConcurrentProgram();
+
}
getDate(date) {
return this.cs.evaluteDate(date);
@@ -99,6 +104,7 @@ export class TransactionsComponent implements OnInit {
request.P_SELECTED_RESP_ID = -999;
request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_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.cs.stopLoading();
@@ -108,7 +114,8 @@ export class TransactionsComponent implements OnInit {
getConcurrentProgram() {
this.cs.startLoading();
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.cs.stopLoading();
this.programList = response.GetConcurrentProgramsList;