worklist main page update

master
Sultan Khan 7 years ago
commit a87afe1d8e

@ -119,10 +119,10 @@
<plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<engine name="browser" spec="5.0.4" />
<engine name="ios" spec="4.5.5" />
<engine name="android" spec="7.1.4" />
<plugin name="cordova-plugin-geolocation" spec="4.0.1">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="To fetch location for marking attendance" />
</plugin>
<plugin name="cordova-plugin-cszbar" spec="1.3.4" />
<plugin name="cordova-plugin-datepicker" spec="0.9.3" />
<engine name="android" spec="~7.1.4" />
</widget>

@ -3209,6 +3209,216 @@
"serialize-javascript": "^1.4.0"
}
},
"cordova-android": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz",
"integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==",
"requires": {
"abbrev": "*",
"android-versions": "1.4.0",
"ansi": "*",
"balanced-match": "*",
"base64-js": "1.2.0",
"big-integer": "1.6.32",
"bplist-parser": "*",
"brace-expansion": "*",
"concat-map": "*",
"cordova-common": "2.2.5",
"cordova-registry-mapper": "*",
"elementtree": "0.1.6",
"glob": "5.0.15",
"inflight": "*",
"inherits": "*",
"minimatch": "*",
"nopt": "3.0.1",
"once": "*",
"path-is-absolute": "1.0.1",
"plist": "2.1.0",
"properties-parser": "0.2.3",
"q": "1.4.1",
"sax": "0.3.5",
"semver": "5.5.0",
"shelljs": "0.5.3",
"underscore": "*",
"unorm": "*",
"wrappy": "*",
"xmlbuilder": "8.2.2",
"xmldom": "*"
},
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true
},
"android-versions": {
"version": "1.4.0",
"bundled": true,
"requires": {
"semver": "^5.4.1"
}
},
"ansi": {
"version": "0.3.1",
"bundled": true
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
},
"base64-js": {
"version": "1.2.0",
"bundled": true
},
"big-integer": {
"version": "1.6.32",
"bundled": true
},
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"requires": {
"big-integer": "^1.6.7"
}
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"bundled": true
},
"cordova-common": {
"version": "2.2.5",
"bundled": true,
"requires": {
"ansi": "^0.3.1",
"bplist-parser": "^0.1.0",
"cordova-registry-mapper": "^1.1.8",
"elementtree": "0.1.6",
"glob": "^5.0.13",
"minimatch": "^3.0.0",
"plist": "^2.1.0",
"q": "^1.4.1",
"shelljs": "^0.5.3",
"underscore": "^1.8.3",
"unorm": "^1.3.3"
}
},
"cordova-registry-mapper": {
"version": "1.1.15",
"bundled": true
},
"elementtree": {
"version": "0.1.6",
"bundled": true,
"requires": {
"sax": "0.3.5"
}
},
"glob": {
"version": "5.0.15",
"bundled": true,
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "2 || 3",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"nopt": {
"version": "3.0.1",
"bundled": true,
"requires": {
"abbrev": "1"
}
},
"once": {
"version": "1.4.0",
"bundled": true,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
},
"plist": {
"version": "2.1.0",
"bundled": true,
"requires": {
"base64-js": "1.2.0",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.x"
}
},
"properties-parser": {
"version": "0.2.3",
"bundled": true
},
"q": {
"version": "1.4.1",
"bundled": true
},
"sax": {
"version": "0.3.5",
"bundled": true
},
"semver": {
"version": "5.5.0",
"bundled": true
},
"shelljs": {
"version": "0.5.3",
"bundled": true
},
"underscore": {
"version": "1.9.1",
"bundled": true
},
"unorm": {
"version": "1.4.1",
"bundled": true
},
"wrappy": {
"version": "1.0.2",
"bundled": true
},
"xmlbuilder": {
"version": "8.2.2",
"bundled": true
},
"xmldom": {
"version": "0.1.27",
"bundled": true
}
}
},
"cordova-browser": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz",

@ -97,7 +97,7 @@
"ng2-pdf-viewer": "^5.3.2",
"phonegap-plugin-barcodescanner": "^8.1.0",
"phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "2.2.3",
"phonegap-plugin-push": "^2.2.3",
"primeicons": "^1.0.0",
"primeng": "^7.1.3",
"run": "1.4.0",
@ -196,7 +196,8 @@
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova-plugin-datepicker": {}
"cordova-plugin-datepicker": {},
"phonegap-plugin-barcodescanner": {}
},
"platforms": [
"browser",

@ -16,34 +16,49 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{"addAttach.title" | translate}}</div>
<div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
<ion-grid no-padding>
<ion-row style="width: 100%;" nowrap align-items-center>
<ion-col size="10">
<div class="hrTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col size="2">
<div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file">
<ion-icon style="font-size: 30px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
</ion-grid>
<!-- <div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file">
<ion-icon name="add"></ion-icon>
</label></div>
</label></div> -->
</ion-card-header>
<ion-card-content>
<ion-grid class=" gridAH" *ngIf="uploader?.queue?.length > 0">
<ion-row class="rowAH titleH">
<ion-col col-4>
<label class="Header" for="">{{'addAttach.name' | translate}}</label>
<ion-row class="rowAH titleH" align-items-center>
<ion-col size="4">
<label class="Header" for="">{{'addAttach, name' | translate}}</label>
</ion-col>
<ion-col col-4>
<label class="Header" for="">{{'addAttach.size' | translate}}</label>
<ion-col size="4">
<label class="Header" for="">{{'addAttach, size' | translate}}</label>
</ion-col>
<ion-col col-4>
<label class="Header" for="">{{'addAttach.remove' | translate}}</label>
<ion-col size="4">
<label class="Header" for="">{{'addAttach, remove' | translate}}</label>
</ion-col>
</ion-row>
<ion-row class="rowAH" *ngFor="let item of uploader.queue">
<ion-col col-4>
<ion-col size="4">
<label for="">{{ item?.file?.name }}</label>
</ion-col>
<ion-col col-4>
<ion-col size="4">
<label *ngIf="uploader.options.isHTML5">{{ item?.file?.size/1024/1024 | number:'.2' }} MB</label>
</ion-col>
<ion-col col-4>
<ion-col size="4">
<button class="iconButton" ion-button (click)="removeFile(item)"> <img class="imgSize"
src="../assets/imgs/deletegray.png"></button>
</ion-col>

@ -0,0 +1,19 @@
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
width: 40px;
height: 40px;
// z-index: -1;
}
.imgSize {
width: 22px;
height: 22px;
}
.Header {
font-weight: bold;
color: #1a586d;
}

@ -24,7 +24,7 @@ export class AddAttachComponent implements OnInit {
index: any = 1;
dirPage: any;
TransactionID: any;
indexLastObj: any
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];

