merge master-newdesign

master
Mohamed Mekawy 6 years ago
commit 05387d81d4

1705
Mohem/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -38,7 +38,7 @@
"@ionic-native/file": "^5.18.0",
"@ionic-native/file-path": "^5.18.0",
"@ionic-native/fingerprint-aio": "^5.18.0",
"@ionic-native/firebase-x": "^5.19.1",
"@ionic-native/firebase-x": "^5.21.5",
"@ionic-native/geolocation": "^5.10.0",
"@ionic-native/globalization": "^5.18.0",
"@ionic-native/health": "^5.4.0",
@ -52,7 +52,6 @@
"@ionic-native/sqlite": "^5.18.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/themeable-browser": "^5.18.0",
"@ionic-native/vibration": "^5.19.1",
"@ionic-native/zbar": "^5.10.0",
"@ionic/angular": "^4.1.0",
"@ng-bootstrap/ng-bootstrap": "^4.2.2",
@ -84,7 +83,7 @@
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "^3.0.0",
"cordova-plugin-firebasex": "^7.0.1",
"cordova-plugin-firebasex": "^7.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.1.0",
@ -96,7 +95,6 @@
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-themeablebrowser": "^0.2.18",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2",
@ -195,8 +193,7 @@
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "User Authentication"
},
"cordova-plugin-firebasex": {},
"cordova-plugin-vibration": {}
"cordova-plugin-firebasex": {}
},
"platforms": [
"browser",
@ -204,4 +201,4 @@
"android"
]
}
}
}

@ -0,0 +1,132 @@
<ion-header>
<ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content >
<ion-list syle="margin-bottom:2px !important" [hidden]="isAnswer==true">
<ion-item>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchBy">
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-button class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
</ion-button>
<ion-input class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<!-- <button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
<ion-icon name="search"></ion-icon>
</button> -->
</ion-item>
<!-- <ion-item>
<ion-label>
{{selEmpName}}
</ion-label>
</ion-item> -->
<!-- <div class="centerDiv">
<button ion-button (click)="closePage()">{{'general.save' | translate}}</button>
</div> -->
</ion-list>
<!-- <div class="noteInput">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div> -->
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
<!-- <ion-list *ngIf="ReplacementList">
-->
<!-- <ion-radio-group mode="md" [(ngModel)]="selEmp"> -->
<!-- <ion-grid fixed>
<ion-row justify-content-end>
<ion-col [ngClass]="{'activated': (active == i),'deactivated': (active != i)}" (click)="select(employee,i)"
*ngFor="let employee of demoeAttach;let i=index;"
size-xs="6" size-sm="6" size-md="6" size-lg="6" align-self-stretch>
<div class="profileImageDiv"> <img class="profileImage" src="../assets/imgs/profile.png"></div>
<div *ngIf="active == i" class="selIEmpDiv"> <img class="selIEmpImage" src="../assets/imgs/green.png"></div>
<br/>
<div class="repContentDiv">
<ion-label style="color:var(--dark) !important">
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
</div>
</ion-col>
</ion-row>
</ion-grid> -->
<!-- </ion-radio-group> -->
<!--
</ion-list> -->
<div class="square-container">
<div (click)="select(employee,i)" *ngFor="let employee of ReplacementList;let i=index;" class="square">
<div class="profileImageDiv">
<!-- <img class="profileImage" src="../assets/imgs/profile.png"> -->
<img *ngIf="employee.EMPLOYEE_IMAGE" class="empImgeRep" [src]="'data:image/png;base64,'+employee.EMPLOYEE_IMAGE">
<img *ngIf="employee.EMPLOYEE_IMAGE == null" class="empImgeRep" src="../assets/imgs/profile.png">
</div>
<div *ngIf="active == i" class="selIEmpDiv">
<img class="selIEmpImage" src="../assets/imgs/green.png">
</div>
<div [ngClass]="{'activated': (active == i),'deactivated': (active != i)}"
class="content">
<ion-label>
<span style="font-weight: bold !important">{{employee.EMPLOYEE_DISPLAY_NAME}}</span>
<br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}
</ion-label>
</div>
</div>
</div>
</ion-item>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" style="background: var(--newgreen)!important;border-radius: 10px; --background: transparent; " ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
<ion-button class="footer-button" style="background: var(--darkblue)!important;border-radius: 10px; --background: transparent; " ion-button (click)="closeModal()">
{{'general, cancel' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,121 @@
button.item-button.button.button-md.button-clear.button-clear-md {
background-color: transparent;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
// ion-item {
// margin-top: 5%;
// margin-right: 7%;
// width: 100%;
// }
.ionItem{
border: #e4e4e4 solid;
/* margin: 6px; */
/* padding: 11px; */
height: 85px;
width: 164px;
border-radius: 5px;
text-align: center;
}
.profileImageDiv{
text-align: center;
margin-bottom: -27px;
z-index: 3;
position: relative;
top: 0;
}
.profileImage{
width:60px !important;
// margin-left: -25px;
// margin-right: 22px;
}
.activated{
border: #209a83 0.02cm solid ;
}
.deactivated{ border: #e4e4e4 0.02cm solid;
}
.repContentDiv{
text-align: center;
width: 85%;
font-size: 14px;
border: #e4e4e4 solid;
border-radius: 5px;
padding: 20px 8px 8px 8px;
margin-top: -9px;
margin-right: -35px
}
.selIEmpDiv{
text-align: right;
margin-bottom: -26px;
margin-right: 0px;
z-index: 3;
position: relative;
top: 0;
}
.selIEmpImage{
width:22px !important
}
.noteInput{
border: solid var(--gray) 1px;
border-radius: 15px;
margin: 8px 17px 0px 17px;
padding: 10px 2px 10px 2px;
}
.filterInput{
border: solid var(--gray) 1px;
border-radius: 21px;
padding-left: 10px !important;
}
.filterBtn{
background: var(--newgreen);
--background: var (--newgreen);
border-radius: 50%;
height: 60px;
width: 60px;
}
*{
box-sizing: border-box;
}
.square-container{
// padding: 8px;
width:100%;
}
.square{
// width:calc(100% / 2);
width:50%;
float:left;
position: relative;
// padding-bottom: calc(100% / 2);
}
.square .content{
width: calc(100% - 16px) !important;
height: calc(100% - 16px) !important;
margin: 8px;
padding: 16px;
// position: absolute;
color: white;
border-radius: 9px;
text-align: center;
// background-color: #0095ff;
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AbsenceReplacementListComponent } from './absence-replacement-list.component';
describe('AbsenceReplacementListComponent', () => {
let component: AbsenceReplacementListComponent;
let fixture: ComponentFixture<AbsenceReplacementListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AbsenceReplacementListComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AbsenceReplacementListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,342 @@
import { ModalController } from '@ionic/angular';
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorKListReplacmentEmployeeResponse } from 'src/app/notification/models/ReplacmentEmployeeRes';
import { WorkListReplacmentEmployeeRequest } from 'src/app/notification/models/ReplacmentEmployeeReq';
import { WorkListActionRequest } from 'src/app/notification/models/NotificationActionReq';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
import { ViewReplacementModalComponent } from 'src/app/notification/view-replacement-modal/view-replacement-modal.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
@Component({
selector: 'app-absence-replacement-list',
templateUrl: './absence-replacement-list.component.html',
styleUrls: ['./absence-replacement-list.component.scss'],
})
export class AbsenceReplacementListComponent implements OnInit {
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
getPassActionMode: any;
selectedValue: any;
inputSearch: any;
selEmpName: any;
selectedUserInf: any;
userNote: any;
getPassNotificationDetails: any;
isAnswer: boolean = false;
pQuestion: string = "";
selEmp: any;
P_PAGE_NUM: number;
P_PAGE_LIMIT: number;
ReplacementList: any = [];
searchBy: string = "";
IsReachEnd: boolean = false;
ReplacmentListRes: WorKListReplacmentEmployeeResponse;
private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
private WorkListActionObj: WorkListActionRequest;
getpassResAttr: any = [];
active: any;
demoeAttach:any=[];
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
// this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
// this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
// this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
// this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
// if (this.getPassActionMode == "ANSWER_INFO") {
// this.isAnswer = true;
// }
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionObj = new WorkListActionRequest();
// this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060;
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
// this.WorkListActionObj.P_ACTION_MODE = "";
// this.WorkListActionObj.P_COMMENTS = "";
// this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr;
// this.WorkListActionObj.P_APPROVER_INDEX = null;
}
ngOnInit() {
this.demoeAttach = [{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj",
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
},
{
USER_NAME: '18888',
EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ",
EMAIL_ADDRESS: "test@yuyuu.hjj"
}
];
}
getreplacmentemployee() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.inputSearch) {
switch (this.searchBy) {
case '1': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = this.inputSearch;
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = "";
}
// if(this.selectedValue =="1"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="2"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.inputSearch;
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS="";
// }
// else if(this.selectedValue =="3"){
// this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME="";
// this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS=this.inputSearch;
// }
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: WorKListReplacmentEmployeeResponse) => {
this.handleWorkListReplacmentEmployeeResult(result);
});
}//End replacment Employee
handleWorkListReplacmentEmployeeResult(result) {
if (this.cs.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.cs.hasData(result.ReplacementList)) {
//this.ReplacmentListRes =result.ReplacementList;
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
} else {
let msg: string = this.ts.trPK('general', 'noResult');
this.cs.presentAlert(msg);
}
// if(result.ReplacementList.length == 0){
// }
// else if(result.ReplacementList != null)
// {
// this.ReplacmentListRes =result.ReplacementList;
// //open modal
// this.openModale(this.ReplacmentListRes);
// } // if result == null
} // valid it
}
getValueSelected(Value) {
this.selectedValue = Value;
}
select(selectEmp,index){
console.log(selectEmp.EMPLOYEE_DISPLAY_NAME);
this.selEmp=selectEmp
this.active=index;
}
clear() {
this.selEmpName = "";
this.selectedUserInf = null;
}
async openModale(ReplacmentListRes) {
const modal = await this.modalCtrl.create({
component: ViewReplacementModalComponent
});
modal.onDidDismiss()
.then((data) => {
if (data == "cancel" || data == "undefined") {
//this.selEmpName="";
return;
} else {
this.selectedUserInf = data;
this.selEmpName = this.selectedUserInf.EMPLOYEE_DISPLAY_NAME;
}
});
return await modal.present();
}
submitAction() {
this.selEmp
if( this.selEmp){
let data = this.selEmp;
this.modalCtrl.dismiss(data);
}else{
let msg: string = this.ts.trPK("replacementRoll", "msg");
this.cs.showErrorMessageDialog(() => {
}, this.ts.trPK('general', 'ok'), msg);
return false;
}
// if (this.selEmp && this.isAnswer == false) {
// // this.selectedUserInf = this.ReplacementList[this.selEmp];
// this.selectedUserInf = this.selEmp;
// console.log("selEmp "+ this.selEmp.USER_NAME);
// if (this.selectedUserInf && this.selectedUserInf.USER_NAME) {
// console.log("userInfo "+this.selectedUserInf.USER_NAME);
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else if (this.isAnswer == true) {
// if (this.userNote) {
// this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null;
// this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
// this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
// } else {
// let msg: string = this.ts.trPK("replacementRoll", "msg");
// this.cs.showErrorMessageDialog(() => {
// }, this.ts.trPK('general', 'ok'), msg);
// }
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
//const request =new WorkListActionRequest();
// request.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME=this.P_SEARCH_USER_NAME;
// request.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME=this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
// request.P_SEARCH_EMAIL_ADDRESS=this.P_SEARCH_EMAIL_ADDRESS;
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp;
this.worklistService.getReplacmentEmployeeList(this.WorkListReplacmentEmployeeObj).
subscribe((result: any) => {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.P_PAGE_NUM++;
result.ReplacementList.forEach(vr => {
if (vr.ROW_NUM == vr.NO_OF_ROWS) {
this.IsReachEnd = true;
}
else {
this.IsReachEnd = false;
}
this.ReplacementList.push(vr);
// this.pro.GetVacationRulesList.push(vr);
});
} else {
this.IsReachEnd = true;
}
}
//this.P_PAGE_NUM++;
if (infiniteScroll)
infiniteScroll.target.complete();
// console.log(resFlag);
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}
closeModal() {
this.modalCtrl.dismiss();
}
}

@ -21,6 +21,9 @@ import { AddAttachService } from "./service/add-attach-service";
import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component";
import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component';
import { SubmitAbsenceModalComponent } from './submit-absence-modal/submit-absence-modal.component';
import { AbsenceReplacementListComponent } from './absence-replacement-list/absence-replacement-list.component';
import { WorklistService } from 'src/app/notification/service/worklist.service';
import { WorklistMainService } from 'src/app/notification/service/work-list.main.service';
const routes: Routes = [
{
path: "",
@ -57,6 +60,10 @@ const routes: Routes = [
{
path:'absence-submit-modal',
component:SubmitAbsenceModalComponent
},
{
path:'absence-replacment-modal',
component:AbsenceReplacementListComponent
}
]
}
@ -78,7 +85,9 @@ const routes: Routes = [
SubmitAbConfirmService,
DatePicker,
ConfirmAddEitService,
AddAttachService
AddAttachService,
WorklistService,
WorklistMainService
],
declarations: [
AbsencePage,
@ -87,7 +96,8 @@ const routes: Routes = [
AbsenceConfirmComponent,
AbsenceAttachmentComponent,
ViewAttachmentsComponent,
SubmitAbsenceModalComponent
SubmitAbsenceModalComponent,
AbsenceReplacementListComponent
]
})
export class AbsencePageModule {}

@ -19,3 +19,5 @@
color: white!important;
border-radius: 16px !important;
}

