From 64bcb0ef234457ec668dbefa467e1cb598dd395c Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 18 Jan 2023 18:02:39 +0300 Subject: [PATCH] fixed OPM AND OLM --- .../service/work-list.main.service.ts | 16 + .../worklist-main.component.html | 424 ++++++++++++++++++ .../worklist-main/worklist-main.component.ts | 26 +- Mohem/src/assets/localization/i18n.json | 104 +++++ 4 files changed, 567 insertions(+), 3 deletions(-) diff --git a/Mohem/src/app/notification/service/work-list.main.service.ts b/Mohem/src/app/notification/service/work-list.main.service.ts index f84afc2f..1fb96de3 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -28,6 +28,7 @@ import { UserItemTypes } from "../models/userItemTypeRequest"; export class WorklistMainService { public static getEITNotificationBody = "Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY"; public static getOPMNotificationBody = "Services/ERP.svc/REST/GET_OPM_NOTIFICATION_BODY"; + public static getOLMNotificationBody = "Services/ERP.svc/REST/GET_OLM_NOTIFICATION_BODY"; public static getAbsenceNotificationBody = "Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY"; public static getPoNotificationBody = "Services/ERP.svc/REST/GET_PO_NOTIFICATION_BODY"; public static getMONotificationBody = "Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY"; @@ -94,6 +95,21 @@ export class WorklistMainService { ); } + public getOLMNotification( + WorkListBodyRequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = WorkListBodyRequest; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistMainService.getOLMNotificationBody, + request, + onError, + errorLabel + ); + } + public getAbsencesNotificationBody( WorkListBodyRequest: any, onError?: any, 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 c17b6aec..7c7a888a 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -52,6 +52,8 @@ getPassNotificationDetails?.REQUEST_TYPE != 'CONTACT' && getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' && getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION' && + getPassNotificationDetails?.REQUEST_TYPE != 'OPM' && + getPassNotificationDetails?.REQUEST_TYPE != 'OLM' && getPassNotificationDetails?.REQUEST_TYPE != 'CEI'">
@@ -301,6 +303,8 @@ getPassNotificationDetails?.REQUEST_TYPE == 'CONTACT' && getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' && getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION' && + getPassNotificationDetails?.REQUEST_TYPE != 'OPM' && + getPassNotificationDetails?.REQUEST_TYPE != 'OLM' && getPassNotificationDetails?.REQUEST_TYPE != 'CEI'">

{{'worklist, loading'| translate}}

{{'worklist, loading'| translate}}

{{'worklist, loading'| translate}}

{{'worklist, loading'| translate}}

+ + + +
+

{{'worklist, loading'| translate}}

+
+ +
+

{{ 'general, empty' | translate}}

+
+
+
+ +

{{'worklist, enrollmentDetails' | translate}}

+ + + + + + +

{{ 'worklist, courseName' | translate}}

+
+
+ + +

{{item.COURSE_NAME}}

+
+
+
+ + + + +

{{ 'worklist, startDate' | translate}}

+
+
+ + +

{{item.START_DATE}}

+
+
+
+ + + + +

{{ 'worklist, timeZone' | translate}}

+
+
+ + +

{{item.TIMEZONE}}

+
+
+
+ + + + +

{{ 'worklist, trainingCenter' | translate}}

+
+
+ + +

{{item.TRAINING_CENTER}}

+
+
+
+ + + + +

{{ 'worklist, enrollmentJustification' | translate}}

+
+
+ + +

{{item.ENROLLMENT_JUSTIFICATION}}

+
+
+
+
+
+ + + + + + + +

{{ 'worklist, className' | translate}}

+
+
+ + +

{{item.CLASS_NAME}}

+
+
+
+ + + + +

{{ 'worklist, endDate' | translate}}

+
+
+ + +

{{item.END_DATE}}

+
+
+
+ + + + +

{{ 'worklist, deliveryMode' | translate}}

+
+
+ + +

{{item.DELIVERY_MODE}}

+
+
+
+ + + + +

{{ 'worklist, language' | translate}}

+
+
+ + +

{{item.LANGUAGE}}

+
+
+
+ + + + +

{{ 'worklist, Note' | translate}}

+
+
+ + +

{{item.NOTE}}

+
+
+
+
+
+
+
+
+ + + +
+

{{'worklist, loading'| translate}}

+
+ +
+

{{ 'general, empty' | translate}}

+
+ + +
+

{{'worklist, overallRating' | translate}}

+
+ + + + + +

{{ 'worklist, rateName' | translate}}

+
+
+ + +

{{item.RATE_NAME}}

+
+
+
+ + + +

{{ 'worklist, overalLPerformanceID' | translate}}

+
+
+ + +

{{item.OVERALL_PERFORMANCE_LEVEL_ID}}

+
+
+
+ + + +

{{ 'worklist, overallRating' | translate}}

+
+
+ + +

{{item.OVERALL_RATING}}

+
+
+
+ + + +

{{ 'worklist, comments' | translate}}

+
+
+ + +

{{item.COMMENTS}}

+
+
+
+
+
+
+
+ + +
+

{{'worklist, objectiveRating' | translate}}

+
+ + + + + +

{{ 'worklist, objectiveName' | translate}}

+
+
+ + +

{{item.OBJECTIVE_NAME}}

+
+
+
+ + + +

{{ 'worklist, weightingPercent' | translate}}

+
+
+ + +

{{item.WEIGHTING_PERCENT}}

+
+
+
+ + + +

{{ 'worklist, targetValue' | translate}}

+
+
+ + +

{{item.TARGET_VALUE}}

+
+
+
+ + + +

{{ 'worklist, actualVALUE' | translate}}

+
+
+ + +

{{item.ACTUAL_VALUE}}

+
+
+
+ + + + +

{{ 'worklist, appraisedPerformance' | translate}}

+
+
+ + +

{{item.APPRAISED_PERFORMANCE}}

+
+
+
+ + + + +

{{ 'worklist, appraisedPerformanceDesc' | translate}}

+
+
+ + +

{{item.APPRAISED_PERFORMANCE_DESC}}

+
+
+
+ +
+
+
+
+ + +
+

{{'worklist, competenciesRating' | translate}}

+
+ + + + + +

{{ 'worklist, competencyName' | translate}}

+
+
+ + +

{{item.COMPETENCY_NAME}}

+
+
+
+ + + +

{{ 'worklist, targetValue' | translate}}

+
+
+ + +

{{item.TARGET_VALUE}}

+
+
+
+ + + +

{{ 'worklist, weightingPercent' | translate}}

+
+
+ + +

{{item.WEIGHTING_PERCENT}}

+
+
+
+ + + +

{{ 'worklist, actualVALUE' | translate}}

+
+
+ + +

{{item.ACTUAL_VALUE}}

+
+
+
+ + + + +

{{ 'worklist, appraisedPerformance' | translate}}

+
+
+ + +

{{item.APPRAISED_PERFORMANCE}}

+
+
+
+ + + + +

{{ 'worklist, appraisedPerformanceDesc' | translate}}

+
+
+ + +

{{item.APPRAISED_PERFORMANCE_DESC}}

+
+
+
+
+
+
+
+
+ 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 9226d383..ebfdf160 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -300,10 +300,11 @@ export class WorklistMainComponent implements OnInit { this.getContactNotificationDetails(this.WorkListBodyObj); } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'CEI') { this.getCEINotification(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'OPM') { + this.getOPMNotification(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'OLM') { + this.getOLMNotification(this.WorkListBodyObj); } - // else if (this.getPassNotificationDetails.REQUEST_TYPE === 'OPM') { - // this.getOPMNotification(this.WorkListBodyObj); - // } } getStampMSNotification(notificationBodyObj) { @@ -409,6 +410,15 @@ export class WorklistMainComponent implements OnInit { }); } + getOLMNotification(notificationBodyObj) { + this.notificationBodyRes = [] + this.worklistMainService + .getOLMNotification(notificationBodyObj) + .subscribe((result: EITNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "OLM"); + }); + } + getAbsenceNotificationDetails(notificationBodyObj) { this.notificationBodyRes = []; this.worklistMainService @@ -505,6 +515,16 @@ export class WorklistMainComponent implements OnInit { console.log(result); } } + else if (Type === "OPM") { + if (result.OPM_Notification_Body) { + this.notificationBodyRes = result.OPM_Notification_Body; + } + } + else if (Type === "OLM") { + if (result.OLM_Notification_Body) { + this.notificationBodyRes = result.OLM_Notification_Body.P_ENROLLMENT_DETAILS_LIST; + } + } } } //End handleWorkListBodyResult diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 0afb61c6..952bf514 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2487,6 +2487,110 @@ } }, "worklist": { + "competencies": { + "en": "Competencies", + "ar": "الكفاءات" + }, + "information": { + "en": "Information", + "ar": "معلومات" + }, + "competenciesRating": { + "en": "Competencies Rating", + "ar": "الجدارات" + }, + "appraisedPerformance": { + "en": "Appraisal Performance", + "ar": "أداء التقييم" + }, + "competencyName": { + "en": "Competency Name", + "ar": "الجدارة" + }, + "targetValue": { + "en": "Target Value", + "ar": "القيمة المستهدف تحققيقها" + }, + "objectiveRating": { + "en": "Objective Rating", + "ar": "الأهداف" + }, + "overallRating": { + "en": "Overall Rating", + "ar": "التقييم العام و الملاحظات" + }, + "overalLPerformanceID": { + "en": "Overall Performance ID", + "ar": "رقم الأداء العام" + }, + "objectiveName": { + "en": "Objective Name", + "ar": "اسم الهدف" + }, + "enrollmentDetails": { + "en": "Enrollment Details", + "ar": "تفاصيل التسجيل" + }, + "courseName": { + "en": "Course Name", + "ar": "اسم البرنامج التدريبي" + }, + "className": { + "en": "Class Name", + "ar": "اسم الفصل الدراسي" + }, + "timeZone": { + "en": "Timezone", + "ar": "منطقة التوقيت" + }, + "trainingCenter": { + "en": "Training Center", + "ar": "مركز التدريب" + }, + "enrollmentJustification": { + "en": "Enrollment Justification", + "ar": "تبرير التسجيل" + }, + "deliveryMode": { + "en": "Delivery Mode", + "ar": "طريقة التقديم" + }, + "language": { + "en": "Language", + "ar": "اللغة" + }, + "Note": { + "en": "Note", + "ar": "ملاحظات" + }, + "actualVALUE": { + "en": "Actual Value", + "ar": "القيمة المحققة" + }, + "weightingPercent": { + "en": "Weighting Percentage", + "ar": "الوزن النسبي" + }, + "appraisedPerformanceDesc": { + "en": "Appraisal Performance Description", + "ar": "وصف تقييم الأداء" + }, + "rateName": { + "en": "Rate Name", + "ar": "اسم التقييم" + }, + "comments": { + "en": "Comments", + "ar": "تعليقات" + }, + "startDate": { + "en": "Start Date", + "ar": "تاريخ البداية" + }, + "endDate": { + "en": "End Date", + "ar": "تاريخ الانتهاء" + }, "view": { "en": "View", "ar": "عرض"