Merge branch 'MOHEMM-Q3-DEV-LATEST' into enad-pre-live

# Conflicts:
#	Mohem/src/app/home/home.page.ts
MOHEMM-Q3-DEV-LATEST
umasoodch 3 years ago
commit 1ac6a9abbd

@ -168,9 +168,9 @@ export class AbsenceConfirmComponent implements OnInit {
if (this.common.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitAbs==false){
let msg: string = this.ts.trPK('general', 'messageSuccess');
this.common.presentAlert(msg);
// let msg: string = this.ts.trPK('general', 'messageSuccess');
// this.common.presentAlert(msg);
this.common.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
this.common.openNotificationPage();

@ -76,10 +76,10 @@
<img class="item-icon" [src]="checkerFuncation(5)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isRepeatedLetter.text}}</p></ion-label>
</ion-item>
<ion-item lines='none'>
<!-- <ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(6)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isContainSpecialChar.text}}</p></ion-label>
</ion-item>
</ion-item> -->
<ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(7)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{confirmMatchNew.text}}</p></ion-label>

@ -83,13 +83,13 @@ export class ChangePasswordComponent implements OnInit {
text: this.ts.trPK('login', 'repeating-password-validation'),
isMatch: false
};
public isContainSpecialChar = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: this.ts.trPK('login', 'special-character-password-validation'),
isMatch: false
};
// public isContainSpecialChar = {
// blankImg: '../assets/icon/blank.svg',
// greenImg: '../assets/icon/green.svg',
// redImg: '../assets/imgs/close.svg',
// text: this.ts.trPK('login', 'special-character-password-validation'),
// isMatch: false
// };
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
@ -176,8 +176,10 @@ export class ChangePasswordComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
this.cs.toastPK("changePassword", "successChange");
this.cs.greenToastPK("changePassword", "successChange");
this.sharedData.setSharedData(false, Password.IS_EXPIRED_PSW);
// this.cs.sharedService.getSharedData( AuthenticationService.IMEI_USER_DATA);
localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openLogin();
}
});
@ -198,8 +200,10 @@ export class ChangePasswordComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
localStorage.setItem('password', this.P_NEW_PASSWORD);
console.log(result);
this.cs.toastPK("changePassword", "successChange");
this.cs.greenToastPK("changePassword", "successChange");
localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openHome();
}
});
@ -254,8 +258,8 @@ export class ChangePasswordComponent implements OnInit {
return this.isMinLength.blankImg;
case 5:
return this.isRepeatedLetter.blankImg;
case 6:
return this.isContainSpecialChar.blankImg;
// case 6:
// return this.isContainSpecialChar.blankImg;
case 7:
return this.confirmMatchNew.blankImg;
case 8:
@ -311,14 +315,14 @@ export class ChangePasswordComponent implements OnInit {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
}
case 6:
if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
this.isContainSpecialChar.isMatch = true;
return this.isContainSpecialChar.greenImg;
} else {
this.isContainSpecialChar.isMatch = false;
return this.isContainSpecialChar.redImg;
}
// case 6:
// if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
// this.isContainSpecialChar.isMatch = true;
// return this.isContainSpecialChar.greenImg;
// } else {
// this.isContainSpecialChar.isMatch = false;
// return this.isContainSpecialChar.redImg;
// }
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = false;
@ -343,7 +347,7 @@ export class ChangePasswordComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLetterCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.NEW_PASSWORD
&& this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
&& this.Confirm_NEW_PASSWORD && this.OLD_PASSWORD && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}

