worklist main page update
commit
a87afe1d8e
@ -0,0 +1,19 @@
|
||||
.inputfile {
|
||||
width: 0.1px;
|
||||
height: 0.1px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
// z-index: -1;
|
||||
}
|
||||
|
||||
.imgSize {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
.Header {
|
||||
font-weight: bold;
|
||||
color: #1a586d;
|
||||
}
|
||||
@ -1,7 +1,23 @@
|
||||
.footer-button {
|
||||
border-radius: 2px;
|
||||
padding: 0 1.1em;
|
||||
min-height: 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
border-radius: 2px;
|
||||
padding: 0 1.1em;
|
||||
min-height: 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
ion-label {
|
||||
color: var(--customnavy) !important;
|
||||
}
|
||||
|
||||
.daynamicForm-Label {
|
||||
font-size: 16px;
|
||||
color: var(--customnavy) !important;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
font-size: inherit;
|
||||
white-space: normal;
|
||||
padding: 5px 0px;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
@ -1,7 +1,26 @@
|
||||
.footer-button {
|
||||
border-radius: 2px;
|
||||
padding: 0 1.1em;
|
||||
min-height: 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
border-radius: 2px;
|
||||
padding: 0 1.1em;
|
||||
min-height: 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.imgSize {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.Header {
|
||||
font-weight: bold;
|
||||
color: #1a586d !important;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.tbData {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.btnBack {
|
||||
background: transparent;
|
||||
float: right;
|
||||
}
|
||||
|
||||
@ -1,25 +1,49 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response, Headers} from "@angular/http";
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
|
||||
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
|
||||
import {Observable} from 'rxjs';
|
||||
import {WorkListRequest} from '../models/workListRequest';
|
||||
import {WorKListResponse} from '../models/workListResponse';
|
||||
import { Observable } from 'rxjs';
|
||||
import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
|
||||
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
|
||||
import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
|
||||
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class WorklistService {
|
||||
|
||||
public static getWorkList = 'Services/ERP.svc/REST/GET_WORKLIST';
|
||||
constructor(
|
||||
public api: ConnectorService,
|
||||
public authService: AuthenticationService,
|
||||
|
||||
) { }
|
||||
|
||||
public getWorkList(WorkListReq: any, onError?: any, errorLabel?: string): Observable<any> {
|
||||
const request = WorkListReq;
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.api.post(WorklistService.getWorkList, request, onError, errorLabel);
|
||||
}
|
||||
public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST';
|
||||
public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST';
|
||||
public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY';
|
||||
|
||||
constructor(
|
||||
public api: ConnectorService,
|
||||
public authService: AuthenticationService,
|
||||
|
||||
) { }
|
||||
|
||||
public getWorkList(WorkListReq: any, onError?: any, errorLabel?: string): Observable<any> {
|
||||
const request = WorkListReq;
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.api.post(WorklistService.getWorkList, request, onError, errorLabel);
|
||||
}
|
||||
|
||||
public getReplacmentEmployeeList(ReplacmentEmployeeRequest: any, onError?: any, errorLabel?: string): Observable<any> {
|
||||
const request = ReplacmentEmployeeRequest;
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.api.post(WorklistService.getReplacmentEmployeeList, request, onError, errorLabel);
|
||||
}
|
||||
|
||||
public getRFCEmployeeList(ActionHistoryRequest: any, onError?: any, errorLabel?: string): Observable<any> {
|
||||
const request = ActionHistoryRequest;
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.api.post(WorklistService.getRFCEmployeeList, request, onError, errorLabel);
|
||||
}
|
||||
|
||||
public getActionHistory(historyActionReq: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
|
||||
const request = historyActionReq;
|
||||
this.authService.authenticateRequest(request);
|
||||
return this.api.post(WorklistService.getActionHistory, request, onError, errorLabel);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-title color="light">{{'worklist, note' | translate}}</ion-title>
|
||||
<ion-buttons slot="primary">
|
||||
<ion-button style="background: none !important;" (click)="closeModal()">
|
||||
<ion-icon slot="icon-only" name="close"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<div>
|
||||
<p class="">{{getTextNote}}</p>
|
||||
</div>
|
||||
</ion-content>
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ViewNoteModalComponent } from './view-note-modal.component';
|
||||
|
||||
describe('ViewNoteModalComponent', () => {
|
||||
let component: ViewNoteModalComponent;
|
||||
let fixture: ComponentFixture<ViewNoteModalComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewNoteModalComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ViewNoteModalComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,24 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-note-modal',
|
||||
templateUrl: './view-note-modal.component.html',
|
||||
styleUrls: ['./view-note-modal.component.scss'],
|
||||
})
|
||||
export class ViewNoteModalComponent implements OnInit {
|
||||
|
||||
getTextNote: any;
|
||||
|
||||
constructor(private modalCtrl: ModalController, private cs: CommonService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.getTextNote = this.cs.sharedService.getSharedData('ViewNoteModalPage');
|
||||
}
|
||||
|
||||
closeModal() {
|
||||
this.modalCtrl.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
<ion-content padding>
|
||||
<!-- (ionChange)="radioChecked($event)" -->
|
||||
<div>
|
||||
|
||||
<ion-grid style="padding-top: 30px;" class="btnGrid">
|
||||
|
||||
<ion-row>
|
||||
<ion-col col-6 class="gridBtnCol">
|
||||
<button ion-button class="gridBtn" (click)="closeBtnModal()">
|
||||
{{'general, cancel' | translate}}
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col col-6 class="gridBtnCol">
|
||||
<button ion-button class="gridBtn" (click)="OkBtnModal()">
|
||||
{{'general, ok' | translate}}
|
||||
</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-grid>
|
||||
|
||||
<ion-list>
|
||||
<!-- <ion-list-header>
|
||||
Select a Person
|
||||
</ion-list-header> -->
|
||||
<ion-radio-group>
|
||||
|
||||
<ion-item *ngFor="let RepList of getRepList">
|
||||
<!-- <ion-col> -->
|
||||
<ion-label>{{RepList.USER_NAME}}</ion-label>
|
||||
<ion-label>{{RepList.EMPLOYEE_DISPLAY_NAME}}</ion-label>
|
||||
<ion-label>{{RepList.EMAIL_ADDRESS}}</ion-label>
|
||||
<ion-radio value="{{RepList.USER_NAME}}" (ionChange)="radioSelect(RepList)"></ion-radio>
|
||||
<!-- <ion-radio (ionSelect)="select(item)" [value]="item"></ion-radio> -->
|
||||
|
||||
<!-- </ion-col> -->
|
||||
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
</ion-list>
|
||||
|
||||
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
|
||||
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
</div>
|
||||
</ion-content>
|
||||
@ -0,0 +1,11 @@
|
||||
ion-content {
|
||||
margin-top: 40px !important;
|
||||
width: 95% !important;
|
||||
height: 80% !important;
|
||||
top: 5% !important;
|
||||
left: 2% !important;
|
||||
right: 5% !important;
|
||||
bottom: 5% !important;
|
||||
padding-top: 30px !important;
|
||||
border: solid 1px #dedede;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ViewReplacementModalComponent } from './view-replacement-modal.component';
|
||||
|
||||
describe('ViewReplacementModalComponent', () => {
|
||||
let component: ViewReplacementModalComponent;
|
||||
let fixture: ComponentFixture<ViewReplacementModalComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ViewReplacementModalComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ViewReplacementModalComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,76 @@
|
||||
import { WorklistService } from './../service/worklist.service';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-replacement-modal',
|
||||
templateUrl: './view-replacement-modal.component.html',
|
||||
styleUrls: ['./view-replacement-modal.component.scss'],
|
||||
})
|
||||
export class ViewReplacementModalComponent implements OnInit {
|
||||
|
||||
radioButtonValue: any;
|
||||
getRepList: any;//WorKListReplacmentEmployeeResponse=new WorKListReplacmentEmployeeResponse();
|
||||
IsReachEnd: boolean = false;
|
||||
private getReplacmentEmployeeReq: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
|
||||
|
||||
|
||||
constructor(private cs: CommonService, private ts: TranslatorService, public modalCtrl: ModalController, public worklistService: WorklistService) {
|
||||
this.getReplacmentEmployeeReq = this.cs.sharedService.getSharedData('replacmentReqObj');
|
||||
this.getRepList = this.cs.sharedService.getSharedData('replacmentResObj');
|
||||
}
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
radioSelect(v) {
|
||||
this.radioButtonValue = v;
|
||||
}
|
||||
|
||||
OkBtnModal() {
|
||||
if (!this.radioButtonValue) {
|
||||
let msg: string = this.ts.trPK("replacementRoll", "msg");
|
||||
this.cs.presentAlert(msg);
|
||||
return;
|
||||
} else {
|
||||
let data = this.radioButtonValue;
|
||||
this.modalCtrl.dismiss(data);
|
||||
}
|
||||
}
|
||||
|
||||
closeBtnModal() {
|
||||
this.modalCtrl.dismiss("cancel");
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
if (!this.IsReachEnd) {
|
||||
this.getReplacmentEmployeeReq.P_PAGE_NUM++;
|
||||
this.worklistService.getReplacmentEmployeeList(this.getReplacmentEmployeeReq).
|
||||
subscribe((result: any) => {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (result.ReplacementList != undefined) {
|
||||
(result.ReplacementList).forEach(element => {
|
||||
if (element.ROW_NUM == element.NO_OF_ROWS) {
|
||||
this.IsReachEnd = true;
|
||||
} else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
this.getRepList.push(element);
|
||||
});
|
||||
}// if list length >0
|
||||
else {
|
||||
this.IsReachEnd = true;
|
||||
}
|
||||
}// if response == 1
|
||||
//this.pageNum++;
|
||||
infiniteScroll.target.complete();
|
||||
});
|
||||
} else {
|
||||
if (infiniteScroll)
|
||||
infiniteScroll.target.complete();
|
||||
}
|
||||
}//end infiniteScroll
|
||||
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<nav-buttons></nav-buttons>
|
||||
<ion-title color="light">{{'workListMain, actionHis' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-card>
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle">{{'worklistMain, actionHis' | translate}}</div>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
|
||||
|
||||
<!-- <ion-item class="itemAH"> -->
|
||||
<ion-grid class=" gridAH">
|
||||
<ion-row class="rowAH titleH">
|
||||
|
||||
<ion-col col-4>
|
||||
<label class="Header" for="">{{'actionHis, name' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label class="Header" for="">{{'actionHis, action' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label class="Header" for="">{{'actionHis, date' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-2>
|
||||
<label class="Header" for="">{{'actionHis, note' | translate}}</label>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
<ion-row class="rowAH" *ngFor="let actionHistory of actionHistoryRes">
|
||||
<!-- <ion-col col-1>
|
||||
<label for="">{{actionHistory.SEQUENCE}}</label>
|
||||
</ion-col> -->
|
||||
<ion-col col-4>
|
||||
<label for="">{{actionHistory.NAME}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label for="">{{actionHistory.ACTION}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<label for="">{{actionHistory.NOTIFICATION_DATE}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-2 style="text-align: center">
|
||||
<button (click)="openNoteDetail(actionHistory.NOTE)" style=" background: none;"
|
||||
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null">
|
||||
<img src="../assets/imgs/more.png">
|
||||
</button>
|
||||
<!-- <label for="">{{actionHistory.NOTE}}</label> -->
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<!-- </ion-item>
|
||||
|
||||
</ion-list> -->
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
|
||||
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
</ion-content>
|
||||
@ -0,0 +1,55 @@
|
||||
ion-card-content.card-content.card-content-md,
|
||||
ion-card-content.card-content.card-content-ios {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
.col {
|
||||
//border: #dedede solid 1px;
|
||||
padding: 2px !important;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
}
|
||||
.item-md.item-block .item-inner,
|
||||
.item-ios.item-block .item-inner {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.itemAH {
|
||||
padding: 0px !important
|
||||
;
|
||||
font-size: 13px;
|
||||
}
|
||||
.gridAH {
|
||||
text-align: center;
|
||||
padding: 5px 5px !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.rowAH {
|
||||
white-space: normal;
|
||||
.col {
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
}
|
||||
.Header {
|
||||
font-weight: bold;
|
||||
// font-family: "WorkSans-SemiBold" !important;
|
||||
color: #1a586d;
|
||||
// padding: 0px !important;
|
||||
// margin: 0px !important;
|
||||
}
|
||||
.titleH {
|
||||
//background-color:$custgreen;
|
||||
//height: 40px;
|
||||
//line-height: 2;
|
||||
font-size: 15px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-top-right-radius: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom: 0px;
|
||||
.col {
|
||||
border: 0px;
|
||||
}
|
||||
}
|
||||
ion-label.label.label-md,
|
||||
ion-label.label.label-ios {
|
||||
margin: 0px;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListActionHistoryComponent } from './work-list-action-history.component';
|
||||
|
||||
describe('WorkListActionHistoryComponent', () => {
|
||||
let component: WorkListActionHistoryComponent;
|
||||
let fixture: ComponentFixture<WorkListActionHistoryComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListActionHistoryComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListActionHistoryComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,107 @@
|
||||
import { ViewNoteModalComponent } from './../view-note-modal/view-note-modal.component';
|
||||
import { WorklistService } from './../service/worklist.service';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-action-history',
|
||||
templateUrl: './work-list-action-history.component.html',
|
||||
styleUrls: ['./work-list-action-history.component.scss'],
|
||||
})
|
||||
export class WorkListActionHistoryComponent implements OnInit {
|
||||
|
||||
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
|
||||
getPassNotificationDetails: any;
|
||||
actionHistoryRes: any;
|
||||
IsReachEnd: boolean = false;
|
||||
P_PAGE_NUM: number = 1;
|
||||
P_PAGE_LIMIT: number = 50;
|
||||
|
||||
constructor(private cs: CommonService, private ts: TranslatorService, private modalCtrl: ModalController, public worklistService: WorklistService) {
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
|
||||
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
|
||||
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getActionHistory(this.WorkListActionHistoryObj);
|
||||
}
|
||||
|
||||
getActionHistory(WorkListActionHistoryObj) {
|
||||
this.IsReachEnd = false;
|
||||
this.worklistService.getActionHistory(WorkListActionHistoryObj).
|
||||
subscribe((result: WorkListActionHistoryResponse) => {
|
||||
this.handleWorkListActionHistoryResult(result);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
handleWorkListActionHistoryResult(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (this.cs.hasData(result.GetActionHistoryList)) {
|
||||
this.actionHistoryRes = result.GetActionHistoryList;
|
||||
this.P_PAGE_NUM++;
|
||||
let lastItemIndex = this.actionHistoryRes.length - 1;
|
||||
if (result.GetActionHistoryList[lastItemIndex]) {
|
||||
let lastitem = result.GetActionHistoryList[lastItemIndex];
|
||||
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
|
||||
this.IsReachEnd = true;
|
||||
} else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async openNoteDetail(note) {
|
||||
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
|
||||
// modalPage.present();
|
||||
|
||||
this.cs.sharedService.setSharedData(note, 'ViewNoteModalPage')
|
||||
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: ViewNoteModalComponent
|
||||
});
|
||||
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
if (!this.IsReachEnd) {
|
||||
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
|
||||
subscribe((result: any) => {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (result.GetActionHistoryList != undefined) {
|
||||
this.P_PAGE_NUM++;
|
||||
(result.GetActionHistoryList).forEach(element => {
|
||||
if (element.ROW_NUM == element.NO_OF_ROWS) {
|
||||
this.IsReachEnd = true;
|
||||
} else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
this.actionHistoryRes.push(element);
|
||||
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
|
||||
}// if list length >0
|
||||
else {
|
||||
this.IsReachEnd = true;
|
||||
}
|
||||
}// if response == 1
|
||||
//this.pageNum++;
|
||||
infiniteScroll.target.complete();
|
||||
|
||||
});
|
||||
} else {
|
||||
if (infiniteScroll)
|
||||
infiniteScroll.target.complete();
|
||||
}
|
||||
}//end infiniteScroll
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<nav-buttons></nav-buttons>
|
||||
<ion-title color="light">{{'worklist, note' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<div [hidden]="attachmentRes && attachmentRes.length > 0">
|
||||
<p>{{ 'general, notAttch' | translate}}</p>
|
||||
</div>
|
||||
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
|
||||
<ion-card>
|
||||
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle">{{'worklistMain, suppDoc' | translate}}</div>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-grid>
|
||||
<div *ngFor="let attachList of attachmentRes">
|
||||
<ion-row>
|
||||
<ion-col col-10>
|
||||
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
|
||||
</div>
|
||||
<ion-label>
|
||||
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
|
||||
|
||||
</ion-col>
|
||||
<ion-col col-2>
|
||||
<button float-end class="attachImgBtn"
|
||||
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
|
||||
<img class="attachImg" src="../assets/imgs/view.png">
|
||||
</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@ -0,0 +1,7 @@
|
||||
ion-card-content.card-content.card-content-md,
|
||||
ion-card-content.card-content.card-content-ios {
|
||||
padding: 0px;
|
||||
}
|
||||
img.attachImg {
|
||||
margin: 5px 8px 13px 0;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListAttachComponent } from './work-list-attach.component';
|
||||
|
||||
describe('WorkListAttachComponent', () => {
|
||||
let component: WorkListAttachComponent;
|
||||
let fixture: ComponentFixture<WorkListAttachComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListAttachComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListAttachComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,59 @@
|
||||
import { WorklistAttachService } from './../../absence/service/work-list-attach.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { WorkListButtonRequest } from 'src/app/eit/models/NotificationButtonReq';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-attach',
|
||||
templateUrl: './work-list-attach.component.html',
|
||||
styleUrls: ['./work-list-attach.component.scss'],
|
||||
})
|
||||
export class WorkListAttachComponent implements OnInit {
|
||||
|
||||
private WorkListAttachObj: WorkListButtonRequest;
|
||||
getPassNotificationDetails: any;
|
||||
attachmentRes: any;
|
||||
|
||||
constructor(public cs: CommonService, public modalCtrl: ModalController, public worklistAttachService: WorklistAttachService) {
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
|
||||
this.WorkListAttachObj = new WorkListButtonRequest();
|
||||
this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getAttachmentNotification(this.WorkListAttachObj);
|
||||
}
|
||||
|
||||
async OpenAttachFiles(value, Type) {
|
||||
// let modal: Modal = this.modalCtrl.create('WorkListAttachViewPage', { displayData: value, TypeData: Type });
|
||||
// modal.present();
|
||||
|
||||
this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage')
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: WorkListAttachViewComponent
|
||||
});
|
||||
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
getAttachmentNotification(WorkListAttachObj) {
|
||||
|
||||
this.worklistAttachService.getAttach(WorkListAttachObj).
|
||||
subscribe((result: NotificationGetAttachResponse) => {
|
||||
this.handleWorkListAttachResult(result);
|
||||
});
|
||||
}
|
||||
|
||||
handleWorkListAttachResult(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||
if (result.GetAttachementList != null) {
|
||||
this.attachmentRes = result.GetAttachementList;
|
||||
} // if result == null
|
||||
} // valid it
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<nav-buttons></nav-buttons>
|
||||
<ion-title color="light">{{'workListMain, notfDetails' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<div *ngIf="submitterInfoRes?.length > 0 ">
|
||||
|
||||
<ion-card>
|
||||
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle"> {{'general, info' | translate}}</div>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
<div *ngFor="let submitterInfo of submitterInfoRes">
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, empNo' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.EMPLOYEE_NUMBER}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, name' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.EMPLOYEE_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, position' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.POSITION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, grade' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.GRADE_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, job' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.JOB_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, category' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.EMPLOYMENT_CATEGORY_MEANING}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, orgEmail' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, orgName' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.ORGANIZATION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, busG' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.BUSINESS_GROUP_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, locName' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.LOCATION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{'userProfile, payrol' | translate}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{submitterInfo.PAYROLL_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
|
||||
</ion-card>
|
||||
</div>
|
||||
<div *ngIf="notificationBodyRes?.length > 0 ">
|
||||
<ion-card *ngFor="let item of notificationBodyRes; let i=index ">
|
||||
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle"> {{'worklistMain, notfDetails' | translate}}</div>
|
||||
</ion-card-header>
|
||||
|
||||
<ion-card-content>
|
||||
<div *ngFor="let notificationBody of item.Collection_Notification ">
|
||||
<ion-row *ngIf=" notificationBody.DISPLAY_FLAG != 'N' ">
|
||||
<ion-col class="colBold" col-5>
|
||||
<label for="">{{notificationBody.SEGMENT_PROMPT}}</label>
|
||||
</ion-col>
|
||||
<ion-col col-7>
|
||||
<label for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListDetailsComponent } from './work-list-details.component';
|
||||
|
||||
describe('WorkListDetailsComponent', () => {
|
||||
let component: WorkListDetailsComponent;
|
||||
let fixture: ComponentFixture<WorkListDetailsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListDetailsComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListDetailsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,69 @@
|
||||
import { WorklistsubmitterInfoResponse } from './../models/WorklistsubmitterInfoRes';
|
||||
import { WorklistMainService } from './../service/work-list.main.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { WorkListSubmitterInfoRequest } from './../models/WorklistsubmitterInfoReq';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { EITNotificatonBodyResponse } from 'src/app/eit/models/EITNotificationBodyRes';
|
||||
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-details',
|
||||
templateUrl: './work-list-details.component.html',
|
||||
styleUrls: ['./work-list-details.component.scss'],
|
||||
})
|
||||
export class WorkListDetailsComponent implements OnInit {
|
||||
submitterInfoRes: any;
|
||||
notificationBodyRes: any;
|
||||
notBodyType: string = "";
|
||||
notBodyResult: any;
|
||||
getPassNotificationDetails: any;
|
||||
private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest;
|
||||
|
||||
constructor(public cs: CommonService, public worklistMainService: WorklistMainService) {
|
||||
this.WorkListSubmitterInfoObj = new WorkListSubmitterInfoRequest();
|
||||
this.notBodyType = this.cs.sharedService.getSharedData('NotBodyType', false);
|
||||
if (this.notBodyType == "EIT") {
|
||||
this.notBodyResult = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
|
||||
} else if (this.notBodyType == "ABSENCE") {
|
||||
this.notBodyResult = this.cs.sharedService.getSharedData(AbsenceNotificatonBodyResponse.SHARED_DATA, false);
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, false);
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.WorkListSubmitterInfoObj.P_PAGE_LIMIT = 100;
|
||||
this.WorkListSubmitterInfoObj.P_PAGE_NUM = 1;
|
||||
this.WorkListSubmitterInfoObj.P_SELECTED_EMPLOYEE_NUMBER = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
|
||||
this.WorkListSubmitterInfoObj.P_SELECTED_RESP_ID = -999;
|
||||
this.WorkListSubmitterInfoObj.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
this.WorkListSubmitterInfoObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.WorkListSubmitterInfoObj.P_SEARCH_USER_NAME = "";
|
||||
|
||||
this.getsubmitterInfo(this.WorkListSubmitterInfoObj);
|
||||
this.handleNotificationBody();
|
||||
}
|
||||
|
||||
getsubmitterInfo(notificationSubmitterInfoObj) {
|
||||
this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj).
|
||||
subscribe((result: WorklistsubmitterInfoResponse) => {
|
||||
this.handleSubmitterInfoResult(result);
|
||||
});
|
||||
}
|
||||
handleSubmitterInfoResult(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||
if (this.cs.hasData(result.MemberInformationList)) {
|
||||
//if (result.MemberInformationList != null) {
|
||||
this.submitterInfoRes = result.MemberInformationList;
|
||||
} // if result == null
|
||||
} // valid it
|
||||
}// End handleWorkListButtonsResult
|
||||
handleNotificationBody() {
|
||||
this.notificationBodyRes = {};
|
||||
if (this.cs.hasData(this.notBodyResult)) {
|
||||
this.notificationBodyRes = this.notBodyResult;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<nav-buttons></nav-buttons>
|
||||
<ion-title color="light">{{ 'replacementRoll, title' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<ion-list [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>
|
||||
<ion-input [(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>
|
||||
<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 radio-group [(ngModel)]="selEmp" *ngIf="ReplacementList">
|
||||
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
|
||||
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
|
||||
{{employee.EMAIL_ADDRESS}}</ion-label>
|
||||
<ion-radio value="{{i}}"></ion-radio>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
|
||||
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
</ion-item>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="footer-button" color="customnavy" ion-button (click)="submitAction()">
|
||||
{{'general, submit' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,10 @@
|
||||
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;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListReplacementRollComponent } from './work-list-replacement-roll.component';
|
||||
|
||||
describe('WorkListReplacementRollComponent', () => {
|
||||
let component: WorkListReplacementRollComponent;
|
||||
let fixture: ComponentFixture<WorkListReplacementRollComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListReplacementRollComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListReplacementRollComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,293 @@
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { WorklistService } from './../service/worklist.service';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WorKListReplacmentEmployeeResponse } from '../models/ReplacmentEmployeeRes';
|
||||
import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
|
||||
import { WorkListActionRequest } from '../models/NotificationActionReq';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { WorklistMainService } from '../service/work-list.main.service';
|
||||
import { ViewReplacementModalComponent } from '../view-replacement-modal/view-replacement-modal.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-replacement-roll',
|
||||
templateUrl: './work-list-replacement-roll.component.html',
|
||||
styleUrls: ['./work-list-replacement-roll.component.scss'],
|
||||
})
|
||||
export class WorkListReplacementRollComponent 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 = [];
|
||||
|
||||
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');
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
|
||||
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
|
||||
this.pQuestion = this.cs.sharedService.getSharedData('pQuestion');
|
||||
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;
|
||||
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() { }
|
||||
|
||||
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;
|
||||
}
|
||||
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() {
|
||||
if (this.selEmp && this.isAnswer == false) {
|
||||
this.selectedUserInf = this.ReplacementList[this.selEmp];
|
||||
|
||||
if (this.selectedUserInf && 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);
|
||||
}
|
||||
}
|
||||
|
||||
handleApplayActionResult(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
// let msg=this.translate.translate("general.success");
|
||||
// this.cs.showAlert(msg);
|
||||
// this.navCtrl.push("HomePage");
|
||||
this.cs.openNotificationPage();
|
||||
} // valid it
|
||||
}
|
||||
|
||||
// cancel() {
|
||||
// this.navCtrl.pop();
|
||||
// }
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<nav-buttons></nav-buttons>
|
||||
<ion-title color="light">{{ 'workListMain, rfc' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<div class="tipsPadding boldTxtNav">
|
||||
{{"replacementRoll.msgRFC" | translate}}
|
||||
</div>
|
||||
<ion-list (ionChange)="radioChecked($event)" radio-group>
|
||||
<ion-item *ngFor="let rfcEmployeeList of RFCEmployeeListListRes; let i = index;">
|
||||
<ion-label>{{rfcEmployeeList.EMPLOYEE_DISPLAY_NAME}}</ion-label>
|
||||
<ion-label>{{rfcEmployeeList.ACTION}}</ion-label>
|
||||
<ion-radio value="{{i}}"></ion-radio>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
|
||||
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
|
||||
<div>
|
||||
<label class="boldTxtNav">{{"replacementRoll.enterNote" | translate}}</label>
|
||||
<ion-item>
|
||||
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button class="footer-button" color="customnavy" ion-button (click)="submitAction()">
|
||||
{{'general, submit' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,7 @@
|
||||
.footer-button {
|
||||
border-radius: 3px;
|
||||
padding: 0 1.1em;
|
||||
min-height: 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListRfcComponent } from './work-list-rfc.component';
|
||||
|
||||
describe('WorkListRfcComponent', () => {
|
||||
let component: WorkListRfcComponent;
|
||||
let fixture: ComponentFixture<WorkListRfcComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListRfcComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListRfcComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,156 @@
|
||||
import { WorklistMainService } from './../service/work-list.main.service';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
|
||||
import { WorkListActionRequest } from '../models/NotificationActionReq';
|
||||
import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
|
||||
import { WorklistService } from '../service/worklist.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-rfc',
|
||||
templateUrl: './work-list-rfc.component.html',
|
||||
styleUrls: ['./work-list-rfc.component.scss'],
|
||||
})
|
||||
export class WorkListRfcComponent implements OnInit {
|
||||
|
||||
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
|
||||
private WorkListActionObj: WorkListActionRequest;
|
||||
|
||||
getPassNotificationDetails: any;
|
||||
RFCEmployeeListListRes: any;
|
||||
radioButtonValue: any;
|
||||
pageNum: number = 1;
|
||||
seqNo: any;
|
||||
//forwordTo:any;
|
||||
IsReachEnd: boolean = false;
|
||||
comments: any;
|
||||
userNote: any;
|
||||
getpassResAttr: any = [];
|
||||
P_PAGE_NUM: number = 1;
|
||||
P_PAGE_LIMIT: number = 50;
|
||||
|
||||
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService) {
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
|
||||
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
|
||||
|
||||
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
|
||||
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||
|
||||
this.WorkListActionObj = new WorkListActionRequest();
|
||||
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
||||
this.WorkListActionObj.P_ACTION_MODE = "";
|
||||
this.WorkListActionObj.P_COMMENTS = "";
|
||||
this.WorkListActionObj.P_APPROVER_INDEX = null;
|
||||
this.WorkListActionObj.RespondAttributeList = this.getpassResAttr;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getRFCEmployee(this.WorkListActionHistoryObj);
|
||||
}
|
||||
|
||||
getRFCEmployee(WorkListActionHistoryObj) {
|
||||
this.IsReachEnd = false;
|
||||
this.worklistService.getRFCEmployeeList(WorkListActionHistoryObj).
|
||||
subscribe((result: WorKListRFCEmployeeResponse) => {
|
||||
this.handleWorkListRFCEmployeeResult(result);
|
||||
});
|
||||
}
|
||||
|
||||
handleWorkListRFCEmployeeResult(result) {
|
||||
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (this.cs.hasData(result.GetRFCEmployeeListList)) {
|
||||
this.RFCEmployeeListListRes = result.GetRFCEmployeeListList;
|
||||
this.P_PAGE_NUM++;
|
||||
let lastItemIndex = this.RFCEmployeeListListRes.length - 1;
|
||||
if (result.GetRFCEmployeeListList[lastItemIndex]) {
|
||||
let lastitem = result.GetRFCEmployeeListList[lastItemIndex];
|
||||
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
|
||||
this.IsReachEnd = true;
|
||||
} else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
radioChecked(v) {
|
||||
let emp: any = this.RFCEmployeeListListRes[v];
|
||||
this.seqNo = emp.SEQ;
|
||||
this.radioButtonValue = emp.USER_NAME;
|
||||
|
||||
}
|
||||
|
||||
submitAction() {
|
||||
if (this.radioButtonValue) {
|
||||
if (this.userNote) {
|
||||
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.radioButtonValue;
|
||||
this.WorkListActionObj.P_ACTION_MODE = "RFC";
|
||||
this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
|
||||
this.WorkListActionObj.P_APPROVER_INDEX = this.seqNo;
|
||||
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", "msgRFC");
|
||||
this.cs.showErrorMessageDialog(() => {
|
||||
}, this.ts.trPK('general', 'ok'), msg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
handleApplayActionResult(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (result.MessageStatus == 1) {
|
||||
// let msg:string="";
|
||||
// msg=this.translate.translate("general.success");
|
||||
// this.common.showAlert(msg);
|
||||
// this.navCtrl.push("HomePage");
|
||||
this.cs.openHome();
|
||||
}
|
||||
} // valid it
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
if (!this.IsReachEnd) {
|
||||
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
this.worklistService.getRFCEmployeeList(this.WorkListActionHistoryObj).
|
||||
subscribe((result) => {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (result.RFCEmployeeList != undefined) {
|
||||
this.P_PAGE_NUM++
|
||||
(result.RFCEmployeeList).forEach(element => {
|
||||
if (element.ROW_NUM == element.NO_OF_ROWS) {
|
||||
this.IsReachEnd = true;
|
||||
}
|
||||
else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
//this.WorkListResObj.push(element);
|
||||
});
|
||||
}// if list length >0
|
||||
else {
|
||||
this.IsReachEnd = true;
|
||||
}
|
||||
}// if response == 1
|
||||
//this.pageNum++;
|
||||
infiniteScroll.target.complete();
|
||||
});
|
||||
} else {
|
||||
if (infiniteScroll)
|
||||
infiniteScroll.target.complete();
|
||||
}
|
||||
}//end infiniteScroll
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue