From b30bfa9a0b212b7abac0ec7820fc64dfc079f521 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Mon, 3 Jan 2022 14:36:43 +0300 Subject: [PATCH 1/3] q3 fixes --- Mohem/src/app/app.component.html | 6 +- Mohem/src/app/eit/home/home.component.ts | 2 +- Mohem/src/app/hmg-common/hmg-common.module.ts | 27 +- .../services/common/common.service.ts | 18 + Mohem/src/app/home/home.page.ts | 2 +- .../app/itemforsale/home/home.component.html | 210 +++---- .../app/itemforsale/home/home.component.scss | 45 +- .../app/itemforsale/home/home.component.ts | 220 ++++++- .../item-details/item-details.component.html | 6 +- .../item-details/item-details.component.ts | 17 +- .../itemforsale/items/items.component.html | 22 +- .../itemforsale/items/items.component.scss | 6 + .../app/itemforsale/items/items.component.ts | 48 +- .../itemforsale/services/service.service.ts | 42 +- .../home/home.component.scss | 1 + .../add-update-contact.component.html | 11 +- .../add-update-contact.component.scss | 52 ++ .../add-update-contact.component.ts | 410 ++++++++++-- .../confirm-contact.component.html | 128 ++++ .../confirm-contact.component.scss | 263 ++++++++ .../confirm-contact.component.spec.ts | 27 + .../confirm-contact.component.ts | 435 +++++++++++++ .../src/app/profile/home/home.component.html | 2 +- Mohem/src/app/profile/home/home.component.ts | 45 +- .../src/app/profile/models/contact.request.ts | 2 +- Mohem/src/app/profile/profile.module.ts | 10 +- .../app/profile/service/profile.service.ts | 9 + .../concurrent-report.component.html | 1 + .../concurrent-report.component.scss | 8 + .../concurrent-report.component.ts | 43 +- .../src/app/reports/report-service.service.ts | 29 +- Mohem/src/app/reports/reports.module.ts | 8 +- .../transaction-list.component.html | 48 ++ .../transaction-list.component.scss | 138 +++++ .../transaction-list.component.spec.ts | 27 + .../transaction-list.component.ts | 55 ++ .../confirm-termination.component.html | 123 ++++ .../confirm-termination.component.scss | 263 ++++++++ .../confirm-termination.component.spec.ts | 27 + .../confirm-termination.component.ts | 430 +++++++++++++ .../service/termination-service.service.ts | 25 +- .../termination-form.component.html | 1 + .../termination-form.component.scss | 3 + .../termination-form.component.ts | 583 +++++++++++++++--- .../src/app/termination/termination.module.ts | 11 +- Mohem/src/assets/imgs/hr-request.png | Bin 0 -> 10488 bytes Mohem/src/assets/imgs/my-request.png | Bin 0 -> 4055 bytes Mohem/src/assets/imgs/pending-transaction.png | Bin 0 -> 11004 bytes Mohem/src/assets/localization/i18n.json | 64 ++ Mohem/src/theme/styles.scss | 5 + 50 files changed, 3637 insertions(+), 321 deletions(-) create mode 100644 Mohem/src/app/profile/confirm-contact/confirm-contact.component.html create mode 100644 Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss create mode 100644 Mohem/src/app/profile/confirm-contact/confirm-contact.component.spec.ts create mode 100644 Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts create mode 100644 Mohem/src/app/reports/transaction-list/transaction-list.component.html create mode 100644 Mohem/src/app/reports/transaction-list/transaction-list.component.scss create mode 100644 Mohem/src/app/reports/transaction-list/transaction-list.component.spec.ts create mode 100644 Mohem/src/app/reports/transaction-list/transaction-list.component.ts create mode 100644 Mohem/src/app/termination/confirm-termination/confirm-termination.component.html create mode 100644 Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss create mode 100644 Mohem/src/app/termination/confirm-termination/confirm-termination.component.spec.ts create mode 100644 Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts create mode 100644 Mohem/src/assets/imgs/hr-request.png create mode 100644 Mohem/src/assets/imgs/my-request.png create mode 100644 Mohem/src/assets/imgs/pending-transaction.png diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 78c03ae2..47c87d50 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -47,7 +47,7 @@ - + {{ts.trPK('userProfile','HR-Request')}} @@ -57,7 +57,7 @@ - + {{menu.MENU_NAME}} @@ -67,7 +67,7 @@ - + {{ts.trPK('general','pending-transaction')}} diff --git a/Mohem/src/app/eit/home/home.component.ts b/Mohem/src/app/eit/home/home.component.ts index d145686f..05bd9d7d 100644 --- a/Mohem/src/app/eit/home/home.component.ts +++ b/Mohem/src/app/eit/home/home.component.ts @@ -46,7 +46,7 @@ export class HomeComponent implements OnInit { this.selectedMenu = index; } } - if (page['FUNCTION_NAME'] == 'HR_TERM_EMP_SS') { + if (page['FUNCTION_NAME'] == 'HR_TERM_SS') { this.cs.sharedService.setSharedData(page, TerminationServiceService.TERMINATION_PAGE); this.cs.openTermination(); diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 447e5d00..d0b4fd8d 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -85,26 +85,26 @@ import { ReplacementListComponent } from '../vacation-rule/replacement-list/repl import { FileUploadModule } from 'ng2-file-upload'; import { PdfViewerModule } from 'ng2-pdf-viewer'; import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component'; -import {Camera} from '@ionic-native/Camera/ngx'; -import {File} from '@ionic-native/file/ngx'; -import {FileUploderProfileComponent} from './ui/file-uploder-profile/file-uploder-profile.component'; +import { Camera } from '@ionic-native/Camera/ngx'; +import { File } from '@ionic-native/file/ngx'; +import { FileUploderProfileComponent } from './ui/file-uploder-profile/file-uploder-profile.component'; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { AccordinCustomComponent } from './ui/accordin-custom/accordin-custom.component'; -import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component' -import {DashboredService} from './services/dashbored/dashbored.service'; -import {NgxGaugeModule} from 'ngx-gauge'; +import { AccordinTabCustomComponent } from './ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component' +import { DashboredService } from './services/dashbored/dashbored.service'; +import { NgxGaugeModule } from 'ngx-gauge'; import { StatsButtonComponent } from './ui/stats-button/stats-button.component'; import { ServicesButtonComponent } from './ui/services-button/services-button.component'; -import {ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component' -import {WelcomeComponent} from './ui/welcome-login/welcome.component' -import {FabButtonComponent} from './ui/fab-button/fab-button.component' +import { ConfirmLoginComponent } from '../authentication/confirm-login/confirm-login.component' +import { WelcomeComponent } from './ui/welcome-login/welcome.component' +import { FabButtonComponent } from './ui/fab-button/fab-button.component' import { AttendScanService } from './services/attend-services/attend-scan.service'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; import { NgCircleProgressModule } from 'ng-circle-progress'; import { CardFilterComponent } from './ui/card-filter/card-filter.component'; import { EmployeeInformationComponent } from './ui/employee-information/employee-information.component'; import { CircleCalendarComponent } from './ui/circle-calendar/circle-calendar.component'; -import { NgCalendarModule } from 'ionic2-calendar'; +import { NgCalendarModule } from 'ionic2-calendar'; import { DateInfoModalComponent } from './ui/circle-calendar/date-info-modal/date-info-modal.component'; import { ChartModule } from 'primeng/chart'; import { GenericHeaderComponent } from './ui/generic-header/generic-header.component'; @@ -112,6 +112,7 @@ import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx' import { AttendanceOptionsComponent } from '../home/attendance-options/attendance-options.component'; import { CardCalendarComponent } from './ui/card-calendar/card-calendar.component'; import { WorklistSettingComponent } from '../notification/worklist-setting/worklist-setting.component'; +import { SubmitAddressModalComponent } from '../profile/submit-eit-modal/submit-address-modal.component'; @NgModule({ imports: [ @@ -196,7 +197,8 @@ import { WorklistSettingComponent } from '../notification/worklist-setting/workl GenericHeaderComponent, AttendanceOptionsComponent, CardCalendarComponent, - WorklistSettingComponent + WorklistSettingComponent, + SubmitAddressModalComponent ], exports: [ FabButtonComponent, @@ -267,7 +269,8 @@ import { WorklistSettingComponent } from '../notification/worklist-setting/workl Modal, GenericHeaderComponent, AttendanceOptionsComponent, - CardCalendarComponent + CardCalendarComponent, + SubmitAddressModalComponent ], providers: [ AttendScanService, diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 738456eb..899f60e9 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1299,6 +1299,9 @@ export class CommonService { public openAddUpdateContact() { this.nav.navigateForward(['/profile/add-update-contact']); } + public confirmContact() { + this.nav.navigateForward(['/profile/confirm-contact']); + } public openConfirmAddAddress() { this.nav.navigateForward(['/profile/confirm-add-address']); @@ -1316,14 +1319,29 @@ export class CommonService { this.nav.navigateForward(['/reports/concurrent-report']); } + public openConcurrentTransaction() { + + this.nav.navigateForward(['/reports/transaction-list']); + } public openTermination() { this.nav.navigateForward(['/termination/termination-form']); } + public confirmTermination() { + + this.nav.navigateForward(['/termination/confirm-termination']); + } public openTransactions() { this.nav.navigateForward(['/pending-transaction/home']); } + + public openItemForSale() { + this.nav.navigateForward('/itemforsale/items'); + } + public openCreateitems() { + this.nav.navigateForward('/itemforsale/home'); + } public navigatePage(path) { this.nav.navigateForward([path]); } diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index b1a09ba3..f75eadf0 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -803,7 +803,7 @@ export class HomePage implements OnInit { itemForSale() { - this.common.navigateForward('/itemforsale/items'); + this.common.openItemForSale(); } offersDiscount() { this.common.navigateForward('/offersdiscount/home'); diff --git a/Mohem/src/app/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html index 4086bfe6..0a8a604c 100644 --- a/Mohem/src/app/itemforsale/home/home.component.html +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -53,85 +53,34 @@
-

What are you offering?

+

{{ts.trPK('itemforsale','offering')}}

- -
+ +
- +
-

Mobile & Tablets

+

{{category.title}}

+

{{category.title_Ar}}

- - -
-
- -
-
-

Cars & Vehicles

-
-
-
- -
-
- -
-
-

Electronic Applicance

-
-
+ - - - -
-
- -
-
-

Furniture & Home Decor

-
-
-
- -
-
- -
-
-

Fashion & beauty

-
-
-
- -
-
- -
-
-

Books, Sports & Hobbies

-
-
-
-
- +
-

Add Details

+

{{ts.trPK('itemforsale','add-details')}}

-

Item Info

+

{{ts.trPK('itemforsale','item-info')}}

- +
@@ -142,77 +91,78 @@ - + -

Item Condition

- - - - +

{{ts.trPK('itemforsale','item-condition')}}

+ - New + {{ts.trPK('itemforsale','new')}} - Used + {{ts.trPK('itemforsale','used')}}
- + + +

{{ts.trPK('itemforsale','region')}}

+ + {{region.regionName}} + + +
+
-

Item Price

+

{{ts.trPK('itemforsale','item-price')}}

- +
-

Item Photos

+

{{ts.trPK('itemforsale','item-photos')}}

- - -
-
-
X
- -
- -
-
- -
-
-
X
- +
+
+ +
- -
- - -
-
- - -
- + + + + + + +
+
+
X
+ +
+ +
+
+ +
+
+
+
-
- - - - +
@@ -222,25 +172,48 @@
-

Furniture Table

+

+ {{selectedCategory.title_Ar}} +

+

+ {{selectedCategory.title}} +

+ - +

{{itemInfo}}

- Consectetur adipiscing elit. Donec blandit diam nulla, non euismod eros efficitur imperdiet. Fusce erat enim, volutpat at enim in, venenatis iaculis risus. + {{itemDescription}}

-

Used

+

{{itemCondition}}

- - + + + + + + +
+
+ + +
+ +
+
+ +
+
+
+
- Selling for

500 SAR

+ {{ts.trPK('itemforsale','selling-for')}}

{{itemPrice}} SAR

- +
@@ -251,7 +224,7 @@
- cancel + {{ts.trPK('general','cancel')}}
@@ -260,13 +233,16 @@
- - cancel + + {{ts.trPK('general','cancel')}} {{ts.trPK('general','next')}} - - Confirm + + {{ts.trPK('general','confirm')}} + + {{ts.trPK('general','update')}} +
diff --git a/Mohem/src/app/itemforsale/home/home.component.scss b/Mohem/src/app/itemforsale/home/home.component.scss index da69d29b..f01790d6 100644 --- a/Mohem/src/app/itemforsale/home/home.component.scss +++ b/Mohem/src/app/itemforsale/home/home.component.scss @@ -214,7 +214,7 @@ margin-bottom: 70px; background: #fff; margin: 15px; padding: 10px; - box-shadow: 3px 4px 3px -1px #ccc; + box-shadow: 0px 0px 2px 1px #ccc; border-radius: 20px; } .add-details ion-item{ @@ -246,7 +246,7 @@ position: relative; right: 0; font-size: 14px; color: #fff; - top: -15px; + top: -10px; right: -10px; font-weight: bolder; background: red; @@ -341,3 +341,44 @@ ion-footer{ position: absolute; top: 15px; } +.upload-container{ + display: inline-block; +} +@media screen and (min-width: 325px){ + .fileUpload { + position: relative; + overflow: hidden; + margin: 10px; + + }} + @media screen and (min-width: 1px) and (max-width:320px){ + .fileUpload { + position: relative; + overflow: hidden; + margin: 10px; + + + }} + + .fileUpload input.upload { + position: absolute; + top: 0; + right: 0; + margin: 0; + padding: 0; + font-size: 20px; + cursor: pointer; + opacity: 0; + filter: alpha(opacity=0); + } + + .iconButton .imgSize{ + width: 10px !important; + height: 10px; + } +.close-btn{ + color: red; + font-size: 22px; + position: relative; + top: 5px; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts index 7ddeddbe..250c5f71 100644 --- a/Mohem/src/app/itemforsale/home/home.component.ts +++ b/Mohem/src/app/itemforsale/home/home.component.ts @@ -1,4 +1,7 @@ import { Component, OnInit } from '@angular/core'; +import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; +import { FileUploader } from 'ng2-file-upload'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { ItemForSaleService } from '../services/service.service'; @@ -10,22 +13,227 @@ import { ItemForSaleService } from '../services/service.service'; }) export class HomeComponent implements OnInit { step: any = 1; - constructor(public ts: TranslatorService, public cs: CommonService, private itemService: ItemForSaleService) { } + categories: any = []; + direction: string; + uploaded: any = []; + public selectedFile: any; + indexLastObj: any; + addAttachRequest: any = []; + selectedCategory: any; + filterAllowedType: any = [ + "image/jpeg", + "image/png", + "image/jpg", + ]; + itemInfo: string; + itemDescription: string; + itemCondition: string; + itemPrice: any; + regions: any = []; + regionID: any = 1; + editItem: any; + constructor(public ts: TranslatorService, private authService: AuthenticationService, private sanitizer: DomSanitizer, public cs: CommonService, private itemService: ItemForSaleService) { } ngOnInit() { - - + this.direction = TranslatorService.getCurrentDirection(); + this.categories = this.cs.sharedService.getSharedData(ItemForSaleService.CATEGORIES, false); + this.getRegion(); + this.editItem = this.cs.sharedService.getSharedData(ItemForSaleService.EDIT_ITEMS); + if (this.editItem) { + this.setEditPage(); + } + } + getRegion() { + this.itemService.getRegion({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.regions = this.itemService.parser(result); + console.log(this.regions); + }) } openItem() { - - this.cs.navigateForward('/itemforsale/items'); } - nextStep() { + nextStep(category) { + this.selectedCategory = category; this.step = 2; } openMyAds() { this.cs.navigateForward('/itemforsale/my-ads'); } + onFileSelectedclick(event) { + event.target.value = ''; + } + public uploader: FileUploader = new FileUploader({ + allowedMimeType: [ + "image/jpeg", + "image/png", + "image/jpg", + ], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async item => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + + + + onFileSelected(input) { + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "notSupportFile"); + this.cs.presentAlert(msg); + return; + } // todo: show alert that you tried uploading wrong files + else { + const file = input.target.files[0]; + this.selectedFile = input.target.files; + + + this.getBase64(file).then(data => + this.pushObject(data, file.name, file.type) + ); + } + } + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + pushObject(fileData, name, type) { + + this.indexLastObj++; + try { + let array = name.split("."); + let attachType: string = array[array.length - 1]; + + this.addAttachRequest.push({ + AttachmentID: this.indexLastObj, + P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1], + P_FILE_DATA: fileData.split(",")[1], + P_FILE_NAME: name, //.split('.')[0], + + }); + } catch (e) { } + } + + removeFile(objectitem) { + let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem); + this.uploader.queue.splice(objIndex1, 1); + let objIndex = this.addAttachRequest.findIndex( + item => item.AttachmentID == objectitem.AttachmentID + ); + this.addAttachRequest.splice(objIndex, 1); + } + getImgContent(imgFile): SafeUrl { + return this.sanitizer.bypassSecurityTrustUrl(imgFile); + } + + createItemForSale() { + + var authUser = this.authService.getAuthenticatedRequest(); + this.cs.startLoading(); + var request = new FormData(); + request.append('title', this.itemInfo); + request.append('title_Ar', this.itemInfo); + request.append('categoryID', this.selectedCategory.categoryID); + request.append('description', this.itemDescription); + request.append('description_Ar', this.itemDescription); + request.append('employeeNumber', authUser.P_USER_NAME); + request.append('quotePrice', this.itemPrice); + request.append('isActive', 'true'); + request.append('regionID', this.regionID); + request.append('status', this.itemCondition); + console.log(this.selectedFile); + if (this.selectedFile && this.selectedFile !== undefined) { + request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name); + } + request.append('Channel', authUser.Channel.toString()); + request.append('LogInToken', authUser.LogInTokenID); + request.append('Token', authUser.TokenID); + request.append('EmployeeNumber', authUser.P_USER_NAME); + request.append('MobileNo', authUser.MobileNumber); + + + this.itemService.createItemForSale(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => { + if (this.cs.validResponse(result)) { + this.cs.stopLoading(); + + this.cs.greenToastPK("general", "success-create"); + this.openItem(); + } else { + this.cs.stopLoading(); + this.cs.redToastPK("general", "try-again"); + } + + + }) + } + setEditPage() { + this.step = 2; + this.selectedCategory = { + categoryID: this.editItem.categoryID, + title: this.editItem.categoryTitle, + title_Ar: this.editItem.categoryTitle + } + this.itemInfo = this.editItem.title; + this.itemDescription = this.editItem.description; + this.itemPrice = this.editItem.quotePrice; + this.regionID = this.editItem.regionID; + this.itemCondition = this.editItem.status.toLowerCase(); + } + updateItemForSale() { + + var authUser = this.authService.getAuthenticatedRequest(); + this.cs.startLoading(); + var request = new FormData(); + request.append('itmeSaleID', this.editItem.itemSaleID); + request.append('title', this.itemInfo); + request.append('title_Ar', this.itemInfo); + request.append('categoryID', this.selectedCategory.categoryID); + request.append('description', this.itemDescription); + request.append('description_Ar', this.itemDescription); + request.append('employeeNumber', authUser.P_USER_NAME); + request.append('quotePrice', this.itemPrice); + request.append('isActive', 'true'); + request.append('regionID', this.regionID); + request.append('status', this.itemCondition); + console.log(this.selectedFile); + if (this.selectedFile && this.selectedFile !== undefined) { + request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name); + } + request.append('Channel', authUser.Channel.toString()); + request.append('LogInToken', authUser.LogInTokenID); + request.append('Token', authUser.TokenID); + request.append('EmployeeNumber', authUser.P_USER_NAME); + request.append('MobileNo', authUser.MobileNumber); + + + this.itemService.updateItemForSale(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => { + if (this.cs.validResponse(result)) { + this.cs.stopLoading(); + + this.cs.greenToastPK("general", "success-create"); + this.openItem(); + } else { + this.cs.stopLoading(); + this.cs.redToastPK("general", "try-again"); + } + + + }) + } } diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.html b/Mohem/src/app/itemforsale/item-details/item-details.component.html index 1618761d..016dbdb3 100644 --- a/Mohem/src/app/itemforsale/item-details/item-details.component.html +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.html @@ -1,4 +1,4 @@ - +
-
+
+ diff --git a/Mohem/src/app/itemforsale/items/items.component.scss b/Mohem/src/app/itemforsale/items/items.component.scss index d83c0aa4..f98ef940 100644 --- a/Mohem/src/app/itemforsale/items/items.component.scss +++ b/Mohem/src/app/itemforsale/items/items.component.scss @@ -7,6 +7,12 @@ background: #259CB8; top: 0; } +.no-dataDiv{ + position: absolute; + left: 0; + right: 0; + margin: auto; +} .header-toolbar{ --background: #259CB8 !important; } diff --git a/Mohem/src/app/itemforsale/items/items.component.ts b/Mohem/src/app/itemforsale/items/items.component.ts index b077547c..43ccf0e9 100644 --- a/Mohem/src/app/itemforsale/items/items.component.ts +++ b/Mohem/src/app/itemforsale/items/items.component.ts @@ -5,6 +5,7 @@ import { ItemForSaleService } from '../services/service.service'; import { deepCopy } from '@angular-devkit/core/src/utils/object'; import * as moment from 'moment'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; +import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'app-items', @@ -13,29 +14,41 @@ import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; }) export class ItemsComponent implements OnInit { segment: any = '1'; - items: any = []; + items: any; categories: any = []; direction: string; activeClass: any; pageNo: number = 1; tempSearch: any = []; itemsByEmployee: any = []; - constructor(public ts: TranslatorService, private sanitizer: DomSanitizer, public cs: CommonService, private itemService: ItemForSaleService) { } + constructor(public ts: TranslatorService, public route: ActivatedRoute, private sanitizer: DomSanitizer, public cs: CommonService, private itemService: ItemForSaleService) { + this.route + .params.subscribe(val => { + setTimeout(() => { + this.cs.startLoading(); + this.getItemsCategories(); + this.getItemsByEmployee(); + }, 100); + }); + + } ngOnInit() { this.direction = TranslatorService.getCurrentDirection(); - this.getItemsCategories(); - this.getItemsByEmployee(); + } getItemsCategories() { + this.itemService.getCategories({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { this.categories = this.itemService.parser(result); - console.log(this.categories); + this.cs.sharedService.setSharedData(this.categories, ItemForSaleService.CATEGORIES); }) this.itemService.getItems({ pageNo: this.pageNo }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.items = []; this.items = this.itemService.parser(result); this.tempSearch = deepCopy(this.items); + this.cs.stopLoading(); }) } openDetails(selected) { @@ -46,12 +59,17 @@ export class ItemsComponent implements OnInit { this.segment = value.detail.value; } openSale() { - this.cs.navigateForward('/itemforsale/home'); + this.cs.openCreateitems(); } selectCategory(item) { - - this.activeClass = item.categoryID - + this.cs.startLoading(); + this.activeClass = item.categoryID; + this.itemService.getItems({ pageNo: this.pageNo, ItgCategoryID: item.categoryID }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.items = []; + this.items = this.itemService.parser(result); + this.tempSearch = deepCopy(this.items); + this.cs.stopLoading(); + }) } getDotted(temp: string, valueCount: number) { temp = this.stripHtml(temp); @@ -66,7 +84,7 @@ export class ItemsComponent implements OnInit { } loadData(event) { this.pageNo = this.pageNo + 1; - this.itemService.getItems({ pageNo: this.pageNo }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.itemService.getItems({ pageNo: this.pageNo, categoryID: this.activeClass }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { this.items.concat(this.itemService.parser(result)); this.tempSearch = deepCopy(this.items); event.target.complete(); @@ -88,12 +106,15 @@ export class ItemsComponent implements OnInit { } getItemsByEmployee() { - + this.cs.startLoading(); this.itemService.getItemsByEmployee({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { this.itemsByEmployee = this.itemService.parser(result); + + this.cs.stopLoading(); console.log(this.itemsByEmployee); }) } + getDate(date) { return moment(date, "YYYY-MM-DD HH:mm:ss").format("DD-MMM-YYYY"); } @@ -101,4 +122,9 @@ export class ItemsComponent implements OnInit { getImgContent(imgFile): SafeUrl { return this.sanitizer.bypassSecurityTrustUrl(imgFile); } + editItems(items) { + this.cs.sharedService.setSharedData(items, ItemForSaleService.EDIT_ITEMS); + this.cs.openCreateitems(); + } + } diff --git a/Mohem/src/app/itemforsale/services/service.service.ts b/Mohem/src/app/itemforsale/services/service.service.ts index 14b246c1..54339928 100644 --- a/Mohem/src/app/itemforsale/services/service.service.ts +++ b/Mohem/src/app/itemforsale/services/service.service.ts @@ -1,6 +1,8 @@ +import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; +import { MowadhafiService } from 'src/app/mowadhafi/mowadhafi.service'; @Injectable({ providedIn: 'root' @@ -9,11 +11,16 @@ export class ItemForSaleService { public static getItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSale'; public static getItemForSaleByEmployee = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemForSaleByEmployee'; public static getCategories = 'Services/COCWS.svc/REST/Mohemm_ITG_GetItemSaleCategory'; + public static createItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_AddItemForSale'; + public static updateItemForSale = 'Services/COCWS.svc/REST/Mohemm_ITG_UpdateItemForSale'; + public static getRegion = 'Services/COCWS.svc/REST/Mohemm_ITG_GetRegion'; public static ITEMS_SELECTED = 'item-selected'; - + public static CATEGORIES = 'categories'; + public static EDIT_ITEMS = 'edit-items'; constructor( public con: ConnectorService, - private authService: AuthenticationService + private authService: AuthenticationService, + private http: HttpClient ) { } public getItems(request: any, onError?: any, errorLabel?: string) { this.authService.authenticateRequest(request); @@ -21,14 +28,14 @@ export class ItemForSaleService { request.ItgPageNo = request.pageNo; request.ItgPageSize = 10; request.ItgStatus = "Approved"; - return this.con.post(ItemForSaleService.getItemForSale, request, onError, errorLabel); + return this.con.postNoLoad(ItemForSaleService.getItemForSale, request, onError, errorLabel); } public getCategories(request: any, onError?: any, errorLabel?: string) { this.authService.authenticateRequest(request); request.EmployeeNumber = request.UserName; - return this.con.post(ItemForSaleService.getCategories, request, onError, errorLabel); + return this.con.postNoLoad(ItemForSaleService.getCategories, request, onError, errorLabel); } parser(response: any) { try { @@ -45,7 +52,32 @@ export class ItemForSaleService { getItemsByEmployee(request: any, onError?: any, errorLabel?: string) { this.authService.authenticateRequest(request); request.EmployeeNumber = request.UserName; - request.ItgEmployeeNumber = 111209; + request.ItgEmployeeNumber = request.UserName; //request.UserName; return this.con.post(ItemForSaleService.getItemForSaleByEmployee, request, onError, errorLabel); } + getRegion(request: any, onError?: any, errorLabel?: string) { + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.UserName; + request.ItgEmployeeNumber = request.UserName; //request.UserName; + return this.con.post(ItemForSaleService.getRegion, request, onError, errorLabel); + } + + createItemForSale(itemRequest: any, onError?: any, errorLabel?: string) { + const request = itemRequest; + this.authService.authenticateRequest(request); + request.employeeNumber = request.P_USER_NAME; + return this.http.post(ConnectorService.host + ItemForSaleService.createItemForSale, itemRequest, { + + } + ) + } + updateItemForSale(itemRequest: any, onError?: any, errorLabel?: string) { + const request = itemRequest; + this.authService.authenticateRequest(request); + request.employeeNumber = request.P_USER_NAME; + return this.http.post(ConnectorService.host + ItemForSaleService.updateItemForSale, itemRequest, { + + } + ) + } } diff --git a/Mohem/src/app/pending-transaction/home/home.component.scss b/Mohem/src/app/pending-transaction/home/home.component.scss index f2672ac2..1f4f2512 100644 --- a/Mohem/src/app/pending-transaction/home/home.component.scss +++ b/Mohem/src/app/pending-transaction/home/home.component.scss @@ -24,6 +24,7 @@ right:0; width: 100px; color:#969696; + margin: -8px; } .transaction-list{ margin-top:20px; diff --git a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.html b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.html index 967ce56e..4a92fa86 100644 --- a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.html +++ b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.html @@ -14,14 +14,21 @@ class="dependent-title" Effective Date {{showEffectiveDate}} -
+
+ + {{ts.trPK('submitAbsence','endDate')}} + +
- + {{'vacation-rule, next-label' | translate}} +
\ No newline at end of file diff --git a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.scss b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.scss index e69de29b..764fe8af 100644 --- a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.scss +++ b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.scss @@ -0,0 +1,52 @@ +.date-container{ + margin:0px 20px; +} + +.label{ + font-size: 16px; + // margin-left: 15px; + color: #a2a5a6 !important; + display: block; + overflow: hidden; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + /* font-size: inherit; */ + // text-overflow: ellipsis; + // white-space: nowrap; + white-space: normal; + // padding-top: 10px; + padding: 5px 0px; + padding-left: 10px !important; + margin: 10px auto; + :root[dir="ltr"]{ + font-family: var(--fontFamilySemiBoldEN) !important; + } + :root[dir="rtl"]{ + font-family: var(--fontFamilyIOSAR) !important; + font-weight: bold; + } + + +} + +.Field-en{ + border-radius: 30px; + border: 1px solid #a2a5a6 !important; + margin-bottom: 0px; + padding-left: 20px !important; + padding-top: 0px !important; + color: #999999 !important; + height: 80px; +} + +.Field-ar{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 20px; + padding-right: 20px !important; + padding-top: 0px !important; + color: #999999 !important; + height:80px +} \ No newline at end of file diff --git a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts index ac441f89..6f4c6882 100644 --- a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts +++ b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts @@ -50,6 +50,7 @@ export class AddUpdateContactComponent implements OnInit { private buttonInput: ButtonInput; private hiddenInput: HiddenInput; private eitResponse: any; + private eitDffResponse: any; private eitColResponse: any; private eitVALSettoCall: any = []; @@ -75,7 +76,8 @@ export class AddUpdateContactComponent implements OnInit { public showEffectiveDate: string; public userUpdateData: any; public isDelete: boolean = false; - + public selctedContact: any; + public endDate: any; constructor( public modalController: ModalController, public cs: CommonService, @@ -92,9 +94,9 @@ export class AddUpdateContactComponent implements OnInit { var empDetails = this.cs.sharedService.getSharedData(ProfileService.EMP_CONTACT_DETAILS); this.employeeBasicDetails = empDetails ? empDetails : []; - - //this.employeeBasicDetails = this.cs.sharedService.getSharedData('employeeDetails', false); - + var isDelete = this.cs.sharedService.getSharedData(ProfileService.REMOVE_CONTACT); + this.isDelete = isDelete ? isDelete : false; + this.selctedContact = this.cs.sharedService.getSharedData(ProfileService.SELCTED_CONTACT, false); this.direction = TranslatorService.getCurrentLanguageName(); this.selEmp = this.cs.sharedService.getSharedData( MenuResponse.SHARED_SEL_EMP, @@ -143,8 +145,8 @@ export class AddUpdateContactComponent implements OnInit { ngOnInit() { } ngAfterViewInit() { - - this.getBasicffStructure(); + if (!this.isDelete) + this.getBasicffStructure(); } public getColumnStructure() { @@ -164,12 +166,20 @@ export class AddUpdateContactComponent implements OnInit { P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, P_MENU_TYPE: this.menuType, P_SELECTED_RESP_ID: this.respID, - + 'P_DESC_FLEX_CONTEXT_CODE': 'HMG_ADD_CONTACT_DETAILS' }; this.profileService.getContactDFFStrutre(body).subscribe((result: any) => { - this.handleBasicDffStructureResult(result); + this.handleDffStructureResult(result); }); } + handleDffStructureResult(result) { + if (result.GetContactDffStructureList != null) { + + this.eitDffResponse = result.GetContactDffStructureList; + this.drawEitFields(result.GetContactDffStructureList, true); + this.fillBasicDetailsStructure(); + } + } private getBasicffStructure() { const body = { P_FUNCTION_NAME: this.functionName, @@ -186,9 +196,9 @@ export class AddUpdateContactComponent implements OnInit { public handleBasicColStructureResult(result) { if (result.GetContactColsStructureList != null) { this.eitColResponse = result.GetContactColsStructureList; - if (this.employeeBasicDetails.length > 0) { - this.getEitDffStructure(); - } + // if (this.employeeBasicDetails.length > 0) { + this.getEitDffStructure(); + //} this.drawEitFieldsStatic(result.GetContactColsStructureList); } @@ -198,7 +208,8 @@ export class AddUpdateContactComponent implements OnInit { if (result.GetBasicDetDffStructureList != null) { this.getColumnStructure(); this.eitResponse = result.GetBasicDetDffStructureList; - this.drawEitFields(result.GetBasicDetDffStructureList); + this.drawEitFields(result.GetBasicDetDffStructureList, false); + } } @@ -248,7 +259,7 @@ export class AddUpdateContactComponent implements OnInit { feildsList[i].DISPLAY_FLAG, feildsList[i].REQUIRED_FLAG ); - } else if (feildsList[i].DATATYPE == "DATE" && this.targetValue === 'new') { + } else if (feildsList[i].DATATYPE == "DATE") { this.dateInput = new DateInput( feildsList[i].SEGMENT_PROMPT, feildsList[i].APPLICATION_COLUMN_NAME, @@ -263,7 +274,7 @@ export class AddUpdateContactComponent implements OnInit { } } } - this.fillBasicDetailsStructure(); + } public getElementsStaticValues(): any { @@ -288,12 +299,9 @@ export class AddUpdateContactComponent implements OnInit { if (this.eitColResponse[i].DATATYPE == "VARCHAR2" || this.eitColResponse[i].DATATYPE == "NUMBER") { elemVal = elemVal; - } else if (this.eitColResponse[i].DATATYPE == "DATE" && this.targetValue === 'new') { + } else if (this.eitColResponse[i].DATATYPE == "DATE") { // date - elemVal = this.cs.formatDate(elemVal); - } else if (this.eitColResponse[i].DATATYPE == "DATE" && this.targetValue === 'correct') { - // date - elemVal = this.customiseDate(this.effectiveDate); + elemVal = this.cs.reverseFormatDate(elemVal); } if (this.targetValue === 'new') { @@ -394,7 +402,7 @@ export class AddUpdateContactComponent implements OnInit { return valuseArr; } - private drawEitFields(feildsList) { + private drawEitFields(feildsList, isDff: boolean) { const containerId = "containerDiv"; this.eitVALSettoCall = []; for (let i = 0; i < feildsList.length; i++) { @@ -550,12 +558,21 @@ export class AddUpdateContactComponent implements OnInit { feildsList[i].DISPLAY_FLAG, feildsList[i].REQUIRED_FLAG ); - this.fillDropdownList( - feildsList[i].SEGMENT_NAME, - feildsList[i].E_SERVICES_VS, - feildsList[i].E_SERVICES_DV - ); + if (isDff) { + this.fillDropdownListDff( + feildsList[i].SEGMENT_NAME, + feildsList[i].E_SERVICES_VS, + feildsList[i].E_SERVICES_DV + ); + } else { + this.fillDropdownList( + feildsList[i].SEGMENT_NAME, + feildsList[i].E_SERVICES_VS, + feildsList[i].E_SERVICES_DV + ); + } } + } this.bindHtmlElemEvents( feildsList[i].APPLICATION_COLUMN_NAME, @@ -577,6 +594,7 @@ export class AddUpdateContactComponent implements OnInit { if (this.validateEitObj && this.validateEitObj.length > 0) { this.fillEITStructure(); } + } addFieldToDOM( @@ -709,6 +727,46 @@ export class AddUpdateContactComponent implements OnInit { } } + fillDropdownListDff(segmentName, optionList: any = [], DV: any = "") { + let elemID: any = ""; + let eitObj: any; + if (optionList.length > 0) { + for (let i = 0; i < this.eitDffResponse.length; i++) { + if (this.eitDffResponse[i].SEGMENT_NAME == segmentName) { + eitObj = this.eitDffResponse[i]; + if ( + this.eitDffResponse[i].READ_ONLY == "Y" || + this.eitDffResponse[i].DISPLAY_FLAG == "N" + ) { + return false; + } + elemID = this.eitDffResponse[i].APPLICATION_COLUMN_NAME; + break; + } + } + let select = document.getElementById(elemID) as HTMLSelectElement; + document.getElementById(elemID).innerHTML = ""; + + if (eitObj.IsEmptyOption && eitObj.REQUIRED_FLAG == "N") { + var firstoption = document.createElement("option"); + firstoption.text = this.ts.trPK("general", "choose"); + firstoption.value = ""; + select.add(firstoption); + } + for (let i = 0; i < optionList.length; i++) { + var option = document.createElement("option"); + option.text = optionList[i].VALUE_COLUMN_NAME; + option.value = optionList[i].ID_COLUMN_NAME; + select.add(option); + } + if (select.dataset.hiddenval) { + select.value = select.dataset.hiddenval; + } else { + select.value = DV.P_ID_COLUMN_NAME; + } + select.disabled = false; + } + } public fillStaticDropdownList(segmentName, optionList: any = [], elemID: string) { let eitObj: any; if (optionList.length > 0) { @@ -1270,7 +1328,7 @@ export class AddUpdateContactComponent implements OnInit { public fillBasicDetailsStructure() { - this.mutualBasicDetailsArray = this.mutualBasicDetailsArray.concat(this.eitResponse, this.eitColResponse); + this.mutualBasicDetailsArray = this.eitDffResponse.concat(this.mutualBasicDetailsArray.concat(this.eitResponse, this.eitColResponse)); for (let i = 0; i < this.employeeBasicDetails.length; i++) { let val: any; @@ -1289,6 +1347,7 @@ export class AddUpdateContactComponent implements OnInit { if (elem) { if (val) { let feldDetails = this.mutualBasicDetailsArray.find( + x => x.APPLICATION_COLUMN_NAME == this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME @@ -1646,6 +1705,270 @@ export class AddUpdateContactComponent implements OnInit { return valuseArr; } // end getElementsValues + + public getElementsValuesDff(): any { + this.updatedValues = []; //fill updated list + let valuseArr: any = []; + let varcharValue: any = null; + let numbervalue: any = 0; + let dateValue: any = null; + let transNo: number = 1; + let textValue: any; + // if(this.ExtraObj.transactionNo) + // transNo=this.ExtraObj.transactionNo; + for (let i = 0; i < this.eitDffResponse.length; i++) { + varcharValue = null; + numbervalue = null; + dateValue = null; + /*********set transaction No of the updated object ********/ + if (this.getPassdirfromNotifiPage) { + let updatedObj = this.validateEitObj.find( + x => + x.APPLICATION_COLUMN_NAME == + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ); + let y = updatedObj; + transNo = y.TRANSACTION_NUMBER; // set the transaction number for all items in the updated loop + } + if (this.eitDffResponse[i].DISPLAY_FLAG != "N") { + if (this.eitDffResponse[i].VALIDATION_TYPE == "N") { + let elem = document.getElementById( + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ) as HTMLInputElement; + let elemVal = (document.getElementById( + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ) as HTMLInputElement).value; + textValue = elemVal; + //let elemVal= (document.getElementById(this.eitResponse[i].APPLICATION_COLUMN_NAME)).value; + if ( + this.eitDffResponse[i].FORMAT_TYPE == "X" && + this.eitDffResponse[i].DISPLAY_FLAG != "N" + ) { + //date + elemVal = this.cs.formatDate(elemVal); + } else if ( + this.eitDffResponse[i].FORMAT_TYPE == "Y" && + this.eitDffResponse[i].DISPLAY_FLAG != "N" + ) { + //standard date time + // elemVal = elem.dataset.dtvalue; + // elemVal = this.cs.formatStandardDate(elemVal); + elemVal = this.cs.formatDate(elemVal); + } else if ( + this.eitDffResponse[i].FORMAT_TYPE == "I" && + this.eitDffResponse[i].DISPLAY_FLAG != "N" + ) { + //time + if (elemVal.length > 5) { + elemVal = elemVal.substring(11, 16); + } else { + elemVal = elemVal; + } + } + if (this.eitDffResponse[i].REQUIRED_FLAG == "Y" && !elemVal) { + elem.classList.add("requiredClassElm"); + //this.common.showRequiredMsg(); + return false; + } else { + elem.classList.remove("requiredClassElm"); + } + // if (elemVal != 'null'){ + varcharValue = elemVal; + //} else{ + // elemVal = null; + // } + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.eitDffResponse[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); + } else { + let x = document.getElementById( + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ) as HTMLSelectElement; + if (this.eitDffResponse[i].READ_ONLY == "Y") { + let text = x.value; + let val = x.dataset.colmText; + varcharValue = val; + textValue = text; + } else { + let val = x.options[x.selectedIndex] + ? x.options[x.selectedIndex].value + : null; + let txt = x.options[x.selectedIndex] + ? x.options[x.selectedIndex].text + : null; + varcharValue = val; + textValue = txt; + } + if (this.eitDffResponse[i].REQUIRED_FLAG == "Y" && !varcharValue) { + x.classList.add("requiredClassElm"); + //this.common.showRequiredMsg(); + return false; + } else { + x.classList.remove("requiredClassElm"); + } + + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.eitDffResponse[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); + } //end else + } else { + let x = document.getElementById( + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ) as HTMLSelectElement; + let val = x.dataset.colmText; + textValue = x.value; + if (this.eitDffResponse[i].REQUIRED_FLAG == "Y" && !val) { + x.classList.add("requiredClassElm"); + //this.common.showRequiredMsg(); + return false; + } else { + x.classList.remove("requiredClassElm"); + } + + let staticValueBasicDetail = this.employeeBasicDetails.find( + x => + x.APPLICATION_COLUMN_NAME == + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ); + + if (staticValueBasicDetail) { + if (staticValueBasicDetail.DATATYPE === 'VARCHAR2') { + varcharValue = staticValueBasicDetail.VARCHAR2_VALUE; + } else if (staticValueBasicDetail.DATATYPE === 'DATE') { + dateValue = staticValueBasicDetail.DATE_VALUE; + } else if (staticValueBasicDetail.DATATYPE === 'NUMBER') { + numbervalue = staticValueBasicDetail.NUMBER_VALUE; + } else { + if (val) varcharValue = val; + } + } else { + if (val) varcharValue = val; + } + + + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.eitDffResponse[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); + } + + if (this.getPassdirfromNotifiPage) { + let updatedObj = this.validateEitObj.find( + x => + x.APPLICATION_COLUMN_NAME == + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ); + let y = updatedObj; + y.VARCHAR2_VALUE = varcharValue; + y.NUMBER_VALUE = numbervalue; + y.DATE_VALUE = dateValue; + y.SEGMENT_VALUE_DSP = textValue; + transNo = y.TRANSACTION_NUMBER; // set the transaction number for all items in the updated loop + this.updatedValues.push(y); + } else { + if (this.validateEitObj && this.eitSubmitAction == EIT_ACTION.UPDATE) { + let updatedObj = this.validateEitObj.find( + x => + x.APPLICATION_COLUMN_NAME == + this.eitDffResponse[i].APPLICATION_COLUMN_NAME + ); + let y = updatedObj; + y.VARCHAR2_VALUE = varcharValue; + y.NUMBER_VALUE = numbervalue; + y.DATE_VALUE = dateValue; + y.SEGMENT_VALUE_DSP = textValue; + transNo = transNo; // set the transaction number for all items in the updated loop + this.updatedValues.push(y); + } else { + let y = { + TRANSACTION_NUMBER: transNo, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue, + SEGMENT_VALUE_DSP: textValue, + APPLICATION_COLUMN_NAME: this.eitDffResponse[i] + .APPLICATION_COLUMN_NAME, + DATATYPE: this.eitDffResponse[i].DATATYPE, + DESC_FLEX_CONTEXT_CODE: this.eitDffResponse[i].DESC_FLEX_CONTEXT_CODE, + DESC_FLEX_NAME: this.eitDffResponse[i].DESC_FLEX_NAME, + DISPLAY_FLAG: this.eitDffResponse[i].DISPLAY_FLAG, + SEGMENT_NAME: this.eitDffResponse[i].SEGMENT_NAME, + SEGMENT_PROMPT: this.eitDffResponse[i].SEGMENT_PROMPT + }; + transNo = transNo; // set the transaction number for all items in the updated loop + this.updatedValues.push(y); + } + } + } // end for + + if (this.getPassdirfromNotifiPage) { + let updatedObj1 = this.validateEitObj.find( + x => x.APPLICATION_COLUMN_NAME === "PEI_ACTION" + ); + let updatedObj2 = this.validateEitObj.find( + x => x.APPLICATION_COLUMN_NAME === "PEI_EXTRA_INFO_ID" + ); + let updatedObj3 = this.validateEitObj.find( + x => x.APPLICATION_COLUMN_NAME === "PEI_OBJECT_VERSION_NUMBER" + ); + this.updatedValues.push(updatedObj1); + this.updatedValues.push(updatedObj2); + this.updatedValues.push(updatedObj3); + valuseArr = this.fillExtraInformation( + valuseArr, + updatedObj1.VARCHAR2_VALUE, + updatedObj2.NUMBER_VALUE, + updatedObj3.NUMBER_VALUE, + transNo + ); + } else { + if (this.eitSubmitAction == EIT_ACTION.ADD) { + this.updatedValues = this.fillExtraValuesUpdated( + this.updatedValues, + "NEW_ROW", + -1, + 0, + transNo + ); + valuseArr = this.fillExtraInformation( + valuseArr, + "NEW_ROW", + -1, + 0, + transNo + ); + } else if (this.eitSubmitAction == EIT_ACTION.UPDATE) { + valuseArr = this.fillExtraInformation( + valuseArr, + "UPDATE_ROW", + this.ExtraObj.peiExtraInfoID, + this.ExtraObj.peiObjVer, + transNo + ); + } else if (this.eitSubmitAction == EIT_ACTION.DELETE) { + valuseArr = this.fillExtraInformation( + valuseArr, + "DELETE_ROW", + this.ExtraObj.peiExtraInfoID, + this.ExtraObj.peiObjVer, + transNo + ); + } + } + return valuseArr; + } // end getElementsValues + fillExtraValuesUpdated( values: any, peiAction: string, @@ -1761,20 +2084,35 @@ export class AddUpdateContactComponent implements OnInit { return list; } - public handleBasicdetailsResult(result) { + public handledetailsResult(result) { if (this.cs.validResponse(result)) { this.cs.sharedService.setSharedData(this.basicRequest, BasicRequest.SHARED_DATA); - this.cs.sharedService.setSharedData(result.SubmitBasicDetTransactionList, 'basic-details-response'); + this.cs.sharedService.setSharedData(result.SubmitContactTransactionList, 'contact-details-response'); // this.cs.sharedService.setSharedData({ isResubmit: false },"confirmAddEITData"); - this.cs.openConfirmBasicDetailsPage(); + this.cs.confirmContact(); } } + public calcDay() { - public submitBasicDetailsTransaction() { - this.arrValues = this.getElementsValues(); - let staticValues = this.getElementsStaticValues(); - let allStatisDynamicValues = this.arrValues.concat(staticValues); + } + public submitTransaction() { + var allStatisDynamicValues = []; + + if (this.isDelete) { + allStatisDynamicValues.push({ + TRANSACTION_NUMBER: 1, + NAME: 'DATE_END', + VARCHAR2_VALUE: null, + NUMBER_VALUE: null, + DATE_VALUE: this.cs.formatDate(this.endDate) + }); + } else { + this.arrValues = this.getElementsValues(); + var dffvalues = this.getElementsValuesDff(); + let staticValues = this.getElementsStaticValues(); + allStatisDynamicValues = dffvalues.concat(this.arrValues.concat(staticValues)); + } if (allStatisDynamicValues) { this.basicRequest = { P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, @@ -1782,13 +2120,13 @@ export class AddUpdateContactComponent implements OnInit { P_SELECTED_RESP_ID: this.respID, P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME, EITTransactionTBL: allStatisDynamicValues, - P_CONTACT_RELATIONSHIP_ID: null, - P_ACTION_TYPE: this.employeeBasicDetails.length > 0 ? 'UPDATE' : this.isDelete ? 'REMOVE' : 'ADD' + P_CONTACT_RELATIONSHIP_ID: this.employeeBasicDetails.length > 0 || this.isDelete ? this.selctedContact['CONTACT_RELATIONSHIP_ID'] : null, + P_ACTION: this.employeeBasicDetails.length > 0 ? 'UPDATE' : this.isDelete ? 'DELETE' : 'ADD' }; console.log(this.basicRequest); this.profileService.submitContactTransaction(this.basicRequest).subscribe((result: any) => { - this.handleBasicdetailsResult(result); + this.handledetailsResult(result); }); } } diff --git a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.html b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.html new file mode 100644 index 00000000..0505227b --- /dev/null +++ b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.html @@ -0,0 +1,128 @@ + + + + {{headerTitle}} + + + + + + + + + +
{{'general, addAttach' | translate}}
+
+ +
+ +
+
+
+ + + {{ 'general, notAttch' | translate}} + +
+ + +
+ + + + {{attachList.AttachmentID +1 }} . + + + + + {{attachList.P_FILE_NAME }} + + + + + + + +
+ +
+ +
+ + +
+
+ + {{attachRes.FILE_NAME }} + +
+ + + + +
+
+ +
+ + + +
{{'confirmAddEit, comment' | translate}}
+ + + +
+ + +
{{'confirmAddEit, approverList' | translate}}
+
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{employee.APPROVER}} + + + {{employee.POSITION_TITLE}} + + + +
+
+
+
+
+ +
+ + +
+ + +
+ + {{ 'general, submit' | translate }} +
+
\ No newline at end of file diff --git a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss new file mode 100644 index 00000000..2ed98379 --- /dev/null +++ b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.scss @@ -0,0 +1,263 @@ +.footer-button { + border-radius: 2px; + padding: 0 1.1em; + min-height: 45px; + min-width: 200px; + } + + .imgSize { + width: 22px; + height: 22px; + } + + .Header { + font-weight: bold; + color: #1a586d !important; + font-size: 10px; + } + + .tbData { + font-size: 10px; + } + + .btnBack { + background: transparent; + float: right; + } + + .attachmentDiv{ + background: #ffffff; + height: auto; + text-align: center; + padding-top: 1px; + margin: 10px; + border-radius: 15px; + border: 1px solid grey; + } + + .noDataDiv{ + background: #ffffff; + height: 11%; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; + } + .submitNote{ + background: #ffffff; + height: 80px; + padding-top: 1px; + margin: 10px; + border-radius: 15px; + border: 1px solid grey; + } + + .approvalList{ + --background: #f0efef; + height: auto; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; + } + + /************************New Design**********************************/ + .notification-list{ + background: none; + background: none; + border-radius: 32px; + ion-item{ + // margin-top: 5px; + // margin-bottom: 5px; + + background-color: transparent; + .item-date{ + width: 100%; + font-size: 16px; + font-weight: bold; + + text-align: start; + padding: 0; + margin: 0; + + position: absolute; + left: 0; + top: 12%; + } + ion-label , [item-end]{ + + white-space: normal; + font-size: 14px; + padding-top: 15%; + // :root[dir="ltr"]{ + // margin-left: 10px; + // } + // :root[dir="rtl"]{ + // margin-right: 10px; + // } + + } + + } + } + + + + + + + .timeline { + position: relative; + margin: 15px 0 0 0; + // border-bottom: solid 1px var(--cusgray); + } + + .timeline:before { + + content: ''; + position: inherit !important; + top: 0; + bottom: 0; + width: 4px; + // background: #e4e4e4; + z-index: 1; + left: 35px; + /* margin-left: -10px; */ + /* z-index: 1; */ + } + + .timeline .timeline-thumb { + + border-radius: 500px; + width: 70px !important; + z-index: 2; + position: absolute; + left: 0px; + // :root[dir="ltr"]{ + // left: 37px; + // } + // :root[dir="rtl"]{ + // right: 37px; + // } + float: right; + top: 9px; + } + + .timeline .timeline-thumb.timeline-icon { + height: 70px; + // text-align: center; + // color: white; + // border: 5px solid #CBD0D3; + // transform: scale(0.2); + } + + + + .timeline .timeline-item { + width: 40px; + + } + + .timeline .timeline-stats { + position: relative; + font-size: 12px; + color: var(--darkgray); + + } + + .empImge{ + border-radius: 50%; + width:100%; + height: 100%; + border: #dedede solid 1px; + + } + .empImgeRep { + border-radius: 50% !important; + width: 80px; + height: 80px; + border: #dedede solid 1px; + } + + .line{ + padding-bottom:87px; + } + + .attachLable{ + position: absolute; + top: 0px; + z-index: 0; + background: #30b8c6; + color: #fff; + border-radius: 50%; + border: 0px; + width: 24px; + height: 24px; + text-align: center; + font-size: 5px; + } + + .removeLable{ + top: 0px; + z-index: 0; + background: #d8252d; + color: #fff; + border-radius: 50%; + border: 0px; + width: 20px; + height: 20px; + text-align: center; + font-size: 5px; + } + + .note-modal { + // width: 90%; + // height: 50%; + // top: 20%; + // left: 5%; + // right: 5%; + // bottom: 5%; + background: rgba(0, 0, 0, 0.5) !important; + padding: 30% 10% !important; + --height: 12cm !important; + // --width: 80% !important; + --border-radius:20px; + + } + .header-toolbar-new{ + --background: #269DB8; + } + .title{ + margin-top: -37px; + margin-left: 85px; + } + .title-ar{ + margin-top: -37px; + margin-right: 101px; + } + .confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + background-color: #269DB8; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } + + .approvalTitle-ar{ + font-weight: bold; + font-size: 16px; + text-align: right; + + } + .approvalTitle{ + font-weight: bold; + font-size: 16px; + text-align: left; + } + \ No newline at end of file diff --git a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.spec.ts b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.spec.ts new file mode 100644 index 00000000..6a25647a --- /dev/null +++ b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmContactComponent } from './confirm-contact.component'; + +describe('ConfirmContactComponent', () => { + let component: ConfirmContactComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ConfirmContactComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmContactComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts new file mode 100644 index 00000000..688e3443 --- /dev/null +++ b/Mohem/src/app/profile/confirm-contact/confirm-contact.component.ts @@ -0,0 +1,435 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { FileUploader } from 'ng2-file-upload'; +import { AddAttachComponent } from 'src/app/eit/add-attach/add-attach.component'; +import { AddEitResponse } from 'src/app/eit/models/add.eit.response'; +import { BasicRequest } from "../models/basic.request"; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { EitService } from 'src/app/eit/services/eit.service'; +import { SubmitEitModalComponent } from 'src/app/eit/submit-eit-modal/submit-eit-modal.component'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes'; +import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq'; +import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; +import { ProfileService } from '../service/profile.service'; +import { SubmitAddressModalComponent } from '../submit-eit-modal/submit-address-modal.component'; + + +@Component({ + selector: 'app-confirm-contact', + templateUrl: './confirm-contact.component.html', + styleUrls: ['./confirm-contact.component.scss'], +}) +export class ConfirmContactComponent implements OnInit { + + private P_TransactionID: number; + private basicRequest: BasicRequest; + approversList = []; + basicResponseList: any; + eitComments: string = ""; + menuType: string = ""; + selEmp: string = ""; + respID: number; + selMenu: MenuResponse; + getAttachList: any; + attachListDisplay: any = []; + headerTitle: string = ""; + isTrue: any = 0; + attachItems: any; + public isResubmitEIT: boolean = false; + private itemKey: string = ""; + private pActionMode: string = "SUBMIT"; + attachReqObj: WorkListButtonRequest = new WorkListButtonRequest(); + attachmentRes: any; + objIndex1: any; + attachListOver: any = []; + index: any = 0; + getPassNotificationDetails: any; + isSubmitBtnClicked: boolean; + // isDelete: boolean = false; + + /***Add Attchment Vars */ + isUpload: boolean = false; + inQueue: boolean = false; + addAttachmentListReq: any; + attachmentID: number = 0; + addAttachRequest: any = []; + fileData: any; + fileType: any; + dirPage: any; + TransactionID: any; + indexLastObj: any = 0; + filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']; + direction: string; + + + constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService, public profileService: ProfileService) { + this.direction = TranslatorService.getCurrentLanguageName() + this.isSubmitBtnClicked = false; + this.basicRequest = new BasicRequest(); + } + + ngOnInit() { + this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); + this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false); + this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false); + this.basicRequest = this.cs.sharedService.getSharedData(BasicRequest.SHARED_DATA, false); + + this.selEmp = this.basicRequest.P_SELECTED_EMPLOYEE_NUMBER; + + this.menuType = this.selMenu.List_Menu.MENU_TYPE; + this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT; + this.basicResponseList = this.cs.sharedService.getSharedData('contact-details-response', false); + console.log(this.basicResponseList); + this.itemKey = this.basicResponseList.P_ITEM_KEY; + this.P_TransactionID = this.basicResponseList.P_TRANSACTION_ID; + // this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete; + + this.getApproversList(); + + } + + getApproversList() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID, + P_AME_TRANSACTION_TYPE: "SSHRMS", + P_PAGE_NUM: 1, + P_PAGE_LIMIT: 1000 + } + this.eitService.getApproversList(body).subscribe((result: any) => { + this.handleApproversResult(result); + }); + } + + handleApproversResult(result) { + if (this.cs.validResponse(result)) { + this.approversList = result.GetApprovesList; + } + } + + startEitApproval() { + if (this.attachListOver) { + let request = { + AddAttachmentList: this.attachListOver + } + + this.eitService.addAttachment( + request). + subscribe((result: any) => { + this.handleAddAttachmentResults(result); + }); + } else { + this.startContactApprovalProcess(); + } + } + + + handleAddAttachmentResults(result) { + + if (this.cs.validResponse(result)) { + this.isTrue = 0; + for (let i = 0; i < result.AddAttSuccessList.length; i++) { + if (!result.AddAttSuccessList[i].AddSuccess) { + this.attachListOver[i].isSuccess = false; + //this.attachItems[i].isSuccess = false; + // if false display cancel button with waring icon or design + }// end if + else { + // if true remove cancel and set isSuccess = true + // this.attachItems[i].isSuccess = true; + this.attachListOver[i].isSuccess = true; + this.isTrue = this.isTrue + 1; //count flag of attach status + } // end else + } // end for + + if (this.isTrue == result.AddAttSuccessList.length) { + this.startContactApprovalProcess(); + } + else { + //stope + let filtered = this.attachListOver.filter(function (el) { return el.isSuccess == true; }); + this.attachListOver = filtered; + let msg: string = ""; + msg = this.ts.trPK("eit", "attach-errorMsg"); + this.cs.presentAlert(msg); + } + } + } + + startContactApprovalProcess() { + let request: any = {}; + request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; + request.P_MENU_TYPE = this.menuType; + request.P_SELECTED_RESP_ID = this.respID; + request.P_TRANSACTION_ID = this.P_TransactionID; + request.P_ITEM_KEY = this.itemKey; + request.P_ACTION_MODE = this.pActionMode; + request.P_COMMENTS = this.eitComments; + this.profileService.startContactApprovalProcess( + request). + subscribe((result: any) => { + this.handleResults(result); + }); + } + cancelEitProcess() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID + } + this.eitService.cancelHRTransaction( + body). + subscribe((result: any) => { + this.handleCancelResults(result); + }); + + } + handleCancelResults(result) { + if (this.cs.validResponse(result)) { + this.isSubmitBtnClicked = false; + } + } + handleResults(result) { + if (this.cs.validResponse(result)) { + this.isSubmitBtnClicked = true; + let msg: string = this.ts.trPK("eit", "approval-message-success"); + this.cs.presentAlert(msg); + this.cs.openNotificationPage(); + } + } + + async addAttachment(str: boolean, attachItems: any) { + //open the modal with return data + let attachDocID = attachItems.ATTACHED_DOCUMENT_ID; + + this.cs.sharedService.setSharedData(this.P_TransactionID, 'TransactionID'); + this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj'); + + const modal = await this.modalController.create({ + component: AddAttachComponent + }); + + modal.onDidDismiss() + .then((data) => { + if (data == "cancel" || data == "undefined") { + return; + } else { + if (!str) { + this.updateFile(data, attachDocID); + } else { + console.log(data); + this.attachListDisplay = data.data; + this.attachItems = this.attachListDisplay.map(function (el) { + var o = Object.assign({}, el); + o.isSuccess = false; + return o; + }); + + this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems; + } + } + }); + + return await modal.present(); + } + + /*****submit modal********/ + async openSubmitModal() { + this.cs.sharedService.setSharedData(this.attachListOver, 'submitAttachmentList'); + this.cs.sharedService.setSharedData(this.eitComments, 'eitComments'); + const modal = await this.modalController.create({ + component: SubmitAddressModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + this.startEitApproval(); + } + }); + + return await modal.present(); + } + + + + removeFile(objectitem) { + if (this.attachListOver) { + let index2 = this.attachListOver.findIndex(item => item == objectitem); + if (index2 > -1) { + this.attachListOver.splice(index2, 1); + } + } + if (this.attachmentRes) { + let index3 = this.attachmentRes.findIndex(item => item == objectitem); + if (index3 > -1) { + this.attachmentRes.splice(index3, 1); + } + } + + } + + + getAttachment(NotificationID) { + this.attachReqObj.P_NOTIFICATION_ID = NotificationID; + this.eitService.getAttach(this.attachReqObj). + subscribe((result: NotificationGetAttachResponse) => { + this.handleWorkListAttachResult(result); + }); + } + + handleWorkListAttachResult(result) { + if (this.cs.validResponse(result)) { + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + + } + + async OpenAttachFiles(value, Type) { + this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage'); + const modal = await this.modalController.create({ + component: WorkListAttachViewComponent + }); + + modal.onDidDismiss() + .then((data) => { + }); + return await modal.present(); + } + + + delelteFile(attach) { + this.cs.confirmAlertDialog((data) => { + if (data == true) { + this.continueDelete(attach); + } + }, this.ts.trPK('general', 'ok'), () => { + + }, this.ts.trPK('general', 'cancel'), this.ts.trPK('general', 'alert'), this.ts.trPK('eit', 'delete-perm')); + } + + continueDelete(attach) { + let req = { + P_ATTACHED_DOCUMENT_ID: attach.ATTACHED_DOCUMENT_ID + } + this.eitService.deleteAttach(req). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") { + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + let msg: string = ""; + msg = this.ts.trPK("eit", "deleteAttach"); + this.cs.presentAlert(msg); + } + } + }); + } + + updateFile(attachList, attachDocID) { + let req = { + P_ATTACHED_DOCUMENT_ID: attachDocID, + P_FILE_DATA: attachList[0].P_FILE_DATA, + P_FILE_NAME: attachList[0].P_FILE_NAME, + P_FILE_CONTENT_TYPE: attachList[0].P_FILE_CONTENT_TYPE + } + this.eitService.updateAttach(req). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.MessageStatus == 1) { + let msg: string = ""; + msg = this.ts.trPK("eit", "attachUpdate"); + this.cs.presentAlert(msg); + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + } + } + }); + } + + + ionViewWillLeave() { + if (this.P_TransactionID && this.isSubmitBtnClicked == false) + this.cancelEitProcess(); + } + + /*******************Add attchement Functions*************/ + + public uploader: FileUploader = new FileUploader({ + allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async (item) => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + + onFileSelectedclick(event) { + event.target.value = ''; + } + + + + onFileSelected(input) { + + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "notSupport"); + this.cs.presentAlert(msg); + return + } // todo: show alert that you tried uploading wrong files + + else { + const file = input.target.files[0]; + this.getBase64(file).then( + data => this.pushObject(data, file.name, file.type) + ); + } + } + + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + + pushObject(fileData, name, type) { + + console.log("before push: " + this.index); + try { + let array = name.split('.'); + let attachType: string = array[array.length - 1]; + this.attachListOver.push( + { + AttachmentID: this.attachListOver.length, + P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], + P_FILE_DATA: fileData.split(',')[1], + P_FILE_NAME: name,//.split('.')[0], + P_TRANSACTION_ID: this.P_TransactionID + }) + + } catch (e) { + } + } + +} diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index 49d292bc..4eb7d608 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -359,7 +359,7 @@

{{data.RELATIONSHIP}}

-
+

{{ts.trPK('userProfile','remove')}}

diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index d9f61f5b..1a82b12a 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -451,28 +451,41 @@ export class HomeComponent implements OnInit { // this.cs.presentAlert(this.ts.trPK('general', 'error-itg')); this.cs.presentConfirmDialog(this.ts.trPK('userProfile', 'update-msg'), () => { - this.profileService.getContactDetails({ - P_MENU_TYPE: "E", - P_SELECTED_RESP_ID: -999, - P_CONTACT_RELATIONSHIP_ID: contact['CONTACT_RELATIONSHIP_ID'] - }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { - if (this.cs.validResponse(response)) { - this.familyMemberDataDetails = response['GetEmployeeContactDetailsList']; - this.cs.sharedService.setSharedData(this.familyMemberDataDetails, ProfileService.EMP_CONTACT_DETAILS); - this.allowEdit('add-update-contact'); - - - } - }) - this.cs.greenToastPK("userProfile", "update-confirm"); + this.updateContact(contact); + //this.cs.greenToastPK("userProfile", "update-confirm"); }); } - RemoveFunction() { + RemoveFunction(contact) { + this.cs.sharedService.setSharedData(contact, ProfileService.SELCTED_CONTACT); + this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: undefined, transNo: this.transactionNo }, 'AddEITData'); + + + let selMenu: MenuResponse = new MenuResponse(); + selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); + selMenu.GetMenuEntriesList = this.dependentDetails; + this.cs.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); + this.cs.presentConfirmDialog(this.ts.trPK('userProfile', 'remove-msg'), () => { - this.cs.redToastPK("userProfile", "remove-confirm"); + this.cs.sharedService.setSharedData(true, ProfileService.REMOVE_CONTACT); + this.cs.openAddUpdateContact(); }); } + updateContact(contact) { + this.profileService.getContactDetails({ + P_MENU_TYPE: "E", + P_SELECTED_RESP_ID: -999, + P_CONTACT_RELATIONSHIP_ID: contact['CONTACT_RELATIONSHIP_ID'] + }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { + if (this.cs.validResponse(response)) { + this.familyMemberDataDetails = response['GetContactDetailsList']; + this.cs.sharedService.setSharedData(this.familyMemberDataDetails, ProfileService.EMP_CONTACT_DETAILS); + this.cs.sharedService.setSharedData(contact, ProfileService.SELCTED_CONTACT); + this.allowEdit('add-update-contact'); + + } + }) + } } diff --git a/Mohem/src/app/profile/models/contact.request.ts b/Mohem/src/app/profile/models/contact.request.ts index 7646184e..3a62ce32 100644 --- a/Mohem/src/app/profile/models/contact.request.ts +++ b/Mohem/src/app/profile/models/contact.request.ts @@ -8,5 +8,5 @@ export class ContactRequest { public P_SELECTED_RESP_ID: Number; public P_CONTACT_RELATIONSHIP_ID: number; EITTransactionTBL: EitTransactionModel[]; - P_ACTION_TYPE: string; + P_ACTION: string; } \ No newline at end of file diff --git a/Mohem/src/app/profile/profile.module.ts b/Mohem/src/app/profile/profile.module.ts index 2ae8004b..46faa498 100644 --- a/Mohem/src/app/profile/profile.module.ts +++ b/Mohem/src/app/profile/profile.module.ts @@ -25,6 +25,7 @@ import { SubmitAddressModalComponent } from './submit-eit-modal/submit-address-m import { ConfirmBasicDetailsComponent } from './confirm-basic-details/confirm-basic-details.component'; import { ConatactComponent } from './contact/contact.component'; import { AddUpdateContactComponent } from './add-update-contact/add-update-contact.component'; +import { ConfirmContactComponent } from './confirm-contact/confirm-contact.component'; const routes: Routes = [ { path: '', @@ -54,6 +55,10 @@ const routes: Routes = [ { path: 'add-update-contact', component: AddUpdateContactComponent + }, + { + path: 'confirm-contact', + component: ConfirmContactComponent } ], }, @@ -122,13 +127,14 @@ const routes: Routes = [ EditProfileComponent, PerformanceEvaluationComponent, ConfirmAddressComponent, - SubmitAddressModalComponent, + AddBasicDetailsComponent, ConfirmAddressComponent, ConfirmBasicDetailsComponent, ConatactComponent, AddBasicDetailsComponent, - AddUpdateContactComponent + AddUpdateContactComponent, + ConfirmContactComponent ], entryComponents: [EditDetailProfileComponent, SubmitAddressModalComponent], diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index d298bbc7..141d8e04 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -21,6 +21,7 @@ export class ProfileService { public static startEitProcess = 'Services/ERP.svc/REST/START_ADDRESS_APPROVAL_PROCESS'; public static startPhoneProcess = 'Services/ERP.svc/REST/START_PHONES_APPROVAL_PROCESS'; public static startBasicProcess = 'Services/ERP.svc/REST/START_BASIC_DET_APPR_PROCESS'; + public static contactApprovalProcess = 'Services/ERP.svc/REST/START_CONTACT_APPROVAL_PROCESS'; public static updateAttach = 'Services/ERP.svc/REST/UPDATE_ATTACHMENT'; public static deleteAttach = 'Services/ERP.svc/REST/DELETE_ATTACHMENT'; public static getApproversList = 'Services/ERP.svc/REST/GET_APPROVERS_LIST'; @@ -51,6 +52,8 @@ export class ProfileService { public static EMP_PHONE = 'emp-phone'; public static EMP_CONTACT_DETAILS = 'emp-CONTACT_DETAILS'; public static EMP_CONTACT = 'emp-CONTACT'; + public static SELCTED_CONTACT = 'selcted-CONTACT'; + public static REMOVE_CONTACT = 'remove-CONTACT'; constructor( public con: ConnectorService, public authService: AuthenticationService @@ -153,6 +156,12 @@ export class ProfileService { return this.con.post(ProfileService.startBasicProcess, request, onError, errorLabel); } + + public startContactApprovalProcess(contactRequest: any, onError?: any, errorLabel?: string): Observable { + const request = contactRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.contactApprovalProcess, request, onError, errorLabel); + } public getObjectValue(request: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(request); diff --git a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html index c622715f..d44a33ba 100644 --- a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html +++ b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.html @@ -20,6 +20,7 @@
+ diff --git a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.scss b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.scss index 71cba989..168df521 100644 --- a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.scss +++ b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.scss @@ -3,4 +3,12 @@ } .divider{ height:20px +} +.check-status{ + color:rgb(0, 0, 134); + text-decoration: underline; + font-weight: 600; +} +.status{ + margin:20px; } \ No newline at end of file diff --git a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts index 7e6d9844..e42896c1 100644 --- a/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts +++ b/Mohem/src/app/reports/concurrent-report/concurrent-report.component.ts @@ -39,6 +39,7 @@ export class ConcurrentReportComponent implements OnInit { public selEmp; public eitRequest; public ExtraObj; + selMenu: MenuResponse; public functionName; @@ -93,8 +94,13 @@ export class ConcurrentReportComponent implements OnInit { const containerId = "containerDiv"; this.eitVALSettoCall = []; for (let i = 0; i < feildsList.length; i++) { - let defaultVal: string = ""; - let defaultValText: string = ""; + let defaultVal = feildsList[i].E_SERVICES_DV.P_ID_COLUMN_NAME + ? feildsList[i].E_SERVICES_DV.P_ID_COLUMN_NAME + : ""; + let defaultValText = feildsList[i].E_SERVICES_DV.P_VALUE_COLUMN_NAME + ? feildsList[i].E_SERVICES_DV.P_VALUE_COLUMN_NAME + : ""; + if (feildsList[i].DISPLAY_FLAG != "N") { //check if the field should be displayed @@ -926,26 +932,37 @@ export class ConcurrentReportComponent implements OnInit { this.reports .submitTransaction(this.eitRequest, {}, this.ts.trPK('general', 'retry')) .subscribe((result: any) => { - this.cs.stopLoading(); - this.handleSubmitAbsence(result); + + this.handleSubmit(result); }); } - private handleSubmitAbsence(result) { + private handleSubmit(result) { + if (this.cs.validResponse(result)) { - if (this.getPassdirfromNotifiPage) { - //this.cs.sharedService.setSharedData(result.ResubmitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); - this.cs.openConfirmAbsece(); + //call another API to check the response; + this.checkStatus(result); - } else { - //this.cs.sharedService.setSharedData(result.SumbitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); - this.cs.openConfirmAbsece(); - } } } + checkStatus(result) { + var request: any = {}; + request.P_USER_NAME = this.selEmp; + request.P_MENU_TYPE = this.selectedMenu.MENU_TYPE; + request.P_SELECTED_RESP_ID = -999; + request.P_FUNCTION_NAME = this.functionName; + request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME; + + this.reports.getTransaction(this.eitRequest, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => { + this.cs.stopLoading(); + this.cs.sharedService.setSharedData(result['GetCcpTransactionsList_New'], ReportServiceService.TRANSACTION_LIST); + this.cs.sharedService.setSharedData(this.template, ReportServiceService.TEMPLATE); + this.cs.openConcurrentTransaction(); + }); + } public getElementsValues(): any { this.updatedValues = []; //fill updated list let valuseArr: any = []; @@ -1276,5 +1293,7 @@ export class ConcurrentReportComponent implements OnInit { .nativeElement.querySelectorAll('#containerDiv')[0].innerHTML = ''; this.getCppDiffStructure(this.template); } + refreshStatus() { + } } diff --git a/Mohem/src/app/reports/report-service.service.ts b/Mohem/src/app/reports/report-service.service.ts index d8356223..9196cb2c 100644 --- a/Mohem/src/app/reports/report-service.service.ts +++ b/Mohem/src/app/reports/report-service.service.ts @@ -9,7 +9,12 @@ import { ConnectorService } from '../hmg-common/services/connector/connector.ser export class ReportServiceService { public static GET_CONCURRENT_PROGRAM = 'Services/ERP.svc/REST/GET_CONCURRENT_PROGRAMS'; public static GET_CPP_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_CCP_DFF_STRUCTURE'; - public static SUBMIT_CPP_REQUEST = 'Services/ERP.svc/REST/SUBMIT_CCP_TRANSACTION' + public static SUBMIT_CPP_REQUEST = 'Services/ERP.svc/REST/SUBMIT_CCP_TRANSACTION'; + public static SUBMIT_CPP_TRANSACTION = 'Services/ERP.svc/REST/GET_CCP_TRANSACTIONS'; + public static GET_CCP_OUTPUT = 'Services/ERP.svc/REST/GET_CCP_OUTPUT'; + + public static TRANSACTION_LIST = 'transaction-list'; + public static TEMPLATE = 'template'; constructor( public con: ConnectorService, private authService: AuthenticationService, @@ -46,4 +51,26 @@ export class ReportServiceService { errorLabel ); } + getTransaction(request, onError, errorLabel) { + this.authService.authenticateRequest(request); + request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; + return this.con.postNoLoad( + ReportServiceService.SUBMIT_CPP_TRANSACTION, + request, + onError, + errorLabel + ); + } + + getCppOutput(request, onError, errorLabel) { + this.authService.authenticateRequest(request); + request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; + return this.con.postNoLoad( + ReportServiceService.GET_CCP_OUTPUT, + request, + onError, + errorLabel + ); + } + } diff --git a/Mohem/src/app/reports/reports.module.ts b/Mohem/src/app/reports/reports.module.ts index 41be692b..0fc1953d 100644 --- a/Mohem/src/app/reports/reports.module.ts +++ b/Mohem/src/app/reports/reports.module.ts @@ -9,6 +9,7 @@ import { ReportsPage } from './reports.page'; import { ConcurrentReportComponent } from './concurrent-report/concurrent-report.component'; import { ReportServiceService } from './report-service.service'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; +import { TransactionListComponent } from './transaction-list/transaction-list.component'; const routes: Routes = [ @@ -20,7 +21,10 @@ const routes: Routes = [ path: 'concurrent-report', component: ConcurrentReportComponent }, - + { + path: 'transaction-list', + component: TransactionListComponent + }, ], } ]; @@ -33,7 +37,7 @@ const routes: Routes = [ RouterModule.forChild(routes), HmgCommonModule ], - declarations: [ReportsPage, ConcurrentReportComponent], + declarations: [ReportsPage, ConcurrentReportComponent, TransactionListComponent], providers: [ReportServiceService] }) export class ReportsPageModule { } diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.html b/Mohem/src/app/reports/transaction-list/transaction-list.component.html new file mode 100644 index 00000000..af807b32 --- /dev/null +++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.html @@ -0,0 +1,48 @@ + +
+ + + +
+
+
+ +
+ +
+ +
{{getDate(transaction.REQUEST_DATE)}}
+ + +
+

{{'transaction, request-id' | translate}}

+

+ {{transaction.REQUEST_ID}} +

+
+

{{'transaction, phase' | translate}}

+

{{transaction.CCP_PHASE}}

+
+ + +
+

{{'transaction,program-name' | translate}}

+

{{transaction.CONCURRENT_PROGRAM_NAME}}

+
+
+ + +
+

{{'transaction,output' | translate}}

+

+

+
+ +
+
+ +
+ +
+ +
diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.scss b/Mohem/src/app/reports/transaction-list/transaction-list.component.scss new file mode 100644 index 00000000..0f29d1fd --- /dev/null +++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.scss @@ -0,0 +1,138 @@ +.display-created{ + display: inline-block; + + color:#000; +} +#containerDiv{ + margin-top:20px; +} +.padding{ + padding-left:5px; + padding-right: 5px; +} +.bold{ + font-weight: bold; + font-size: 16px; +} +.color-black{ + color:#000; +} +.date{ + position: absolute; + font-size: 14px; + padding: 10px; + right:0; + width: 100px; + color:#969696; +} +.transaction-list{ + margin-top:20px; +} +.date-container{ + margin:0px 20px; +} + +.label{ + font-size: 16px; + // margin-left: 15px; + color: #a2a5a6 !important; + display: block; + overflow: hidden; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + /* font-size: inherit; */ + // text-overflow: ellipsis; + // white-space: nowrap; + white-space: normal; + // padding-top: 10px; + padding: 5px 0px; + padding-left: 10px !important; + margin: 10px auto; + :root[dir="ltr"]{ + font-family: var(--fontFamilySemiBoldEN) !important; + } + :root[dir="rtl"]{ + font-family: var(--fontFamilyIOSAR) !important; + font-weight: bold; + } + + +} + +.Field-en{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 15px; + padding-left: 20px !important; + padding-top: 6px !important; + color: #999999 !important; +} + +.Field-ar{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 20px; + padding-right: 20px !important; + padding-top: 6px !important; + color: #999999 !important; +} +select{ + width: 300px !important; + border: none !important; +} +.padding_date{ + padding-left:5px !important; +} +.date-icon{ + font-size: 20px; + left: -1px; + position: relative; + top: 2px; +} +ion-card{ + padding:10px; + border-radius: 11px; + box-shadow: 0px 1px 2px 1px #ccc; +} +.display-inline{ + display:inline-block; + +} +.red{ +color:#CA3332; +font-weight: 600; +margin:0px 5px; +overflow: hidden; + width: 90%; + white-space: nowrap; + text-overflow: ellipsis; +} +.inline-display{ + display: inline-block; + font-weight: 600; + padding-left:8px; +} +.download{ + font-size: 26px; + margin: 0px 10px; + position: relative; + top: 5px; + color: #CA3332; +} +.refresh{ + font-size: 22px; + margin: 0px 10px; + position: relative; + top: 5px; + color: #CA3332; +} +.disabled-icon{ + pointer-events: none; + opacity: .5; +} +.output-container{ + position: relative; + bottom: 10px; +} \ No newline at end of file diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.spec.ts b/Mohem/src/app/reports/transaction-list/transaction-list.component.spec.ts new file mode 100644 index 00000000..9a3a75e7 --- /dev/null +++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TransactionListComponent } from './transaction-list.component'; + +describe('TransactionListComponent', () => { + let component: TransactionListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ TransactionListComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TransactionListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/reports/transaction-list/transaction-list.component.ts b/Mohem/src/app/reports/transaction-list/transaction-list.component.ts new file mode 100644 index 00000000..56d0aa06 --- /dev/null +++ b/Mohem/src/app/reports/transaction-list/transaction-list.component.ts @@ -0,0 +1,55 @@ +import { copyStyles } from '@angular/animations/browser/src/util'; +import { Component, ElementRef, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { ReportServiceService } from '../report-service.service'; + +@Component({ + selector: 'app-transaction-list', + templateUrl: './transaction-list.component.html', + styleUrls: ['./transaction-list.component.scss'], +}) +export class TransactionListComponent implements OnInit { + transactionList: any = []; + selectedMenu: any; + template: any; + constructor(public cs: CommonService, private elementRef: ElementRef, public reports: ReportServiceService, public ts: TranslatorService,) { } + + ngOnInit() { + this.selectedMenu = this.cs.sharedService.getSharedData(MenuResponse.SELECTED_MENU, false); + this.transactionList = this.cs.sharedService.getSharedData(ReportServiceService.TRANSACTION_LIST, false); + this.template = this.cs.sharedService.getSharedData(ReportServiceService.TEMPLATE, false); + } + getDate(date) { + return this.cs.evaluteDate(date); + } + getCppOutput(transaction) { + var request: any = { + P_REQUEST_ID: transaction['REQUEST_ID'] + }; + this.cs.startLoading(); + this.reports.getCppOutput(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => { + + console.log(result); + this.cs.stopLoading(); + + }); + } + refresh(transaction) { + var request: any = { + P_REQUEST_ID: transaction['REQUEST_ID'] + }; + this.cs.startLoading(); + var request: any = {}; + request.P_MENU_TYPE = this.selectedMenu.MENU_TYPE; + request.P_SELECTED_RESP_ID = -999; + request.P_FUNCTION_NAME = this.selectedMenu.FUNCTION_NAME; + request.P_DESC_FLEX_NAME = this.template.CONCURRENT_PROGRAM_NAME; + + this.reports.getTransaction(request, {}, this.ts.trPK('general', 'retry')).subscribe((result: any) => { + this.cs.stopLoading(); + this.transactionList = result['GetCcpTransactionsList_New']; + }); + } +} diff --git a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.html b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.html new file mode 100644 index 00000000..d7e4b690 --- /dev/null +++ b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.html @@ -0,0 +1,123 @@ + + + + + + + + +
{{'general, addAttach' | translate}}
+
+ +
+ +
+
+
+ + + {{ 'general, notAttch' | translate}} + +
+ + +
+ + + + {{attachList.AttachmentID +1 }} . + + + + + {{attachList.P_FILE_NAME }} + + + + + + + +
+ +
+ +
+ + +
+
+ + {{attachRes.FILE_NAME }} + +
+ + + + +
+
+ +
+ + + +
{{'confirmAddEit, comment' | translate}}
+ + + +
+ + +
{{'confirmAddEit, approverList' | translate}}
+
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{employee.APPROVER}} + + + {{employee.POSITION_TITLE}} + + + +
+
+
+
+
+ +
+ + +
+ + +
+ + {{ 'general, submit' | translate }} +
+
\ No newline at end of file diff --git a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss new file mode 100644 index 00000000..2ed98379 --- /dev/null +++ b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.scss @@ -0,0 +1,263 @@ +.footer-button { + border-radius: 2px; + padding: 0 1.1em; + min-height: 45px; + min-width: 200px; + } + + .imgSize { + width: 22px; + height: 22px; + } + + .Header { + font-weight: bold; + color: #1a586d !important; + font-size: 10px; + } + + .tbData { + font-size: 10px; + } + + .btnBack { + background: transparent; + float: right; + } + + .attachmentDiv{ + background: #ffffff; + height: auto; + text-align: center; + padding-top: 1px; + margin: 10px; + border-radius: 15px; + border: 1px solid grey; + } + + .noDataDiv{ + background: #ffffff; + height: 11%; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; + } + .submitNote{ + background: #ffffff; + height: 80px; + padding-top: 1px; + margin: 10px; + border-radius: 15px; + border: 1px solid grey; + } + + .approvalList{ + --background: #f0efef; + height: auto; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + border-radius: 5px; + } + + /************************New Design**********************************/ + .notification-list{ + background: none; + background: none; + border-radius: 32px; + ion-item{ + // margin-top: 5px; + // margin-bottom: 5px; + + background-color: transparent; + .item-date{ + width: 100%; + font-size: 16px; + font-weight: bold; + + text-align: start; + padding: 0; + margin: 0; + + position: absolute; + left: 0; + top: 12%; + } + ion-label , [item-end]{ + + white-space: normal; + font-size: 14px; + padding-top: 15%; + // :root[dir="ltr"]{ + // margin-left: 10px; + // } + // :root[dir="rtl"]{ + // margin-right: 10px; + // } + + } + + } + } + + + + + + + .timeline { + position: relative; + margin: 15px 0 0 0; + // border-bottom: solid 1px var(--cusgray); + } + + .timeline:before { + + content: ''; + position: inherit !important; + top: 0; + bottom: 0; + width: 4px; + // background: #e4e4e4; + z-index: 1; + left: 35px; + /* margin-left: -10px; */ + /* z-index: 1; */ + } + + .timeline .timeline-thumb { + + border-radius: 500px; + width: 70px !important; + z-index: 2; + position: absolute; + left: 0px; + // :root[dir="ltr"]{ + // left: 37px; + // } + // :root[dir="rtl"]{ + // right: 37px; + // } + float: right; + top: 9px; + } + + .timeline .timeline-thumb.timeline-icon { + height: 70px; + // text-align: center; + // color: white; + // border: 5px solid #CBD0D3; + // transform: scale(0.2); + } + + + + .timeline .timeline-item { + width: 40px; + + } + + .timeline .timeline-stats { + position: relative; + font-size: 12px; + color: var(--darkgray); + + } + + .empImge{ + border-radius: 50%; + width:100%; + height: 100%; + border: #dedede solid 1px; + + } + .empImgeRep { + border-radius: 50% !important; + width: 80px; + height: 80px; + border: #dedede solid 1px; + } + + .line{ + padding-bottom:87px; + } + + .attachLable{ + position: absolute; + top: 0px; + z-index: 0; + background: #30b8c6; + color: #fff; + border-radius: 50%; + border: 0px; + width: 24px; + height: 24px; + text-align: center; + font-size: 5px; + } + + .removeLable{ + top: 0px; + z-index: 0; + background: #d8252d; + color: #fff; + border-radius: 50%; + border: 0px; + width: 20px; + height: 20px; + text-align: center; + font-size: 5px; + } + + .note-modal { + // width: 90%; + // height: 50%; + // top: 20%; + // left: 5%; + // right: 5%; + // bottom: 5%; + background: rgba(0, 0, 0, 0.5) !important; + padding: 30% 10% !important; + --height: 12cm !important; + // --width: 80% !important; + --border-radius:20px; + + } + .header-toolbar-new{ + --background: #269DB8; + } + .title{ + margin-top: -37px; + margin-left: 85px; + } + .title-ar{ + margin-top: -37px; + margin-right: 101px; + } + .confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + background-color: #269DB8; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } + + .approvalTitle-ar{ + font-weight: bold; + font-size: 16px; + text-align: right; + + } + .approvalTitle{ + font-weight: bold; + font-size: 16px; + text-align: left; + } + \ No newline at end of file diff --git a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.spec.ts b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.spec.ts new file mode 100644 index 00000000..c9818fc1 --- /dev/null +++ b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmTerminationComponent } from './confirm-termination.component'; + +describe('ConfirmTerminationComponent', () => { + let component: ConfirmTerminationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ConfirmTerminationComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmTerminationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts new file mode 100644 index 00000000..be177d0f --- /dev/null +++ b/Mohem/src/app/termination/confirm-termination/confirm-termination.component.ts @@ -0,0 +1,430 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { FileUploader } from 'ng2-file-upload'; +import { AddAttachComponent } from 'src/app/eit/add-attach/add-attach.component'; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { EitService } from 'src/app/eit/services/eit.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { WorkListButtonRequest } from 'src/app/notification/models/NotificationButtonReq'; +import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; +import { BasicRequest } from 'src/app/profile/models/basic.request'; +import { SubmitAddressModalComponent } from 'src/app/profile/submit-eit-modal/submit-address-modal.component'; +import { TerminationServiceService } from '../service/termination-service.service'; + +@Component({ + selector: 'app-confirm-termination', + templateUrl: './confirm-termination.component.html', + styleUrls: ['./confirm-termination.component.scss'], +}) +export class ConfirmTerminationComponent implements OnInit { + + + private P_TransactionID: number; + + approversList = []; + responseList: any; + eitComments: string = ""; + menuType: string = ""; + selEmp: string = ""; + respID: number; + selMenu: MenuResponse; + getAttachList: any; + attachListDisplay: any = []; + headerTitle: string = ""; + isTrue: any = 0; + attachItems: any; + public isResubmitEIT: boolean = false; + private itemKey: string = ""; + private pActionMode: string = "SUBMIT"; + attachReqObj: WorkListButtonRequest = new WorkListButtonRequest(); + attachmentRes: any; + objIndex1: any; + attachListOver: any = []; + index: any = 0; + getPassNotificationDetails: any; + isSubmitBtnClicked: boolean; + // isDelete: boolean = false; + + /***Add Attchment Vars */ + isUpload: boolean = false; + inQueue: boolean = false; + addAttachmentListReq: any; + attachmentID: number = 0; + addAttachRequest: any = []; + fileData: any; + fileType: any; + dirPage: any; + TransactionID: any; + indexLastObj: any = 0; + filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']; + direction: string; + + + constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService, public terminationService: TerminationServiceService) { + this.direction = TranslatorService.getCurrentLanguageName() + this.isSubmitBtnClicked = false; + + } + + ngOnInit() { + this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); + this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false); + this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false); + + + this.menuType = this.selMenu.List_Menu.MENU_TYPE; + this.headerTitle = this.selMenu.GetMenuEntriesList.PROMPT; + this.responseList = this.cs.sharedService.getSharedData(TerminationServiceService.SHARED_DATA, false); + this.itemKey = this.responseList.P_ITEM_KEY; + this.P_TransactionID = this.responseList.P_TRANSACTION_ID; + // this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete; + + this.getApproversList(); + + } + + getApproversList() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID, + P_AME_TRANSACTION_TYPE: "SSHRMS", + P_PAGE_NUM: 1, + P_PAGE_LIMIT: 1000 + } + this.eitService.getApproversList(body).subscribe((result: any) => { + this.handleApproversResult(result); + }); + } + + handleApproversResult(result) { + if (this.cs.validResponse(result)) { + this.approversList = result.GetApprovesList; + } + } + + startEitApproval() { + if (this.attachListOver) { + let request = { + AddAttachmentList: this.attachListOver + } + + this.eitService.addAttachment( + request). + subscribe((result: any) => { + this.handleAddAttachmentResults(result); + }); + } else { + this.startApprovalProcess(); + } + } + + + handleAddAttachmentResults(result) { + + if (this.cs.validResponse(result)) { + this.isTrue = 0; + for (let i = 0; i < result.AddAttSuccessList.length; i++) { + if (!result.AddAttSuccessList[i].AddSuccess) { + this.attachListOver[i].isSuccess = false; + //this.attachItems[i].isSuccess = false; + // if false display cancel button with waring icon or design + }// end if + else { + // if true remove cancel and set isSuccess = true + // this.attachItems[i].isSuccess = true; + this.attachListOver[i].isSuccess = true; + this.isTrue = this.isTrue + 1; //count flag of attach status + } // end else + } // end for + + if (this.isTrue == result.AddAttSuccessList.length) { + this.startApprovalProcess(); + } + else { + //stope + let filtered = this.attachListOver.filter(function (el) { return el.isSuccess == true; }); + this.attachListOver = filtered; + let msg: string = ""; + msg = this.ts.trPK("eit", "attach-errorMsg"); + this.cs.presentAlert(msg); + } + } + } + + startApprovalProcess() { + let request: any = {}; + + request.P_MENU_TYPE = this.menuType; + request.P_SELECTED_RESP_ID = this.respID; + request.P_TRANSACTION_ID = this.P_TransactionID; + request.P_ITEM_KEY = this.itemKey; + request.P_ACTION_MODE = this.pActionMode; + request.P_COMMENTS = this.eitComments; + this.terminationService.startApprovalProcess( + request). + subscribe((result: any) => { + this.handleResults(result); + }); + } + cancelEitProcess() { + let body: any = { + P_TRANSACTION_ID: this.P_TransactionID + } + this.eitService.cancelHRTransaction( + body). + subscribe((result: any) => { + this.handleCancelResults(result); + }); + + } + handleCancelResults(result) { + if (this.cs.validResponse(result)) { + this.isSubmitBtnClicked = false; + } + } + handleResults(result) { + if (this.cs.validResponse(result)) { + this.isSubmitBtnClicked = true; + let msg: string = this.ts.trPK("eit", "approval-message-success"); + this.cs.presentAlert(msg); + this.cs.openNotificationPage(); + } + } + + async addAttachment(str: boolean, attachItems: any) { + //open the modal with return data + let attachDocID = attachItems.ATTACHED_DOCUMENT_ID; + + this.cs.sharedService.setSharedData(this.P_TransactionID, 'TransactionID'); + this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj'); + + const modal = await this.modalController.create({ + component: AddAttachComponent + }); + + modal.onDidDismiss() + .then((data) => { + if (data == "cancel" || data == "undefined") { + return; + } else { + if (!str) { + this.updateFile(data, attachDocID); + } else { + console.log(data); + this.attachListDisplay = data.data; + this.attachItems = this.attachListDisplay.map(function (el) { + var o = Object.assign({}, el); + o.isSuccess = false; + return o; + }); + + this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems; + } + } + }); + + return await modal.present(); + } + + /*****submit modal********/ + async openSubmitModal() { + this.cs.sharedService.setSharedData(this.attachListOver, 'submitAttachmentList'); + this.cs.sharedService.setSharedData(this.eitComments, 'eitComments'); + const modal = await this.modalController.create({ + component: SubmitAddressModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + this.startEitApproval(); + } + }); + + return await modal.present(); + } + + + + removeFile(objectitem) { + if (this.attachListOver) { + let index2 = this.attachListOver.findIndex(item => item == objectitem); + if (index2 > -1) { + this.attachListOver.splice(index2, 1); + } + } + if (this.attachmentRes) { + let index3 = this.attachmentRes.findIndex(item => item == objectitem); + if (index3 > -1) { + this.attachmentRes.splice(index3, 1); + } + } + + } + + + getAttachment(NotificationID) { + this.attachReqObj.P_NOTIFICATION_ID = NotificationID; + this.eitService.getAttach(this.attachReqObj). + subscribe((result: NotificationGetAttachResponse) => { + this.handleWorkListAttachResult(result); + }); + } + + handleWorkListAttachResult(result) { + if (this.cs.validResponse(result)) { + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + + } + + async OpenAttachFiles(value, Type) { + this.cs.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage'); + const modal = await this.modalController.create({ + component: WorkListAttachViewComponent + }); + + modal.onDidDismiss() + .then((data) => { + }); + return await modal.present(); + } + + + delelteFile(attach) { + this.cs.confirmAlertDialog((data) => { + if (data == true) { + this.continueDelete(attach); + } + }, this.ts.trPK('general', 'ok'), () => { + + }, this.ts.trPK('general', 'cancel'), this.ts.trPK('general', 'alert'), this.ts.trPK('eit', 'delete-perm')); + } + + continueDelete(attach) { + let req = { + P_ATTACHED_DOCUMENT_ID: attach.ATTACHED_DOCUMENT_ID + } + this.eitService.deleteAttach(req). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") { + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + let msg: string = ""; + msg = this.ts.trPK("eit", "deleteAttach"); + this.cs.presentAlert(msg); + } + } + }); + } + + updateFile(attachList, attachDocID) { + let req = { + P_ATTACHED_DOCUMENT_ID: attachDocID, + P_FILE_DATA: attachList[0].P_FILE_DATA, + P_FILE_NAME: attachList[0].P_FILE_NAME, + P_FILE_CONTENT_TYPE: attachList[0].P_FILE_CONTENT_TYPE + } + this.eitService.updateAttach(req). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.MessageStatus == 1) { + let msg: string = ""; + msg = this.ts.trPK("eit", "attachUpdate"); + this.cs.presentAlert(msg); + this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); + } + } + }); + } + + + ionViewWillLeave() { + if (this.P_TransactionID && this.isSubmitBtnClicked == false) + this.cancelEitProcess(); + } + + /*******************Add attchement Functions*************/ + + public uploader: FileUploader = new FileUploader({ + allowedMimeType: ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async (item) => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + + onFileSelectedclick(event) { + event.target.value = ''; + } + + + + onFileSelected(input) { + + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "notSupport"); + this.cs.presentAlert(msg); + return + } // todo: show alert that you tried uploading wrong files + + else { + const file = input.target.files[0]; + this.getBase64(file).then( + data => this.pushObject(data, file.name, file.type) + ); + } + } + + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + + pushObject(fileData, name, type) { + + console.log("before push: " + this.index); + try { + let array = name.split('.'); + let attachType: string = array[array.length - 1]; + this.attachListOver.push( + { + AttachmentID: this.attachListOver.length, + P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1], + P_FILE_DATA: fileData.split(',')[1], + P_FILE_NAME: name,//.split('.')[0], + P_TRANSACTION_ID: this.P_TransactionID + }) + + } catch (e) { + } + } + + +} diff --git a/Mohem/src/app/termination/service/termination-service.service.ts b/Mohem/src/app/termination/service/termination-service.service.ts index d980c9d3..5f2d94e1 100644 --- a/Mohem/src/app/termination/service/termination-service.service.ts +++ b/Mohem/src/app/termination/service/termination-service.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; @@ -10,8 +11,10 @@ export class TerminationServiceService { public static GET_TERM_COLS_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_COLS_STRUCTURE'; public static GET_TERM_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_DFF_STRUCTURE'; + public static SUBMIT_TRANSACTION = 'Services/ERP.svc/REST/SUBMIT_TERM_TRANSACTION'; + public static START_APPORVAL = 'Services/ERP.svc/REST/START_TERM_APPROVAL_PROCESS'; public static TERMINATION_PAGE = 'termination-page'; - + public static SHARED_DATA = 'termination-submit-data'; constructor( public con: ConnectorService, private authService: AuthenticationService, @@ -37,4 +40,24 @@ export class TerminationServiceService { errorLabel ); } + submitTransation(request, onError, errorLabel) { + this.authService.authenticateRequest(request); + request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; + return this.con.postNoLoad( + TerminationServiceService.SUBMIT_TRANSACTION, + request, + onError, + errorLabel + ); + } + public startApprovalProcess(basicDetailsProcess: any, onError?: any, errorLabel?: string): Observable { + const request = basicDetailsProcess; + this.authService.authenticateRequest(request); + request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; + return this.con.post(TerminationServiceService.START_APPORVAL, request, onError, errorLabel); + } + + + + } diff --git a/Mohem/src/app/termination/termination-form/termination-form.component.html b/Mohem/src/app/termination/termination-form/termination-form.component.html index f8fa6523..11071910 100644 --- a/Mohem/src/app/termination/termination-form/termination-form.component.html +++ b/Mohem/src/app/termination/termination-form/termination-form.component.html @@ -7,6 +7,7 @@
+
diff --git a/Mohem/src/app/termination/termination-form/termination-form.component.scss b/Mohem/src/app/termination/termination-form/termination-form.component.scss index e69de29b..746e3d4f 100644 --- a/Mohem/src/app/termination/termination-form/termination-form.component.scss +++ b/Mohem/src/app/termination/termination-form/termination-form.component.scss @@ -0,0 +1,3 @@ +#containerDiv{ + margin:15px; +} \ No newline at end of file diff --git a/Mohem/src/app/termination/termination-form/termination-form.component.ts b/Mohem/src/app/termination/termination-form/termination-form.component.ts index f175165a..a7082c9c 100644 --- a/Mohem/src/app/termination/termination-form/termination-form.component.ts +++ b/Mohem/src/app/termination/termination-form/termination-form.component.ts @@ -1,6 +1,9 @@ import { Component, ElementRef, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; import * as moment from 'moment'; +import { EITTransactionsRequest } from 'src/app/eit/models/EITTransactionsReq'; +import { EIT_ACTION } from 'src/app/eit/models/submit.eit.action'; import { EitService } from 'src/app/eit/services/eit.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; @@ -12,6 +15,7 @@ import { NumberInput } from 'src/app/uI-elements/number.input'; import { SelectInput } from 'src/app/uI-elements/select.input'; import { TextInput } from 'src/app/uI-elements/text.input'; import { TimeInput } from 'src/app/uI-elements/time.input'; + import { TerminationServiceService } from '../service/termination-service.service'; @@ -50,7 +54,15 @@ export class TerminationFormComponent implements OnInit { getPassdirfromNotifiPage: boolean = false; private startDate; private endDate; - constructor(public cs: CommonService, private elementRef: ElementRef, public terminationFormService: TerminationServiceService, public ts: TranslatorService, public eitService: EitService) { } + private targetValue; + public eitSubmitAction; + constructor(public cs: CommonService, private elementRef: ElementRef, public terminationFormService: TerminationServiceService, public ts: TranslatorService, public eitService: EitService, public router: ActivatedRoute) { + this.router.queryParams.subscribe(params => { + this.targetValue = params.targetValue; + console.log(this.targetValue); + }); + + } ngOnInit() { this.getPassdirfromNotifiPage = this.cs.sharedService.getSharedData('dirfromNotificationPage'); @@ -58,13 +70,18 @@ export class TerminationFormComponent implements OnInit { this.getTerminationCol(); this.direction = TranslatorService.getCurrentLanguageName(); this.effectiveDate = new Date(); + this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); + this.eitSubmitAction = this.cs.sharedService.getSharedData( + EITTransactionsRequest.SUBMIT_EIT_ACTION + ); } getTerminationCol() { + this.cs.startLoading(); this.terminationFormService.getTerminationColStructure({ P_FUNCTION_NAME: this.selectedMenu.P_FUNCTION_NAME }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { - this.termColStructure = response; - console.log(response); + this.termColStructure = response['GetTermColsStructureList']; + this.drawEitFieldsStatic(this.termColStructure); this.getTermDiffStructure(); }) } @@ -73,15 +90,14 @@ export class TerminationFormComponent implements OnInit { P_DESC_FLEX_CONTEXT_CODE: null, P_FUNCTION_NAME: this.selectedMenu.FUNCTION_NAME }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { - console.log("Diff Structure"); - console.log(response); + this.cs.stopLoading(); this.handleDiffStructure(response); }) } handleDiffStructure(result) { - if (result.GetCcpDffStructureList != null) { - this.diffStructure = result.GetCcpDffStructureList; - this.drawEitFields(result.GetCcpDffStructureList); + if (result.GetTermDffStructureList != null) { + this.diffStructure = result.GetTermDffStructureList; + this.drawEitFields(result.GetTermDffStructureList); if (this.isUpdate) { //this.submitAbsObjList = this.cs.sharedService.getSharedData(ProfileService.EMP_ADDRESS); //this.fillAbsStructure(); @@ -859,7 +875,7 @@ export class TerminationFormComponent implements OnInit { return isSt; } - validateAbcenseTransaction() { + validateTransaction() { (this.elementRef.nativeElement.querySelectorAll( "ion-item" ) as HTMLElement[]).forEach(x => { @@ -867,71 +883,73 @@ export class TerminationFormComponent implements OnInit { x.classList.remove("ng-untouched"); }); - let arrValues = this.getElementsValues(); + var arrValues = this.getElementsValues(); + let staticValues = this.getElementsStaticValues(); + let allStatisDynamicValues = arrValues.concat(staticValues); if (arrValues) { - if (!this.startDate || !this.endDate) { - //this.common.showRequiredMsg(); - return false; - } - let Sdata = moment(this.startDate).format("MM/DD/YYYY"); - let Edata = moment(this.endDate).format("MM/DD/YYYY"); - this.reportSubmitRequest = {} - // this.reports - // .submitTransaction(this.reportSubmitRequest, {}, this.ts.trPK('general', 'retry')) - // .subscribe((result: any) => { - // this.handleSubmitAbsence(result); - // }); + + this.reportSubmitRequest = { + + P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE, + P_SELECTED_RESP_ID: -999, + P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME, + EITTransactionTBL: allStatisDynamicValues, + + }; + this.cs.startLoading(); + this.terminationFormService + .submitTransation(this.reportSubmitRequest, {}, this.ts.trPK('general', 'retry')) + .subscribe((result: any) => { + this.handleSubmit(result); + }); } } - private handleSubmitAbsence(result) { + private handleSubmit(result) { if (this.cs.validResponse(result)) { - if (this.getPassdirfromNotifiPage) { - //this.cs.sharedService.setSharedData(result.ResubmitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); - this.cs.openConfirmAbsece(); + this.cs.sharedService.setSharedData(result['SubmitTermTransactionList'], TerminationServiceService.SHARED_DATA); + this.cs.stopLoading(); + this.cs.confirmTermination(); + } + } - } else { - //this.cs.sharedService.setSharedData(result.SumbitAbsenceTransactionList.P_TRANSACTION_ID, AbsenceResponse.SHARED_DATA); - this.cs.openConfirmAbsece(); - } - } - } getElementsValues() { - //this.updatedValues=[];//fill updated list + public getElementsValues(): any { + this.updatedValues = []; //fill updated list let valuseArr: any = []; let varcharValue: any = null; let numbervalue: any = 0; let dateValue: any = null; - let textValue = ""; - let key: string = ""; - let obj: any = {}; + let transNo: number = 1; + let textValue: any; + // if(this.ExtraObj.transactionNo) + // transNo=this.ExtraObj.transactionNo; for (let i = 0; i < this.diffStructure.length; i++) { varcharValue = null; numbervalue = null; dateValue = null; + /*********set transaction No of the updated object ********/ + if (this.getPassdirfromNotifiPage) { + let updatedObj = this.validateEitObj.find( + x => + x.APPLICATION_COLUMN_NAME == + this.diffStructure[i].APPLICATION_COLUMN_NAME + ); + let y = updatedObj; + transNo = y.TRANSACTION_NUMBER; // set the transaction number for all items in the updated loop + } if (this.diffStructure[i].DISPLAY_FLAG != "N") { if (this.diffStructure[i].VALIDATION_TYPE == "N") { let elem = document.getElementById( this.diffStructure[i].APPLICATION_COLUMN_NAME ) as HTMLInputElement; - let elemVal = ""; - if (elem.classList.contains('onic-date')) { - elemVal = (document.getElementById( - this.diffStructure[i].APPLICATION_COLUMN_NAME - ) as HTMLInputElement).value; - if (elemVal) { - elemVal = moment(elemVal).format("YYYY/MM/DD hh:mm:ss"); - } - - } else { - elemVal = (document.getElementById( - this.diffStructure[i].APPLICATION_COLUMN_NAME - ) as HTMLInputElement).value; - } + let elemVal = (document.getElementById( + this.diffStructure[i].APPLICATION_COLUMN_NAME + ) as HTMLInputElement).value; textValue = elemVal; - + //let elemVal= (document.getElementById(this.eitResponse[i].APPLICATION_COLUMN_NAME)).value; if ( this.diffStructure[i].FORMAT_TYPE == "X" && this.diffStructure[i].DISPLAY_FLAG != "N" @@ -943,25 +961,39 @@ export class TerminationFormComponent implements OnInit { this.diffStructure[i].DISPLAY_FLAG != "N" ) { //standard date time - elemVal = elem.dataset.dtvalue; - // elemVal = this.common.formatStandardDate(elemVal); + // elemVal = elem.dataset.dtvalue; + // elemVal = this.cs.formatStandardDate(elemVal); + elemVal = this.cs.formatDate(elemVal); } else if ( this.diffStructure[i].FORMAT_TYPE == "I" && this.diffStructure[i].DISPLAY_FLAG != "N" ) { //time - elemVal = elem.dataset.dtvalue; + if (elemVal.length > 5) { + elemVal = elemVal.substring(11, 16); + } else { + elemVal = elemVal; + } } if (this.diffStructure[i].REQUIRED_FLAG == "Y" && !elemVal) { elem.classList.add("requiredClassElm"); + //this.common.showRequiredMsg(); return false; } else { elem.classList.remove("requiredClassElm"); } - if (elemVal) varcharValue = elemVal; - key = "P_" + this.diffStructure[i].APPLICATION_COLUMN_NAME; - // obj = {}; - obj[key] = varcharValue; + // if (elemVal != 'null'){ + varcharValue = elemVal; + //} else{ + // elemVal = null; + // } + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.diffStructure[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); } else { let x = document.getElementById( this.diffStructure[i].APPLICATION_COLUMN_NAME @@ -981,20 +1013,21 @@ export class TerminationFormComponent implements OnInit { varcharValue = val; textValue = txt; } - if ( - this.diffStructure[i].REQUIRED_FLAG == "Y" && - !varcharValue - ) { + if (this.diffStructure[i].REQUIRED_FLAG == "Y" && !varcharValue) { x.classList.add("requiredClassElm"); - // this.common.showRequiredMsg(); + //this.common.showRequiredMsg(); return false; } else { x.classList.remove("requiredClassElm"); } - key = "P_" + this.diffStructure[i].APPLICATION_COLUMN_NAME; - //obj = {}; - obj[key] = varcharValue; + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.diffStructure[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); } //end else } else { let x = document.getElementById( @@ -1002,23 +1035,427 @@ export class TerminationFormComponent implements OnInit { ) as HTMLSelectElement; let val = x.dataset.colmText; textValue = x.value; - if (this.diffStructure[i].REQUIRED_FLAG == "Y" && !varcharValue) { + if (this.diffStructure[i].REQUIRED_FLAG == "Y" && !val) { x.classList.add("requiredClassElm"); - // this.common.showRequiredMsg(); + //this.common.showRequiredMsg(); return false; } else { x.classList.remove("requiredClassElm"); } - if (val) varcharValue = val; - key = "P_" + this.diffStructure[i].APPLICATION_COLUMN_NAME; - //obj = {}; - obj[key] = varcharValue; + } + + if (this.getPassdirfromNotifiPage) { + let updatedObj = this.validateEitObj.find( + x => + x.APPLICATION_COLUMN_NAME == + this.diffStructure[i].APPLICATION_COLUMN_NAME + ); + let y = updatedObj; + y.VARCHAR2_VALUE = varcharValue; + y.NUMBER_VALUE = numbervalue; + y.DATE_VALUE = dateValue; + y.SEGMENT_VALUE_DSP = textValue; + transNo = y.TRANSACTION_NUMBER; // set the transaction number for all items in the updated loop + this.updatedValues.push(y); + } else { + if (this.validateEitObj && this.eitSubmitAction == EIT_ACTION.UPDATE) { + let updatedObj = this.validateEitObj.find( + x => + x.APPLICATION_COLUMN_NAME == + this.diffStructure[i].APPLICATION_COLUMN_NAME + ); + let y = updatedObj; + y.VARCHAR2_VALUE = varcharValue; + y.NUMBER_VALUE = numbervalue; + y.DATE_VALUE = dateValue; + y.SEGMENT_VALUE_DSP = textValue; + transNo = transNo; // set the transaction number for all items in the updated loop + this.updatedValues.push(y); + } else { + let y = { + TRANSACTION_NUMBER: transNo, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue, + SEGMENT_VALUE_DSP: textValue, + APPLICATION_COLUMN_NAME: this.diffStructure[i] + .APPLICATION_COLUMN_NAME, + DATATYPE: this.diffStructure[i].DATATYPE, + DESC_FLEX_CONTEXT_CODE: this.diffStructure[i].DESC_FLEX_CONTEXT_CODE, + DESC_FLEX_NAME: this.diffStructure[i].DESC_FLEX_NAME, + DISPLAY_FLAG: this.diffStructure[i].DISPLAY_FLAG, + SEGMENT_NAME: this.diffStructure[i].SEGMENT_NAME, + SEGMENT_PROMPT: this.diffStructure[i].SEGMENT_PROMPT + }; + transNo = transNo; // set the transaction number for all items in the updated loop + this.updatedValues.push(y); + } } } // end for - valuseArr.push(obj); + if (this.getPassdirfromNotifiPage) { + let updatedObj1 = this.validateEitObj.find( + x => x.APPLICATION_COLUMN_NAME === "PEI_ACTION" + ); + let updatedObj2 = this.validateEitObj.find( + x => x.APPLICATION_COLUMN_NAME === "PEI_EXTRA_INFO_ID" + ); + let updatedObj3 = this.validateEitObj.find( + x => x.APPLICATION_COLUMN_NAME === "PEI_OBJECT_VERSION_NUMBER" + ); + this.updatedValues.push(updatedObj1); + this.updatedValues.push(updatedObj2); + this.updatedValues.push(updatedObj3); + valuseArr = this.fillExtraInformation( + valuseArr, + updatedObj1.VARCHAR2_VALUE, + updatedObj2.NUMBER_VALUE, + updatedObj3.NUMBER_VALUE, + transNo + ); + } else { + if (this.eitSubmitAction == EIT_ACTION.ADD) { + this.updatedValues = this.fillExtraValuesUpdated( + this.updatedValues, + "NEW_ROW", + -1, + 0, + transNo + ); + valuseArr = this.fillExtraInformation( + valuseArr, + "NEW_ROW", + -1, + 0, + transNo + ); + } else if (this.eitSubmitAction == EIT_ACTION.UPDATE) { + valuseArr = this.fillExtraInformation( + valuseArr, + "UPDATE_ROW", + this.ExtraObj.peiExtraInfoID, + this.ExtraObj.peiObjVer, + transNo + ); + } else if (this.eitSubmitAction == EIT_ACTION.DELETE) { + valuseArr = this.fillExtraInformation( + valuseArr, + "DELETE_ROW", + this.ExtraObj.peiExtraInfoID, + this.ExtraObj.peiObjVer, + transNo + ); + } + } return valuseArr; + } // end getElementsValues + + fillExtraValuesUpdated( + values: any, + peiAction: string, + peiExtraInfoID: number, + peiObjVer: number, + transNo: number + ): any { + let obj1 = { + TRANSACTION_NUMBER: transNo, + VARCHAR2_VALUE: peiAction, + NUMBER_VALUE: null, + DATE_VALUE: null, + SEGMENT_VALUE_DSP: "", + APPLICATION_COLUMN_NAME: "PEI_ACTION", + DATATYPE: "VARCHAR2", + DESC_FLEX_CONTEXT_CODE: "", + DESC_FLEX_NAME: "", + DISPLAY_FLAG: "N", + SEGMENT_NAME: "", + SEGMENT_PROMPT: "" + }; + let obj2 = { + TRANSACTION_NUMBER: 1, + APPLICATION_COLUMN_NAME: "PEI_OBJECT_VERSION_NUMBER", + VARCHAR2_VALUE: null, + NUMBER_VALUE: peiObjVer, + DATATYPE: "NUMBER", + SEGMENT_VALUE_DSP: "", + DATE_VALUE: null, + DESC_FLEX_CONTEXT_CODE: "", + DESC_FLEX_NAME: "", + DISPLAY_FLAG: "N", + SEGMENT_NAME: "", + SEGMENT_PROMPT: "" + }; + let obj3 = { + APPLICATION_COLUMN_NAME: "PEI_EXTRA_INFO_ID", + DATATYPE: "NUMBER", + DATE_VALUE: null, + DESC_FLEX_CONTEXT_CODE: "", + DESC_FLEX_NAME: "", + DISPLAY_FLAG: "N", + NUMBER_VALUE: peiExtraInfoID, + SEGMENT_NAME: "", + SEGMENT_PROMPT: "", + SEGMENT_VALUE_DSP: "", + TRANSACTION_NUMBER: transNo, + VARCHAR2_VALUE: null + }; + values.push(obj1); + values.push(obj2); + values.push(obj3); + return values; } + fillExtraInformation( + values: any, + peiAction: string, + peiExtraInfoID: number, + peiObjVer: number, + transNo: number + ): any { + values.push({ + TRANSACTION_NUMBER: transNo, + NAME: "PEI_ACTION", + VARCHAR2_VALUE: peiAction, + NUMBER_VALUE: null, + DATE_VALUE: null + }); + values.push({ + TRANSACTION_NUMBER: transNo, + NAME: "PEI_EXTRA_INFO_ID", + VARCHAR2_VALUE: null, + NUMBER_VALUE: peiExtraInfoID, + DATE_VALUE: null + }); + values.push({ + TRANSACTION_NUMBER: transNo, + NAME: "PEI_OBJECT_VERSION_NUMBER", + VARCHAR2_VALUE: null, + NUMBER_VALUE: peiObjVer, + DATE_VALUE: null + }); + return values; + } + + fixTransactionNo(transactionTBL: any): any[] { + let list: any = []; + let newIndex: number = 1; + let length: number = transactionTBL.length; + if (length > 0) { + for (let i = 0; i < length; i++) { + // let item :any={}; + const item = Object.assign({}, transactionTBL[i]); + let transNo: number = item.TRANSACTION_NUMBER; + let obj: any = item; + if (i == 0) { + obj.TRANSACTION_NUMBER = newIndex; + list.push(obj); + } else { + let prevEl: any = transactionTBL[i - 1].TRANSACTION_NUMBER; + if (transNo == prevEl) { + obj.TRANSACTION_NUMBER = newIndex; + list.push(obj); + } else { + newIndex++; + obj.TRANSACTION_NUMBER = newIndex; + list.push(obj); + } + } + } + } + return list; + } + private drawEitFieldsStatic(feildsList) { + const containerId = "containerDivTwo"; + this.eitVALSettoCall = []; + for (let i = 0; i < feildsList.length; i++) { + let defaultVal: string = ""; + let defaultValText: string = ""; + + if (feildsList[i].DISPLAY_FLAG != "N") { + //text , date , time + if (feildsList[i].DATATYPE == "VARCHAR2" && feildsList[i].ObjectValuesList === null) { + // character + this.textInput = new TextInput( + feildsList[i].SEGMENT_PROMPT, + feildsList[i].APPLICATION_COLUMN_NAME, + defaultVal, + containerId, + defaultValText, + feildsList[i].MOBILE_ENABLED, + feildsList[i].DISPLAY_FLAG, + feildsList[i].REQUIRED_FLAG + ); + } else if (feildsList[i].DATATYPE == "VARCHAR2" && feildsList[i].ObjectValuesList !== null) { + this.selectInput = new SelectInput( + feildsList[i].SEGMENT_PROMPT, + feildsList[i].APPLICATION_COLUMN_NAME, + defaultVal, + containerId, + feildsList[i].MOBILE_ENABLED, + feildsList[i].DISPLAY_FLAG, + feildsList[i].REQUIRED_FLAG + ); + this.fillStaticDropdownList( + feildsList[i].SEGMENT_NAME, + feildsList[i].ObjectValuesList, + feildsList[i].APPLICATION_COLUMN_NAME + ); + } else if (feildsList[i].DATATYPE == "NUMBER") { + this.numberInput = new NumberInput( + feildsList[i].SEGMENT_PROMPT, + feildsList[i].APPLICATION_COLUMN_NAME, + defaultVal, + containerId, + feildsList[i].MOBILE_ENABLED, + feildsList[i].DISPLAY_FLAG, + feildsList[i].REQUIRED_FLAG + ); + } else if (feildsList[i].DATATYPE == "DATE") { + this.dateInput = new DateInput( + feildsList[i].SEGMENT_PROMPT, + feildsList[i].APPLICATION_COLUMN_NAME, + "", + containerId, + feildsList[i].MOBILE_ENABLED, + feildsList[i].DISPLAY_FLAG, + feildsList[i].REQUIRED_FLAG, + this.direction + ); + + } + } + } + + } + + public fillStaticDropdownList(segmentName, optionList: any = [], elemID: string) { + let eitObj: any; + if (optionList.length > 0) { + let select = document.getElementById(elemID) as HTMLSelectElement; + document.getElementById(elemID).innerHTML = ""; + + for (let i = 0; i < optionList.length; i++) { + var option = document.createElement("option"); + option.text = optionList[i].MEANING; + option.value = optionList[i].CODE; + select.add(option); + } + } + } + + public getElementsStaticValues(): any { + this.updatedValues = []; //fill updated list + let valuseArr: any = []; + let varcharValue: any = null; + let numbervalue: any = 0; + let dateValue: any = null; + let transNo: number = 1; + let textValue: any; + + for (let i = 0; i < this.termColStructure.length; i++) { + varcharValue = null; + numbervalue = null; + dateValue = null; + + if (this.termColStructure[i].DISPLAY_FLAG != "N") { + if (this.termColStructure[i].ObjectValuesList === null) { + let elem = document.getElementById(this.termColStructure[i].APPLICATION_COLUMN_NAME) as HTMLInputElement; + let elemVal = elem !== null ? (document.getElementById(this.termColStructure[i].APPLICATION_COLUMN_NAME) as HTMLInputElement).value : ''; + textValue = elemVal; + + if (this.termColStructure[i].DATATYPE == "VARCHAR2" || this.termColStructure[i].DATATYPE == "NUMBER") { + elemVal = elemVal; + } else if (this.termColStructure[i].DATATYPE == "DATE") { + // date + elemVal = this.cs.formatDate(elemVal); + } + + if (this.targetValue === 'new') { + if (this.termColStructure[i].REQUIRED_FLAG == "Y" && !elemVal) { + elem.classList.add("requiredClassElm"); + return false; + } else { + elem.classList.remove("requiredClassElm"); + } + } + + if (this.termColStructure[i].DATATYPE == "DATE") { + dateValue = elemVal; + } else if (this.termColStructure[i].DATATYPE == "NUMBER") { + numbervalue = elemVal; + } else { + varcharValue = elemVal; + } + + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.termColStructure[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); + } else { + let x = document.getElementById(this.termColStructure[i].APPLICATION_COLUMN_NAME) as HTMLSelectElement; + + let val = x.options && x.options[x.selectedIndex] ? x.options[x.selectedIndex].value : null; + let txt = x.options && x.options[x.selectedIndex] ? x.options[x.selectedIndex].text : null; + varcharValue = val; + textValue = txt; + + if (x !== null) { + if (this.termColStructure[i].REQUIRED_FLAG == "Y" && !varcharValue) { + x.classList.add("requiredClassElm"); + return false; + } else { + x.classList.remove("requiredClassElm"); + } + } + + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.termColStructure[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); + } + } else { + let x = document.getElementById(this.termColStructure[i].APPLICATION_COLUMN_NAME) as HTMLSelectElement; + let val = x !== null ? x.dataset.colmText : ''; + textValue = x !== null ? x.value : ''; + + if (x !== null) { + if (this.termColStructure[i].REQUIRED_FLAG == "Y" && !val) { + x.classList.add("requiredClassElm"); + return false; + } else { + x.classList.remove("requiredClassElm"); + } + } + varcharValue = val; + + + + valuseArr.push({ + TRANSACTION_NUMBER: transNo, + NAME: this.termColStructure[i].APPLICATION_COLUMN_NAME, + VARCHAR2_VALUE: varcharValue, + NUMBER_VALUE: numbervalue, + DATE_VALUE: dateValue + }); + } + } + return valuseArr; + } + public customiseDate(date: any) { + let formatedDate = date.slice(0, 9); + let newDate = formatedDate.split("/").reverse(); + const tmp = newDate[2]; + newDate[2] = newDate[1]; + newDate[1] = tmp; + newDate = newDate.join("/"); + newDate = newDate + ' 00:00:00'; + return newDate; + } } diff --git a/Mohem/src/app/termination/termination.module.ts b/Mohem/src/app/termination/termination.module.ts index aadbde53..7302cb97 100644 --- a/Mohem/src/app/termination/termination.module.ts +++ b/Mohem/src/app/termination/termination.module.ts @@ -9,6 +9,8 @@ import { TerminationPage } from './termination.page'; import { TerminationFormComponent } from './termination-form/termination-form.component'; import { TerminationServiceService } from './service/termination-service.service'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; +import { ConfirmTerminationComponent } from './confirm-termination/confirm-termination.component'; +import { SubmitAddressModalComponent } from '../profile/submit-eit-modal/submit-address-modal.component'; const routes: Routes = [ @@ -20,6 +22,10 @@ const routes: Routes = [ path: 'termination-form', component: TerminationFormComponent }, + { + path: 'confirm-termination', + component: ConfirmTerminationComponent + }, ], } @@ -33,7 +39,8 @@ const routes: Routes = [ RouterModule.forChild(routes), HmgCommonModule ], - declarations: [TerminationPage, TerminationFormComponent], - providers: [TerminationServiceService] + declarations: [TerminationPage, TerminationFormComponent, ConfirmTerminationComponent], + providers: [TerminationServiceService], + entryComponents: [SubmitAddressModalComponent] }) export class TerminationPageModule { } diff --git a/Mohem/src/assets/imgs/hr-request.png b/Mohem/src/assets/imgs/hr-request.png new file mode 100644 index 0000000000000000000000000000000000000000..c905603b82cab874185551c94467b9cf0993a790 GIT binary patch literal 10488 zcmdU#dpMNc+xOQs!;Bcal)Y@CsF3WlO~g>qP>}|0WFH}$(2TUvEt{r^5)mTGCc+rx za_4TNkVqIY)h$vOZJ4r|ca8h^`@Q$?c%I{VkN0_w_m9_cbTl*9y3Vz(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-I4*Z=f2D z7%!H2@`x(>21W^A@fq}$$M+@0G zI76qasU|>lDqt0e>H8_E9b#z#8^q%$l+=b-3)xDXu=EnDiQv^jwvR{jokc*TjcDi( zIB!m3(?X1w5UmZR06Gg;8h1Bn-&AJa|4qcqmZ7!-udM}^DXX)KTtYy+a%vd<a1NA}TexGHw-aL_!tL%utce=GZ5WAixU-Fq# zUw-tGEx>+!wF_`byoyUJ(v$ez8h-t87}zL@&gMY%TA}P9*70H*fZwLrRrnP%8%yl> zYQS=jyrAhNzFW(exa9w9K>Neg*f6_|^vKCj0<0cO(b=4|hZ#o*KBcla1E<3UCB67`Y%g&r zY-u>K$8&cpwZVi*MY6AqSfz{sl90WHlC(|7|@tV;#vdCG}y!4kgLQ2F=d##yw zj4NBe_feui8#k@w`#=7EnDw3qD^)M@V~+PD$&C}K#q@=(N&(o7BsbreyiX3TQ3a!( zH*t5EJs~HDzUtD1RhSPxaE0fu2QfV^DK=GC?X^q7Yt3VIt3e*U8-xdN z?OJODrgqz2+j_a&{0(i?bm!6Fd%u<*A8&eMJOa{69jz)ccc~}kRaM~Ix^3s!WW*8k z%z?(!`{s0vcb9bsI9NqdZ0ZxGI^}PJ=SuOb%K33=zt|Ms5Cp&N@#O3pCQ>u1@+?GC zxujtt>5B>VdH*d9O2Cq*;+cg-^03p;EUHcTY!v&33m8x*kIQbD^j){kga zXme`2fz;RD>gdi>dT?F&jga1Yykjb_Ps7wa*YlMOe8#t{Z)heJ j>Kp3aOF5lFciu8XL=6;;R^(O%0$xna+UT>ZWc&UBh!XoN literal 0 HcmV?d00001 diff --git a/Mohem/src/assets/imgs/pending-transaction.png b/Mohem/src/assets/imgs/pending-transaction.png new file mode 100644 index 0000000000000000000000000000000000000000..d252ad43366869111863408b6ba9261fca23b866 GIT binary patch literal 11004 zcmeIYc|4R~_&WM-055=N;kk#5T`2G_~1KbMRF2=fAIoGli~Xss-4>@07RZI|6{Ih7LkKQnQ$A| z@PlFg;ZcWA`hlpZD4oFL!KZu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update-contact.component.ts | 2 +- Mohem/src/assets/localization/i18n.json | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts index 250c5f71..d53d5627 100644 --- a/Mohem/src/app/itemforsale/home/home.component.ts +++ b/Mohem/src/app/itemforsale/home/home.component.ts @@ -159,7 +159,7 @@ export class HomeComponent implements OnInit { request.append('status', this.itemCondition); console.log(this.selectedFile); if (this.selectedFile && this.selectedFile !== undefined) { - request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name); + request.append('fileColl', this.addAttachRequest.toString()); } request.append('Channel', authUser.Channel.toString()); request.append('LogInToken', authUser.LogInTokenID); diff --git a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts index 6f4c6882..0005fcd2 100644 --- a/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts +++ b/Mohem/src/app/profile/add-update-contact/add-update-contact.component.ts @@ -1335,7 +1335,7 @@ export class AddUpdateContactComponent implements OnInit { if (this.employeeBasicDetails[i].VARCHAR2_VALUE) { val = this.employeeBasicDetails[i].VARCHAR2_VALUE; } else if (this.employeeBasicDetails[i].DATE_VALUE) { - val = this.customiseDate(this.employeeBasicDetails[i].DATE_VALUE); + val = this.cs.formatDate(this.employeeBasicDetails[i].DATE_VALUE); if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'EFFECTIVE_DATE') { this.effectiveDate = this.employeeBasicDetails[i].DATE_VALUE; this.showEffectiveDate = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP; diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index aaeece2d..6d68cc24 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -1496,12 +1496,12 @@ "ar": "حذف" }, "update-msg": { - "en": "Are you sure you want update this member ?", + "en": "Are you sure you want to update this member ?", "ar": "هل انت متاكد من تعديل هذا العضو؟" }, "remove-msg": { - "en": "Are you sure you want rmove this member ?", - "ar": "هل انت متاكد من حذف هذا العضو ؟" + "en": "Are you sure you want to remove this member?", + "ar": "هل أنت متأكد أنك تريد إزالة هذا العضو؟" }, "update-confirm": { "en": "member updated successfully", From 14fb8f7ba75a865f77185a8215ba10bd4a05f22f Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 19 Jan 2022 12:50:41 +0300 Subject: [PATCH 3/3] added child education --- .../app/eit/add-cei/add-cei.component.html | 3 +++ .../app/eit/add-cei/add-cei.component.scss | 0 .../app/eit/add-cei/add-cei.component.spec.ts | 27 +++++++++++++++++++ .../src/app/eit/add-cei/add-cei.component.ts | 14 ++++++++++ .../cei-homepage/cei-homepage.component.html | 3 +++ .../cei-homepage/cei-homepage.component.scss | 0 .../cei-homepage.component.spec.ts | 27 +++++++++++++++++++ .../cei-homepage/cei-homepage.component.ts | 14 ++++++++++ .../confirm-add-cei.component.html | 3 +++ .../confirm-add-cei.component.scss | 0 .../confirm-add-cei.component.spec.ts | 27 +++++++++++++++++++ .../confirm-add-cei.component.ts | 14 ++++++++++ .../services/connector/connector.service.ts | 4 +-- 13 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.html create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.scss create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.spec.ts create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.ts create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.html create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.scss create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.html b/Mohem/src/app/eit/add-cei/add-cei.component.html new file mode 100644 index 00000000..bda6751d --- /dev/null +++ b/Mohem/src/app/eit/add-cei/add-cei.component.html @@ -0,0 +1,3 @@ +

+ add-cei works! +

diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.scss b/Mohem/src/app/eit/add-cei/add-cei.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.spec.ts b/Mohem/src/app/eit/add-cei/add-cei.component.spec.ts new file mode 100644 index 00000000..fa819bbd --- /dev/null +++ b/Mohem/src/app/eit/add-cei/add-cei.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddCeiComponent } from './add-cei.component'; + +describe('AddCeiComponent', () => { + let component: AddCeiComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddCeiComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddCeiComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.ts b/Mohem/src/app/eit/add-cei/add-cei.component.ts new file mode 100644 index 00000000..de223c5d --- /dev/null +++ b/Mohem/src/app/eit/add-cei/add-cei.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-add-cei', + templateUrl: './add-cei.component.html', + styleUrls: ['./add-cei.component.scss'], +}) +export class AddCeiComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html new file mode 100644 index 00000000..69b119b1 --- /dev/null +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html @@ -0,0 +1,3 @@ +

+ cei-homepage works! +

diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.scss b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts new file mode 100644 index 00000000..3ebdf92c --- /dev/null +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CeiHomepageComponent } from './cei-homepage.component'; + +describe('CeiHomepageComponent', () => { + let component: CeiHomepageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CeiHomepageComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CeiHomepageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts new file mode 100644 index 00000000..3a70a668 --- /dev/null +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-cei-homepage', + templateUrl: './cei-homepage.component.html', + styleUrls: ['./cei-homepage.component.scss'], +}) +export class CeiHomepageComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html new file mode 100644 index 00000000..f31f1941 --- /dev/null +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html @@ -0,0 +1,3 @@ +

+ confirm-add-cei works! +

diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts new file mode 100644 index 00000000..2cf5f990 --- /dev/null +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmAddCeiComponent } from './confirm-add-cei.component'; + +describe('ConfirmAddCeiComponent', () => { + let component: ConfirmAddCeiComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ConfirmAddCeiComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmAddCeiComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts new file mode 100644 index 00000000..f9a1a620 --- /dev/null +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-confirm-add-cei', + templateUrl: './confirm-add-cei.component.html', + styleUrls: ['./confirm-add-cei.component.scss'], +}) +export class ConfirmAddCeiComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index 62631565..70a9d157 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; - public static host = 'https://uat.hmgwebservices.com/'; - // public static host = 'https://hmgwebservices.com/'; + // public static host = 'https://uat.hmgwebservices.com/'; + public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService,