added cei list functionality

sultan-q3
umasoodch 4 years ago
parent 3cc9048098
commit 7ab6e0e46a

@ -6,10 +6,10 @@
<div padding>
<ion-list>
<ion-radio-group [(ngModel)]="SelectedServiceType">
<ion-radio-group [(ngModel)]="selectedServiceType">
<ion-item *ngFor="let user of familyMemberData">
<ion-label>{{user.CONTACT_NAME}}</ion-label>
<ion-radio mode="md" slot="start" [value]="user" (click)='selectedUser()'></ion-radio>
<ion-radio mode="md" slot="start" [value]="user"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>

@ -10,34 +10,37 @@ import { EitService } from '../services/eit.service';
})
export class CeiHomepageComponent implements OnInit {
public familyMemberData;
SelectedServiceType;
public familyMemberData: any;
public selectedServiceType: any;
constructor(
private eitService: EitService,
public ts: TranslatorService,
public cs: CommonService
) {
this.eitService.getContactInfo({
P_MENU_TYPE: 'E',
P_SELECTED_RESP_ID: -999
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
if (this.cs.validResponse(response)) {
this.familyMemberData = response['GetEmployeeContactsList'];
this.SelectedServiceType = this.familyMemberData[0];
console.log(this.familyMemberData);
}
});
}
ngOnInit() {}
) {}
public gotoTransactionsPage() {
console.log(this.SelectedServiceType);
ngOnInit() {
this.getContactInfo();
}
public selectedUser() {
console.log(this.SelectedServiceType);
public getContactInfo () {
this.eitService.getContactInfo({
P_MENU_TYPE: 'E',
P_SELECTED_RESP_ID: -999
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
if (this.cs.validResponse(response)) {
this.familyMemberData = response['GetEmployeeContactsList'];
this.selectedServiceType = this.familyMemberData[0];
console.log(this.familyMemberData);
}
});
}
public gotoTransactionsPage() {
console.log(this.selectedServiceType);
this.cs.sharedService.setSharedData(this.selectedServiceType, 'selectedContactFORChildEducation');
this.cs.openCEIListPage();
}
}

@ -1,3 +1,42 @@
<p>
cei-list works!
</p>
<app-generic-header
showBack="true"
[headerText]="headerTitle">
</app-generic-header>
<ion-content>
<div>
<div class="no-dataDiv"
*ngIf="!getResCEITransactionList || getResCEITransactionList[0]?.Collection_Transaction.length <= 0">
<ion-row>
<img class="empty-data" src="../assets/imgs/box.png" />
</ion-row>
<h4> {{'general, noData' | translate}}</h4>
</div>
<div *ngIf="getResCEITransactionList && getResCEITransactionList[0]?.Collection_Transaction.length > 0 ">
<div *ngFor="let EITTransactionList of getResCEITransactionList; let i=index ">
<ion-grid>
<div>
</div>
<ion-grid class="grids">
<div *ngFor="let item of EITTransactionList.Collection_Transaction">
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''">
<label style="color:#269DB8;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<br>
<label class="label" style="color:black;" for="">{{item.SEGMENT_VALUE_DSP}} </label>
<br>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-grid>
</div>
<div>
</div>
</div>
</div>
</ion-content>
<ion-icon class="addClass" name="add" (click)="addEITRrq()"></ion-icon>

@ -0,0 +1,319 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
.datetime{
text-align: center;
font-family: WorkSans-Bold;
margin-left: 47px;
margin-top: -19px;
}
.iconCalendar{
margin-left: 30px !important;
width: 22% !important;
height: 26px !important;
margin-top: -69px !important;
margin-bottom: 20px !important;
}
h4 {
font-size: 2.2rem;
text-align: center;
color: #000000;
}
.grids{
border-radius: 20px !important;
background: white;
padding-left: 1px;
padding-right: 1px;
margin: 13px;
padding-top: 0px;
padding-bottom: 3px;
padding-left: 13px;
padding-right: 13px;
border: 1px solid #cac8c8;
}
.bgcolor {
color: white;
border-top-right-radius: 19px;
border-top-left-radius: 15px;
padding-top: 1;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
/* border-radius: 12px !important; */
background: #269DB8;
border-bottom: 1px solid #a7a4a4;
border-top: 1px solid #cac8c8;
margin-left: -13px;
margin-right: -13px;
}
.colEit{
border-right: 1px solid #cac8c8;
border-bottom-left-radius: -10px !important;
padding-top: 8px;
padding-bottom: 8px;
margin-left: 18px;
font-size: 12px !important;
}
.header-div {
background-color: #269DB8;
text-transform: capitalize;
height: 160px;
// position: relative;
display: block;
margin-bottom: -28px;
}
.header-toolbar-new{
--background: #269DB8;
}
.addClass{
background-color: #269DB8;
width: 80px;
height: 80px;
right: 8%;
position: fixed;
color: white;
bottom: 5%;
border-radius: 50%;
z-index: 999;
-webkit-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
-moz-box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
box-shadow: 2px -1px 13px 0px rgba(0,0,0,0.59);
}
.contentEit:before {
position: absolute;
content: "";
// background: #269DB8;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.hrClass{
border-width: 0;
box-sizing: content-box;
border-bottom: 1px solid #e6e6e6;
background: #fff !important;
height: 1px;
}
////////////////////////////////
.content:before {
position: absolute;
content: "";
background: #269DB8;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
.colorBG{
--background: #f0efef;
}
.Title{
text-align: center;
color: white;
margin-top: -33px;
font-size: 17px;
}
.title{
text-align: center;
color: black;
margin-top: 5px;
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;
padding-bottom: 53px;
padding-top: -30px;
margin-left: 13px;
margin-right: 13px;
margin-bottom: 10px;
position: relative;
z-index: 1;
border-radius: 20px;
margin-top: 17px;
}
.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;
}
.green-label-ar{
font-size: 15px !important;
margin-left: 7px !important;
margin-right: 15px;
}
.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-label-ar{
font-size: 15px !important;
margin-right: 7px !important;
margin-left: -26px;
}
.light-dote{
background-color: #3CB9D5;
width: 12px;
height: 12px;
border-radius: 50% !important;
display: inline-block;
}
.blue-dote{
background-color: #269DB8;
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;
}
.adult-dote-ar{
background-color: #3CB9D5;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-right: 0px;
margin-left: 5px;
}
.child-dote{
background-color: #269DB8;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-left: -17px;
margin-right: 5px;
}
.child-dote-ar{
background-color: #269DB8;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-right: 1px;
margin-left: 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;
}
.infants-dote-ar{
background-color: #1FA269;
width: 15px;
height: 15px;
border-radius: 50% !important;
display: inline-block;
margin-right: 1px;
margin-left: 5px;
}

@ -1,4 +1,11 @@
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { EITTransactionsRequest } from './../models/EITTransactionsReq';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { Component, OnInit } from '@angular/core';
import { EitService } from '../services/eit.service';
import { EIT_ACTION } from '../models/submit.eit.action';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
@Component({
selector: 'app-cei-list',
@ -6,9 +13,115 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./cei-list.component.scss'],
})
export class CeiListComponent implements OnInit {
Sdate: any;
emp_no: any;
balance:any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
IsReachEnd = false;
userName: any;
isDelete = false;
getResCEITransactionList: any = [];
eitAddedList: any = [];
getPassMnuEntryObj: any;
selMenu: MenuResponse = new MenuResponse();
CEITransactionsListObj: EITTransactionsRequest = new EITTransactionsRequest();
selEmp: string;
respID: number;
transactionNo = 0;
menuType = '';
public functionName = '';
private pAction = 0;
public headerTitle = '';
data: any;
accrualNetInfants: any;
accrualUNetChild: any;
accrualNetAdult: any;
constructor() { }
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = 'full';
accrualBalancesList: any;
common: any;
direction: string;
ngOnInit() {}
constructor(
private cs: CommonService,
private EITService: EitService,
public ts: TranslatorService,
public authService:AuthenticationService,) {
this.direction = TranslatorService.getCurrentLanguageName();
this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false);
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.getPassMnuEntryObj = this.selMenu.GetMenuEntriesList;
this.menuType = this.selMenu.List_Menu.MENU_TYPE;
this.transactionNo = 0;
this.functionName = this.getPassMnuEntryObj.FUNCTION_NAME;
this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT;
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 100;
}
ngOnInit() {
this.getCEITransactions();
}
public getCEITransactions() {
this.IsReachEnd = false;
this.CEITransactionsListObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.CEITransactionsListObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.CEITransactionsListObj.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
this.CEITransactionsListObj.P_SELECTED_RESP_ID = this.respID;
this.CEITransactionsListObj.P_MENU_TYPE = this.selMenu.List_Menu.MENU_TYPE;
this.CEITransactionsListObj.P_FUNCTION_NAME = this.getPassMnuEntryObj.FUNCTION_NAME;
this.EITService.getCEITransactionsList(this.CEITransactionsListObj).
subscribe((result: any) => {
this.handleCEITransactionsResult(result);
});
}
public handleCEITransactionsResult(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.GetEITTransactionList)) {
this.getResCEITransactionList = result.GetEITTransactionList;
this.P_PAGE_NUM++;
this.CEITransactionsListObj.P_PAGE_NUM = this.P_PAGE_NUM;
const lastItemIndex = this.getResCEITransactionList.length - 1;
if (result.GetEITTransactionList[lastItemIndex] && result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0]) {
const lastitem = result.GetEITTransactionList[lastItemIndex].Collection_Transaction[0];
// tslint:disable-next-line: triple-equals
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
}
}
}
addEITRrq(i?) {
this.pAction = EIT_ACTION.ADD;
this.cs.sharedService.setSharedData(this.pAction, EITTransactionsRequest.SUBMIT_EIT_ACTION);
this.openEitNew(i);
}
openEitNew(index) {
let item: any = [];
if (this.pAction == EIT_ACTION.UPDATE) {
item = this.getResCEITransactionList[index].Collection_Transaction;
}
this.transactionNo++;
// tslint:disable-next-line: max-line-length
this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: item, transNo: this.transactionNo }, 'AddEITData');
this.cs.openAddEitPage();
}
}