@ -1,7 +1,23 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
ion-label {
color: var(--customnavy) !important;
}
.daynamicForm-Label {
font-size: 16px;
color: var(--customnavy) !important;
display: block;
overflow: hidden;
-webkit-flex: 1;
flex: 1;
font-size: inherit;
white-space: normal;
padding: 5px 0px;
margin: 10px auto;
}

@ -137,7 +137,6 @@ export class AddEitComponent implements OnInit {
const containerId = 'containerDiv';
this.eitVALSettoCall = [];
for (let i = 0; i < feildsList.length; i++) {
console.log(feildsList[i]);
let defaultVal: string = "";
let defaultValText: string = "";
defaultVal = feildsList[i].E_SERVICES_DV.P_ID_COLUMN_NAME ? feildsList[i].E_SERVICES_DV.P_ID_COLUMN_NAME : "";
@ -213,7 +212,7 @@ export class AddEitComponent implements OnInit {
}
} else {
if (feildsList[i].READ_ONLY == 'Y') {
this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT, feildsList[i].APPLICATION_COLUMN_NAME, defaultValText, containerId, defaultVal, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, feildsList[i].REQUIRED_FLAG);
this.textInput = new TextInput(feildsList[i].SEGMENT_PROMPT, feildsList[i].APPLICATION_COLUMN_NAME, defaultVal, containerId, defaultVal, feildsList[i].MOBILE_ENABLED, feildsList[i].DISPLAY_FLAG, feildsList[i].REQUIRED_FLAG);
} else {
// dropdown list missing open in differnt page
//check this validation since he doesnt check the other default_type
@ -386,11 +385,18 @@ export class AddEitComponent implements OnInit {
}
bindHtmlElemEvents(id, obj) {
console.log('bindElement: ' + id);
const elem = document.getElementById(id);
console.log(elem);
console.log(obj);
const elemType = elem.tagName;
let changeEvent = 'ionChange';
if (elemType == 'SELECT')
changeEvent = 'change';
try {
elem.addEventListener("change", (e) => {
// elem.addEventListener("change", (e) => {
elem.addEventListener(changeEvent, (e) => {
//console.log("elem change "+elem.id);
//let x=e.currentTarget as HTMLInputElement;
//let isEmpty:boolean=false;
@ -482,6 +488,7 @@ export class AddEitComponent implements OnInit {
this.eitService.getDefaultValue(body).subscribe((result: any) => {
let elem = this.getElementByName(segmentName);
console.log(elem);
// if(elem.dataset.hiddenval){
// elem.dataset.hiddenval="";
// return false;
@ -490,8 +497,10 @@ export class AddEitComponent implements OnInit {
let val = obj.value;
let text = obj.text;
if (isStandardDate) {
console.log('isStandardDate');
elem.value = this.cs.reverseFormatDate(val);
} else if (isStandardTimeDate) {
console.log('isStandardTimeDate');
if (val) {
elem.dataset.dtvalue = this.cs.reverseFormatStandardDate(val);
elem.innerHTML = this.cs.reverseFormatStandardDate(val);
@ -500,6 +509,7 @@ export class AddEitComponent implements OnInit {
elem.innerHTML = "";
}
} else if (isStandardTime) {
console.log('isStandardTime');
if (val) {
elem.dataset.dtvalue = val;
elem.innerHTML = val;
@ -508,7 +518,11 @@ export class AddEitComponent implements OnInit {
elem.innerHTML = "";
}
} else {
console.log('else - ' + elem.value);
elem.value = val;
elem.innerText = val;
elem.setAttribute('value', val);
console.log('else - ' + elem.value);
}
if (isHidden || isReadOnlyList) {
if (val)
@ -517,7 +531,7 @@ export class AddEitComponent implements OnInit {
elem.dataset.colmText = "";
elem.value = text;
}
var event = new Event('change');
var event = new Event('ionChange');
elem.dispatchEvent(event);
});
}
@ -635,7 +649,8 @@ export class AddEitComponent implements OnInit {
}
idColName = val;
if (this.eitResponse[j].FORMAT_TYPE == "X") {//date
idColName = this.cs.formatDate(val);
// idColName = this.cs.formatDate(val);
idColName = this.cs.formatDateNew(val);
}
}
parentArr.push({ SEGMENT_NAME: this.eitResponse[j].SEGMENT_NAME, VALUE_COLUMN_NAME: val, DESCRIPTION: "", ID_COLUMN_NAME: idColName, FLEX_VALUE_SET_NAME: this.eitResponse[j].FLEX_VALUE_SET_NAME })

@ -9,27 +9,27 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{"confirmAddEit.approverList" | translate}}</div>
<div class="hrTitle">{{'confirmAddEit, approverList' | translate}}</div>
</ion-card-header>
<ion-card-content>
<!-- <ion-item class="itemAH" > -->
<ion-grid class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH">
<ion-col col-1>
<label class="Header" for="">{{'confirmAddEit, no' | translate}}</label>
<ion-grid no-padding class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH" nowrap>
<ion-col size="1">
<ion-label class="Header" for="">{{'confirmAddEit, no' | translate}}</ion-label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'confirmAddEit, approver' | translate}}</label>
<ion-col size="3">
<ion-label class="Header" for="">{{'confirmAddEit, approver' | translate}}</ion-label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'confirmAddEit, approverCategory' | translate}}</label>
<ion-col size="3">
<ion-label class="Header" for="">{{'confirmAddEit, approverCategory' | translate}}</ion-label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'confirmAddEit, approverType' | translate}}</label>
<ion-col size="3">
<ion-label class="Header" for="">{{'confirmAddEit, approverType' | translate}}</ion-label>
</ion-col>
<ion-col col-2>
<label class="Header" for="">{{'confirmAddEit, status' | translate}}</label>
<ion-col size="2">
<ion-label class="Header" for="">{{'confirmAddEit, status' | translate}}</ion-label>
</ion-col>
</ion-row>
<!-- </ion-grid>
@ -40,21 +40,21 @@
<!-- <ion-item class="itemAH" *ngFor="let item of approversList" >
<ion-grid class=" gridAH"> -->
<ion-row class="rowAH" *ngFor="let item of approversList">
<ion-col col-1>
<label for="">{{item.APPROVER_ORDER_NUMBER}}</label>
<ion-row class="rowAH" *ngFor="let item of approversList" nowrap>
<ion-col size="1">
<ion-label class="tbData" for="">{{item.APPROVER_ORDER_NUMBER}}</ion-label>
</ion-col>
<ion-col col-3>
<label for="">{{item.APPROVER}}</label>
<ion-col size="3">
<ion-label class="tbData" for="">{{item.APPROVER}}</ion-label>
</ion-col>
<ion-col col-3>
<label for="">{{item.APPROVER_CATEGORY}}</label>
<ion-col size="3">
<ion-label class="tbData" for="">{{item.APPROVER_CATEGORY}}</ion-label>
</ion-col>
<ion-col col-3>
<label for="">{{item.APPROVER_TYPE}}</label>
<ion-col size="3">
<ion-label class="tbData" for="">{{item.APPROVER_TYPE}}</ion-label>
</ion-col>
<ion-col col-2>
<label for="">{{item.APPROVAL_STATUS}}</label>
<ion-col csize="2">
<ion-label class="tbData" for="">{{item.APPROVAL_STATUS}}</ion-label>
</ion-col>
</ion-row>
</ion-grid>
@ -112,11 +112,20 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{"absenceList, attachList" | translate}}</div>
<button ion-button (click)="addAttachment(true,-1)">
<img class="imgSize" src="../assets/imgs/attachment.png"></button>
<ion-grid no-padding>
<ion-row style="width: 100%;" class="hrTitle" nowrap>
<ion-col size="10">
<ion-text style="font-size: larger;"><b>{{"absenceList, attachList" | translate}}</b></ion-text>
</ion-col>
<ion-col size="2">
<button class="btnBack" ion-button (click)="addAttachment(true,-1)">
<img class="imgSize" src="../assets/imgs/attachment.png"></button>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-header>
<ion-card-content>
<ion-grid *ngIf="attachListOver?.length > 0">
<div *ngFor="let attachList of attachListOver ; let i = index">

@ -1,7 +1,26 @@
.footer-button {
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
border-radius: 2px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}
.imgSize {
width: 22px;
height: 22px;
}
.Header {
font-weight: bold;
color: #1a586d !important;
font-size: 10px;
}
.tbData {
font-size: 10px;
}
.btnBack {
background: transparent;
float: right;
}

@ -30,7 +30,7 @@ export class ConfirmAddEitComponent implements OnInit {
respID: number;
selMenu: MenuResponse;
getAttachList: any;
attachListDisplay: any;
attachListDisplay: any = [];
headerTitle: string = "";
isTrue: any = 0;
attachItems: any;
@ -58,9 +58,7 @@ export class ConfirmAddEitComponent implements OnInit {
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit;
if (this.isResubmitEIT) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
@ -82,7 +80,6 @@ export class ConfirmAddEitComponent implements OnInit {
this.addrespList = this.cs.sharedService.getSharedData(AddEitResponse.SHARED_DATA);
this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY;
this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID;
this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
@ -128,8 +125,8 @@ export class ConfirmAddEitComponent implements OnInit {
let request = {
AddAttachmentList: this.attachListOver
}
this.eitService.addAttachment(
request).
subscribe((result: any) => {
@ -217,7 +214,8 @@ export class ConfirmAddEitComponent implements OnInit {
// }
// this.navCtrl.popToRoot();
this.cs.openHome();
// this.cs.openHome();
this.cs.openNotificationPage();
}
}
@ -232,6 +230,9 @@ export class ConfirmAddEitComponent implements OnInit {
//open the modal with return data
let attachDocID = attachItems.ATTACHED_DOCUMENT_ID;
this.cs.sharedService.setSharedData( this.P_TransactionID, 'TransactionID');
this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
const modal = await this.modalController.create({
component: AddAttachComponent
});
@ -252,7 +253,8 @@ export class ConfirmAddEitComponent implements OnInit {
//.ATTACHED_DOCUMENT_ID
this.updateFile(data, attachDocID);
} else {
this.attachListDisplay = data;
console.log(data);
this.attachListDisplay = data.data;
this.attachItems = this.attachListDisplay.map(function (el) {
var o = Object.assign({}, el);
o.isSuccess = false;
@ -260,6 +262,7 @@ export class ConfirmAddEitComponent implements OnInit {
});
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
// this.attachListOver = this.attachListDisplay;
}
// this.attachListDisplay=data;
@ -268,62 +271,10 @@ export class ConfirmAddEitComponent implements OnInit {
// o.isSuccess = false;
// return o;
// })
// console.log(this.attachListDisplay);
// console.log(this.attachItems);
}
});
return await modal.present();
// var modalPage = this.modalController.create('AddAttachPage', { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID, enableBackdropDismiss: false });//enableBackdropDismiss: false ,enableBackdropDismiss: false
// modalPage.onDidDismiss(data => {
// if (data == "cancel" || data == "undefined") {
// return;
// }
// else {
// if (!str) {
// // this.attachItems = data.map(function(el) {
// // var o = Object.assign({}, el);
// // o.isSuccess = false;
// // return o;
// // })
// // this.objIndex1 =this.attachmentRes.findIndex(item => item == attachItems); //to use it in remove attach
// //.ATTACHED_DOCUMENT_ID
// this.updateFile(data, attachDocID);
// }
// else {
// this.attachListDisplay = data;
// this.attachItems = this.attachListDisplay.map(function (el) {
// var o = Object.assign({}, el);
// o.isSuccess = false;
// return o;
// });
// this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
// }
// // this.attachListDisplay=data;
// // this.attachItems = this.attachListDisplay.map(function(el) {
// // var o = Object.assign({}, el);
// // o.isSuccess = false;
// // return o;
// // })
// // console.log(this.attachListDisplay);
// // console.log(this.attachItems);
// }// end else
// });
// modalPage.present();
}
removeFile(objectitem) {

@ -11,6 +11,7 @@ import { EITPage } from './eit.page';
import { HomeComponent } from './home/home.component';
import { EitListComponent } from './eit-list/eit-list.component';
import { DatePicker } from '@ionic-native/date-picker/ngx';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
const routes: Routes = [
@ -58,6 +59,9 @@ const routes: Routes = [
ConfirmAddEitComponent,
AddAttachComponent
],
entryComponents: [
WorkListAttachViewComponent
],
providers: [
DatePicker
]

@ -970,6 +970,19 @@ export class CommonService {
public openWorklistMainPage() {
this.nav.navigateForward(["/notification/worklist-main"]);
}
public openWorklistReplacementRollPage() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
}
public openNotificationDetailsPage(){
this.nav.navigateForward(["/notification/work-list-details"]);
}
public openWorklistHistoryPage(){
this.nav.navigateForward(["/notification/work-list-action-history"]);
}
public openWorklistAttachPage(){
this.nav.navigateForward(["/notification/work-list-attach"]);
}
public reload(url: string, from: string) {
console.log("force reload called from:" + from);
// window.location.reload();
@ -1125,6 +1138,7 @@ export class CommonService {
}
public formatDate(date) {
let FormatedDate;
console.log(date);
if (date) {
FormatedDate = date.replace(/-/g, "/");
FormatedDate = FormatedDate + " 00:00:00";
@ -1133,4 +1147,19 @@ export class CommonService {
}
return FormatedDate;
}
public formatDateNew(date) {
let FormatedDate;
console.log(date);
if (date) {
// FormatedDate = date.replace(/-/g, "/");
FormatedDate = date.split("T")[0];
FormatedDate = FormatedDate + " 00:00:00";
console.log(FormatedDate);
} else {
FormatedDate = date;
}
return FormatedDate;
}
}

@ -1,3 +1,6 @@
import { WorkListAttachComponent } from './work-list-attach/work-list-attach.component';
import { ViewNoteModalComponent } from './view-note-modal/view-note-modal.component';
import { WorkListReplacementRollComponent } from './work-list-replacement-roll/work-list-replacement-roll.component';
import { HmgCommonModule } from './../hmg-common/hmg-common.module';
import { WorkListAttachViewComponent } from './work-list-attach-view/work-list-attach-view.component';
import { HomeComponent } from './home/home.component';
@ -11,6 +14,13 @@ import { PipesModule } from '../pipes/pipes.module';
import { WorklistService } from './service/worklist.service';
import { WorklistMainComponent } from './worklist-main/worklist-main.component';
import { WorklistMainService } from './service/work-list.main.service';
import { WorkListRfcComponent } from './work-list-rfc/work-list-rfc.component';
import { ViewReplacementModalComponent } from './view-replacement-modal/view-replacement-modal.component';
import { WorkListActionHistoryComponent } from './work-list-action-history/work-list-action-history.component';
import { WorkListDetailsComponent } from './work-list-details/work-list-details.component';
import { WorklistAttachService } from '../absence/service/work-list-attach.service';
// import { WorklistMainComponent } from './worklist-main/worklist-main.component';
const routes: Routes = [
{
@ -28,7 +38,40 @@ const routes: Routes = [
{
path:'worklist-main',
component:WorklistMainComponent
},
{
path: 'work-list-replacement-roll',
component: WorkListReplacementRollComponent
},
{
path: 'work-list-rfc',
component: WorkListRfcComponent
},
{
path: 'view-note-modal',
component: ViewNoteModalComponent
},
{
path: 'view-replacement-modal',
component: ViewReplacementModalComponent
},
{
path: 'work-list-action-history',
component: WorkListActionHistoryComponent
},
{
path: 'work-list-attach',
component: WorkListAttachComponent
},
{
path: 'work-list-details',
component: WorkListDetailsComponent
}
// {
// path:'worklist-main',
// component:WorklistMainComponent
// }
]
}
];
@ -45,8 +88,16 @@ const routes: Routes = [
declarations: [
NotificationPage,
HomeComponent,
WorklistMainComponent
WorklistMainComponent,
WorkListReplacementRollComponent,
WorkListRfcComponent,
ViewNoteModalComponent,
ViewReplacementModalComponent,
WorkListActionHistoryComponent,
WorkListAttachComponent,
WorkListDetailsComponent
// WorklistMainComponent
],
providers:[WorklistService,WorklistMainService]
providers:[WorklistService,WorklistMainService, WorklistAttachService]
})
export class NotificationPageModule {}

@ -1,25 +1,49 @@
import {Injectable} from '@angular/core';
import {Http, Response, Headers} from "@angular/http";
import { Injectable } from '@angular/core';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { ConnectorService } from "src/app/hmg-common/services/connector/connector.service";
import {Observable} from 'rxjs';
import {WorkListRequest} from '../models/workListRequest';
import {WorKListResponse} from '../models/workListResponse';
import { Observable } from 'rxjs';
import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
@Injectable()
export class WorklistService {
public static getWorkList = 'Services/ERP.svc/REST/GET_WORKLIST';
constructor(
public api: ConnectorService,
public authService: AuthenticationService,
) { }
public getWorkList(WorkListReq: any, onError?: any, errorLabel?: string): Observable<any> {
const request = WorkListReq;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getWorkList, request, onError, errorLabel);
}
public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST';
public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST';
public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY';
constructor(
public api: ConnectorService,
public authService: AuthenticationService,
) { }
public getWorkList(WorkListReq: any, onError?: any, errorLabel?: string): Observable<any> {
const request = WorkListReq;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getWorkList, request, onError, errorLabel);
}
public getReplacmentEmployeeList(ReplacmentEmployeeRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = ReplacmentEmployeeRequest;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getReplacmentEmployeeList, request, onError, errorLabel);
}
public getRFCEmployeeList(ActionHistoryRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = ActionHistoryRequest;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getRFCEmployeeList, request, onError, errorLabel);
}
public getActionHistory(historyActionReq: any, onError?: any, errorLabel?: string): Observable<WorkListActionHistoryResponse> {
const request = historyActionReq;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getActionHistory, request, onError, errorLabel);
}
}

@ -0,0 +1,17 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-title color="light">{{'worklist, note' | translate}}</ion-title>
<ion-buttons slot="primary">
<ion-button style="background: none !important;" (click)="closeModal()">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div>
<p class="">{{getTextNote}}</p>
</div>
</ion-content>

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

@ -0,0 +1,24 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
@Component({
selector: 'app-view-note-modal',
templateUrl: './view-note-modal.component.html',
styleUrls: ['./view-note-modal.component.scss'],
})
export class ViewNoteModalComponent implements OnInit {
getTextNote: any;
constructor(private modalCtrl: ModalController, private cs: CommonService) { }
ngOnInit() {
this.getTextNote = this.cs.sharedService.getSharedData('ViewNoteModalPage');
}
closeModal() {
this.modalCtrl.dismiss();
}
}

@ -0,0 +1,46 @@
<ion-content padding>
<!-- (ionChange)="radioChecked($event)" -->
<div>
<ion-grid style="padding-top: 30px;" class="btnGrid">
<ion-row>
<ion-col col-6 class="gridBtnCol">
<button ion-button class="gridBtn" (click)="closeBtnModal()">
{{'general, cancel' | translate}}
</button>
</ion-col>
<ion-col col-6 class="gridBtnCol">
<button ion-button class="gridBtn" (click)="OkBtnModal()">
{{'general, ok' | translate}}
</button>
</ion-col>
</ion-row>
</ion-grid>
<ion-list>
<!-- <ion-list-header>
Select a Person
</ion-list-header> -->
<ion-radio-group>
<ion-item *ngFor="let RepList of getRepList">
<!-- <ion-col> -->
<ion-label>{{RepList.USER_NAME}}</ion-label>
<ion-label>{{RepList.EMPLOYEE_DISPLAY_NAME}}</ion-label>
<ion-label>{{RepList.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{RepList.USER_NAME}}" (ionChange)="radioSelect(RepList)"></ion-radio>
<!-- <ion-radio (ionSelect)="select(item)" [value]="item"></ion-radio> -->
<!-- </ion-col> -->
</ion-item>
</ion-radio-group>
</ion-list>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
</ion-content>

@ -0,0 +1,11 @@
ion-content {
margin-top: 40px !important;
width: 95% !important;
height: 80% !important;
top: 5% !important;
left: 2% !important;
right: 5% !important;
bottom: 5% !important;
padding-top: 30px !important;
border: solid 1px #dedede;
}

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

@ -0,0 +1,76 @@
import { WorklistService } from './../service/worklist.service';
import { Component, OnInit } from '@angular/core';
import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular';
@Component({
selector: 'app-view-replacement-modal',
templateUrl: './view-replacement-modal.component.html',
styleUrls: ['./view-replacement-modal.component.scss'],
})
export class ViewReplacementModalComponent implements OnInit {
radioButtonValue: any;
getRepList: any;//WorKListReplacmentEmployeeResponse=new WorKListReplacmentEmployeeResponse();
IsReachEnd: boolean = false;
private getReplacmentEmployeeReq: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest();
constructor(private cs: CommonService, private ts: TranslatorService, public modalCtrl: ModalController, public worklistService: WorklistService) {
this.getReplacmentEmployeeReq = this.cs.sharedService.getSharedData('replacmentReqObj');
this.getRepList = this.cs.sharedService.getSharedData('replacmentResObj');
}
ngOnInit() { }
radioSelect(v) {
this.radioButtonValue = v;
}
OkBtnModal() {
if (!this.radioButtonValue) {
let msg: string = this.ts.trPK("replacementRoll", "msg");
this.cs.presentAlert(msg);
return;
} else {
let data = this.radioButtonValue;
this.modalCtrl.dismiss(data);
}
}
closeBtnModal() {
this.modalCtrl.dismiss("cancel");
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
this.getReplacmentEmployeeReq.P_PAGE_NUM++;
this.worklistService.getReplacmentEmployeeList(this.getReplacmentEmployeeReq).
subscribe((result: any) => {
if (this.cs.validResponse(result)) {
if (result.ReplacementList != undefined) {
(result.ReplacementList).forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.getRepList.push(element);
});
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
infiniteScroll.target.complete();
});
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}//end infiniteScroll
}

@ -0,0 +1,65 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'workListMain, actionHis' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'worklistMain, actionHis' | translate}}</div>
</ion-card-header>
<ion-card-content>
<!-- <ion-item class="itemAH"> -->
<ion-grid class=" gridAH">
<ion-row class="rowAH titleH">
<ion-col col-4>
<label class="Header" for="">{{'actionHis, name' | translate}}</label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'actionHis, action' | translate}}</label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'actionHis, date' | translate}}</label>
</ion-col>
<ion-col col-2>
<label class="Header" for="">{{'actionHis, note' | translate}}</label>
</ion-col>
</ion-row>
<ion-row class="rowAH" *ngFor="let actionHistory of actionHistoryRes">
<!-- <ion-col col-1>
<label for="">{{actionHistory.SEQUENCE}}</label>
</ion-col> -->
<ion-col col-4>
<label for="">{{actionHistory.NAME}}</label>
</ion-col>
<ion-col col-3>
<label for="">{{actionHistory.ACTION}}</label>
</ion-col>
<ion-col col-3>
<label for="">{{actionHistory.NOTIFICATION_DATE}}</label>
</ion-col>
<ion-col col-2 style="text-align: center">
<button (click)="openNoteDetail(actionHistory.NOTE)" style=" background: none;"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null">
<img src="../assets/imgs/more.png">
</button>
<!-- <label for="">{{actionHistory.NOTE}}</label> -->
</ion-col>
</ion-row>
</ion-grid>
<!-- </ion-item>
</ion-list> -->
</ion-card-content>
</ion-card>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>

@ -0,0 +1,55 @@
ion-card-content.card-content.card-content-md,
ion-card-content.card-content.card-content-ios {
padding: 0px;
margin: 0px;
}
.col {
//border: #dedede solid 1px;
padding: 2px !important;
text-align: center;
font-size: 15px;
}
.item-md.item-block .item-inner,
.item-ios.item-block .item-inner {
padding: 0px !important;
}
.itemAH {
padding: 0px !important
;
font-size: 13px;
}
.gridAH {
text-align: center;
padding: 5px 5px !important;
border-radius: 5px;
}
.rowAH {
white-space: normal;
.col {
border: 1px solid #d9d9d9;
}
}
.Header {
font-weight: bold;
// font-family: "WorkSans-SemiBold" !important;
color: #1a586d;
// padding: 0px !important;
// margin: 0px !important;
}
.titleH {
//background-color:$custgreen;
//height: 40px;
//line-height: 2;
font-size: 15px;
border: 1px solid #d9d9d9;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
border-bottom: 0px;
.col {
border: 0px;
}
}
ion-label.label.label-md,
ion-label.label.label-ios {
margin: 0px;
}

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

@ -0,0 +1,107 @@
import { ViewNoteModalComponent } from './../view-note-modal/view-note-modal.component';
import { WorklistService } from './../service/worklist.service';
import { Component, OnInit } from '@angular/core';
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { ModalController } from '@ionic/angular';
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
@Component({
selector: 'app-work-list-action-history',
templateUrl: './work-list-action-history.component.html',
styleUrls: ['./work-list-action-history.component.scss'],
})
export class WorkListActionHistoryComponent implements OnInit {
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
getPassNotificationDetails: any;
actionHistoryRes: any;
IsReachEnd: boolean = false;
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 50;
constructor(private cs: CommonService, private ts: TranslatorService, private modalCtrl: ModalController, public worklistService: WorklistService) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
}
ngOnInit() {
this.getActionHistory(this.WorkListActionHistoryObj);
}
getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = false;
this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result);
});
}
handleWorkListActionHistoryResult(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList;
this.P_PAGE_NUM++;
let lastItemIndex = this.actionHistoryRes.length - 1;
if (result.GetActionHistoryList[lastItemIndex]) {
let lastitem = result.GetActionHistoryList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
}
}
}
async openNoteDetail(note) {
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
// modalPage.present();
this.cs.sharedService.setSharedData(note, 'ViewNoteModalPage')
const modal = await this.modalCtrl.create({
component: ViewNoteModalComponent
});
return await modal.present();
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
subscribe((result: any) => {
if (this.cs.validResponse(result)) {
if (result.GetActionHistoryList != undefined) {
this.P_PAGE_NUM++;
(result.GetActionHistoryList).forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.actionHistoryRes.push(element);
}, (Error) => console.log(Error), () => infiniteScroll.target.complete());
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
infiniteScroll.target.complete();
});
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}//end infiniteScroll
}

