diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html index 2439bfae..905d542f 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html @@ -75,7 +75,7 @@ (click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)"> - @@ -100,7 +100,7 @@
{{'confirmAddEit, approverList' | translate}}
-
+

{{ 'general, empty' | translate}}

diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts index 87c43df9..7e556283 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts @@ -1,6 +1,6 @@ -import { Component, OnInit } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { ApproversList } from '../models/approvers'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { WorkListButtonRequest } from 'src/app/eit/models/NotificationButtonReq'; @@ -16,23 +16,23 @@ import { WorkListAttachViewComponent } from 'src/app/notification/work-list-atta import { FileUploader } from 'ng2-file-upload'; import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component'; @Component({ - selector: "app-absence-confirm", - templateUrl: "./absence-confirm.component.html", - styleUrls: ["./absence-confirm.component.scss"] + selector: 'app-absence-confirm', + templateUrl: './absence-confirm.component.html', + styleUrls: ['./absence-confirm.component.scss'] }) export class AbsenceConfirmComponent implements OnInit { direction:string; P_TransactionID: number; - approversList: ApproversList; - selEmp: string = ""; + approversList = []; + selEmp: string = ''; respID: number; - absComments: string = ""; + absComments: string = ''; selMenu: MenuResponse; attachItems: any; attachListDisplay: any; isTrue: any = 0; getPassNotificationDetails: any; - menuType: string = ""; + menuType: string = ''; attachmentRes: any; objIndex1: any; attachListOver: any = []; @@ -63,7 +63,7 @@ export class AbsenceConfirmComponent implements OnInit { true ); this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER; - this.menuType = "E"; + this.menuType = 'E'; this.respID = -999; // this.getApproversList(); // console.log("this.getPassNotificationDetails.P_NOTIFICATION_ID :"+this.getPassNotificationDetails.NOTIFICATION_ID); @@ -130,7 +130,7 @@ export class AbsenceConfirmComponent implements OnInit { return el.isSuccess == true; }); this.attachListOver = filtered; - let msg: string = ""; + let msg: string = ''; // msg = this.translate.translate("addAttach.errorMsg"); //this.common.showAlert(msg); } @@ -168,7 +168,7 @@ export class AbsenceConfirmComponent implements OnInit { if (this.common.validResponse(result)) { this.isSubmitBtnClicked = true; //if(this.isResubmitAbs==false){ - let msg: string = this.ts.trPK("general", "messageSuccess"); + let msg: string = this.ts.trPK('general', 'messageSuccess'); this.common.presentAlert(msg); // } @@ -180,7 +180,7 @@ export class AbsenceConfirmComponent implements OnInit { getApproversList() { let body: any = { P_TRANSACTION_ID: this.P_TransactionID, - P_AME_TRANSACTION_TYPE: "SSHRMS", + P_AME_TRANSACTION_TYPE: 'SSHRMS', P_PAGE_NUM: 1, P_PAGE_LIMIT: 1000 }; @@ -210,7 +210,7 @@ export class AbsenceConfirmComponent implements OnInit { }); modal.onDidDismiss() .then((data) => { - if (data == "cancel" || data == "undefined") { + if (data == 'cancel' || data == 'undefined') { return; } else { if (!str) { @@ -246,7 +246,7 @@ async openSubmitModal() { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { this.startAbApproval(); @@ -324,7 +324,7 @@ async openSubmitModal() { this.submitConService.updateAttach(req).subscribe((result: any) => { if (this.common.validResponse(result)) { if (result.MessageStatus == 1) { - let msg: string = ""; + let msg: string = ''; // msg = this.translate.translate("addAttach.attachUpdate"); // this.common.showAlert(msg); @@ -351,7 +351,7 @@ async openSubmitModal() { }; this.submitConService.delteAttach(req).subscribe((result: any) => { if (this.common.validResponse(result)) { - if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") { + if (result.DeleteAttachmentList.P_RETURN_STATUS === 'S') { this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); // let msg: string = ""; // msg = this.translate.translate("addAttach.deleteAttach"); @@ -391,8 +391,8 @@ async openSubmitModal() { // this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){ if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { - let msg: string = ""; - msg = this.ts.trPK("general", "notSupport"); + let msg: string = ''; + msg = this.ts.trPK('general', 'notSupport'); this.common.presentAlert(msg); return } // todo: show alert that you tried uploading wrong files @@ -427,7 +427,7 @@ async openSubmitModal() { pushObject(fileData, name, type) { - console.log("before push: "+ this.index); + console.log('before push: '+ this.index); //this.attachListOver.length++; try { let array = name.split('.'); diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index 1856df8d..0ca580f6 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -186,9 +186,9 @@ getAbsenceTransaction() { } } } -doInfinite() { +doInfinite(event: any) { if (!this.IsReachEnd) { - //this.P_PAGE_NUM++; + // this.P_PAGE_NUM++; const request = { P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE, diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts index 53dc2393..eee3bd58 100644 --- a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts @@ -9,9 +9,9 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl styleUrls: ['./submit-absence-modal.component.scss'], }) export class SubmitAbsenceModalComponent implements OnInit { - submitAbsAttachmentList :any =[]; + submitAbsAttachmentList: any = []; absComments: string; - constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){ + constructor( public ts: TranslatorService, private modalCtrl: ModalController, private cs: CommonService){ this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false); this.absComments = this.cs.sharedService.getSharedData('absComments', false); } diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.ts b/Mohem/src/app/absence/view-attachments/view-attachments.component.ts index e126968c..dce19a90 100644 --- a/Mohem/src/app/absence/view-attachments/view-attachments.component.ts +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.ts @@ -1,21 +1,21 @@ -import { Component, OnInit } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { ModalController } from "@ionic/angular"; -import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component"; -import { AbsenceAttahcment } from "../models/abs.attach"; -import { AbsenceAttahcmentResponse } from "../models/abs.attach.response"; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { ModalController } from '@ionic/angular'; +import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; +import { AbsenceAttahcment } from '../models/abs.attach'; +import { AbsenceAttahcmentResponse } from '../models/abs.attach.response'; @Component({ - selector: "app-view-attachments", - templateUrl: "./view-attachments.component.html", - styleUrls: ["./view-attachments.component.scss"] + selector: 'app-view-attachments', + templateUrl: './view-attachments.component.html', + styleUrls: ['./view-attachments.component.scss'] }) export class ViewAttachmentsComponent implements OnInit { AttachmentList: AbsenceAttahcment[]; constructor( public common: CommonService, public modalCtrl: ModalController, - private ts: TranslatorService + public ts: TranslatorService ) {} ngOnInit() { @@ -26,7 +26,7 @@ export class ViewAttachmentsComponent implements OnInit { async OpenAttachFiles(value, Type) { this.common.sharedService.setSharedData( { displayData: value, TypeData: Type }, - "WorkListAttachViewPage" + 'WorkListAttachViewPage' ); const modal = await this.modalCtrl.create({ component: WorkListAttachViewComponent diff --git a/Mohem/src/app/accrual-balances/home/home.component.ts b/Mohem/src/app/accrual-balances/home/home.component.ts index d26f4574..1171adb0 100644 --- a/Mohem/src/app/accrual-balances/home/home.component.ts +++ b/Mohem/src/app/accrual-balances/home/home.component.ts @@ -33,7 +33,7 @@ export class HomeComponent implements OnInit { } }); } - private getAccrualBalance() { + public getAccrualBalance() { if (this.Sdate) { let today = new Date(this.Sdate); let day = today.getDate(); diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index a8762509..125c9a87 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -23,7 +23,7 @@
-
+
@@ -150,7 +150,7 @@
-

{{CompanyImageDescription}}

+

{{companyDesc}}

diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts index 189a7245..5de8fd21 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts @@ -53,6 +53,7 @@ export class WorkListMainItgComponent implements OnInit { public actionBTN: { name: string, image: string, isAvailable: boolean }[] = []; index2: number; direction: string; + defaultSegment = ''; constructor( public common: CommonService, public ts: TranslatorService, diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index bc353e33..38681196 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -14,7 +14,7 @@ - diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 17fdaffe..fef9923a 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -1,17 +1,17 @@ -import { Component, OnInit, ElementRef } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { WorkListBodyRequest } from "../models/NotificationBodyReq"; -import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes"; -import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes"; -import { NotificatonButtonResponse } from "../models/NotificationButtonRes"; -import { WorkListActionRequest } from "../models/NotificationActionReq"; -import { WorkListButtonRequest } from "../models/NotificationButtonReq"; +import { Component, OnInit, ElementRef } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { WorkListBodyRequest } from '../models/NotificationBodyReq'; +import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes'; +import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes'; +import { NotificatonButtonResponse } from '../models/NotificationButtonRes'; +import { WorkListActionRequest } from '../models/NotificationActionReq'; +import { WorkListButtonRequest } from '../models/NotificationButtonReq'; // import { isDate } from 'angular6-json-schema-form'; -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 { 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 { TextInput } from 'src/app/uI-elements/text.input'; import { TextAreaInput } from 'src/app/uI-elements/text-area.input'; import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; @@ -45,17 +45,17 @@ export class WorklistMainMRComponent implements OnInit { private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListAttachObj: WorkListButtonRequest; private PRList: PRNotificatonBodyList - public static PASS_NOTIFICATION_INFO = "passNotificationInfo"; - public static PASS_ACTION_MODE = "passActionMode"; + public static PASS_NOTIFICATION_INFO = 'passNotificationInfo'; + public static PASS_ACTION_MODE = 'passActionMode'; getPassNotificationDetails: any; - public static PASS_RES_ATTR = "passResAttr"; + public static PASS_RES_ATTR = 'passResAttr'; TransactionID: number = -999; notificationBodyRes: any; actionHistoryRes: any; notificationButtonRes: any; actionMode: any; - pInformation: string = ""; - pQuestion: string = ""; + pInformation: string = ''; + pQuestion: string = ''; RespondAttributesListRes: any; schemaNotific: any; NotRespondAttributeList: any; @@ -66,7 +66,7 @@ export class WorklistMainMRComponent implements OnInit { dataOfAttr: any; P_RESPOND_ATTRIBUTES_TBL: any; selEmployeeID: any; - actionType: string = ""; + actionType: string = ''; notificationArray: any; notificationDynamicAttributeArr: any; private textInput: TextInput; @@ -87,7 +87,7 @@ export class WorklistMainMRComponent implements OnInit { confirmMsg: string; delMsg: string; closeMsg: string; - activeSegment: any = "item-req"; + activeSegment: any = 'item-req'; lines_note_limit: any = 24; orgNote: string; truncating: boolean; @@ -100,7 +100,7 @@ export class WorklistMainMRComponent implements OnInit { rejectDis: boolean = false; requestDis: boolean = false; direction: string; - + defaultSegment = ''; constructor( @@ -133,14 +133,14 @@ export class WorklistMainMRComponent implements OnInit { } public segmentChanged(event: any) { this.activeSegment = event.detail.value; - console.log(" event.detail.value: " + event.detail.value); + console.log(' event.detail.value: ' + event.detail.value); } intializeNotificationDetail() { if (this.messageSuccess) { - document.getElementById("notificationDynamicFields").innerHTML = ""; + document.getElementById('notificationDynamicFields').innerHTML = ''; } - console.log("intializeNotificationDetail"); + console.log('intializeNotificationDetail'); this.getPassNotificationDetails = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_DATA, false @@ -163,9 +163,9 @@ export class WorklistMainMRComponent implements OnInit { this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; 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_FORWARD_TO_USER_NAME = ''; + this.WorkListActionObj.P_ACTION_MODE = ''; + this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.P_APPROVER_INDEX = null; this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; @@ -178,15 +178,15 @@ export class WorklistMainMRComponent implements OnInit { this.getNotificationResAttr(this.WorkListButtonsObj); this.getActionHistory(this.WorkListActionHistoryObj); this.getAttachmentNotification(this.WorkListAttachObj); - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.getEITNotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.getAbsenceNotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PO') { this.getPONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'MO') { this.getMONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PR') { this.getPRNotificationDetails(this.WorkListBodyObj); } } @@ -195,7 +195,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getPRNotificationBody(notificationBodyObj) .subscribe((result: PRNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "PR"); + this.handleWorkListBodyResult(result, 'PR'); }); } @@ -203,7 +203,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getMONotificationBody(notificationBodyObj) .subscribe((result: MONotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "MO"); + this.handleWorkListBodyResult(result, 'MO'); }); } @@ -212,7 +212,7 @@ export class WorklistMainMRComponent implements OnInit { .getPONotificationBody(notificationBodyObj) .subscribe((result: PONotificatonBodyResponse) => { console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - this.handleWorkListBodyResult(result, "PO"); + this.handleWorkListBodyResult(result, 'PO'); }); } @@ -220,7 +220,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getEITNotificationBody(notificationBodyObj) .subscribe((result: EITNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "EIT"); + this.handleWorkListBodyResult(result, 'EIT'); }); } @@ -228,7 +228,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getAbsencesNotificationBody(notificationBodyObj) .subscribe((result: AbsenceNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "ABSENCE"); + this.handleWorkListBodyResult(result, 'ABSENCE'); }); } @@ -237,7 +237,7 @@ export class WorklistMainMRComponent implements OnInit { if (this.common.validResponse(result)) { this.pInformation = result.P_INFORMATION; this.pQuestion = result.P_QUESTION; - if (Type == "MO") { + if (Type == 'MO') { if (result.GetMoNotificationBodyList) { this.notificationBodyRes = result.GetMoNotificationBodyList; @@ -262,16 +262,16 @@ export class WorklistMainMRComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); - console.log("test" + this.notificationButtonRes.length); + this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore'); + console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') { this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') { this.rejectDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { this.requestDis = true; } // if result == null } // valid it @@ -328,7 +328,7 @@ export class WorklistMainMRComponent implements OnInit { } actionButton(action) { - console.log("actionButton" + action); + console.log('actionButton' + action); // alert("don't forget"); //let ButtonAction: string = this.actionType; let ButtonAction: string = action; @@ -337,13 +337,13 @@ export class WorklistMainMRComponent implements OnInit { for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { let obj: any = {}; obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME; - if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") { + if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') { obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } // else if (isDate(responseAttrDic[key])) { // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; // } - else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } this.P_RESPOND_ATTRIBUTES_TBL.push(obj); @@ -351,20 +351,20 @@ export class WorklistMainMRComponent implements OnInit { let repUserName = this.selEmployeeID; if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { let obj: any = {}; - repUserName = ""; + repUserName = ''; obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; this.P_RESPOND_ATTRIBUTES_TBL.push(obj); } if ( - ButtonAction == "APPROVE" || - ButtonAction == "REJECT" || - ButtonAction == "DEL" || - ButtonAction == "CLOSE" + ButtonAction == 'APPROVE' || + ButtonAction == 'REJECT' || + ButtonAction == 'DEL' || + ButtonAction == 'CLOSE' ) { - this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ''; this.WorkListActionObj.P_ACTION_MODE = ButtonAction; - this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; //sheardData @@ -374,18 +374,18 @@ export class WorklistMainMRComponent implements OnInit { ); ///////////////////////////////////////////// - if (ButtonAction == "APPROVE") { + if (ButtonAction == 'APPROVE') { this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') } - else if (ButtonAction == "REJECT") { + else if (ButtonAction == 'REJECT') { this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') } - else if (ButtonAction == "DEL") { + else if (ButtonAction == 'DEL') { this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg') } - else if (ButtonAction == "CLOSE") { + else if (ButtonAction == 'CLOSE') { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } @@ -416,7 +416,7 @@ export class WorklistMainMRComponent implements OnInit { ////////////this.applyAction(this.WorkListActionObj); } - if (ButtonAction == "RFC") { + if (ButtonAction == 'RFC') { // alert("Return For Correction"); this.WorkListActionObj.P_ACTION_MODE = ButtonAction; // this.navCtrl.push("WorkListRfcPage", { @@ -438,9 +438,9 @@ export class WorklistMainMRComponent implements OnInit { ); // this.common.openWorklistRFCPage(); this.openRFCModal(); - } else if (ButtonAction == "ANSWER_INFO") { + } else if (ButtonAction == 'ANSWER_INFO') { - this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); + this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion'); this.common.sharedService.setSharedData( this.getPassNotificationDetails, WorklistMainMRComponent.PASS_NOTIFICATION_INFO @@ -456,12 +456,12 @@ export class WorklistMainMRComponent implements OnInit { //this.common.openWorklistRollReplacement(); this.openReplacementRoll(); } else if ( - ButtonAction == "DELEGATE" || - ButtonAction == "REQUEST_INFO" || - ButtonAction == "TRANSFER" || - ButtonAction == "TRANSFER_INFO" || - ButtonAction == "APPROVE_AND_FORWARD" || - ButtonAction == "FORWARD" + ButtonAction == 'DELEGATE' || + ButtonAction == 'REQUEST_INFO' || + ButtonAction == 'TRANSFER' || + ButtonAction == 'TRANSFER_INFO' || + ButtonAction == 'APPROVE_AND_FORWARD' || + ButtonAction == 'FORWARD' ) { @@ -487,10 +487,10 @@ export class WorklistMainMRComponent implements OnInit { // this.common.openWorklistRollReplacement(); this.openReplacementRoll(); } else if ( - ButtonAction == "UPDATE_ACTION" || - ButtonAction == "CONTINUE_ACTION" + ButtonAction == 'UPDATE_ACTION' || + ButtonAction == 'CONTINUE_ACTION' ) { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -500,7 +500,7 @@ export class WorklistMainMRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("EitUpdateListPage"); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -518,15 +518,15 @@ export class WorklistMainMRComponent implements OnInit { } else if (this.notificationButtonRes.length > 0 && !ButtonAction) { (this.elementRef.nativeElement.querySelectorAll( - "ion-item" + 'ion-item' ) as HTMLElement[]).forEach(x => { - if (x.classList.contains("requiredItem")) { - x.classList.add("ng-touched"); - x.classList.remove("ng-untouched"); + if (x.classList.contains('requiredItem')) { + x.classList.add('ng-touched'); + x.classList.remove('ng-untouched'); } }); this.common.presentAlert( - this.ts.trPK("worklistMain", "actionRequird") + this.ts.trPK('worklistMain', 'actionRequird') ); } } @@ -569,7 +569,7 @@ export class WorklistMainMRComponent implements OnInit { this.NotRespondAttributeList = result.NotificationGetRespondAttributesList; if ( - result.NotificationRespondRolesList != "" && + result.NotificationRespondRolesList != '' && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined ) { @@ -592,20 +592,20 @@ export class WorklistMainMRComponent implements OnInit { notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; for (let i = 0; i < notificationAttr.length; i++) { - if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { - this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { + if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { + this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', ''); + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') { } } } openNotificationBody() { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -615,9 +615,9 @@ export class WorklistMainMRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); - this.common.sharedService.setSharedData("EIT", "NotBodyType"); + this.common.sharedService.setSharedData('EIT', 'NotBodyType'); this.common.openNotificationDetailsPage(); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -626,7 +626,7 @@ export class WorklistMainMRComponent implements OnInit { this.getPassNotificationDetails, AbsenceNotificatonBodyResponse.NOT_WORKLIST ); - this.common.sharedService.setSharedData("ABSENCE", "NotBodyType"); + this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType'); //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); this.common.openNotificationDetailsPage(); } @@ -641,7 +641,7 @@ export class WorklistMainMRComponent implements OnInit { if (this.notificationCount <= 0) { this.notificationCount = null; } - this.events.publish("getNotCount", this.notificationCount); + this.events.publish('getNotCount', this.notificationCount); } }); } @@ -699,7 +699,7 @@ export class WorklistMainMRComponent implements OnInit { async openNoteDetail(note, sender) { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); - console.log("note" + note); + console.log('note' + note); this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') @@ -715,7 +715,7 @@ export class WorklistMainMRComponent implements OnInit { } doInfinite(infiniteScroll) { - console.log("doInfinite action history MR"); + console.log('doInfinite action history MR'); if (!this.IsReachEnd) { this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -800,7 +800,7 @@ export class WorklistMainMRComponent implements OnInit { doInfiniteNotificationBody(infiniteScroll) { - console.log("doInfiniteNotificationBody MR"); + console.log('doInfiniteNotificationBody MR'); if (!this.IsReachEnd) { this.worklistMainService.getMONotificationBody(this.WorkListActionHistoryObj). subscribe((result: any) => { @@ -835,9 +835,9 @@ export class WorklistMainMRComponent implements OnInit { loadMoreNotificationBody() { - console.log("loadMoreNotificationBody MR"); + console.log('loadMoreNotificationBody MR'); if (!this.IsReachEnd) { - console.log("this.IsReachEnd" + this.IsReachEnd); + console.log('this.IsReachEnd' + this.IsReachEnd); this.worklistMainService.getMONotificationBody(this.WorkListBodyObj). subscribe((result: any) => { @@ -855,7 +855,7 @@ export class WorklistMainMRComponent implements OnInit { this.notificationBodyRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("test") + console.log('test') ); }// if list length >0 else { @@ -872,7 +872,7 @@ export class WorklistMainMRComponent implements OnInit { } }//end infiniteScroll loadMoreActionHistory() { - console.log("doInfinite action history MR"); + console.log('doInfinite action history MR'); if (!this.IsReachEnd) { this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -891,7 +891,7 @@ export class WorklistMainMRComponent implements OnInit { this.actionHistoryRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("TEST")); + console.log('TEST')); }// if list length >0 else { this.IsReachEnd = true; @@ -922,7 +922,7 @@ export class WorklistMainMRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { @@ -945,7 +945,7 @@ export class WorklistMainMRComponent implements OnInit { /////////////////////////////////////////// public checkLines(note) { - console.log(note.split("\n").length); + console.log(note.split('\n').length); console.log(note.length); if (note && note != null) { @@ -970,7 +970,7 @@ export class WorklistMainMRComponent implements OnInit { } this.actionHistoryRes = actionHis; - console.log("test"); + console.log('test'); } @@ -986,9 +986,9 @@ export class WorklistMainMRComponent implements OnInit { modal.onDidDismiss().then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; - } else if (data.data == "Success") { + } else if (data.data == 'Success') { this.getNotificationCountAfterSubmit(); this.nextNotfification(); @@ -1018,9 +1018,9 @@ export class WorklistMainMRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; - } else if (data.data == "Success") { + } else if (data.data == 'Success') { this.getNotificationCountAfterSubmit(); this.nextNotfification(); diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 0daad28e..139089b4 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -15,7 +15,7 @@
{{getPassNotificationDetails.SUBJECT}}
- {{getPassNotificationDetails.SUBJECT}}
- { - this.handleWorkListBodyResult(result, "PR"); + this.handleWorkListBodyResult(result, 'PR'); }); } @@ -217,7 +218,7 @@ export class WorklistMainPRComponent implements OnInit { .getPONotificationBody(notificationBodyObj) .subscribe((result: PONotificatonBodyResponse) => { console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - this.handleWorkListBodyResult(result, "PO"); + this.handleWorkListBodyResult(result, 'PO'); }); } @@ -225,7 +226,7 @@ export class WorklistMainPRComponent implements OnInit { this.worklistMainService .getEITNotificationBody(notificationBodyObj) .subscribe((result: EITNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "EIT"); + this.handleWorkListBodyResult(result, 'EIT'); }); } @@ -233,7 +234,7 @@ export class WorklistMainPRComponent implements OnInit { this.worklistMainService .getAbsencesNotificationBody(notificationBodyObj) .subscribe((result: AbsenceNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "ABSENCE"); + this.handleWorkListBodyResult(result, 'ABSENCE'); }); } @@ -242,20 +243,20 @@ export class WorklistMainPRComponent implements OnInit { if (this.common.validResponse(result)) { this.pInformation = result.P_INFORMATION; this.pQuestion = result.P_QUESTION; - if (Type == "EIT") { + if (Type == 'EIT') { if (result.GetEITCollectionNotificationBodyList) { this.notificationBodyRes = result.GetEITCollectionNotificationBodyList; } - } else if (Type == "ABSENCE") { - console.log("ABSENCE"); + } else if (Type == 'ABSENCE') { + console.log('ABSENCE'); if (result.GetAbsenceCollectionNotificationBodyList) { this.notificationBodyRes = result.GetAbsenceCollectionNotificationBodyList; } - } else if (Type == "PR") { + } else if (Type == 'PR') { if (result.GetPrNotificationBodyList) { - console.log("PR"); + console.log('PR'); this.PRHeader = result.GetPrNotificationBodyList.PRHeader; this.PRLines = result.GetPrNotificationBodyList.PRLines; @@ -296,16 +297,16 @@ export class WorklistMainPRComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); - console.log("test" + this.notificationButtonRes.length); + this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore'); + console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') { this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') { this.rejectDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { this.requestDis = true; } // if result == null } // valid it @@ -361,7 +362,7 @@ export class WorklistMainPRComponent implements OnInit { actionButton(action) { - console.log("actionButton" + action); + console.log('actionButton' + action); //alert("don't forget"); //let ButtonAction: string = this.actionType; let ButtonAction: string = action; @@ -372,13 +373,13 @@ export class WorklistMainPRComponent implements OnInit { for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { let obj: any = {}; obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME; - if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") { + if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') { obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } // else if (isDate(responseAttrDic[key])) { // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; // } - else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } this.P_RESPOND_ATTRIBUTES_TBL.push(obj); @@ -386,20 +387,20 @@ export class WorklistMainPRComponent implements OnInit { let repUserName = this.selEmployeeID; if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { let obj: any = {}; - repUserName = ""; + repUserName = ''; obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; this.P_RESPOND_ATTRIBUTES_TBL.push(obj); } if ( - ButtonAction == "APPROVE" || - ButtonAction == "REJECT" || - ButtonAction == "DEL" || - ButtonAction == "CLOSE" + ButtonAction == 'APPROVE' || + ButtonAction == 'REJECT' || + ButtonAction == 'DEL' || + ButtonAction == 'CLOSE' ) { - this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ''; this.WorkListActionObj.P_ACTION_MODE = ButtonAction; - this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; //sheardData @@ -407,18 +408,18 @@ export class WorklistMainPRComponent implements OnInit { // this.WorkListActionObj, // WorklistMainPRComponent.PASS_NOTIFICATION_INFO // ); - if (ButtonAction == "APPROVE") { + if (ButtonAction == 'APPROVE') { this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') } - else if (ButtonAction == "REJECT") { + else if (ButtonAction == 'REJECT') { this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') } - else if (ButtonAction == "DEL") { + else if (ButtonAction == 'DEL') { this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg') } - else if (ButtonAction == "CLOSE") { + else if (ButtonAction == 'CLOSE') { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } @@ -448,7 +449,7 @@ export class WorklistMainPRComponent implements OnInit { ////////////this.applyAction(this.WorkListActionObj); } - if (ButtonAction == "RFC") { + if (ButtonAction == 'RFC') { // alert("Return For Correction"); this.WorkListActionObj.P_ACTION_MODE = ButtonAction; // this.navCtrl.push("WorkListRfcPage", { @@ -470,14 +471,14 @@ export class WorklistMainPRComponent implements OnInit { ); // this.common.openWorklistRFCPage(); this.openRFCModal(); - } else if (ButtonAction == "ANSWER_INFO") { + } else if (ButtonAction == 'ANSWER_INFO') { // this.navCtrl.push("WorkListReplacmentRollPage", { // pQuestion: this.pQuestion, // passNotificationInfo: this.getPassNotificationDetails, // passActionMode: ButtonAction, // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL // }); - this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); + this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion'); this.common.sharedService.setSharedData( this.getPassNotificationDetails, WorklistMainPRComponent.PASS_NOTIFICATION_INFO @@ -493,12 +494,12 @@ export class WorklistMainPRComponent implements OnInit { // this.common.openWorklistRollReplacement(); this.openRepRolModal(); } else if ( - ButtonAction == "DELEGATE" || - ButtonAction == "REQUEST_INFO" || - ButtonAction == "TRANSFER" || - ButtonAction == "TRANSFER_INFO" || - ButtonAction == "APPROVE_AND_FORWARD" || - ButtonAction == "FORWARD" + ButtonAction == 'DELEGATE' || + ButtonAction == 'REQUEST_INFO' || + ButtonAction == 'TRANSFER' || + ButtonAction == 'TRANSFER_INFO' || + ButtonAction == 'APPROVE_AND_FORWARD' || + ButtonAction == 'FORWARD' ) { @@ -524,10 +525,10 @@ export class WorklistMainPRComponent implements OnInit { // this.common.openWorklistRollReplacement(); this.openRepRolModal(); } else if ( - ButtonAction == "UPDATE_ACTION" || - ButtonAction == "CONTINUE_ACTION" + ButtonAction == 'UPDATE_ACTION' || + ButtonAction == 'CONTINUE_ACTION' ) { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -537,7 +538,7 @@ export class WorklistMainPRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("EitUpdateListPage"); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -555,15 +556,15 @@ export class WorklistMainPRComponent implements OnInit { } else if (this.notificationButtonRes.length > 0 && !ButtonAction) { (this.elementRef.nativeElement.querySelectorAll( - "ion-item" + 'ion-item' ) as HTMLElement[]).forEach(x => { - if (x.classList.contains("requiredItem")) { - x.classList.add("ng-touched"); - x.classList.remove("ng-untouched"); + if (x.classList.contains('requiredItem')) { + x.classList.add('ng-touched'); + x.classList.remove('ng-untouched'); } }); this.common.presentAlert( - this.ts.trPK("worklistMain", "actionRequird") + this.ts.trPK('worklistMain', 'actionRequird') ); } } @@ -606,7 +607,7 @@ export class WorklistMainPRComponent implements OnInit { this.NotRespondAttributeList = result.NotificationGetRespondAttributesList; if ( - result.NotificationRespondRolesList != "" && + result.NotificationRespondRolesList != '' && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined ) { @@ -629,20 +630,20 @@ export class WorklistMainPRComponent implements OnInit { notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; for (let i = 0; i < notificationAttr.length; i++) { - if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { - this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { + if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { + this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', ''); + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') { } } } openNotificationBody() { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -652,9 +653,9 @@ export class WorklistMainPRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); - this.common.sharedService.setSharedData("EIT", "NotBodyType"); + this.common.sharedService.setSharedData('EIT', 'NotBodyType'); this.common.openNotificationDetailsPage(); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -663,7 +664,7 @@ export class WorklistMainPRComponent implements OnInit { this.getPassNotificationDetails, AbsenceNotificatonBodyResponse.NOT_WORKLIST ); - this.common.sharedService.setSharedData("ABSENCE", "NotBodyType"); + this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType'); //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); this.common.openNotificationDetailsPage(); } @@ -678,7 +679,7 @@ export class WorklistMainPRComponent implements OnInit { if (this.notificationCount <= 0) { this.notificationCount = null; } - this.events.publish("getNotCount", this.notificationCount); + this.events.publish('getNotCount', this.notificationCount); } }); } @@ -735,7 +736,7 @@ export class WorklistMainPRComponent implements OnInit { async openNoteDetail(note, sender) { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); - console.log("note" + note); + console.log('note' + note); this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') @@ -832,9 +833,9 @@ export class WorklistMainPRComponent implements OnInit { loadMoreNotificationBody() { - console.log("loadMoreNotificationBody PR"); + console.log('loadMoreNotificationBody PR'); if (!this.IsReachEnd) { - console.log("this.IsReachEnd" + this.IsReachEnd); + console.log('this.IsReachEnd' + this.IsReachEnd); this.worklistMainService.getPRNotificationBody(this.WorkListBodyObj). subscribe((result: any) => { @@ -852,7 +853,7 @@ export class WorklistMainPRComponent implements OnInit { this.notificationBodyRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("test") + console.log('test') ); }// if list length >0 else { @@ -869,7 +870,7 @@ export class WorklistMainPRComponent implements OnInit { } }//end infiniteScroll loadMoreActionHistory() { - console.log("doInfinite action history MR"); + console.log('doInfinite action history MR'); if (!this.IsReachEnd) { this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -887,7 +888,7 @@ export class WorklistMainPRComponent implements OnInit { this.actionHistoryRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("TEST")); + console.log('TEST')); }// if list length >0 else { this.IsReachEnd = true; @@ -905,7 +906,7 @@ export class WorklistMainPRComponent implements OnInit { //////////////////////////////////////////////////////// public checkLines(note) { - console.log(note.split("\n").length); + console.log(note.split('\n').length); console.log(note.length); if (note && note != null) { @@ -935,7 +936,7 @@ export class WorklistMainPRComponent implements OnInit { // return obj; // }) this.actionHistoryRes = actionHis; - console.log("test"); + console.log('test'); } @@ -955,7 +956,7 @@ export class WorklistMainPRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { @@ -989,9 +990,9 @@ export class WorklistMainPRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; - } else if (data.data == "Success") { + } else if (data.data == 'Success') { this.getNotificationCountAfterSubmit(); this.nextNotfification(); @@ -1020,7 +1021,7 @@ export class WorklistMainPRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index ae5fe709..7d17155d 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -10,7 +10,7 @@
{{getPassNotificationDetails.SUBJECT}}
- diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 038bbe41..91372e1d 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -95,6 +95,7 @@ export class WorklistMainComponent implements OnInit { requestDis: boolean = false; moreDisabled: boolean = true; direction: string; + defaultSegment = ''; constructor( public worklistService: WorklistService, diff --git a/Mohem/src/app/payslip/home/home.component.html b/Mohem/src/app/payslip/home/home.component.html index 82bd19e4..da4642cd 100644 --- a/Mohem/src/app/payslip/home/home.component.html +++ b/Mohem/src/app/payslip/home/home.component.html @@ -76,7 +76,7 @@
- + diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.html b/Mohem/src/app/profile/edit-profile/edit-profile.component.html index 47abf5dd..df97d9e0 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.html +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.html @@ -8,7 +8,7 @@
-
+
diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts index e57431f8..2e2a11aa 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -1,9 +1,9 @@ import { Component, OnInit } from '@angular/core'; -import { Platform, Events, MenuController } from "@ionic/angular"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; @@ -19,13 +19,13 @@ import { DomSanitizer } from '@angular/platform-browser'; export class EditProfileComponent implements OnInit { - User_name_Emp: string = ""; + User_name_Emp: string = ''; User_Job_name: string; public direction: string; private menu: MenuController; setImage:any; // imageSrc: any = "../assets/imgs/profile.png"; - user_image: any = "../assets/imgs/profile.png"; + user_image: any = '../assets/imgs/profile.png'; personalInfo: any; appraisalArr :any =[]; public performanceData: any=[]; @@ -45,9 +45,9 @@ export class EditProfileComponent implements OnInit { ) { this.direction = TranslatorService.getCurrentDirection(); - this.events.subscribe("img-change", displayImg => { - console.log("app compont: "+displayImg); - this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + this.events.subscribe('img-change', displayImg => { + console.log('app compont: '+displayImg); + this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); }); @@ -59,7 +59,7 @@ export class EditProfileComponent implements OnInit { } getProfile() { - console.log("getProfile"); + console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { @@ -68,16 +68,16 @@ export class EditProfileComponent implements OnInit { this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME; this.User_Job_name=this.personalInfo.JOB_NAME; if(this.cs.getUpdateImage().status){ - this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + this.user_image =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img); }else{ this.user_image = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE - : "../assets/imgs/profile.png"; + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : '../assets/imgs/profile.png'; } - console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); - console.log("user name: "+ user.EMPLOYEE_NAME); - console.log("name: "+ this.personalInfo.JOB_NAME); - console.log("job name: "+ user.JOB_NAME); + console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); + console.log('user name: '+ user.EMPLOYEE_NAME); + console.log('name: '+ this.personalInfo.JOB_NAME); + console.log('job name: '+ user.JOB_NAME); }}); @@ -110,7 +110,7 @@ private handlePerformanceAppraisalResult(result){ for(let i=0;i -->
-
+
diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 6b1903bb..befdf290 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -1,19 +1,19 @@ -import { Component, OnInit } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; -import { Events } from "@ionic/angular"; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { Events } from '@ionic/angular'; import { DomSanitizer } from '@angular/platform-browser'; @Component({ - selector: "app-home", - templateUrl: "./home.component.html", - styleUrls: ["./home.component.scss"] + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'] }) export class HomeComponent implements OnInit { personalInfo: any; setImage:any; - imageSrc: any = "../assets/imgs/profile.png"; + imageSrc: any = '../assets/imgs/profile.png'; public direction: string; // user_image: any = "../assets/imgs/profile.png"; constructor( @@ -26,11 +26,11 @@ export class HomeComponent implements OnInit { ) { this.direction = TranslatorService.getCurrentDirection(); - this.events.subscribe("img-change", displayImg => { + this.events.subscribe('img-change', displayImg => { // alert("1 - profile home : "+displayImg); //this.user_image = "data:image/png;base64"+displayImg; - this.setImage = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); - this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); }); @@ -41,33 +41,33 @@ export class HomeComponent implements OnInit { this.getProfile(); } getProfile() { - console.log("getProfile"); + console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; - console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); - console.log("user name: "+ user.EMPLOYEE_NAME); + console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); + console.log('user name: '+ user.EMPLOYEE_NAME); if(this.cs.getUpdateImage().status){ // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); - this.imageSrc =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + this.imageSrc =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img); }else{ this.imageSrc = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.imageSrc; - console.log("2-"+user); + console.log('2-'+user); } } else { - console.log("3-"+user); + console.log('3-'+user); } }); } - private ChangeImage() { + public ChangeImage() { this.cs.openChangeImagePage(); } } diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html index 16e9298b..9903b387 100644 --- a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html @@ -32,7 +32,7 @@ + [smallSegments]="10"> diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts index 9c0807ed..6b14fc93 100644 --- a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts @@ -1,13 +1,13 @@ import { Component, OnInit, NgModule } from '@angular/core'; -import { Platform, Events, MenuController } from "@ionic/angular"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; // import { DomSanitizer } from '@angular/platform-browser'; // import {NgxGaugeModule} from 'ngx-gauge'; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; @@ -18,7 +18,7 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo }) export class PerformanceEvaluationComponent implements OnInit { personalInfo: any; - user_image: any = "../assets/imgs/profile.png"; + user_image: any = '../assets/imgs/profile.png'; setImage: any; view: any = [380, 450]; public performanceData: any = []; @@ -64,7 +64,7 @@ export class PerformanceEvaluationComponent implements OnInit { for (let i = 0; i < this.performanceData.length; i++) { this.performanceData[i].color = this.colorScheme.domain[i]; - console.log(i + " : " + this.performanceData[i].name) + console.log(i + ' : ' + this.performanceData[i].name) } console.log(this.performanceData[0].color) @@ -72,19 +72,19 @@ export class PerformanceEvaluationComponent implements OnInit { } ngAfterViewInit() { - document.querySelector("svg .gauge.chart > text").remove(); + document.querySelector('svg .gauge.chart > text').remove(); } getProfile() { - console.log("getProfile"); + console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; this.user_image = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE - : "../assets/imgs/profile.png"; + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : '../assets/imgs/profile.png'; } diff --git a/Mohem/src/app/time-card/select-period/select-period.component.ts b/Mohem/src/app/time-card/select-period/select-period.component.ts index 5ecc7a18..cb93ce56 100644 --- a/Mohem/src/app/time-card/select-period/select-period.component.ts +++ b/Mohem/src/app/time-card/select-period/select-period.component.ts @@ -13,6 +13,7 @@ export class SelectPeriodComponent implements OnInit { public dateFrom: any; public dateTo: any; public selectedShiftType: any; + public Select = ''; public filtersArray: any = [ { diff --git a/Mohem/src/app/vacation-rule/home/home.component.ts b/Mohem/src/app/vacation-rule/home/home.component.ts index fb95a2a3..05615334 100644 --- a/Mohem/src/app/vacation-rule/home/home.component.ts +++ b/Mohem/src/app/vacation-rule/home/home.component.ts @@ -27,6 +27,8 @@ export class HomeComponent implements OnInit { RespondAttributeList: any; add:any='add'; button: ButtonInput; + direction = ''; + notBadge = ''; // dateTime: DateTimeInput; // date: DateInput; // numberInput: NumberInput;