@ -16,6 +16,7 @@ export class EitService {
/* EIT Services URLs */
public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES';
public static getEITTransctions = 'Services/ERP.svc/REST/GET_EIT_TRANSACTIONS';
public static getCEITransctions = 'Services/ERP.svc/REST/GET_CEI_TRANSACTIONS';
public static getEITDFFStrutre = 'Services/ERP.svc/REST/GET_EIT_DFF_STRUCTURE';
public static getSetValue = 'Services/ERP.svc/REST/GET_VALUE_SET_VALUES';
public static getDefaultValue = 'Services/ERP.svc/REST/GET_DEFAULT_VALUE';
@ -50,6 +51,13 @@ export class EitService {
return this.con.post(EitService.getEITTransctions, request, onError, errorLabel);
}
// tslint:disable-next-line: no-shadowed-variable
public getCEITransactionsList(EITTransactionsRequest: EITTransactionsRequest, onError?: any, errorLabel?: string): Observable<any> {
const request = EITTransactionsRequest;
this.authService.authenticateRequest(request);
return this.con.post(EitService.getCEITransctions, request, onError, errorLabel);
}
public submitEit(eit: any, onError?: any, errorLabel?: string): Observable<AddEitResponse> {
const request = eit;
request.EITTransactionTBLModel = eit.EITTransactionTBL;

Loading…
Cancel
Save