@ -1,6 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'workListMain, suppDoc' | translate}}</ion-title>
<ion-buttons slot="primary">

@ -0,0 +1,45 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'worklist, note' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'worklistMain, suppDoc' | translate}}</div>
</ion-card-header>
<ion-card-content>
<ion-grid>
<div *ngFor="let attachList of attachmentRes">
<ion-row>
<ion-col col-10>
<div> <img float-start class="attachImg" src="../assets/imgs/file.png">
</div>
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
</ion-col>
<ion-col col-2>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</div>
</ion-content>

@ -0,0 +1,7 @@
ion-card-content.card-content.card-content-md,
ion-card-content.card-content.card-content-ios {
padding: 0px;
}
img.attachImg {
margin: 5px 8px 13px 0;
}

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

@ -0,0 +1,59 @@
import { WorklistAttachService } from './../../absence/service/work-list-attach.service';
import { ModalController } from '@ionic/angular';
import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { WorkListButtonRequest } from 'src/app/eit/models/NotificationButtonReq';
import { Component, OnInit } from '@angular/core';
import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component';
@Component({
selector: 'app-work-list-attach',
templateUrl: './work-list-attach.component.html',
styleUrls: ['./work-list-attach.component.scss'],
})
export class WorkListAttachComponent implements OnInit {
private WorkListAttachObj: WorkListButtonRequest;
getPassNotificationDetails: any;
attachmentRes: any;
constructor(public cs: CommonService, public modalCtrl: ModalController, public worklistAttachService: WorklistAttachService) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.WorkListAttachObj = new WorkListButtonRequest();
this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
}
ngOnInit() {
this.getAttachmentNotification(this.WorkListAttachObj);
}
async OpenAttachFiles(value, Type) {
// let modal: Modal = this.modalCtrl.create('WorkListAttachViewPage', { displayData: value, TypeData: Type });
// modal.present();
this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage')
const modal = await this.modalCtrl.create({
component: WorkListAttachViewComponent
});
return await modal.present();
}
getAttachmentNotification(WorkListAttachObj) {
this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => {
this.handleWorkListAttachResult(result);
});
}
handleWorkListAttachResult(result) {
if (this.cs.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (result.GetAttachementList != null) {
this.attachmentRes = result.GetAttachementList;
} // if result == null
} // valid it
}
}

@ -0,0 +1,136 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'workListMain, notfDetails' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div *ngIf="submitterInfoRes?.length > 0 ">
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle"> {{'general, info' | translate}}</div>
</ion-card-header>
<ion-card-content>
<div *ngFor="let submitterInfo of submitterInfoRes">
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, empNo' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.EMPLOYEE_NUMBER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, name' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.EMPLOYEE_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, position' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.POSITION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, grade' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.GRADE_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, job' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.JOB_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, category' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.EMPLOYMENT_CATEGORY_MEANING}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, orgEmail' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.EMPLOYEE_EMAIL_ADDRESS}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, orgName' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.ORGANIZATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, busG' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.BUSINESS_GROUP_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, locName' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.LOCATION_NAME}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colBold" col-5>
<label for="">{{'userProfile, payrol' | translate}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{submitterInfo.PAYROLL_NAME}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes; let i=index ">
<ion-card-header class="boxHdr">
<div class="hrTitle"> {{'worklistMain, notfDetails' | translate}}</div>
</ion-card-header>
<ion-card-content>
<div *ngFor="let notificationBody of item.Collection_Notification ">
<ion-row *ngIf=" notificationBody.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold" col-5>
<label for="">{{notificationBody.SEGMENT_PROMPT}}</label>
</ion-col>
<ion-col col-7>
<label for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</ion-content>

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

@ -0,0 +1,69 @@
import { WorklistsubmitterInfoResponse } from './../models/WorklistsubmitterInfoRes';
import { WorklistMainService } from './../service/work-list.main.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { WorkListSubmitterInfoRequest } from './../models/WorklistsubmitterInfoReq';
import { Component, OnInit } from '@angular/core';
import { EITNotificatonBodyResponse } from 'src/app/eit/models/EITNotificationBodyRes';
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
@Component({
selector: 'app-work-list-details',
templateUrl: './work-list-details.component.html',
styleUrls: ['./work-list-details.component.scss'],
})
export class WorkListDetailsComponent implements OnInit {
submitterInfoRes: any;
notificationBodyRes: any;
notBodyType: string = "";
notBodyResult: any;
getPassNotificationDetails: any;
private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest;
constructor(public cs: CommonService, public worklistMainService: WorklistMainService) {
this.WorkListSubmitterInfoObj = new WorkListSubmitterInfoRequest();
this.notBodyType = this.cs.sharedService.getSharedData('NotBodyType', false);
if (this.notBodyType == "EIT") {
this.notBodyResult = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
} else if (this.notBodyType == "ABSENCE") {
this.notBodyResult = this.cs.sharedService.getSharedData(AbsenceNotificatonBodyResponse.SHARED_DATA, false);
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, false);
}
}
ngOnInit() {
this.WorkListSubmitterInfoObj.P_PAGE_LIMIT = 100;
this.WorkListSubmitterInfoObj.P_PAGE_NUM = 1;
this.WorkListSubmitterInfoObj.P_SELECTED_EMPLOYEE_NUMBER = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
this.WorkListSubmitterInfoObj.P_SELECTED_RESP_ID = -999;
this.WorkListSubmitterInfoObj.P_SEARCH_EMAIL_ADDRESS = "";
this.WorkListSubmitterInfoObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
this.WorkListSubmitterInfoObj.P_SEARCH_USER_NAME = "";
this.getsubmitterInfo(this.WorkListSubmitterInfoObj);
this.handleNotificationBody();
}
getsubmitterInfo(notificationSubmitterInfoObj) {
this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj).
subscribe((result: WorklistsubmitterInfoResponse) => {
this.handleSubmitterInfoResult(result);
});
}
handleSubmitterInfoResult(result) {
if (this.cs.validResponse(result)) {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
if (this.cs.hasData(result.MemberInformationList)) {
//if (result.MemberInformationList != null) {
this.submitterInfoRes = result.MemberInformationList;
} // if result == null
} // valid it
}// End handleWorkListButtonsResult
handleNotificationBody() {
this.notificationBodyRes = {};
if (this.cs.hasData(this.notBodyResult)) {
this.notificationBodyRes = this.notBodyResult;
}
}
}