@ -439,7 +439,7 @@ export class ConfirmLoginComponent implements OnInit {
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language;
request.P_PASSWORD = this.password;
request.P_PASSWORD = localStorage.getItem('password');
this.authService
.login(request, () => {
console.log('error here');
@ -514,11 +514,12 @@ export class ConfirmLoginComponent implements OnInit {
}, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log('2');
console.log(result);
this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username;
// this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);

@ -72,10 +72,10 @@
<img class="item-icon" [src]="checkerFuncation(5)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isRepeatedLetter.text}}</p></ion-label>
</ion-item>
<ion-item lines='none'>
<!-- <ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(6)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{isContainSpecialChar.text}}</p></ion-label>
</ion-item>
</ion-item> -->
<ion-item lines='none'>
<img class="item-icon" [src]="checkerFuncation(7)" item-start />
<ion-label><p style="white-space: pre-wrap;">{{confirmMatchNew.text}}</p></ion-label>

@ -70,13 +70,13 @@ export class ForgotComponent implements OnInit {
text: this.ts.trPK('login', 'repeating-password-validation'),
isMatch: false
};
public isContainSpecialChar = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
redImg: '../assets/imgs/close.svg',
text: this.ts.trPK('login', 'special-character-password-validation'),
isMatch: false
};
// public isContainSpecialChar = {
// blankImg: '../assets/icon/blank.svg',
// greenImg: '../assets/icon/green.svg',
// redImg: '../assets/imgs/close.svg',
// text: this.ts.trPK('login', 'special-character-password-validation'),
// isMatch: false
// };
public confirmMatchNew = {
blankImg: '../assets/icon/blank.svg',
greenImg: '../assets/icon/green.svg',
@ -153,7 +153,8 @@ export class ForgotComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.checkUserResult = result;
console.log(result);
this.cs.toastPK('changePassword', 'successChange');
this.cs.greenToastPK("changePassword", "successChange");
localStorage.setItem('password', this.P_NEW_PASSWORD);
this.cs.openLogin();
}
});
@ -175,8 +176,8 @@ export class ForgotComponent implements OnInit {
return this.isMinLength.blankImg;
case 5:
return this.isRepeatedLetter.blankImg;
case 6:
return this.isContainSpecialChar.blankImg;
// case 6:
// return this.isContainSpecialChar.blankImg;
case 7:
return this.confirmMatchNew.blankImg;
case 8:
@ -232,14 +233,14 @@ export class ForgotComponent implements OnInit {
this.isRepeatedLetter.isMatch = true;
return this.isRepeatedLetter.greenImg;
}
case 6:
if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
this.isContainSpecialChar.isMatch = true;
return this.isContainSpecialChar.greenImg;
} else {
this.isContainSpecialChar.isMatch = false;
return this.isContainSpecialChar.redImg;
}
// case 6:
// if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(this.P_NEW_PASSWORD)) {
// this.isContainSpecialChar.isMatch = true;
// return this.isContainSpecialChar.greenImg;
// } else {
// this.isContainSpecialChar.isMatch = false;
// return this.isContainSpecialChar.redImg;
// }
case 7:
if (this.P_NEW_PASSWORD !== this.P_Confirm_NEW_PASSWORD) {
this.confirmMatchNew.isMatch = false;
@ -263,7 +264,7 @@ export class ForgotComponent implements OnInit {
disabledSubmitBtn() {
if (this.isLetterCase.isMatch && this.isHasDigit.isMatch && this.isMinLength.isMatch
&& this.isRepeatedLetter.isMatch && this.P_NEW_PASSWORD !== '' && this.P_NEW_PASSWORD
&& this.P_Confirm_NEW_PASSWORD && this.isContainSpecialChar.isMatch && this.confirmMatchNew.isMatch) {
&& this.P_Confirm_NEW_PASSWORD && this.confirmMatchNew.isMatch) {
return false;
} else { return true; }
}

@ -198,8 +198,9 @@ export class ConfirmAddCeiComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
this.cs.openNotificationPage();
}
}

