merge master-newdesign
commit
05387d81d4
File diff suppressed because it is too large
Load Diff
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
import { FeedbackDirective } from './feedback.directive';
|
||||
|
||||
describe('FeedbackDirective', () => {
|
||||
it('should create an instance', () => {
|
||||
const directive = new FeedbackDirective();
|
||||
expect(directive).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -1,24 +0,0 @@
|
||||
import { Directive, ElementRef, HostListener } from '@angular/core';
|
||||
import { TranslatorService } from '../../services/translator/translator.service';
|
||||
import { CommonService } from '../../services/common/common.service';
|
||||
import { FeedbackService } from './feedback.service';
|
||||
|
||||
@Directive({
|
||||
selector: '[feedback]'
|
||||
})
|
||||
export class FeedbackDirective {
|
||||
|
||||
constructor(
|
||||
private cs: CommonService,
|
||||
private ts: TranslatorService,
|
||||
private el: ElementRef,
|
||||
private feedBackService: FeedbackService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@HostListener('mousedown') onMouseEnter() {
|
||||
this.feedBackService.vibrate();
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FeedbackService } from './feedback.service';
|
||||
|
||||
describe('FeedbackService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: FeedbackService = TestBed.get(FeedbackService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -1,20 +0,0 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Vibration } from '@ionic-native/vibration/ngx';
|
||||
// import { SettingsService } from 'src/app/settings/service/settings.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FeedbackService {
|
||||
// constructor(private vibration: Vibration, private settings: SettingsService) {}
|
||||
constructor(private vibration: Vibration) {}
|
||||
|
||||
public async vibrate() {
|
||||
try {
|
||||
const on = true;
|
||||
if (on) {
|
||||
this.vibration.vibrate(500);
|
||||
}} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
|
||||
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
|
||||
<span class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
|
||||
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
|
||||
</div>
|
||||
@ -0,0 +1,32 @@
|
||||
.main-container{
|
||||
width: 72px;
|
||||
background-color: white;
|
||||
padding: 10px;
|
||||
border-radius: 20px;
|
||||
height: 70px;
|
||||
text-align: right;
|
||||
font-family: WorkSans-Regular;
|
||||
padding-top: 25px;
|
||||
box-shadow: 0 0 6px rgba(0,0,0,0.16);
|
||||
position: relative;
|
||||
}
|
||||
.main-container-radius{
|
||||
// content: "";
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 6px;
|
||||
border-radius: 10px;
|
||||
background-color: red;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
.number-span{
|
||||
font-size: 19px;
|
||||
display: block;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.text-span{
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CardFilterComponent } from './card-filter.component';
|
||||
|
||||
describe('CardFilterComponent', () => {
|
||||
let component: CardFilterComponent;
|
||||
let fixture: ComponentFixture<CardFilterComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CardFilterComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CardFilterComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,18 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-card-filter',
|
||||
templateUrl: './card-filter.component.html',
|
||||
styleUrls: ['./card-filter.component.scss'],
|
||||
})
|
||||
export class CardFilterComponent implements OnInit {
|
||||
@Input() value: number;
|
||||
@Input() text: string;
|
||||
@Input() active: boolean;
|
||||
@Input() color: string;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
||||
@ -1,227 +1,94 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-title color="light"> {{ts.trPK('home','worklist')}}</ion-title>
|
||||
<ion-buttons slot="start">
|
||||
<nav-buttons backLink="/home"></nav-buttons>
|
||||
</ion-buttons>
|
||||
<ion-toolbar class="header-toolbar-new">
|
||||
<ion-buttons slot="start">
|
||||
<nav-buttons backLink="/home"></nav-buttons>
|
||||
</ion-buttons>
|
||||
<ion-title>WORK LIST</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content [ngClass]=" direction == 'ltr' ? 'left' : 'right'">
|
||||
<!-- first select type view -->
|
||||
<!-- <ion-item>
|
||||
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="notificationType"
|
||||
(ionChange)=onChangeView($event)>
|
||||
<ion-select-option value="1" selected="true">{{ts.trPK('worklist','openNot')}}</ion-select-option>
|
||||
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
|
||||
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
|
||||
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
|
||||
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="searchBy"
|
||||
(ionChange)="getValueSelected($event)">
|
||||
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
|
||||
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
|
||||
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
|
||||
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
|
||||
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
|
||||
|
||||
</ion-select>
|
||||
</ion-item> -->
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size='3' class="ion-no-padding , menuListCol">
|
||||
<ion-list class="menuList">
|
||||
<ion-item class="menuListItem" lines="none">
|
||||
|
||||
<ion-button class="menuListBtn" (click)="AllNotification()">
|
||||
<img *ngIf="!isAll" src="../assets/imgs/menuTabs/All1.png" />
|
||||
<img *ngIf="isAll" src="../assets/imgs/menuTabs/All2.png" />
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item class="menuListItem" lines="none">
|
||||
<!-- <ion-item lines="none" class="activeTabMenu"*ngIf="isPR"></ion-item> -->
|
||||
<!-- <ion-button class="menuListBtn" (click)="PRNotification()"><p style="color: black;">PR</p></ion-button> -->
|
||||
<ion-button ion-button class="menuListBtn" (click)="PRNotification()">
|
||||
<img *ngIf="!isPR" src="../assets/imgs/menuTabs/PR1.png" />
|
||||
<img *ngIf="isPR" src="../assets/imgs/menuTabs/PR2.png" />
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item class="menuListItem" lines="none">
|
||||
|
||||
<ion-button class="menuListBtn" (click)="PONotification()">
|
||||
<img *ngIf="!isPO" src="../assets/imgs/menuTabs/PO1.png" />
|
||||
<img *ngIf="isPO" src="../assets/imgs/menuTabs/PO2.png" />
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item class="menuListItem" lines="none">
|
||||
|
||||
<ion-button class="menuListBtn" (click)="MRNotification()">
|
||||
<img *ngIf="!isMR" src="../assets/imgs/menuTabs/MR1.png" />
|
||||
<img *ngIf="isMR" src="../assets/imgs/menuTabs/MR2.png" />
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item class="menuListItem" lines="none">
|
||||
<ion-content>
|
||||
<div class="contentBg">
|
||||
<div class="result-graph">
|
||||
<div class="request-heading">
|
||||
<span>Open Request Analysis</span>
|
||||
</div>
|
||||
<div class="result-text-container">
|
||||
<h2>{{totalRequestCount}}</h2>
|
||||
<span>TOTAL <br> OPEN REQUEST</span>
|
||||
</div>
|
||||
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
|
||||
</div>
|
||||
|
||||
<ion-row class="filters-row">
|
||||
<ion-slides [options]="slideOptsOne">
|
||||
<ion-slide *ngFor="let filter of filters; let i=index" [ngClass]="filter.disable === true ? 'disable-filter' : ''">
|
||||
<app-card-filter
|
||||
[value]="filter.value"
|
||||
[text]="filter.name"
|
||||
[color]="filter.color"
|
||||
[active]="filter.active"
|
||||
(click)="activeFilter(i)"
|
||||
></app-card-filter>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
</ion-row>
|
||||
|
||||
<ion-row class="search-container">
|
||||
<ion-col style="float: left;" size=[6] *ngIf="showSearchButton" (click)="clearSearch()">
|
||||
<span style="margin-left: 5px;">Clear Search</span>
|
||||
<ion-icon name="close" ></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter === 'ALL'">
|
||||
<ion-icon name="search" ></ion-icon>
|
||||
<span>Advanced Search</span>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<!-- <div class="total-result" *ngIf="isEmptyObject() && selectedFilter === 'ALL' && showSearchButton === false">
|
||||
<span>showing {{newWorkListResponse.length}} of {{filters[0].value}}</span>
|
||||
</div> -->
|
||||
|
||||
<ion-button class="menuListBtn" (click)="HRNotification()">
|
||||
<img *ngIf="!isHR" src="../assets/imgs/menuTabs/HR1.png" />
|
||||
<img *ngIf="isHR" src="../assets/imgs/menuTabs/HR2.png" />
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item class="menuListItem" lines="none">
|
||||
<ion-button class="menuListBtn" (click)="ITGNotification()">
|
||||
<img *ngIf="!isITG" src="../assets/imgs/menuTabs/ITG1.png" />
|
||||
<img *ngIf="isITG" src="../assets/imgs/menuTabs/ITG2.png" />
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<ion-row *ngIf='selectedFilter === "ITG"'>
|
||||
<ion-col>
|
||||
<ion-slides>
|
||||
<ion-slide class='slideCss' *ngFor="let segment of ITGSegment">
|
||||
<span [ngClass]="segment.style? 'text-span-active': 'text-span'" (click)="setActive(segment.code)">
|
||||
{{segment.name}}
|
||||
</span>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
</ion-col>
|
||||
<ion-col size='9' class="notifincationList">
|
||||
|
||||
<ion-list class="notification-list" *ngIf="!noData">
|
||||
<div class="timelineMain">
|
||||
<ion-item class="itemListNotification" *ngFor="let notificationList of filteredNotificationList"
|
||||
lines='none'>
|
||||
|
||||
<div class="item-date"> {{notificationList.BEGIN_DATE | dateString }} </div>
|
||||
<div class="timelineMain-item" slot="start">
|
||||
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
|
||||
|
||||
<div class="timelineMain-thumb bg-color-dot timelineMain-icon">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-label (click)="openNotificationDetail(notificationList)"> {{notificationList.SUBJECT}}
|
||||
</ion-label>
|
||||
|
||||
</ion-item>
|
||||
|
||||
</div>
|
||||
</ion-list>
|
||||
<ion-list class="emptyItem" *ngIf="noData">
|
||||
<ion-item class="itemListNotification" lines='none'>
|
||||
<ion-label> There is no Notification
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<!-- <ion-list class="notification-list " *ngIf="isPR">
|
||||
<div class="timeline">
|
||||
<p>PR</p>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
|
||||
<ion-list class="notification-list " *ngIf="isPO">
|
||||
<div class="timeline">
|
||||
<p>PO</p>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
</ion-row>
|
||||
|
||||
<ion-list class="notification-list " *ngIf="isMR">
|
||||
<div class="timeline">
|
||||
<p>MR</p>
|
||||
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf='selectedFilter != "ITG"'>
|
||||
<div *ngFor="let data of showFormattedData | keyvalue; let i = index">
|
||||
<span class="date-span">{{data.key}}</span>
|
||||
<div (click)="openNotificationDetail(data.value)" class="date-data" *ngFor="let workList of data.value; let j = index">
|
||||
<p>{{workList.SUBJECT}}</p>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-list class="notification-list " *ngIf="isHR">
|
||||
<div class="timeline">
|
||||
<p>HR</p>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
<ion-list class="notification-list " *ngIf="isITG">
|
||||
<div class="timeline">
|
||||
<p>ITG</p>
|
||||
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf="selectedFilter == 'ITG'" >
|
||||
<div *ngFor='let segmentInfo of ITGItem[0]; let i= index' (click)='openITG(segmentInfo)'>
|
||||
<span class="date-span">{{segmentInfo.ModifiedDate |date}}</span>
|
||||
<div class="date-data">
|
||||
<p>{{segmentInfo.Title}}</p>
|
||||
</div>
|
||||
</ion-list> -->
|
||||
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<!-- *ngIf="rowsNo <= noOfrows" -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="no-data-available" *ngIf="!isEmptyObject()">
|
||||
<span>No Data Available</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
|
||||
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
|
||||
|
||||
</ion-content>
|
||||
<ion-footer class="footerSearchBtn" *ngIf="!isSearch">
|
||||
<ion-button color="customnavy" expand="full" fill="outline" (click)="searchBtn()">{{ts.trPK('worklist','search')}}
|
||||
</ion-button>
|
||||
</ion-footer>
|
||||
|
||||
<ion-footer class="footerSearchBtn" *ngIf="isSearch">
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<!-- <ion-col size='3'> </ion-col> -->
|
||||
<ion-col>
|
||||
<div class="viewAndSearch">
|
||||
<ion-item lines="none">
|
||||
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
|
||||
[(ngModel)]="notificationType" (ionChange)=onChangeView($event)>
|
||||
<ion-select-option value="1" selected="true">{{ts.trPK('worklist','openNot')}}</ion-select-option>
|
||||
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
|
||||
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
|
||||
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
|
||||
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="viewAndSearch">
|
||||
<ion-item>
|
||||
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
|
||||
[(ngModel)]="searchBy" (ionChange)="getValueSelected($event)">
|
||||
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
|
||||
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
|
||||
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
|
||||
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
|
||||
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
</ion-item>
|
||||
<div>
|
||||
<div *ngIf="HideDateInput==true">
|
||||
<ion-item lines='none'>
|
||||
<ion-label>{{ts.trPK('worklist','sent')}} </ion-label>
|
||||
<ion-datetime placeholder="{{ts.trPK('worklist','enter')}}" displayFormat="DD-MMM-YYYY"
|
||||
pickerFormat="DD-MMM-YYYY" [(ngModel)]="InputDate"></ion-datetime>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="HideTextInput==true">
|
||||
<ion-item>
|
||||
<ion-input placeholder="{{ts.trPK('worklist','enter')}}" [(ngModel)]="inputSearch">
|
||||
</ion-input>
|
||||
</ion-item>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ion-button class="toSearchBtn" color="customnavy" expand="full" fill="outline"
|
||||
(click)="getAllPushNotificationFun()">
|
||||
{{ts.trPK('worklist','search')}}</ion-button>
|
||||
<ion-button class="toSearchBtn" color="customnavy" expand="full" fill="outline" (click)="searchBtn()">
|
||||
{{ts.trPK('general','close')}}</ion-button>
|
||||
</div>
|
||||
|
||||
<ion-button color="customnavy" (click)="Details()">Call details ITG</ion-button>
|
||||
<ion-button color="customnavy" (click)="Count()">Call count ITG</ion-button>
|
||||
<!--
|
||||
<ion-button color="customnavy" (click)="getAllPushNotificationFun()">{{ts.trPK('worklist','search')}}</ion-button> -->
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-footer>
|
||||
@ -1,336 +1,458 @@
|
||||
import { Component, OnInit, ViewChild } 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 { WorkListRequest } from "../models/workListRequest";
|
||||
import * as moment from "moment";
|
||||
import { WorKListResponse } from "../models/workListResponse";
|
||||
import { WorklistService } from "../service/worklist.service";
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { WorkListRequest } from '../models/workListRequest';
|
||||
import * as moment from 'moment';
|
||||
import { WorklistService } from '../service/worklist.service';
|
||||
import { IonInfiniteScroll } from '@ionic/angular';
|
||||
import { WorklistMainService } from '../service/work-list.main.service';
|
||||
import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/worklist-advanced-search.component';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: "app-home",
|
||||
templateUrl: "./home.component.html",
|
||||
styleUrls: ["./home.component.scss"]
|
||||
selector: 'app-home',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.scss']
|
||||
})
|
||||
export class HomeComponent implements OnInit {
|
||||
// @ViewChild(Navbar) navBar: Navbar;
|
||||
public static REQUSET_NAME = 'requst_name';
|
||||
public static REQUSET_INFO = 'requset_info';
|
||||
public static ALL_REQUEST = 'all_request';
|
||||
public static NOTIFICATION_DATA = 'notification_data';
|
||||
public static NOTIFICATION_ARR = 'notification_arr';
|
||||
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
|
||||
private WorkListObj: WorkListRequest;
|
||||
WorkListResObj: any; //WorKListResponse;
|
||||
notificationType: string = "1";
|
||||
pageNum: number = 1;
|
||||
WorkListResObj: any;
|
||||
notificationType = '1';
|
||||
pageNum = 1;
|
||||
rowsNo: number;
|
||||
noOfrows: number;
|
||||
selectedValue: string = "";
|
||||
FromUserName: string = "";
|
||||
ItemKeyDisplayName: string = "";
|
||||
SentDate: string = "";
|
||||
Subject: string = "";
|
||||
inputSearch: string = "";
|
||||
HideDateInput: boolean = false;
|
||||
HideTextInput: boolean = false;
|
||||
InputDate: string;
|
||||
selectedValue = '';
|
||||
FromUserName = '';
|
||||
ItemKeyDisplayName = '';
|
||||
SentDate = '';
|
||||
Subject = '';
|
||||
inputSearch = '';
|
||||
inputDate: string;
|
||||
filteredNotificationList: any;
|
||||
IsReachEnd: boolean = false;
|
||||
public noData: boolean = false;
|
||||
public isAll: boolean = true;
|
||||
public isPR: boolean = false;
|
||||
public isPO: boolean = false;
|
||||
public isMR: boolean = false;
|
||||
public isHR: boolean = false;
|
||||
public isITG: boolean = false;
|
||||
public isSearch: boolean = false;
|
||||
isReachEnd = false;
|
||||
public isAll = true;
|
||||
public isPR = false;
|
||||
public isPO = false;
|
||||
public isMR = false;
|
||||
public isHR = false;
|
||||
public noData = false;
|
||||
public isITG = false;
|
||||
public isSearch = false;
|
||||
public direction = 'ltr';
|
||||
public ITGCount = 0;
|
||||
public ITGSegment: {name: string, code: any, data: any, style: boolean} [] = [];
|
||||
public ITGAllItem: any = [];
|
||||
public selectedITGToActive = false;
|
||||
public ITGItem: any = [];
|
||||
public activeSegment: any;
|
||||
|
||||
public currentActiveIndex = 0;
|
||||
public previousActiveIndex = 0;
|
||||
public worklistNotifications: any;
|
||||
public totalRequestCount = 0;
|
||||
public newWorkListResponse = [];
|
||||
public showFormattedData = {};
|
||||
public selectedFilter = 'ALL';
|
||||
public showSearchButton = false;
|
||||
public itemType = '';
|
||||
public options = {
|
||||
cutoutPercentage: 80,
|
||||
tooltips: { enabled: false },
|
||||
legend: { display: false }
|
||||
};
|
||||
public data = {
|
||||
datasets: [
|
||||
{
|
||||
data: [0, 0, 0, 0, 0],
|
||||
backgroundColor: [
|
||||
'#18a169',
|
||||
'#38c9b3',
|
||||
'#114475',
|
||||
'#3cb9d5',
|
||||
'#cc3232'
|
||||
],
|
||||
borderWidth: 5
|
||||
}]
|
||||
};
|
||||
public filters = [
|
||||
{
|
||||
value: 0,
|
||||
name: 'All',
|
||||
active: true,
|
||||
color: '#124375',
|
||||
key: 'ALL',
|
||||
disable: false
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
name: 'HR',
|
||||
active: false,
|
||||
color: '#18a169',
|
||||
key: 'HRSSA',
|
||||
disable: false
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
name: 'PO',
|
||||
active: false,
|
||||
color: '#38c9b3',
|
||||
key: 'POAPPRV',
|
||||
disable: false
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
name: 'PR',
|
||||
active: false,
|
||||
color: '#114475',
|
||||
key: 'REQAPPRV',
|
||||
disable: false
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
name: 'MR',
|
||||
active: false,
|
||||
color: '#3cb9d5',
|
||||
key: 'INVMOA',
|
||||
disable: false
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
name: 'ITG',
|
||||
active: false,
|
||||
color: '#cc3232',
|
||||
key: 'ITG',
|
||||
disable: false
|
||||
}
|
||||
];
|
||||
public slideOptsOne = {
|
||||
slidesPerView: 4.3,
|
||||
spaceBetween: 10
|
||||
};
|
||||
constructor(
|
||||
public common: CommonService,
|
||||
public ts: TranslatorService,
|
||||
public WorklistService: WorklistService,
|
||||
public workListService: WorklistMainService,
|
||||
) {
|
||||
this.WorkListObj = new WorkListRequest();
|
||||
this.WorkListObj.P_NOTIFICATION_TYPE = "1";
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = "";
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = "";
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = "";
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
|
||||
this.WorkListObj.P_PAGE_NUM = 0;
|
||||
this.WorkListObj.P_PAGE_LIMIT = 50; //number
|
||||
public common: CommonService,
|
||||
public ts: TranslatorService,
|
||||
public WorklistService: WorklistService,
|
||||
public workListService: WorklistMainService,
|
||||
public modalController: ModalController
|
||||
) {
|
||||
this.WorkListObj = new WorkListRequest();
|
||||
this.WorkListObj.P_NOTIFICATION_TYPE = '1';
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = '';
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = '';
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = '';
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
|
||||
this.WorkListObj.P_PAGE_NUM = 0;
|
||||
this.WorkListObj.P_PAGE_LIMIT = 50;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.direction = TranslatorService.getCurrentDirection();
|
||||
}
|
||||
ionViewDidLoad() {
|
||||
// this.navBar.backButtonClick = () => {
|
||||
// // you can set a full custom history here if you want
|
||||
// let pages = [
|
||||
// {
|
||||
// page: "HomePage"
|
||||
// }
|
||||
// ];
|
||||
// this.navCtrl.setPages(pages);
|
||||
// };
|
||||
}
|
||||
|
||||
ionViewWillEnter() {
|
||||
// this.direction = TranslatorService.getCurrentDirection();
|
||||
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
|
||||
this.Details();
|
||||
this.Count();
|
||||
this.assignDataToFilters();
|
||||
this.getAllPushNotificationFun();
|
||||
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
|
||||
}
|
||||
getValueSelected(Value) {
|
||||
this.selectedValue = Value.detail.value;
|
||||
if (this.selectedValue == "1") {
|
||||
this.HideDateInput = false;
|
||||
this.HideTextInput = true;
|
||||
} else if (this.selectedValue == "2") {
|
||||
this.HideDateInput = false;
|
||||
this.HideTextInput = true;
|
||||
} else if (this.selectedValue == "3") {
|
||||
this.HideDateInput = true;
|
||||
this.HideTextInput = false;
|
||||
} else if (this.selectedValue == "4") {
|
||||
this.HideDateInput = false;
|
||||
this.HideTextInput = true;
|
||||
} else if (this.selectedValue == "5") {
|
||||
this.HideDateInput = false;
|
||||
this.HideTextInput = false;
|
||||
|
||||
assignDataToFilters() {
|
||||
this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER;
|
||||
const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList;
|
||||
for (const notification of openNotificationsArray) {
|
||||
if (notification.ITEM_TYPE === 'HRSSA') {
|
||||
this.filters[1].value = notification.OPEN_NTF_NUMBER;
|
||||
this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER;
|
||||
} else if (notification.ITEM_TYPE === 'POAPPRV') {
|
||||
this.filters[2].value = notification.OPEN_NTF_NUMBER;
|
||||
this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER;
|
||||
} else if (notification.ITEM_TYPE === 'REQAPPRV') {
|
||||
this.filters[3].value = notification.OPEN_NTF_NUMBER;
|
||||
this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER;
|
||||
} else if (notification.ITEM_TYPE === 'INVMOA') {
|
||||
this.filters[4].value = notification.OPEN_NTF_NUMBER;
|
||||
this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
|
||||
} else if (notification.ITEM_TYPE === 'ITG') {
|
||||
this.filters[5].value = notification.OPEN_NTF_NUMBER;
|
||||
this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getAllPushNotificationFun() {
|
||||
this.WorkListObj.P_PAGE_NUM = 1;
|
||||
this.IsReachEnd = false;
|
||||
|
||||
if (this.selectedValue == "1") {
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = this.inputSearch;
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = "";
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = "";
|
||||
} else if (this.selectedValue == "2") {
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = "";
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = "";
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = this.inputSearch;
|
||||
} else if (this.selectedValue == "3") {
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = "";
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
|
||||
if (this.InputDate)
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = moment(this.InputDate).format(
|
||||
"DD-MMM-YYYY"
|
||||
);
|
||||
else this.WorkListObj.P_SEARCH_SENT_DATE = "";
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = "";
|
||||
} else if (this.selectedValue == "4") {
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = "";
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.inputSearch;
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = "";
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = "";
|
||||
} else if (this.selectedValue == "5") {
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = "";
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = "";
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = "";
|
||||
}
|
||||
|
||||
this.WorklistService.getWorkList(this.WorkListObj).subscribe(
|
||||
(result: WorKListResponse) => {
|
||||
this.handleWorkListResult(result);
|
||||
activeFilter(index: number) {
|
||||
if (this.currentActiveIndex !== index) {
|
||||
this.showFormattedData = {};
|
||||
this.previousActiveIndex = this.currentActiveIndex;
|
||||
this.currentActiveIndex = index;
|
||||
this.filters[this.previousActiveIndex].active = false;
|
||||
this.filters[this.currentActiveIndex].active = true;
|
||||
if (this.filters[this.currentActiveIndex].value !== 0) {
|
||||
const selectedKey = this.filters[this.currentActiveIndex].key;
|
||||
this.resetData();
|
||||
this.itemType = (selectedKey !== 'ITG' && selectedKey !== 'ALL') ? this.filters[this.currentActiveIndex].key : '';
|
||||
this.getAllPushNotificationFun();
|
||||
}
|
||||
);
|
||||
} //End getNotifications
|
||||
this.selectedFilter = this.filters[this.currentActiveIndex].key;
|
||||
}
|
||||
}
|
||||
|
||||
private handleWorkListResult(result) {
|
||||
if (this.common.validResponse(result)) {
|
||||
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||
if (this.common.hasData(result.GetWorkList)) {
|
||||
this.WorkListObj.P_PAGE_NUM++;
|
||||
this.WorkListResObj = result.GetWorkList;
|
||||
this.filteredNotificationList = this.WorkListResObj;
|
||||
this.common.sharedService.setSharedData(this.WorkListResObj, HomeComponent.NOTIFICATION_ARR);
|
||||
let lastItemIndex = this.WorkListResObj.length - 1;
|
||||
if (result.GetWorkList[lastItemIndex]) {
|
||||
let lastitem = result.GetWorkList[lastItemIndex];
|
||||
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
|
||||
this.IsReachEnd = true;
|
||||
} else {
|
||||
this.IsReachEnd = false;
|
||||
}
|
||||
// this.navCtrl.push('SmsAuthenticatePage');
|
||||
}
|
||||
openProfilePage() {
|
||||
this.common.openProfile();
|
||||
}
|
||||
|
||||
disableFilters() {
|
||||
for (const filter of this.filters) {
|
||||
if (filter.key === this.itemType) {
|
||||
filter.disable = false;
|
||||
filter.active = true;
|
||||
this.selectedFilter = filter.name;
|
||||
} else if (this.itemType === '') {
|
||||
filter.disable = false;
|
||||
filter.active = false;
|
||||
} else {
|
||||
this.WorkListResObj = [];
|
||||
filter.disable = true;
|
||||
filter.active = false;
|
||||
}
|
||||
}
|
||||
if (this.itemType === '') {
|
||||
this.filters[0].active = true;
|
||||
}
|
||||
}
|
||||
|
||||
openNotificationDetail(obj) {
|
||||
console.log(obj);
|
||||
this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
|
||||
//this.common.openWorklistMainPage();
|
||||
if(obj.REQUEST_TYPE == "PR"){
|
||||
this.common.openWorklistMainPRPage();
|
||||
}
|
||||
else if(obj.REQUEST_TYPE == "PO"){
|
||||
this.common.openWorklistMainPOPage();
|
||||
}
|
||||
else if(obj.REQUEST_TYPE == "MO"){
|
||||
this.common.openWorklistMainMRPage();
|
||||
async openSearchModal() {
|
||||
const modal = await this.modalController.create({
|
||||
component: WorklistAdvancedSearchComponent,
|
||||
cssClass: 'advanced-search-modal',
|
||||
backdropDismiss: false,
|
||||
componentProps: {}
|
||||
});
|
||||
modal.onDidDismiss().then(result => {
|
||||
if (result.data) {
|
||||
if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
|
||||
this.showSearchButton = true;
|
||||
this.itemType = result.data.itemType;
|
||||
this.notificationType = result.data.notificationType;
|
||||
this.selectedValue = result.data.selectedValue;
|
||||
this.inputDate = result.data.inputDate;
|
||||
this.inputSearch = result.data.inputSearch;
|
||||
this.WorkListObj.P_PAGE_NUM = 1;
|
||||
this.newWorkListResponse = [];
|
||||
this.showFormattedData = {};
|
||||
this.selectedFilter = 'ALL';
|
||||
this.filters[this.currentActiveIndex].active = false;
|
||||
this.currentActiveIndex = 0;
|
||||
this.previousActiveIndex = 0;
|
||||
this.filters[this.currentActiveIndex].active = true;
|
||||
if (this.itemType !== '') {
|
||||
this.disableFilters();
|
||||
}
|
||||
this.getAllPushNotificationFun();
|
||||
}
|
||||
}
|
||||
|
||||
else{
|
||||
this.common.openWorklistMainPage();
|
||||
|
||||
}
|
||||
|
||||
//this.navCtrl.push("WorkListMainPage", { passNotificationList: obj });
|
||||
}
|
||||
onChangeView(selectedValue: any) {
|
||||
this.WorkListObj.P_NOTIFICATION_TYPE = selectedValue.detail.value;
|
||||
});
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
//this.pageNum= this.pageNum + 1;
|
||||
getAllPushNotificationFun() {
|
||||
this.WorkListObj.P_PAGE_NUM = 1;
|
||||
this.isReachEnd = false;
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : '';
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
|
||||
? moment(this.inputDate).format('DD-MMM-YYYY') : '';
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; ;
|
||||
this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : '';
|
||||
this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1';
|
||||
if (this.selectedValue === '5') {
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = '';
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = '';
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = '';
|
||||
}
|
||||
|
||||
if (!this.IsReachEnd) {
|
||||
this.WorklistService.getWorkList(this.WorkListObj).subscribe(
|
||||
(result: any) => {
|
||||
if (this.common.validResponse(result)) {
|
||||
this.WorkListObj.P_PAGE_NUM++;
|
||||
if (this.common.hasData(result.GetWorkList)) {
|
||||
result.GetWorkList.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++;
|
||||
this.infiniteScroll.complete();
|
||||
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
|
||||
if (this.common.validResponse(result)) {
|
||||
this.handleWorkListResult(result.GetWorkList);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
if (this.infiniteScroll) this.infiniteScroll.complete();
|
||||
}
|
||||
} //end infiniteScroll
|
||||
|
||||
Count() {
|
||||
this.workListService.getITGCount()
|
||||
.subscribe((result: any) => {
|
||||
console.log("ENAD ITG COUNT:")
|
||||
console.log(result);
|
||||
});
|
||||
}
|
||||
|
||||
filterNotificationByRequestType(reqType) {
|
||||
let filterdType = [];
|
||||
if (reqType == "All") {
|
||||
this.filteredNotificationList = this.WorkListResObj;
|
||||
if (this.filteredNotificationList == [] || this.filteredNotificationList == null || this.filteredNotificationList == "") {
|
||||
this.noData = true;
|
||||
return false;
|
||||
} else {
|
||||
this.noData = false;
|
||||
return false;
|
||||
categorizeData(arrayToCategorize: any) {
|
||||
const datePipe = new DatePipe('en-US');
|
||||
const formattedData = {};
|
||||
for (const workList of arrayToCategorize) {
|
||||
workList.FORMATTED_DATE = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y');
|
||||
if (!(workList.FORMATTED_DATE in formattedData)) {
|
||||
formattedData[workList.FORMATTED_DATE] = new Array();
|
||||
formattedData[workList.FORMATTED_DATE].push(workList);
|
||||
} else {
|
||||
formattedData[workList.FORMATTED_DATE].push(workList);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.WorkListResObj.length; i++) {
|
||||
if(reqType=="HR"){
|
||||
if ("EIT" == this.WorkListResObj[i].REQUEST_TYPE || "ABSENCE" == this.WorkListResObj[i].REQUEST_TYPE) {
|
||||
filterdType.push(this.WorkListResObj[i]);
|
||||
return formattedData;
|
||||
}
|
||||
|
||||
sortArray(arrayToSort: any) {
|
||||
return arrayToSort.sort((a: any, b: any) =>
|
||||
new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime()
|
||||
);
|
||||
}
|
||||
|
||||
private handleWorkListResult(result: any) {
|
||||
const lastItemIndex = result.length - 1;
|
||||
const lastitem = result[lastItemIndex];
|
||||
if (lastitem) {
|
||||
if (lastitem.NO_OF_ROWS === lastitem.ROW_NUM) {
|
||||
this.isReachEnd = true;
|
||||
if (this.infiniteScroll) {
|
||||
this.infiniteScroll.complete();
|
||||
}
|
||||
}else{
|
||||
if (reqType == this.WorkListResObj[i].REQUEST_TYPE) {
|
||||
filterdType.push(this.WorkListResObj[i]);
|
||||
} else {
|
||||
this.isReachEnd = false;
|
||||
if (this.infiniteScroll) {
|
||||
this.infiniteScroll.complete();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.filteredNotificationList = filterdType;
|
||||
if (this.filteredNotificationList == [] || this.filteredNotificationList == null || this.filteredNotificationList == "") {
|
||||
this.noData = true;
|
||||
return false;
|
||||
if (this.common.hasData(result)) {
|
||||
this.WorkListObj.P_PAGE_NUM++;
|
||||
if (this.newWorkListResponse.length === 0) {
|
||||
this.newWorkListResponse = result;
|
||||
} else {
|
||||
this.newWorkListResponse = this.newWorkListResponse.concat(result);
|
||||
}
|
||||
this.newWorkListResponse = this.sortArray(this.newWorkListResponse);
|
||||
console.log(this.newWorkListResponse);
|
||||
this.showFormattedData = this.categorizeData(this.newWorkListResponse);
|
||||
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
|
||||
} else {
|
||||
this.noData = false;
|
||||
return false;
|
||||
this.newWorkListResponse = [];
|
||||
}
|
||||
}
|
||||
|
||||
Details() {
|
||||
this.workListService.getITGDetails()
|
||||
.subscribe((result: any) => {
|
||||
console.log("ENAD ITG Details:")
|
||||
console.log(result);
|
||||
});
|
||||
openNotificationDetail(obj) {
|
||||
this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA);
|
||||
if (obj.REQUEST_TYPE === 'PR') {
|
||||
this.common.openWorklistMainPRPage();
|
||||
} else if (obj[0].REQUEST_TYPE === 'PO') {
|
||||
this.common.openWorklistMainPOPage();
|
||||
} else if (obj[0].REQUEST_TYPE === 'MO') {
|
||||
this.common.openWorklistMainMRPage();
|
||||
} else {
|
||||
this.common.openWorklistMainPage();
|
||||
}
|
||||
}
|
||||
|
||||
isEmptyObject() {
|
||||
return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0) || this.ITGItem.length > 0);
|
||||
}
|
||||
|
||||
AllNotification() {
|
||||
this.filterNotificationByRequestType("All");
|
||||
this.isAll = true;
|
||||
this.isPR = false;
|
||||
this.isPO = false;
|
||||
this.isMR = false;
|
||||
this.isHR = false;
|
||||
this.isITG = false;
|
||||
resetData() {
|
||||
if (this.infiniteScroll) {
|
||||
this.infiniteScroll.complete();
|
||||
}
|
||||
this.showSearchButton = false;
|
||||
this.notificationType = '1';
|
||||
this.selectedValue = '';
|
||||
this.inputDate = '';
|
||||
this.inputSearch = '';
|
||||
this.newWorkListResponse = [];
|
||||
this.showFormattedData = {};
|
||||
this.WorkListObj.P_SEARCH_FROM_USER = '';
|
||||
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
|
||||
this.WorkListObj.P_SEARCH_SENT_DATE = '';
|
||||
this.WorkListObj.P_SEARCH_SUBJECT = '';
|
||||
}
|
||||
PRNotification() {
|
||||
this.filterNotificationByRequestType("PR");
|
||||
this.isAll = false;
|
||||
this.isPR = true;
|
||||
this.isPO = false;
|
||||
this.isMR = false;
|
||||
this.isHR = false;
|
||||
this.isITG = false;
|
||||
|
||||
clearSearch() {
|
||||
this.itemType = '';
|
||||
this.selectedFilter = 'ALL';
|
||||
this.disableFilters();
|
||||
this.resetData();
|
||||
this.getAllPushNotificationFun();
|
||||
}
|
||||
PONotification() {
|
||||
this.filterNotificationByRequestType("PO");
|
||||
this.isAll = false;
|
||||
this.isPR = false;
|
||||
this.isPO = true;
|
||||
this.isMR = false;
|
||||
this.isHR = false;
|
||||
this.isITG = false;
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
|
||||
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
|
||||
if (this.common.validResponse(result)) {
|
||||
this.handleWorkListResult(result.GetWorkList);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this.infiniteScroll) {
|
||||
this.infiniteScroll.complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
MRNotification() {
|
||||
this.filterNotificationByRequestType("MO");
|
||||
this.isAll = false;
|
||||
this.isPR = false;
|
||||
this.isPO = false;
|
||||
this.isMR = true;
|
||||
this.isHR = false;
|
||||
this.isITG = false;
|
||||
|
||||
Count() {
|
||||
this.workListService.getITGCount()
|
||||
.subscribe((result: any) => {
|
||||
for (let i = 0; i < result.RequestType.length; i++) {
|
||||
this.ITGSegment[i] = {
|
||||
name: result.RequestType[i].RequestTypeName,
|
||||
code: result.RequestType[i].RequestTypeCode,
|
||||
data: result.RequestType[i].RequestDetails,
|
||||
style: false
|
||||
};
|
||||
}
|
||||
this.setActive(this.ITGSegment[0].code);
|
||||
});
|
||||
}
|
||||
HRNotification() {
|
||||
this.filterNotificationByRequestType("HR");
|
||||
this.isAll = false;
|
||||
this.isPR = false;
|
||||
this.isPO = false;
|
||||
this.isMR = false;
|
||||
this.isHR = true;
|
||||
this.isITG = false;
|
||||
|
||||
Details() {
|
||||
this.workListService.getITGDetails()
|
||||
.subscribe((result: any) => {
|
||||
this.totalRequestCount = this.totalRequestCount + result.TotalCount;
|
||||
this.filters[5].value = result.TotalCount;
|
||||
});
|
||||
}
|
||||
|
||||
ITGNotification() {
|
||||
// this.Details();
|
||||
this.isAll = false;
|
||||
this.isPR = false;
|
||||
this.isPO = false;
|
||||
this.isMR = false;
|
||||
this.isHR = false;
|
||||
this.isITG = true;
|
||||
// this.Details();
|
||||
this.isAll = false;
|
||||
this.isPR = false;
|
||||
this.isPO = false;
|
||||
this.isMR = false;
|
||||
this.isHR = false;
|
||||
this.isITG = true;
|
||||
}
|
||||
|
||||
searchBtn() {
|
||||
this.isSearch = !this.isSearch;
|
||||
this.isSearch = !this.isSearch;
|
||||
}
|
||||
|
||||
|
||||
setActive(selectedSegment) {
|
||||
this.ITGItem = [];
|
||||
let count = 0;
|
||||
this.activeSegment = selectedSegment;
|
||||
// tslint:disable-next-line: prefer-for-of
|
||||
for (let i = 0; i < this.ITGSegment.length; i++) {
|
||||
if (this.ITGSegment[i].code === selectedSegment) {
|
||||
this.ITGSegment[i].style = true;
|
||||
this.ITGItem[count] = this.ITGSegment[i].data;
|
||||
count++;
|
||||
} else {
|
||||
this.ITGSegment[i].style = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
openITG(segmentInfo) {
|
||||
this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO);
|
||||
this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME);
|
||||
this.common.sharedService.setSharedData(this.ITGItem, HomeComponent.ALL_REQUEST);
|
||||
this.common.openWorklistITGPage();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
import { Request } from 'src/app/hmg-common/services/models/request';
|
||||
|
||||
export class itgRequest extends Request {
|
||||
public RequestType: string;
|
||||
public ItemID: number;
|
||||
public TaskID: number;
|
||||
public EmployeeNumber: string;
|
||||
public Comments: string;
|
||||
public IsSubTask: boolean;
|
||||
public NewUserEMPId: string;
|
||||
public AdditionalFields?: [{}];
|
||||
}
|
||||
@ -1,18 +1,13 @@
|
||||
// import { Request } from './request';
|
||||
import { Request } from 'src/app/hmg-common/services/models/request';
|
||||
|
||||
export class WorkListRequest extends Request{
|
||||
public static SHARED_DATA = 'login-request';
|
||||
// Channel: Channel, //channel
|
||||
// LanguageID: LanguageID,//langlist
|
||||
// P_USER_NAME:userName,//string
|
||||
// P_SESSION_ID:sessionID,//number
|
||||
public P_NOTIFICATION_TYPE: string;//string
|
||||
public P_SEARCH_FROM_USER:string;//string
|
||||
public P_SEARCH_SUBJECT:string;//string
|
||||
public P_SEARCH_SENT_DATE:string;//string
|
||||
public P_SEARCH_ITEM_TYPE_DSP_NAME:string;//string
|
||||
public P_PAGE_NUM:number;//number
|
||||
public P_PAGE_LIMIT:number;//number
|
||||
|
||||
public P_NOTIFICATION_TYPE: string;
|
||||
public P_SEARCH_FROM_USER: string;
|
||||
public P_SEARCH_SUBJECT: string;
|
||||
public P_SEARCH_SENT_DATE: string;
|
||||
public P_SEARCH_ITEM_TYPE_DSP_NAME: string;
|
||||
public P_PAGE_NUM: number;
|
||||
public P_PAGE_LIMIT: number;
|
||||
public P_ITEM_TYPE : string;
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
<ion-content padding>
|
||||
|
||||
<!--
|
||||
<ion-col col-1
|
||||
style="margin-right: -22px;margin-top: -10px;">
|
||||
<ion-button class="closeIcon" (click)="closeModal()">
|
||||
<img src="../assets/imgs/close.png">
|
||||
|
||||
</ion-button>
|
||||
</ion-col> -->
|
||||
|
||||
|
||||
<ion-list>
|
||||
<ion-radio-group>
|
||||
<ion-list-header style="margin-bottom: 22px !important;">
|
||||
<p class="Header">More Action</p>
|
||||
</ion-list-header>
|
||||
<div *ngFor="let button of actionBtns ">
|
||||
|
||||
<ion-item *ngIf="button.BUTTON_ACTION !='APPROVED' && button.BUTTON_ACTION !='REJECTED' && button.BUTTON_ACTION !='REQUEST_INFO' " >
|
||||
<ion-label class="labelRadio"> {{button.BUTTON_LABEL}}</ion-label>
|
||||
<ion-radio color="secondary" mode="md" value="{{button.BUTTON_ACTION}}" (ionSelect)="radioSelect(button)"></ion-radio>
|
||||
|
||||
<!-- </div> -->
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-radio-group>
|
||||
|
||||
</ion-list>
|
||||
|
||||
|
||||
<ion-footer>
|
||||
<ion-row class="rowBtn">
|
||||
<ion-button style="width:200px !important" class="confirmBtn" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
|
||||
</ion-button>
|
||||
</ion-row>
|
||||
|
||||
<ion-row class="rowBtn">
|
||||
<ion-button style="width:200px !important" class="cancelBtn" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
|
||||
</ion-button>
|
||||
|
||||
</ion-row>
|
||||
</ion-footer>
|
||||
</ion-content>
|
||||
@ -0,0 +1,22 @@
|
||||
.rowBtn{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.Header{
|
||||
color: black !important;
|
||||
font-size: 16px !important;
|
||||
font-weight: bold !important;;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-58px, 2px);
|
||||
}
|
||||
|
||||
.labelRadio{
|
||||
color: black !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MoreActionModalComponent } from './more-action-modal.component';
|
||||
|
||||
describe('MoreActionModalComponent', () => {
|
||||
let component: MoreActionModalComponent;
|
||||
let fixture: ComponentFixture<MoreActionModalComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MoreActionModalComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MoreActionModalComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,44 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-more-action-modal',
|
||||
templateUrl: './more-action-modal.component.html',
|
||||
styleUrls: ['./more-action-modal.component.scss'],
|
||||
})
|
||||
export class MoreActionModalComponent implements OnInit {
|
||||
actionBtns :any =[];
|
||||
radioButtonValue: any;
|
||||
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){}
|
||||
|
||||
ngOnInit() {
|
||||
console.log("modal");
|
||||
this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
|
||||
console.log("modal");
|
||||
|
||||
}
|
||||
closeModal() {
|
||||
this.modalCtrl.dismiss();
|
||||
}
|
||||
|
||||
radioSelect(v) {
|
||||
this.radioButtonValue = v;
|
||||
console.log("radio selected"+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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,151 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
|
||||
<ion-buttons slot="start">
|
||||
<nav-buttons backLink="/notification/homepage"></nav-buttons>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="colorBG">
|
||||
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChangedClick($event)"
|
||||
[value]="defaultSegment" class="ion-segment-all">
|
||||
|
||||
<ion-segment-button value="{{segmentVal.name}}"
|
||||
[ngClass]="activeSegment == segmentVal.name ? 'active-Segment' : 'normal-Segment'"
|
||||
*ngFor="let segmentVal of segmentsArray">
|
||||
{{segmentVal.name}}
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
<ion-card class="cardContent" *ngFor='let segmentContant of segmentData'>
|
||||
<ion-card-content *ngIf='activeSegment === segmentContant.name'>
|
||||
<ion-grid style="text-align: left" *ngFor='let dataContant of segmentContant.data'>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<label class="colItemReq"> {{dataContant.Title}}</label>
|
||||
<br />
|
||||
<label>{{dataContant.Value}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row *ngIf='dataContant.TableValue'>
|
||||
<ion-col style="border: 1px solid gainsboro; border-radius: 15px; padding-left: 20px;">
|
||||
<label class="colItemReq" *ngFor="let header of dataContant.TableValue.Header"><br /> {{header}}</label>
|
||||
<br />
|
||||
<label *ngFor="let rows of dataContant.TableValue.Rows"><br />{{rows}}</label>
|
||||
<label *ngIf="dataContant.TableValue.Rows"><br />none</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<!-- if there is additional screen like in VIDA -->
|
||||
<!-- <ng-container>
|
||||
<ion-card class="cardContent" *ngFor='let segmentContant of segmentDataTable'>
|
||||
<ion-card-content *ngIf='activeSegment === segmentContant.name'>
|
||||
<ion-grid style="text-align: left" *ngFor='let dataContant of segmentContant.data'>
|
||||
<ion-row *ngFor="let headerData of dataContant.Header">
|
||||
<ion-col>
|
||||
<label class="colItemReq"> {{headerData}}</label>
|
||||
<br />
|
||||
<label>{{headerData}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</ng-container> -->
|
||||
|
||||
<!-- END -->
|
||||
|
||||
<ion-card class="cardContent" *ngIf='activeSegment === "Approval Level"'>
|
||||
<ion-card-content>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-list class="notification-list" style="margin-left: -30px;" *ngFor="let approvalInfo of workList">
|
||||
<div class="timeline">
|
||||
<ion-item>
|
||||
<div class="timeline-item" slot="start">
|
||||
<div>
|
||||
|
||||
<button ion-button style=" background: none;width: 60%;">
|
||||
<img src="../assets/imgs/noteSmall.png">
|
||||
</button>
|
||||
<div
|
||||
[ngClass]="{'bg-blue-dot' : approvalInfo.Action === 'Submit', 'bg-green-dot':approvalInfo.Action === 'Approved', 'bg-red-dot':approvalInfo.Action === 'Rejected', 'bg-gray-dot':approvalInfo.Action === 'Pending', 'bg-gray-dot':approvalInfo.Action === ''}"
|
||||
class="timeline-thumb timeline-icon">
|
||||
</div>
|
||||
<p style="margin-left: -20%; font-size: 12px !important;">{{approvalInfo.Action}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p style="margin-left: 10%;">{{approvalInfo.Name}}</p>
|
||||
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-list>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
<ion-card class="cardContent">
|
||||
<ion-card-content>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-label>
|
||||
<h2 class="boldTxtNav">Comment</h2>
|
||||
</ion-label>
|
||||
<ion-input type='text' [(ngModel)]='commentText'></ion-input>
|
||||
|
||||
<ion-item *ngFor="let object of grantInfo">
|
||||
<ion-label>{{object.Label}}</ion-label>
|
||||
<ion-select *ngIf="!object.ConditionalFieldName" [(ngModel)]='ExchangeServerSelected'
|
||||
(ionChange)="filterGrantDB(ExchangeServerSelected,object, object.FieldName)" id='{{object.FieldName}}'>
|
||||
<ion-select-option value="{{value}}" *ngFor="let value of object.Value">
|
||||
{{value}}</ion-select-option>
|
||||
</ion-select>
|
||||
<ion-select *ngIf="object.ConditionalFieldName" [(ngModel)]='ExchangeServerDBSelected'
|
||||
(ionChange)="filterGrantDB(ExchangeServerDBSelected,object)" id='{{object.FieldName}}'>
|
||||
<ion-select-option value="{{value}}" *ngFor="let value of filteredGrantFieldsConditionalValue">
|
||||
{{value}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</ion-content>
|
||||
|
||||
|
||||
<ion-footer class="footerSearchBtn">
|
||||
|
||||
|
||||
<ion-tabs>
|
||||
<ion-tab-bar class="tabBar" slot="bottom">
|
||||
|
||||
<!-- <ion-tab-button *ngFor='let action of actionBTN' [hidden]="action.isAvailable" > -->
|
||||
<ion-tab-button *ngFor='let action of actionBTN' [hidden]='!action.isAvailable'
|
||||
(click)="selectAtion(action.name)">
|
||||
|
||||
<img [src]="action.image">
|
||||
<ion-label style="font-size: 12px;">{{action.name}}</ion-label>
|
||||
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button (click)="skip()">
|
||||
<img src="../assets/imgs/action-skip.png">
|
||||
<ion-label style="font-size: 12px;">Skip</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
</ion-tab-bar>
|
||||
|
||||
</ion-tabs>
|
||||
|
||||
|
||||
|
||||
</ion-footer>
|
||||
@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
.timeline-thumb {
|
||||
height: 30px !important;
|
||||
left: 54px !important;
|
||||
}
|
||||
|
||||
.timeline-icon{
|
||||
width: 30px !important;
|
||||
}
|
||||
.timeline:before{
|
||||
position: fixed !important;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListMainItgComponent } from './work-list-main-itg.component';
|
||||
|
||||
describe('WorkListMainItgComponent', () => {
|
||||
let component: WorkListMainItgComponent;
|
||||
let fixture: ComponentFixture<WorkListMainItgComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListMainItgComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListMainItgComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,342 @@
|
||||
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 { HomeComponent } from '../home/home.component';
|
||||
import { WorklistMainService } from '../service/work-list.main.service';
|
||||
import { itgRequest } from '../models/itgFormDetailsRequest';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
|
||||
import { WorkListReplacementItgComponent } from '../work-list-replacement-itg/work-list-replacement-itg.component';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-main-itg',
|
||||
templateUrl: './work-list-main-itg.component.html',
|
||||
styleUrls: ['./work-list-main-itg.component.scss'],
|
||||
})
|
||||
export class WorkListMainItgComponent implements OnInit {
|
||||
|
||||
public static APPROVAL = "Services/COCWS.svc/REST/ITGApproveRequest"
|
||||
public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest'
|
||||
public static DELEGATE = 'Services/COCWS.svc/REST/ITGDelegateRequest';
|
||||
public static REQUEST_INFORMATION = 'Services/COCWS.svc/REST/ITGRequestInformation';
|
||||
public static ANSWER = 'Services/COCWS.svc/REST/ITGAnswer';
|
||||
public static GRANT = 'Services/COCWS.svc/REST/ITGGrantAccess';
|
||||
|
||||
public request_info: any;
|
||||
public request_name: any;
|
||||
public all_request: any;
|
||||
public request = new itgRequest();
|
||||
public activeSegment: any = "info";
|
||||
public request_details: any;
|
||||
public segmentsArray: { name: string, number: number }[] = [];
|
||||
public segmentData: { name: string, data: any }[] = [];
|
||||
public header: any = [];
|
||||
public rows: any = [];
|
||||
public workList: any;
|
||||
public commentText: string;
|
||||
public replcamentID: string;
|
||||
public actionSelected: any;
|
||||
public options: any;
|
||||
public index: number = 0;
|
||||
public grantDATA: any;
|
||||
public grantInfo: any;
|
||||
public grantFieldsConditionalValue: any = [];
|
||||
public filteredGrantFieldsConditionalValue: any = [];
|
||||
public grantFieldsLabel: any = [];
|
||||
public grantFieldsValue: any = [];
|
||||
public grantRequest: any = [];
|
||||
public ExchangeServerSelected: any;
|
||||
public ExchangeServerDBSelected: any;
|
||||
public actionBTN: { name: string, image: string, isAvailable: boolean }[] = [];
|
||||
constructor(
|
||||
public common: CommonService,
|
||||
public ts: TranslatorService,
|
||||
public workListService: WorklistMainService,
|
||||
public modalCtrl: ModalController) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.request_info = this.common.sharedService.getSharedData(HomeComponent.REQUSET_INFO);
|
||||
this.request_name = this.common.sharedService.getSharedData(HomeComponent.REQUSET_NAME);
|
||||
this.all_request = this.common.sharedService.getSharedData(HomeComponent.ALL_REQUEST);
|
||||
this.all_request = this.all_request[0];
|
||||
this.changeITGForm(this.request_info, this.request_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
changeITGForm(data, requestName) {
|
||||
this.request_info = data;
|
||||
this.request_name = requestName;
|
||||
this.request.RequestType = this.request_name;
|
||||
this.request.ItemID = this.request_info.ItemID;
|
||||
this.request.TaskID = this.request_info.ID;
|
||||
this.request.Comments = this.request_info.Comments;
|
||||
this.request.NewUserEMPId = this.request_info.NewUserEMPId;
|
||||
this.workListService.getITGFormDetails(this.request).subscribe((result: any) => {
|
||||
this.request_details = result.ITGRequest;
|
||||
this.grantInfo = result.ITGRequest.GrantFields;
|
||||
let count = 0;
|
||||
for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) {
|
||||
this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i };
|
||||
this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields}
|
||||
}
|
||||
this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length }
|
||||
this.workList = this.request_details.WFHistory;
|
||||
this.options = this.request_details.AllowedActions;
|
||||
this.activeSegment = this.segmentsArray[0].name;
|
||||
for (let i = 0; i < this.options.length; i++) {
|
||||
this.imageURL(this.options[i].Action);
|
||||
this.actionBTN[i] = { name: this.options[i].Action, image: this.imageURL(this.options[i].Action), isAvailable: this.options[i].IsAvailable }
|
||||
}
|
||||
|
||||
if (this.grantInfo) {
|
||||
let count = 0;
|
||||
this.grantFieldsConditionalValue = [];
|
||||
for (let i = 0; i < this.grantInfo.length; i++) {
|
||||
if (this.grantInfo[i].Value) {
|
||||
for (let j = 0; j < this.grantInfo[i].Value.length; j++) {
|
||||
this.grantFieldsValue[j] = this.grantInfo[i].Value[j];
|
||||
}
|
||||
}
|
||||
if (this.grantInfo[i].ConditionalValue) {
|
||||
for (let j = 0; j < this.grantInfo[i].ConditionalValue.length; j++) {
|
||||
this.grantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j];
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//result.ITGRequest.FieldGoups.Fields
|
||||
});
|
||||
}
|
||||
|
||||
imageURL(actionName) {
|
||||
if (actionName == "Approve") {
|
||||
return "../assets/imgs/action-approve.png"
|
||||
}
|
||||
if (actionName == "Reject") {
|
||||
return "../assets/imgs/action-reject.png"
|
||||
}
|
||||
if (actionName == "RequestInformation") {
|
||||
return "../assets/imgs/action-info.png"
|
||||
}
|
||||
if (actionName == "Grant") {
|
||||
return "../assets/imgs/action-info.png"
|
||||
}
|
||||
if (actionName == "Delegate") {
|
||||
return "../assets/imgs/action-info.png"
|
||||
}
|
||||
}
|
||||
|
||||
public segmentChangedClick(event: any) {
|
||||
this.activeSegment = event.detail.value;
|
||||
}
|
||||
|
||||
skip() {
|
||||
for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request
|
||||
if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found.
|
||||
this.index = i + 1;
|
||||
if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request.
|
||||
this.clearDataArray();
|
||||
this.changeITGForm(this.all_request[this.index], this.request_name);
|
||||
break;
|
||||
} else {
|
||||
this.common.openNotificationPage();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
this.common.openNotificationPage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clearDataArray() {
|
||||
this.commentText = '';
|
||||
this.actionSelected = '';
|
||||
this.segmentsArray = [];
|
||||
this.segmentData = [];
|
||||
this.workList = [];
|
||||
this.actionBTN = [];
|
||||
}
|
||||
|
||||
|
||||
|
||||
actionService(action, comments?, grantRequests?) {
|
||||
let url: string;
|
||||
let request = new itgRequest();
|
||||
request.RequestType = this.request_name;
|
||||
request.ItemID = this.request_info.ItemID;
|
||||
request.TaskID = this.request_info.ID;
|
||||
request.Comments = this.commentText;
|
||||
request.Comments = this.request_info.Comments;
|
||||
request.EmployeeNumber = this.request_info.EmployeeNumber;
|
||||
request.NewUserEMPId = this.replcamentID;
|
||||
this.common.confirmAlertDialogAction(
|
||||
() => {
|
||||
if (action == 1) { //approved
|
||||
url = WorkListMainItgComponent.APPROVAL;
|
||||
this.workListService.getITGActionRequest(request, url)
|
||||
.subscribe((result: any) => {
|
||||
// this.common.openNotificationPage();
|
||||
this.skip();
|
||||
});
|
||||
} else if (action == 2) {//reject
|
||||
url = WorkListMainItgComponent.REJECT;
|
||||
this.workListService.getITGActionRequest(request, url)
|
||||
.subscribe((result: any) => {
|
||||
// this.common.openNotificationPage();
|
||||
this.skip();
|
||||
});
|
||||
} else if (action == 3) {//request more info
|
||||
request.NewUserEMPId = this.replcamentID;
|
||||
url = WorkListMainItgComponent.REQUEST_INFORMATION;
|
||||
if (!comments) {
|
||||
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
|
||||
} else {
|
||||
this.workListService.getITGActionRequest(request, url)
|
||||
.subscribe((result: any) => {
|
||||
// this.common.openNotificationPage();
|
||||
this.skip();
|
||||
});
|
||||
}
|
||||
} else if (action == 4) {//delegate
|
||||
request.NewUserEMPId = this.replcamentID;
|
||||
url = WorkListMainItgComponent.DELEGATE;
|
||||
this.workListService.getITGActionRequest(request, url)
|
||||
.subscribe((result: any) => {
|
||||
// this.common.openNotificationPage();
|
||||
this.skip();
|
||||
});
|
||||
} else if (action == 5) { //answer
|
||||
url = WorkListMainItgComponent.ANSWER;
|
||||
if (!comments) {
|
||||
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
|
||||
} else {
|
||||
this.workListService.getITGActionRequest(request, url)
|
||||
.subscribe((result: any) => {
|
||||
// this.common.openNotificationPage();
|
||||
this.skip();
|
||||
});
|
||||
}
|
||||
} else if (action == 6) { //grant
|
||||
url = WorkListMainItgComponent.GRANT;
|
||||
if (!comments) {
|
||||
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
|
||||
}
|
||||
else {
|
||||
if (this.grantRequest) {
|
||||
request.AdditionalFields = this.grantRequest;
|
||||
this.workListService.getITGActionRequest(request, url)
|
||||
.subscribe((result: any) => {
|
||||
// this.common.openNotificationPage();
|
||||
this.skip();
|
||||
});
|
||||
} else {
|
||||
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}, this.ts.trPK('general', 'ok'),
|
||||
() => { this.actionSelected = '' }, this.ts.trPK('general', 'cancel'),
|
||||
this.ts.trPK('vacation-rule', 'confirmation'),
|
||||
this.confirmMsg(action));
|
||||
|
||||
|
||||
}
|
||||
|
||||
confirmMsg(action) {
|
||||
if (action === 1) {
|
||||
return this.ts.trPK('worklist', 'approveMsg');
|
||||
}
|
||||
if (action === 2) {
|
||||
return this.ts.trPK('worklist', 'rejectMsg');
|
||||
}
|
||||
if (action === 3) {
|
||||
return this.ts.trPK('worklist', 'requestInformationMsg');
|
||||
}
|
||||
if (action === 4) {
|
||||
return this.ts.trPK('worklist', 'delegateMsg');
|
||||
}
|
||||
if (action === 5) {
|
||||
return this.ts.trPK('worklist', 'answerMsg');
|
||||
}
|
||||
if (action === 6) {
|
||||
return this.ts.trPK('worklist', 'grantMsg');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
selectAtion(actionSelected) {
|
||||
this.actionSelected = actionSelected;
|
||||
if (this.actionSelected == "Answer") {
|
||||
this.actionService(5, this.commentText)
|
||||
}
|
||||
if (this.actionSelected == "Approve") {
|
||||
this.actionService(1, this.commentText);
|
||||
}
|
||||
if (this.actionSelected == "Delegate") {
|
||||
// this.actionService(4, this.commentText)
|
||||
// this.common.openWorklistRollReplacement();
|
||||
this.presentModal(4);
|
||||
}
|
||||
if (this.actionSelected === 'Doable') {
|
||||
}
|
||||
if (this.actionSelected === 'Grant') {
|
||||
this.actionService(6, this.commentText, this.grantRequest);
|
||||
}
|
||||
if (this.actionSelected === 'NotDoable') {
|
||||
}
|
||||
if (this.actionSelected === 'Question') {
|
||||
}
|
||||
if (this.actionSelected === 'Reject') {
|
||||
this.actionService(2, this.commentText);
|
||||
}
|
||||
if (this.actionSelected === 'RequestInformation') {
|
||||
this.presentModal(3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
async presentModal(actionNumber) {
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: WorkListReplacementItgComponent,
|
||||
backdropDismiss: false,
|
||||
});
|
||||
modal.cssClass = 'replaceRoll-modal';
|
||||
modal.onDidDismiss()
|
||||
.then((data) => {
|
||||
this.replcamentID = data.data.empData.USER_NAME;
|
||||
|
||||
if (actionNumber == 3) {
|
||||
this.actionService(3, this.commentText);
|
||||
} else if (actionNumber == 4) {
|
||||
this.actionService(4);
|
||||
}
|
||||
|
||||
});
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
filterGrantDB(valueSelected, object, selectedOption?) {
|
||||
let count = 0;
|
||||
this.filteredGrantFieldsConditionalValue = [];
|
||||
this.grantRequest.push({ Key: object.FieldName, Value: valueSelected });
|
||||
for (let i = 0; i < this.grantInfo.length; i++) {
|
||||
if (selectedOption === this.grantInfo[i].ConditionalFieldName) {
|
||||
for (let j = 0; j < this.grantFieldsConditionalValue.length; j++) {
|
||||
if (valueSelected === this.grantFieldsConditionalValue[j].Key) {
|
||||
this.filteredGrantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j].Value[0];
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
<ion-header>
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<!-- <nav-buttons></nav-buttons> -->
|
||||
<ion-title color="light">{{ 'vacation-rule, search-employee' | translate}}</ion-title>
|
||||
<ion-buttons slot="primary">
|
||||
<ion-button style="background: none !important;" (click)="closePage()">
|
||||
<ion-icon slot="icon-only" name="close"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<div style="padding: 0 10px;" [innerHTML]='"vacation-rule, replacement-employee-tip" | translate'></div>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-label class="boldTxtNav">{{'vacation-rule, search-by' | translate}}</ion-label>
|
||||
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
|
||||
[(ngModel)]="searchKeySelect">
|
||||
<ion-select-option value="1" selected="true">{{'vacation-rule, search-by-name' | translate}}</ion-select-option>
|
||||
<ion-select-option value="2">{{'vacation-rule, search-by-username' | translate}}</ion-select-option>
|
||||
<ion-select-option value="3">{{'vacation-rule, search-by-email' | translate}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines='none'>
|
||||
<ion-input [(ngModel)]="searchKey" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
|
||||
<ion-button style="width: 19%;" button-type="clear" (click)="SearchReplacementList()">
|
||||
<ion-icon slot="icon-only" name="search"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
|
||||
<!-- <ion-item>
|
||||
<ion-list [(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-item> -->
|
||||
|
||||
<ion-list>
|
||||
<ion-radio-group mode="md" [(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-radio-group>
|
||||
</ion-list>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<ion-button (click)="closePage()" class="footer-button" color="customnavy">{{'general, save' | translate}}
|
||||
</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkListReplacementItgComponent } from './work-list-replacement-itg.component';
|
||||
|
||||
describe('WorkListReplacementItgComponent', () => {
|
||||
let component: WorkListReplacementItgComponent;
|
||||
let fixture: ComponentFixture<WorkListReplacementItgComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkListReplacementItgComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkListReplacementItgComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,131 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ReplacementServiceRequest } from 'src/app/vacation-rule/model/replacement-Service.request';
|
||||
import { VacationRuleServiceService } from 'src/app/vacation-rule/service/vacation-rule-service.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-work-list-replacement-itg',
|
||||
templateUrl: './work-list-replacement-itg.component.html',
|
||||
styleUrls: ['./work-list-replacement-itg.component.scss'],
|
||||
})
|
||||
export class WorkListReplacementItgComponent implements OnInit {
|
||||
P_SEARCH_USER_NAME: string = "";
|
||||
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
|
||||
P_SEARCH_EMAIL_ADDRESS: string = "";
|
||||
P_PAGE_NUM: number = 1;
|
||||
P_PAGE_LIMIT: number = 50;
|
||||
ReplacementList: any = [];
|
||||
IsReachEnd: boolean = false;
|
||||
selEmp: string = null;
|
||||
callback: any;
|
||||
searchKey: any = "";
|
||||
searchKeySelect: string = "";
|
||||
replacmentRequest: any = "";
|
||||
isAbs: boolean = false;
|
||||
isSave: boolean = false;
|
||||
|
||||
constructor(public vacationRuleService: VacationRuleServiceService,
|
||||
public ts: TranslatorService,
|
||||
public cs: CommonService,
|
||||
public modalController: ModalController) { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
SearchReplacementList() {
|
||||
this.ReplacementList = [];
|
||||
this.IsReachEnd = false;
|
||||
this.P_PAGE_NUM = 1;
|
||||
if (this.searchKey) {
|
||||
switch (this.searchKeySelect) {
|
||||
case '1': {
|
||||
|
||||
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.searchKey;
|
||||
this.P_SEARCH_USER_NAME = "";
|
||||
this.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
|
||||
break;
|
||||
}
|
||||
case '2': {
|
||||
this.P_SEARCH_USER_NAME = this.searchKey;
|
||||
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
break;
|
||||
}
|
||||
case '3': {
|
||||
this.P_SEARCH_EMAIL_ADDRESS = this.searchKey;
|
||||
this.P_SEARCH_USER_NAME = "";
|
||||
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
this.P_SEARCH_USER_NAME = "";
|
||||
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.P_SEARCH_USER_NAME = "";
|
||||
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
||||
this.P_SEARCH_EMAIL_ADDRESS = "";
|
||||
}
|
||||
|
||||
const request = new ReplacementServiceRequest();
|
||||
request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME;
|
||||
request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
|
||||
request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS;
|
||||
request.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
|
||||
|
||||
this.vacationRuleService.getReplacementList(request).
|
||||
subscribe((result: any) => {
|
||||
this.handleReplacment(result);
|
||||
});
|
||||
}
|
||||
|
||||
handleReplacment(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (this.cs.hasData(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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
doInfinite(infiniteScroll) {
|
||||
|
||||
}
|
||||
|
||||
closePage() {
|
||||
this.isSave = true;
|
||||
let data: any = null;
|
||||
if (this.isSave == true) {
|
||||
if (this.selEmp) {
|
||||
data = this.ReplacementList[this.selEmp];
|
||||
} else {
|
||||
data = null;
|
||||
}
|
||||
if (typeof this.callback == 'function') {
|
||||
this.callback(data);
|
||||
}
|
||||
|
||||
this.modalController.dismiss({
|
||||
'dismissed': true,
|
||||
empData: data
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
<ion-content>
|
||||
<div class="search-header" (click)="dismissModal()">
|
||||
<h2>Advanced Search</h2>
|
||||
<ion-icon slot="icon-only" name="md-close"></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-container">
|
||||
<ion-item lines="none">
|
||||
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
|
||||
(ionChange)=onChangeView($event)>
|
||||
<ion-select-option value="1">{{ts.trPK('worklist','openNot')}}</ion-select-option>
|
||||
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
|
||||
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
|
||||
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
|
||||
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none" [ngStyle]="(hideDateInput === true || hideTextInput === true) ? {'margin-bottom': '0px'} : {}">
|
||||
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
|
||||
(ionChange)="getValueSelected($event)">
|
||||
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
|
||||
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
|
||||
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
|
||||
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
|
||||
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<div>
|
||||
<div *ngIf="hideDateInput">
|
||||
<ion-item lines='none' style="border-radius: 10px;margin-right: 10px;margin-left: 10px;margin-top: 5px;">
|
||||
<ion-label>{{ts.trPK('worklist','sent')}} </ion-label>
|
||||
<ion-datetime placeholder="{{ts.trPK('worklist','enter')}}" displayFormat="DD-MMM-YYYY"
|
||||
pickerFormat="DD-MMM-YYYY" [(ngModel)]="inputDate"></ion-datetime>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="hideTextInput">
|
||||
<ion-item lines='none' style="border-radius: 10px;margin-right: 10px;margin-left: 10px;margin-top: 5px;">
|
||||
<ion-input placeholder="{{ts.trPK('worklist','enter')}}" [(ngModel)]="inputSearch">
|
||||
</ion-input>
|
||||
</ion-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-label>Item Type</ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
|
||||
[(ngModel)]="itemType">
|
||||
<ion-select-option value="HRSSA">HR</ion-select-option>
|
||||
<ion-select-option value="POAPPRV">PO</ion-select-option>
|
||||
<ion-select-option value="REQAPPRV">PR</ion-select-option>
|
||||
<ion-select-option value="INVMOA">MR</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<div class="search-button" (click)="search()">
|
||||
<span>SEARCH</span>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
.search-header{
|
||||
display: inline-block;
|
||||
h2 {
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
font-family: WorkSans-Regular;
|
||||
font-size: 18px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
ion-icon {
|
||||
display: inline-block;
|
||||
font-size: 23px;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 8px;
|
||||
}
|
||||
}
|
||||
.search-container {
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
padding-bottom: 100px;
|
||||
margin-top: 5px;
|
||||
ion-item{
|
||||
border: 2px solid #eaeaea;
|
||||
border-radius: 25px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.search-button{
|
||||
background: #3dcab3;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
font-family: WorkSans-Regular;
|
||||
border-radius: 22px;
|
||||
margin-top: 20px;
|
||||
line-height: 50px;
|
||||
span{
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search.component';
|
||||
|
||||
describe('WorklistAdvancedSearchComponent', () => {
|
||||
let component: WorklistAdvancedSearchComponent;
|
||||
let fixture: ComponentFixture<WorklistAdvancedSearchComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorklistAdvancedSearchComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorklistAdvancedSearchComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,65 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-worklist-advanced-search',
|
||||
templateUrl: './worklist-advanced-search.component.html',
|
||||
styleUrls: ['./worklist-advanced-search.component.scss'],
|
||||
})
|
||||
export class WorklistAdvancedSearchComponent implements OnInit {
|
||||
|
||||
public hideDateInput = false;
|
||||
public hideTextInput = false;
|
||||
public inputDate = '';
|
||||
public inputSearch = '';
|
||||
public selectedValue = '';
|
||||
public notificationType = '';
|
||||
public itemType = '';
|
||||
|
||||
constructor(
|
||||
public modalController: ModalController,
|
||||
public ts: TranslatorService
|
||||
) { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
public dismissModal() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
public search() {
|
||||
console.log(this.itemType);
|
||||
this.modalController.dismiss({
|
||||
notificationType: this.notificationType,
|
||||
selectedValue: this.selectedValue,
|
||||
inputDate: this.inputDate,
|
||||
inputSearch: this.inputSearch,
|
||||
itemType: this.itemType
|
||||
});
|
||||
}
|
||||
|
||||
onChangeView(selectedValue: any) {
|
||||
this.notificationType = selectedValue.detail.value;
|
||||
}
|
||||
|
||||
getValueSelected(value) {
|
||||
this.selectedValue = value.detail.value;
|
||||
if (this.selectedValue === '1') {
|
||||
this.hideDateInput = false;
|
||||
this.hideTextInput = true;
|
||||
} else if (this.selectedValue === '2') {
|
||||
this.hideDateInput = false;
|
||||
this.hideTextInput = true;
|
||||
} else if (this.selectedValue === '3') {
|
||||
this.hideDateInput = true;
|
||||
this.hideTextInput = false;
|
||||
} else if (this.selectedValue === '4') {
|
||||
this.hideDateInput = false;
|
||||
this.hideTextInput = true;
|
||||
} else if (this.selectedValue === '5') {
|
||||
this.hideDateInput = false;
|
||||
this.hideTextInput = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,107 @@
|
||||
.itemHISBtn{
|
||||
padding: 5px;
|
||||
color: var(--light);
|
||||
background: var(--darkgray);
|
||||
border-radius: 3px;
|
||||
width: 85%;
|
||||
height: 40px;
|
||||
}
|
||||
// .itemHISBtn{
|
||||
// padding: 5px;
|
||||
// color: var(--light);
|
||||
// background: var(--darkgray);
|
||||
// border-radius: 3px;
|
||||
// width: 85%;
|
||||
// height: 40px;
|
||||
// }
|
||||
|
||||
|
||||
// .rowBtn{
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// background: white;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// .rowBorder{
|
||||
// border-bottom: solid 0.03cm var(--grayBG);
|
||||
|
||||
// }
|
||||
// .colBorder{
|
||||
// border-right: solid 0.03cm var(--grayBG);
|
||||
|
||||
// }
|
||||
|
||||
// .dateActionHistory{
|
||||
// text-align: end;
|
||||
// // margin-top: -25px;
|
||||
// }
|
||||
|
||||
|
||||
// .actionBtn{
|
||||
// --border-radius: 50% !important;
|
||||
// height: 55px;
|
||||
// width: 55px;
|
||||
// --background: var(--newgreen); // will be dynamic
|
||||
// background: transparent;
|
||||
// margin:10px;
|
||||
// }
|
||||
|
||||
// .itemAttch{
|
||||
// border-radius: 11px;
|
||||
// margin: 8px;
|
||||
// --min-height: 60px;
|
||||
// --max-height: 60px;
|
||||
// }
|
||||
|
||||
// .less {
|
||||
// max-height: 54px;
|
||||
// }
|
||||
|
||||
// .noDataDiv{
|
||||
// background: #ffffff;
|
||||
// height: 11%;
|
||||
// text-align: center;
|
||||
// padding-top: 1px;
|
||||
// border-radius: 10px;
|
||||
// margin: 10px;
|
||||
// }
|
||||
|
||||
// .container {
|
||||
// font-size: 14px;
|
||||
// line-height: 14px;
|
||||
// height: 15px;
|
||||
// overflow: hidden;
|
||||
// text-align: justify;
|
||||
// }
|
||||
|
||||
// .show {
|
||||
// overflow: visible;
|
||||
// height: auto;
|
||||
// }
|
||||
|
||||
// .showMore{
|
||||
// padding: 0px;
|
||||
// background: transparent;
|
||||
// color: blue;
|
||||
// text-decoration: underline;
|
||||
// font-size: 14px;
|
||||
// }
|
||||
// .succssfullMSG{
|
||||
// height: 100%;
|
||||
// width: 100%;
|
||||
// background: var(--newgreen);
|
||||
// color: white;
|
||||
// font-weight: bold;
|
||||
// font-size: 20px;
|
||||
// text-align: center;
|
||||
// vertical-align: middle;
|
||||
// padding-top: 30px;
|
||||
// }
|
||||
|
||||
// .succssfullIcon{
|
||||
// width: 60%;
|
||||
// text-align: center;
|
||||
// height: 60%;
|
||||
// }
|
||||
// .subjectNotification{
|
||||
// text-align: center;
|
||||
// padding-top: 10px;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
|
||||
@ -1,8 +1,110 @@
|
||||
.itemHISBtn{
|
||||
padding: 5px;
|
||||
color: var(--light);
|
||||
background: var(--darkgray);
|
||||
border-radius: 3px;
|
||||
width: 85%;
|
||||
height: 40px;
|
||||
}
|
||||
// .itemHISBtn{
|
||||
// padding: 5px;
|
||||
// color: var(--light);
|
||||
// background: var(--darkgray);
|
||||
// border-radius: 3px;
|
||||
// width: 85%;
|
||||
// height: 40px;
|
||||
// }
|
||||
|
||||
|
||||
// .rowBtn{
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// background: white;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// .rowBorder{
|
||||
// border-bottom: solid 0.03cm var(--grayBG);
|
||||
|
||||
// }
|
||||
// .colBorder{
|
||||
// border-right: solid 0.03cm var(--grayBG);
|
||||
|
||||
// }
|
||||
|
||||
// .dateActionHistory{
|
||||
// text-align: end;
|
||||
// // margin-top: -25px;
|
||||
// }
|
||||
|
||||
|
||||
// .actionBtn{
|
||||
// --border-radius: 50% !important;
|
||||
// height: 55px;
|
||||
// width: 55px;
|
||||
// --background: var(--newgreen); // will be dynamic
|
||||
// background: transparent;
|
||||
// margin:10px;
|
||||
// }
|
||||
|
||||
// .itemAttch{
|
||||
// border-radius: 11px;
|
||||
// margin: 8px;
|
||||
// --min-height: 60px;
|
||||
// --max-height: 60px;
|
||||
// }
|
||||
|
||||
// .less {
|
||||
// max-height: 54px;
|
||||
// }
|
||||
|
||||
// .noDataDiv{
|
||||
// background: #ffffff;
|
||||
// height: 11%;
|
||||
// text-align: center;
|
||||
// padding-top: 1px;
|
||||
// border-radius: 10px;
|
||||
// margin: 10px;
|
||||
// }
|
||||
|
||||
|
||||
// .container {
|
||||
// font-size: 14px;
|
||||
// line-height: 14px;
|
||||
// height: 16px;
|
||||
// overflow: hidden;
|
||||
// text-align: justify;
|
||||
// }
|
||||
|
||||
// .show {
|
||||
// overflow: visible;
|
||||
// height: auto;
|
||||
// }
|
||||
|
||||
// .showMore{
|
||||
// padding: 0px;
|
||||
// background: transparent;
|
||||
// color: blue;
|
||||
// text-decoration: underline;
|
||||
// font-size: 14px;
|
||||
// }
|
||||
|
||||
// .succssfullMSG{
|
||||
// height: 100%;
|
||||
// width: 100%;
|
||||
// background: var(--newgreen);
|
||||
// color: white;
|
||||
// font-weight: bold;
|
||||
// font-size: 20px;
|
||||
// text-align: center;
|
||||
// vertical-align: middle;
|
||||
// padding-top: 30px;
|
||||
// }
|
||||
|
||||
// .succssfullIcon{
|
||||
// width: 60%;
|
||||
// text-align: center;
|
||||
// height: 60%;
|
||||
// }
|
||||
|
||||
// .subjectNotification{
|
||||
// text-align: center;
|
||||
// padding-top: 10px;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
|
||||
@ -1,8 +1,106 @@
|
||||
.itemHISBtn{
|
||||
padding: 5px;
|
||||
color: var(--light);
|
||||
background: var(--darkgray);
|
||||
border-radius: 3px;
|
||||
width: 85%;
|
||||
height: 40px;
|
||||
}
|
||||
// .itemHISBtn{
|
||||
// padding: 5px;
|
||||
// color: var(--light);
|
||||
// background: var(--darkgray);
|
||||
// border-radius: 3px;
|
||||
// width: 85%;
|
||||
// height: 40px;
|
||||
// }
|
||||
|
||||
|
||||
// .rowBtn{
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// background: white;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// .rowBorder{
|
||||
// border-bottom: solid 0.03cm var(--grayBG);
|
||||
|
||||
// }
|
||||
// .colBorder{
|
||||
// border-right: solid 0.03cm var(--grayBG);
|
||||
|
||||
// }
|
||||
|
||||
// .dateActionHistory{
|
||||
// text-align: end;
|
||||
// // margin-top: -25px;
|
||||
// }
|
||||
|
||||
|
||||
// .actionBtn{
|
||||
// --border-radius: 50% !important;
|
||||
// height: 55px;
|
||||
// width: 55px;
|
||||
// --background: var(--newgreen); // will be dynamic
|
||||
// background: transparent;
|
||||
// margin:10px;
|
||||
// }
|
||||
|
||||
// .itemAttch{
|
||||
// border-radius: 11px;
|
||||
// margin: 8px;
|
||||
// --min-height: 60px;
|
||||
// --max-height: 60px;
|
||||
// }
|
||||
|
||||
// .less {
|
||||
// max-height: 54px;
|
||||
// }
|
||||
|
||||
// .noDataDiv{
|
||||
// background: #ffffff;
|
||||
// height: 11%;
|
||||
// text-align: center;
|
||||
// padding-top: 1px;
|
||||
// border-radius: 10px;
|
||||
// margin: 10px;
|
||||
// }
|
||||
|
||||
// .container {
|
||||
// font-size: 14px;
|
||||
// line-height: 14px;
|
||||
// height: 16px;
|
||||
// overflow: hidden;
|
||||
// text-align: justify;
|
||||
// }
|
||||
|
||||
// .show {
|
||||
// overflow: visible;
|
||||
// height: auto;
|
||||
// }
|
||||
|
||||
// .showMore{
|
||||
// padding: 0px;
|
||||
// background: transparent;
|
||||
// color: blue;
|
||||
// text-decoration: underline;
|
||||
// font-size: 14px;
|
||||
// }
|
||||
// .succssfullMSG{
|
||||
// height: 100%;
|
||||
// width: 100%;
|
||||
// background: var(--newgreen);
|
||||
// color: white;
|
||||
// font-weight: bold;
|
||||
// font-size: 20px;
|
||||
// text-align: center;
|
||||
// vertical-align: middle;
|
||||
// padding-top: 30px;
|
||||
// }
|
||||
|
||||
// .succssfullIcon{
|
||||
// width: 60%;
|
||||
// text-align: center;
|
||||
// height: 60%;
|
||||
// }
|
||||
// .subjectNotification{
|
||||
// text-align: center;
|
||||
// padding-top: 10px;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
@ -1,136 +1,529 @@
|
||||
<ion-header >
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
|
||||
<ion-buttons slot="start">
|
||||
<nav-buttons backLink="/notification/homepage"></nav-buttons>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
<ion-header *ngIf="!messageSuccess">
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
|
||||
<ion-buttons slot="start">
|
||||
<nav-buttons backLink="/notification/homepage"></nav-buttons>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
|
||||
|
||||
<ion-card>
|
||||
<ion-card-header class="boxHdr">
|
||||
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<div>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col class="colBold">
|
||||
<label for=""> {{ts.trPK('worklistMain','from')}}
|
||||
|
||||
</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="colBold">
|
||||
<label for="">{{ts.trPK('worklistMain','to')}}
|
||||
</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="colBold">
|
||||
<label for="">{{ts.trPK('worklistMain','sent')}}
|
||||
</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold">
|
||||
<label for="">{{ts.trPK('worklistMain','closed')}}
|
||||
</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="colBold">
|
||||
<label for="">{{ts.trPK('worklistMain','id')}}
|
||||
</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
|
||||
<ion-col class="colBold">
|
||||
<label for="">{{ts.trPK('worklistMain','responder')}}
|
||||
</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="colBold">
|
||||
<label for="">{{ts.trPK('worklistMain','subject')}} </label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col class="greenTxt" col-4>
|
||||
<button ion-button block class="notColBtn" (click)="openNotificationBody()">
|
||||
<p>{{ts.trPK('worklistMain','notfDetails')}} </p>
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/details.png"></ion-img>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col class="greenTxt" col-4>
|
||||
<button ion-button block class="notColBtn" (click)="openActionHistory()">
|
||||
<p>{{ts.trPK('worklistMain','actionHis')}}</p>
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/actionHistory.png"></ion-img>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col class="greenTxt" col-4>
|
||||
<button ion-button block class="notColBtn" (click)="openSupportDocuments()">
|
||||
<p>{{ts.trPK('worklistMain','suppDoc')}}</p>
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/documents.png"></ion-img>
|
||||
</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
</div>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<div>
|
||||
<ion-content *ngIf="!messageSuccess" class="colorBG">
|
||||
|
||||
<!-- add segemnt part -->
|
||||
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
|
||||
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChanged($event)"
|
||||
[value]="defaultSegment" class="ion-segment-all">
|
||||
|
||||
|
||||
<ion-segment-button value="item-req"
|
||||
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
|
||||
{{ts.trPK('worklistMain','title')}}
|
||||
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="action-history"
|
||||
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
|
||||
{{'worklistMain, action' | translate}}
|
||||
</ion-segment-button>
|
||||
|
||||
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
|
||||
{{'general, file' | translate}}
|
||||
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
|
||||
{{ts.trPK('worklistMain','info')}}
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
|
||||
<ng-container *ngIf="activeSegment === 'info'">
|
||||
|
||||
<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>
|
||||
|
||||
<ion-row class="" *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' ">
|
||||
<ion-col class="rowBorder" *ngFor="let notificationBody of item.Collection_Notification;"
|
||||
size="6">
|
||||
<label class="colItemReq" for="">{{notificationBody.SEGMENT_PROMPT}}</label>
|
||||
<!-- </ion-col>
|
||||
<ion-col col-7> -->
|
||||
<br />
|
||||
<label for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
|
||||
</ion-card>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 10px; " *ngIf="subordinatesleaveList != undefined">Employee will also on leave </div>
|
||||
<ion-item class="subOrdinateList" *ngFor="let List of subordinatesleaveList;">
|
||||
|
||||
|
||||
|
||||
<ion-grid class="gridSubordinates">
|
||||
<div class="subOrdinateDiv">
|
||||
|
||||
<img class="subOrdinateImg" src="../assets/imgs/profile.png"></div>
|
||||
|
||||
<ion-row class="rowHeader subOrdinateRow">
|
||||
|
||||
<ion-col size="9">
|
||||
<label style="font-weight: bold; " class="label" for="">{{List.EMPLOYEE_NAME}} </label>
|
||||
<br />
|
||||
<label class="label" for="">JOB TITLE DEMO </label><br />
|
||||
</ion-col>
|
||||
|
||||
<ion-col class="status" size="3">
|
||||
<label class="label" for="label">{{List.STATUS}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<br />
|
||||
<ion-row class="subOrdinateRow">
|
||||
<ion-col>
|
||||
|
||||
<label class="label" for="">From</label><br />
|
||||
<label class="label" for="">{{List.DATE_START |date}}</label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
|
||||
<label class="label" for="">To</label><br />
|
||||
<label class="label" for="">{{List.DATE_END | date}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<!-- </ion-col> -->
|
||||
</ion-item>
|
||||
<!-- </ion-card-content>
|
||||
</ion-card> -->
|
||||
</ng-container>
|
||||
<ng-container *ngIf="activeSegment === 'item-req'">
|
||||
|
||||
|
||||
|
||||
<ion-card class="cardContent">
|
||||
<!-- <ion-card-header class="boxHdr">
|
||||
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
|
||||
</ion-card-header> -->
|
||||
<ion-card-content>
|
||||
<div>
|
||||
<ion-grid style="text-align: left">
|
||||
<ion-row class="rowBorder">
|
||||
<ion-col class="colBorder">
|
||||
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
|
||||
|
||||
</label>
|
||||
<br />
|
||||
<!-- </ion-col>
|
||||
<ion-col> -->
|
||||
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
|
||||
</ion-col>
|
||||
<!-- </ion-row>
|
||||
|
||||
<ion-row> -->
|
||||
<ion-col class="">
|
||||
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
|
||||
</label>
|
||||
<br />
|
||||
<!-- </ion-col>
|
||||
<ion-col> -->
|
||||
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row class="rowBorder">
|
||||
<ion-col class="colBorder">
|
||||
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
|
||||
</label>
|
||||
<br />
|
||||
<!-- </ion-col>
|
||||
<ion-col> -->
|
||||
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
|
||||
</ion-col>
|
||||
<!-- </ion-row>
|
||||
<ion-row> -->
|
||||
<ion-col class="">
|
||||
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
|
||||
</label>
|
||||
<br />
|
||||
<!-- </ion-col>
|
||||
<ion-col> -->
|
||||
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="">
|
||||
<ion-col class="colBorder">
|
||||
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
|
||||
</label>
|
||||
<br />
|
||||
<!-- </ion-col>
|
||||
<ion-col> -->
|
||||
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
|
||||
</ion-col>
|
||||
<!-- </ion-row>
|
||||
<ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' "> -->
|
||||
<ion-col class="">
|
||||
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
|
||||
</label>
|
||||
<br />
|
||||
<!-- </ion-col>
|
||||
<ion-col> -->
|
||||
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<!-- <ion-row class="">
|
||||
<ion-col class="">
|
||||
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<br/>
|
||||
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
|
||||
</ion-col>
|
||||
</ion-row> -->
|
||||
<!-- <ion-row>
|
||||
<ion-col class="greenTxt" col-4>
|
||||
<button ion-button block class="notColBtn" (click)="openNotificationBody()">
|
||||
<p>{{ts.trPK('worklistMain','notfDetails')}} </p>
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/details.png"></ion-img>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col class="greenTxt" col-4>
|
||||
<button ion-button block class="notColBtn" (click)="openActionHistory()">
|
||||
<p>{{ts.trPK('worklistMain','actionHis')}}</p>
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/actionHistory.png"></ion-img>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col class="greenTxt" col-4>
|
||||
<button ion-button block class="notColBtn" (click)="openSupportDocuments()">
|
||||
<p>{{ts.trPK('worklistMain','suppDoc')}}</p>
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/documents.png"></ion-img>
|
||||
</button>
|
||||
</ion-col>
|
||||
</ion-row> -->
|
||||
</ion-grid>
|
||||
|
||||
</div>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
|
||||
|
||||
|
||||
<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 style="font-weight: bold;" class="hrTitle">Employee Detail</div>
|
||||
|
||||
<div *ngFor="let submitterInfo of submitterInfoRes">
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, empNo' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.EMPLOYEE_NUMBER}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, name' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.EMPLOYEE_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, position' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.POSITION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, grade' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.GRADE_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, job' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.JOB_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, category' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.EMPLOYMENT_CATEGORY_MEANING}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, orgEmail' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, orgName' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.ORGANIZATION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, busG' | translate}}</label>
|
||||
<br />
|
||||
<label for="">{{submitterInfo.BUSINESS_GROUP_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="rowBorder submitterInfo">
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, locName' | translate}}</label>
|
||||
<br />
|
||||
|
||||
<label for="">{{submitterInfo.LOCATION_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<label class="colItemReq" for="">{{'userProfile, payrol' | translate}}</label>
|
||||
<br />
|
||||
|
||||
<label for="">{{submitterInfo.PAYROLL_NAME}}</label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
|
||||
</ion-card>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="activeSegment === 'action-history'">
|
||||
|
||||
<ion-card class="cardContent">
|
||||
<ion-card-content>
|
||||
|
||||
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
|
||||
<p>{{ 'general, empty' | translate}}</p>
|
||||
</div>
|
||||
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
|
||||
<ion-list class="notification-list ">
|
||||
<div class="timeline">
|
||||
<ion-item *ngFor="let actionHistory of actionHistoryRes">
|
||||
|
||||
<div class="timeline-item" slot="start">
|
||||
<div class="timeline-thumb timeline-icon">
|
||||
<img *ngIf="actionHistory.EMPLOYEE_IMAGE" class="empImge"
|
||||
[src]="'data:image/png;base64,'+actionHistory.EMPLOYEE_IMAGE">
|
||||
<img *ngIf="actionHistory.EMPLOYEE_IMAGE == null" class="empImge"
|
||||
src="../assets/imgs/profile.png"> </div>
|
||||
</div>
|
||||
<ion-col>
|
||||
<ion-label style="color:black !important ;font-weight: bold;">
|
||||
{{actionHistory.NAME}}
|
||||
</ion-label>
|
||||
|
||||
<div *ngIf="actionHistory.NOTE != '' ">
|
||||
<div *ngIf="!checkLines(actionHistory.NOTE)">
|
||||
<div class="containerNote">
|
||||
Note: {{actionHistory.NOTE}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="checkLines(actionHistory.NOTE)">
|
||||
|
||||
<div class="containerNote" [ngClass]="actionHistory.visible ? 'show' : '' ">
|
||||
Note: {{actionHistory.NOTE}}
|
||||
|
||||
|
||||
</div>
|
||||
<button class="showMore"
|
||||
(click)="actionHistory.visible = !actionHistory.visible">{{ actionHistory.visible ? 'Show less': 'Show More' }}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<ion-label
|
||||
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submite' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Reject','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Reject' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
|
||||
class=""> {{actionHistory.ACTION}}</ion-label>
|
||||
|
||||
|
||||
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory">
|
||||
{{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
|
||||
</ion-col>
|
||||
<div class="line"></div>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load
|
||||
More</button>
|
||||
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
</ng-container>
|
||||
<ng-container *ngIf="activeSegment === 'attach'">
|
||||
|
||||
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
|
||||
<p>{{ 'general, notAttch' | translate}}</p>
|
||||
</div>
|
||||
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
|
||||
|
||||
<ion-grid>
|
||||
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes">
|
||||
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
|
||||
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
|
||||
</div>
|
||||
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'txt'"> <img float-start class="attachImg"
|
||||
src="../assets/imgs/doc.png">
|
||||
</div>
|
||||
<div
|
||||
*ngIf="attachList.FILE_CONTENT_TYPE != 'txt' && attachList.FILE_CONTENT_TYPE != 'PDF' && attachList.FILE_CONTENT_TYPE != 'pdf' && attachList.FILE_CONTENT_TYPE != 'png' && attachList.FILE_CONTENT_TYPE != 'jpeg' && attachList.FILE_CONTENT_TYPE != 'jpg' && attachList.FILE_CONTENT_TYPE != 'PNG' && attachList.FILE_CONTENT_TYPE != 'JPEG' && attachList.FILE_CONTENT_TYPE != 'JPG'">
|
||||
<img float-start class="attachImg" src="../assets/imgs/nonfile.png">
|
||||
</div>
|
||||
<div
|
||||
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
|
||||
<img float-start class="attachImg" src="../assets/imgs/img.png">
|
||||
</div>
|
||||
<ion-label>
|
||||
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
|
||||
|
||||
<button float-end class="attachImgBtn"
|
||||
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
|
||||
<img class="attachImg" src="../assets/imgs/view.png">
|
||||
</button>
|
||||
|
||||
</ion-item>
|
||||
|
||||
</ion-grid>
|
||||
|
||||
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<!-- ATTRIBUTE_DISPLAY_NAME: "Note"
|
||||
ATTRIBUTE_FORMAT: "4000"
|
||||
ATTRIBUTE_NAME: "WF_NOTE"
|
||||
ATTRIBUTE_TYPE: "VARCHAR2" -->
|
||||
<div id="notificationDynamicFields">
|
||||
<div id="notificationDynamicFields1">
|
||||
</div>
|
||||
<!-- <json-schema-form *ngIf="schemaNotific" [form]="schemaNotific" [(ngModel)]="notExampleJsonObject">
|
||||
<!-- <json-schema-form *ngIf="schemaNotific" [form]="schemaNotific" [(ngModel)]="notExampleJsonObject">
|
||||
</json-schema-form> -->
|
||||
</div>
|
||||
<ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
|
||||
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="actionType" required >
|
||||
<ion-select-option value= "{{notificationButtons.BUTTON_ACTION}}" *ngFor="let notificationButtons of notificationButtonRes; let i=index;">{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
</div>
|
||||
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
|
||||
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
|
||||
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
|
||||
[(ngModel)]="actionType" required>
|
||||
<ion-select-option value="{{notificationButtons.BUTTON_ACTION}}"
|
||||
*ngFor="let notificationButtons of notificationButtonRes; let i=index;">
|
||||
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item> -->
|
||||
|
||||
<ion-row>
|
||||
<ion-col col-12>
|
||||
<div id="notificationDynamicFields">
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="centerDiv" >
|
||||
<ion-button color="customnavy" class="gridBtn" (click)="actionButton()"> {{ts.trPK('general','submit')}}</ion-button>
|
||||
</div>
|
||||
<div class="centerDiv" >
|
||||
<ion-button color="customnavy" class="gridBtn" (click)="nextNotfification()">{{'worklistMain, skip' | translate}}</ion-button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
<div *ngIf="messageSuccess" class="succssfullMSG">
|
||||
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
|
||||
<!--filled-->
|
||||
<br />
|
||||
<div> Transaction Successful </div>
|
||||
</div>
|
||||
|
||||
<ion-footer class="footerSearchBtn" *ngIf="!messageSuccess">
|
||||
|
||||
|
||||
|
||||
<!-- <ion-row class="rowBtn" *ngIf="notificationButtonRes?.length >0">
|
||||
*ngFor="let notificationButtons of notificationButtonRes; let i=index;">
|
||||
|
||||
<ion-button class="actionBtn" (click)="actionButton(notificationButtons.BUTTON_ACTION)"
|
||||
*ngFor="let notificationButtons of notificationButtonRes | slice:0:3; let i=index;" >
|
||||
{{notificationButtons.BUTTON_LABEL}}
|
||||
</ion-button>
|
||||
|
||||
<ion-button style="--background:orange" class="actionBtn" (click)="nextNotfification()">
|
||||
{{'worklistMain, skip' | translate}}
|
||||
|
||||
</ion-button>
|
||||
<ion-button style="--background:#cccccc;" class="actionBtn" (click)="openMoreActions()">
|
||||
more
|
||||
|
||||
</ion-button>
|
||||
|
||||
|
||||
|
||||
</ion-row> -->
|
||||
<!-- <div class="centerDiv">
|
||||
<ion-button color="customnavy" class="gridBtn" (click)="actionButton()"> {{ts.trPK('general','submit')}}
|
||||
</ion-button>
|
||||
</div>
|
||||
<div class="centerDiv">
|
||||
<ion-button color="customnavy" class="gridBtn" (click)="nextNotfification()">
|
||||
{{'worklistMain, skip' | translate}}</ion-button>
|
||||
</div> -->
|
||||
|
||||
<ion-row class="rowBtn" *ngIf="notificationButtonRes?.length >0">
|
||||
|
||||
<ion-tabs>
|
||||
|
||||
<ion-tab-bar class="tabBar" slot="bottom">
|
||||
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVED')">
|
||||
<img src="../assets/imgs/action-approve.png">
|
||||
<ion-label>Approve</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
|
||||
<img src="../assets/imgs/action-reject.png">
|
||||
<ion-label>Reject</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button *ngIf="requestDis" (click)="actionButton('REQUEST_INFO')">
|
||||
<img src="../assets/imgs/action-info.png">
|
||||
<ion-label>Request</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button (click)="nextNotfification()">
|
||||
<img src="../assets/imgs/action-skip.png">
|
||||
<ion-label>Skip</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
|
||||
<img src="../assets/imgs/action-more.png">
|
||||
<ion-label>More</ion-label>
|
||||
</ion-tab-button>
|
||||
</ion-tab-bar>
|
||||
</ion-tabs>
|
||||
|
||||
</ion-row>
|
||||
|
||||
|
||||
</ion-footer>
|
||||
@ -0,0 +1,21 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
/**
|
||||
* Generated class for the JsonDatePipe pipe.
|
||||
*
|
||||
* See https://angular.io/api/core/Pipe for more info on Angular Pipes.
|
||||
*/
|
||||
@Pipe({
|
||||
name: 'jsonDate',
|
||||
})
|
||||
export class JsonDatePipe implements PipeTransform {
|
||||
/**
|
||||
* Takes a value and makes it lowercase.
|
||||
*/
|
||||
transform(value: string): any {
|
||||
if(value)
|
||||
return new Date(parseInt(value.substr(6)));
|
||||
else
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { DateStringPipe } from './date-string/date-string';
|
||||
import { FilterLangPipe } from './filter-lang/filter-lang';
|
||||
import { TurncatePipe } from './turncate/turncate.pipe';
|
||||
@NgModule({
|
||||
declarations: [DateStringPipe,
|
||||
FilterLangPipe],
|
||||
FilterLangPipe,
|
||||
TurncatePipe],
|
||||
imports: [],
|
||||
exports: [DateStringPipe,
|
||||
FilterLangPipe]
|
||||
FilterLangPipe,TurncatePipe]
|
||||
})
|
||||
export class PipesModule {}
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
import { TurncatePipe } from './turncate.pipe';
|
||||
|
||||
describe('TurncatePipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new TurncatePipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,27 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'turncate'
|
||||
})
|
||||
export class TurncatePipe implements PipeTransform {
|
||||
|
||||
transform(value: any, args?: any): any {
|
||||
console.log("args" + args);
|
||||
|
||||
let limit = args.length > 0 ? parseInt(args[0], 10) : 10;
|
||||
let trail = args.length > 1 ? args[1] : '...';
|
||||
|
||||
console.log("limit" + limit);
|
||||
|
||||
console.log("parseInt(args[0], 10)" + parseInt(args[0], 10));
|
||||
console.log("trail" + trail);
|
||||
console.log("limit" + limit);
|
||||
console.log("parseInt(args[0], 10)" + parseInt(args[0], 10));
|
||||
|
||||
return value.length > limit ? value.substring(0, limit) + trail : value; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 977 B |
Binary file not shown.
|
After Width: | Height: | Size: 971 B |
Binary file not shown.
|
After Width: | Height: | Size: 801 B |
Binary file not shown.
|
After Width: | Height: | Size: 970 B |
Binary file not shown.
|
After Width: | Height: | Size: 958 B |
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
Loading…
Reference in New Issue