@ -0,0 +1,71 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'replacementRoll, title' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-list [hidden]="isAnswer==true">
<ion-item>
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general.ok" | translate }}' cancelText='{{"general.cancel" | translate }}'
[(ngModel)]="searchBy">
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-input [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
<ion-icon name="search"></ion-icon>
</button>
</ion-item>
<!-- <ion-item>
<ion-label>
{{selEmpName}}
</ion-label>
</ion-item> -->
<!-- <div class="centerDiv">
<button ion-button (click)="closePage()">{{'general.save' | translate}}</button>
</div> -->
</ion-list>
<div>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> -->
<ion-list radio-group [(ngModel)]="selEmp" *ngIf="ReplacementList">
<ion-item *ngFor="let employee of ReplacementList;let i=index;">
<ion-label><span class="boldTxt">{{employee.EMPLOYEE_DISPLAY_NAME}}</span> <br>{{employee.USER_NAME}}<br>
{{employee.EMAIL_ADDRESS}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-list>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-item>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,10 @@
button.item-button.button.button-md.button-clear.button-clear-md {
background-color: transparent;
}
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}

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

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

@ -0,0 +1,39 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<nav-buttons></nav-buttons>
<ion-title color="light">{{ 'workListMain, rfc' | translate}}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<div class="tipsPadding boldTxtNav">
{{"replacementRoll.msgRFC" | translate}}
</div>
<ion-list (ionChange)="radioChecked($event)" radio-group>
<ion-item *ngFor="let rfcEmployeeList of RFCEmployeeListListRes; let i = index;">
<ion-label>{{rfcEmployeeList.EMPLOYEE_DISPLAY_NAME}}</ion-label>
<ion-label>{{rfcEmployeeList.ACTION}}</ion-label>
<ion-radio value="{{i}}"></ion-radio>
</ion-item>
</ion-list>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
<div>
<label class="boldTxtNav">{{"replacementRoll.enterNote" | translate}}</label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="submitAction()">
{{'general, submit' | translate}}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,7 @@
.footer-button {
border-radius: 3px;
padding: 0 1.1em;
min-height: 45px;
min-width: 200px;
}

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

@ -0,0 +1,156 @@
import { WorklistMainService } from './../service/work-list.main.service';
import { Component, OnInit } from '@angular/core';
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
import { WorkListActionRequest } from '../models/NotificationActionReq';
import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes';
import { WorklistService } from '../service/worklist.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@Component({
selector: 'app-work-list-rfc',
templateUrl: './work-list-rfc.component.html',
styleUrls: ['./work-list-rfc.component.scss'],
})
export class WorkListRfcComponent implements OnInit {
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
private WorkListActionObj: WorkListActionRequest;
getPassNotificationDetails: any;
RFCEmployeeListListRes: any;
radioButtonValue: any;
pageNum: number = 1;
seqNo: any;
//forwordTo:any;
IsReachEnd: boolean = false;
comments: any;
userNote: any;
getpassResAttr: any = [];
P_PAGE_NUM: number = 1;
P_PAGE_LIMIT: number = 50;
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService) {
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj = new WorkListActionRequest();
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = "";
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionObj.RespondAttributeList = this.getpassResAttr;
}
ngOnInit() {
this.getRFCEmployee(this.WorkListActionHistoryObj);
}
getRFCEmployee(WorkListActionHistoryObj) {
this.IsReachEnd = false;
this.worklistService.getRFCEmployeeList(WorkListActionHistoryObj).
subscribe((result: WorKListRFCEmployeeResponse) => {
this.handleWorkListRFCEmployeeResult(result);
});
}
handleWorkListRFCEmployeeResult(result) {
if (this.cs.validResponse(result)) {
if (this.cs.hasData(result.GetRFCEmployeeListList)) {
this.RFCEmployeeListListRes = result.GetRFCEmployeeListList;
this.P_PAGE_NUM++;
let lastItemIndex = this.RFCEmployeeListListRes.length - 1;
if (result.GetRFCEmployeeListList[lastItemIndex]) {
let lastitem = result.GetRFCEmployeeListList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
}
}
}
}
radioChecked(v) {
let emp: any = this.RFCEmployeeListListRes[v];
this.seqNo = emp.SEQ;
this.radioButtonValue = emp.USER_NAME;
}
submitAction() {
if (this.radioButtonValue) {
if (this.userNote) {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.radioButtonValue;
this.WorkListActionObj.P_ACTION_MODE = "RFC";
this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
this.WorkListActionObj.P_APPROVER_INDEX = this.seqNo;
this.workListMainService.actionButton(this.WorkListActionObj).
subscribe((result: any) => {
this.handleApplayActionResult(result);
});
} else {
let msg: string = this.ts.trPK("replacementRoll", "enterNote");
this.cs.showErrorMessageDialog(() => {
}, this.ts.trPK('general', 'ok'), msg);
}
} else {
let msg: string = this.ts.trPK("replacementRoll", "msgRFC");
this.cs.showErrorMessageDialog(() => {
}, this.ts.trPK('general', 'ok'), msg);
}
}
handleApplayActionResult(result) {
if (this.cs.validResponse(result)) {
if (result.MessageStatus == 1) {
// let msg:string="";
// msg=this.translate.translate("general.success");
// this.common.showAlert(msg);
// this.navCtrl.push("HomePage");
this.cs.openHome();
}
} // valid it
}
doInfinite(infiniteScroll) {
if (!this.IsReachEnd) {
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.worklistService.getRFCEmployeeList(this.WorkListActionHistoryObj).
subscribe((result) => {
if (this.cs.validResponse(result)) {
if (result.RFCEmployeeList != undefined) {
this.P_PAGE_NUM++
(result.RFCEmployeeList).forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
}
else {
this.IsReachEnd = false;
}
//this.WorkListResObj.push(element);
});
}// if list length >0
else {
this.IsReachEnd = true;
}
}// if response == 1
//this.pageNum++;
infiniteScroll.target.complete();
});
} else {
if (infiniteScroll)
infiniteScroll.target.complete();
}
}//end infiniteScroll
}