@ -229,8 +229,9 @@ export class ConfirmAddEitComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitEIT==false){
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();

@ -142,7 +142,7 @@ export class AuthenticationService {
} else {
mobileType = 'android';
}
request.VersionID = 3.4;
request.VersionID = 3.5;
request.Channel = 31;
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;

@ -85,7 +85,8 @@ export class CommonService {
'POAPPRV': 0,
'INVITEM': 0,
"STAMP": 0,
'ITG': 0
'ITG': 0,
'COC': 0
}
private progressLoaders: any[] = [];
@ -1665,7 +1666,15 @@ export class CommonService {
disable: false,
total: 0,
},
{
value: 0,
name: 'COC',
active: false,
color: '#787299',
key: 'COC',
disable: true,
total: 0,
}
];
public data = {
@ -1706,6 +1715,8 @@ export class CommonService {
this.filters[6].value = this.filterKeys['STAMP'];
this.data.datasets[0].data[6] = this.filterKeys['STAMP'];
this.filters[7].value = this.filterKeys['COC'];
this.data.datasets[0].data[7] = this.filterKeys['COC'];
let val = { 'filters': [], 'data': {} };
val.filters = this.filters;

@ -27,8 +27,8 @@ export class ConnectorService {
public static retryTimes = 0;
public static timeOut = 180 * 1000;
public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
// public static host = 'https://uat.hmgwebservices.com/';
public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient,
public cs: CommonService,

@ -11,6 +11,7 @@ import { Geolocation } from '@ionic-native/geolocation/ngx';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { Device } from '@ionic-native/device/ngx';
import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request';
import { COCRequest } from 'src/app/notification/models/COCRequest';
import { Response } from 'src/app/hmg-common/services/models/response';
import { AttendanceService } from './services/attendance.services';
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
@ -41,7 +42,8 @@ import { NFC, Ndef } from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
import * as moment from "moment";
import { count } from 'console';
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
@ -674,9 +676,30 @@ export class HomePage implements OnInit {
this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => {
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
this.common.filterKeys['ITG'] = result.TotalCount;
this.statsButtons[1].statsValue =
Math.floor(this.countAllNotification + result.TotalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.getCOCNotificationCount();
this.common.stopLoading();
});
}
getCOCNotificationCount() {
const request = new COCRequest();
request.ItgPageSize = 1;
request.ItgPageNo = 1;
request.Date = moment(new Date()).format("YYYY-MM-DD");
this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
console.log(result);
const countResult = result.Mohemm_ITG_Pending_Task_ResponseItem;
const totalCount = countResult.escalation + countResult.waitingToClose + countResult.waitingForAcceptance + countResult.extendTATRequest;
this.common.filterKeys['COC'] = totalCount;
this.statsButtons[1].statsValue = Math.floor(this.statsButtons[1].statsValue + totalCount);
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
this.common.stopLoading();
});
}

@ -324,7 +324,7 @@ export class HomeComponent implements OnInit {
}
activeFilter(index: number) {
if (index !== this.currentActiveIndex) {
if (index !== this.currentActiveIndex && index !== 7) {
if (index !== 4) {
this.common.startLoading();
}

@ -0,0 +1,8 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class COCRequest extends Request {
public ItgPageSize: number;
public ItgPageNo: number;
public Date: string;
public EmployeeNumber: string;
}

@ -20,6 +20,8 @@ import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
import { Request } from 'src/app/hmg-common/services/models/request';
import { LoginModel } from '../../authentication/models/LoginModel';
import { itgRequest } from '../models/itgFormDetailsRequest';
import { COCRequest } from '../models/COCRequest';
import { UserItemTypes } from "../models/userItemTypeRequest";
@Injectable()
@ -47,6 +49,7 @@ export class WorklistMainService {
public static getQutationAnalysisUrl = "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
public static getITGFormTaskCount = 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
public static getITGFormTaskDetails = 'Services/COCWS.svc/REST/ITGFormsPendingTasks';
public static getCOCCount = 'Services/COCWS.svc/REST/Mohemm_ITG_ReviewerAdmin_Pending_Tasks';
public static getITGFormDetails = 'Services/COCWS.svc/REST/ITGGetFormDetials';
public static getWorklistNotificationURL = 'Services/ERP.svc/REST/GET_USER_ITEM_TYPES';
public static updateWorklistNotificationURL = 'Services/ERP.svc/REST/UPDATE_USER_ITEM_TYPES';
@ -431,6 +434,28 @@ export class WorklistMainService {
}
}
public getCOCCount( request: COCRequest, onError?: any, errorLabel?: string, isPostNoLoad = false): Observable<any> {
// const request = new Request();
console.log(request);
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.UserName;
if (isPostNoLoad) {
return this.api.postNoLoad(
WorklistMainService.getCOCCount,
request,
onError,
errorLabel
);
} else {
return this.api.post(
WorklistMainService.getCOCCount,
request,
onError,
errorLabel
);
}
}
public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(itgrequest);

@ -265,8 +265,9 @@ export class ConfirmAddressComponent implements OnInit {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
//if(this.isResubmitEIT==false){
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
// }
// this.navCtrl.popToRoot();
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);

@ -191,8 +191,9 @@ export class ConfirmBasicDetailsComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
this.cs.openNotificationPage();
}
}

@ -192,8 +192,9 @@ export class ConfirmContactComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
this.cs.openNotificationPage();
}
}

@ -186,8 +186,9 @@ export class ConfirmTerminationComponent implements OnInit {
handleResults(result) {
if (this.cs.validResponse(result)) {
this.isSubmitBtnClicked = true;
let msg: string = this.ts.trPK("eit", "approval-message-success");
this.cs.presentAlert(msg);
// let msg: string = this.ts.trPK("eit", "approval-message-success");
// this.cs.presentAlert(msg);
this.cs.greenToastPK("eit", "approval-message-success")
this.cs.openNotificationPage();
}
}

@ -1352,16 +1352,16 @@
"ar": "الوصف"
},
"MyHR-request": {
"en": "MY HR REQUEST",
"ar": "طلباتي"
"en": "Mowadhafhi Request",
"ar": "طلب Mowadhafhi"
},
"createHR-Request": {
"en": "CREATE HR REQUEST",
"ar": "انشاء طلب"
"en": "Create Mowadhafhi Request",
"ar": "انشاء Mowadhafhi طلب"
},
"HR-Request": {
"en": "HR Request",
"ar": "HR طلبات"
"en": "Mowadhafhi",
"ar": "Mowadhafhi"
},
"performance-evaluation": {
"en": "Performance Evaluation",
@ -3530,7 +3530,7 @@
"ar": "نوع الطلب"
},
"request-generated": {
"en": "Your Request for resport has been sent to the server, click below link to check status",
"en": "Your Request for report has been sent to the server, click below link to check status",
"ar": "تم إرسال طلبك عن التقرير إلى الخادم، انقر فوق الرابط أدناه للتحقق من الحالة"
},
"check-status": {

Loading…
Cancel
Save