@ -26,6 +26,7 @@ import * as moment from "moment";
import {ReplacementListComponent} from "../../vacation-rule/replacement-list/replacement-list.component";
import {ReplacmentResponse} from "../models/replacment-response";
import { AbsenceResponse } from '../models/absence.response';
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
@Component({
selector: "app-submit-absence",
templateUrl: "./submit-absence.component.html",
@ -230,12 +231,13 @@ export class SubmitAbsenceComponent implements OnInit {
async SearchReplacment() {
const modal = await this.modalCtrl.create({
component: ReplacementListComponent
component: AbsenceReplacementListComponent,
backdropDismiss: false
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
const user = data.data.empData;
const user = data.data;
console.log(data)
console.log(user);
if (data) {

@ -1,16 +1,29 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light">Attendance Tracking </ion-title>
<ion-buttons slot="start">
<nav-buttons></nav-buttons>
</ion-buttons>
</ion-toolbar>
</ion-header>
</ion-header> -->
<!-- <ion-header>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>Attendance Tracking</ion-title>
</ion-toolbar>
</ion-header> -->
<ion-content>
<div class="back-button-container">
<nav-buttons backLink="/home"></nav-buttons>
</div>
<div class="timer-chart">
<ion-label class="shift-title" style="font-weight: bold"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{curentDate}}</ion-label><br/>
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
<div class="fixed-shift-timer">
@ -46,32 +59,29 @@
</div>
<ion-grid>
<ion-row class="rowBorder">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
<ion-col [size]="12" class="colBorder" style="border-right: none;">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00</ion-label>
</ion-col>
<ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
</ion-row>
<ion-row style="text-align: center">
<ion-col class="colBorder">
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 </ion-label>
</ion-col>
<ion-col>
<ion-col [size]="6" class="colBorder">
<ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS}} </ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
</ion-col>
</ion-row>
</ion-grid>

@ -1,26 +1,29 @@
ion-content {
font-family: WorkSans-Regular;
}
ion-grid {
padding:30px 15px;
}
.timer-chart{
padding-top:18px;
background: #094773;
// height: 50%;
text-align: center;
background: #094773;
text-align: center;
line-height: .7cm;
}
.tracking-content{
background: #053c63;
height: 50%;
background: #053c63;
min-height: 50%;
}
.rowBorder{
text-align: center;
border-bottom: var(--lightblue) solid 1px;
}
.shift-text{
// text-align: center;
// width: 100%;
// color: white !important;
margin-bottom: 12px;
margin-top: -9px;
font-size: 30px;
font-size: 36px;
line-height: 36px;
display: block;
}
.shift-title{
width: 100%;
@ -34,24 +37,32 @@ height: 50%;
}
.divstopBtn{
text-align: center;
text-align: center;
}
.stopBtn{
height: 70px;
width: 70px;
height: 89px;
width: 89px;
background-color: var(--lightblue) !important;
border-radius: 50%;
display: inline-block;
margin-top: -24px;
border: solid 3px #053c63;
margin-top: -40px;
border: solid 5px #053c63;
}
.colBorder{
padding: 20px 0px;
text-align: center;
}
.colBorder:nth-child(1){
border-right: var(--lightblue) solid 1px;
}
.fixed-shift-timer{
margin-top: -50px;
margin-bottom: -30px;
margin-bottom: -10px;
}
.back-button-container{
background: #094773;
}

@ -22,7 +22,6 @@ export class HomeComponent implements OnInit {
public isCheckedIn = undefined;
public displayTime: any;
public percent: any;
constructor(
public cs: CommonService,
public db: DashboredService,
@ -90,14 +89,10 @@ export class HomeComponent implements OnInit {
}
convertAndAssignTime(data) {
console.log(data);
this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':'));
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
console.log('remainingTime: ' + this.remainingTime);
console.log('scheduledTime: ' + this.scheduledTime);
console.log('isCheckedIn: ' + this.isCheckedIn);
}
showAttendanceTracking() {

@ -1,8 +0,0 @@
import { FeedbackDirective } from './feedback.directive';
describe('FeedbackDirective', () => {
it('should create an instance', () => {
const directive = new FeedbackDirective();
expect(directive).toBeTruthy();
});
});

@ -1,24 +0,0 @@
import { Directive, ElementRef, HostListener } from '@angular/core';
import { TranslatorService } from '../../services/translator/translator.service';
import { CommonService } from '../../services/common/common.service';
import { FeedbackService } from './feedback.service';
@Directive({
selector: '[feedback]'
})
export class FeedbackDirective {
constructor(
private cs: CommonService,
private ts: TranslatorService,
private el: ElementRef,
private feedBackService: FeedbackService
) {
}
@HostListener('mousedown') onMouseEnter() {
this.feedBackService.vibrate();
}
}

@ -1,12 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { FeedbackService } from './feedback.service';
describe('FeedbackService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: FeedbackService = TestBed.get(FeedbackService);
expect(service).toBeTruthy();
});
});

@ -1,20 +0,0 @@
import { Injectable } from '@angular/core';
import { Vibration } from '@ionic-native/vibration/ngx';
// import { SettingsService } from 'src/app/settings/service/settings.service';
@Injectable({
providedIn: 'root'
})
export class FeedbackService {
// constructor(private vibration: Vibration, private settings: SettingsService) {}
constructor(private vibration: Vibration) {}
public async vibrate() {
try {
const on = true;
if (on) {
this.vibration.vibrate(500);
}} catch (e) {
}
}
}

@ -43,6 +43,8 @@ import { NativeStorage } from '@ionic-native/native-storage/ngx';
import { ProgressLoadingService } from './ui/progressLoading/progress-loading.service';
import { BarChartComponent } from './ui/bar-chart/bar-chart.component';
import { DonutChartComponent } from './ui/donut-chart/donut-chart.component';
// import { UserLocalNotificationService } from './services/user-local-notification/user-local-notification.service';
// import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { EmailComponent } from './ui/email/email.component';
import { Badge } from '@ionic-native/badge/ngx';
import { PushService } from './services/push/push.service';
@ -51,6 +53,8 @@ import { HmgBrowserService } from './services/hmg-browser/hmg-browser.service';
import { GuidService } from './services/guid/guid.service';
import { TabsBarComponent } from './ui/tabs-bar/tabs-bar.component';
import { PageTrailerComponent } from './ui/spacer/page-trailer/page-trailer.component';
// import { GeofencingService } from './services/geofencing/geofencing.service';
// import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { ButtonComponent } from './ui/button/button.component';
import { ToolbarButtonComponent } from './ui/toolbar-button/toolbar-button.component';
import { ListboxModule } from 'primeng/listbox';
@ -78,10 +82,13 @@ import { Diagnostic } from '@ionic-native/diagnostic/ngx';
import { DetailButtonComponent } from './ui/detail-button/detail-button.component';
import { RouterModule } from '@angular/router';
import { HeaderButtonComponent } from './ui/header-button/header-button.component';
// import { CallNumber } from '@ionic-native/call-number/ngx';
import { AppRate } from '@ionic-native/app-rate/ngx';
import { RatingService } from './services/rating/rating.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service';
// import { PaymentComponent } from './ui/payment/payment.component';
// import { PaymentService } from './ui/payment/service/payment.service';
import { MenuService } from './services/menu/menuservice.service';
import { ReplacementListComponent } from '../vacation-rule/replacement-list/replacement-list.component';
import { FileSelectDirective } from 'ng2-file-upload';
@ -89,12 +96,12 @@ import { PdfViewerModule } from 'ng2-pdf-viewer';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
import {Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx';
import {File} from '@ionic-native/file/ngx';
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component'
import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component';
import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';
import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component';
import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component'
import {DashboredService} from './services/dashbored/dashbored.service';
import {NgxGaugeModule} from 'ngx-gauge';
// import {NgxGaugeModule} from 'ngx-gauge';
import { StatsButtonComponent } from './ui/stats-button/stats-button.component';
import { ServicesButtonComponent } from './ui/services-button/services-button.component';
import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component'
@ -103,7 +110,9 @@ import {FabButtonComponent} from './ui/fab-button/fab-button.component'
import { AttendScanService } from './services/attend-services/attend-scan.service';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { NgCircleProgressModule } from 'ng-circle-progress';
import { ChartModule } from 'primeng/chart';
import {ChartModule} from 'primeng/chart';
import { CardFilterComponent} from './ui/card-filter/card-filter.component';
@NgModule({
imports: [
CommonModule,
@ -116,7 +125,7 @@ import { ChartModule } from 'primeng/chart';
PdfViewerModule,
NgCircleProgressModule.forRoot(),
ChartModule,
NgxGaugeModule
// NgxGaugeModule
],
declarations: [
FabButtonComponent,
@ -135,6 +144,7 @@ import { ChartModule } from 'primeng/chart';
DatePipeTransform,
DateTimePipe,
SafeHtmlPipe,
// TurncatePipe,
BackButtonComponent,
IfDatePipe,
DynamicTableComponent,
@ -168,7 +178,6 @@ import { ChartModule } from 'primeng/chart';
EmptyDataComponent,
DetailButtonComponent,
HeaderButtonComponent,
//PaymentComponent,
ReplacementListComponent,
FileSelectDirective,
WorkListAttachViewComponent,
@ -177,7 +186,8 @@ import { ChartModule } from 'primeng/chart';
AccordinCustomComponent,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent
ConfirmLoginComponent,
CardFilterComponent
],
exports: [
FabButtonComponent,
@ -193,6 +203,7 @@ import { ChartModule } from 'primeng/chart';
DividerComponent,
NavButtonsComponent,
DatePipeTransform,
// TurncatePipe,
TranslatePipe,
DateTimePipe,
SafeHtmlPipe,
@ -232,12 +243,13 @@ import { ChartModule } from 'primeng/chart';
FileUploderProfileComponent,
AccordinTabCustomComponent,
AccordinCustomComponent,
NgxGaugeModule,
// NgxGaugeModule,
StatsButtonComponent,
ServicesButtonComponent,
ConfirmLoginComponent,
NgCircleProgressModule,
ChartModule
ChartModule,
CardFilterComponent
],
providers: [
AttendScanService,
@ -255,10 +267,14 @@ import { ChartModule } from 'primeng/chart';
NativeStorage,
ProgressLoadingService,
PushService,
// UserLocalNotificationService,
// LocalNotifications,
Badge,
LifeCycleService,
HmgBrowserService,
GuidService,
// BackgroundGeolocation,
// GeofencingService,
Keyboard,
KeyboardService,
Diagnostic,
@ -273,10 +289,10 @@ import { ChartModule } from 'primeng/chart';
RateService,
Camera,
File,
// PaymentService,
MenuService,
OpenNativeSettings,
BarcodeScanner,
BarcodeScanner
]
})
export class HmgCommonModule { }

@ -1,4 +1,4 @@
import { Injectable } from "@angular/core";
import { Injectable } from '@angular/core';
import {
NavController,
ToastController,
@ -6,74 +6,74 @@ import {
AlertController,
Platform,
MenuController
} from "@ionic/angular";
import { Router } from "@angular/router";
import { TranslatorService } from "../translator/translator.service";
import { AlertControllerService } from "../../ui/alert/alert-controller.service";
} from '@ionic/angular';
import { Router } from '@angular/router';
import { TranslatorService } from '../translator/translator.service';
import { AlertControllerService } from '../../ui/alert/alert-controller.service';
//import { Response } from "../models/response";
import { Response } from 'src/app/hmg-common/services/models/response';
import { Location, DatePipe } from "@angular/common";
import { ThemeableBrowser } from "@ionic-native/themeable-browser/ngx";
import { BrowserConfig } from "./models/browser-config";
import { Location, DatePipe } from '@angular/common';
import { ThemeableBrowser } from '@ionic-native/themeable-browser/ngx';
import { BrowserConfig } from './models/browser-config';
import {
LaunchNavigator,
LaunchNavigatorOptions
} from "@ionic-native/launch-navigator/ngx";
import { Device } from "@ionic-native/device/ngx";
import { ProgressLoadingService } from "../../ui/progressLoading/progress-loading.service";
import { Observable, throwError } from "rxjs";
import { SharedDataService } from "../shared-data-service/shared-data.service";
import { Badge } from "@ionic-native/badge/ngx";
import { LifeCycleService } from "../life-cycle/life-cycle.service";
import { Diagnostic } from "@ionic-native/diagnostic/ngx";
} from '@ionic-native/launch-navigator/ngx';
import { Device } from '@ionic-native/device/ngx';
import { ProgressLoadingService } from '../../ui/progressLoading/progress-loading.service';
import { Observable, throwError } from 'rxjs';
import { SharedDataService } from '../shared-data-service/shared-data.service';
import { Badge } from '@ionic-native/badge/ngx';
import { LifeCycleService } from '../life-cycle/life-cycle.service';
import { Diagnostic } from '@ionic-native/diagnostic/ngx';
//import { CallNumber } from "@ionic-native/call-number/ngx";
import { InAppBrowser } from "@ionic-native/in-app-browser/ngx";
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
@Injectable({
providedIn: "root"
providedIn: 'root'
})
export class CommonService {
public static months_en_long = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
public static months_en = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
public static months_ar = [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر"
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر'
];
private progressLoaders: any[] = [];
@ -172,7 +172,7 @@ public getMonthNameAr(value: number): string {
public round(value: number, decimal: number): string {
const valueStr = value.toString();
const dotIndex = valueStr.indexOf(".");
const dotIndex = valueStr.indexOf('.');
if (dotIndex >= 0) {
return valueStr.toString().substr(0, dotIndex + decimal);
@ -186,13 +186,13 @@ public getMonthNameAr(value: number): string {
var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - hours * 3600) / 60);
var seconds = sec_num - hours * 3600 - minutes * 60;
var hoursString = "";
var minutesString = "";
var secondsString = "";
hoursString = hours < 10 ? "0" + hours : hours.toString();
minutesString = minutes < 10 ? "0" + minutes : minutes.toString();
secondsString = seconds < 10 ? "0" + seconds : seconds.toString();
return minutesString + ":" + secondsString;
var hoursString = '';
var minutesString = '';
var secondsString = '';
hoursString = hours < 10 ? '0' + hours : hours.toString();
minutesString = minutes < 10 ? '0' + minutes : minutes.toString();
secondsString = seconds < 10 ? '0' + seconds : seconds.toString();
return minutesString + ':' + secondsString;
}
public toastPK(page: string, key: string) {
@ -202,9 +202,9 @@ public getMonthNameAr(value: number): string {
const toast = await this.toastController.create({
message: message,
showCloseButton: true,
position: "middle",
position: 'middle',
duration: 2000,
closeButtonText: this.ts.trPK("general", "close")
closeButtonText: this.ts.trPK('general', 'close')
});
toast.present();
}
@ -213,9 +213,9 @@ public getMonthNameAr(value: number): string {
async startLoadingOld() {
this.stopLoading();
const loader = await this.loadingController.create({
spinner: "bubbles",
spinner: 'bubbles',
duration: 30000,
message: this.ts.trPK("error", "wait"),
message: this.ts.trPK('error', 'wait'),
translucent: true
});
this.progressLoaders.push(loader);
@ -228,7 +228,7 @@ public getMonthNameAr(value: number): string {
*/
this.stopLoading();
this.progressLoadingService.presentLoading(
this.ts.trPK("general", "loading")
this.ts.trPK('general', 'loading')
);
}
@ -248,8 +248,8 @@ public getMonthNameAr(value: number): string {
onAccept();
}
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
message
);
}
@ -257,10 +257,10 @@ public getMonthNameAr(value: number): string {
public presentConfirmDialog(message: string, onAccept: any, onCancel?: any) {
this.confirmAlertDialog(
onAccept,
this.ts.trPK("general", "ok"),
this.ts.trPK('general', 'ok'),
onCancel,
this.ts.trPK("general", "cancel"),
this.ts.trPK("general", "confirm"),
this.ts.trPK('general', 'cancel'),
this.ts.trPK('general', 'confirm'),
message
);
}
@ -268,8 +268,8 @@ public getMonthNameAr(value: number): string {
public presentAcceptDialog(message: string, onAccept: any) {
this.alertDialog(
onAccept,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "confirm"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'confirm'),
message
);
}
@ -279,8 +279,8 @@ public getMonthNameAr(value: number): string {
() => {
this.back();
},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'info'),
message
);
}
@ -288,9 +288,9 @@ public getMonthNameAr(value: number): string {
this.openHome();
this.alertDialog(
() => {},
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"),
this.ts.trPK("general", "not-allowed")
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'info'),
this.ts.trPK('general', 'not-allowed')
);
}
@ -301,14 +301,14 @@ public getMonthNameAr(value: number): string {
) {
this.alertDialog(
onClick,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
message
);
}
public userNeedToReLogin() {
this.presentAcceptDialog(this.ts.trPK("general", "relogin"), () => {
this.presentAcceptDialog(this.ts.trPK('general', 'relogin'), () => {
this.sharedService.clearAll();
this.openLogin();
});
@ -317,9 +317,9 @@ public getMonthNameAr(value: number): string {
public showConnectionErrorDialog(onClick: any, okLabel: string) {
this.alertDialog(
onClick,
this.ts.trPK("general", "ok"),
this.ts.trPK("general", "alert"),
this.ts.trPK("general", "connError")
this.ts.trPK('general', 'ok'),
this.ts.trPK('general', 'alert'),
this.ts.trPK('general', 'connError')
);
}
@ -327,15 +327,15 @@ public getMonthNameAr(value: number): string {
this.alertDialog(
onClick,
okLabel,
this.ts.trPK("general", "alert"),
this.ts.trPK("general", "timeout")
this.ts.trPK('general', 'alert'),
this.ts.trPK('general', 'timeout')
);
}
async JustAlertDialog(acceptLabel: string, message: string) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "info"),
header: this.ts.trPK('general', 'info'),
message: message,
buttons: [
{
@ -360,13 +360,13 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
text: cancelLabel,
role: "cancel",
cssClass: "cancel-button",
role: 'cancel',
cssClass: 'cancel-button',
handler: () => {
if (onCancel) {
onCancel();
@ -399,7 +399,7 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
@ -433,7 +433,7 @@ public getMonthNameAr(value: number): string {
message: message,
buttons: [
{
text:this.ts.trPK("general", "ok"),
text:this.ts.trPK('general', 'ok'),
handler: () => {
if (onAccept) {
onAccept();
@ -476,13 +476,13 @@ public getMonthNameAr(value: number): string {
) {
this.clearAllAlerts();
const alert = await this.alertControllerIonic.create({
header: this.ts.trPK("general", "confirm"),
header: this.ts.trPK('general', 'confirm'),
message: message,
buttons: [
{
text: cancelLabel,
role: "cancel",
cssClass: "cancelBtn",
cssClass: "checkOutCancelBtn",
handler: () => {
if (onCancel) {
onCancel();
@ -492,9 +492,9 @@ public getMonthNameAr(value: number): string {
},
{
text: acceptLabel,
role: "Confirm",
role: 'Confirm',
cssClass: "confirmBtn",
cssClass: "checkOutOkBtn",
handler: () => {
@ -558,7 +558,7 @@ public getMonthNameAr(value: number): string {
public clearAllAlerts() {
// custom solutions because of async issue
const alerts = document.getElementsByTagName("ion-alert");
const alerts = document.getElementsByTagName('ion-alert');
for (let i = 0; i < alerts.length; i++) {
const alert = alerts[i];
alert.parentNode.removeChild(alert);
@ -566,15 +566,15 @@ public getMonthNameAr(value: number): string {
}
public getDeviceInfo(): string {
if (this.platform.is("mobile")) {
const os = this.platform.is("ios") ? "Iphone" : "android";
if (this.platform.is('mobile')) {
const os = this.platform.is('ios') ? 'Iphone' : 'android';
return (
os +
" - " +
' - ' +
this.device.platform +
" - " +
' - ' +
this.device.version +
" , " +
' , ' +
this.device.manufacturer
);
} else {
@ -583,19 +583,19 @@ public getMonthNameAr(value: number): string {
}
public getDeviceType(): string {
if (this.platform.is("mobile")) {
if (this.platform.is('mobile')) {
// return "Mobile " + (this.platform.is("ios") ? "Iphone" : "android");
return (this.platform.is("ios") ? "Iphone" : "android");
return (this.platform.is('ios') ? 'Iphone' : 'android');
} else {
return "Desktop";
return 'Desktop';
}
}
public validResponse(result: Response): boolean {
if (result.MessageStatus === 1) {
return true;
} else if (result.MessageStatus === 2) {
return this.hasData(result["SameClinicApptList"]);
return this.hasData(result['SameClinicApptList']);
}
return false;
}
@ -616,15 +616,15 @@ public getMonthNameAr(value: number): string {
}
private openBrowserHtml(url, onExit?, onFaild?, onSuccess?) {
const browser = window.open(url, "_blank", "location=no");
browser.addEventListener("loadstart", () => {});
const browser = window.open(url, '_blank', 'location=no');
browser.addEventListener('loadstart', () => {});
browser.addEventListener("loaderror", () => {
browser.addEventListener('loaderror', () => {
if (onFaild) {
onFaild();
}
});
browser.addEventListener("loadstop", () => {
browser.addEventListener('loadstop', () => {
if (onSuccess) {
onSuccess();
}
@ -641,14 +641,14 @@ public getMonthNameAr(value: number): string {
this.platform.ready().then(() => {
const browser = this.iab.create(
url,
"_blank",
"closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no"
'_blank',
'closebuttoncolor=#60686b,hidenavigationbuttons=yes,hideurlbar=yes,zoom=no'
);
// browser.executeScript(...);
// browser.insertCSS(...);
browser.on("loaderror").subscribe(event => {
browser.on('loaderror').subscribe(event => {
if (onFaild) {
onFaild();
}
@ -664,13 +664,13 @@ public getMonthNameAr(value: number): string {
});
*/
browser.on("exit").subscribe(event => {
browser.on('exit').subscribe(event => {
if (onExit) {
onExit();
}
});
browser.on("loadstart").subscribe(event => {
browser.on('loadstart').subscribe(event => {
if (successURLS) {
successURLS.forEach((successURL, index) => {
if (event.url && event.url.indexOf(successURL) >= 0) {
@ -687,7 +687,7 @@ public getMonthNameAr(value: number): string {
}
public imageFromBase64(base64: string) {
return "data:image/jpeg;base64," + base64;
return 'data:image/jpeg;base64,' + base64;
}
public openLocation(lat: number, lng: number) {
@ -696,24 +696,24 @@ public getMonthNameAr(value: number): string {
() => {},
err => {
// this.failedToOpenMap();
window.open("https://maps.google.com/?q=" + lat + "," + lng);
window.open('https://maps.google.com/?q=' + lat + ',' + lng);
}
);
});
}
private failedToOpenMap() {
this.presentAlert(this.ts.trPK("error", "map"));
this.presentAlert(this.ts.trPK('error', 'map'));
}
public localizeTime(date: Date) {
if (!(date.getHours() == 0 && date.getMinutes() == 0)) {
let h = date.getHours() % 12 || 12;
let hStr = h < 10 ? "0" + h : h; // leading 0 at the left for 1 digit hours
let hStr = h < 10 ? '0' + h : h; // leading 0 at the left for 1 digit hours
const m = date.getMinutes();
let mStr = m < 10 ? "0" + m : m;
return hStr + ":" + mStr + (date.getHours() < 12 ? " AM" : " PM");
let mStr = m < 10 ? '0' + m : m;
return hStr + ':' + mStr + (date.getHours() < 12 ? ' AM' : ' PM');
}
return "";
return '';
}
public localizeDate(date: Date, time = false) {
@ -722,20 +722,20 @@ public getMonthNameAr(value: number): string {
if (lng === TranslatorService.AR) {
dateStr =
CommonService.months_ar[date.getMonth()] +
" " +
' ' +
date.getDate() +
" " +
' ' +
date.getFullYear();
} else {
dateStr =
CommonService.months_en[date.getMonth()] +
" " +
' ' +
date.getDate() +
"," +
',' +
date.getFullYear();
}
return time ? dateStr + " " + this.localizeTime(date) : dateStr;
return time ? dateStr + ' ' + this.localizeTime(date) : dateStr;
}
public localizeMonth(monthIndex) {
@ -767,21 +767,21 @@ public getMonthNameAr(value: number): string {
return (
date.getMonth() +
1 +
"/" +
'/' +
date
.getFullYear()
.toString()
.substr(2)
);
} else {
return "--";
return '--';
}
}
public convertISODateToJsonDate(isoDate: string): string {
return "/Date(" + Date.parse(isoDate) + ")/";
return '/Date(' + Date.parse(isoDate) + ')/';
}
public convertDateToJsonDate(date: Date): string {
return "/Date(" + date.getTime() + ")/";
return '/Date(' + date.getTime() + ')/';
}
/*
@ -790,13 +790,13 @@ public getMonthNameAr(value: number): string {
*/
public convertIsoDateToObject(isoDate: string, isoTime: string): Date {
const date = new Date(isoDate);
const parts = isoTime.split(":");
const parts = isoTime.split(':');
if (this.hasData(parts)) {
// remove if numbers start with 0
let hrsStr = parts[0];
let msStr = parts[1];
hrsStr = hrsStr[0] == "0" ? hrsStr.substr(1) : hrsStr;
msStr = msStr[0] == "0" ? msStr.substr(1) : msStr;
hrsStr = hrsStr[0] == '0' ? hrsStr.substr(1) : hrsStr;
msStr = msStr[0] == '0' ? msStr.substr(1) : msStr;
date.setHours(Number(hrsStr));
date.setMinutes(Number(msStr));
}
@ -824,9 +824,9 @@ public getMonthNameAr(value: number): string {
public getDateISO(date: Date): string {
return (
date.getFullYear().toString() +
"-" +
'-' +
this.trailerZero(date.getMonth() + 1) +
"-" +
'-' +
this.trailerZero(date.getDate())
);
}
@ -838,19 +838,19 @@ public getMonthNameAr(value: number): string {
public getTimeISO(date: Date): string {
return (
this.trailerZero(date.getHours()) +
":" +
':' +
this.trailerZero(date.getMinutes()) +
":00"
':00'
);
}
public getDateTimeISO(date: Date): string {
return this.getDateISO(date) + " " + this.getTimeISO(date);
return this.getDateISO(date) + ' ' + this.getTimeISO(date);
}
public getDateTimeISOFromString(dateStr: string): string {
const date = this.evaluteDateAsObject(dateStr);
return this.getDateTimeISO(date) + " " + this.getTimeISO(date);
return this.getDateTimeISO(date) + ' ' + this.getTimeISO(date);
}
public getCurrentTimeISO(): string {
@ -859,7 +859,7 @@ public getMonthNameAr(value: number): string {
private trailerZero(value: number): string {
const str = value.toString();
return str.length > 1 ? str : "0" + str;
return str.length > 1 ? str : '0' + str;
}
public hasData(array: any[]): boolean {
@ -883,13 +883,13 @@ public getMonthNameAr(value: number): string {
}
}
}
return startIndex ? message.substring(startIndex, endIndex) : "";
return startIndex ? message.substring(startIndex, endIndex) : '';
}
return null;
}
public inNumberRange(targetCode: number): boolean {
const minDigit = "0".charCodeAt(0);
const maxDigit = "9".charCodeAt(0);
const minDigit = '0'.charCodeAt(0);
const maxDigit = '9'.charCodeAt(0);
return targetCode >= minDigit && targetCode <= maxDigit;
}
@ -911,24 +911,24 @@ public getMonthNameAr(value: number): string {
title?: string
) {
this.smsAlertDialog = await this.alertControllerIonic.create({
header: title || this.ts.trPK("general", "enter-sms-code"),
header: title || this.ts.trPK('general', 'enter-sms-code'),
inputs: [
{
name: "sms",
type: "number",
name: 'sms',
type: 'number',
value: smsCode,
placeholder: this.ts.trPK("general", "enter-sms")
placeholder: this.ts.trPK('general', 'enter-sms')
}
],
buttons: [
{
text: this.ts.trPK("general", "cancel"),
role: "cancel",
cssClass: "cancel-button",
text: this.ts.trPK('general', 'cancel'),
role: 'cancel',
cssClass: 'cancel-button',
handler: () => {}
},
{
text: this.ts.trPK("general", "ok"),
text: this.ts.trPK('general', 'ok'),
handler: data => {
onAccept(data.sms);
}
@ -1031,8 +1031,8 @@ public getMonthNameAr(value: number): string {
}
const dataSets = [
this.getGraphDataSet(this.ts.trInline(title1), series1, "#d12026"),
this.getGraphDataSet(this.ts.trInline(title2), series2, "#60686b")
this.getGraphDataSet(this.ts.trInline(title1), series1, '#d12026'),
this.getGraphDataSet(this.ts.trInline(title2), series2, '#60686b')
];
return this.getGraphMultiSeries(labels, dataSets);
}
@ -1048,7 +1048,7 @@ public getMonthNameAr(value: number): string {
}
public isHtml5VideoSupported(): boolean {
const v = document.createElement("video");
const v = document.createElement('video');
if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')) {
return true;
}
@ -1062,7 +1062,7 @@ public getMonthNameAr(value: number): string {
}
public isCordova(): boolean {
return this.platform.is("cordova");
return this.platform.is('cordova');
}
public pageRevisited(pageName: string): Observable<boolean> {
@ -1077,118 +1077,125 @@ public getMonthNameAr(value: number): string {
}
public openEitListPage() {
this.nav.navigateForward(["/eit/eit-list"]);
this.nav.navigateForward(['/eit/eit-list']);
}
public openAddEitPage() {
this.nav.navigateForward(["/eit/add-eit"]);
this.nav.navigateForward(['/eit/add-eit']);
}
public openConfirmEitPage() {
this.nav.navigateForward(["/eit/confirm-add-eit"]);
this.nav.navigateForward(['/eit/confirm-add-eit']);
}
public openHome() {
this.nav.navigateRoot(["/home"]);
this.nav.navigateRoot(['/home']);
}
public openForgotPassword() {
this.nav.navigateForward(["/authentication/forgot"]);
this.nav.navigateForward(['/authentication/forgot']);
}
public openChangePassword() {
this.nav.navigateForward(["/authentication/changepassowrd"]);
this.nav.navigateForward(['/authentication/changepassowrd']);
}
public openProfile() {
this.nav.navigateForward(["/profile/home"]);
this.nav.navigateForward(['/profile/home']);
}
public openEditProfile() {
this.nav.navigateForward(["/profile/editprofile"]);
}
public openAccuralPage() {
this.nav.navigateForward(["/accrual-balances/home"]);
this.nav.navigateForward(['/accrual-balances/home']);
}
public openEITPage() {
this.nav.navigateForward(["/eit/homepage"]);
this.nav.navigateForward(['/eit/homepage']);
}
public openMyTeamPage() {
this.nav.navigateForward(["/my-team/home"]);
this.nav.navigateForward(['/my-team/home']);
}
public static myTeamDetailUrl =["/my-team/details","/my-team/details-2"]
public openPage(link: string) {
this.nav.navigateForward([link]);
}
public static myTeamDetailUrl =['/my-team/details','/my-team/details-2']
public openMyTeamDetails() {
this.alternateNavigate(CommonService.myTeamDetailUrl,"teamDetail-open",true);
this.alternateNavigate(CommonService.myTeamDetailUrl,'teamDetail-open',true);
// this.nav.navigateForward(["/my-team/details"]);
}
public openAbsencePage() {
this.nav.navigateForward(["/absence/home"]);
this.nav.navigateForward(['/absence/home']);
}
public openSubmitAbsencePage() {
this.nav.navigateForward(["/absence/submit-absence"]);
this.nav.navigateForward(['/absence/submit-absence']);
}
public openConfirmAbsece() {
this.nav.navigateForward(["/absence/confirm-absence"]);
this.nav.navigateForward(['/absence/confirm-absence']);
}
public openWorkListAttachViewPage() {
this.nav.navigateForward(["/notification/work-list-attach-view"]);
this.nav.navigateForward(['/notification/work-list-attach-view']);
}
public openviewAbsenceAttachment() {
this.nav.navigateForward(["/absence/view-attachements"]);
this.nav.navigateForward(['/absence/view-attachements']);
}
public openNotificationPage() {
this.nav.navigateForward(["/notification/homepage"]);
this.nav.navigateForward(['/notification/homepage']);
}
public openWorklistMainPage() {
this.nav.navigateForward(["/notification/worklist-main"]);
this.nav.navigateForward(['/notification/worklist-main']);
}
public openWorklistMainPRPage() {
this.nav.navigateForward(["/notification/worklist-main-PR"]);
this.nav.navigateForward(['/notification/worklist-main-PR']);
}
public openWorklistMainPOPage() {
this.nav.navigateForward(["/notification/worklist-main-PO"]);
this.nav.navigateForward(['/notification/worklist-main-PO']);
}
public openWorklistReplacementRollPage() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
this.nav.navigateForward(['/notification/work-list-replacement-roll']);
}
public openNotificationDetailsPage() {
this.nav.navigateForward(["/notification/work-list-details"]);
this.nav.navigateForward(['/notification/work-list-details']);
}
public openWorklistHistoryPage() {
this.nav.navigateForward(["/notification/work-list-action-history"]);
this.nav.navigateForward(['/notification/work-list-action-history']);
}
public openWorklistAttachPage() {
this.nav.navigateForward(["/notification/work-list-attach"]);
this.nav.navigateForward(['/notification/work-list-attach']);
}
public openWorklistRFCPage() {
this.nav.navigateForward(["/notification/work-list-rfc"]);
this.nav.navigateForward(['/notification/work-list-rfc']);
}
public openWorklistRollReplacement() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
this.nav.navigateForward(['/notification/work-list-replacement-roll']);
}
public openItemHistoryPage() {
this.nav.navigateForward(["/notification/item-history-PO"]);
this.nav.navigateForward(['/notification/item-history-PO']);
}
public openQutationAnalysisPage() {
this.nav.navigateForward(["/notification/qutation-analysis-PO"]);
this.nav.navigateForward(['/notification/qutation-analysis-PO']);
}
public openWorklistMainMRPage() {
this.nav.navigateForward(["/notification/worklist-main-MR"]);
this.nav.navigateForward(['/notification/worklist-main-MR']);
}
public openWorklistITGPage() {
this.nav.navigateForward(['/notification/worklist-main-ITG']);
}
public openMySpecialistPage() {
this.nav.navigateForward(["/my-specialist/home"]);
this.nav.navigateForward(['/my-specialist/home']);
}
public openMySubordinatePage() {
this.nav.navigateForward(["/my-subordinate/home"]);
this.nav.navigateForward(['/my-subordinate/home']);
}
public openChangeImagePage() {
this.nav.navigateForward(["/profile/profileImg"]);
this.nav.navigateForward(['/profile/profileImg']);
}
public openPayslipPage() {
this.nav.navigateForward(["/payslip/home"]);
this.nav.navigateForward(['/payslip/home']);
}
public openEarningsPage() {
this.nav.navigateForward(["/payslip/Earnings"]);
this.nav.navigateForward(['/payslip/Earnings']);
}
public openDeductionsPage() {
this.nav.navigateForward(["/payslip/Deductions"]);
this.nav.navigateForward(['/payslip/Deductions']);
}
public openConfirmLoginPage() {
this.nav.navigateForward(["/authentication/confirmLogin"]);
this.nav.navigateForward(['/authentication/confirmLogin']);
}
public openEditprofile() {
this.nav.navigateForward(["/profile/editProfile"]);
@ -1199,7 +1206,7 @@ public getMonthNameAr(value: number): string {
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
console.log('force reload called from:' + from);
// window.location.reload();
location.href = url;
}
@ -1223,11 +1230,11 @@ public getMonthNameAr(value: number): string {
private alternateNavigate(paths: string[], key: string, root = false) {
let url: string;
if (localStorage.getItem(key) === "yes") {
localStorage.setItem(key, "no");
if (localStorage.getItem(key) === 'yes') {
localStorage.setItem(key, 'no');
url = paths[0];
} else {
localStorage.setItem(key, "yes");
localStorage.setItem(key, 'yes');
url = paths[1];
}
if (root) {
@ -1238,14 +1245,14 @@ public getMonthNameAr(value: number): string {
}
public openLogin() {
this.nav.navigateRoot(["/authentication/login"]);
this.nav.navigateRoot(['/authentication/login']);
}
public openUserForgot() {
this.nav.navigateForward(["/authentication/checkuser"]);
this.nav.navigateForward(['/authentication/checkuser']);
}
public openSMSPage() {
this.nav.navigateForward(["/authentication/smspage"]);
this.nav.navigateForward(['/authentication/smspage']);
}
public navigateTo(url: string) {
@ -1281,11 +1288,11 @@ public getMonthNameAr(value: number): string {
if (state == this.diagnostic.bluetoothState.POWERED_ON) {
feedback();
} else {
this.presentAlert(this.ts.trPK("bluetooth", "start"));
this.presentAlert(this.ts.trPK('bluetooth', 'start'));
}
})
.catch(e => {
this.presentAlert(this.ts.trPK("bluetooth", "start"));
this.presentAlert(this.ts.trPK('bluetooth', 'start'));
});
});
}
@ -1315,7 +1322,7 @@ public getMonthNameAr(value: number): string {
}
for (i = 0; i < list.length; i += 1) {
node = list[i];
if (node.PARENT_MENU_NAME !== "") {
if (node.PARENT_MENU_NAME !== '') {
// if you have dangling branches check that map[node.parentId] exists
list[map[node.PARENT_MENU_NAME]].children.push(node);
} else {
@ -1327,8 +1334,8 @@ public getMonthNameAr(value: number): string {
public reverseFormatDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/\//g, "-");
FormatedDate = FormatedDate.replace(/ 00:00:00/g, "");
FormatedDate = date.replace(/\//g, '-');
FormatedDate = FormatedDate.replace(/ 00:00:00/g, '');
} else {
FormatedDate = date;
}
@ -1337,7 +1344,7 @@ public getMonthNameAr(value: number): string {
public formatStandardDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.replace(/-/g, '/');
} else {
FormatedDate = date;
}
@ -1346,7 +1353,7 @@ public getMonthNameAr(value: number): string {
public reverseFormatStandardDate(date) {
let FormatedDate;
if (date) {
FormatedDate = date.replace(/\//g, "-");
FormatedDate = date.replace(/\//g, '-');
} else {
FormatedDate = date;
}
@ -1358,8 +1365,8 @@ public getMonthNameAr(value: number): string {
if (date) {
date = date.slice(0, 10);
FormatedDate = date.replace(/-/g, "/");
FormatedDate = FormatedDate + " 00:00:00";
FormatedDate = date.replace(/-/g, '/');
FormatedDate = FormatedDate + ' 00:00:00';
} else {
FormatedDate = date;
}
@ -1371,8 +1378,8 @@ public getMonthNameAr(value: number): string {
console.log(date);
if (date) {
// FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.split("T")[0];
FormatedDate = FormatedDate + " 00:00:00";
FormatedDate = date.split('T')[0];
FormatedDate = FormatedDate + ' 00:00:00';
console.log(FormatedDate);
} else {
FormatedDate = date;
@ -1381,12 +1388,12 @@ public getMonthNameAr(value: number): string {
}
public setUpdateImage (image){
console.log("setUpdateImage");
console.log('setUpdateImage');
this.setUpdateImg=image;
this.updateImage=true;
}
public getUpdateImage(){
console.log("getUpdateImage");
console.log('getUpdateImage');
const objImg={
img: this.setUpdateImg,
status: this.updateImage

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

@ -0,0 +1,5 @@
<div class="main-container" [ngStyle]="active === true ? {'background': color} : {}">
<div class="main-container-radius" [ngStyle]="active === true ? {'background-color': '#ffffff'} : {'background-color': color}"></div>
<span class="number-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{value}}</span>
<span class="text-span" [ngStyle]="active === true ? {'color': '#ffffff'} : {}">{{text}}</span>
</div>

@ -0,0 +1,32 @@
.main-container{
width: 72px;
background-color: white;
padding: 10px;
border-radius: 20px;
height: 70px;
text-align: right;
font-family: WorkSans-Regular;
padding-top: 25px;
box-shadow: 0 0 6px rgba(0,0,0,0.16);
position: relative;
}
.main-container-radius{
// content: "";
position: absolute;
width: 30px;
height: 6px;
border-radius: 10px;
background-color: red;
left: 10px;
top: 10px;
}
.number-span{
font-size: 19px;
display: block;
line-height: 18px;
}
.text-span{
font-size: 14px;
color: #888;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CardFilterComponent } from './card-filter.component';
describe('CardFilterComponent', () => {
let component: CardFilterComponent;
let fixture: ComponentFixture<CardFilterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CardFilterComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CardFilterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,18 @@
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-card-filter',
templateUrl: './card-filter.component.html',
styleUrls: ['./card-filter.component.scss'],
})
export class CardFilterComponent implements OnInit {
@Input() value: number;
@Input() text: string;
@Input() active: boolean;
@Input() color: string;
constructor() { }
ngOnInit() {}
}

@ -6,6 +6,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module';
import { IonicModule } from '@ionic/angular';
import { HomePage } from './home.page';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { WorklistMainService } from '../notification/service/work-list.main.service';
const routes: Routes = [
{
@ -26,7 +27,8 @@ const routes: Routes = [
HomePage
],
providers: [
BarcodeScanner
BarcodeScanner,
WorklistMainService
]
})
export class HomePageModule { }

@ -16,7 +16,8 @@
<app-stats-button
[title]="button.title"
[statsValue]="button.statsValue"
[icon]="button.icon">
[icon]="button.icon"
(click)="openStatsButton(button.link)">
</app-stats-button>
</ion-slide>
</ion-slides>

@ -39,10 +39,6 @@ ion-label{
position: relative;
width: 100%;
}
.header-md:after {
height: 0px !important;
display: none !important;
}
.contentBg:before {
position: absolute;
content: "";

@ -33,6 +33,7 @@ import {GetOpenNotificationsResponse} from '../hmg-common/services/dashbored/mod
import {GetSubordinatesAttdStatusResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
import {GetSubordinatesLeavesResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
import { AccrualService } from '../accrual-balances/services/accrual.service';
import { WorklistMainService } from '../notification/service/work-list.main.service';
@Component({
selector: 'app-home',
@ -57,27 +58,32 @@ export class HomePage implements OnInit {
{
title: 'Work List',
statsValue: 0,
icon: 'assets/icon/new-design/work_list.png'
icon: 'assets/icon/new-design/work_list.png',
link: '/notification/homepage'
},
{
title: 'Pending Request',
statsValue: 13,
icon: 'assets/icon/new-design/pending_request.png'
icon: 'assets/icon/new-design/pending_request.png',
link: ''
},
{
title: 'Missing Swipes',
statsValue: 0,
icon: 'assets/icon/new-design/missing_swipe.png'
icon: 'assets/icon/new-design/missing_swipe.png',
link: ''
},
{
title: 'Leave Balance',
statsValue: 0,
icon: 'assets/icon/new-design/leave_balance.png'
icon: 'assets/icon/new-design/leave_balance.png',
link: ''
},
{
title: 'Ticket Balance',
statsValue: 0,
icon: 'assets/icon/new-design/ticket_balance.png'
icon: 'assets/icon/new-design/ticket_balance.png',
link: ''
}
];
@ -118,6 +124,7 @@ export class HomePage implements OnInit {
public menuEntries: any;
public percent: any;
accrualBalancesList: any;
public countAllNotification: number =0;
constructor(
public ts: TranslatorService,
@ -139,7 +146,8 @@ export class HomePage implements OnInit {
private file: File,
private permissions: DevicePermissionsService,
public DS: DashboredService,
public accrualService: AccrualService
public accrualService: AccrualService,
public workListService: WorklistMainService,
) {
this.events.subscribe('img-change', displayImg => {
this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg);
@ -148,7 +156,7 @@ export class HomePage implements OnInit {
}
ngOnInit() {
this.getUserDetails();
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
@ -156,6 +164,13 @@ export class HomePage implements OnInit {
// });
}
ionViewWillEnter() {
this.remainingTime = 0;
this.displayTime = '00:00:00';
this.runTimer = false;
this.getUserDetails();
}
initTimer() {
this.runTimer = false;
this.hasStarted = false;
@ -251,7 +266,7 @@ export class HomePage implements OnInit {
// });
// }
ionViewDidLoad() {
ionViewDidEnter() {
this.geolocation
.getCurrentPosition()
.then(resp => {
@ -444,9 +459,10 @@ export class HomePage implements OnInit {
if (this.common.validResponse(result)) {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess'));
this.showAttendanceTracking();
} else {
this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
}
// else {
// this.common.presentAlert(this.ts.trPK('home', 'swipeAlertFailed'));
// }
});
}
@ -490,9 +506,6 @@ export class HomePage implements OnInit {
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.isCheckedIn = this.remainingTime === this.scheduledTime ? false : true;
this.initTimer();
console.log('remainingTime: ' + this.remainingTime);
console.log('scheduledTime: ' + this.scheduledTime);
console.log('isCheckedIn: ' + this.isCheckedIn);
}
showAttendanceTracking() {
@ -516,11 +529,20 @@ export class HomePage implements OnInit {
this.DS.getOpenNotifications( () => { console.log('Error '); }).subscribe((result: GetOpenNotificationsResponse) => {
if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER';
this.statsButtons[0].statsValue = result[key];
this.countAllNotification = result[key];
this.ITGCountAllNotification();
this.common.sharedService.setSharedData(result, 'worklistNotifications');
}
});
}
ITGCountAllNotification(){
this.workListService.getITGDetails()
.subscribe((result: any) => {
this.statsButtons[0].statsValue = this.countAllNotification + result.TotalCount;
});
}
getSubordinatesLeaves() {
const request: GetSubordinatesLeavesRequest = new GetSubordinatesLeavesRequest();
request.P_DATE_FROM = '/Date(1578603600000+0300)/'; // test
@ -603,6 +625,11 @@ export class HomePage implements OnInit {
this.common.openEditProfile();
}
openStatsButton(link: string) {
console.log(link);
this.common.openPage(link);
}
}

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

@ -1,227 +1,94 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light"> {{ts.trPK('home','worklist')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start">
<nav-buttons backLink="/home"></nav-buttons>
</ion-buttons>
<ion-title>WORK LIST</ion-title>
</ion-toolbar>
</ion-header>
<ion-content [ngClass]=" direction == 'ltr' ? 'left' : 'right'">
<!-- first select type view -->
<!-- <ion-item>
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="notificationType"
(ionChange)=onChangeView($event)>
<ion-select-option value="1" selected="true">{{ts.trPK('worklist','openNot')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}" [(ngModel)]="searchBy"
(ionChange)="getValueSelected($event)">
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
</ion-select>
</ion-item> -->
<ion-grid>
<ion-row>
<ion-col size='3' class="ion-no-padding , menuListCol">
<ion-list class="menuList">
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="AllNotification()">
<img *ngIf="!isAll" src="../assets/imgs/menuTabs/All1.png" />
<img *ngIf="isAll" src="../assets/imgs/menuTabs/All2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<!-- <ion-item lines="none" class="activeTabMenu"*ngIf="isPR"></ion-item> -->
<!-- <ion-button class="menuListBtn" (click)="PRNotification()"><p style="color: black;">PR</p></ion-button> -->
<ion-button ion-button class="menuListBtn" (click)="PRNotification()">
<img *ngIf="!isPR" src="../assets/imgs/menuTabs/PR1.png" />
<img *ngIf="isPR" src="../assets/imgs/menuTabs/PR2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="PONotification()">
<img *ngIf="!isPO" src="../assets/imgs/menuTabs/PO1.png" />
<img *ngIf="isPO" src="../assets/imgs/menuTabs/PO2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="MRNotification()">
<img *ngIf="!isMR" src="../assets/imgs/menuTabs/MR1.png" />
<img *ngIf="isMR" src="../assets/imgs/menuTabs/MR2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-content>
<div class="contentBg">
<div class="result-graph">
<div class="request-heading">
<span>Open Request Analysis</span>
</div>
<div class="result-text-container">
<h2>{{totalRequestCount}}</h2>
<span>TOTAL <br> OPEN REQUEST</span>
</div>
<p-chart class="today-graph" type="doughnut" [data]="data" [options]="options"></p-chart>
</div>
<ion-row class="filters-row">
<ion-slides [options]="slideOptsOne">
<ion-slide *ngFor="let filter of filters; let i=index" [ngClass]="filter.disable === true ? 'disable-filter' : ''">
<app-card-filter
[value]="filter.value"
[text]="filter.name"
[color]="filter.color"
[active]="filter.active"
(click)="activeFilter(i)"
></app-card-filter>
</ion-slide>
</ion-slides>
</ion-row>
<ion-row class="search-container">
<ion-col style="float: left;" size=[6] *ngIf="showSearchButton" (click)="clearSearch()">
<span style="margin-left: 5px;">Clear Search</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
<ion-col style="float: right;" size=[6] (click)="openSearchModal()" *ngIf="selectedFilter === 'ALL'">
<ion-icon name="search" ></ion-icon>
<span>Advanced Search</span>
</ion-col>
</ion-row>
<!-- <div class="total-result" *ngIf="isEmptyObject() && selectedFilter === 'ALL' && showSearchButton === false">
<span>showing {{newWorkListResponse.length}} of {{filters[0].value}}</span>
</div> -->
<ion-button class="menuListBtn" (click)="HRNotification()">
<img *ngIf="!isHR" src="../assets/imgs/menuTabs/HR1.png" />
<img *ngIf="isHR" src="../assets/imgs/menuTabs/HR2.png" />
</ion-button>
</ion-item>
<ion-item class="menuListItem" lines="none">
<ion-button class="menuListBtn" (click)="ITGNotification()">
<img *ngIf="!isITG" src="../assets/imgs/menuTabs/ITG1.png" />
<img *ngIf="isITG" src="../assets/imgs/menuTabs/ITG2.png" />
</ion-button>
</ion-item>
</ion-list>
<ion-row *ngIf='selectedFilter === "ITG"'>
<ion-col>
<ion-slides>
<ion-slide class='slideCss' *ngFor="let segment of ITGSegment">
<span [ngClass]="segment.style? 'text-span-active': 'text-span'" (click)="setActive(segment.code)">
{{segment.name}}
</span>
</ion-slide>
</ion-slides>
</ion-col>
<ion-col size='9' class="notifincationList">
<ion-list class="notification-list" *ngIf="!noData">
<div class="timelineMain">
<ion-item class="itemListNotification" *ngFor="let notificationList of filteredNotificationList"
lines='none'>
<div class="item-date"> {{notificationList.BEGIN_DATE | dateString }} </div>
<div class="timelineMain-item" slot="start">
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
<div class="timelineMain-thumb bg-color-dot timelineMain-icon">
</div>
</div>
<ion-label (click)="openNotificationDetail(notificationList)"> {{notificationList.SUBJECT}}
</ion-label>
</ion-item>
</div>
</ion-list>
<ion-list class="emptyItem" *ngIf="noData">
<ion-item class="itemListNotification" lines='none'>
<ion-label> There is no Notification
</ion-label>
</ion-item>
</ion-list>
<!-- <ion-list class="notification-list " *ngIf="isPR">
<div class="timeline">
<p>PR</p>
</div>
</ion-list>
<ion-list class="notification-list " *ngIf="isPO">
<div class="timeline">
<p>PO</p>
</div>
</ion-list>
</ion-row>
<ion-list class="notification-list " *ngIf="isMR">
<div class="timeline">
<p>MR</p>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf='selectedFilter != "ITG"'>
<div *ngFor="let data of showFormattedData | keyvalue; let i = index">
<span class="date-span">{{data.key}}</span>
<div (click)="openNotificationDetail(data.value)" class="date-data" *ngFor="let workList of data.value; let j = index">
<p>{{workList.SUBJECT}}</p>
</div>
</ion-list>
</div>
</div>
<ion-list class="notification-list " *ngIf="isHR">
<div class="timeline">
<p>HR</p>
</div>
</ion-list>
<ion-list class="notification-list " *ngIf="isITG">
<div class="timeline">
<p>ITG</p>
<div [ngClass]="isEmptyObject() ? 'work-list-container' : ''" *ngIf="selectedFilter == 'ITG'" >
<div *ngFor='let segmentInfo of ITGItem[0]; let i= index' (click)='openITG(segmentInfo)'>
<span class="date-span">{{segmentInfo.ModifiedDate |date}}</span>
<div class="date-data">
<p>{{segmentInfo.Title}}</p>
</div>
</ion-list> -->
</ion-col>
</ion-row>
</ion-grid>
<!-- *ngIf="rowsNo <= noOfrows" -->
</div>
</div>
<div class="no-data-available" *ngIf="!isEmptyObject()">
<span>No Data Available</span>
</div>
</div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer class="footerSearchBtn" *ngIf="!isSearch">
<ion-button color="customnavy" expand="full" fill="outline" (click)="searchBtn()">{{ts.trPK('worklist','search')}}
</ion-button>
</ion-footer>
<ion-footer class="footerSearchBtn" *ngIf="isSearch">
<ion-grid>
<ion-row>
<!-- <ion-col size='3'> </ion-col> -->
<ion-col>
<div class="viewAndSearch">
<ion-item lines="none">
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="notificationType" (ionChange)=onChangeView($event)>
<ion-select-option value="1" selected="true">{{ts.trPK('worklist','openNot')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
</ion-select>
</ion-item>
</div>
<div class="viewAndSearch">
<ion-item>
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="searchBy" (ionChange)="getValueSelected($event)">
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
</ion-select>
</ion-item>
<div>
<div *ngIf="HideDateInput==true">
<ion-item lines='none'>
<ion-label>{{ts.trPK('worklist','sent')}} </ion-label>
<ion-datetime placeholder="{{ts.trPK('worklist','enter')}}" displayFormat="DD-MMM-YYYY"
pickerFormat="DD-MMM-YYYY" [(ngModel)]="InputDate"></ion-datetime>
</ion-item>
</div>
<div *ngIf="HideTextInput==true">
<ion-item>
<ion-input placeholder="{{ts.trPK('worklist','enter')}}" [(ngModel)]="inputSearch">
</ion-input>
</ion-item>
</div>
</div>
<div>
<ion-button class="toSearchBtn" color="customnavy" expand="full" fill="outline"
(click)="getAllPushNotificationFun()">
{{ts.trPK('worklist','search')}}</ion-button>
<ion-button class="toSearchBtn" color="customnavy" expand="full" fill="outline" (click)="searchBtn()">
{{ts.trPK('general','close')}}</ion-button>
</div>
<ion-button color="customnavy" (click)="Details()">Call details ITG</ion-button>
<ion-button color="customnavy" (click)="Count()">Call count ITG</ion-button>
<!--
<ion-button color="customnavy" (click)="getAllPushNotificationFun()">{{ts.trPK('worklist','search')}}</ion-button> -->
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-footer>

@ -216,4 +216,205 @@ ion-input ,ion-datetime{
.emptyItem{
white-space: normal;
padding-left: 10%;
}
}
///////////////////////////////////////////NEW DESIGN/////////////////////////////////////
.profile-image-container{
position: relative;
z-index: 999;
img {
width: 32px;
float: right;
border-radius: 20px;
height: 32px;
margin-right: 10px;
}
}
ion-title{
color: white;
position: absolute;
top: 0;
text-align: center;
left: 15%;
right: 15%;
font-size: 0.42cm;
font-weight: bold;
height: 100%;
}
.contentBg:before {
position: absolute;
content: "";
background: #22c6b3;
height: 140px;
width: 100%;
left: 0;
top: 0px;
z-index: 1;
}
ion-content {
--ion-background-color: whitesmoke;
}
.request-heading {
span {
text-align: center;
display: block;
padding-top: 8px;
font-family: workSans-Regular;
}
}
.result-graph {
position: relative;
background: white;
margin-right: 20px;
margin-left: 20px;
margin-top: 20px;
padding-bottom: 20px;
border-radius: 20px;
z-index: 1;
}
.result-text-container {
padding: 0;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
display: block;
text-align: center;
transform: translate(-50%, -50%);
h2 {
font-size: 38px;
font-family: WorkSans-Bold;
margin: 0 auto;
line-height: 36px;
}
span {
width: 125px;
display: block;
margin: 0 auto;
font-size: 12px;
font-family: workSans-Regular;
}
}
.today-graph {
width: 100%;
max-height: 4cm;
}
.swiper-container {
margin: 0 !important;
width: 100% !important;
}
.filters-row {
margin-top: 10px;
margin-left: 20px;
}
.work-list-container {
position: relative;
padding-left: 60px;
clear: both;
min-height: 200px;
margin-bottom: 80px;
padding-top: 15px;
}
.work-list-container:before{
content: "";
position: absolute;
height: 100%;
width: 4px;
left: 30px;
top: 15px;
background-color: #dddddd;
}
.search-container{
margin-top: 15px;
display: block;
padding: 0 20px;
ion-col{
background: white;
border-radius: 12px;
padding-right: 10px;
flex: none;
ion-icon{
margin-right: 3px;
font-size: 14px;
margin-left: 3px;
vertical-align: middle;
}
span{
font-size: 12px;
vertical-align: middle;
}
}
}
.date-span {
position: relative;
display: block;
margin-bottom: 10px;
}
.date-span:before{
content: "";
position: absolute;
left: -35px;
border-radius: 50%;
width: 15px;
height: 15px;
background-color: #38c9b3;
top: 1px;
}
.date-data{
background-color: white;
padding: 1px;
border-radius: 20px;
font-family: WorkSans-Regular;
padding-left: 15px;
margin-right: 20px;
margin-bottom: 15px;
p{
font-size: 14px;
}
}
.no-data-available {
background: white;
font-family: WorkSans-Regular;
padding: 30px;
position: absolute;
left: 50%;
margin-left: -100px;
margin-top: 100px;
}
.disable-filter {
pointer-events: none;
opacity: .3;
}
.total-result {
margin-top: 55px;
padding-left: 20px;
color: #888;
font-size: 15px;
}
.text-span{
font-size: 14px;
color: #888;
background-color: white;
width: 93%;
height: 30px;
border: 1px solid;
border-radius: 15px;
}
.text-span-active{
font-size: 14px;
color: #888;
background-color:#22c6b3;
width: 93%;
height: 30px;
border: 1px solid;
border-radius: 15px;
}
.slideCss{
width: 200px !important;
}

@ -1,336 +1,458 @@
import { Component, OnInit, ViewChild } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListRequest } from "../models/workListRequest";
import * as moment from "moment";
import { WorKListResponse } from "../models/workListResponse";
import { WorklistService } from "../service/worklist.service";
import { Component, OnInit, ViewChild } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { WorkListRequest } from '../models/workListRequest';
import * as moment from 'moment';
import { WorklistService } from '../service/worklist.service';
import { IonInfiniteScroll } from '@ionic/angular';
import { WorklistMainService } from '../service/work-list.main.service';
import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/worklist-advanced-search.component';
import { DatePipe } from '@angular/common';
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"]
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
// @ViewChild(Navbar) navBar: Navbar;
public static REQUSET_NAME = 'requst_name';
public static REQUSET_INFO = 'requset_info';
public static ALL_REQUEST = 'all_request';
public static NOTIFICATION_DATA = 'notification_data';
public static NOTIFICATION_ARR = 'notification_arr';
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
private WorkListObj: WorkListRequest;
WorkListResObj: any; //WorKListResponse;
notificationType: string = "1";
pageNum: number = 1;
WorkListResObj: any;
notificationType = '1';
pageNum = 1;
rowsNo: number;
noOfrows: number;
selectedValue: string = "";
FromUserName: string = "";
ItemKeyDisplayName: string = "";
SentDate: string = "";
Subject: string = "";
inputSearch: string = "";
HideDateInput: boolean = false;
HideTextInput: boolean = false;
InputDate: string;
selectedValue = '';
FromUserName = '';
ItemKeyDisplayName = '';
SentDate = '';
Subject = '';
inputSearch = '';
inputDate: string;
filteredNotificationList: any;
IsReachEnd: boolean = false;
public noData: boolean = false;
public isAll: boolean = true;
public isPR: boolean = false;
public isPO: boolean = false;
public isMR: boolean = false;
public isHR: boolean = false;
public isITG: boolean = false;
public isSearch: boolean = false;
isReachEnd = false;
public isAll = true;
public isPR = false;
public isPO = false;
public isMR = false;
public isHR = false;
public noData = false;
public isITG = false;
public isSearch = false;
public direction = 'ltr';
public ITGCount = 0;
public ITGSegment: {name: string, code: any, data: any, style: boolean} [] = [];
public ITGAllItem: any = [];
public selectedITGToActive = false;
public ITGItem: any = [];
public activeSegment: any;
public currentActiveIndex = 0;
public previousActiveIndex = 0;
public worklistNotifications: any;
public totalRequestCount = 0;
public newWorkListResponse = [];
public showFormattedData = {};
public selectedFilter = 'ALL';
public showSearchButton = false;
public itemType = '';
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [0, 0, 0, 0, 0],
backgroundColor: [
'#18a169',
'#38c9b3',
'#114475',
'#3cb9d5',
'#cc3232'
],
borderWidth: 5
}]
};
public filters = [
{
value: 0,
name: 'All',
active: true,
color: '#124375',
key: 'ALL',
disable: false
},
{
value: 0,
name: 'HR',
active: false,
color: '#18a169',
key: 'HRSSA',
disable: false
},
{
value: 0,
name: 'PO',
active: false,
color: '#38c9b3',
key: 'POAPPRV',
disable: false
},
{
value: 0,
name: 'PR',
active: false,
color: '#114475',
key: 'REQAPPRV',
disable: false
},
{
value: 0,
name: 'MR',
active: false,
color: '#3cb9d5',
key: 'INVMOA',
disable: false
},
{
value: 0,
name: 'ITG',
active: false,
color: '#cc3232',
key: 'ITG',
disable: false
}
];
public slideOptsOne = {
slidesPerView: 4.3,
spaceBetween: 10
};
constructor(
public common: CommonService,
public ts: TranslatorService,
public WorklistService: WorklistService,
public workListService: WorklistMainService,
) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = "1";
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 50; //number
public common: CommonService,
public ts: TranslatorService,
public WorklistService: WorklistService,
public workListService: WorklistMainService,
public modalController: ModalController
) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = '1';
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_PAGE_NUM = 0;
this.WorkListObj.P_PAGE_LIMIT = 50;
}
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
}
ionViewDidLoad() {
// this.navBar.backButtonClick = () => {
// // you can set a full custom history here if you want
// let pages = [
// {
// page: "HomePage"
// }
// ];
// this.navCtrl.setPages(pages);
// };
}
ionViewWillEnter() {
// this.direction = TranslatorService.getCurrentDirection();
this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false);
this.Details();
this.Count();
this.assignDataToFilters();
this.getAllPushNotificationFun();
this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER;
}
getValueSelected(Value) {
this.selectedValue = Value.detail.value;
if (this.selectedValue == "1") {
this.HideDateInput = false;
this.HideTextInput = true;
} else if (this.selectedValue == "2") {
this.HideDateInput = false;
this.HideTextInput = true;
} else if (this.selectedValue == "3") {
this.HideDateInput = true;
this.HideTextInput = false;
} else if (this.selectedValue == "4") {
this.HideDateInput = false;
this.HideTextInput = true;
} else if (this.selectedValue == "5") {
this.HideDateInput = false;
this.HideTextInput = false;
assignDataToFilters() {
this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER;
const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList;
for (const notification of openNotificationsArray) {
if (notification.ITEM_TYPE === 'HRSSA') {
this.filters[1].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'POAPPRV') {
this.filters[2].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'REQAPPRV') {
this.filters[3].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'INVMOA') {
this.filters[4].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER;
} else if (notification.ITEM_TYPE === 'ITG') {
this.filters[5].value = notification.OPEN_NTF_NUMBER;
this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER;
}
}
}
getAllPushNotificationFun() {
this.WorkListObj.P_PAGE_NUM = 1;
this.IsReachEnd = false;
if (this.selectedValue == "1") {
this.WorkListObj.P_SEARCH_FROM_USER = this.inputSearch;
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
} else if (this.selectedValue == "2") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = this.inputSearch;
} else if (this.selectedValue == "3") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
if (this.InputDate)
this.WorkListObj.P_SEARCH_SENT_DATE = moment(this.InputDate).format(
"DD-MMM-YYYY"
);
else this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
} else if (this.selectedValue == "4") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.inputSearch;
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
} else if (this.selectedValue == "5") {
this.WorkListObj.P_SEARCH_FROM_USER = "";
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = "";
this.WorkListObj.P_SEARCH_SENT_DATE = "";
this.WorkListObj.P_SEARCH_SUBJECT = "";
}
this.WorklistService.getWorkList(this.WorkListObj).subscribe(
(result: WorKListResponse) => {
this.handleWorkListResult(result);
activeFilter(index: number) {
if (this.currentActiveIndex !== index) {
this.showFormattedData = {};
this.previousActiveIndex = this.currentActiveIndex;
this.currentActiveIndex = index;
this.filters[this.previousActiveIndex].active = false;
this.filters[this.currentActiveIndex].active = true;
if (this.filters[this.currentActiveIndex].value !== 0) {
const selectedKey = this.filters[this.currentActiveIndex].key;
this.resetData();
this.itemType = (selectedKey !== 'ITG' && selectedKey !== 'ALL') ? this.filters[this.currentActiveIndex].key : '';
this.getAllPushNotificationFun();
}
);
} //End getNotifications
this.selectedFilter = this.filters[this.currentActiveIndex].key;
}
}
private handleWorkListResult(result) {
if (this.common.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.common.hasData(result.GetWorkList)) {
this.WorkListObj.P_PAGE_NUM++;
this.WorkListResObj = result.GetWorkList;
this.filteredNotificationList = this.WorkListResObj;
this.common.sharedService.setSharedData(this.WorkListResObj, HomeComponent.NOTIFICATION_ARR);
let lastItemIndex = this.WorkListResObj.length - 1;
if (result.GetWorkList[lastItemIndex]) {
let lastitem = result.GetWorkList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
// this.navCtrl.push('SmsAuthenticatePage');
}
openProfilePage() {
this.common.openProfile();
}
disableFilters() {
for (const filter of this.filters) {
if (filter.key === this.itemType) {
filter.disable = false;
filter.active = true;
this.selectedFilter = filter.name;
} else if (this.itemType === '') {
filter.disable = false;
filter.active = false;
} else {
this.WorkListResObj = [];
filter.disable = true;
filter.active = false;
}
}
if (this.itemType === '') {
this.filters[0].active = true;
}
}
openNotificationDetail(obj) {
console.log(obj);
this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA);
//this.common.openWorklistMainPage();
if(obj.REQUEST_TYPE == "PR"){
this.common.openWorklistMainPRPage();
}
else if(obj.REQUEST_TYPE == "PO"){
this.common.openWorklistMainPOPage();
}
else if(obj.REQUEST_TYPE == "MO"){
this.common.openWorklistMainMRPage();
async openSearchModal() {
const modal = await this.modalController.create({
component: WorklistAdvancedSearchComponent,
cssClass: 'advanced-search-modal',
backdropDismiss: false,
componentProps: {}
});
modal.onDidDismiss().then(result => {
if (result.data) {
if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') {
this.showSearchButton = true;
this.itemType = result.data.itemType;
this.notificationType = result.data.notificationType;
this.selectedValue = result.data.selectedValue;
this.inputDate = result.data.inputDate;
this.inputSearch = result.data.inputSearch;
this.WorkListObj.P_PAGE_NUM = 1;
this.newWorkListResponse = [];
this.showFormattedData = {};
this.selectedFilter = 'ALL';
this.filters[this.currentActiveIndex].active = false;
this.currentActiveIndex = 0;
this.previousActiveIndex = 0;
this.filters[this.currentActiveIndex].active = true;
if (this.itemType !== '') {
this.disableFilters();
}
this.getAllPushNotificationFun();
}
}
else{
this.common.openWorklistMainPage();
}
//this.navCtrl.push("WorkListMainPage", { passNotificationList: obj });
}
onChangeView(selectedValue: any) {
this.WorkListObj.P_NOTIFICATION_TYPE = selectedValue.detail.value;
});
return await modal.present();
}
doInfinite(infiniteScroll) {
//this.pageNum= this.pageNum + 1;
getAllPushNotificationFun() {
this.WorkListObj.P_PAGE_NUM = 1;
this.isReachEnd = false;
this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : '';
this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3')
? moment(this.inputDate).format('DD-MMM-YYYY') : '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; ;
this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : '';
this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1';
if (this.selectedValue === '5') {
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
}
if (!this.IsReachEnd) {
this.WorklistService.getWorkList(this.WorkListObj).subscribe(
(result: any) => {
if (this.common.validResponse(result)) {
this.WorkListObj.P_PAGE_NUM++;
if (this.common.hasData(result.GetWorkList)) {
result.GetWorkList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.WorkListResObj.push(element);
});
} // if list length >0
else {
this.IsReachEnd = true;
}
} // if response == 1
//this.pageNum++;
this.infiniteScroll.complete();
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
if (this.common.validResponse(result)) {
this.handleWorkListResult(result.GetWorkList);
}
}
);
} else {
if (this.infiniteScroll) this.infiniteScroll.complete();
}
} //end infiniteScroll
Count() {
this.workListService.getITGCount()
.subscribe((result: any) => {
console.log("ENAD ITG COUNT:")
console.log(result);
});
}
filterNotificationByRequestType(reqType) {
let filterdType = [];
if (reqType == "All") {
this.filteredNotificationList = this.WorkListResObj;
if (this.filteredNotificationList == [] || this.filteredNotificationList == null || this.filteredNotificationList == "") {
this.noData = true;
return false;
} else {
this.noData = false;
return false;
categorizeData(arrayToCategorize: any) {
const datePipe = new DatePipe('en-US');
const formattedData = {};
for (const workList of arrayToCategorize) {
workList.FORMATTED_DATE = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y');
if (!(workList.FORMATTED_DATE in formattedData)) {
formattedData[workList.FORMATTED_DATE] = new Array();
formattedData[workList.FORMATTED_DATE].push(workList);
} else {
formattedData[workList.FORMATTED_DATE].push(workList);
}
}
}
for (let i = 0; i < this.WorkListResObj.length; i++) {
if(reqType=="HR"){
if ("EIT" == this.WorkListResObj[i].REQUEST_TYPE || "ABSENCE" == this.WorkListResObj[i].REQUEST_TYPE) {
filterdType.push(this.WorkListResObj[i]);
return formattedData;
}
sortArray(arrayToSort: any) {
return arrayToSort.sort((a: any, b: any) =>
new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime()
);
}
private handleWorkListResult(result: any) {
const lastItemIndex = result.length - 1;
const lastitem = result[lastItemIndex];
if (lastitem) {
if (lastitem.NO_OF_ROWS === lastitem.ROW_NUM) {
this.isReachEnd = true;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}else{
if (reqType == this.WorkListResObj[i].REQUEST_TYPE) {
filterdType.push(this.WorkListResObj[i]);
} else {
this.isReachEnd = false;
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
}
this.filteredNotificationList = filterdType;
if (this.filteredNotificationList == [] || this.filteredNotificationList == null || this.filteredNotificationList == "") {
this.noData = true;
return false;
if (this.common.hasData(result)) {
this.WorkListObj.P_PAGE_NUM++;
if (this.newWorkListResponse.length === 0) {
this.newWorkListResponse = result;
} else {
this.newWorkListResponse = this.newWorkListResponse.concat(result);
}
this.newWorkListResponse = this.sortArray(this.newWorkListResponse);
console.log(this.newWorkListResponse);
this.showFormattedData = this.categorizeData(this.newWorkListResponse);
this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR);
} else {
this.noData = false;
return false;
this.newWorkListResponse = [];
}
}
Details() {
this.workListService.getITGDetails()
.subscribe((result: any) => {
console.log("ENAD ITG Details:")
console.log(result);
});
openNotificationDetail(obj) {
this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA);
if (obj.REQUEST_TYPE === 'PR') {
this.common.openWorklistMainPRPage();
} else if (obj[0].REQUEST_TYPE === 'PO') {
this.common.openWorklistMainPOPage();
} else if (obj[0].REQUEST_TYPE === 'MO') {
this.common.openWorklistMainMRPage();
} else {
this.common.openWorklistMainPage();
}
}
isEmptyObject() {
return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0) || this.ITGItem.length > 0);
}
AllNotification() {
this.filterNotificationByRequestType("All");
this.isAll = true;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = false;
resetData() {
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
this.showSearchButton = false;
this.notificationType = '1';
this.selectedValue = '';
this.inputDate = '';
this.inputSearch = '';
this.newWorkListResponse = [];
this.showFormattedData = {};
this.WorkListObj.P_SEARCH_FROM_USER = '';
this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = '';
this.WorkListObj.P_SEARCH_SENT_DATE = '';
this.WorkListObj.P_SEARCH_SUBJECT = '';
}
PRNotification() {
this.filterNotificationByRequestType("PR");
this.isAll = false;
this.isPR = true;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = false;
clearSearch() {
this.itemType = '';
this.selectedFilter = 'ALL';
this.disableFilters();
this.resetData();
this.getAllPushNotificationFun();
}
PONotification() {
this.filterNotificationByRequestType("PO");
this.isAll = false;
this.isPR = false;
this.isPO = true;
this.isMR = false;
this.isHR = false;
this.isITG = false;
doInfinite(infiniteScroll) {
if (!this.isReachEnd && this.selectedFilter !== 'ITG') {
this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => {
if (this.common.validResponse(result)) {
this.handleWorkListResult(result.GetWorkList);
}
});
} else {
if (this.infiniteScroll) {
this.infiniteScroll.complete();
}
}
}
MRNotification() {
this.filterNotificationByRequestType("MO");
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = true;
this.isHR = false;
this.isITG = false;
Count() {
this.workListService.getITGCount()
.subscribe((result: any) => {
for (let i = 0; i < result.RequestType.length; i++) {
this.ITGSegment[i] = {
name: result.RequestType[i].RequestTypeName,
code: result.RequestType[i].RequestTypeCode,
data: result.RequestType[i].RequestDetails,
style: false
};
}
this.setActive(this.ITGSegment[0].code);
});
}
HRNotification() {
this.filterNotificationByRequestType("HR");
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = true;
this.isITG = false;
Details() {
this.workListService.getITGDetails()
.subscribe((result: any) => {
this.totalRequestCount = this.totalRequestCount + result.TotalCount;
this.filters[5].value = result.TotalCount;
});
}
ITGNotification() {
// this.Details();
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = true;
// this.Details();
this.isAll = false;
this.isPR = false;
this.isPO = false;
this.isMR = false;
this.isHR = false;
this.isITG = true;
}
searchBtn() {
this.isSearch = !this.isSearch;
this.isSearch = !this.isSearch;
}
setActive(selectedSegment) {
this.ITGItem = [];
let count = 0;
this.activeSegment = selectedSegment;
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < this.ITGSegment.length; i++) {
if (this.ITGSegment[i].code === selectedSegment) {
this.ITGSegment[i].style = true;
this.ITGItem[count] = this.ITGSegment[i].data;
count++;
} else {
this.ITGSegment[i].style = false;
}
}
}
openITG(segmentInfo) {
this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO);
this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME);
this.common.sharedService.setSharedData(this.ITGItem, HomeComponent.ALL_REQUEST);
this.common.openWorklistITGPage();
}
}

@ -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,12 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class itgRequest extends Request {
public RequestType: string;
public ItemID: number;
public TaskID: number;
public EmployeeNumber: string;
public Comments: string;
public IsSubTask: boolean;
public NewUserEMPId: string;
public AdditionalFields?: [{}];
}

@ -1,18 +1,13 @@
// import { Request } from './request';
import { Request } from 'src/app/hmg-common/services/models/request';
export class WorkListRequest extends Request{
public static SHARED_DATA = 'login-request';
// Channel: Channel, //channel
// LanguageID: LanguageID,//langlist
// P_USER_NAME:userName,//string
// P_SESSION_ID:sessionID,//number
public P_NOTIFICATION_TYPE: string;//string
public P_SEARCH_FROM_USER:string;//string
public P_SEARCH_SUBJECT:string;//string
public P_SEARCH_SENT_DATE:string;//string
public P_SEARCH_ITEM_TYPE_DSP_NAME:string;//string
public P_PAGE_NUM:number;//number
public P_PAGE_LIMIT:number;//number
public P_NOTIFICATION_TYPE: string;
public P_SEARCH_FROM_USER: string;
public P_SEARCH_SUBJECT: string;
public P_SEARCH_SENT_DATE: string;
public P_SEARCH_ITEM_TYPE_DSP_NAME: string;
public P_PAGE_NUM: number;
public P_PAGE_LIMIT: number;
public P_ITEM_TYPE : string;
}

@ -0,0 +1,44 @@
<ion-content padding>
<!--
<ion-col col-1
style="margin-right: -22px;margin-top: -10px;">
<ion-button class="closeIcon" (click)="closeModal()">
<img src="../assets/imgs/close.png">
</ion-button>
</ion-col> -->
<ion-list>
<ion-radio-group>
<ion-list-header style="margin-bottom: 22px !important;">
<p class="Header">More Action</p>
</ion-list-header>
<div *ngFor="let button of actionBtns ">
<ion-item *ngIf="button.BUTTON_ACTION !='APPROVED' && button.BUTTON_ACTION !='REJECTED' && button.BUTTON_ACTION !='REQUEST_INFO' " >
<ion-label class="labelRadio"> {{button.BUTTON_LABEL}}</ion-label>
<ion-radio color="secondary" mode="md" value="{{button.BUTTON_ACTION}}" (ionSelect)="radioSelect(button)"></ion-radio>
<!-- </div> -->
</ion-item>
</div>
</ion-radio-group>
</ion-list>
<ion-footer>
<ion-row class="rowBtn">
<ion-button style="width:200px !important" class="confirmBtn" (click)="OkBtnModal()"> {{ts.trPK('general','ok')}}
</ion-button>
</ion-row>
<ion-row class="rowBtn">
<ion-button style="width:200px !important" class="cancelBtn" (click)="closeModal()"> {{ts.trPK('general','cancel')}}
</ion-button>
</ion-row>
</ion-footer>
</ion-content>

@ -0,0 +1,22 @@
.rowBtn{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.Header{
color: black !important;
font-size: 16px !important;
font-weight: bold !important;;
margin: 0;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-58px, 2px);
}
.labelRadio{
color: black !important;
font-weight: bold !important;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MoreActionModalComponent } from './more-action-modal.component';
describe('MoreActionModalComponent', () => {
let component: MoreActionModalComponent;
let fixture: ComponentFixture<MoreActionModalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MoreActionModalComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MoreActionModalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,44 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-more-action-modal',
templateUrl: './more-action-modal.component.html',
styleUrls: ['./more-action-modal.component.scss'],
})
export class MoreActionModalComponent implements OnInit {
actionBtns :any =[];
radioButtonValue: any;
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){}
ngOnInit() {
console.log("modal");
this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false);
console.log("modal");
}
closeModal() {
this.modalCtrl.dismiss();
}
radioSelect(v) {
this.radioButtonValue = v;
console.log("radio selected"+v);
}
OkBtnModal() {
if (!this.radioButtonValue) {
let msg: string = this.ts.trPK("replacementRoll", "msg");
this.cs.presentAlert(msg);
return;
} else {
let data = this.radioButtonValue;
this.modalCtrl.dismiss(data);
}
}
}

@ -25,8 +25,12 @@ import { WorklistMainPoComponent } from './worklist-main-po/worklist-main-po.com
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 { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component';
import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component'
import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component';
const routes: Routes = [
@ -43,8 +47,8 @@ const routes: Routes = [
component: WorkListAttachViewComponent
},
{
path:'worklist-main',
component:WorklistMainComponent
path: 'worklist-main',
component: WorklistMainComponent
},
{
path: 'work-list-replacement-roll',
@ -76,28 +80,40 @@ const routes: Routes = [
},
{
path:'worklist-main-PR',
component:WorklistMainPRComponent
path: 'worklist-main-PR',
component: WorklistMainPRComponent
},
{
path:'apply-action-modal',
component:ApplyActionModalComponent
path: 'apply-action-modal',
component: ApplyActionModalComponent
},
{
path:'worklist-main-PO',
component:WorklistMainPoComponent
path: 'worklist-main-PO',
component: WorklistMainPoComponent
},
{
path:'item-history-PO',
component:ItemHistoryComponent
path: 'item-history-PO',
component: ItemHistoryComponent
},
{
path:'qutation-analysis-PO',
component:QutationAnalysisComponent
path: 'qutation-analysis-PO',
component: QutationAnalysisComponent
},
{
path:'worklist-main-MR',
component:WorklistMainMRComponent
path: 'worklist-main-MR',
component: WorklistMainMRComponent
},
{
path: 'worklist-main-ITG',
component: WorkListMainItgComponent
},
{
path: 'more-action-modal',
component: MoreActionModalComponent
},
{
path: 'worklist-replacement-itg',
component: WorkListReplacementItgComponent
}
]
}
@ -119,6 +135,7 @@ const routes: Routes = [
WorkListReplacementRollComponent,
WorkListRfcComponent,
ViewNoteModalComponent,
MoreActionModalComponent,
ApplyActionModalComponent,
ViewReplacementModalComponent,
WorkListActionHistoryComponent,
@ -128,9 +145,15 @@ const routes: Routes = [
WorklistMainPoComponent,
ItemHistoryComponent,
QutationAnalysisComponent,
WorklistMainMRComponent
WorklistMainMRComponent,
WorklistAdvancedSearchComponent,
WorkListMainItgComponent,
WorkListReplacementItgComponent
// WorklistMainComponent
],
providers:[WorklistService,WorklistMainService, WorklistAttachService]
entryComponents: [
WorklistAdvancedSearchComponent
],
providers: [WorklistService, WorklistMainService, WorklistAttachService]
})
export class NotificationPageModule {}

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

@ -19,6 +19,7 @@ import { MOItemHistoryRes } from "../models/MOItemHistoryRes";
import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes';
import { Request } from 'src/app/hmg-common/services/models/request';
import { LoginModel } from '../../authentication/models/LoginModel';
import { itgRequest } from '../models/itgFormDetailsRequest';
@Injectable()
export class WorklistMainService {
@ -44,9 +45,11 @@ export class WorklistMainService {
public static getQutationAnalysisUrl =
"Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS";
public static getITGFormTaskCount =
'http://10.80.100.124:7086/Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
'Services/COCWS.svc/REST/ITGGetTaskCountRequestType';
public static getITGFormTaskDetails =
'http://10.80.100.124:7086/Services/COCWS.svc/REST/ITGFormsPendingTasks';
'Services/COCWS.svc/REST/ITGFormsPendingTasks';
public static getITGFormDetails =
'Services/COCWS.svc/REST/ITGGetFormDetials';
@ -241,7 +244,7 @@ export class WorklistMainService {
const request = new Request;
console.log(request)
this.authService.authenticateRequest(request);
return this.api.postToken(
return this.api.post(
WorklistMainService.getITGFormTaskCount,
request,
onError,
@ -249,12 +252,25 @@ export class WorklistMainService {
);
}
public getITGFormDetails(request:itgRequest, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME;
console.log(request);
return this.api.post(
WorklistMainService.getITGFormDetails,
request,
onError,
errorLabel
);
}
public getITGDetails( onError?: any, errorLabel?: string): Observable<any> {
const request = new Request;
console.log(request)
this.authService.authenticateRequest(request);
return this.api.postToken(
return this.api.post(
WorklistMainService.getITGFormTaskDetails,
request,
onError,
@ -262,4 +278,19 @@ export class WorklistMainService {
);
}
public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(itgrequest);
itgrequest.EmployeeNumber = itgrequest.P_USER_NAME;
console.log(itgrequest);
console.log(actionURL);
return this.api.post(
actionURL,
itgrequest,
onError,
errorLabel
);
}
}

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

@ -0,0 +1,151 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
<ion-buttons slot="start">
<nav-buttons backLink="/notification/homepage"></nav-buttons>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content class="colorBG">
<ion-segment [dir]="directionLTR" mode="md" color="secondary" (ionChange)="segmentChangedClick($event)"
[value]="defaultSegment" class="ion-segment-all">
<ion-segment-button value="{{segmentVal.name}}"
[ngClass]="activeSegment == segmentVal.name ? 'active-Segment' : 'normal-Segment'"
*ngFor="let segmentVal of segmentsArray">
{{segmentVal.name}}
</ion-segment-button>
</ion-segment>
<ion-card class="cardContent" *ngFor='let segmentContant of segmentData'>
<ion-card-content *ngIf='activeSegment === segmentContant.name'>
<ion-grid style="text-align: left" *ngFor='let dataContant of segmentContant.data'>
<ion-row>
<ion-col>
<label class="colItemReq"> {{dataContant.Title}}</label>
<br />
<label>{{dataContant.Value}}</label>
</ion-col>
</ion-row>
<ion-row *ngIf='dataContant.TableValue'>
<ion-col style="border: 1px solid gainsboro; border-radius: 15px; padding-left: 20px;">
<label class="colItemReq" *ngFor="let header of dataContant.TableValue.Header"><br /> {{header}}</label>
<br />
<label *ngFor="let rows of dataContant.TableValue.Rows"><br />{{rows}}</label>
<label *ngIf="dataContant.TableValue.Rows"><br />none</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
<!-- if there is additional screen like in VIDA -->
<!-- <ng-container>
<ion-card class="cardContent" *ngFor='let segmentContant of segmentDataTable'>
<ion-card-content *ngIf='activeSegment === segmentContant.name'>
<ion-grid style="text-align: left" *ngFor='let dataContant of segmentContant.data'>
<ion-row *ngFor="let headerData of dataContant.Header">
<ion-col>
<label class="colItemReq"> {{headerData}}</label>
<br />
<label>{{headerData}}</label>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ng-container> -->
<!-- END -->
<ion-card class="cardContent" *ngIf='activeSegment === "Approval Level"'>
<ion-card-content>
<ion-grid>
<ion-row>
<ion-col>
<ion-list class="notification-list" style="margin-left: -30px;" *ngFor="let approvalInfo of workList">
<div class="timeline">
<ion-item>
<div class="timeline-item" slot="start">
<div>
<button ion-button style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png">
</button>
<div
[ngClass]="{'bg-blue-dot' : approvalInfo.Action === 'Submit', 'bg-green-dot':approvalInfo.Action === 'Approved', 'bg-red-dot':approvalInfo.Action === 'Rejected', 'bg-gray-dot':approvalInfo.Action === 'Pending', 'bg-gray-dot':approvalInfo.Action === ''}"
class="timeline-thumb timeline-icon">
</div>
<p style="margin-left: -20%; font-size: 12px !important;">{{approvalInfo.Action}}</p>
</div>
</div>
<p style="margin-left: 10%;">{{approvalInfo.Name}}</p>
</ion-item>
</div>
</ion-list>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
<ion-card class="cardContent">
<ion-card-content>
<ion-grid>
<ion-row>
<ion-col>
<ion-label>
<h2 class="boldTxtNav">Comment</h2>
</ion-label>
<ion-input type='text' [(ngModel)]='commentText'></ion-input>
<ion-item *ngFor="let object of grantInfo">
<ion-label>{{object.Label}}</ion-label>
<ion-select *ngIf="!object.ConditionalFieldName" [(ngModel)]='ExchangeServerSelected'
(ionChange)="filterGrantDB(ExchangeServerSelected,object, object.FieldName)" id='{{object.FieldName}}'>
<ion-select-option value="{{value}}" *ngFor="let value of object.Value">
{{value}}</ion-select-option>
</ion-select>
<ion-select *ngIf="object.ConditionalFieldName" [(ngModel)]='ExchangeServerDBSelected'
(ionChange)="filterGrantDB(ExchangeServerDBSelected,object)" id='{{object.FieldName}}'>
<ion-select-option value="{{value}}" *ngFor="let value of filteredGrantFieldsConditionalValue">
{{value}}</ion-select-option>
</ion-select>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</ion-content>
<ion-footer class="footerSearchBtn">
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom">
<!-- <ion-tab-button *ngFor='let action of actionBTN' [hidden]="action.isAvailable" > -->
<ion-tab-button *ngFor='let action of actionBTN' [hidden]='!action.isAvailable'
(click)="selectAtion(action.name)">
<img [src]="action.image">
<ion-label style="font-size: 12px;">{{action.name}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="skip()">
<img src="../assets/imgs/action-skip.png">
<ion-label style="font-size: 12px;">Skip</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-footer>

@ -0,0 +1,13 @@
.timeline-thumb {
height: 30px !important;
left: 54px !important;
}
.timeline-icon{
width: 30px !important;
}
.timeline:before{
position: fixed !important;
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WorkListMainItgComponent } from './work-list-main-itg.component';
describe('WorkListMainItgComponent', () => {
let component: WorkListMainItgComponent;
let fixture: ComponentFixture<WorkListMainItgComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WorkListMainItgComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WorkListMainItgComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,342 @@
import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { HomeComponent } from '../home/home.component';
import { WorklistMainService } from '../service/work-list.main.service';
import { itgRequest } from '../models/itgFormDetailsRequest';
import { ModalController } from '@ionic/angular';
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListReplacementItgComponent } from '../work-list-replacement-itg/work-list-replacement-itg.component';
@Component({
selector: 'app-work-list-main-itg',
templateUrl: './work-list-main-itg.component.html',
styleUrls: ['./work-list-main-itg.component.scss'],
})
export class WorkListMainItgComponent implements OnInit {
public static APPROVAL = "Services/COCWS.svc/REST/ITGApproveRequest"
public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest'
public static DELEGATE = 'Services/COCWS.svc/REST/ITGDelegateRequest';
public static REQUEST_INFORMATION = 'Services/COCWS.svc/REST/ITGRequestInformation';
public static ANSWER = 'Services/COCWS.svc/REST/ITGAnswer';
public static GRANT = 'Services/COCWS.svc/REST/ITGGrantAccess';
public request_info: any;
public request_name: any;
public all_request: any;
public request = new itgRequest();
public activeSegment: any = "info";
public request_details: any;
public segmentsArray: { name: string, number: number }[] = [];
public segmentData: { name: string, data: any }[] = [];
public header: any = [];
public rows: any = [];
public workList: any;
public commentText: string;
public replcamentID: string;
public actionSelected: any;
public options: any;
public index: number = 0;
public grantDATA: any;
public grantInfo: any;
public grantFieldsConditionalValue: any = [];
public filteredGrantFieldsConditionalValue: any = [];
public grantFieldsLabel: any = [];
public grantFieldsValue: any = [];
public grantRequest: any = [];
public ExchangeServerSelected: any;
public ExchangeServerDBSelected: any;
public actionBTN: { name: string, image: string, isAvailable: boolean }[] = [];
constructor(
public common: CommonService,
public ts: TranslatorService,
public workListService: WorklistMainService,
public modalCtrl: ModalController) { }
ngOnInit() {
this.request_info = this.common.sharedService.getSharedData(HomeComponent.REQUSET_INFO);
this.request_name = this.common.sharedService.getSharedData(HomeComponent.REQUSET_NAME);
this.all_request = this.common.sharedService.getSharedData(HomeComponent.ALL_REQUEST);
this.all_request = this.all_request[0];
this.changeITGForm(this.request_info, this.request_name);
}
changeITGForm(data, requestName) {
this.request_info = data;
this.request_name = requestName;
this.request.RequestType = this.request_name;
this.request.ItemID = this.request_info.ItemID;
this.request.TaskID = this.request_info.ID;
this.request.Comments = this.request_info.Comments;
this.request.NewUserEMPId = this.request_info.NewUserEMPId;
this.workListService.getITGFormDetails(this.request).subscribe((result: any) => {
this.request_details = result.ITGRequest;
this.grantInfo = result.ITGRequest.GrantFields;
let count = 0;
for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) {
this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i };
this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields}
}
this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length }
this.workList = this.request_details.WFHistory;
this.options = this.request_details.AllowedActions;
this.activeSegment = this.segmentsArray[0].name;
for (let i = 0; i < this.options.length; i++) {
this.imageURL(this.options[i].Action);
this.actionBTN[i] = { name: this.options[i].Action, image: this.imageURL(this.options[i].Action), isAvailable: this.options[i].IsAvailable }
}
if (this.grantInfo) {
let count = 0;
this.grantFieldsConditionalValue = [];
for (let i = 0; i < this.grantInfo.length; i++) {
if (this.grantInfo[i].Value) {
for (let j = 0; j < this.grantInfo[i].Value.length; j++) {
this.grantFieldsValue[j] = this.grantInfo[i].Value[j];
}
}
if (this.grantInfo[i].ConditionalValue) {
for (let j = 0; j < this.grantInfo[i].ConditionalValue.length; j++) {
this.grantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j];
count++;
}
}
}
}
//result.ITGRequest.FieldGoups.Fields
});
}
imageURL(actionName) {
if (actionName == "Approve") {
return "../assets/imgs/action-approve.png"
}
if (actionName == "Reject") {
return "../assets/imgs/action-reject.png"
}
if (actionName == "RequestInformation") {
return "../assets/imgs/action-info.png"
}
if (actionName == "Grant") {
return "../assets/imgs/action-info.png"
}
if (actionName == "Delegate") {
return "../assets/imgs/action-info.png"
}
}
public segmentChangedClick(event: any) {
this.activeSegment = event.detail.value;
}
skip() {
for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request
if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found.
this.index = i + 1;
if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request.
this.clearDataArray();
this.changeITGForm(this.all_request[this.index], this.request_name);
break;
} else {
this.common.openNotificationPage();
break;
}
} else {
this.common.openNotificationPage();
break;
}
}
}
clearDataArray() {
this.commentText = '';
this.actionSelected = '';
this.segmentsArray = [];
this.segmentData = [];
this.workList = [];
this.actionBTN = [];
}
actionService(action, comments?, grantRequests?) {
let url: string;
let request = new itgRequest();
request.RequestType = this.request_name;
request.ItemID = this.request_info.ItemID;
request.TaskID = this.request_info.ID;
request.Comments = this.commentText;
request.Comments = this.request_info.Comments;
request.EmployeeNumber = this.request_info.EmployeeNumber;
request.NewUserEMPId = this.replcamentID;
this.common.confirmAlertDialogAction(
() => {
if (action == 1) { //approved
url = WorkListMainItgComponent.APPROVAL;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else if (action == 2) {//reject
url = WorkListMainItgComponent.REJECT;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else if (action == 3) {//request more info
request.NewUserEMPId = this.replcamentID;
url = WorkListMainItgComponent.REQUEST_INFORMATION;
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
} else {
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
}
} else if (action == 4) {//delegate
request.NewUserEMPId = this.replcamentID;
url = WorkListMainItgComponent.DELEGATE;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else if (action == 5) { //answer
url = WorkListMainItgComponent.ANSWER;
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
} else {
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
}
} else if (action == 6) { //grant
url = WorkListMainItgComponent.GRANT;
if (!comments) {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
}
else {
if (this.grantRequest) {
request.AdditionalFields = this.grantRequest;
this.workListService.getITGActionRequest(request, url)
.subscribe((result: any) => {
// this.common.openNotificationPage();
this.skip();
});
} else {
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
}
}
}
}, this.ts.trPK('general', 'ok'),
() => { this.actionSelected = '' }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg(action));
}
confirmMsg(action) {
if (action === 1) {
return this.ts.trPK('worklist', 'approveMsg');
}
if (action === 2) {
return this.ts.trPK('worklist', 'rejectMsg');
}
if (action === 3) {
return this.ts.trPK('worklist', 'requestInformationMsg');
}
if (action === 4) {
return this.ts.trPK('worklist', 'delegateMsg');
}
if (action === 5) {
return this.ts.trPK('worklist', 'answerMsg');
}
if (action === 6) {
return this.ts.trPK('worklist', 'grantMsg');
}
}
selectAtion(actionSelected) {
this.actionSelected = actionSelected;
if (this.actionSelected == "Answer") {
this.actionService(5, this.commentText)
}
if (this.actionSelected == "Approve") {
this.actionService(1, this.commentText);
}
if (this.actionSelected == "Delegate") {
// this.actionService(4, this.commentText)
// this.common.openWorklistRollReplacement();
this.presentModal(4);
}
if (this.actionSelected === 'Doable') {
}
if (this.actionSelected === 'Grant') {
this.actionService(6, this.commentText, this.grantRequest);
}
if (this.actionSelected === 'NotDoable') {
}
if (this.actionSelected === 'Question') {
}
if (this.actionSelected === 'Reject') {
this.actionService(2, this.commentText);
}
if (this.actionSelected === 'RequestInformation') {
this.presentModal(3);
}
}
async presentModal(actionNumber) {
const modal = await this.modalCtrl.create({
component: WorkListReplacementItgComponent,
backdropDismiss: false,
});
modal.cssClass = 'replaceRoll-modal';
modal.onDidDismiss()
.then((data) => {
this.replcamentID = data.data.empData.USER_NAME;
if (actionNumber == 3) {
this.actionService(3, this.commentText);
} else if (actionNumber == 4) {
this.actionService(4);
}
});
return await modal.present();
}
filterGrantDB(valueSelected, object, selectedOption?) {
let count = 0;
this.filteredGrantFieldsConditionalValue = [];
this.grantRequest.push({ Key: object.FieldName, Value: valueSelected });
for (let i = 0; i < this.grantInfo.length; i++) {
if (selectedOption === this.grantInfo[i].ConditionalFieldName) {
for (let j = 0; j < this.grantFieldsConditionalValue.length; j++) {
if (valueSelected === this.grantFieldsConditionalValue[j].Key) {
this.filteredGrantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j].Value[0];
count++;
}
}
}
}
}
}

@ -0,0 +1,60 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<!-- <nav-buttons></nav-buttons> -->
<ion-title color="light">{{ 'vacation-rule, search-employee' | translate}}</ion-title>
<ion-buttons slot="primary">
<ion-button style="background: none !important;" (click)="closePage()">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div style="padding: 0 10px;" [innerHTML]='"vacation-rule, replacement-employee-tip" | translate'></div>
<ion-item lines="none">
<ion-label class="boldTxtNav">{{'vacation-rule, search-by' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchKeySelect">
<ion-select-option value="1" selected="true">{{'vacation-rule, search-by-name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'vacation-rule, search-by-username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'vacation-rule, search-by-email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines='none'>
<ion-input [(ngModel)]="searchKey" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
<ion-button style="width: 19%;" button-type="clear" (click)="SearchReplacementList()">
<ion-icon slot="icon-only" name="search"></ion-icon>
</ion-button>
</ion-item>
<!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-list>
</ion-item> -->
<ion-list>
<ion-radio-group mode="md" [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button (click)="closePage()" class="footer-button" color="customnavy">{{'general, save' | translate}}
</ion-button>
</div>
</ion-footer>

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WorkListReplacementItgComponent } from './work-list-replacement-itg.component';
describe('WorkListReplacementItgComponent', () => {
let component: WorkListReplacementItgComponent;
let fixture: ComponentFixture<WorkListReplacementItgComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WorkListReplacementItgComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WorkListReplacementItgComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,131 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { ReplacementServiceRequest } from 'src/app/vacation-rule/model/replacement-Service.request';
import { VacationRuleServiceService } from 'src/app/vacation-rule/service/vacation-rule-service.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
@Component({
selector: 'app-work-list-replacement-itg',
templateUrl: './work-list-replacement-itg.component.html',
styleUrls: ['./work-list-replacement-itg.component.scss'],
})
export class WorkListReplacementItgComponent implements OnInit {
P_SEARCH_USER_NAME: string = "";
P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = "";
P_SEARCH_EMAIL_ADDRESS: string = "";
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 50;
ReplacementList: any = [];
IsReachEnd: boolean = false;
selEmp: string = null;
callback: any;
searchKey: any = "";
searchKeySelect: string = "";
replacmentRequest: any = "";
isAbs: boolean = false;
isSave: boolean = false;
constructor(public vacationRuleService: VacationRuleServiceService,
public ts: TranslatorService,
public cs: CommonService,
public modalController: ModalController) { }
ngOnInit() {}
SearchReplacementList() {
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
if (this.searchKey) {
switch (this.searchKeySelect) {
case '1': {
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.searchKey;
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '2': {
this.P_SEARCH_USER_NAME = this.searchKey;
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
case '3': {
this.P_SEARCH_EMAIL_ADDRESS = this.searchKey;
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
break;
}
default: {
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
break;
}
}
} else {
this.P_SEARCH_USER_NAME = "";
this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.P_SEARCH_EMAIL_ADDRESS = "";
}
const request = new ReplacementServiceRequest();
request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME;
request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME;
request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS;
request.P_PAGE_NUM = this.P_PAGE_NUM;
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
this.vacationRuleService.getReplacementList(request).
subscribe((result: any) => {
this.handleReplacment(result);
});
}
handleReplacment(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.ReplacementList)) {
this.ReplacementList = result.ReplacementList;
this.P_PAGE_NUM++;
let lastItemIndex = this.ReplacementList.length - 1;
if (result.ReplacementList[lastItemIndex]) {
let lastitem = result.ReplacementList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
}
}
}
doInfinite(infiniteScroll) {
}
closePage() {
this.isSave = true;
let data: any = null;
if (this.isSave == true) {
if (this.selEmp) {
data = this.ReplacementList[this.selEmp];
} else {
data = null;
}
if (typeof this.callback == 'function') {
this.callback(data);
}
this.modalController.dismiss({
'dismissed': true,
empData: data
});
}
}
}

@ -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 style="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;
}
}

@ -0,0 +1,66 @@
<ion-content>
<div class="search-header" (click)="dismissModal()">
<h2>Advanced Search</h2>
<ion-icon slot="icon-only" name="md-close"></ion-icon>
</div>
<div class="search-container">
<ion-item lines="none">
<ion-label>{{ts.trPK('worklist','view')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
(ionChange)=onChangeView($event)>
<ion-select-option value="1">{{ts.trPK('worklist','openNot')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','fyi')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','toDo')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','all')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','meNot')}} </ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none" [ngStyle]="(hideDateInput === true || hideTextInput === true) ? {'margin-bottom': '0px'} : {}">
<ion-label>{{ts.trPK('worklist','searchby')}}</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
(ionChange)="getValueSelected($event)">
<ion-select-option value="1">{{ts.trPK('worklist','from')}}</ion-select-option>
<ion-select-option value="2">{{ts.trPK('worklist','subject')}}</ion-select-option>
<ion-select-option value="3">{{ts.trPK('worklist','sent')}}</ion-select-option>
<ion-select-option value="4">{{ts.trPK('worklist','itemType')}}</ion-select-option>
<ion-select-option value="5">{{ts.trPK('worklist','none')}}</ion-select-option>
</ion-select>
</ion-item>
<div>
<div *ngIf="hideDateInput">
<ion-item lines='none' style="border-radius: 10px;margin-right: 10px;margin-left: 10px;margin-top: 5px;">
<ion-label>{{ts.trPK('worklist','sent')}} </ion-label>
<ion-datetime placeholder="{{ts.trPK('worklist','enter')}}" displayFormat="DD-MMM-YYYY"
pickerFormat="DD-MMM-YYYY" [(ngModel)]="inputDate"></ion-datetime>
</ion-item>
</div>
<div *ngIf="hideTextInput">
<ion-item lines='none' style="border-radius: 10px;margin-right: 10px;margin-left: 10px;margin-top: 5px;">
<ion-input placeholder="{{ts.trPK('worklist','enter')}}" [(ngModel)]="inputSearch">
</ion-input>
</ion-item>
</div>
</div>
<ion-item lines="none">
<ion-label>Item Type</ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="itemType">
<ion-select-option value="HRSSA">HR</ion-select-option>
<ion-select-option value="POAPPRV">PO</ion-select-option>
<ion-select-option value="REQAPPRV">PR</ion-select-option>
<ion-select-option value="INVMOA">MR</ion-select-option>
</ion-select>
</ion-item>
<div class="search-button" (click)="search()">
<span>SEARCH</span>
</div>
</div>
</ion-content>

@ -0,0 +1,40 @@
.search-header{
display: inline-block;
h2 {
display: inline-block;
margin-left: 20px;
font-family: WorkSans-Regular;
font-size: 18px;
margin-top: 12px;
}
ion-icon {
display: inline-block;
font-size: 23px;
position: absolute;
right: 15px;
top: 8px;
}
}
.search-container {
margin-right: 15px;
margin-left: 15px;
padding-bottom: 100px;
margin-top: 5px;
ion-item{
border: 2px solid #eaeaea;
border-radius: 25px;
margin-bottom: 20px;
}
}
.search-button{
background: #3dcab3;
height: 50px;
text-align: center;
font-family: WorkSans-Regular;
border-radius: 22px;
margin-top: 20px;
line-height: 50px;
span{
color: white;
}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WorklistAdvancedSearchComponent } from './worklist-advanced-search.component';
describe('WorklistAdvancedSearchComponent', () => {
let component: WorklistAdvancedSearchComponent;
let fixture: ComponentFixture<WorklistAdvancedSearchComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WorklistAdvancedSearchComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WorklistAdvancedSearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,65 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-worklist-advanced-search',
templateUrl: './worklist-advanced-search.component.html',
styleUrls: ['./worklist-advanced-search.component.scss'],
})
export class WorklistAdvancedSearchComponent implements OnInit {
public hideDateInput = false;
public hideTextInput = false;
public inputDate = '';
public inputSearch = '';
public selectedValue = '';
public notificationType = '';
public itemType = '';
constructor(
public modalController: ModalController,
public ts: TranslatorService
) { }
ngOnInit() {}
public dismissModal() {
this.modalController.dismiss();
}
public search() {
console.log(this.itemType);
this.modalController.dismiss({
notificationType: this.notificationType,
selectedValue: this.selectedValue,
inputDate: this.inputDate,
inputSearch: this.inputSearch,
itemType: this.itemType
});
}
onChangeView(selectedValue: any) {
this.notificationType = selectedValue.detail.value;
}
getValueSelected(value) {
this.selectedValue = value.detail.value;
if (this.selectedValue === '1') {
this.hideDateInput = false;
this.hideTextInput = true;
} else if (this.selectedValue === '2') {
this.hideDateInput = false;
this.hideTextInput = true;
} else if (this.selectedValue === '3') {
this.hideDateInput = true;
this.hideTextInput = false;
} else if (this.selectedValue === '4') {
this.hideDateInput = false;
this.hideTextInput = true;
} else if (this.selectedValue === '5') {
this.hideDateInput = false;
this.hideTextInput = false;
}
}
}

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

@ -466,6 +466,10 @@
"en": "Attachment",
"ar": "مرفق"
},
"file": {
"en": "file",
"ar": "ملف"
},
"select-attachment": {
"en": "Select Attachment",
"ar": "إختر مرفق"
@ -1623,7 +1627,7 @@
},
"msg":{
"en": "Select a replacement",
"ar":"اختيار بديل"
"ar":"اختر بديل"
},
"title":{
"en": "Replacement Roll",
@ -1710,6 +1714,34 @@
"note": {
"en":"Note",
"ar":"مذكرة"
},
"approveMsg":{
"en":"are you sure that you want to approve this request?",
"ar":"هل انت متاكد من قبول هذا الطلب؟"
},
"rejectMsg":{
"en":"are you sure that you want to reject this request?",
"ar":"هل انت متاكد من رفض هذا الطلب؟"
},
"delegateMsg":{
"en":"are you sure that you want to delegate this request?",
"ar":"هل انت متاكد من تحويل هذا الطلب؟"
},
"requestInformationMsg":{
"en":"are you sure that you want to more information for this request?",
"ar":"هل انت متاكد من طلب مزيد من المعلومات لهذا الطلب؟"
},
"grantMsg":{
"en":"are you sure that you want to grant access for this request?",
"ar":"هل انت متاكد من انشاء صلاحيه لهذا الطلب؟"
},
"answerMsg":{
"en":"press on ok to continue",
"ar":"اضغط على موافق للاستمرار"
},
"empty-comment":{
"en":"you shoud add comment",
"ar":"يجب عليك اضافة تعليق"
}
},
"worklistMain": {
@ -1734,7 +1766,7 @@
"ar": "معلومات الموظف"
},
"info":{
"en": "Information",
"en": "Info",
"ar":"تفاصيل"
},
"notfDetails":{
@ -1814,19 +1846,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":{
@ -2094,7 +2126,6 @@
"en": "Line Details",
"ar":"Line Details"
}
},
"payslip": {
@ -2210,24 +2241,24 @@
"ar":"Mark Attendance "
},
"check-in":{
"en": "Check In",
"ar":"Check In"
"en": "CHECK IN",
"ar":"CHECK IN"
},
"check-out":{
"en": "Check Out",
"ar":"Check Out"
"en": "CHECK OUT",
"ar":"CHECK OUT"
},
"regular":{
"en": "Regular",
"ar":"Regular"
"en": "REGULAR",
"ar":"REGULAR"
},
"late-in":{
"en": "Late In",
"ar":"Late In"
"en": "LATE IN",
"ar":"LATE IN"
},
"today-time-left":{
"en": "TODAY TIME LEFT",
"ar":"TODAY TIME LEFT"
"en": "TODAY'S TIME LEFT",
"ar":"TODAY'S TIME LEFT"
},

@ -927,7 +927,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;
}
@ -978,7 +990,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;
@ -989,9 +1001,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;
@ -1002,6 +1016,7 @@ color: var(--dark);
min-width: 5px !important;
width: 10px !important;
margin: 8px !important;
--background:transparent;
}
.checkOutOkBtn{
@ -1111,6 +1126,83 @@ border:0px
width: 315px;
}
.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;
}
// .swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction {
// /* bottom: 10px; */
// left: 0;
@ -1123,6 +1215,11 @@ border:0px
// max-width: 40% !important;
// }
.advanced-search-modal {
--height: 9cm !important;
--width: 88% !important;
--border-radius: 0.6cm;
}
.slideFullWidth {
margin-left:-15px;
margin-right:-15px;
@ -1147,10 +1244,25 @@ border:0px
}
.alert-button-inner.sc-ion-alert-md {
justify-content: center !important;
}
.header-md:after {
height: 0px !important;
display: none !important;
}
.header-toolbar-new{
--background: #22c6b3;
}
.modal-wrapper{
border-radius: 20px !important;
}
.replaceRoll-modal {
padding: 30% 1% !important;
--height: 15cm !important;
--width: 100% !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);
@ -62,10 +64,6 @@ margin-left: 10px !important;
white-space: normal;
overflow: hidden;
box-sizing: border-box;
}
.colItemReqHeader{
@ -169,6 +167,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 +177,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 +187,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 +202,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 +212,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 +252,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 +361,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 +375,7 @@ ion-item{
ion-label , [item-end]{
white-space: normal;
font-size: 14px;
font-size: 14px !important;
// :root[dir="ltr"]{
// margin-left: 10px;
// }
@ -366,8 +417,138 @@ left: 66px;
}
.approvalTitle{
font-weight: bold;
font-size: 16px;
text-align: left;
}
.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;
}
.approvalTitle{
font-weight: bold;
font-size: 16px;
text-align: left;
}

Loading…
Cancel
Save