@ -11,7 +11,7 @@ import { WorkListButtonRequest } from "../models/NotificationButtonReq";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
import { WorklistMainService } from "../service/work-list.main.service";
import { HomeComponent } from 'src/app/notification/home/home.component';
import { HomeComponent } from "src/app/notification/home/home.component";
@Component({
selector: "app-worklist-main",
templateUrl: "./worklist-main.component.html",
@ -21,6 +21,7 @@ export class WorklistMainComponent implements OnInit {
private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest;
public static PASS_NOTIFICATION_INFO="passNotificationInfo";
getPassNotificationDetails: any;
TransactionID: number = -999;
notificationBodyRes: any;
@ -47,7 +48,10 @@ export class WorklistMainComponent implements OnInit {
) {}
ngOnInit() {
this.getPassNotificationDetails = this.common.sharedService.getSharedData(HomeComponent.NOTIFICATION_DATA, false);
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
false
);
this.WorkListBodyObj = new WorkListBodyRequest();
this.WorkListButtonsObj = new WorkListButtonRequest();
@ -74,19 +78,19 @@ export class WorklistMainComponent implements OnInit {
}
getEITNotificationDetails(notificationBodyObj) {
this.worklistMainService.getEITNotificationBody(
notificationBodyObj
).subscribe((result: EITNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "EIT");
});
this.worklistMainService
.getEITNotificationBody(notificationBodyObj)
.subscribe((result: EITNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "EIT");
});
}
getAbsenceNotificationDetails(notificationBodyObj) {
this.worklistMainService.getAbsencesNotificationBody(
notificationBodyObj
).subscribe((result: AbsenceNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "ABSENCE");
});
this.worklistMainService
.getAbsencesNotificationBody(notificationBodyObj)
.subscribe((result: AbsenceNotificatonBodyResponse) => {
this.handleWorkListBodyResult(result, "ABSENCE");
});
}
handleWorkListBodyResult(result, Type) {
@ -109,11 +113,11 @@ export class WorklistMainComponent implements OnInit {
} //End handleWorkListBodyResult
getNotificationButtons(notificationButtonsObj) {
this.worklistMainService.getNotificationButtons(
notificationButtonsObj
).subscribe((result: NotificatonButtonResponse) => {
this.handleWorkListButtonsResult(result);
});
this.worklistMainService
.getNotificationButtons(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => {
this.handleWorkListButtonsResult(result);
});
}
handleWorkListButtonsResult(result) {
@ -125,20 +129,18 @@ export class WorklistMainComponent implements OnInit {
} // valid it
} // End handleWorkListButtonsResult
applyAction(WorkListActionObj) {
this.worklistMainService.actionButton(WorkListActionObj).subscribe(
(result: any) => {
this.worklistMainService
.actionButton(WorkListActionObj)
.subscribe((result: any) => {
this.handleApplayActionResult(result);
}
);
});
}
handleApplayActionResult(result) {
if (this.common.validResponse(result)) {
if (result.MessageStatus == 1) {
// this.navCtrl.push("HomePage");
// this.navCtrl.push("HomePage");
}
} // valid it
}
@ -173,7 +175,6 @@ export class WorklistMainComponent implements OnInit {
ButtonAction == "DEL" ||
ButtonAction == "CLOSE"
) {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
@ -213,8 +214,6 @@ export class WorklistMainComponent implements OnInit {
ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION"
) {
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
@ -225,8 +224,8 @@ export class WorklistMainComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("EitUpdateListPage");
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.common.sharedService.setSharedData(
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
AbsenceNotificatonBodyResponse.SHARED_DATA
);
@ -238,9 +237,8 @@ export class WorklistMainComponent implements OnInit {
// dirfromNotificationPage: true,
// submitAbsObjList: this.notificationBodyRes[0].Collection_Notification
// });
}
}
}
// else if (this.notificationButtonRes.length > 0 && !ButtonAction) {
// (this.elementRef.nativeElement.querySelectorAll(
// "ion-item"
@ -256,27 +254,30 @@ export class WorklistMainComponent implements OnInit {
// } else {
// this.navCtrl.pop();
// }
}
openActionHistory() {
// this.navCtrl.push("WorkListActionHistoryPage", {
// passNotificationInfo: this.getPassNotificationDetails
// });
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO);
this.common.openWorklistHistoryPage();
}
openSupportDocuments() {
// this.navCtrl.push("WorkListAttachPage", {
// passNotificationInfo: this.getPassNotificationDetails
// });
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO);
this.common.openWorklistAttachPage();
}
getNotificationResAttr(notificationButtonsObj) {
this.worklistMainService.notificationResponseAttr(
notificationButtonsObj
).subscribe((result: NotificatonButtonResponse) => {
this.handleNotificationResAttrResult(result);
});
this.worklistMainService
.notificationResponseAttr(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => {
this.handleNotificationResAttrResult(result);
});
}
handleNotificationResAttrResult(result) {
@ -307,7 +308,9 @@ export class WorklistMainComponent implements OnInit {
this.getPassNotificationDetails,
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
this.common.sharedService.setSharedData("EIT","NotBodyType");
this.common.openNotificationDetailsPage();
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
@ -317,7 +320,9 @@ export class WorklistMainComponent implements OnInit {
this.getPassNotificationDetails,
AbsenceNotificatonBodyResponse.NOT_WORKLIST
);
this.common.sharedService.setSharedData("ABSENCE","NotBodyType");
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
this.common.openNotificationDetailsPage();
}
}
}

