add worklist new design

MOE_DEV_NEW_TEMPORARY_DESIGN
ashwaq 6 years ago
parent 5b7e435a31
commit ece6e45d97

@ -103,6 +103,7 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus
import{ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
import{WelcomeComponent} from './ui/welcome-login/welcome.component'
import {DashboredService} from './services/dashbored/dashbored.service'
// import {TurncatePipe} from '../pipes/turncate/turncate.pipe'
@NgModule({
imports: [
CommonModule,
@ -130,6 +131,7 @@ import {DashboredService} from './services/dashbored/dashbored.service'
DatePipeTransform,
DateTimePipe,
SafeHtmlPipe,
// TurncatePipe,
BackButtonComponent,
IfDatePipe,
DynamicTableComponent,
@ -186,6 +188,7 @@ import {DashboredService} from './services/dashbored/dashbored.service'
DividerComponent,
NavButtonsComponent,
DatePipeTransform,
// TurncatePipe,
TranslatePipe,
DateTimePipe,
SafeHtmlPipe,

@ -424,7 +424,7 @@ export class CommonService {
{
text: cancelLabel,
role: "cancel",
cssClass: "cancelBtn",
cssClass: "checkOutCancelBtn",
handler: () => {
if (onCancel) {
onCancel();
@ -436,7 +436,7 @@ export class CommonService {
text: acceptLabel,
role: "Confirm",
cssClass: "confirmBtn",
cssClass: "checkOutOkBtn",
handler: () => {

@ -4,5 +4,5 @@ export class GetSubordinatesLeavesRequest extends Request{
//public static SHARED_DATA = '';
public P_DATE_FROM :any;
public P_DATE_TO :any;
public P_SELECTED_EMPLOYEE_NUMBER:any;
}

@ -49,9 +49,9 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden !important;
font-size: 0.46cm;
font-size: 16px;
width: 78%;
font-weight: bold;
font-weight: bold !important;
}

@ -19,9 +19,9 @@ export class ApplyActionModalComponent implements OnInit {
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage');
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr' ,false);
this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage',false);
}

@ -21,8 +21,8 @@
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
</ion-card-header> -->
<!-- <ion-card-content> -->
<div [hidden]="itemHistoryRes && itemHistoryRes.length > 0">
<div class="noDataDiv" [hidden]="itemHistoryRes && itemHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemeHistoryist" *ngIf="itemHistoryRes && itemHistoryRes.length > 0 ">

@ -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);
}
}
}

@ -26,7 +26,7 @@ import { ItemHistoryComponent } from './item-history/item-history.component';
import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis.component';
import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component'
const routes: Routes = [
@ -98,7 +98,11 @@ const routes: Routes = [
{
path:'worklist-main-MR',
component:WorklistMainMRComponent
}
},
{
path: 'more-action-modal',
component: MoreActionModalComponent
},
]
}
];
@ -119,6 +123,7 @@ const routes: Routes = [
WorkListReplacementRollComponent,
WorkListRfcComponent,
ViewNoteModalComponent,
MoreActionModalComponent,
ApplyActionModalComponent,
ViewReplacementModalComponent,
WorkListActionHistoryComponent,

@ -22,7 +22,7 @@
</ion-card-header> -->
<!-- <ion-card-content> -->
<div [hidden]="getQutationAnalysis && getQutationAnalysis.length > 0">
<div class="noDataDiv" [hidden]="getQutationAnalysis && getQutationAnalysis.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemeHistoryist" *ngIf="getQutationAnalysis && getQutationAnalysis.length > 0 ">

@ -9,3 +9,7 @@ ion-content {
padding-top: 30px !important;
border: solid 1px #dedede;
}
:host(.activated) .item-native {
background: var(--red) !important;
color: var(--grey) !important;
}

@ -1,13 +1,13 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'replacementRoll, title' | translate}}</ion-title>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-content >
<ion-list [hidden]="isAnswer==true">
<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 }}'
@ -18,17 +18,18 @@
</ion-select>
</ion-item>
<ion-item>
<ion-input [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<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-button style="width: 19%;" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-icon slot="icon-only" name="search"></ion-icon>
</ion-button>
</ion-item>
<!-- <ion-item>
@ -41,7 +42,7 @@
</div> -->
</ion-list>
<div>
<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}}
@ -55,26 +56,77 @@
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
<ion-list *ngIf="ReplacementList">
<ion-radio-group mode="md" [(ngModel)]="selEmp">
<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>
<!-- <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>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</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>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<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-item>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="submitAction()">
<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>

@ -9,8 +9,119 @@ button.item-button.button.button-md.button-clear.button-clear-md {
min-width: 200px;
}
ion-item {
margin-top: 5%;
margin-right: 7%;
width: 100%;
// 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);
}

