finish replacement modal
parent
6385c93e56
commit
d1d3a307b7
@ -0,0 +1,132 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
|
||||
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content >
|
||||
|
||||
<ion-list syle="margin-bottom:2px !important" [hidden]="isAnswer==true">
|
||||
<ion-item>
|
||||
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
|
||||
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
|
||||
[(ngModel)]="searchBy">
|
||||
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
|
||||
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
|
||||
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-button class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
|
||||
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
<ion-input class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
|
||||
|
||||
<!-- <button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
|
||||
<ion-icon name="search"></ion-icon>
|
||||
</button> -->
|
||||
|
||||
|
||||
</ion-item>
|
||||
|
||||
<!-- <ion-item>
|
||||
<ion-label>
|
||||
{{selEmpName}}
|
||||
</ion-label>
|
||||
</ion-item> -->
|
||||
<!-- <div class="centerDiv">
|
||||
<button ion-button (click)="closePage()">{{'general.save' | translate}}</button>
|
||||
</div> -->
|
||||
</ion-list>
|
||||
|
||||
<!-- <div class="noteInput">
|
||||
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
|
||||
{{pQuestion}} ?</ion-label>
|
||||
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
|
||||
</ion-label>
|
||||
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
|
||||
</ion-label>
|
||||
<ion-item>
|
||||
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
|
||||
</ion-item>
|
||||
</div> -->
|
||||
|
||||
<ion-item [hidden]="isAnswer==true">
|
||||
<!-- <ion-list *ngIf="ReplacementList"> -->
|
||||
<!-- <ion-list *ngIf="ReplacementList">
|
||||
-->
|
||||
<!-- <ion-radio-group mode="md" [(ngModel)]="selEmp"> -->
|
||||
<!-- <ion-grid fixed>
|
||||
<ion-row justify-content-end>
|
||||
<ion-col [ngClass]="{'activated': (active == i),'deactivated': (active != i)}" (click)="select(employee,i)"
|
||||
*ngFor="let employee of demoeAttach;let i=index;"
|
||||
size-xs="6" size-sm="6" size-md="6" size-lg="6" align-self-stretch>
|
||||
<div class="profileImageDiv"> <img class="profileImage" src="../assets/imgs/profile.png"></div>
|
||||
<div *ngIf="active == i" class="selIEmpDiv"> <img class="selIEmpImage" src="../assets/imgs/green.png"></div>
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<div class="repContentDiv">
|
||||
<ion-label style="color:var(--dark) !important">
|
||||
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
|
||||
<br>{{employee.USER_NAME}}<br>
|
||||
{{employee.EMAIL_ADDRESS}}</ion-label>
|
||||
</div>
|
||||
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid> -->
|
||||
|
||||
|
||||
<!-- </ion-radio-group> -->
|
||||
<!--
|
||||
</ion-list> -->
|
||||
|
||||
<div class="square-container">
|
||||
<div (click)="select(employee,i)" *ngFor="let employee of ReplacementList;let i=index;" class="square">
|
||||
<div class="profileImageDiv">
|
||||
<!-- <img class="profileImage" src="../assets/imgs/profile.png"> -->
|
||||
|
||||
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImgeRep" [src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
|
||||
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImgeRep" src="../assets/imgs/profile.png">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div *ngIf="active == i" class="selIEmpDiv">
|
||||
<img class="selIEmpImage" src="../assets/imgs/green.png">
|
||||
</div>
|
||||
|
||||
<div [ngClass]="{'activated': (active == i),'deactivated': (active != i)}"
|
||||
class="content">
|
||||
<ion-label>
|
||||
|
||||
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
|
||||
<br>{{employee.USER_NAME}}<br>
|
||||
{{employee.EMAIL_ADDRESS}}
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ion-item>
|
||||
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
|
||||
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
|
||||
{{'general, submit' | translate}}</ion-button>
|
||||
|
||||
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
|
||||
{{'general, cancel' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,121 @@
|
||||
button.item-button.button.button-md.button-clear.button-clear-md {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.footer-button {
|
||||
border-radius: 3px;
|
||||
padding: 0 1.1em;
|
||||
min-height: 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
// ion-item {
|
||||
// margin-top: 5%;
|
||||
// margin-right: 7%;
|
||||
// width: 100%;
|
||||
// }
|
||||
.ionItem{
|
||||
border: #e4e4e4 solid;
|
||||
/* margin: 6px; */
|
||||
/* padding: 11px; */
|
||||
height: 85px;
|
||||
width: 164px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.profileImageDiv{
|
||||
text-align: center;
|
||||
margin-bottom: -27px;
|
||||
z-index: 3;
|
||||
position: relative;
|
||||
top: 0;
|
||||
|
||||
}
|
||||
.profileImage{
|
||||
width:60px !important;
|
||||
// margin-left: -25px;
|
||||
// margin-right: 22px;
|
||||
}
|
||||
|
||||
.activated{
|
||||
border: #209a83 0.02cm solid ;
|
||||
}
|
||||
.deactivated{ border: #e4e4e4 0.02cm solid;
|
||||
}
|
||||
.repContentDiv{
|
||||
text-align: center;
|
||||
width: 85%;
|
||||
font-size: 14px;
|
||||
border: #e4e4e4 solid;
|
||||
border-radius: 5px;
|
||||
padding: 20px 8px 8px 8px;
|
||||
margin-top: -9px;
|
||||
margin-right: -35px
|
||||
|
||||
}
|
||||
.selIEmpDiv{
|
||||
text-align: right;
|
||||
margin-bottom: -26px;
|
||||
margin-right: 0px;
|
||||
z-index: 3;
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.selIEmpImage{
|
||||
width:22px !important
|
||||
|
||||
}
|
||||
|
||||
.noteInput{
|
||||
border: solid var(--gray) 1px;
|
||||
border-radius: 15px;
|
||||
margin: 8px 17px 0px 17px;
|
||||
padding: 10px 2px 10px 2px;
|
||||
}
|
||||
.filterInput{
|
||||
border: solid var(--gray) 1px;
|
||||
border-radius: 21px;
|
||||
padding-left: 10px !important;
|
||||
}
|
||||
.filterBtn{
|
||||
background: var(--newgreen);
|
||||
--background: var (--newgreen);
|
||||
border-radius: 50%;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
*{
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.square-container{
|
||||
// padding: 8px;
|
||||
width:100%;
|
||||
}
|
||||
.square{
|
||||
// width:calc(100% / 2);
|
||||
width:50%;
|
||||
float:left;
|
||||
position: relative;
|
||||
// padding-bottom: calc(100% / 2);
|
||||
}
|
||||
|
||||
.square .content{
|
||||
width: calc(100% - 16px) !important;
|
||||
height: calc(100% - 16px) !important;
|
||||
margin: 8px;
|
||||
padding: 16px;
|
||||
// position: absolute;
|
||||
color: white;
|
||||
border-radius: 9px;
|
||||
text-align: center;
|
||||
// background-color: #0095ff;
|
||||
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AbsenceReplacementListComponent } from './absence-replacement-list.component';
|
||||
|
||||
describe('AbsenceReplacementListComponent', () => {
|
||||
let component: AbsenceReplacementListComponent;
|
||||
let fixture: ComponentFixture<AbsenceReplacementListComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AbsenceReplacementListComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AbsenceReplacementListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,342 @@
|
||||
import { ModalController } from '@ionic/angular';
|
||||
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 { WorKListReplacmentEmployeeResponse } from 'src/app/notification/models/ReplacmentEmployeeRes';
|
||||
import { WorkListReplacmentEmployeeRequest } from 'src/app/notification/models/ReplacmentEmployeeReq';
|
||||
import { WorkListActionRequest } from 'src/app/notification/models/NotificationActionReq';
|
||||
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
|
||||
import { ViewReplacementModalComponent } from 'src/app/notification/view-replacement-modal/view-replacement-modal.component';
|
||||
import { WorklistService } from 'src/app/notification/service/worklist.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-absence-replacement-list',
|
||||
templateUrl: './absence-replacement-list.component.html',
|
||||
styleUrls: ['./absence-replacement-list.component.scss'],
|
||||
})
|
||||
export class AbsenceReplacementListComponent implements OnInit {
|
||||
|
||||
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
|
||||
P_SEARCH_EMAIL_ADDRESS: string = "";
|
||||
getPassActionMode: any;
|
||||
selectedValue: any;
|
||||
inputSearch: any;
|
||||
selEmpName: any;
|
||||
selectedUserInf: any;
|
||||
userNote: any;
|
||||
getPassNotificationDetails: any;
|
||||
isAnswer: boolean = false;
|
||||
pQuestion: string = "";
|
||||
selEmp: any;
|
||||
P_PAGE_NUM: number;
|
||||
P_PAGE_LIMIT: number;
|
||||
ReplacementList: any = [];
|
||||
searchBy: string = "";
|
||||
IsReachEnd: boolean = false;
|
||||
ReplacmentListRes: WorKListReplacmentEmployeeResponse;
|
||||
private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
|
||||
private WorkListActionObj: WorkListActionRequest;
|
||||
getpassResAttr: any = [];
|
||||
active: any;
|
||||
demoeAttach:any=[];
|
||||
|
||||
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
|
||||
this.P_PAGE_NUM = 1;
|
||||
this.P_PAGE_LIMIT = 50;
|
||||
// this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
|
||||
// this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
|
||||
// this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
|
||||
// this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
|
||||
// if (this.getPassActionMode == "ANSWER_INFO") {
|
||||
// this.isAnswer = true;
|
||||
// }
|
||||
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||
|
||||
// this.WorkListActionObj = new WorkListActionRequest();
|
||||
// this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060;
|
||||
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
||||
// this.WorkListActionObj.P_ACTION_MODE = "";
|
||||
// this.WorkListActionObj.P_COMMENTS = "";
|
||||
// this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr;
|
||||
// this.WorkListActionObj.P_APPROVER_INDEX = null;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.demoeAttach = [{
|
||||
USER_NAME: '18888',
|
||||
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
|
||||
EMAIL_ADDRESS: "test@yuyuu.hjj",
|
||||
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
USER_NAME: '18888',
|
||||
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
|
||||
EMAIL_ADDRESS: "test@yuyuu.hjj"
|
||||
|
||||
},
|
||||
{
|
||||
USER_NAME: '18888',
|
||||
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
|
||||
EMAIL_ADDRESS: "test@yuyuu.hjj"
|
||||
|
||||
},
|
||||
{
|
||||
USER_NAME: '18888',
|
||||
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
|
||||
EMAIL_ADDRESS: "test@yuyuu.hjj"
|
||||
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
getreplacmentemployee() {
|
||||
this.ReplacementList = [];
|
||||
this.IsReachEnd = false;
|
||||
this.P_PAGE_NUM = 1;
|
||||
if (this.inputSearch) {
|
||||
switch (this.searchBy) {
|
||||
case '1': {
|
||||
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch;
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
|
||||
break;
|
||||
}
|
||||
case '2': {
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = this.inputSearch;
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
break;
|
||||
}
|
||||
case '3': {
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = this.inputSearch;
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
}
|
||||
// if(this.selectedValue =="1"){
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.inputSearch;
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
|
||||
// }
|
||||
// else if(this.selectedValue =="2"){
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.inputSearch;
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
|
||||
// }
|
||||
// else if(this.selectedValue =="3"){
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
|
||||
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=this.inputSearch;
|
||||
// }
|
||||
|
||||
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
|
||||
subscribe((result: WorKListReplacmentEmployeeResponse) => {
|
||||
this.handleWorkListReplacmentEmployeeResult(result);
|
||||
});
|
||||
|
||||
}//End replacment Employee
|
||||
|
||||
handleWorkListReplacmentEmployeeResult(result) {
|
||||
|
||||
if (this.cs.validResponse(result)) {
|
||||
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||
if (this.cs.hasData(result.ReplacementList)) {
|
||||
//this.ReplacmentListRes =result.ReplacementList;
|
||||
this.ReplacementList = result.ReplacementList;
|
||||
this.P_PAGE_NUM++;
|
||||
let lastItemIndex = this.ReplacementList.length - 1;
|
||||
if (result.ReplacementList[lastItemIndex]) {
|
||||
let lastitem = result.ReplacementList[lastItemIndex];
|
||||
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
|
||||
this.IsReachEnd = true;
|
||||
} else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let msg: string = this.ts.trPK('general', 'noResult');
|
||||
this.cs.presentAlert(msg);
|
||||
}
|
||||
// if(result.ReplacementList.length == 0){
|
||||
|
||||
// }
|
||||
|
||||
// else if(result.ReplacementList != null)
|
||||
// {
|
||||
// this.ReplacmentListRes =result.ReplacementList;
|
||||
// //open modal
|
||||
// this.openModale(this.ReplacmentListRes);
|
||||
|
||||
|
||||
// } // if result == null
|
||||
|
||||
} // valid it
|
||||
}
|
||||
|
||||
getValueSelected(Value) {
|
||||
|
||||
this.selectedValue = Value;
|
||||
}
|
||||
|
||||
|
||||
select(selectEmp,index){
|
||||
console.log(selectEmp.EMPLOYEE_DISPLAY_NAME);
|
||||
this.selEmp=selectEmp
|
||||
this.active=index;
|
||||
}
|
||||
clear() {
|
||||
this.selEmpName = "";
|
||||
this.selectedUserInf = null;
|
||||
|
||||
}
|
||||
async openModale(ReplacmentListRes) {
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: ViewReplacementModalComponent
|
||||
});
|
||||
|
||||
modal.onDidDismiss()
|
||||
.then((data) => {
|
||||
if (data == "cancel" || data == "undefined") {
|
||||
//this.selEmpName="";
|
||||
return;
|
||||
} else {
|
||||
this.selectedUserInf = data;
|
||||
this.selEmpName = this.selectedUserInf.EMPLOYEE_DISPLAY_NAME;
|
||||
}
|
||||
});
|
||||
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
submitAction() {
|
||||
this.selEmp
|
||||
if( this.selEmp){
|
||||
let data = this.selEmp;
|
||||
this.modalCtrl.dismiss(data);
|
||||
}else{
|
||||
let msg: string = this.ts.trPK("replacementRoll", "msg");
|
||||
this.cs.showErrorMessageDialog(() => {
|
||||
}, this.ts.trPK('general', 'ok'), msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
// if (this.selEmp && this.isAnswer == false) {
|
||||
// // this.selectedUserInf = this.ReplacementList[this.selEmp];
|
||||
// this.selectedUserInf = this.selEmp;
|
||||
// console.log("selEmp "+ this.selEmp.USER_NAME);
|
||||
|
||||
// if (this.selectedUserInf && this.selectedUserInf.USER_NAME) {
|
||||
// console.log("userInfo "+this.selectedUserInf.USER_NAME);
|
||||
// if (this.userNote) {
|
||||
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
|
||||
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
|
||||
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
|
||||
|
||||
// this.workListMainService.actionButton(this.WorkListActionObj).
|
||||
// subscribe((result: any) => {
|
||||
// this.handleApplayActionResult(result);
|
||||
// });
|
||||
// } else {
|
||||
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
|
||||
// this.cs.showErrorMessageDialog(() => {
|
||||
// }, this.ts.trPK('general', 'ok'), msg);
|
||||
|
||||
// }
|
||||
// } else {
|
||||
// let msg: string = this.ts.trPK("replacementRoll", "msg");
|
||||
// this.cs.showErrorMessageDialog(() => {
|
||||
// }, this.ts.trPK('general', 'ok'), msg);
|
||||
// }
|
||||
// } else if (this.isAnswer == true) {
|
||||
// if (this.userNote) {
|
||||
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null;
|
||||
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
|
||||
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
|
||||
|
||||
// this.workListMainService.actionButton(this.WorkListActionObj).
|
||||
// subscribe((result: any) => {
|
||||
// this.handleApplayActionResult(result);
|
||||
// });
|
||||
// } else {
|
||||
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
|
||||
// this.cs.showErrorMessageDialog(() => {
|
||||
// }, this.ts.trPK('general', 'ok'), msg);
|
||||
// }
|
||||
// } else {
|
||||
// let msg: string = this.ts.trPK("replacementRoll", "msg");
|
||||
// this.cs.showErrorMessageDialog(() => {
|
||||
// }, this.ts.trPK('general', 'ok'), msg);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
if (!this.IsReachEnd) {
|
||||
//const request =new WorkListActionRequest();
|
||||
// request.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.P_SEARCH_USER_NAME;
|
||||
// request.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
|
||||
// request.P_SEARCH_EMAIL_ADDRESS=this.P_SEARCH_EMAIL_ADDRESS;
|
||||
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||
// request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp;
|
||||
|
||||
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
|
||||
subscribe((result: any) => {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (this.cs.hasData(result.ReplacementList)) {
|
||||
this.P_PAGE_NUM++;
|
||||
result.ReplacementList.forEach(vr => {
|
||||
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
|
||||
this.IsReachEnd = true;
|
||||
}
|
||||
else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
this.ReplacementList.push(vr);
|
||||
// this.pro.GetVacationRulesList.push(vr);
|
||||
});
|
||||
} else {
|
||||
this.IsReachEnd = true;
|
||||
}
|
||||
}
|
||||
//this.P_PAGE_NUM++;
|
||||
if (infiniteScroll)
|
||||
infiniteScroll.target.complete();
|
||||
|
||||
|
||||
// console.log(resFlag);
|
||||
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
|
||||
} else {
|
||||
if (infiniteScroll)
|
||||
infiniteScroll.target.complete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
closeModal() {
|
||||
this.modalCtrl.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue