Merge branch 'MOHEMM-Q3-DEV-LATEST' of https://gitlab.com/haroon6138/mohemmionic5 into sultan-q3

# Conflicts:
#	Mohem/src/app/hmg-common/services/connector/connector.service.ts
MOE_DEV_NEW_TEMPORARY_DESIGN
Sultan Khan 4 years ago
commit 06edf6da79

@ -1,3 +1,26 @@
<p>
cei-homepage works!
</p>
<ion-content>
<div class="head-title">
<app-generic-header showImage="false" showBack="true" [headerText]="'eit,cei' | translate">
</app-generic-header>
</div>
<div padding>
<ion-list>
<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"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv" (click)="gotoTransactionsPage()">
<ion-button class="addEitOkButton" color="customnavy" ion-button>
{{'vacation-rule, next-label' | translate}}</ion-button>
</div>
</ion-footer>

@ -1,4 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { EitService } from '../services/eit.service';
@Component({
selector: 'app-cei-homepage',
@ -7,8 +10,37 @@ import { Component, OnInit } from '@angular/core';
})
export class CeiHomepageComponent implements OnInit {
constructor() { }
public familyMemberData: any;
public selectedServiceType: any;
ngOnInit() {}
constructor(
private eitService: EitService,
public ts: TranslatorService,
public cs: CommonService
) {}
ngOnInit() {
this.getContactInfo();
}
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();
}
}

@ -0,0 +1,42 @@
<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;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CeiListComponent } from './cei-list.component';
describe('CeiListComponent', () => {
let component: CeiListComponent;
let fixture: ComponentFixture<CeiListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CeiListComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CeiListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,127 @@
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',
templateUrl: './cei-list.component.html',
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;
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }};
gaugeType = 'full';
accrualBalancesList: any;
common: any;
direction: string;
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();
}
}

@ -14,7 +14,8 @@ import { DatePicker } from '@ionic-native/date-picker/ngx';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import { EitUpdateListComponent } from './eit-update-list/eit-update-list.component';
import { SubmitEitModalComponent } from './submit-eit-modal/submit-eit-modal.component';
import { CeiHomepageComponent } from './cei-homepage/cei-homepage.component';
import { CeiListComponent } from './cei-list/cei-list.component';
const routes: Routes = [
{
@ -48,6 +49,14 @@ const routes: Routes = [
{
path: 'eit-submit-modal',
component: SubmitEitModalComponent
},
{
path: 'cei-homepage',
component: CeiHomepageComponent
},
{
path: 'cei-list',
component: CeiListComponent
}
]
}
@ -69,7 +78,9 @@ const routes: Routes = [
ConfirmAddEitComponent,
AddAttachComponent,
EitUpdateListComponent,
SubmitEitModalComponent
SubmitEitModalComponent,
CeiHomepageComponent,
CeiListComponent
],
entryComponents: [
WorkListAttachViewComponent

@ -76,6 +76,9 @@ export class HomeComponent implements OnInit {
if (menuEntry.REQUEST_TYPE === 'TIME_CARD') {
this.cs.openTimeCardPage();
}
if (menuEntry.REQUEST_TYPE === 'CEI') {
this.cs.openCEIPage();
}
}
}

@ -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';
@ -29,6 +30,7 @@ export class EitService {
public static addAttachment = 'Services/ERP.svc/REST/ADD_ATTACHMENT';
public static cancelHRTransaction = 'Services/ERP.svc/REST/CANCEL_HR_TRANSACTION';
public static getAttach = 'Services/ERP.svc/REST/GET_ATTACHMENTS';
public static getContactInfo = 'Services/ERP.svc/REST/GET_EMPLOYEE_CONTACTS';
constructor(public authService: AuthenticationService, public con: ConnectorService) { }
@ -49,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;
@ -131,4 +140,9 @@ export class EitService {
return this.con.post(EitService.resubmitEit, request, onError, errorLabel);
}
public getContactInfo(request: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME;
return this.con.post(EitService.getContactInfo, request, onError, errorLabel);
}
}

@ -819,6 +819,11 @@ export class CommonService {
return '/Date(' + date.getTime() + ')/';
}
public convertDateToJsonDateUpdated(date: Date): string {
const newDate = new Date(date);
return '/Date(' + newDate.getTime() + ')/';
}
/*
date iso format
and time is 24 format hh:mm:ss
@ -888,6 +893,11 @@ export class CommonService {
return this.getDateTimeISO(date) + ' ' + this.getTimeISO(date);
}
public getDateTimeISOFromStringUpdated(dateStr: string): string {
const date = this.evaluteDateAsObject(dateStr);
return this.getDateTimeISO(date);
}
public getCurrentTimeISO(): string {
return this.getTimeISO(new Date());
}
@ -1172,6 +1182,9 @@ export class CommonService {
public openMyTeamDetailPage() {
this.nav.navigateForward(['/my-team/details']);
}
public openSubordinateLeavePage() {
this.nav.navigateForward(['/my-team/subordinate-leave']);
}
public openMyRequestPage() {
this.nav.navigateForward(['/mowadhafi/my-request']);
}
@ -1312,6 +1325,12 @@ export class CommonService {
public eitUpdate() {
this.nav.navigateForward(['/eit/eit-update-list']);
}
public openCEIPage() {
this.nav.navigateForward(['/eit/cei-homepage']);
}
public openCEIListPage() {
this.nav.navigateForward(['/eit/cei-list']);
}
public openAnnouncement() {
this.nav.navigateForward(['/backend-integrations/announcement']);
}

@ -28,7 +28,7 @@ export class ConnectorService {
public static timeOut = 120 * 1000;
public static host = 'https://uat.hmgwebservices.com/';
//public static host = 'https://hmgwebservices.com/';
// public static host = 'https://hmgwebservices.com/';
constructor(public httpClient: HttpClient,
public cs: CommonService,

@ -36,6 +36,16 @@
</div>
</ion-col>
<ion-col *ngIf="performanceEvaluation" [size]="2" style="padding: 0;" (click)="openPerormance()">
<div class="profile-image-container">
<ion-icon src='../assets/icon/bar-chart.svg' style="width: 30px;height: 25px;margin-top: 5px; color: white;"></ion-icon>
</div>
</ion-col>
<ion-col *ngIf="subordinateLeave" [size]="2" style="padding: 0;" (click)="openSubordinateLeavePage()">
<div class="profile-image-container">
<ion-icon name='people' style="width: 30px;height: 30px;margin-top: 5px; color: white;"></ion-icon>
</div>
</ion-col>
</ion-row>
</ion-toolbar>
</ion-header>

@ -2,6 +2,10 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { WorklistSettingComponent } from 'src/app/notification/worklist-setting/worklist-setting.component';
import { CommonService } from '../../services/common/common.service';
import { DashboredService } from '../../services/dashbored/dashbored.service';
import { PerformanceAppraisalResponse } from '../../services/dashbored/performance-appraisal.response';
import { SharedDataService } from '../../services/shared-data-service/shared-data.service';
import { TranslatorService } from '../../services/translator/translator.service';
@Component({
selector: 'app-generic-header',
@ -19,11 +23,19 @@ export class GenericHeaderComponent implements OnInit {
@Input() headerText = '';
@Input() backLink: string;
@Input() worklistSetting = false;
@Input() performanceEvaluation = false;
@Input() subordinateLeave = false;
@Output() trigger = new EventEmitter();
public appraisalArr: any = [];
public performanceData: any = [];
public close = 'assets/imgs/cancel.png';
constructor(
public common: CommonService,
public DS: DashboredService,
public sharedData: SharedDataService,
public ts: TranslatorService,
public modalController: ModalController) { }
ngOnInit() {
@ -49,4 +61,38 @@ export class GenericHeaderComponent implements OnInit {
this.common.openWorklistSettingsPage();
}
public openPerormance() {
this.showPerformanceAppraisal();
}
public showPerformanceAppraisal() {
this.DS.getPerformanceAppraisal(() => {
this.showPerformanceAppraisal();
}).subscribe((result: PerformanceAppraisalResponse) => {
this.handlePerformanceAppraisalResult(result);
});
}
private handlePerformanceAppraisalResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetPerformanceAppraisalList)) {
this.appraisalArr = result.GetPerformanceAppraisalList;
this.performanceData = [];
for (let i = 0; i < this.appraisalArr.length; i++) {
this.performanceData.push({ name: this.appraisalArr[i].APPRAISAL_YEAR, value: parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed() });
}
console.log('PerformanceAppraisalResponse');
this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA);
this.common.openPerformanceevaluation();
} else {
let msg: string = this.ts.trPK("userProfile", "no-appraisal");
this.common.presentAlert(msg);
}
}
}
public openSubordinateLeavePage() {
this.common.openSubordinateLeavePage();
}
}

@ -1,5 +1,6 @@
<app-generic-header
showBack="true"
subordinateLeave='true'
backLink="/home"
[headerText]="'myTeam, myTeam-header' | translate">
</app-generic-header>

@ -10,6 +10,7 @@ import { MyTeamPage } from './my-team.page';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { from } from 'rxjs';
import { WorklistService } from '../notification/service/worklist.service';
import { SubordinateLeaveComponent } from './subordinate-leave/subordinate-leave.component';
const routes: Routes = [
@ -28,7 +29,10 @@ const routes: Routes = [
path: 'details-2',
component: DetailsComponent
},
{
path: 'subordinate-leave',
component: SubordinateLeaveComponent
}
]
}
@ -44,7 +48,11 @@ const routes: Routes = [
],
providers: [WorklistService],
declarations: [MyTeamPage, HomeComponent, DetailsComponent,
declarations: [
MyTeamPage,
HomeComponent,
DetailsComponent,
SubordinateLeaveComponent
]
})
export class MyTeamPageModule { }

@ -7,6 +7,7 @@ import { AuthenticationService } from "src/app/hmg-common/services/authenticatio
export class MyTeamService {
public static EMPLOYEE_SHARED_DATA = 'employee';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
public static getSubordintesLeaves = 'Services/ERP.svc/REST/GET_SUBORDINATES_LEAVES_TOTAL_VACATIONS';
// public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
@ -20,6 +21,13 @@ export class MyTeamService {
return this.con.post(MyTeamService.getMyTeam, request, onError, errorLabel);
}
public getEmployeeSubordinatesLeave(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
return this.con.post(MyTeamService.getSubordintesLeaves, request, onError, errorLabel);
}
// public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){
// const request = absence;
// this.authService.authenticateRequest(request);

@ -0,0 +1,89 @@
<app-generic-header
showBack="true"
[headerText]="'myTeam, subordinate-leave' | translate">
</app-generic-header>
<ion-content padding style="--background: #f5f5f5">
<div class="team-member-container">
<ion-label>
<ion-item lines='none'>
<p style="font-size: 18px; font-weight: bold;">{{ts.trPK('myTeam','select-duration')}}</p>
</ion-item>
</ion-label>
<ion-grid>
<ion-row>
<ion-col size='6'>
<ion-label position='floating' style="margin-left: 15px;" class="colBold">{{ts.trPK('general','from')}} </ion-label>
<ion-item class='dynamicField' lines='none'>
<ion-datetime style="padding: 0px" [(ngModel)]="startDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required
cancelText="{{ts.trPK('general','cancel')}}" doneText="{{ts.trPK('general','done')}}"></ion-datetime>
&nbsp;
<ion-icon style="width: 20px;" name="calendar"></ion-icon>
</ion-item>
</ion-col>
<ion-col size='6'>
<ion-label position='floating' style="margin-left: 15px;" class="colBold">{{ts.trPK('general','to')}} </ion-label>
<ion-item class='dynamicField' lines='none'>
<ion-datetime style="padding: 0px" [(ngModel)]="endDate" min="1900" max="2100" displayFormat="MMM/DD/YYYY" placeholder="MM/DD/YYYY" required
cancelText="{{ts.trPK('general','cancel')}}"
doneText="{{ts.trPK('general','done')}}"></ion-datetime>
&nbsp;
<ion-icon style="width: 20px;" name="calendar"></ion-icon>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</div>
<div *ngIf='noData'></div>
<div *ngIf='!noData'>
<div *ngIf='list.length === 0'>
<div class="team-member-container" style="text-align: center;">
<h2 style="margin-top: 5px !important; font-size: 20px;" class="name">
{{ts.trPK('general','empty')}}
</h2>
</div>
</div>
<div *ngIf='list.length > 0'>
<div class="team-member-container" *ngFor='let user of list'>
<ion-row>
<ion-col [size]="3">
<div class="user-image-container">
<div class="user-image">
<img *ngIf='user.image' [src]="user.image"/>
<img *ngIf='!user.image' src="../assets/imgs/profile.png"/>
</div>
</div>
</ion-col>
<ion-col [size]="9">
<div>
<span>
<h2 style="margin-top: 0px !important; font-size: 20px;" class="name">{{user.EMPLOYEE_NAME}}</h2>
<span class="title"><ion-label>{{ts.trPK('general','from')}}: </ion-label><b style="font-size: 12px;">{{getDate(user.DATE_START)}} &nbsp; &nbsp;</b></span>
<span class="title"><ion-label>{{ts.trPK('general','to')}}: </ion-label><b style="font-size: 12px;">{{getDate(user.DATE_END)}}</b></span>
<br>
<span class="title"><ion-label>{{ts.trPK('myTeam','no-of-days')}}: </ion-label><b style="font-size: 12px;">{{diffDays(user)}}</b></span>
</span>
</div>
</ion-col>
</ion-row>
</div>
</div>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="confirmEitOkButton" [disabled]='checkDate()' (click)="subordinateLeaveList()">{{ts.trPK('general','submit')}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,199 @@
.confirmEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
--background: #269DB8;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}
.team-member-container{
// background: white;
// border-radius: 100px 20px 20px 100px;
// margin-top: 15px;
// font-family: WorkSans-Regular;
// border: 1px solid #ccc;
// border-radius: 15px;
// padding-bottom: 8px;
background: white;
/* margin-top: 2px; */
font-family: WorkSans-Regular;
border: 1px solid #ccc;
border-radius: 15px;
padding-bottom: 8px;
padding-top: 9px;
margin-bottom: 7px;
}
// .user-image-container{
// position: relative;
// width: 70px;
// height: 70px;
// display: block;
// margin: 0 auto;
// &:before{
// position: absolute;
// content: "";
// width: 20px;
// height: 20px;
// border-radius: 20px;
// border: 1px solid white;
// top: 0;
// right: 0;
// background-color: red;
// z-index: 9;
// }
// &.present:before{
// background-color: green !important;
// }
// }
.user-image{
// overflow: hidden;
// position: relative;
// display: block;
// width: 100%;
// height: 100%;
// border-radius: 80px;
// border: 1px solid #ccc;
// margin: 0px auto 6px;
img {
// width: 100%;
// max-height: 100%;
width: 74%;
max-height: 74%;
margin-top: 7px;
margin-left: 6px;
}
}
.employee-name{
display: inline-block;
width: 80%;
.name{
// font-size: 16px;
// color: black;
// // margin: 0;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// margin-left: -10px;
// margin-top: -5px;
// font-family: 'WorkSans-Bold';
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: left;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
}
.title{
// font-size: 13px;
// color: #888;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// display: block;
// margin-left: -10px;
// margin-top: -6px;
// color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
}
}
.employee-name-ar{
display: inline-block;
width: 80%;
.name{
// font-size: 16px;
// color: black;
// // margin: 0;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// margin-left: -10px;
// margin-top: -5px;
// font-family: 'WorkSans-Bold';
font-size: 16px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-left: -10px;
margin-top: -5px;
text-align: right;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 25px;
letter-spacing: -0.64px;
color: #2B353E;
opacity: 1;
}
.title{
// font-size: 13px;
// color: #888;
// width: 100%;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
// display: block;
// margin-left: -10px;
// margin-top: -6px;
// color: black;
font-family: var(--fontFamilyPoppins-SemiBold, inherit);
line-height: 12px;
letter-spacing: -0.56px;
color: #575757;
opacity: 1;
font-size: 14px;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: block;
margin-left: -10px;
margin-top: -10px;
}
}
.image-container{
width: 20%;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5px;
}
.swipe-information{
color: #888;
font-size: 12px;
border-top: 1px solid #ccc;
padding-top: 6px;
margin-top: 6px;
.check-in {
font-size: 12px;
margin-right: 15px;
}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SubordinateLeaveComponent } from './subordinate-leave.component';
describe('SubordinateLeaveComponent', () => {
let component: SubordinateLeaveComponent;
let fixture: ComponentFixture<SubordinateLeaveComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SubordinateLeaveComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SubordinateLeaveComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,57 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { MyTeamService } from '../service/my-team.service';
import * as moment from 'moment';
@Component({
selector: 'app-subordinate-leave',
templateUrl: './subordinate-leave.component.html',
styleUrls: ['./subordinate-leave.component.scss'],
})
export class SubordinateLeaveComponent implements OnInit {
public startDate: any;
public endDate: any;
public list = [];
public noData = true;
constructor(
public ts: TranslatorService,
public common: CommonService,
public myTeamService: MyTeamService,
) { }
ngOnInit() {}
subordinateLeaveList() {
const Sdata = this.common.convertDateToJsonDateUpdated(this.startDate);
const Edata = this.common.convertDateToJsonDateUpdated(this.endDate);
this.myTeamService.getEmployeeSubordinatesLeave({
P_DATE_FROM: Sdata,
P_DATE_TO: Edata
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.common.validResponse(result)) {
this.list = result.GetSubordinatesLeavesTotalVacationsList;
this.noData = false;
}
});
}
getDate(date) {
const newDate = this.common.localizeDate(new Date(this.common.getDateTimeISOFromStringUpdated(date).split(' ')[0]));
return newDate;
}
diffDays(date) {
const date1 = new Date(this.common.getDateTimeISOFromStringUpdated(date.DATE_START).split(' ')[0]);
const date2 = new Date(this.common.getDateTimeISOFromStringUpdated(date.DATE_END).split(' ')[0]);
const diff = Math.abs(date1.getTime() - date2.getTime());
const diffDays = Math.ceil(diff / (1000 * 3600 * 24));
return diffDays;
}
checkDate() {
if (this.startDate && this.endDate) {
return false;
} else { return true; }
}
}

@ -12,11 +12,9 @@
<span>{{ts.trPK('work-list','open-analysis')}}</span>
</div>
<div class="result-text-container" [ngStyle]="showChart === false || receivedITGCount === false ? {'visibility': 'hidden'} : {}">
<!-- <span *ngIf="selectedFilter === 'ALL'">{{newWorkListResponse.length + ITGCount}} {{ts.trPK('work-list','of')}} </span>
<span *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse.length}} {{ts.trPK('work-list','of')}} </span> -->
<h2 *ngIf="!showSearchButton">{{totalRequestCount}}</h2>
<h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2>
<h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse[0].NO_OF_ROWS}}</h2>
<h2>{{totalRequestCount}}</h2>
<!-- <h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && itemType === ''">{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}</h2> -->
<!-- <h2 *ngIf="showSearchButton && newWorkListResponse.length > 0 && selectedFilter !== 'ALL' && itemType !== ''">{{newWorkListResponse[0].NO_OF_ROWS}}</h2> -->
<span>{{ts.trPK('work-list','total')}} <br> {{ts.trPK('work-list','open-reqest')}}</span>
</div>
<div *ngIf="!showChart || !receivedITGCount" class="spinner-custom-class">
@ -45,7 +43,7 @@
<span style="margin-left: 5px;">{{ts.trPK('work-list','clear-search')}}</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter !== 'ITG'">
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter !== 'ITG' && !showSearchButton">
<ion-icon name="search" ></ion-icon>
<span>{{ts.trPK('work-list','advanced-search')}}</span>
</ion-col>
@ -74,7 +72,6 @@
</div>
</div>
<div [ngClass]="ITGItem.length > 0 ? 'work-list-container' : ''" *ngIf="selectedFilter == 'ITG'" >
<!-- <div *ngFor='let segmentInfo of ITGItem[0]; let i= index' (click)='openITG(segmentInfo)'> -->
<div *ngFor='let segmentInfo of ITGItem[0]; let i= index' >
<div *ngIf="activeSegment !== 'All'" (click)='openITG(segmentInfo)'>
@ -103,7 +100,6 @@
</div>
</div>
</div>
<!-- </div> -->
<ion-infinite-scroll (ionInfinite)="doInfinite($event)" *ngIf="itemType !== ''">
<ion-infinite-scroll-content></ion-infinite-scroll-content>

@ -186,7 +186,7 @@ export class HomeComponent implements OnInit {
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 5;
this.WorkListObj.P_PAGE_LIMIT = 25;
}
ngOnInit() {
@ -212,7 +212,6 @@ export class HomeComponent implements OnInit {
this.selectedFilter = 'HR';
this.filters[0].active = true;
this.isPostNoLoad = true;
// this.disableFilters();
this.resetData();
this.direction = TranslatorService.getCurrentLanguageName();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
@ -303,11 +302,10 @@ export class HomeComponent implements OnInit {
}
activeFilter(index: number) {
if (index !== 4) {
this.common.startLoading();
}
console.log(this.filters);
if (this.currentActiveIndex !== index) {
if (index !== this.currentActiveIndex) {
if (index !== 4) {
this.common.startLoading();
}
this.previousActiveIndex = this.currentActiveIndex;
this.currentActiveIndex = index;
this.filters[this.previousActiveIndex].active = false;
@ -315,7 +313,6 @@ export class HomeComponent implements OnInit {
this.selectedFilter = this.filters[this.currentActiveIndex].key;
const filterValue = this.filters[this.currentActiveIndex].value;
if (this.selectedFilter !== 'ITG') {
// this.getFilteredData(this.selectedFilter);
this.initiateNewWorklistData(this.selectedFilter, filterValue);
}
}
@ -325,9 +322,12 @@ export class HomeComponent implements OnInit {
this.common.openProfile('sideMenu');
}
disableFilters() {
configureFilters() {
for (const filter of this.filters) {
if (filter.key === this.itemType) {
const index = this.filters.map(function(e) { return e.key; }).indexOf(this.itemType);
this.currentActiveIndex = index;
this.previousActiveIndex = 0;
filter.disable = false;
filter.active = true;
this.selectedFilter = filter.name;
@ -339,12 +339,26 @@ export class HomeComponent implements OnInit {
filter.active = false;
}
}
if (this.itemType === '') {
this.filters[0].active = true;
}
}
enableFilters() {
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
for (const filter of this.filters) {
filter.disable = false;
if (filter.key === this.itemType) {
filter.active = true;
} else {
filter.active = false;
}
}
}
async openSearchModal() {
const modal = await this.modalController.create({
component: WorklistAdvancedSearchComponent,
@ -369,19 +383,10 @@ export class HomeComponent implements OnInit {
this.newWorkListResponse = [];
this.showFormattedData = [];
this.allFormattedData = [];
// this.selectedFilter = 'ALL';
if (this.itemType !== '') {
this.disableFilters();
this.configureFilters();
}
this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true;
// if (this.itemType !== '') {
// this.disableFilters();
// }
this.isPostNoLoad = false;
this.getAllPushNotificationFun();
}
@ -494,7 +499,6 @@ export class HomeComponent implements OnInit {
this.showFormattedData = this.sortArray(categorizedWorkListResponse);
this.allFormattedData = this.showFormattedData;
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
// this.assignDataToFilters();
}
} else {
this.newWorkListResponse = [];
@ -503,7 +507,6 @@ export class HomeComponent implements OnInit {
}
this.data.datasets[0].data[4] = this.ITGCount;
this.showChart = true;
// this.common.stopLoading();
this.isLoading = false;
}
}
@ -562,11 +565,11 @@ export class HomeComponent implements OnInit {
clearSearch() {
this.common.startLoading();
this.isLoading = true;
this.itemType = '';
this.selectedFilter = 'ALL';
this.isLoading = false;
this.itemType = 'HRSSA';
this.selectedFilter = 'HR';
this.isPostNoLoad = true;
// this.disableFilters();
this.enableFilters();
this.resetData();
this.getAllPushNotificationFun();
}

@ -360,7 +360,7 @@ export class WorkListReplacementRollComponent implements OnInit {
// }
// }, 5000);
this.cs.openNotificationPage();
// this.cs.openNotificationPage();
// this.messageSuccess = true;
// setTimeout(() => {

@ -1171,66 +1171,43 @@ export class WorklistMainPoComponent implements OnInit {
}
async openRepRolModal() {
this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData');
const modal = await this.modalCtrl.create({
component: WorkListReplacementRollComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data.data == "cancel" || data.data.data == undefined) {
if (data.data.data === 'cancel' || data.data.data === undefined) {
return;
} else if (data.data.data == "Success") {
// this.openNotificationsDashboard();
// this.messageSuccess = true;
} else if (data.data.data === 'Success') {
this.common.greenToastPK('worklist', 'save-successfully');
setTimeout(() => {
// this.messageSuccess = false;
this.common.redToastPK('worklist', 'save-error');
this.nextNotfification();
}, 2000);
// this.nextNotfification();
} else {
this.common.redToastPK('worklist', 'save-error');
}
});
return await modal.present();
}
async openRFCModal() {
const modal = await this.modalCtrl.create({
component: WorkListRfcComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
} else {}
});
return await modal.present();

@ -1,4 +1,4 @@
<app-generic-header showBack="true" [headerText]="'userProfile,title' | translate">
<app-generic-header performanceEvaluation='true' showBack="true" [headerText]="'userProfile,title' | translate">
</app-generic-header>
<ion-content class="colorBG" *ngIf="personalInfo">

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>Bar Chart</title><path d="M32 32v432a16 16 0 0016 16h432" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><rect x="96" y="224" width="80" height="192" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><rect x="240" y="176" width="80" height="240" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><rect x="383.64" y="112" width="80" height="304" rx="20" ry="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 737 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>Bar Chart</title><path d="M480 496H48a32 32 0 01-32-32V32a16 16 0 0132 0v432h432a16 16 0 010 32z"/><path d="M156 432h-40a36 36 0 01-36-36V244a36 36 0 0136-36h40a36 36 0 0136 36v152a36 36 0 01-36 36zM300 432h-40a36 36 0 01-36-36V196a36 36 0 0136-36h40a36 36 0 0136 36v200a36 36 0 01-36 36zM443.64 432h-40a36 36 0 01-36-36V132a36 36 0 0136-36h40a36 36 0 0136 36v264a36 36 0 01-36 36z"/></svg>

After

Width:  |  Height:  |  Size: 475 B

@ -1966,6 +1966,18 @@
"team-stats": {
"en": "Team Statistics",
"ar": "إحصائيات الفريق"
},
"subordinate-leave":{
"en":"Subordinate Leave",
"ar":"إجازة التابعيين"
},
"select-duration":{
"en":"Select Duration",
"ar":"اختر الفترة"
},
"no-of-days":{
"en":"No. of days",
"ar":"عدد الايام"
}
},
"searchForReplacment": {
@ -2070,6 +2082,10 @@
"submit": {
"en": "Are you sure you want to submit?",
"ar": "هل انت متاكد من ارسال الطلب؟"
},
"cei":{
"en":"child Education",
"ar":"تعليم الطفل"
}
},
"submitAbsence": {

Loading…
Cancel
Save