@ -36,6 +36,8 @@ export class WorkListReplacementRollComponent implements OnInit {
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;
@ -51,15 +53,45 @@ export class WorkListReplacementRollComponent implements OnInit {
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionObj = new WorkListActionRequest();
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj.P_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.RespondAttributeList =[];// this.getpassResAttr;
this.WorkListActionObj.P_APPROVER_INDEX = null;
}
ngOnInit() { }
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 = [];
@ -163,6 +195,13 @@ export class WorkListReplacementRollComponent implements OnInit {
this.selectedValue = Value;
}
select(selectEmp,index){
console.log(selectEmp.EMPLOYEE_DISPLAY_NAME);
this.selEmp=selectEmp
this.active=index;
}
clear() {
this.selEmpName = "";
this.selectedUserInf = null;
@ -188,10 +227,15 @@ export class WorkListReplacementRollComponent implements OnInit {
}
submitAction() {
this.selEmp
if (this.selEmp && this.isAnswer == false) {
this.selectedUserInf = this.ReplacementList[this.selEmp];
// 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;
@ -290,4 +334,12 @@ export class WorkListReplacementRollComponent implements OnInit {
}
}
public col(){
alert("test");
}
closeModal() {
this.modalCtrl.dismiss();
}
}

@ -1,7 +1,6 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'workListMain, rfc' | translate}}</ion-title>
<ion-toolbar >
<ion-title color="dark">{{ 'workListMain, rfc' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
@ -10,30 +9,62 @@
<div class="tipsPadding boldTxtNav">
{{"replacementRoll.msgRFC" | translate}}
</div>
<ion-list (ionChange)="radioChecked($event)" radio-group>
<!-- <ion-list (ionChange)="radioChecked($event)" radio-group>
<ion-item *ngFor="let rfcEmployeeList of RFCEmployeeListListRes; let i = index;">
<ion-label>{{rfcEmployeeList.EMPLOYEE_DISPLAY_NAME}}</ion-label>
<ion-label>{{rfcEmployeeList.ACTION}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-list>
</ion-list> -->
<div class="noteInput">
<label class="boldTxtNav" padding>{{"replacementRoll.enterNote" | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<ion-item>
<div class="square-container">
<div (click)="select(rfcEmployeeList,i)" *ngFor="let rfcEmployeeList of RFCEmployeeListListRes; let i = index;"
class="square">
<div class="profileImageDiv">
<img *ngIf="rfcEmployeeList.EMPLOYEE_IMAGE" class="empImgeRep" [src]="'data:image/png;base64,'+rfcEmployeeList.EMPLOYEE_IMAGE">
<img *ngIf="rfcEmployeeList.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">{{rfcEmployeeList.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{rfcEmployeeList.ACTION}}
</ion-label>
</div>
</div>
</div>
</ion-item>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
<div>
<label class="boldTxtNav">{{"replacementRoll.enterNote" | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
</div>
<ion-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>

@ -4,4 +4,131 @@
min-height: 45px;
min-width: 200px;
}
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);
}

@ -6,6 +6,7 @@ import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
import { WorklistService } from '../service/worklist.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular';
@Component({
selector: 'app-work-list-rfc',
@ -29,8 +30,15 @@ export class WorkListRfcComponent implements OnInit {
getpassResAttr: any = [];
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 100;
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService) {
active: any;
constructor(
public worklistService: WorklistService,
private cs: CommonService,
private ts: TranslatorService,
public workListMainService: WorklistMainService,
public modalCtrl: ModalController
) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
@ -153,5 +161,22 @@ export class WorkListRfcComponent implements OnInit {
infiniteScroll.target.complete();
}
}//end infiniteScroll
closeModal() {
this.modalCtrl.dismiss();
}
select(selectEmp,index){
console.log(selectEmp.USER_NAME);
console.log(selectEmp.SEQ);
this.radioButtonValue=selectEmp.USER_NAME
this.seqNo = selectEmp.SEQ;
//////////////////////////////////////////////////////////////
// let emp: any = this.RFCEmployeeListListRes[v];
// this.seqNo = emp.SEQ;
// this.radioButtonValue = emp.USER_NAME;
this.active=index;
}
}

@ -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;
// }

@ -28,6 +28,9 @@ import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.compo
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component';
import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component';
import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component';
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
@Component({
selector: 'app-worklist-main-mr',
@ -41,7 +44,7 @@ export class WorklistMainMRComponent implements OnInit {
private WorkListActionObj: WorkListActionRequest;
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
private WorkListAttachObj: WorkListButtonRequest;
private PRList:PRNotificatonBodyList
private PRList: PRNotificatonBodyList
public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
public static PASS_ACTION_MODE = "passActionMode";
getPassNotificationDetails: any;
@ -65,13 +68,13 @@ export class WorklistMainMRComponent implements OnInit {
selEmployeeID: any;
actionType: string = "";
notificationArray: any;
notificationDynamicAttributeArr:any;
notificationDynamicAttributeArr: any;
private textInput: TextInput;
private textArea: TextAreaInput;
notificationCount: any;
attachmentRes:any;
PRHeader:any;//change the tpye later
PRLines:any;//change the tpye later
attachmentRes: any;
PRHeader: any;//change the tpye later
PRLines: any;//change the tpye later
IsReachEnd: boolean = false;
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 100;
@ -84,6 +87,19 @@ export class WorklistMainMRComponent implements OnInit {
confirmMsg: string;
delMsg: string;
closeMsg: string;
activeSegment: any = "info";
lines_note_limit: any = 15;
orgNote: string;
truncating: boolean;
selectedIndex: any;
showLessBtn: boolean;
showMoreBtn: boolean;
notiActionBtnMore: any = [];
messageSuccess: boolean = false;
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
constructor(
@ -98,55 +114,31 @@ export class WorklistMainMRComponent implements OnInit {
public worklistService: WorklistService
) {
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
}
// this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
}
ngOnInit() {
ngOnInit() {
this.WorkListAttachObj = new WorkListButtonRequest();
this.intializeNotificationDetail();
let segment = document.querySelector('ion-segment');
let slides = document.querySelector('ion-slides');
segment.addEventListener('ionChange', (ev) => onSegmentChange(ev));
slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev));
// On Segment change slide to the matching slide
function onSegmentChange(ev) {
console.log("ev.detail.value"+ev.detail.value);
slideTo(ev.detail.value);
}
function slideTo(index) {
console.log("index: "+index);
slides.slideTo(index);
}
// On Slide change update segment to the matching value
async function onSlideDidChange(ev) {
var index = await slides.getActiveIndex();
console.log("index: "+index);
clickSegment(index);
}
function clickSegment(index) {
segment.value = index;
}
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
}
intializeNotificationDetail() {
document.getElementById("notificationDynamicFields").innerHTML="";
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
}
console.log("intializeNotificationDetail");
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
@ -190,38 +182,38 @@ export class WorklistMainMRComponent implements OnInit {
this.getEITNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO"){
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") {
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") {
this.getMONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR"){
this.getPRNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") {
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
getPRNotificationDetails(notificationBodyObj){
getPRNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PR");
});
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PR");
});
}
getMONotificationDetails(notificationBodyObj){
this.worklistMainService
getMONotificationDetails(notificationBodyObj) {
this.worklistMainService
.getMONotificationBody(notificationBodyObj)
.subscribe((result: MONotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "MO");
this.handleWorkListBodyResult(result, "MO");
});
}
getPONotificationDetails(notificationBodyObj){
}
getPONotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
this.handleWorkListBodyResult(result, "PO");
});
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
this.handleWorkListBodyResult(result, "PO");
});
}
getEITNotificationDetails(notificationBodyObj) {
@ -246,17 +238,17 @@ export class WorklistMainMRComponent implements OnInit {
this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION;
if (Type == "MO") {
if (result.GetMoNotificationBodyList) {
this.notificationBodyRes =
result.GetMoNotificationBodyList;
if (result.GetMoNotificationBodyList) {
this.notificationBodyRes =
result.GetMoNotificationBodyList;
}
}
}
}
} //End handleWorkListBodyResult
getNotificationButtons(notificationButtonsObj) {
this.worklistMainService
.getNotificationButtons(notificationButtonsObj)
@ -270,6 +262,20 @@ export class WorklistMainMRComponent implements OnInit {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetNotificationButtonsList != null) {
this.notificationButtonRes = result.GetNotificationButtonsList;
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
} // valid it
} // if result == null
} // valid it
} // End handleWorkListButtonsResult
@ -285,14 +291,12 @@ export class WorklistMainMRComponent implements OnInit {
handleApplayActionResult(result) {
if (this.common.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
this.messageSuccess = true;
setTimeout(() => {
this.messageSuccess = false;
}, 5000);
this.getNotificationCountAfterSubmit();
this.nextNotfification();
}
@ -320,11 +324,14 @@ export class WorklistMainMRComponent implements OnInit {
}
}
actionButton() {
let ButtonAction: string = this.actionType;
actionButton(action) {
console.log("actionButton" + action);
alert("don't forget");
//let ButtonAction: string = this.actionType;
let ButtonAction: string = action;
var responseAttrDic = this.notExampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let i=0;i<this.notificationDynamicAttributeArr.length;i++) {
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
@ -333,8 +340,8 @@ export class WorklistMainMRComponent implements OnInit {
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else if(this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE=="VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE =(document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
@ -358,47 +365,49 @@ export class WorklistMainMRComponent implements OnInit {
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
//sheardData
// this.common.sharedService.setSharedData(
// this.WorkListActionObj,
// WorklistMainMRComponent.PASS_NOTIFICATION_INFO
// );
if (ButtonAction == "APPROVE"){
this.confirmMsg =this.ts.trPK('worklistMain', 'approveMsg')
this.common.sharedService.setSharedData(
this.WorkListActionObj,
WorklistMainMRComponent.PASS_NOTIFICATION_INFO
);
/////////////////////////////////////////////
if (ButtonAction == "APPROVE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction == "REJECT"){
this.confirmMsg =this.ts.trPK('worklistMain', 'rejectMsg')
else if (ButtonAction == "REJECT") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
else if (ButtonAction == "DEL"){
this.confirmMsg =this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction == "DEL") {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction == "CLOSE"){
this.confirmMsg =this.ts.trPK('worklistMain', 'closeMsg')
}
else if (ButtonAction == "CLOSE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
this.common.confirmAlertDialogAction(
}
this.common.confirmAlertDialogAction(
() => {
this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'),
() => {}, this.ts.trPK('general', 'cancel'),
}, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg);
this.confirmMsg);
//////////////////////////////////////////////////////////
// alert.onDidDismiss((data) => {
// if (data == true) {
// this.continueDelete(attach);
// }
// });
//this.openApplyModal(this.WorkListActionObj);
// this.openApplyModal(this.WorkListActionObj);
////////////this.applyAction(this.WorkListActionObj);
}
@ -423,14 +432,10 @@ export class WorklistMainMRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainMRComponent.PASS_RES_ATTR
);
this.common.openWorklistRFCPage();
// this.common.openWorklistRFCPage();
this.openRFCModal();
} else if (ButtonAction == "ANSWER_INFO") {
// this.navCtrl.push("WorkListReplacmentRollPage", {
// pQuestion: this.pQuestion,
// passNotificationInfo: this.getPassNotificationDetails,
// passActionMode: ButtonAction,
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
// });
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
@ -444,7 +449,8 @@ export class WorklistMainMRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainMRComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
//this.common.openWorklistRollReplacement();
this.openReplacementRoll();
} else if (
ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" ||
@ -470,7 +476,8 @@ export class WorklistMainMRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainMRComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
// this.common.openWorklistRollReplacement();
this.openReplacementRoll();
} else if (
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
@ -562,29 +569,29 @@ export class WorklistMainMRComponent implements OnInit {
this.hideForwordEmployee = result.NotificationRespondRolesList[0];
}
this.notificationDynamicFields(result.NotificationGetRespondAttributesList);
this.NotificationGetRespondAttributesList=result.NotificationGetRespondAttributesList;
this.NotificationGetRespondAttributesList = result.NotificationGetRespondAttributesList;
this.common.sharedService.setSharedData(
this.NotificationGetRespondAttributesList,
WorklistMainMRComponent.PASS_RES_ATTR
);
this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList;
this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList;
if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema);
} // valid it
} // End handleWorkListButtonsResult
notificationDynamicFields(notificationAttr){
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
for(let i=0;i<notificationAttr.length;i++){
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="ROLE"){
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="DATE"){
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="NUMBER"){
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") {
}
}
}
@ -633,8 +640,8 @@ export class WorklistMainMRComponent implements OnInit {
getAttachmentNotification(WorkListAttachObj) {
getAttachmentNotification(WorkListAttachObj) {
this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => {
@ -675,21 +682,23 @@ export class WorklistMainMRComponent implements OnInit {
this.IsReachEnd = false;
}
}
this.turnCateFun(this.actionHistoryRes);
}
}
}
async openNoteDetail(note,sender) {
async openNoteDetail(note, sender) {
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
// modalPage.present();
console.log("note"+note);
console.log("note" + note);
this.common.sharedService.setSharedData(note, 'ViewNoteModalPage')
this.common.sharedService.setSharedData(sender,'ViewNoteModalPageSender')
this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender')
const modal = await this.modalCtrl.create({
component: ViewNoteModalComponent,
backdropDismiss:false,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
@ -731,7 +740,7 @@ export class WorklistMainMRComponent implements OnInit {
}
}//end infiniteScroll
//**********Attachment *****************//
//**********Attachment *****************//
async OpenAttachFiles(value, Type) {
@ -752,7 +761,7 @@ export class WorklistMainMRComponent implements OnInit {
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
// modalPage.present();
// console.log("note"+note);
this.common.sharedService.setSharedData( this.getPassNotificationDetails,WorklistMainMRComponent.PASS_NOTIFICATION_INFO);
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainMRComponent.PASS_NOTIFICATION_INFO);
this.common.sharedService.setSharedData(WorkListActionObj, 'ApplyActionModalPage')
// this.common.sharedService.setSharedData(
// this.WorkListActionObj,
@ -761,23 +770,23 @@ export class WorklistMainMRComponent implements OnInit {
const modal = await this.modalCtrl.create({
component: ApplyActionModalComponent,
backdropDismiss:false,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data); // Here's your selected user!
});
});
// data => {
// console.log('MODAL DATA', data);
// });
// data => {
// console.log('MODAL DATA', data);
// });
// const { data } = await this.modalCtrl.onWillDismiss();
// console.log(data);
return await modal.present();
}
@ -820,7 +829,7 @@ export class WorklistMainMRComponent implements OnInit {
loadMoreNotificationBody() {
console.log("loadMoreNotificationBody MR");
if (!this.IsReachEnd) {
console.log("this.IsReachEnd"+ this.IsReachEnd);
console.log("this.IsReachEnd" + this.IsReachEnd);
this.worklistMainService.getMONotificationBody(this.WorkListBodyObj).
subscribe((result: any) => {
@ -836,9 +845,9 @@ export class WorklistMainMRComponent implements OnInit {
this.IsReachEnd = false;
}
this.notificationBodyRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("test")
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("test")
);
}// if list length >0
else {
@ -846,7 +855,7 @@ export class WorklistMainMRComponent implements OnInit {
}
}// if response == 1
//this.pageNum++;
// infiniteScroll.target.complete();
// infiniteScroll.target.complete();
});
} else {
@ -872,25 +881,148 @@ export class WorklistMainMRComponent implements OnInit {
this.IsReachEnd = false;
}
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
// infiniteScroll.target.complete();
// infiniteScroll.target.complete();
});
} else {
//if (infiniteScroll)
//infiniteScroll.target.complete();
//infiniteScroll.target.complete();
}
}//end infiniteScroll
async openMoreActions() {
const modal = await this.modalCtrl.create({
component: MoreActionModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
// this.selectedAction = data.data;
this.actionType = data.data.BUTTON_ACTION;
console.log(this.actionType);
///call Action button
this.actionButton(this.actionType);
}
});
return await modal.present();
}
///////////////////////////////////////////
public checkLines(note) {
console.log(note.split("\n").length);
console.log(note.length);
if (note && note != null) {
return (note.length > this.lines_note_limit) ? true : false;
}
return false;
};
public turnCateFun(actionHis) {
for (let i = 0; i < actionHis.length; i++) {
actionHis[i].visible = false;
}
this.actionHistoryRes = actionHis;
console.log("test");
}
async openReplacementRoll() {
const modal = await this.modalCtrl.create({
component: WorkListReplacementRollComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss().then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
async openRFCModal() {
const modal = await this.modalCtrl.create({
component: WorkListRfcComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
}

@ -1,4 +1,4 @@
<ion-header>
<ion-header *ngIf="!messageSuccess">
<ion-toolbar class="header-toolbar">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
@ -6,33 +6,50 @@
</ion-buttons>
</ion-toolbar>
<ion-toolbar class="slideToolBar">
<ion-segment class="segmentPR" scrollable>
<ion-segment-button value="0" checked>
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="1">
<ion-label> {{ts.trPK('worklistMain','line_details')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="2">
<ion-label>
{{'worklistMain, actionHis' | translate}}
</ion-header>
<div *ngIf="messageSuccess" class="succssfullMSG">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon> <!--filled-->
<br/>
<div> Transaction Successful </div>
</div>
<ion-content *ngIf="!messageSuccess" class="colorBG">
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part -->
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChanged($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="line_details"
[ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','line_details')}}
</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-label>
</ion-segment-button>
<ion-segment-button value="3">
<ion-label>{{'general, attachment' | translate}}
</ion-label>
</ion-segment-button>
<ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" >
{{ts.trPK('worklistMain','info')}}
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<ion-slides pager="true" class="slides-gray-bullets">
<ion-slide class="slide-1">
<!-- <ion-slides pager="true" class="slides-gray-bullets">
<ion-slide class="slide-1"> -->
<ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
@ -40,8 +57,8 @@
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','description')}}
</label>
@ -49,8 +66,8 @@
<label for=""> {{ts.trPK('worklistMain','des-PO')}} {{PO_NUMBER}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
@ -61,17 +78,17 @@
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<!-- </ion-row>
<ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
@ -81,16 +98,16 @@
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
</label>
@ -98,40 +115,40 @@
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
</ion-col>
</ion-row>
<ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
<ion-col>
</ion-row >
<ion-row class="rowBorder" *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<!-- </ion-row>
<ion-row>
<ion-col>
<ion-row> -->
<!-- <ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
<br />
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
</ion-col>
</ion-col> -->
</ion-row>
<div *ngFor="let header of POHeader">
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Supplier')}} </label>
<br />
<label for="">{{header.VENDOR_NAME}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Site')}} </label>
<br />
@ -139,15 +156,15 @@
<label for="">{{header.VENDOR_SITE_CODE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Buyer')}} </label>
<br />
<label for="">{{header.BUYER}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Preparer')}} </label>
<br />
@ -155,15 +172,15 @@
<label for="">{{header.PREPARER}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','CreationDate')}}</label>
<br />
<label for="">{{header.CREATION_DATE}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipToLocation')}}
</label>
@ -172,16 +189,16 @@
<label for="">{{header.SHIP_TO_LOCATION_NAME}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','QuotationNumber')}}
</label>
<br />
<label for="">{{header.QUOTATION_NUMBER}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','QuotationDate')}}
</label>
@ -190,15 +207,15 @@
<label for="">{{header.QUOTATION_DATE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PaymentTerms')}} </label>
<br />
<label for="">{{header.PAYMENT_TERMS}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Currency')}} </label>
<br />
@ -206,15 +223,15 @@
<label for="">{{header.CURRENCY_NAME}} - {{header.LOC_CUR}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','GrossAmount')}} </label>
<br />
<label for="">{{header.GROSS_AMOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','DiscountAmount')}}
</label>
@ -223,16 +240,16 @@
<label for="">{{header.DISCOUNT_AMOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq"
for="">{{ts.trPK('worklistMain','TotalPODiscount')}}</label>
<br />
<label for="">{{header.TOTAL_PO_DISCOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','VATAmount')}} </label>
<br />
@ -241,15 +258,15 @@
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','CustomDuty')}} </label>
<br />
<label for="">{{header.CUSTOM_DUTY}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipHandle')}} </label>
<br />
@ -257,26 +274,17 @@
<label for="">{{header.SHIP_HANDLE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','OtherCharges')}}</label>
<br />
<label for="">{{header.OTHER_CHARGES}} </label>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Currency')}} </label>
<br />
<label for="">{{header.LOC_CUR}} </label>
</ion-col>
</ion-row>
<ion-row> -->
<!-- </ion-row>
<ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPOAmountWithVAT')}}
</label>
@ -286,14 +294,17 @@
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-row >
<ion-col class="">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPOAmountInWords')}}
</label>
<br />
<label for="">{{header.TOT_PO_AMT_WORD}} </label>
</ion-col>
<!-- <ion-col>
</ion-col> -->
</ion-row>
<!-- <ion-row>
<ion-col>
@ -348,39 +359,39 @@
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide>
<!-- <ion-card class="cardContent">
</ng-container>
<ng-container *ngIf="activeSegment === 'line_details'">
<!-- <ion-card class="cardContent">
<ion-card-content> -->
<div [hidden]="POLines && POLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemReqList" *ngIf="POLines && POLines.length > 0 ">
<div>
<ion-grid class="gridItemReq">
<ion-item class="itemReqContent" *ngFor="let Lines of POLines; let i=index;">
<!-- <ion-list class="itemReqList" *ngIf="POLines && POLines.length > 0 "> -->
<!-- <div> -->
<!-- <ion-grid class="gridItemReq"> -->
<accordin-custom >
<accordin-tab-custom *ngFor="let Lines of POLines; let i=index;" [header]="Lines.ITEM_DESCRIPTION" >
<div class="itemReqDiv">
<!-- <ion-item class="itemReqContent" > -->
<ion-row>
<ion-col class="colItemReqHeader">
<label for="">{{i+1}}. {{Lines.ITEM_DESCRIPTION}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<ion-row class="rowBorder">
<ion-col class="colItems colBorder ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col>
<ion-col class="colItems">
<ion-col class="colItems ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','MFG')}}
</label>
<br />
@ -390,8 +401,8 @@
</ion-row>
<ion-row>
<ion-col class="colItems">
<ion-row class="rowBorder">
<ion-col class="colItems colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','LINE_TYPE')}}
</label>
<br />
@ -410,9 +421,9 @@
</ion-row>
<ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems">
<ion-col class="colItems colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} </label>
<br />
@ -431,9 +442,9 @@
</ion-row>
<ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems">
<ion-col class="colItems colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
@ -452,9 +463,9 @@
</ion-row>
<ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems">
<ion-col class="colItems colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','NEED_TO')}} </label>
<br />
@ -474,9 +485,9 @@
</ion-row>
<ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems">
<ion-col class="colItems colBorder">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','DELIVER_TO')}}
</label>
<br />
@ -496,9 +507,9 @@
</ion-row>
<ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems">
<ion-col class="colItems ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','REQUEST')}} </label>
<br />
@ -506,12 +517,8 @@
<ion-label class="labelValue" for="">{{Lines.REQUESTOR}} </ion-label>
</ion-col>
<!-- <ion-col>
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} </label>
<br />
Quotation Analysis
<label for="">{{Item History}} </label>
</ion-col> -->
@ -519,7 +526,7 @@
</ion-row>
<ion-row>
<ion-row >
<ion-col>
@ -528,18 +535,11 @@
<button ion-button class="itemHISBtn"
(click)="getItemHistory(Lines.ITEM_ID)">
{{ts.trPK('worklistMain','ITEM_HIS')}}
<!-- (click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png"> -->
</button>
</div>
<!-- <label class="colItemReq" for="">{{ts.trPK('worklistMain','ITEM_HIS')}} </label> -->
<!-- <br /> -->
<!-- <label for="">{{Lines.REQUESTOR}} </label> -->
</ion-col>
<ion-col>
@ -549,10 +549,7 @@
<button ion-button class="itemHISBtn"
(click)="getQutationAnalysis(Lines.PO_HEADER_ID ,Lines.ITEM_ID)">
{{ts.trPK('worklistMain','QUOTATION_ANALYSIS')}}
<!-- (click)="getQutationAnalysis(Lines.PO_HEADER_ID ,Lines.ITEM_CODE)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png"> -->
</button>
</div>
@ -560,32 +557,36 @@
</ion-row>
</div>
</ion-item>
</div>
<!-- </ion-item> -->
</accordin-tab-custom>
</accordin-custom>
</ion-grid>
</div>
</ion-list>
<!-- </ion-grid>
</div> -->
<!-- </ion-list> -->
<!-- </ion-card-content>
</ion-card> -->
</ion-slide>
<ion-slide>
</ng-container>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent">
<ion-card-content>
<div [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<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">
<ion-item *ngFor="let actionHistory of actionHistoryRes; let index=index">
<div class="timeline-item" slot="start">
<div>
<!-- <div>
<button ion-button
(click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
@ -595,20 +596,47 @@
<img src="../assets/imgs/noteSmall.png">
</button>
</div>
</div> -->
<div [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-dot' : actionHistory.ACTION === 'Pending' ,'bg-red-dot' : actionHistory.ACTION === 'Rejected','bg-green-dot' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
class="timeline-thumb timeline-icon">
</div>
<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="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}} {{actionHistory.NOTE}}
</div>
<button class="showMore" (click)="actionHistory.visible = !actionHistory.visible">{{ actionHistory.visible ? 'Show less': 'Show More' }}</button>
</div>
</div>
</div>
<!-- [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" -->
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
[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> {{actionHistory.NAME}}
</ion-label>
<ion-label> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory"> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
</ion-item>
</div>
@ -619,72 +647,110 @@
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
<div [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
</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>
<div *ngFor="let attachList of attachmentRes">
<ion-row (click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<ion-col col-12>
<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>
</ion-col>
<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>
<!-- </ion-slides> -->
</ion-row>
</div>
</ion-grid>
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
</div>
</ion-col>
</ion-row>
</ion-content>
</div>
</ion-card-content>
</ion-card>
</ion-slide>
<div *ngIf="messageSuccess" class="succssfullMSG">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon> <!--filled-->
<br/>
<div> Transaction Successful </div>
</div>
</ion-slides>
<ion-footer *ngIf="!messageSuccess" class="footerSearchBtn">
</ion-content>
<ion-footer class="footerSearchBtn">
<ion-row>
<!-- <ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
</div>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-2>
</ion-row> -->
<!-- <ion-row class="rowBtn" *ngIf="notificationButtonRes?.length >0">
<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;" *ngIf="notiActionBtnMore != '' && notiActionBtnMore == undefined" class="actionBtn" (click)="openMoreActions()">
more
</ion-button>
</ion-row> -->
<!-- <ion-row >
<ion-col col-2>
</ion-col>
<ion-col col-8>
<ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem actionList">
<ion-item *ngIf="notificationButtonRes?.length >0 " class="requiredItem actionList">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
<ion-select (ionChange)="actionButton()" okText="{{ts.trPK('general','ok')}}"
cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="actionType" required>
@ -703,11 +769,39 @@
</ion-button>
</ion-col>
</ion-row>
</ion-row> -->
<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 (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label>More</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-footer>

@ -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;
// }

@ -32,6 +32,9 @@ import { POItemHistoryRes } from '../models/POItemHistoryRes';
import { POItemHistoryRequest } from '../models/POItemHistoryReq';
import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
import { QuotationAnalysisRequest } from '../models/quotationAnalysisReq';
import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component'
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
@Component({
selector: 'app-worklist-main-po',
@ -44,12 +47,14 @@ export class WorklistMainPoComponent implements OnInit {
private WorkListActionObj: WorkListActionRequest;
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
private WorkListAttachObj: WorkListButtonRequest;
private PRList:PRNotificatonBodyList
private PRList: PRNotificatonBodyList;
public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
public static PASS_PO_INFO = "passPOInfo";
public static PASS_PO_HEADER_ID = "passPOHeader";
public static PASS_ACTION_MODE = "passActionMode";
public static PASS_ACTION_MORE = "passActioMore";
getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr";
TransactionID: number = -999;
@ -71,13 +76,13 @@ export class WorklistMainPoComponent implements OnInit {
selEmployeeID: any;
actionType: string = "";
notificationArray: any;
notificationDynamicAttributeArr:any;
notificationDynamicAttributeArr: any;
private textInput: TextInput;
private textArea: TextAreaInput;
notificationCount: any;
attachmentRes:any;
PRHeader:any;//change the tpye later
PRLines:any;//change the tpye later
attachmentRes: any;
PRHeader: any;//change the tpye later
PRLines: any;//change the tpye later
IsReachEnd: boolean = false;
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 100;
@ -95,6 +100,22 @@ export class WorklistMainPoComponent implements OnInit {
PO_NUMBER: any;
itemHistoryRes: any;
QutationAnalysisRes: any;
activeSegment: any = "info";
lines_note_limit: number = 15;
notiActionBtnMore: any = [];
demoeAttach: any = [];
orgNote: any;
truncating: boolean = true;
hidden: boolean = true;
selectedIndex = -1;
showLessBtn: boolean;
showMoreBtn: boolean = true;
selectedAction: any = [];
messageSuccess: boolean = false;
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
constructor(
public common: CommonService,
@ -106,7 +127,7 @@ export class WorklistMainPoComponent implements OnInit {
public worklistAttachService: WorklistAttachService,
private modalCtrl: ModalController,
public worklistService: WorklistService,
) {
) {
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
@ -118,43 +139,13 @@ export class WorklistMainPoComponent implements OnInit {
this.intializeNotificationDetail();
let segment = document.querySelector('ion-segment');
let slides = document.querySelector('ion-slides');
segment.addEventListener('ionChange', (ev) => onSegmentChange(ev));
slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev));
// On Segment change slide to the matching slide
function onSegmentChange(ev) {
console.log("ev.detail.value"+ev.detail.value);
slideTo(ev.detail.value);
}
function slideTo(index) {
console.log("index: "+index);
slides.slideTo(index);
}
// On Slide change update segment to the matching value
async function onSlideDidChange(ev) {
var index = await slides.getActiveIndex();
console.log("index: "+index);
clickSegment(index);
}
function clickSegment(index) {
segment.value = index;
}
}//ngOn
intializeNotificationDetail() {
document.getElementById("notificationDynamicFields").innerHTML="";
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
}
console.log("intializeNotificationDetail");
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
@ -194,18 +185,24 @@ export class WorklistMainPoComponent implements OnInit {
this.getActionHistory(this.WorkListActionHistoryObj);
this.getAttachmentNotification(this.WorkListAttachObj);
if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){
this.getPONotificationDetails(this.WorkListBodyObj);
}
if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") {
this.getPONotificationDetails(this.WorkListBodyObj);
}
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
}
getPONotificationDetails(notificationBodyObj){
getPONotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
this.handleWorkListBodyResult(result, "PO");
});
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
this.handleWorkListBodyResult(result, "PO");
});
}
handleWorkListBodyResult(result, Type) {
@ -224,64 +221,64 @@ export class WorklistMainPoComponent implements OnInit {
this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList;
}
}else if (Type == "PR") {
} else if (Type == "PR") {
if (result.GetPrNotificationBodyList) {
console.log("PR");
this.PRHeader=result.GetPrNotificationBodyList.PRHeader;
this.PRLines=result.GetPrNotificationBodyList.PRLines;
for( var i = 0; i < this.PRHeader.length; i++){
if(this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total'){
this.totalH=this.PRHeader[i].HDR_ATTRIBUTE_NAME;
this.valueH=this.PRHeader[i].HDR_ATTRIBUTE_VALUE;
this.PRHeader = result.GetPrNotificationBodyList.PRHeader;
this.PRLines = result.GetPrNotificationBodyList.PRLines;
for (var i = 0; i < this.PRHeader.length; i++) {
if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') {
this.totalH = this.PRHeader[i].HDR_ATTRIBUTE_NAME;
this.valueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE;
//this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"
}
if(this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax'){
this.taxH=this.PRHeader[i].HDR_ATTRIBUTE_NAME;
this.taxvalueH=this.PRHeader[i].HDR_ATTRIBUTE_VALUE;
//this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"
}
if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') {
this.taxH = this.PRHeader[i].HDR_ATTRIBUTE_NAME;
this.taxvalueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE;
}
// HDR_ATTRIBUTE_VALUE
}
// HDR_ATTRIBUTE_VALUE
}
this.notificationBodyRes =
result.GetPrNotificationBodyList;
}
}else if (Type == "PO") {
if (result.GetPoNotificationBodyList) {
console.log("PO");
this.POHeader=result.GetPoNotificationBodyList.POHeader;
this.POLines=result.GetPoNotificationBodyList.POLines;
for( var i = 0; i < this.POHeader.length; i++){
this.PO_NUMBER=this.POHeader[i].PO_NUMBER;
} else if (Type == "PO") {
if (result.GetPoNotificationBodyList) {
console.log("PO");
if(this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total'){
this.totalH=this.POHeader[i].HDR_ATTRIBUTE_NAME;
this.valueH=this.POHeader[i].HDR_ATTRIBUTE_VALUE;
this.POHeader = result.GetPoNotificationBodyList.POHeader;
this.POLines = result.GetPoNotificationBodyList.POLines;
for (var i = 0; i < this.POHeader.length; i++) {
this.PO_NUMBER = this.POHeader[i].PO_NUMBER;
//this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"
}
if(this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax'){
this.taxH=this.POHeader[i].HDR_ATTRIBUTE_NAME;
this.taxvalueH=this.POHeader[i].HDR_ATTRIBUTE_VALUE;
if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') {
this.totalH = this.POHeader[i].HDR_ATTRIBUTE_NAME;
this.valueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE;
//this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"
}
if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') {
this.taxH = this.POHeader[i].HDR_ATTRIBUTE_NAME;
this.taxvalueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE;
}
// HDR_ATTRIBUTE_VALUE
}
this.notificationBodyRes =
result.GetPoNotificationBodyList;
}
// HDR_ATTRIBUTE_VALUE
}
this.notificationBodyRes =
result.GetPoNotificationBodyList;
}
}//
}
}//
}
} //End handleWorkListBodyResult
getNotificationButtons(notificationButtonsObj) {
this.worklistMainService
.getNotificationButtons(notificationButtonsObj)
@ -292,14 +289,31 @@ export class WorklistMainPoComponent implements OnInit {
handleWorkListButtonsResult(result) {
if (this.common.validResponse(result)) {
this.notiActionBtnMore = []
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetNotificationButtonsList != null) {
this.notificationButtonRes = result.GetNotificationButtonsList;
} // if result == null
} // valid it
} // End handleWorkListButtonsResult
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
} // valid it
} // valid it
} // End handleWorkListButtonsResult
}
applyAction(WorkListActionObj) {
console.log("applyactio");
this.worklistMainService
.actionButton(WorkListActionObj)
.subscribe((result: any) => {
@ -310,14 +324,14 @@ export class WorklistMainPoComponent implements OnInit {
handleApplayActionResult(result) {
if (this.common.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
this.messageSuccess = true;
setTimeout(() => {
this.messageSuccess = false;
}, 5000);
this.getNotificationCountAfterSubmit();
this.nextNotfification();
}
@ -345,11 +359,16 @@ export class WorklistMainPoComponent implements OnInit {
}
}
actionButton() {
let ButtonAction: string = this.actionType;
actionButton(action) {
console.log("actionButton" + action);
alert("don't forget");
//let ButtonAction: string = this.actionType;
let ButtonAction: string = action;
var responseAttrDic = this.notExampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let i=0;i<this.notificationDynamicAttributeArr.length;i++) {
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
@ -358,8 +377,8 @@ export class WorklistMainPoComponent implements OnInit {
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else if(this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE=="VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE =(document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
@ -387,43 +406,43 @@ export class WorklistMainPoComponent implements OnInit {
// this.WorkListActionObj,
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO
// );
if (ButtonAction == "APPROVE"){
this.confirmMsg =this.ts.trPK('worklistMain', 'approveMsg')
if (ButtonAction == "APPROVE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction == "REJECT"){
this.confirmMsg =this.ts.trPK('worklistMain', 'rejectMsg')
else if (ButtonAction == "REJECT") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
else if (ButtonAction == "DEL"){
this.confirmMsg =this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction == "DEL") {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction == "CLOSE"){
this.confirmMsg =this.ts.trPK('worklistMain', 'closeMsg')
}
else if (ButtonAction == "CLOSE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
this.common.confirmAlertDialogAction(
}
this.common.confirmAlertDialogAction(
() => {
this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'),
() => {}, this.ts.trPK('general', 'cancel'),
}, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg);
this.confirmMsg);
// alert.onDidDismiss((data) => {
// if (data == true) {
// this.continueDelete(attach);
// }
// });
//this.openApplyModal(this.WorkListActionObj);
////////////this.applyAction(this.WorkListActionObj);
}
@ -448,7 +467,8 @@ export class WorklistMainPoComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPoComponent.PASS_RES_ATTR
);
this.common.openWorklistRFCPage();
//this.common.openWorklistRFCPage();
this.openRFCModal();
} else if (ButtonAction == "ANSWER_INFO") {
// this.navCtrl.push("WorkListReplacmentRollPage", {
// pQuestion: this.pQuestion,
@ -469,7 +489,8 @@ export class WorklistMainPoComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPoComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" ||
@ -495,7 +516,8 @@ export class WorklistMainPoComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPoComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
@ -587,29 +609,29 @@ export class WorklistMainPoComponent implements OnInit {
this.hideForwordEmployee = result.NotificationRespondRolesList[0];
}
this.notificationDynamicFields(result.NotificationGetRespondAttributesList);
this.NotificationGetRespondAttributesList=result.NotificationGetRespondAttributesList;
this.NotificationGetRespondAttributesList = result.NotificationGetRespondAttributesList;
this.common.sharedService.setSharedData(
this.NotificationGetRespondAttributesList,
WorklistMainPoComponent.PASS_RES_ATTR
);
this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList;
this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList;
if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema);
} // valid it
} // End handleWorkListButtonsResult
notificationDynamicFields(notificationAttr){
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
for(let i=0;i<notificationAttr.length;i++){
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="ROLE"){
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="DATE"){
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="NUMBER"){
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") {
}
}
}
@ -658,8 +680,8 @@ export class WorklistMainPoComponent implements OnInit {
getAttachmentNotification(WorkListAttachObj) {
getAttachmentNotification(WorkListAttachObj) {
this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => {
@ -689,6 +711,7 @@ export class WorklistMainPoComponent implements OnInit {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
this.P_PAGE_NUM++;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
let lastItemIndex = this.actionHistoryRes.length - 1;
@ -701,20 +724,22 @@ export class WorklistMainPoComponent implements OnInit {
}
}
}
this.turnCateFun(this.actionHistoryRes);
}
}
async openNoteDetail(note,sender) {
async openNoteDetail(note, sender) {
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
// modalPage.present();
console.log("note"+note);
console.log("note" + note);
this.common.sharedService.setSharedData(note, 'ViewNoteModalPage')
this.common.sharedService.setSharedData(sender,'ViewNoteModalPageSender')
this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender')
const modal = await this.modalCtrl.create({
component: ViewNoteModalComponent,
backdropDismiss:false,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
@ -755,7 +780,7 @@ export class WorklistMainPoComponent implements OnInit {
}
}//end infiniteScroll
//**********Attachment *****************//
//**********Attachment *****************//
async OpenAttachFiles(value, Type) {
@ -774,9 +799,9 @@ export class WorklistMainPoComponent implements OnInit {
console.log(itemID);
this.IsReachEnd = false;
const request = new POItemHistoryRequest();
request.P_ITEM_ID=parseInt(itemID);
request.P_PAGE_LIMIT=100;
request.P_PAGE_NUM=1;
request.P_ITEM_ID = parseInt(itemID);
request.P_PAGE_LIMIT = 100;
request.P_PAGE_NUM = 1;
this.worklistMainService.getPOItemHistory(request).
subscribe((result: POItemHistoryRes) => {
// this.common.sharedService.setSharedData(
@ -788,7 +813,7 @@ export class WorklistMainPoComponent implements OnInit {
WorklistMainPoComponent.PASS_PO_INFO
);
//open page
// this.common.openItemHistoryPage();
// this.common.openItemHistoryPage();
this.handleItemHistoryResult(result);
});
}
@ -801,21 +826,22 @@ export class WorklistMainPoComponent implements OnInit {
}
}
else{
else {
this.common.presentAlert(
this.ts.trPK("general", "empty")
); }
);
}
}
getQutationAnalysis(headerID,itemID) {
console.log(itemID+headerID);
getQutationAnalysis(headerID, itemID) {
console.log(itemID + headerID);
this.IsReachEnd = false;
const request = new QuotationAnalysisRequest();
request.P_ITEM_ID=parseInt(itemID);
request.P_PO_HEADER_ID=headerID;
request.P_PAGE_LIMIT=100;
request.P_PAGE_NUM=1;
request.P_ITEM_ID = parseInt(itemID);
request.P_PO_HEADER_ID = headerID;
request.P_PAGE_LIMIT = 100;
request.P_PAGE_NUM = 1;
this.worklistMainService.getQutationAnalysis(request).
subscribe((result: QuotationAnalysisResponse) => {
this.common.sharedService.setSharedData(
@ -827,7 +853,7 @@ export class WorklistMainPoComponent implements OnInit {
WorklistMainPoComponent.PASS_PO_HEADER_ID
);
//open page
this.handleQutationAnalysisResult(result);
});
@ -840,10 +866,10 @@ export class WorklistMainPoComponent implements OnInit {
//open page
//set sheard data
//
this.common.openQutationAnalysisPage();
this.common.openQutationAnalysisPage();
// this.QutationAnalysisRes = result.GetQutationAnalysisList;
// this.P_PAGE_NUM++;
// let lastItemIndex = this.QutationAnalysisRes.length - 1;
@ -856,18 +882,19 @@ export class WorklistMainPoComponent implements OnInit {
// }
// }
}//hasData
else{
this.common.presentAlert(
this.ts.trPK("general", "empty")
); }
else {
this.common.presentAlert(
this.ts.trPK("general", "empty")
);
}
}
}
loadMoreNotificationBody() {
console.log("loadMoreNotificationBody PO");
if (!this.IsReachEnd) {
console.log("this.IsReachEnd"+ this.IsReachEnd);
console.log("this.IsReachEnd" + this.IsReachEnd);
this.worklistMainService.getPONotificationBody(this.WorkListBodyObj).
subscribe((result: any) => {
@ -882,9 +909,9 @@ export class WorklistMainPoComponent implements OnInit {
this.IsReachEnd = false;
}
this.notificationBodyRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("test")
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("test")
);
}// if list length >0
else {
@ -892,7 +919,7 @@ export class WorklistMainPoComponent implements OnInit {
}
}// if response == 1
//this.pageNum++;
// infiniteScroll.target.complete();
// infiniteScroll.target.complete();
});
} else {
@ -918,25 +945,155 @@ export class WorklistMainPoComponent implements OnInit {
this.IsReachEnd = false;
}
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
}, (Error) => console.log(Error), () =>
//infiniteScroll.target.complete()
console.log("TEST"));
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
// infiniteScroll.target.complete();
// infiniteScroll.target.complete();
});
} else {
//if (infiniteScroll)
//infiniteScroll.target.complete();
//infiniteScroll.target.complete();
}
}//end infiniteScroll
async openMoreActions() {
const modal = await this.modalCtrl.create({
component: MoreActionModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
// this.selectedAction = data.data;
this.actionType = data.data.BUTTON_ACTION;
console.log(this.actionType);
///call Action button
this.actionButton(this.actionType);
}
});
return await modal.present();
}
///////////////////////////////////////////
public checkLines(note) {
console.log(note.split("\n").length);
console.log(note.length);
if (note && note != null) {
return (note.length > this.lines_note_limit) ? true : false;
}
return false;
};
public turnCateFun(actionHis) {
for (let i = 0; i < actionHis.length; i++) {
actionHis[i].visible = false;
}
// actionHis.map((obj) => {
// obj.visible = false;
// // or via brackets
// // obj['total'] = 2;
// return obj;
// })
this.actionHistoryRes = actionHis;
console.log("test");
}
async openRepRolModal() {
const modal = await this.modalCtrl.create({
component: WorkListReplacementRollComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
async openRFCModal() {
const modal = await this.modalCtrl.create({
component: WorkListRfcComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
}

@ -1,186 +1,184 @@
<ion-header>
<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-toolbar class="slideToolBar">
<ion-segment class="segmentPR" scrollable>
<ion-segment-button value="0" checked>
<!-- <ion-icon name="call">arrowRight</ion-icon> -->
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="1">
<!-- <ion-icon name="cloud-upload"></ion-icon> -->
<ion-label> {{ts.trPK('worklistMain','itemReq')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="2">
<!-- <ion-icon name="paper"></ion-icon> -->
<ion-label>
{{'worklistMain, actionHis' | translate}}
</ion-label>
</ion-segment-button>
<ion-segment-button value="3">
<!-- <ion-icon name="code-working"></ion-icon> -->
<ion-label>{{'general, attachment' | translate}}
</ion-label>
</ion-segment-button>
</ion-segment>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<ion-content *ngIf="!messageSuccess" class="colorBG">
<div class="subjectNotification">{{getPassNotificationDetails.SUBJECT}}</div>
<!-- add segemnt part -->
<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','itemReq')}}
</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-slides pager="true" class="slides-gray-bullets">
<ion-slide class="slide-1">
</ion-segment-button>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
{{ts.trPK('worklistMain','info')}}
</ion-segment-button>
</ion-segment>
<ion-card class="cardContent">
<!-- <ion-card-header class="boxHdr">
<ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ion-card class="cardContent">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
</ion-card-header> -->
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row>
<ion-col>
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
</label>
<br />
<!-- </ion-col>
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row>
<ion-col>
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
</ion-row>
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<!-- </ion-col>
<!-- </ion-col>
<ion-col> -->
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
<br />
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
<br />
<!-- </ion-col>
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<!-- </ion-col>
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
</label>
<br />
<!-- </ion-col>
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<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>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<!-- </ion-col>
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
</ion-col>
<!-- </ion-row> -->
<!-- <ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' "> -->
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<ion-row>
<!-- <ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
</ion-col>
<ion-col>
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
</ion-col>
</ion-row>
<!-- notificationBodyRes -->
</ion-row> -->
<div *ngFor="let header of PRHeader">
<!-- notificationBodyRes -->
<ion-row
*ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'">
<!-- *ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"> -->
<div *ngFor="let header of PRHeader">
<ion-col>
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
<br />
<ion-row
*ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'">
<!-- *ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"> -->
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
</ion-col>
</ion-row>
<ion-col>
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
<br />
</div>
<br />
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
</ion-col>
</ion-row>
</div>
<br />
<ion-grid>
<div>
<ion-row style="text-align: center !important">
<ion-col *ngIf="totalH">
<div class="colItemReq" style="text-align: center !important">{{totalH}}</div>
<div class="labelTotal">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="labelTotal">{{taxvalueH}}</div>
<ion-grid>
<div>
<ion-row style="text-align: center !important">
<ion-col *ngIf="totalH">
<div class="colItemReq" style="text-align: center !important">{{totalH}}</div>
<div class="labelTotal">{{valueH}}</div>
</ion-col>
</ion-row>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="labelTotal">{{taxvalueH}}</div>
</div>
</ion-grid>
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-grid>
<button [hidden]="IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
</ion-card-content>
</ion-grid>
<button [hidden]="IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load
More</button>
</ion-card-content>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
</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>
@ -189,129 +187,115 @@
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
</ion-select>
</ion-item> -->
</ion-card-content>
</ion-card>
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide>
<!-- <ion-card class="cardContent"> -->
<!-- <ion-card-header class="boxHdr">
</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> -->
<!-- <ion-card-content> -->
<div [hidden]="PRLines && PRLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div [hidden]="PRLines && PRLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemReqList" *ngIf="PRLines && PRLines.length > 0 ">
<div>
<ion-grid class="gridItemReq">
<ion-item class="itemReqContent" *ngFor="let Lines of PRLines; let i=index; ">
<div class="itemReqDiv">
<ion-row>
<accordin-custom>
<accordin-tab-custom *ngFor="let Lines of PRLines; let i=index;" [header]="Lines.DESCRIPTION">
<div class="itemReqDiv">
<!-- <ion-row>
<ion-col class="colItemReqHeader">
<!-- <label for="">{{ts.trPK('worklistMain','description')}}
</label> -->
<!-- </ion-col>
<ion-col> -->
<label for="">{{i+1}}. {{Lines.DESCRIPTION}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}}
</label>
<br />
<!-- </ion-col>
</ion-row> -->
<ion-row class="rowBorder">
<ion-col class="colItems colBorder ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.COST_CENTER}} </ion-label>
</ion-col>
<!-- </ion-row>
<ion-label class="labelValue" for="">{{Lines.COST_CENTER}} </ion-label>
</ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br />
<!-- </ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colItems colBorder ">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label>
</ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label>
</ion-col>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems colBorder ">
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} </label>
<br />
<!-- </ion-row>
<ion-row> -->
<ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label>
</ion-col>
</ion-row>
</div>
</ion-item>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
</ion-grid>
<ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label>
</ion-col>
</ion-row>
</div>
</ion-list>
<!-- </ion-card-content> -->
<!-- </ion-card> -->
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
<div [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">
</accordin-tab-custom>
</accordin-custom>
<div class="timeline-item" slot="start">
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
<!-- [hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"> -->
</ng-container>
<ng-container *ngIf="activeSegment === 'action-history'">
<ion-card class="cardContent">
<ion-card-content>
<div>
<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; let index=index">
<div class="timeline-item" slot="start">
<!-- <div>
<button ion-button
(click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
@ -320,97 +304,112 @@
<img src="../assets/imgs/noteSmall.png">
<!-- <ion-icon name="bookmark"></ion-icon> -->
</button>
</div>
<!-- [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' ,'statusGreanColor' :appointmentsArrive.Status != 1 && appointmentsArrive.Status != 2, 'statusRedColor' :appointmentsArrive.Status === 2}" -->
</div> -->
<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 [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-dot' : actionHistory.ACTION === 'Pending' ,'bg-red-dot' : actionHistory.ACTION === 'Rejected','bg-green-dot' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
class="timeline-thumb timeline-icon">
</div>
</div>
<ion-col>
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label> {{actionHistory.NAME}}
</ion-label>
<ion-label> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
</ion-item>
</div>
</ion-list>
</div>
</div>
<ion-col>
<ion-label style="color:black !important ;font-weight: bold;">
{{actionHistory.NAME}}
</ion-label>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
<div *ngIf="actionHistory.NOTE">
<div *ngIf="actionHistory.NOTE != '' ">
<div *ngIf="!checkLines(actionHistory.NOTE)">
<div class="containerNote">
Note: {{actionHistory.NOTE}}
</div>
</div>
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
<div [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'worklistMain, suppDoc' | translate}}</div>
</ion-card-header>
<ion-card-content>
-->
<ion-grid>
<div *ngFor="let attachList of attachmentRes">
<ion-row (click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<ion-col col-12>
<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 *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>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
</ion-col>
<!-- <ion-col col-2>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
</ion-col> -->
</ion-row>
</div>
</ion-grid>
<!-- </ion-card-content>
</ion-card> -->
<!-- *ngIf="!checkLines(actionHistory.NOTE)" -->
</div>
<!-- [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" -->
<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>
</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'">
<!-- <ion-card class="cardContent">
<ion-card-content> -->
<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>
</ion-card-content>
</ion-card>
</ion-slide>
<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>
</ion-slides>
<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 id="notificationDynamicFields">
</div> -->
</ion-content>
<ion-footer class="footerSearchBtn">
</div>
<!-- </ion-card-content>
</ion-card> -->
</ng-container>
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
@ -418,14 +417,28 @@
</ion-col>
</ion-row>
<ion-row>
<!-- <div class="centerDiv"> -->
</ion-content>
<div *ngIf="messageSuccess" class="succssfullMSG">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
<br />
<div> Transaction Successful </div>
</div>
<ion-footer *ngIf="!messageSuccess" class="footerSearchBtn">
<!-- <ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
</div>
</ion-col>
</ion-row> -->
<!-- <ion-row class="rowBtn">
<ion-col col-2>
</ion-col>
<ion-col col-8>
<!-- <ion-button color="customnavy" class="gridBtn" (click)="actionButton()"> {{ts.trPK('general','submit')}}
</ion-button> -->
<ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem actionList">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
@ -438,7 +451,6 @@
</ion-item>
</ion-col>
<!-- </div> -->
<ion-col col-2 style="bottom: -8px">
<ion-button class="skipbutton" (click)="nextNotfification()">
@ -447,10 +459,59 @@
</ion-button>
</ion-col>
</ion-row>
</ion-row> -->
<!-- <ion-row class="rowBtn" *ngIf="notificationButtonRes?.length >0">
<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;" *ngIf="notiActionBtnMore != '' && notiActionBtnMore == undefined" class="actionBtn" (click)="openMoreActions()">
more
</ion-button>
</ion-row> -->
<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 (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label>More</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>

@ -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;
// }

@ -28,6 +28,10 @@ import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.compo
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component';
import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component';
import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component';
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
@Component({
selector: 'app-worklist-main-pr',
templateUrl: './worklist-main-pr.component.html',
@ -83,6 +87,19 @@ export class WorklistMainPRComponent implements OnInit {
confirmMsg: string;
delMsg: string;
closeMsg: string;
truncating: boolean;
orgNote: any;
lines_note_limit: any = 15;
selectedIndex: any;
showLessBtn: boolean;
showMoreBtn: boolean;
demoeAttach: any = [];
notiActionBtnMore: any = [];
messageSuccess: boolean = false;
activeSegment: any = "info";
approveDis: boolean;
rejectDis: boolean;
requestDis: boolean;
constructor(
@ -109,43 +126,19 @@ export class WorklistMainPRComponent implements OnInit {
this.intializeNotificationDetail();
let segment = document.querySelector('ion-segment');
let slides = document.querySelector('ion-slides');
segment.addEventListener('ionChange', (ev) => onSegmentChange(ev));
slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev));
// On Segment change slide to the matching slide
function onSegmentChange(ev) {
console.log("ev.detail.value" + ev.detail.value);
slideTo(ev.detail.value);
}
function slideTo(index) {
console.log("index: " + index);
}
slides.slideTo(index);
}
// On Slide change update segment to the matching value
async function onSlideDidChange(ev) {
var index = await slides.getActiveIndex();
console.log("index: " + index);
clickSegment(index);
}
function clickSegment(index) {
segment.value = index;
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
}
}
intializeNotificationDetail() {
document.getElementById("notificationDynamicFields").innerHTML = "";
console.log("intializeNotificationDetail");
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
@ -197,6 +190,10 @@ export class WorklistMainPRComponent implements OnInit {
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
}
getPRNotificationDetails(notificationBodyObj) {
this.worklistMainService
@ -298,7 +295,20 @@ export class WorklistMainPRComponent implements OnInit {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetNotificationButtonsList != null) {
this.notificationButtonRes = result.GetNotificationButtonsList;
} // if result == null
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
} // valid it
}
} // valid it
} // End handleWorkListButtonsResult
@ -313,14 +323,14 @@ export class WorklistMainPRComponent implements OnInit {
handleApplayActionResult(result) {
if (this.common.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
//this.common.openHome();
//this.common.openNotificationPage();
// for( var i = 0; i < this.notificationArray.length; i++){
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
// this.notificationArray.splice(i, 1);
// }
// }
// show succsfull popup
this.messageSuccess = true;
setTimeout(() => {
this.messageSuccess = false;
}, 5000);
this.getNotificationCountAfterSubmit();
this.nextNotfification();
}
@ -348,8 +358,14 @@ export class WorklistMainPRComponent implements OnInit {
}
}
actionButton() {
let ButtonAction: string = this.actionType;
actionButton(action) {
console.log("actionButton" + action);
alert("don't forget");
//let ButtonAction: string = this.actionType;
let ButtonAction: string = action;
var responseAttrDic = this.notExampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
@ -451,7 +467,8 @@ export class WorklistMainPRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPRComponent.PASS_RES_ATTR
);
this.common.openWorklistRFCPage();
// this.common.openWorklistRFCPage();
this.openRFCModal();
} else if (ButtonAction == "ANSWER_INFO") {
// this.navCtrl.push("WorkListReplacmentRollPage", {
// pQuestion: this.pQuestion,
@ -472,7 +489,8 @@ export class WorklistMainPRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPRComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" ||
@ -498,7 +516,8 @@ export class WorklistMainPRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPRComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
@ -703,6 +722,8 @@ export class WorklistMainPRComponent implements OnInit {
}
}
}
this.turnCateFun(this.actionHistoryRes);
}
}
@ -876,9 +897,136 @@ export class WorklistMainPRComponent implements OnInit {
//infiniteScroll.target.complete();
}
}//end infiniteScroll
////////////////////////////////////////////////////////
public checkLines(note) {
console.log(note.split("\n").length);
console.log(note.length);
if (note && note != null) {
}
return (note.length > this.lines_note_limit) ? true : false;
}
return false;
};
public turnCateFun(actionHis) {
for (let i = 0; i < actionHis.length; i++) {
actionHis[i].visible = false;
}
// actionHis.map((obj) => {
// obj.visible = false;
// // or via brackets
// // obj['total'] = 2;
// return obj;
// })
this.actionHistoryRes = actionHis;
console.log("test");
}
async openMoreActions() {
const modal = await this.modalCtrl.create({
component: MoreActionModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
// this.selectedAction = data.data;
this.actionType = data.data.BUTTON_ACTION;
console.log(this.actionType);
this.actionButton(this.actionType);
///call Action button
}
});
return await modal.present();
}
async openRepRolModal() {
const modal = await this.modalCtrl.create({
component: WorkListReplacementRollComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
async openRFCModal() {
const modal = await this.modalCtrl.create({
component: WorkListRfcComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
}

@ -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>

@ -69,4 +69,202 @@
color: var(--secondary);
border: 2px solid var(--gray);
min-width: auto;
}
}
////////////////////////
.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;
margin-top: -3px;
}
.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%;
}
////////////////////////////////
.subOrdinateList{
// margin: 10px;
// border-top-left-radius: 45px;
// border-bottom-left-radius: 45px;
// border: var(--cusgray) 1px solid !important;
--background: transparent;
margin-left: -15px;
margin-right: 7px;
}
.status{
text-align: center;
background: green;
border-radius: 10px;
font-size: 12px;
height: 40px;
color: white;
}
.rowHeader{
border-bottom: 1px solid var(--cusgray);
padding-bottom: 10px;
margin-bottom: -17px;
}
.container{
position:relative;
}
.overflow-hid-div{
overflow:hidden;
margin-left:50px;
width:200px;
height: 200px;
background-color:red;
}
.inner{
width:50px;
height: 50px;
background-color:green;
position: absolute;
left:25px;
top:25px;
}
.gridSubordinates{
margin-left: 38px;
border-top-left-radius: 28px;
border-bottom-left-radius: 40px;
// padding-left: 8px;
background:var(--light);
border-top-right-radius: 16px;
border-bottom-right-radius: 16px;
}
.subOrdinateDiv{
z-index: 4;
margin-left: -44px;
position: absolute;
top: -2px;
}
.subOrdinateImg{
width: 85px;
border: #e4e4e4 solid 2px;
-moz-border-radius: 50%;
border-radius: 50%;
border: 3px solid #f0efef;
}
.subOrdinateRow{
margin-left: 40px;
}
.label{
font-size: 14px;
}
.subjectNotification{
text-align: center;
padding-top: 10px;
font-weight: bold;
}
.submitterInfo{
padding-top: 10px;
padding-bottom: 10px;
}
ion-card{
color: black !important;
}
////
.tabBar{
height:70px
}

@ -15,10 +15,29 @@ import { HomeComponent } from "src/app/notification/home/home.component";
import { TextInput } from 'src/app/uI-elements/text.input';
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
import { Events } from '@ionic/angular';
import { Events, ModalController } from '@ionic/angular';
import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes';
import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes';
import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes';
import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes';
import { WorklistAttachService } from 'src/app/absence/service/work-list-attach.service';
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
import { WorklistService } from '../service/worklist.service';
import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component';
import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component';
import { GetSubordinatesLeavesRequest } from '../../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest';
import { DashboredService } from '../../hmg-common/services/dashbored/dashbored.service'
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { WorklistsubmitterInfoResponse } from '../models/WorklistsubmitterInfoRes';
import { WorkListSubmitterInfoRequest } from '../models/WorklistsubmitterInfoReq';
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component';
@Component({
selector: "app-worklist-main",
templateUrl: "./worklist-main.component.html",
@ -51,29 +70,85 @@ export class WorklistMainComponent implements OnInit {
selEmployeeID: any;
actionType: string = "";
notificationArray: any;
notificationDynamicAttributeArr:any;
notificationDynamicAttributeArr: any;
private textInput: TextInput;
private textArea: TextAreaInput;
private WorkListAttachObj: WorkListButtonRequest;
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 100;
notificationCount: any;
activeSegment: any = "info";
lines_note_limit: any = 15;
attachmentRes: any;
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
IsReachEnd: boolean = false;
notiActionBtnMore: any = [];
messageSuccess: boolean = false;
confirmMsg: string;
newArr: any = [];
selEmp: any;
subordinatesleaveList: any;
private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest;
submitterInfoRes: any;
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
moreDisabled: boolean = true;
constructor(
public worklistService: WorklistService,
public common: CommonService,
public ts: TranslatorService,
public worklistMainService: WorklistMainService,
public elementRef: ElementRef,
public menuService: MenuService,
public events: Events,
) { }
public worklistAttachService: WorklistAttachService,
private modalCtrl: ModalController,
public dashboredService: DashboredService,
public authService: AuthenticationService
) {
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
}
ngOnInit() {
this.selEmp = this.common.sharedService.getSharedData(
MenuResponse.SHARED_SEL_EMP,
false
);
if (this.selEmp) { } else {
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
this.selEmp = user.ASSIGNMENT_NUMBER;
}
});
}
console.log(" this.selEmp" + this.selEmp);
this.intializeNotificationDetail();
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
console.log(" event.detail.value: " + event.detail.value);
}
intializeNotificationDetail() {
document.getElementById("notificationDynamicFields").innerHTML="";
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
}
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
false
);
console.log(this.getPassNotificationDetails.ROW_NUM);
this.notificationArray = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_ARR,
@ -81,6 +156,8 @@ export class WorklistMainComponent implements OnInit {
);
this.WorkListBodyObj = new WorkListBodyRequest();
this.WorkListButtonsObj = new WorkListButtonRequest();
this.WorkListAttachObj = new WorkListButtonRequest();
this.WorkListSubmitterInfoObj = new WorkListSubmitterInfoRequest();
this.WorkListActionObj = new WorkListActionRequest();
@ -96,45 +173,65 @@ export class WorklistMainComponent implements OnInit {
this.WorkListActionObj.P_ACTION_MODE = "";
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListSubmitterInfoObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListSubmitterInfoObj.P_PAGE_NUM = 1;
this.WorkListSubmitterInfoObj.P_SELECTED_EMPLOYEE_NUMBER = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
this.WorkListSubmitterInfoObj.P_SELECTED_RESP_ID = -999;
this.WorkListSubmitterInfoObj.P_SEARCH_EMAIL_ADDRESS = "";
this.WorkListSubmitterInfoObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListSubmitterInfoObj.P_SEARCH_USER_NAME = "";
this.getsubmitterInfo(this.WorkListSubmitterInfoObj);
this.getNotificationButtons(this.WorkListButtonsObj);
this.getNotificationResAttr(this.WorkListButtonsObj);
this.getAttachmentNotification(this.WorkListAttachObj);
this.getActionHistory(this.WorkListActionHistoryObj);
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
this.getEITNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO"){
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") {
this.getPONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") {
this.getMONotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR"){
this.getPRNotificationDetails(this.WorkListBodyObj);
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") {
this.getPRNotificationDetails(this.WorkListBodyObj);
}
}
getPRNotificationDetails(notificationBodyObj){
getPRNotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PR");
});
.getPRNotificationBody(notificationBodyObj)
.subscribe((result: PRNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "PR");
});
}
getMONotificationDetails(notificationBodyObj){
this.worklistMainService
getMONotificationDetails(notificationBodyObj) {
this.worklistMainService
.getMONotificationBody(notificationBodyObj)
.subscribe((result: MONotificatonBodyResponse) => {
//this.handleWorkListBodyResult(result, "MO");
});
}
getPONotificationDetails(notificationBodyObj){
}
getPONotificationDetails(notificationBodyObj) {
this.worklistMainService
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
// console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
// this.handleWorkListBodyResult(result, "PO");
});
.getPONotificationBody(notificationBodyObj)
.subscribe((result: PONotificatonBodyResponse) => {
// console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
// this.handleWorkListBodyResult(result, "PO");
});
}
getEITNotificationDetails(notificationBodyObj) {
@ -167,8 +264,17 @@ export class WorklistMainComponent implements OnInit {
if (result.GetAbsenceCollectionNotificationBodyList) {
this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList;
// getDimensions(this.notificationBodyRes) {
let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) {
return list.SEGMENT_NAME === "END_DATE" || list.SEGMENT_NAME === "START_DATE";
});
// return obj;
// }
this.getSubordinatesleave(obj)
}
}else if (Type == "PR") {
} else if (Type == "PR") {
if (result.GetAbsenceCollectionNotificationBodyList) {
this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList;
@ -178,7 +284,7 @@ export class WorklistMainComponent implements OnInit {
} //End handleWorkListBodyResult
getNotificationButtons(notificationButtonsObj) {
this.worklistMainService
.getNotificationButtons(notificationButtonsObj)
@ -192,8 +298,27 @@ export class WorklistMainComponent implements OnInit {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetNotificationButtonsList != null) {
this.notificationButtonRes = result.GetNotificationButtonsList;
} // if result == null
} // valid it
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
else (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO")
{
this.moreDisabled = false;
}
} // valid it
}
}
} // End handleWorkListButtonsResult
applyAction(WorkListActionObj) {
@ -215,6 +340,13 @@ export class WorklistMainComponent implements OnInit {
// this.notificationArray.splice(i, 1);
// }
// }
this.messageSuccess = true;
setTimeout(() => {
this.messageSuccess = false;
}, 5000);
this.getNotificationCountAfterSubmit();
this.nextNotfification();
}
@ -242,11 +374,12 @@ export class WorklistMainComponent implements OnInit {
}
}
actionButton() {
let ButtonAction: string = this.actionType;
actionButton(action) {
//let ButtonAction: string = this.actionType;
let ButtonAction: string = action;
var responseAttrDic = this.notExampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let i=0;i<this.notificationDynamicAttributeArr.length;i++) {
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
let obj: any = {};
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
@ -255,8 +388,8 @@ export class WorklistMainComponent implements OnInit {
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// }
else if(this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE=="VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE =(document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
@ -278,17 +411,54 @@ export class WorklistMainComponent implements OnInit {
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
this.applyAction(this.WorkListActionObj);
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
WorklistMainComponent.PASS_NOTIFICATION_INFO
);
this.common.sharedService.setSharedData(
ButtonAction,
WorklistMainComponent.PASS_ACTION_MODE
);
this.common.sharedService.setSharedData(
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
);
// this.applyAction(this.WorkListActionObj);
if (ButtonAction === "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction === "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}
else if (ButtonAction === "DEL") {
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
}
else if (ButtonAction === "CLOSE") {
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
}
this.common.confirmAlertDialogAction(
() => {
this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg)
// this.openApplyModal(this.WorkListActionObj);
}
if (ButtonAction == "RFC") {
// alert("Return For Correction");
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
// this.navCtrl.push("WorkListRfcPage", {
// passNotificationInfo: this.getPassNotificationDetails,
// passActionMode: ButtonAction,
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
// });
this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
WorklistMainComponent.PASS_NOTIFICATION_INFO
@ -301,7 +471,8 @@ export class WorklistMainComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
);
this.common.openWorklistRFCPage();
//this.common.openWorklistRFCPage();
this.openRFCModal();
} else if (ButtonAction == "ANSWER_INFO") {
// this.navCtrl.push("WorkListReplacmentRollPage", {
// pQuestion: this.pQuestion,
@ -322,7 +493,8 @@ export class WorklistMainComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
//this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" ||
@ -348,7 +520,8 @@ export class WorklistMainComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
);
this.common.openWorklistRollReplacement();
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
@ -440,22 +613,22 @@ export class WorklistMainComponent implements OnInit {
this.hideForwordEmployee = result.NotificationRespondRolesList[0];
}
this.notificationDynamicFields(result.NotificationGetRespondAttributesList);
this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList;
this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList;
if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema);
} // valid it
} // End handleWorkListButtonsResult
notificationDynamicFields(notificationAttr){
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
for(let i=0;i<notificationAttr.length;i++){
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="ROLE"){
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="DATE"){
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="NUMBER"){
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") {
}
}
}
@ -483,7 +656,6 @@ export class WorklistMainComponent implements OnInit {
AbsenceNotificatonBodyResponse.NOT_WORKLIST
);
this.common.sharedService.setSharedData("ABSENCE", "NotBodyType");
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
this.common.openNotificationDetailsPage();
}
}
@ -501,4 +673,277 @@ export class WorklistMainComponent implements OnInit {
}
});
}
getAttachmentNotification(WorkListAttachObj) {
this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => {
this.handleWorkListAttachResult(result);
});
}
handleWorkListAttachResult(result) {
if (this.common.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetAttachementList != null) {
this.attachmentRes = result.GetAttachementList;
} // if result == null
} // valid it
}
getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = false;
this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result);
});
}
handleWorkListActionHistoryResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
this.P_PAGE_NUM++;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
let lastItemIndex = this.actionHistoryRes.length - 1;
if (result.GetActionHistoryList[lastItemIndex]) {
let lastitem = result.GetActionHistoryList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
this.turnCateFun(this.actionHistoryRes);
}
}
}
public checkLines(note) {
if (note && note != null) {
return (note.length > this.lines_note_limit) ? true : false;
}
return false;
};
public turnCateFun(actionHis) {
for (let i = 0; i < actionHis.length; i++) {
actionHis[i].visible = false;
}
this.actionHistoryRes = actionHis;
console.log("test");
}
async openMoreActions() {
const modal = await this.modalCtrl.create({
component: MoreActionModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
// this.selectedAction = data.data;
this.actionType = data.data.BUTTON_ACTION;
console.log(this.actionType);
///call Action button
this.actionButton(this.actionType);
}
});
return await modal.present();
}
async OpenAttachFiles(value, Type) {
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage')
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent
});
return await modal.present();
}
///calling getSubleave
getSubordinatesleave(list) {
console.log(list);
let to;
let from;
for (let i = 0; i < list.length; i++) {
if (list[i].SEGMENT_NAME == "END_DATE")
to = list[i].DATE_VALUE;
else if (list[i].SEGMENT_NAME == "START_DATE") {
from = list[i].DATE_VALUE;
}
}
console.log(new Date(to));
console.log(new Date(from));
const request = new GetSubordinatesLeavesRequest();
request.P_DATE_FROM = "/Date(" + Date.parse(from) + ")/";//new Date(from);
request.P_DATE_TO = "/Date(" + Date.parse(to) + ")/" //new Date(to);
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
// ="'/Date(" + Date.parse(from) + ")'"
this.dashboredService.getSubordinatesLeaves(request).
subscribe((result: any) => {
this.handleSubordinatesLeavesResult(result);
});
}
public handleSubordinatesLeavesResult(result) {
if (this.common.validResponse(result)) {
// GetSubordinatesLeavesList it used in dashbored
// if (this.common.hasData(result.GetSubordinatesLeavesList)) {
if (this.common.hasData(result.SubordinatesOnLeavesList)) {
this.subordinatesleaveList = result.SubordinatesOnLeavesList;
}
}
}
getsubmitterInfo(notificationSubmitterInfoObj) {
this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj).
subscribe((result: WorklistsubmitterInfoResponse) => {
this.handleSubmitterInfoResult(result);
});
}
handleSubmitterInfoResult(result) {
if (this.common.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.common.hasData(result.MemberInformationList)) {
//if (result.MemberInformationList != null) {
this.submitterInfoRes = result.MemberInformationList;
} // if result == null
} // valid it
}// End handleWorkListButtonsResult
async openRepRolModal() {
const modal = await this.modalCtrl.create({
component: WorkListReplacementRollComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
async openRFCModal() {
const modal = await this.modalCtrl.create({
component: WorkListRfcComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data.data);
if (data.data == "cancel" || data.data == undefined) {
return;
} else {
}
});
return await modal.present();
}
async openApplyModal(WorkListActionObj) {
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO);
this.common.sharedService.setSharedData(WorkListActionObj, 'ApplyActionModalPage')
// this.common.sharedService.setSharedData(
// this.WorkListActionObj,
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO
// );
const modal = await this.modalCtrl.create({
component: ApplyActionModalComponent,
backdropDismiss: false,
});
modal.cssClass = 'note-modal';
modal.onDidDismiss()
.then((data) => {
console.log(data); // Here's your selected user!
});
return await modal.present();
}
}

@ -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

@ -465,6 +465,10 @@
"en": "Attachment",
"ar": "مرفق"
},
"file": {
"en": "file",
"ar": "ملف"
},
"select-attachment": {
"en": "Select Attachment",
"ar": "إختر مرفق"
@ -1681,7 +1685,7 @@
"ar": "معلومات الموظف"
},
"info":{
"en": "Information",
"en": "Info",
"ar":"تفاصيل"
},
"notfDetails":{
@ -1761,19 +1765,19 @@
"ar":"العناصر المطلوبة"
},
"approveMsg":{
"en": "Are you sure to approve this purchase requisition ?",
"en": "Are you sure to approve this request ?",
"ar":"العناصر المطلوبة"
},
"rejectMsg":{
"en": "Are you sure to reject this purchase requisition ?",
"en": "Are you sure to reject this request?",
"ar":"العناصر المطلوبة"
},
"delMsg":{
"en": "Are you sure to delete this purchase requisition ?",
"en": "Are you sure to delete this request?",
"ar":"العناصر المطلوبة"
},
"closeMsg":{
"en": "Are you sure to close this purchase requisition ?",
"en": "Are you sure to close this request?",
"ar":"العناصر المطلوبة"
},
"Supplier":{
@ -2041,7 +2045,6 @@
"en": "Line Details",
"ar":"Line Details"
}
},
"payslip": {

@ -768,7 +768,19 @@ color: var(--dark);
// right: 5%;
// bottom: 5%;
background: rgba(0, 0, 0, 0.5) !important;
padding: 60% 10% !important;
padding: 30% 10% !important;
--height: 12cm !important;
// --width: 80% !important;
--border-radius: 0.4cm;
}
.replaceRoll-modal {
padding: 30% 1% !important;
--height: 15cm !important;
--width: 100% !important;
--border-radius: 0.4cm;
}
@ -819,7 +831,7 @@ color: var(--dark);
}
.cancelBtn {
background:var(--red) !important;
background:var(--darkblue) !important;
white-space: normal !important;
color:var(--light) !important;
text-transform: capitalize !important;
@ -830,9 +842,11 @@ color: var(--dark);
min-width: 5px !important;
width: 10px !important;
margin: 8px !important;
--background:transparent;
}
.confirmBtn {
background:var(--green) !important;
background:var(--newgreen) !important;
white-space: normal !important;
color:var(--light) !important;
text-transform: capitalize !important;
@ -843,6 +857,7 @@ color: var(--dark);
min-width: 5px !important;
width: 10px !important;
margin: 8px !important;
--background:transparent;
}
.buttonClassWhite {
@ -916,12 +931,81 @@ border:0px
--min-height: 1.6cm !important;
width: 315px;
}
// .slides-gray-bullets .swiper-wrapper {
// margin-top: 14px !important;
// }
// .swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction {
// /* bottom: 10px; */
// left: 0;
// width: 100%;
//
.active-Segment {
border-radius: 25px !important;
// font-size: 0.3cm !important;
background: var(--newgreen) !important;
color: var(--light) !important;
font-weight: bold !important;
text-transform: none;
border: none;
}
.normal-Segment {
border-radius: 10px !important;
// font-size: 0.3cm !important;
background: rgba(255, 255, 255, 0) !important;
color: var(--dark) !important;
font-weight: bold !important;
text-transform: none;
border: none;
}
.active-Segment,
.normal-Segment {
flex: 1 100%;
}
.ion-segment-all {
height: 50px !important;
background: white !important;
border-radius: 25px !important;
border: 1px solid #cccccc;
margin-top: 10px;
}
.checkOutOkBtn{
margin-left: 55px !important;
margin-right: 55px !important;
margin-top: 10px !important;
margin-bottom: 10px !important;
border-radius: 5px !important;
height: 32px !important;
min-height: 30px !important;
background: var(--lightblue) !important;
-webkit-box-flex: 1;
flex: 1 1 auto;
border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
color: white !important;
border: none !important;
}
.checkOutCancelBtn{
margin-left: 55px !important;
margin-right: 55px !important;
margin-top: 10px !important;
margin-bottom: 10px !important;
border-radius: 5px !important;
height: 32px !important;
min-height: 30px !important;
background: var(--darkblue) !important;
-webkit-box-flex: 1;
flex: 1 1 auto;
border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);
color: white !important;
border: none !important;
}
.more-modal {
background: rgba(0, 0, 0, 0.5) !important;
padding: 30% 10% !important;
--height: 12cm !important;
--border-radius: 0.4cm;
}

@ -2,7 +2,7 @@
--background: #f0efef;
}
.footerSearchBtn{
padding: 0px !important;
padding: 50px !important;
background: #f0efef !important;
}
@ -15,6 +15,7 @@
background: #f0efef;
margin-top: 20px;
width: 95%;
margin-left:9px
}
.gridItemReq{
@ -29,8 +30,9 @@
text-align: left;
}
.itemReqDiv{
padding-bottom: 10px;
padding-top: 10px;
padding:10px;
// padding-bottom: 10px;
// padding-top: 10px;
}
.arrowIcon{
width: 18px !important;
@ -47,13 +49,13 @@ margin-left: 10px !important;
border-top-right-radius: 7px
}
.cardContent{
width:100%;
margin-top: 33px
// width:100%;
// margin-top: 33px
}
.colItemReq{
color: var(--dark);
font-weight: bold;
font-size: 16px;
color: var(--darkblue);
font-weight: bold !important;;
font-size: 16px ;
text-align: left;
display: contents;
font-family: var(--ion-font-family,inherit);
@ -169,6 +171,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
.timeline {
position: relative;
margin: 15px 0 0 0;
// border-bottom: solid 1px var(--cusgray);
}
.timeline:before {
@ -178,9 +181,9 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
top: 0;
bottom: 0;
width: 4px;
background: #e4e4e4;
// background: #e4e4e4;
z-index: 1;
left: 66px;
left: 35px;
/* margin-left: -10px; */
/* z-index: 1; */
}
@ -188,10 +191,10 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
.timeline .timeline-thumb {
border-radius: 500px;
width: 40px !important;
width: 70px !important;
z-index: 2;
position: absolute;
left: 48px;
left: 0px;
// :root[dir="ltr"]{
// left: 37px;
// }
@ -203,7 +206,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
}
.timeline .timeline-thumb.timeline-icon {
height: 40px;
height: 70px;
// text-align: center;
// color: white;
// border: 5px solid #CBD0D3;
@ -213,7 +216,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
.timeline .timeline-item {
width: 50px;
width: 40px;
}
@ -253,49 +256,101 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated
.bg-blue-dot {
border: var(--blue) solid 1px;
background: var(--gray);
background-repeat: no-repeat;
background-image: url("/assets/imgs/profile.png");
background-size: 100% 100%;
}
.bg-orange-dot {
border: var(--orange) solid 1px;
background: var(--gray);
// background: var(--gray);
background-repeat: no-repeat;
background-image: url("/assets/imgs/profile.png");
background-size: 100% 100%;
}
.bg-red-dot {
border: var(--red) solid 1px;
background: var(--gray);
// background: var(--gray);
background-repeat: no-repeat;
background-image: url("/assets/imgs/profile.png");
background-size: 100% 100%;
}
.bg-green-dot {
border: var(--green) solid 1px;
background: var(--gray);
// background: var(--gray);
background-repeat: no-repeat;
background-image: url("/assets/imgs/profile.png");
background-size: 100% 100%;
}
.bg-blue-txt {
color: var(--blue) !important;
color: var(--light) !important;
font-weight:bold;
background: var( --blue);
border-radius: 9px;
text-align: center;
margin-top: 10px;
position: relative;
width: auto;
height: 100%;
display: inline-block !important;
padding: 0px 7px 0px 7px;
}
.bg-orange-txt {
font-weight:bold;
color: var(--orange) !important;
color: var(--light) !important;
background: var( --orange);
border-radius: 9px;
text-align: center;
width: 30%;
margin-top: 10px;
position: relative;
width: auto;
height: 100%;
display: inline-block !important;
padding: 0px 7px 0px 7px;
}
.bg-red-txt {
font-weight:bold;
color: var(--light) !important;
background: var( --red);
border-radius: 9px;
text-align: center;
width: 30%;
margin-top: 10px;
position: relative;
width: auto;
height: 100%;
display: inline-block !important;
padding: 0px 7px 0px 7px;
color: var(--red) !important;
}
.bg-green-txt {
font-weight:bold;
color: var(--light) !important;
background: var( --green);
border-radius: 9px;
text-align: center;
width: 30%;
margin-top: 10px;
position: relative;
width: auto;
height: 100%;
display: inline-block !important;
padding: 0px 7px 0px 7px;
color: var(--green) !important;
}
@ -310,7 +365,7 @@ ion-item{
background-color: transparent;
.item-date{
width: 55px;
font-size: 14px;
font-size: 14px !important;
font-weight: bold;
text-align: center;
@ -324,7 +379,7 @@ ion-item{
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
font-size: 14px !important;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
@ -366,3 +421,133 @@ left: 66px;
}
.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;
}
.containerNote {
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;
}
.tabBar{
height:70px
}
.empImge{
border-radius: 50%;
width:100%;
height: 100%;
border: #dedede solid 1px;
}
.empImgeRep {
border-radius: 50% !important;
width: 80px;
height: 80px;
border: #dedede solid 1px;
}
ion-card{
color:black !important;
}
.line{
padding-bottom:87px;
}
Loading…
Cancel
Save