add ticket balance

accural-balance
Fatimah.Alshammari 6 years ago
parent e71dd383da
commit d2940a70d0

@ -1,11 +1,122 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar-new">
<nav-buttons [enableMenu]="false" [enableBack]="true" [navigate]="true"></nav-buttons>
<ion-title>{{headerTitle}}</ion-title>
</ion-toolbar>
</ion-header>
</ion-header> -->
<ion-content padding>
<ion-content class="colorBG">
<div class="header-div">
<ion-buttons slot="start">
<ion-back-button color="light" class="btnBack" defaultHref="/home"></ion-back-button>
</ion-buttons>
<p class="Title">{{ts.trPK('absenceList','tickets-balance')}}</p>
</div>
<div class="">
<ion-grid class="headerGrid">
<p class="title">{{ts.trPK('absenceList','tickets-balance')}}</p>
<div style="color: black;">
<div class="result-graph">
<p-chart #chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
<div>
<ion-row>
<ion-col class="col" size="4">
<div class="light-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="light-label">{{ts.trPK('absenceList','adult')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="blue-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="blue-label">{{ts.trPK('absenceList','child')}}</label>
</ion-col>
<ion-col class="col" size="4">
<div class="green-dote"></div>
<!-- </ion-col>
<ion-col> -->
<label class="green-label">{{ts.trPK('absenceList','infants')}} </label>
</ion-col>
</ion-row>
</div>
</div>
</div>
</ion-grid>
</div>
<!-- ///////////////////////////////////////////////// -->
<ion-grid >
<div class="gridService">
<ion-row>
<ion-col class="columns">
<div class="adult-dote"></div>
<label>{{ts.trPK('absenceList','adult')}}</label>
<br>
<br>
<label class="service">{{accrualNetAdult}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="child-dote"></div>
<label>{{ts.trPK('absenceList','child')}} </label>
<br>
<br>
<label class="service">{{accrualUNetChild}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
<ion-col class="columns">
<div class="infants-dote"></div>
<label>{{ts.trPK('absenceList','infants')}} </label>
<br>
<br>
<label class="service">{{accrualNetInfants}}</label>
<br> <label class="services">{{ts.trPK('absenceList','tickets')}}</label>
</ion-col>
</ion-row>
</div>
</ion-grid>
<!--
<ion-grid class="three-grid">
<ion-row>
<ion-col >
infants
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
<ion-row>
<ion-col >
child
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
<ion-row>
<ion-col >
adult
</ion-col>
<ion-col >2</ion-col>
<ion-col >tickit</ion-col>
</ion-row>
</ion-grid> -->
<!-- //////////////////////////////////////////////////// -->
<!-- <ion-content padding> -->
<div *ngIf="eitAddedList && eitAddedList.length > 0 ">
<ion-card *ngFor="let eitAddedObj of eitAddedList; let i=index ">

@ -52,7 +52,7 @@ h4 {
background-color: #22C6B3;
text-transform: capitalize;
height: 160px;
position: relative;
// position: relative;
display: block;
margin-bottom: -28px;
}
@ -82,4 +82,157 @@ h4 {
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
}
////////////////////////////////
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.title{
text-align: center;
color: black;
margin-top: -10px;
font-size: 17px;
}
.today-graph{
display: block !important;
height: 196px;
width: 365px;
/* padding-left: 51px; */
margin-left: 28px !important;
}
.headerGrid{
background-color: white !important;
border: 1px solid #cac8c8 !important;
border-radius: 20px !important;
padding-top: 28px;
padding-bottom: 53px;
margin-left: 9px;
margin-right: 13px;
margin-top: -94px;
margin-bottom: 10px;
}
.result-graph{
font-size: 14px;
margin-left: -48px;
margin-right: 3px;
margin-bottom: -30px;
}
.green-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 42px;
}
.blue-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 13px;
}
.light-label{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: -26px;
}
.light-dote{
background-color: #3CB9D5;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.blue-dote{
background-color: #22C6B3;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.green-dote{
background-color: #1FA269;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
margin-right: -1px;
}
.col{
text-align: right;
}
.gridService{
/* margin-top: 87px; */
border-radius: 10px;
/* margin-bottom: -49px; */
margin-left: 14px;
margin-right: 14px;
}
.columns{
margin: 3px;
margin-bottom: 13px;
background: white;
border-radius: 27px;
padding-left: 30px;
padding-right: 6px;
padding-top: 19px;
padding-bottom: 8px;
border: 1px solid #cac8c8 !important;
}
.service{
font-size: 22px;
color: black;
letter-spacing: 1px;
font-weight: bold;
}
.services{
font-size: 12px;
color: black;
}
.adult-dote{
background-color: #3CB9D5;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.child-dote{
background-color: #22C6B3;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.infants-dote{
background-color: #1FA269;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
// margin-bottom: 6px;
}

@ -40,6 +40,21 @@ export class EitListComponent implements OnInit {
private selectedIndex: number;
private pAction: number = 0;
public headerTitle: string = "";
data: any;
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = "full";
accrualBalancesList: any;
common: any;
// gaugeValue = 11.200;
// gaugeLabel = "";
constructor(private cs: CommonService, private EITService: EitService, private ts: TranslatorService, private modalCtrl: ModalController) {
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
@ -57,6 +72,26 @@ export class EitListComponent implements OnInit {
ngOnInit() {
this.getEITTransactions();
this.accrualBalancesList = this.cs.sharedService.getSharedData('tickitsbalance', false);
// accrualNetInfants
// accrualUNetChild
// accrualNetAdult
this.accrualNetAdult = this.accrualBalancesList[1].ACCRUAL_NET_ENTITLEMENT;
this.accrualUNetChild = this.accrualBalancesList[2].ACCRUAL_NET_ENTITLEMENT;
this. accrualNetInfants= this.accrualBalancesList[3].ACCRUAL_NET_ENTITLEMENT;
this.data = {
// labels: ['earingTotal', 'deductionTotal'],
datasets: [
{ data: [this.accrualNetInfants, this.accrualUNetChild, this.accrualNetAdult],
backgroundColor: [
'#1FA269',
'#22C6B3',
'#3CB9D5',],
borderWidth: 2
}
]
};
}
getEITTransactions() {
@ -455,4 +490,6 @@ export class EitListComponent implements OnInit {
this.eitAddedList = list;
this.removeItems(item.Collection_Transaction[0].TRANSACTION_NUMBER);
}
}

@ -117,6 +117,7 @@ export class HomePage implements OnInit {
public displayTime: any;
public menuEntries: any;
public percent: any;
accrualBalancesList: any;
constructor(
public ts: TranslatorService,
@ -546,6 +547,7 @@ export class HomePage implements OnInit {
}
openPage(subMenu) {
console.log("openPage");
let selMenu: MenuResponse = new MenuResponse();
selMenu = this.common.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
selMenu.GetMenuEntriesList = subMenu;
@ -576,11 +578,14 @@ export class HomePage implements OnInit {
.subscribe((result: any) => {
if (this.common.validResponse(result)) {
let totalTicketsLeft = 0;
this.accrualBalancesList = result.GetAccrualBalancesList;
for (const accrualBalance of result.GetAccrualBalancesList) {
if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') {
this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT;
this.common.sharedService.setSharedData( accrualBalance, 'leaveAccrualBalance');
this.common.sharedService.setSharedData( request, 'leaveAccrualBalanceDate');
this.common.sharedService.setSharedData( this.accrualBalancesList, 'tickitsbalance')
} else {
totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT;
}

@ -1277,6 +1277,26 @@
"attachList": {
"en": "Attachment List",
"ar": "قائمة المرفقات"
},
"adult": {
"en": "Adult",
"ar": "بالغ"
},
"child": {
"en": "Child",
"ar": "طفل"
},
"infants": {
"en": "Infants",
"ar": "رضيع"
},
"tickets": {
"en": "Tickets",
"ar": "تذاكر"
},
"tickets-balance": {
"en": "Ticket Balance",
"ar": "رصيد التذاكر"
}
},
"accrualBalances": {

Loading…
Cancel
Save