@ -761,10 +761,6 @@
"en":"",
"ar":""
},
"noData":{
"en":"There are no requests",
"ar":"لاتوجد طلبات"
},
"confirmation":{
"en":"Confirmation",
"ar":"تأكيد"
@ -850,7 +846,7 @@
"ar": "البريد الإلكتروني للمنشأة"
},
"name": {
"en": "Emplyee Name",
"en": "Employee Name",
"ar": "اسم الموظف "
},
"orgName": {
@ -1371,6 +1367,36 @@
"suppDoc": {
"en": "Support Documents",
"ar": "مستندات الدعم"
},
"rfc": {
"en": "Return for correction",
"ar": "عودة لتصحيح"
},
"actionHis":{
"en":"Action History",
"ar":"تاريخ العمل"
},
"notfDetails":{
"en":"Notification Details",
"ar":"تفاصيل الإخطار"
}
},
"actionHis": {
"name":{
"en":"Name",
"ar":"الإسم"
},
"action":{
"en":"Action",
"ar":"عمل"
},
"date":{
"en":"Date",
"ar":"تاريخ"
},
"note":{
"en":"Note",
"ar":"ملحوظة"
}
},
"addAttach":{
@ -1420,6 +1446,40 @@
"ar":"لايمكن عرض هذا النوع من الملفات"
}
},
"replacementRoll": {
"enterNote":{
"en": "Enter a note",
"ar":"أدخل ملاحظة"
},
"msg":{
"en": "Select a replacement",
"ar":"اختيار بديل"
},
"title":{
"en": "Replacement Roll",
"ar":"استبدال لفة"
},
"searchForReplacment":{
"en": "Search for an employee",
"ar":"ابحث عن موظف"
},
"searchBy":{
"en": "Search by",
"ar":"البحث عن طريق"
},
"question":{
"en": "Question",
"ar":"سؤال"
},
"answer":{
"en": "Answer",
"ar":"جواب"
},
"msgRFC":{
"en": "Select a person",
"ar":"اختيار شخص"
}
},
"worklist": {
"view":{
"en": "View",
@ -1476,6 +1536,10 @@
"search": {
"en":"Search",
"ar":"بحث"
},
"note": {
"en":"Note",
"ar":"مذكرة"
}
},
"worklistMain": {

Loading…
Cancel
Save