MOE DESIGN CHANGES

MOE_DEV_NEW_TEMPORARY_DESIGN
Sultan Khan 3 years ago
parent 55f03d9971
commit 95dde56cd1

@ -29,7 +29,7 @@
<ion-list class="list-en" > <ion-list class="list-en" >
<ion-item (click)="profile()" lines="none"> <ion-item (click)="profile()" lines="none">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left> <img style= "height: 18px !important; width:16px" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('userProfile','title')}} {{ts.trPK('userProfile','title')}}
@ -152,7 +152,7 @@
<ion-list class="list-ar" > <ion-list class="list-ar" >
<ion-item (click)="profile()" lines="none"> <ion-item (click)="profile()" lines="none">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/imgs/profile_icon.png" item-left> <img style= "height: 18px !important; width:16px" src="../assets/imgs/profile_icon.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('userProfile','title')}} {{ts.trPK('userProfile','title')}}

@ -941,14 +941,14 @@ $actionBtnSize : 36px;
letter-spacing: -0.84px; letter-spacing: -0.84px;
color: #2B353E; color: #2B353E;
opacity: 1; opacity: 1;
font-family: var(--fontFamilyPoppins-SemiBold, inherit); font-family: 'Inter' !important;
line-height: 21px; line-height: 21px;
font-size: 21px; font-size: 21px;
} }
.email { .email {
text-align: center; text-align: center;
font-family: var(--fontFamilyPoppins-SemiBold, inherit); font-family: 'Inter' !important;
font-size: 13px; font-size: 13px;
line-height: 6px; line-height: 6px;
letter-spacing: -0.52px; letter-spacing: -0.52px;

@ -1,11 +1,11 @@
import { Component, OnInit, ViewChild, SimpleChanges } from '@angular/core'; import { Component, OnInit, ViewChild, SimpleChanges } from '@angular/core';
import {PayslipService} from '../service/payslip.service' import { PayslipService } from '../service/payslip.service'
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
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';
import { DeductionRequest } from '../model/deductionReq'; import { DeductionRequest } from '../model/deductionReq';
import { IonInfiniteScroll,IonSlides} from '@ionic/angular'; import { IonInfiniteScroll, IonSlides } from '@ionic/angular';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { UIChart } from 'primeng/components/chart/chart'; import { UIChart } from 'primeng/components/chart/chart';
@ -19,71 +19,72 @@ export class HomeComponent implements OnInit {
selEmp: string; selEmp: string;
respID: number; respID: number;
selMenu: MenuResponse; selMenu: MenuResponse;
GetPayslipList:any=''; GetPayslipList: any = '';
GetSummaryOfPaymentList:any=''; GetSummaryOfPaymentList: any = '';
GetPaymentInformationList:any=''; GetPaymentInformationList: any = '';
showPaySlip:any=[]; showPaySlip: any = [];
ActionContextID:any; ActionContextID: any;
public static ACTION_CONTEXT_ID = "passActionContectID"; public static ACTION_CONTEXT_ID = "passActionContectID";
GetEarningsList: any=''; GetEarningsList: any = '';
GetDeductionsList: any=''; GetDeductionsList: any = '';
earingTotal: any; earingTotal: any;
deductionTotal: any; deductionTotal: any;
firstPayslip: any; firstPayslip: any;
defultSelected: any; defultSelected: any;
IsReachEnd: any; IsReachEnd: any;
private deductionReq: DeductionRequest; private deductionReq: DeductionRequest;
doinfiniteDedReq:any; doinfiniteDedReq: any;
doinfinitEarReq:any; doinfinitEarReq: any;
personalInfo: any; personalInfo: any;
setImage:any; setImage: any;
imageSrc: any = "../assets/imgs/profile.png"; imageSrc: any = "../assets/imgs/profile.png";
slideView: any; slideView: any;
sliderOne: any; sliderOne: any;
payslipIndex :any; payslipIndex: any;
data:any; data: any;
public direction: string; public direction: string;
@ViewChild('slides') slides: IonSlides; @ViewChild('slides') slides: IonSlides;
@ViewChild('slideWithNav') slideWithNav: IonSlides; @ViewChild('slideWithNav') slideWithNav: IonSlides;
@ViewChild('chart') chart: UIChart; @ViewChild('chart') chart: UIChart;
slideOptsOne = { slideOptsOne = {
initialSlide: 0, initialSlide: 0,
slidesPerView: 1, slidesPerView: 1,
autoplay:true autoplay: true
}; };
public userData: any; public userData: any;
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll; @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
public options = { public options = {
cutoutPercentage: 85, cutoutPercentage: 85,
tooltips: { enabled: false }, tooltips: { enabled: false },
legend: { display: false }}; legend: { display: false }
gaugeType = "full"; };
gaugeType = "full";
// gaugeValue = 11.200;
// gaugeLabel = ""; // gaugeValue = 11.200;
// gaugeLabel = "";
constructor( constructor(
public payslipService:PayslipService, public payslipService: PayslipService,
public ts: TranslatorService, public ts: TranslatorService,
public common: CommonService, public common: CommonService,
public sharedData: SharedDataService, public sharedData: SharedDataService,
public authService: AuthenticationService, public authService: AuthenticationService,
public cs: CommonService, public cs: CommonService,
) { ) {
this.direction = TranslatorService.getCurrentDirection(); this.direction = TranslatorService.getCurrentDirection();
} }
ngOnInit() { ngOnInit() {
this.direction = TranslatorService.getCurrentLanguageName() this.direction = TranslatorService.getCurrentLanguageName()
this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false); this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false);
this.getPayslip(); this.getPayslip();
// this.getProfile(); // this.getProfile();
} }
@ -91,7 +92,7 @@ export class HomeComponent implements OnInit {
if (changes.inputData.currentValue) { if (changes.inputData.currentValue) {
// update this.data here // update this.data here
// then chart is getting updated // then chart is getting updated
setTimeout(() => { setTimeout(() => {
this.chart.reinit(); this.chart.reinit();
}, 100); }, 100);
@ -99,175 +100,172 @@ export class HomeComponent implements OnInit {
} }
slideNext(object, slideView) { slideNext(object, slideView) {
if(this.payslipIndex!=0){ if (this.payslipIndex != 0) {
this.payslipIndex=this.payslipIndex-1; this.payslipIndex = this.payslipIndex - 1;
this.showInfo(); this.showInfo();
}
} }
}
slidePrev(object, slideView) { slidePrev(object, slideView) {
if(this.payslipIndex<this.GetPayslipList.length-1){ if (this.payslipIndex < this.GetPayslipList.length - 1) {
// console.log(this.payslipIndex); // console.log(this.payslipIndex);
this.payslipIndex=this.payslipIndex+1; this.payslipIndex = this.payslipIndex + 1;
this.showInfo(); this.showInfo();
}
} }
}
getPayslip(){
this.respID=-999; getPayslip() {
this.respID = -999;
const request = { const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER,//'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,
// P_PAGE_LIMIT: this.P_PAGE_LIMIT // P_PAGE_LIMIT: this.P_PAGE_LIMIT
}; };
this.payslipService.getPayslip(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.payslipService.getPayslip(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{ this.handleRespondGetPayslipResult(result);
this.handleRespondGetPayslipResult(result);
} }
); );
} }
handleRespondGetPayslipResult(result){ handleRespondGetPayslipResult(result) {
if (result.GetPayslipList != null) { if (result.GetPayslipList != null) {
this.GetPayslipList = result.GetPayslipList; this.GetPayslipList = result.GetPayslipList;
this.firstPayslip= this.GetPayslipList[0] this.firstPayslip = this.GetPayslipList[0]
this.defultSelected=this.firstPayslip.PAYSLIP_CHOICE this.defultSelected = this.firstPayslip.PAYSLIP_CHOICE
} }
this.showPaySlip = this.GetPayslipList[0]; this.showPaySlip = this.GetPayslipList[0];
this.payslipIndex=0; this.payslipIndex = 0;
this.getAllPayslipData(this.GetPayslipList[0].ACTION_CONTEXT_ID); this.getAllPayslipData(this.GetPayslipList[0].ACTION_CONTEXT_ID);
} }
showInfo(){ showInfo() {
//console.log(event.detail.value); //console.log(event.detail.value);
//const index = parseInt(event.detail.value); //const index = parseInt(event.detail.value);
this.showPaySlip =this.GetPayslipList[this.payslipIndex]; this.showPaySlip = this.GetPayslipList[this.payslipIndex];
this.ActionContextID=this.GetPayslipList[this.payslipIndex].ACTION_CONTEXT_ID; this.ActionContextID = this.GetPayslipList[this.payslipIndex].ACTION_CONTEXT_ID;
this.getAllPayslipData(this.ActionContextID); this.getAllPayslipData(this.ActionContextID);
} }
getAllPayslipData(ActionContextID){ getAllPayslipData(ActionContextID) {
this.common.sharedService.setSharedData(ActionContextID,HomeComponent.ACTION_CONTEXT_ID); this.common.sharedService.setSharedData(ActionContextID, HomeComponent.ACTION_CONTEXT_ID);
this.getSummeryOfPayment(ActionContextID); this.getSummeryOfPayment(ActionContextID);
this.getPaymentInfo(ActionContextID); this.getPaymentInfo(ActionContextID);
this.getDeduction(ActionContextID); this.getDeduction(ActionContextID);
this.getEarings(ActionContextID); this.getEarings(ActionContextID);
} }
getSummeryOfPayment(ActionContextID){ getSummeryOfPayment(ActionContextID) {
const request = { const request = {
P_ACTION_CONTEXT_ID: ActionContextID, P_ACTION_CONTEXT_ID: ActionContextID,
}; };
this.payslipService.getSummeryOFPayment(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.payslipService.getSummeryOFPayment(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{ this.handleSummeryOfPaymentResult(result);
this.handleSummeryOfPaymentResult(result);
} }
); );
} }
handleSummeryOfPaymentResult(result){ handleSummeryOfPaymentResult(result) {
if (result.GetSummaryOfPaymentList != null) { if (result.GetSummaryOfPaymentList != null) {
this.GetSummaryOfPaymentList = result.GetSummaryOfPaymentList[0]; this.GetSummaryOfPaymentList = result.GetSummaryOfPaymentList[0];
this.earingTotal = this.GetSummaryOfPaymentList.TOTAL_EARNINGS_AMOUNT; this.earingTotal = this.GetSummaryOfPaymentList.TOTAL_EARNINGS_AMOUNT;
this.deductionTotal = this.GetSummaryOfPaymentList.TOTAL_DEDUCTIONS_AMOUNT; this.deductionTotal = this.GetSummaryOfPaymentList.TOTAL_DEDUCTIONS_AMOUNT;
this.data = { this.data = {
labels: ['earingTotal', 'deductionTotal'], labels: ['earingTotal', 'deductionTotal'],
datasets: [ datasets: [
{ data: [this.earingTotal,this.deductionTotal], {
backgroundColor: [ data: [this.earingTotal, this.deductionTotal],
'#024d71', backgroundColor: [
'#024d71', ], '#43A6A0',
borderWidth: 2 '#024d71',],
} borderWidth: 2
] }
}; } ]
};
}
} }
getPaymentInfo(ActionContextID){ getPaymentInfo(ActionContextID) {
const request = { const request = {
P_ACTION_CONTEXT_ID: ActionContextID, P_ACTION_CONTEXT_ID: ActionContextID,
}; };
this.payslipService.getPaymentInfo(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handleGetPaymentInfoResult(result);
}
);
}
handleGetPaymentInfoResult(result){ this.payslipService.getPaymentInfo(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (result.GetPaymentInformationList != null) { this.handleGetPaymentInfoResult(result);
this.GetPaymentInformationList = result.GetPaymentInformationList; }
);
} }
}
openEarings(){ handleGetPaymentInfoResult(result) {
this.common.openEarningsPage(); if (result.GetPaymentInformationList != null) {
this.GetPaymentInformationList = result.GetPaymentInformationList;
}
}
} openEarings() {
openDeductions(){ this.common.openEarningsPage();
this.common.openDeductionsPage();
}
getEarings(ActionContextID){
console.log("getEarings");
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1;
// this.deductionReq.P_PAGE_LIMIT=100;
const request ={
P_ACTION_CONTEXT_ID:ActionContextID,
P_PAGE_NUM:1,
P_PAGE_LIMIT:100
}
this.doinfinitEarReq=request;
this.payslipService.getEarings(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
this.handleGetEaringsResult(result);
} }
); openDeductions() {
} this.common.openDeductionsPage();
}
handleGetEaringsResult(result){ getEarings(ActionContextID) {
if (result.GetEarningsList != null) { console.log("getEarings");
this.GetEarningsList = result.GetEarningsList;
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1;
// this.deductionReq.P_PAGE_LIMIT=100;
const request = {
P_ACTION_CONTEXT_ID: ActionContextID,
P_PAGE_NUM: 1,
P_PAGE_LIMIT: 100
}
this.doinfinitEarReq = request;
this.payslipService.getEarings(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.handleGetEaringsResult(result);
}
);
} }
handleGetEaringsResult(result) {
if (result.GetEarningsList != null) {
this.GetEarningsList = result.GetEarningsList;
}
}
getDeduction(ActionContextID){
console.log("getDeduction");
const request ={
P_ACTION_CONTEXT_ID:ActionContextID,
P_PAGE_NUM:1,
P_PAGE_LIMIT:100
} }
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1; getDeduction(ActionContextID) {
// this.deductionReq.P_PAGE_LIMIT=100; console.log("getDeduction");
this.doinfiniteDedReq=request; const request = {
P_ACTION_CONTEXT_ID: ActionContextID,
this.payslipService.getDeduction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> P_PAGE_NUM: 1,
{ P_PAGE_LIMIT: 100
this.handleGetDeductionResult(result); }
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1;
// this.deductionReq.P_PAGE_LIMIT=100;
this.doinfiniteDedReq = request;
this.payslipService.getDeduction(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
this.handleGetDeductionResult(result);
} }
); );
} }
handleGetDeductionResult(result){ handleGetDeductionResult(result) {
if (result.GetDeductionsList != null) { if (result.GetDeductionsList != null) {
this.GetDeductionsList = result.GetDeductionsList; this.GetDeductionsList = result.GetDeductionsList;
} }
@ -335,6 +333,6 @@ getDeduction(ActionContextID){
} else { } else {
if (this.infiniteScroll) this.infiniteScroll.complete(); if (this.infiniteScroll) this.infiniteScroll.complete();
} }
} }
} }

Loading…
Cancel
Save