notification added

MOHEMM-Q3-DEV-LATEST
Sultan Khan 7 years ago
parent 31af06d2c9
commit 3327ad4d29

@ -19,7 +19,7 @@
<ion-label> <ion-label>
{{ts.trPK('home','worklist')}} {{ts.trPK('home','worklist')}}
<ion-badge item-end>{{notBadge}}</ion-badge> <ion-badge slot="end" color="danger" class="main-badge">{{notBadge}}</ion-badge>
</ion-label> </ion-label>
<!-- <button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" > <!-- <button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" >

@ -14,3 +14,14 @@
.alert-tappable.sc-ion-alert-ios { .alert-tappable.sc-ion-alert-ios {
height: 50px; height: 50px;
} }
.main-badge{
position: absolute;
right: 16px;
border-radius: 50% !important;
line-height: 2;
margin: auto;
top: 0;
bottom: 0;
height: 32px;
}

@ -96,7 +96,7 @@ export class CommonService {
public diagnostic: Diagnostic, public diagnostic: Diagnostic,
public callNumber: CallNumber, public callNumber: CallNumber,
public iab: InAppBrowser public iab: InAppBrowser
) { } ) {}
public back() { public back() {
// this.nav.pop(); // this.nav.pop();
@ -171,7 +171,7 @@ export class CommonService {
public mobileNumber(number: string) { public mobileNumber(number: string) {
return number.substr(1, number.length - 1); return number.substr(1, number.length - 1);
} }
public testFunction() { } public testFunction() {}
public stopLoading() { public stopLoading() {
this.progressLoadingService.dismiss(); this.progressLoadingService.dismiss();
@ -223,7 +223,7 @@ export class CommonService {
public confirmNotAllowedDialog() { public confirmNotAllowedDialog() {
this.openHome(); this.openHome();
this.alertDialog( this.alertDialog(
() => { }, () => {},
this.ts.trPK("general", "ok"), this.ts.trPK("general", "ok"),
this.ts.trPK("general", "info"), this.ts.trPK("general", "info"),
this.ts.trPK("general", "not-allowed") this.ts.trPK("general", "not-allowed")
@ -461,7 +461,7 @@ export class CommonService {
private openBrowserHtml(url, onExit?, onFaild?, onSuccess?) { private openBrowserHtml(url, onExit?, onFaild?, onSuccess?) {
const browser = window.open(url, "_blank", "location=no"); const browser = window.open(url, "_blank", "location=no");
browser.addEventListener("loadstart", () => { }); browser.addEventListener("loadstart", () => {});
browser.addEventListener("loaderror", () => { browser.addEventListener("loaderror", () => {
if (onFaild) { if (onFaild) {
@ -537,7 +537,7 @@ export class CommonService {
public openLocation(lat: number, lng: number) { public openLocation(lat: number, lng: number) {
this.platform.ready().then(() => { this.platform.ready().then(() => {
this.launchNavigation.navigate([lat, lng]).then( this.launchNavigation.navigate([lat, lng]).then(
() => { }, () => {},
err => { err => {
// this.failedToOpenMap(); // this.failedToOpenMap();
window.open("https://maps.google.com/?q=" + lat + "," + lng); window.open("https://maps.google.com/?q=" + lat + "," + lng);
@ -737,7 +737,7 @@ export class CommonService {
return targetCode >= minDigit && targetCode <= maxDigit; return targetCode >= minDigit && targetCode <= maxDigit;
} }
public enterPage() { } public enterPage() {}
private smsAlertDialog = null; private smsAlertDialog = null;
public presentSMSPasswordDialog( public presentSMSPasswordDialog(
@ -769,7 +769,7 @@ export class CommonService {
text: this.ts.trPK("general", "cancel"), text: this.ts.trPK("general", "cancel"),
role: "cancel", role: "cancel",
cssClass: "cancel-button", cssClass: "cancel-button",
handler: () => { } handler: () => {}
}, },
{ {
text: this.ts.trPK("general", "ok"), text: this.ts.trPK("general", "ok"),
@ -955,34 +955,40 @@ export class CommonService {
public openSubmitAbsencePage() { public openSubmitAbsencePage() {
this.nav.navigateForward(["/absence/submit-absence"]); this.nav.navigateForward(["/absence/submit-absence"]);
} }
public openConfirmAbsece(){ public openConfirmAbsece() {
this.nav.navigateForward(["/absence/confirm-absence"]); this.nav.navigateForward(["/absence/confirm-absence"]);
} }
public openWorkListAttachViewPage() { public openWorkListAttachViewPage() {
this.nav.navigateForward(["/notification/work-list-attach-view"]); this.nav.navigateForward(["/notification/work-list-attach-view"]);
} }
public openviewAbsenceAttachment(){ public openviewAbsenceAttachment() {
this.nav.navigateForward(["/absence/view-attachements"]); this.nav.navigateForward(["/absence/view-attachements"]);
} }
public openNotificationPage() { public openNotificationPage() {
this.nav.navigateForward(["/notification/homepage"]); this.nav.navigateForward(["/notification/homepage"]);
} }
public openWorklistMainPage() { public openWorklistMainPage() {
this.nav.navigateForward(["/notification/worklist-main"]); this.nav.navigateForward(["/notification/worklist-main"]);
} }
public openWorklistReplacementRollPage() { public openWorklistReplacementRollPage() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]); this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
} }
public openNotificationDetailsPage(){ public openNotificationDetailsPage() {
this.nav.navigateForward(["/notification/work-list-details"]); this.nav.navigateForward(["/notification/work-list-details"]);
} }
public openWorklistHistoryPage(){ public openWorklistHistoryPage() {
this.nav.navigateForward(["/notification/work-list-action-history"]); this.nav.navigateForward(["/notification/work-list-action-history"]);
} }
public openWorklistAttachPage(){ 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"]);
}
public openWorklistRollReplacement() {
this.nav.navigateForward(["/notification/work-list-replacement-roll"]);
}
public reload(url: string, from: string) { public reload(url: string, from: string) {
console.log("force reload called from:" + from); console.log("force reload called from:" + from);
// window.location.reload(); // window.location.reload();
@ -1079,8 +1085,8 @@ public openWorklistAttachPage(){
if (this.isCordova()) { if (this.isCordova()) {
this.callNumber this.callNumber
.callNumber(phoneNumber, true) .callNumber(phoneNumber, true)
.then(res => { }) .then(res => {})
.catch(err => { }); .catch(err => {});
} else { } else {
window.open("tel:" + phoneNumber); window.open("tel:" + phoneNumber);
// this.presentAlert(this.ts.trPK('error', 'call')); // this.presentAlert(this.ts.trPK('error', 'call'));
@ -1161,5 +1167,4 @@ public openWorklistAttachPage(){
} }
return FormatedDate; return FormatedDate;
} }
} }

@ -9,7 +9,7 @@
<div class="header-div"> <div class="header-div">
<button ion-button icon-only menuToggle class="menubutton" (click)="openMenu()"> <button ion-button icon-only menuToggle class="menubutton" (click)="openMenu()">
<ion-icon name="menu"></ion-icon> <ion-icon name="menu"></ion-icon>
<ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge> <ion-badge id="homeBadgeBtn" slot="end" color="danger">{{notBadge}}</ion-badge>
</button> </button>
<div class="centerDiv" (click)="openPersonalInfo()"> <div class="centerDiv" (click)="openPersonalInfo()">
<p class="TxtPlace">{{ts.trPK('home','hello')}}, {{userData.EMPLOYEE_DISPLAY_NAME}}</p> <p class="TxtPlace">{{ts.trPK('home','hello')}}, {{userData.EMPLOYEE_DISPLAY_NAME}}</p>

@ -1,4 +1,4 @@
import { EitService } from './../eit/services/eit.service'; import { EitService } from "./../eit/services/eit.service";
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { MenuController, Events } from "@ionic/angular"; import { MenuController, Events } from "@ionic/angular";
@ -13,7 +13,7 @@ import { Device } from "@ionic-native/device/ngx";
import { attendanceSwipeScannerRequest } from "./models/attendanceSwipe.Request"; import { attendanceSwipeScannerRequest } from "./models/attendanceSwipe.Request";
import { Response } from "src/app/hmg-common/services/models/response"; import { Response } from "src/app/hmg-common/services/models/response";
import { AttendanceService } from "./services/attendance.services"; import { AttendanceService } from "./services/attendance.services";
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request'; import { LoginRequest } from "../hmg-common/services/authentication/models/login.request";
@Component({ @Component({
selector: "app-home", selector: "app-home",
@ -26,6 +26,7 @@ export class HomePage implements OnInit {
menuList: any = []; menuList: any = [];
zbarOptions: any; zbarOptions: any;
scannedResult: any; scannedResult: any;
notBadge: any;
lat: any; lat: any;
longt: any; longt: any;
deviceID: string; deviceID: string;
@ -43,7 +44,6 @@ export class HomePage implements OnInit {
private eitService: EitService private eitService: EitService
) {} ) {}
ngOnInit() { ngOnInit() {
this.getUserDetails(); this.getUserDetails();
this.getMenu(); this.getMenu();
@ -58,8 +58,21 @@ export class HomePage implements OnInit {
.catch(error => { .catch(error => {
console.log("Error getting location", error); console.log("Error getting location", error);
}); });
this.getCount();
}
getCount() {
const req: any = {};
this.menuService.getNotificationCount(req).subscribe((result: any) => {
if (this.common.validResponse(result)) {
this.notBadge =
result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM;
if (this.notBadge <= 0) {
this.notBadge = null;
}
this.events.publish("getNotCount", this.notBadge);
}
});
} }
// ionViewDidLoad() { // ionViewDidLoad() {
// this.geolocation // this.geolocation
// .getCurrentPosition() // .getCurrentPosition()
@ -83,14 +96,17 @@ export class HomePage implements OnInit {
// } // }
ionViewDidLoad() { ionViewDidLoad() {
this.geolocation.getCurrentPosition().then((resp) => { this.geolocation
// resp.coords.latitude .getCurrentPosition()
// resp.coords.longitude .then(resp => {
console.log(resp.coords.latitude); // resp.coords.latitude
console.log(resp.coords.longitude); // resp.coords.longitude
}).catch((error) => { console.log(resp.coords.latitude);
console.log('Error getting location', error); console.log(resp.coords.longitude);
}); })
.catch(error => {
console.log("Error getting location", error);
});
} }
private openMenu() { private openMenu() {
this.menu.toggle(); this.menu.toggle();
@ -150,29 +166,41 @@ export class HomePage implements OnInit {
let selEmpNo: string = null; let selEmpNo: string = null;
let nationality: string = null; let nationality: string = null;
request.P_SELECTED_RESP_ID = -999; request.P_SELECTED_RESP_ID = -999;
if (item.MENU_TYPE == 'S') { if (item.MENU_TYPE == "S") {
request.P_SELECTED_RESP_ID = item.RESP_ID; request.P_SELECTED_RESP_ID = item.RESP_ID;
} else { } else {
selEmpNo = this.common.sharedService.getSharedData(LoginRequest.SHARED_DATA, false); selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA,
false
);
} }
nationality = this.common.sharedService.getSharedData(LoginRequest.NATIONALITY_CODE, false); nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE,
false
);
request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo; request.P_SELECTED_EMPLOYEE_NUMBER = selEmpNo;
request.P_MENU_TYPE = item.MENU_TYPE; request.P_MENU_TYPE = item.MENU_TYPE;
request.NationalityCode = nationality; request.NationalityCode = nationality;
//set emp and resp id //set emp and resp id
this.common.sharedService.setSharedData(selEmpNo, MenuResponse.SHARED_SEL_EMP); this.common.sharedService.setSharedData(
this.common.sharedService.setSharedData(request.P_SELECTED_RESP_ID, MenuResponse.SHARED_SEL_RESP_ID); selEmpNo,
MenuResponse.SHARED_SEL_EMP
);
this.common.sharedService.setSharedData(
request.P_SELECTED_RESP_ID,
MenuResponse.SHARED_SEL_RESP_ID
);
this.eitService.getMenuEntries( this.eitService
request). .getMenuEntries(request)
subscribe((result: MenuResponse) => { .subscribe((result: MenuResponse) => {
this.handleMenuEntiresResult(result); this.handleMenuEntiresResult(result);
}); });
} }
sortMenuEntires(list) { sortMenuEntires(list) {
let tree = this.common.list_to_tree(list); let tree = this.common.list_to_tree(list);
this.common.sharedService.setSharedData(tree, 'menuEntries'); this.common.sharedService.setSharedData(tree, "menuEntries");
// this.common.navigateForward("/eit/homepage"); // this.common.navigateForward("/eit/homepage");
this.common.openEITPage(); this.common.openEITPage();
} }
@ -199,7 +227,8 @@ export class HomePage implements OnInit {
} }
scanCode() { scanCode() {
this.zbar.scan(this.zbarOptions) this.zbar
.scan(this.zbarOptions)
.then(result => { .then(result => {
console.log(result); // Scanned code console.log(result); // Scanned code
let strResult = JSON.parse(result); let strResult = JSON.parse(result);
@ -222,8 +251,8 @@ export class HomePage implements OnInit {
request.UserName = this.userData.EMPLOYEE_NUMBER; request.UserName = this.userData.EMPLOYEE_NUMBER;
console.log("request"); console.log("request");
console.log(JSON.stringify(request)); console.log(JSON.stringify(request));
this.attendance_service.attendanceSwipeScanner( this.attendance_service
request, () => { .attendanceSwipeScanner(request, () => {
console.log("Error inside in swipe attendance"); console.log("Error inside in swipe attendance");
}) })
.subscribe((result: Response) => { .subscribe((result: Response) => {

@ -39,7 +39,7 @@
</ion-avatar> </ion-avatar>
<p class="boldTxt">{{subordinate.EMPLOYEE_NAME}}</p> <p class="boldTxt">{{subordinate.EMPLOYEE_NAME}}</p>
<p>{{subordinate.POSITION_NAME}}</p> <p>{{subordinate.POSITION_NAME}}</p>
<ion-badge item-end class="badge">{{subordinate.NUM_OF_SUBORDINATES}}</ion-badge> <ion-badge slot="end" class="badge">{{subordinate.NUM_OF_SUBORDINATES}}</ion-badge>
</ion-item> </ion-item>
</ion-list> </ion-list>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)"> <ion-infinite-scroll (ionInfinite)="doInfinite($event)">

@ -18,16 +18,16 @@
<ion-grid class=" gridAH"> <ion-grid class=" gridAH">
<ion-row class="rowAH titleH"> <ion-row class="rowAH titleH">
<ion-col col-4> <ion-col size="4">
<label class="Header" for="">{{'actionHis, name' | translate}}</label> <label class="Header" for="">{{'actionHis, name' | translate}}</label>
</ion-col> </ion-col>
<ion-col col-3> <ion-col size="3">
<label class="Header" for="">{{'actionHis, action' | translate}}</label> <label class="Header" for="">{{'actionHis, action' | translate}}</label>
</ion-col> </ion-col>
<ion-col col-3> <ion-col size="3">
<label class="Header" for="">{{'actionHis, date' | translate}}</label> <label class="Header" for="">{{'actionHis, date' | translate}}</label>
</ion-col> </ion-col>
<ion-col col-2> <ion-col size="2">
<label class="Header" for="">{{'actionHis, note' | translate}}</label> <label class="Header" for="">{{'actionHis, note' | translate}}</label>
</ion-col> </ion-col>
@ -36,16 +36,16 @@
<!-- <ion-col col-1> <!-- <ion-col col-1>
<label for="">{{actionHistory.SEQUENCE}}</label> <label for="">{{actionHistory.SEQUENCE}}</label>
</ion-col> --> </ion-col> -->
<ion-col col-4> <ion-col size="4">
<label for="">{{actionHistory.NAME}}</label> <label for="">{{actionHistory.NAME}}</label>
</ion-col> </ion-col>
<ion-col col-3> <ion-col size="3">
<label for="">{{actionHistory.ACTION}}</label> <label for="">{{actionHistory.ACTION}}</label>
</ion-col> </ion-col>
<ion-col col-3> <ion-col size="3">
<label for="">{{actionHistory.NOTIFICATION_DATE}}</label> <label for="">{{actionHistory.NOTIFICATION_DATE}}</label>
</ion-col> </ion-col>
<ion-col col-2 style="text-align: center"> <ion-col size="2" style="text-align: center">
<button (click)="openNoteDetail(actionHistory.NOTE)" style=" background: none;" <button (click)="openNoteDetail(actionHistory.NOTE)" style=" background: none;"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"> [hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null">
<img src="../assets/imgs/more.png"> <img src="../assets/imgs/more.png">

@ -53,3 +53,10 @@ ion-label.label.label-md,
ion-label.label.label-ios { ion-label.label.label-ios {
margin: 0px; margin: 0px;
} }
.rowAH .col{
border: 1px solid #d9d9d9;
padding: 2px !important;
text-align: center;
font-size: 15px;
}
.ion-card-content{padding:0;}

@ -40,10 +40,10 @@ export class WorkListReplacementRollComponent implements OnInit {
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1; this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50; this.P_PAGE_LIMIT = 50;
this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode'); this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo'); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr'); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
this.pQuestion = this.cs.sharedService.getSharedData('pQuestion'); this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
if (this.getPassActionMode == "ANSWER_INFO") { if (this.getPassActionMode == "ANSWER_INFO") {
this.isAnswer = true; this.isAnswer = true;
} }

@ -1,4 +1,4 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit, ElementRef } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListBodyRequest } from "../models/NotificationBodyReq"; import { WorkListBodyRequest } from "../models/NotificationBodyReq";
@ -21,8 +21,10 @@ export class WorklistMainComponent implements OnInit {
private WorkListBodyObj: WorkListBodyRequest; private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest; private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest; private WorkListActionObj: WorkListActionRequest;
public static PASS_NOTIFICATION_INFO="passNotificationInfo"; public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
public static PASS_ACTION_MODE = "passActionMode";
getPassNotificationDetails: any; getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr";
TransactionID: number = -999; TransactionID: number = -999;
notificationBodyRes: any; notificationBodyRes: any;
actionHistoryRes: any; actionHistoryRes: any;
@ -44,7 +46,8 @@ export class WorklistMainComponent implements OnInit {
constructor( constructor(
public common: CommonService, public common: CommonService,
public ts: TranslatorService, public ts: TranslatorService,
public worklistMainService: WorklistMainService public worklistMainService: WorklistMainService,
public elementRef: ElementRef
) {} ) {}
ngOnInit() { ngOnInit() {
@ -150,16 +153,18 @@ export class WorklistMainComponent implements OnInit {
var responseAttrDic = this.notExampleJsonObject; var responseAttrDic = this.notExampleJsonObject;
this.P_RESPOND_ATTRIBUTES_TBL = []; this.P_RESPOND_ATTRIBUTES_TBL = [];
for (let key in responseAttrDic) { for (let key in responseAttrDic) {
// let obj: any = {}; let obj: any = {};
// obj.ATTRIBUTE_NAME = key; obj.ATTRIBUTE_NAME = key;
// if (typeof responseAttrDic[key] === "number") { if (typeof responseAttrDic[key] === "number") {
// obj.ATTRIBUTE_NUMBER_VALUE = responseAttrDic[key]; obj.ATTRIBUTE_NUMBER_VALUE = responseAttrDic[key];
// } else if (isDate(responseAttrDic[key])) { }
// else if (isDate(responseAttrDic[key])) {
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
// } else {
// obj.ATTRIBUTE_TEXT_VALUE = responseAttrDic[key];
// } // }
// this.P_RESPOND_ATTRIBUTES_TBL.push(obj); else {
obj.ATTRIBUTE_TEXT_VALUE = responseAttrDic[key];
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
} }
let repUserName = this.selEmployeeID; let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
@ -190,6 +195,19 @@ export class WorklistMainComponent implements OnInit {
// passActionMode: ButtonAction, // passActionMode: ButtonAction,
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
// }); // });
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.common.openWorklistRFCPage();
} else if (ButtonAction == "ANSWER_INFO") { } else if (ButtonAction == "ANSWER_INFO") {
// this.navCtrl.push("WorkListReplacmentRollPage", { // this.navCtrl.push("WorkListReplacmentRollPage", {
// pQuestion: this.pQuestion, // pQuestion: this.pQuestion,
@ -197,6 +215,20 @@ export class WorklistMainComponent implements OnInit {
// passActionMode: ButtonAction, // passActionMode: ButtonAction,
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
// }); // });
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
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.common.openWorklistRollReplacement();
} else if ( } else if (
ButtonAction == "DELEGATE" || ButtonAction == "DELEGATE" ||
ButtonAction == "REQUEST_INFO" || ButtonAction == "REQUEST_INFO" ||
@ -210,6 +242,19 @@ export class WorklistMainComponent implements OnInit {
// passActionMode: ButtonAction, // passActionMode: ButtonAction,
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
// }); // });
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.common.openWorklistRollReplacement();
} else if ( } else if (
ButtonAction == "UPDATE_ACTION" || ButtonAction == "UPDATE_ACTION" ||
ButtonAction == "CONTINUE_ACTION" ButtonAction == "CONTINUE_ACTION"
@ -237,30 +282,32 @@ export class WorklistMainComponent implements OnInit {
// dirfromNotificationPage: true, // dirfromNotificationPage: true,
// submitAbsObjList: this.notificationBodyRes[0].Collection_Notification // submitAbsObjList: this.notificationBodyRes[0].Collection_Notification
// }); // });
this.common.openConfirmAbsece();
} }
} }
// else if (this.notificationButtonRes.length > 0 && !ButtonAction) { else if (this.notificationButtonRes.length > 0 && !ButtonAction) {
// (this.elementRef.nativeElement.querySelectorAll( (this.elementRef.nativeElement.querySelectorAll(
// "ion-item" "ion-item"
// ) as HTMLElement[]).forEach(x => { ) as HTMLElement[]).forEach(x => {
// if (x.classList.contains("requiredItem")) { if (x.classList.contains("requiredItem")) {
// x.classList.add("ng-touched"); x.classList.add("ng-touched");
// x.classList.remove("ng-untouched"); x.classList.remove("ng-untouched");
// } }
// }); });
// this.common.showAlert( this.common.presentAlert(
// this.translate.translate("worklistMain.actionRequird") this.ts.trPK("worklistMain","actionRequird")
// ); );
// } else { }
// this.navCtrl.pop();
// }
} }
openActionHistory() { openActionHistory() {
// this.navCtrl.push("WorkListActionHistoryPage", { // this.navCtrl.push("WorkListActionHistoryPage", {
// passNotificationInfo: this.getPassNotificationDetails // passNotificationInfo: this.getPassNotificationDetails
// }); // });
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO); this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
WorklistMainComponent.PASS_NOTIFICATION_INFO
);
this.common.openWorklistHistoryPage(); this.common.openWorklistHistoryPage();
} }
@ -268,7 +315,10 @@ export class WorklistMainComponent implements OnInit {
// this.navCtrl.push("WorkListAttachPage", { // this.navCtrl.push("WorkListAttachPage", {
// passNotificationInfo: this.getPassNotificationDetails // passNotificationInfo: this.getPassNotificationDetails
// }); // });
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO); this.common.sharedService.setSharedData(
this.getPassNotificationDetails,
WorklistMainComponent.PASS_NOTIFICATION_INFO
);
this.common.openWorklistAttachPage(); this.common.openWorklistAttachPage();
} }
@ -309,7 +359,7 @@ export class WorklistMainComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST EITNotificatonBodyResponse.NOT_WORKLIST
); );
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
this.common.sharedService.setSharedData("EIT","NotBodyType"); this.common.sharedService.setSharedData("EIT", "NotBodyType");
this.common.openNotificationDetailsPage(); this.common.openNotificationDetailsPage();
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
@ -320,7 +370,7 @@ export class WorklistMainComponent implements OnInit {
this.getPassNotificationDetails, this.getPassNotificationDetails,
AbsenceNotificatonBodyResponse.NOT_WORKLIST AbsenceNotificatonBodyResponse.NOT_WORKLIST
); );
this.common.sharedService.setSharedData("ABSENCE","NotBodyType"); this.common.sharedService.setSharedData("ABSENCE", "NotBodyType");
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
this.common.openNotificationDetailsPage(); this.common.openNotificationDetailsPage();
} }

Loading…
Cancel
Save