Merge branch 'enad-pre-live' of https://gitlab.com/haroon6138/mohemmionic5 into enad-pre-live

MOHEMM-Q3-DEV-LATEST
Sultan Khan 3 years ago
commit c7de4250fe

@ -482,6 +482,7 @@ export class SmsPageComponent implements OnInit {
}
this.common.sharedService.setSharedData(result.MemberInformationList[0].PAYROLL_CODE, "projcet-code");
this.common.sharedService.setSharedData(result.BasicMemberInformation.P_LEGISLATION_CODE, "legislation-code");
this.activeType = this.common.setActiveTypeLogin(0);

@ -134,6 +134,9 @@ export class AuthenticationService {
public setPublicFields(request: Request): Request {
const isAndroid = this.platform.is('android');
const isIOS = this.platform.is('ios');
// const userData = this.cs.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
const userPayrollCode = this.cs.sharedService.getSharedData("projcet-code", false);
const userLegislationCode = this.cs.sharedService.getSharedData("legislation-code", false);
let mobileType = '';
if (isAndroid) {
mobileType = 'android';
@ -147,6 +150,13 @@ export class AuthenticationService {
request.LanguageID = TranslatorService.getCurrentLanguageCode();
request.MobileType = mobileType;
if (userPayrollCode) {
request.PayrollCodeStr = userPayrollCode;
}
if (userLegislationCode) {
request.LegislationCodeStr = userLegislationCode
}
return request;
}
public authenticateAndSetPersonalInformation(

@ -3,6 +3,7 @@ import { Response } from 'src/app/hmg-common/services/models/response';
import { AuthenticatedUser } from './authenticated-user';
import { PrivilageModel } from './privilage-model';
export class SMSCheckResponse extends Response {
BasicMemberInformation: any = {};
AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[];
Privilege_List:PrivilageModel[];

@ -18,6 +18,8 @@ export class Request {
public P_MOBILE_NUMBER: string;
public P_EMAIL_ADDRESS: string;
public P_NOTIFICATION_ID: number;
public PayrollCodeStr: string;
public LegislationCodeStr: string;
// public P_LEGISLATION_CODE: string;
// public OTP_SendType: number;

@ -53,3 +53,13 @@
width: 100px;
height: 70px;
}
.loader {
position: absolute;
width: 100%;
top: 70px;
left: 2px;
img {
width: 25px;
}
}

@ -10,6 +10,9 @@
<ion-row *ngIf="showStaticServices" class="slideFullWidth">
<ion-slides [options]="slideOptsOne" class="padding-slide slide">
<ion-slide *ngFor="let button of statsButtons; let i=index;">
<div class="loader" *ngIf="i === 1 && showLoader">
<img src="../assets/icon/progress-loading.gif" />
</div>
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"

@ -156,3 +156,14 @@ ion-label{
// text-transform: uppercase;
// }
// }
.loader {
position: absolute;
width: 100%;
top: 70px;
left: 2px;
img {
width: 25px;
}
}

@ -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,9 @@ 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';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
@ -68,6 +71,7 @@ export class HomePage implements OnInit {
public showVcationRule = false;
public isFakeLocationUsed = false;
public intervalCountdown: any;
public showLoader = true;
public statsButtons = [
{
title: this.ts.trPK('attendance-tracking', 'title'),
@ -371,6 +375,7 @@ export class HomePage implements OnInit {
this.setServicesPrivilage();
if (this.common.getTotalNumberOfWorklistRequest()) {
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.showLoader = false;
} else {
this.openNotificationsDashbored();
}
@ -666,17 +671,63 @@ export class HomePage implements OnInit {
'worklistNotifications'
);
this.common.setFilterValues(result['GetOpenNotificationsList']);
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}
ITGCountAllNotification() {
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');
if (this.common.validResponse(result)) {
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.getCOCNotificationCount();
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
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);
if (this.common.validResponse(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.showLoader = false;
this.common.stopLoading();
} else {
this.showLoader = false;
this.common.stopLoading();
}
}, (error) => {
this.showLoader = false;
this.common.stopLoading();
});
}

Loading…
Cancel
Save