Work List Pages Completed
parent
61275a4c85
commit
6f889347e4
@ -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);
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST);
|
||||
} else if (this.notBodyType == "ABSENCE") {
|
||||
this.notBodyResult = this.cs.sharedService.getSharedData(AbsenceNotificatonBodyResponse.SHARED_DATA);
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue