diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 59242c26..18f7e8c0 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -103,6 +103,7 @@ import { AccordinTabCustomComponent} from './ui/accordin-custom/accordin-tab-cus import{ConfirmLoginComponent} from '../authentication/confirm-login/confirm-login.component' import{WelcomeComponent} from './ui/welcome-login/welcome.component' import {DashboredService} from './services/dashbored/dashbored.service' +// import {TurncatePipe} from '../pipes/turncate/turncate.pipe' @NgModule({ imports: [ CommonModule, @@ -130,6 +131,7 @@ import {DashboredService} from './services/dashbored/dashbored.service' DatePipeTransform, DateTimePipe, SafeHtmlPipe, + // TurncatePipe, BackButtonComponent, IfDatePipe, DynamicTableComponent, @@ -186,6 +188,7 @@ import {DashboredService} from './services/dashbored/dashbored.service' DividerComponent, NavButtonsComponent, DatePipeTransform, + // TurncatePipe, TranslatePipe, DateTimePipe, SafeHtmlPipe, 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 532e6bd4..165833a2 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -424,7 +424,7 @@ export class CommonService { { text: cancelLabel, role: "cancel", - cssClass: "cancelBtn", + cssClass: "checkOutCancelBtn", handler: () => { if (onCancel) { onCancel(); @@ -436,7 +436,7 @@ export class CommonService { text: acceptLabel, role: "Confirm", - cssClass: "confirmBtn", + cssClass: "checkOutOkBtn", handler: () => { diff --git a/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts b/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts index 30a4befd..378cc5e6 100644 --- a/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts +++ b/Mohem/src/app/hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest.ts @@ -4,5 +4,5 @@ export class GetSubordinatesLeavesRequest extends Request{ //public static SHARED_DATA = ''; public P_DATE_FROM :any; public P_DATE_TO :any; - + public P_SELECTED_EMPLOYEE_NUMBER:any; } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss b/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss index 14151600..18ee0a3a 100644 --- a/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss +++ b/Mohem/src/app/hmg-common/ui/accordin-custom/accordin-tab-custom/accordin-tab-custom.component.scss @@ -49,9 +49,9 @@ text-overflow: ellipsis; white-space: nowrap; overflow: hidden !important; - font-size: 0.46cm; + font-size: 16px; width: 78%; - font-weight: bold; + font-weight: bold !important; } diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts index 666e31b9..cc5f068a 100644 --- a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts +++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts @@ -19,9 +19,9 @@ export class ApplyActionModalComponent implements OnInit { constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService, ) { - this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo'); - this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr'); - this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage'); + this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo',false); + this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr' ,false); + this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage',false); } diff --git a/Mohem/src/app/notification/item-history/item-history.component.html b/Mohem/src/app/notification/item-history/item-history.component.html index c68df82b..1ac2132a 100644 --- a/Mohem/src/app/notification/item-history/item-history.component.html +++ b/Mohem/src/app/notification/item-history/item-history.component.html @@ -21,8 +21,8 @@
{{ts.trPK('worklistMain','info')}}
--> - -
+ +

{{ 'general, empty' | translate}}

diff --git a/Mohem/src/app/notification/more-action-modal/more-action-modal.component.html b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.html new file mode 100644 index 00000000..8a39b98e --- /dev/null +++ b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.html @@ -0,0 +1,44 @@ + + + + + + + + +

More Action

+
+
+ + + {{button.BUTTON_LABEL}} + + + + +
+
+ +
+ + + + + {{ts.trPK('general','ok')}} + + + + + {{ts.trPK('general','cancel')}} + + + + +
\ No newline at end of file diff --git a/Mohem/src/app/notification/more-action-modal/more-action-modal.component.scss b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.scss new file mode 100644 index 00000000..8c01def2 --- /dev/null +++ b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.scss @@ -0,0 +1,22 @@ +.rowBtn{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.Header{ + color: black !important; + font-size: 16px !important; + font-weight: bold !important;; + margin: 0; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-58px, 2px); +} + +.labelRadio{ + color: black !important; + font-weight: bold !important; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/more-action-modal/more-action-modal.component.spec.ts b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.spec.ts new file mode 100644 index 00000000..20fcff12 --- /dev/null +++ b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MoreActionModalComponent } from './more-action-modal.component'; + +describe('MoreActionModalComponent', () => { + let component: MoreActionModalComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MoreActionModalComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MoreActionModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification/more-action-modal/more-action-modal.component.ts b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.ts new file mode 100644 index 00000000..3a52bbc2 --- /dev/null +++ b/Mohem/src/app/notification/more-action-modal/more-action-modal.component.ts @@ -0,0 +1,44 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { ModalController } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-more-action-modal', + templateUrl: './more-action-modal.component.html', + styleUrls: ['./more-action-modal.component.scss'], +}) +export class MoreActionModalComponent implements OnInit { + actionBtns :any =[]; + radioButtonValue: any; + constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){} + + ngOnInit() { + console.log("modal"); + this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false); + console.log("modal"); + + } + closeModal() { + this.modalCtrl.dismiss(); + } + + radioSelect(v) { + this.radioButtonValue = v; + console.log("radio selected"+v); + } + + OkBtnModal() { + if (!this.radioButtonValue) { + let msg: string = this.ts.trPK("replacementRoll", "msg"); + this.cs.presentAlert(msg); + return; + } else { + let data = this.radioButtonValue; + this.modalCtrl.dismiss(data); + } + } + + + +} diff --git a/Mohem/src/app/notification/notification.module.ts b/Mohem/src/app/notification/notification.module.ts index df9194f2..7b2004ac 100644 --- a/Mohem/src/app/notification/notification.module.ts +++ b/Mohem/src/app/notification/notification.module.ts @@ -26,7 +26,7 @@ import { ItemHistoryComponent } from './item-history/item-history.component'; import { QutationAnalysisComponent } from './qutation-analysis/qutation-analysis.component'; import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.component'; // import { WorklistMainComponent } from './worklist-main/worklist-main.component'; - +import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component' const routes: Routes = [ @@ -98,7 +98,11 @@ const routes: Routes = [ { path:'worklist-main-MR', component:WorklistMainMRComponent - } + }, + { + path: 'more-action-modal', + component: MoreActionModalComponent + }, ] } ]; @@ -119,6 +123,7 @@ const routes: Routes = [ WorkListReplacementRollComponent, WorkListRfcComponent, ViewNoteModalComponent, + MoreActionModalComponent, ApplyActionModalComponent, ViewReplacementModalComponent, WorkListActionHistoryComponent, diff --git a/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.html b/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.html index 69ab83e9..92236371 100644 --- a/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.html +++ b/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.html @@ -22,7 +22,7 @@ --> -
+

{{ 'general, empty' | translate}}

diff --git a/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss index b4736409..d28c9952 100644 --- a/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss +++ b/Mohem/src/app/notification/view-replacement-modal/view-replacement-modal.component.scss @@ -9,3 +9,7 @@ ion-content { padding-top: 30px !important; border: solid 1px #dedede; } +:host(.activated) .item-native { + background: var(--red) !important; + color: var(--grey) !important; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index ea8e644f..2aaf95d6 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -1,13 +1,13 @@ - - - {{ 'replacementRoll, title' | translate}} + + + {{ 'replacementRoll, title' | translate}} - + - + {{'replacementRoll, searchBy' | translate}} - - + + + + + + - - - - + -
+
{{"replacementRoll, question" | translate}} : {{pQuestion}} ? {{"replacementRoll, answer" | translate}} @@ -55,26 +56,77 @@ - - - - {{employee.EMPLOYEE_DISPLAY_NAME}}
{{employee.USER_NAME}}
+ + + + + + + + +
+
+
+ + + + +
+ + - +
+ +
+ +
+ + + {{employee.EMPLOYEE_DISPLAY_NAME}} +
{{employee.USER_NAME}}
+ {{employee.EMAIL_ADDRESS}} +
+
+
+ +
+ + +
+ -
-
- + {{'general, submit' | translate}} + + + {{'general, cancel' | translate}}
\ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss index e4e64f20..ad0859b8 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss @@ -9,8 +9,119 @@ button.item-button.button.button-md.button-clear.button-clear-md { min-width: 200px; } -ion-item { - margin-top: 5%; - margin-right: 7%; - width: 100%; +// ion-item { +// margin-top: 5%; +// margin-right: 7%; +// width: 100%; +// } +.ionItem{ + border: #e4e4e4 solid; + /* margin: 6px; */ + /* padding: 11px; */ + height: 85px; + width: 164px; + border-radius: 5px; + text-align: center; + } + + +.profileImageDiv{ + text-align: center; + margin-bottom: -27px; + z-index: 3; + position: relative; + top: 0; + +} +.profileImage{ + width:60px !important; + // margin-left: -25px; + // margin-right: 22px; +} + +.activated{ + border: #209a83 0.02cm solid ; +} +.deactivated{ border: #e4e4e4 0.02cm solid; +} +.repContentDiv{ + text-align: center; + width: 85%; + font-size: 14px; + border: #e4e4e4 solid; + border-radius: 5px; + padding: 20px 8px 8px 8px; + margin-top: -9px; + margin-right: -35px + +} +.selIEmpDiv{ + text-align: right; + margin-bottom: -26px; + margin-right: 0px; + z-index: 3; + position: relative; + top: 0; +} + +.selIEmpImage{ + width:22px !important + +} + +.noteInput{ + border: solid var(--gray) 1px; + border-radius: 15px; + margin: 8px 17px 0px 17px; + padding: 10px 2px 10px 2px; +} +.filterInput{ + border: solid var(--gray) 1px; + border-radius: 21px; + padding-left: 10px !important; +} +.filterBtn{ + background: var(--newgreen); + --background: var (--newgreen); + border-radius: 50%; + height: 60px; + width: 60px; +} + + + +*{ + box-sizing: border-box; +} + +.square-container{ + // padding: 8px; + width:100%; +} +.square{ + // width:calc(100% / 2); + width:50%; + float:left; + position: relative; + // padding-bottom: calc(100% / 2); +} + +.square .content{ + width: calc(100% - 16px) !important; + height: calc(100% - 16px) !important; + margin: 8px; + padding: 16px; + // position: absolute; + color: white; + border-radius: 9px; + text-align: center; + // background-color: #0095ff; + // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); +} + + + + + + diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index 3bd1c428..beffd7b2 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -36,6 +36,8 @@ export class WorkListReplacementRollComponent implements OnInit { private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest(); private WorkListActionObj: WorkListActionRequest; getpassResAttr: any = []; + active: any; + demoeAttach:any=[]; constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; @@ -51,15 +53,45 @@ export class WorkListReplacementRollComponent implements OnInit { this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionObj = new WorkListActionRequest(); - this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;//26919060; this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; this.WorkListActionObj.P_ACTION_MODE = ""; this.WorkListActionObj.P_COMMENTS = ""; - this.WorkListActionObj.RespondAttributeList = this.getpassResAttr; + this.WorkListActionObj.RespondAttributeList =[];// this.getpassResAttr; this.WorkListActionObj.P_APPROVER_INDEX = null; } - ngOnInit() { } + ngOnInit() { + + this.demoeAttach = [{ + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj", + + + + }, + { + + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj" + + }, + { + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj" + + }, + { + USER_NAME: '18888', + EMPLOYEE_DISPLAY_NAME: "AAA fgfhfhfhf hyutyututut ", + EMAIL_ADDRESS: "test@yuyuu.hjj" + + } + ]; + } getreplacmentemployee() { this.ReplacementList = []; @@ -163,6 +195,13 @@ export class WorkListReplacementRollComponent implements OnInit { this.selectedValue = Value; } + + + select(selectEmp,index){ + console.log(selectEmp.EMPLOYEE_DISPLAY_NAME); + this.selEmp=selectEmp + this.active=index; + } clear() { this.selEmpName = ""; this.selectedUserInf = null; @@ -188,10 +227,15 @@ export class WorkListReplacementRollComponent implements OnInit { } submitAction() { + this.selEmp + if (this.selEmp && this.isAnswer == false) { - this.selectedUserInf = this.ReplacementList[this.selEmp]; + // this.selectedUserInf = this.ReplacementList[this.selEmp]; + this.selectedUserInf = this.selEmp; + console.log("selEmp "+ this.selEmp.USER_NAME); if (this.selectedUserInf && this.selectedUserInf.USER_NAME) { + console.log("userInfo "+this.selectedUserInf.USER_NAME); if (this.userNote) { this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; @@ -290,4 +334,12 @@ export class WorkListReplacementRollComponent implements OnInit { } } + public col(){ + alert("test"); + } + + closeModal() { + this.modalCtrl.dismiss(); + } + } diff --git a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html index f29ecac0..bc8a7eb5 100644 --- a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html +++ b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.html @@ -1,7 +1,6 @@ - - - {{ 'workListMain, rfc' | translate}} + + {{ 'workListMain, rfc' | translate}} @@ -10,30 +9,62 @@
{{"replacementRoll.msgRFC" | translate}}
- + + +
+ + + + + +
+ + + +
+
+
+ + +
+ +
+ +
+ +
+ + {{rfcEmployeeList.EMPLOYEE_DISPLAY_NAME}} +
{{rfcEmployeeList.ACTION}} + +
+
+
+ +
+
-
- - - - -
- + +
- - {{'general, submit' | translate}} -
+ + {{'general, submit' | translate}} + + + {{'general, cancel' | translate}} +
\ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss index 129d608e..6b2ebadc 100644 --- a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss +++ b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss @@ -4,4 +4,131 @@ min-height: 45px; min-width: 200px; } + button.item-button.button.button-md.button-clear.button-clear-md { + background-color: transparent; + } + + .footer-button { + border-radius: 3px; + padding: 0 1.1em; + min-height: 45px; + min-width: 200px; + } + + // ion-item { + // margin-top: 5%; + // margin-right: 7%; + // width: 100%; + // } + .ionItem{ + border: #e4e4e4 solid; + /* margin: 6px; */ + /* padding: 11px; */ + height: 85px; + width: 164px; + border-radius: 5px; + text-align: center; + + } + + + .profileImageDiv{ + text-align: center; + margin-bottom: -27px; + z-index: 3; + position: relative; + top: 0; + + } + .profileImage{ + width:60px !important; + // margin-left: -25px; + // margin-right: 22px; + } + + .activated{ + border: #209a83 0.02cm solid ; + } + .deactivated{ border: #e4e4e4 0.02cm solid; + } + .repContentDiv{ + text-align: center; + width: 85%; + font-size: 14px; + border: #e4e4e4 solid; + border-radius: 5px; + padding: 20px 8px 8px 8px; + margin-top: -9px; + margin-right: -35px + + } + .selIEmpDiv{ + text-align: right; + margin-bottom: -26px; + margin-right: 0px; + z-index: 3; + position: relative; + top: 0; + } + + .selIEmpImage{ + width:22px !important + + } + + .noteInput{ + border: solid var(--gray) 1px; + border-radius: 15px; + margin: 8px 17px 0px 17px; + padding: 10px 2px 10px 2px; + } + .filterInput{ + border: solid var(--gray) 1px; + border-radius: 21px; + padding-left: 10px !important; + } + .filterBtn{ + background: var(--newgreen); + --background: var (--newgreen); + border-radius: 50%; + height: 60px; + width: 60px; + } + + + + *{ + box-sizing: border-box; + } + + .square-container{ + // padding: 8px; + width:100%; + } + .square{ + // width:calc(100% / 2); + width:50%; + float:left; + position: relative; + // padding-bottom: calc(100% / 2); + } + + .square .content{ + width: calc(100% - 16px) !important; + height: calc(100% - 16px) !important; + margin: 8px; + padding: 16px; + // position: absolute; + color: white; + border-radius: 9px; + text-align: center; + // background-color: #0095ff; + // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); + } + + + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts index 56e32a62..c22eba21 100644 --- a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts +++ b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.ts @@ -6,6 +6,7 @@ import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes'; import { WorklistService } from '../service/worklist.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { ModalController } from '@ionic/angular'; @Component({ selector: 'app-work-list-rfc', @@ -29,8 +30,15 @@ export class WorkListRfcComponent implements OnInit { getpassResAttr: any = []; P_PAGE_NUM: number = 1; P_PAGE_LIMIT: number = 100; - - constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService) { + active: any; + + constructor( + public worklistService: WorklistService, + private cs: CommonService, + private ts: TranslatorService, + public workListMainService: WorklistMainService, + public modalCtrl: ModalController + ) { this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo'); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr'); @@ -153,5 +161,22 @@ export class WorkListRfcComponent implements OnInit { infiniteScroll.target.complete(); } }//end infiniteScroll + closeModal() { + this.modalCtrl.dismiss(); + } + + select(selectEmp,index){ + console.log(selectEmp.USER_NAME); + console.log(selectEmp.SEQ); + this.radioButtonValue=selectEmp.USER_NAME + this.seqNo = selectEmp.SEQ; +////////////////////////////////////////////////////////////// + // let emp: any = this.RFCEmployeeListListRes[v]; + // this.seqNo = emp.SEQ; + // this.radioButtonValue = emp.USER_NAME; + + + this.active=index; + } } diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 886bf8d7..15f6e4ea 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -1,4 +1,4 @@ - + {{ts.trPK('worklistMain','title')}} @@ -6,179 +6,193 @@ - - - - - {{ts.trPK('worklistMain','info')}} - - - - {{ts.trPK('worklistMain','itemReq')}} - - - - - {{'worklistMain, actionHis' | translate}} - - - - - - {{'general, attachment' | translate}} - - - - - + + +
{{getPassNotificationDetails.SUBJECT}}
+ + + + + + + + {{ts.trPK('worklistMain','itemReq')}} + + + + {{'worklistMain, action' | translate}} + + + + {{'general, file' | translate}} + + + + + {{ts.trPK('worklistMain','info')}} + + + + + + - - -
{{pInformation}}
- - + + +
{{pInformation}}
+ + + - - - - - - - - -
+ + +
- - -
-
+ + + +
- - - -
+ + + +
- - -
-
- - - -
+ + +
- - -
-
- - - -
+ + +
- - -
-
- - - -
+ + +
+
- + + + + +
+ + - -
-
+ + + + +
- - - -
+ + +
+
+ + + + + +
- - -
-
+ +
+ - + -
+
- - + + - - -
+ + +
- -
-
+ + +
-
-
+
+
- -
- - -
{{totalH}}
-
{{valueH}}
+ +
+ + +
{{totalH}}
+
{{valueH}}
-
- -
{{taxH}}
-
{{taxvalueH}}
+
+ +
{{taxH}}
+
{{taxvalueH}}
-
-
+ + -
-
+
+
-
- + + -
+ - -
+ +
-
-
+
+
-
- - -
- - - - - - + + + -
-

{{ 'general, empty' | translate}}

-
- +
+

{{ 'general, empty' | translate}}

+
+ -
- +
+ - -
+ + + - + + +
+ + + - + + - - - - -
- + + + + + +
+ - {{notificationList.ITEM_CODE}} -
- - - -
- - {{notificationList.UOM}} -
-
- - - - - -
- - {{notificationList.QUANTITY}} + {{notificationList.QUANTITY}} -
- - -
- - {{notificationList.DATE_REQUIRED}} -
-
- - + {{notificationList.DATE_REQUIRED}} +
+
+ - - - -
- - {{notificationList.LINE_STATUS}} -
+ {{notificationList.LINE_STATUS}} + - - -
- - {{notificationList.STATUS_DATE}} -
- -
+ {{notificationList.STATUS_DATE}} + - + + - - -
- - {{notificationList.TRANSACTION_TYPE_NAME}} -
+ {{notificationList.TRANSACTION_TYPE_NAME}} + - - -
- - {{notificationList.OPERATING_UNIT}} -
+ {{notificationList.OPERATING_UNIT}} + -
- + + + + +
+ + {{notificationList.ORGANIZATION_CODE}} +
+ + +
+ + {{notificationList.ORGANIZATION_NAME}} +
+
+ - - -
- - {{notificationList.ORGANIZATION_CODE}} -
+ + +
+ + {{notificationList.FROM_SUBINVENTORY}} +
- - -
- - {{notificationList.ORGANIZATION_NAME}} -
-
- - + {{notificationList.FROM_LOCATOR}} + + + - - -
- - {{notificationList.FROM_SUBINVENTORY}} -
+ {{notificationList.TO_SUBINVENTORY}} + - - -
- - {{notificationList.FROM_LOCATOR}} -
+ {{notificationList.TO_LOCATOR}} + -
+ - + - - -
- - {{notificationList.TO_SUBINVENTORY}} -
+ {{notificationList.SHIP_TO_LOCATION}} + - - -
- - {{notificationList.TO_LOCATOR}} -
+
-
- +
+
+
+ + +
+ + + - - -
- - {{notificationList.SHIP_TO_LOCATION}} -
+ + - + + + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ +
+ - + - - - - + +
--> - - +
+ + +
+
+ + {{actionHistory.NAME}} + -
-

{{ 'general, empty' | translate}}

-
-
- -
- +
+
+
+ Note: {{actionHistory.NOTE}} +
+
-
- - -
+
-
- + -
-
- - {{actionHistory.ACTION}} - {{actionHistory.NAME}} - - - {{actionHistory.NOTIFICATION_DATE| dateString }} - - -
- -
+
- - - - - - - - - -
-

{{ 'general, notAttch' | translate}}

-
-
- - -
- - -
- -
-
-
-
- -
-
- -
- - {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} -
- -
-
-
- + + + {{actionHistory.ACTION}} + + + {{actionHistory.NOTIFICATION_DATE| dateString }} + +
-
-
+
+
- - + + + + + + + - +
+

{{ 'general, notAttch' | translate}}

+
+
+ + + +
+ +
+
+
+
+ +
+
+ +
+ + {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} + +
+
+
+
+ + - - @@ -548,14 +563,32 @@ - - + + + + + +
+ + +
+
Transaction Successful
+
+ + + + + + {{'actionHis, action' | translate}} @@ -568,7 +601,6 @@
- @@ -577,11 +609,60 @@ - + --> + + + + + + + + + + + + Approve + + + + Reject + + + + Request + + + + Skip + + + + More + + + diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss index db039aed..a5b678ca 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss @@ -1,8 +1,107 @@ -.itemHISBtn{ - padding: 5px; - color: var(--light); - background: var(--darkgray); - border-radius: 3px; - width: 85%; - height: 40px; -} \ No newline at end of file +// .itemHISBtn{ +// padding: 5px; +// color: var(--light); +// background: var(--darkgray); +// border-radius: 3px; +// width: 85%; +// height: 40px; +// } + + +// .rowBtn{ +// display: flex; +// flex-direction: row; +// justify-content: center; +// align-items: center; +// background: white; +// } + + + +// .rowBorder{ +// border-bottom: solid 0.03cm var(--grayBG); + +// } +// .colBorder{ +// border-right: solid 0.03cm var(--grayBG); + +// } + +// .dateActionHistory{ +// text-align: end; +// // margin-top: -25px; +// } + + +// .actionBtn{ +// --border-radius: 50% !important; +// height: 55px; +// width: 55px; +// --background: var(--newgreen); // will be dynamic +// background: transparent; +// margin:10px; +// } + +// .itemAttch{ +// border-radius: 11px; +// margin: 8px; +// --min-height: 60px; +// --max-height: 60px; +// } + +// .less { +// max-height: 54px; +// } + +// .noDataDiv{ +// background: #ffffff; +// height: 11%; +// text-align: center; +// padding-top: 1px; +// border-radius: 10px; +// margin: 10px; +// } + +// .container { +// font-size: 14px; +// line-height: 14px; +// height: 15px; +// overflow: hidden; +// text-align: justify; +// } + +// .show { +// overflow: visible; +// height: auto; +// } + +// .showMore{ +// padding: 0px; +// background: transparent; +// color: blue; +// text-decoration: underline; +// font-size: 14px; +// } +// .succssfullMSG{ +// height: 100%; +// width: 100%; +// background: var(--newgreen); +// color: white; +// font-weight: bold; +// font-size: 20px; +// text-align: center; +// vertical-align: middle; +// padding-top: 30px; +// } + +// .succssfullIcon{ +// width: 60%; +// text-align: center; +// height: 60%; +// } +// .subjectNotification{ +// text-align: center; +// padding-top: 10px; +// font-weight: bold; +// } + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 54aca8b4..4dc1c916 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -28,6 +28,9 @@ import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.compo import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component'; import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component'; +import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component'; +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; @Component({ selector: 'app-worklist-main-mr', @@ -41,7 +44,7 @@ export class WorklistMainMRComponent implements OnInit { private WorkListActionObj: WorkListActionRequest; private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListAttachObj: WorkListButtonRequest; - private PRList:PRNotificatonBodyList + private PRList: PRNotificatonBodyList public static PASS_NOTIFICATION_INFO = "passNotificationInfo"; public static PASS_ACTION_MODE = "passActionMode"; getPassNotificationDetails: any; @@ -65,13 +68,13 @@ export class WorklistMainMRComponent implements OnInit { selEmployeeID: any; actionType: string = ""; notificationArray: any; - notificationDynamicAttributeArr:any; + notificationDynamicAttributeArr: any; private textInput: TextInput; private textArea: TextAreaInput; notificationCount: any; - attachmentRes:any; - PRHeader:any;//change the tpye later - PRLines:any;//change the tpye later + attachmentRes: any; + PRHeader: any;//change the tpye later + PRLines: any;//change the tpye later IsReachEnd: boolean = false; P_PAGE_NUM: number = 1; P_PAGE_LIMIT: number = 100; @@ -84,6 +87,19 @@ export class WorklistMainMRComponent implements OnInit { confirmMsg: string; delMsg: string; closeMsg: string; + activeSegment: any = "info"; + lines_note_limit: any = 15; + orgNote: string; + truncating: boolean; + selectedIndex: any; + showLessBtn: boolean; + showMoreBtn: boolean; + notiActionBtnMore: any = []; + messageSuccess: boolean = false; + approveDis: boolean = false; + rejectDis: boolean = false; + requestDis: boolean = false; + constructor( @@ -98,55 +114,31 @@ export class WorklistMainMRComponent implements OnInit { public worklistService: WorklistService ) { - //this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo'); + //this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo'); this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; - // this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; - } + // this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + } - ngOnInit() { + ngOnInit() { this.WorkListAttachObj = new WorkListButtonRequest(); this.intializeNotificationDetail(); - let segment = document.querySelector('ion-segment'); - let slides = document.querySelector('ion-slides'); - - segment.addEventListener('ionChange', (ev) => onSegmentChange(ev)); - slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev)); - - // On Segment change slide to the matching slide - function onSegmentChange(ev) { - console.log("ev.detail.value"+ev.detail.value); - slideTo(ev.detail.value); - } - - function slideTo(index) { - console.log("index: "+index); - slides.slideTo(index); - } - - // On Slide change update segment to the matching value - async function onSlideDidChange(ev) { - var index = await slides.getActiveIndex(); - console.log("index: "+index); - clickSegment(index); - } - - function clickSegment(index) { - - segment.value = index; - } - } - + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + console.log(" event.detail.value: " + event.detail.value); + } intializeNotificationDetail() { - document.getElementById("notificationDynamicFields").innerHTML=""; + if (this.messageSuccess) { + document.getElementById("notificationDynamicFields").innerHTML = ""; + } console.log("intializeNotificationDetail"); this.getPassNotificationDetails = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_DATA, @@ -190,38 +182,38 @@ export class WorklistMainMRComponent implements OnInit { this.getEITNotificationDetails(this.WorkListBodyObj); } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { this.getAbsenceNotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){ - this.getPONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO"){ + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") { + this.getPONotificationDetails(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") { this.getMONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR"){ - this.getPRNotificationDetails(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") { + this.getPRNotificationDetails(this.WorkListBodyObj); } } - getPRNotificationDetails(notificationBodyObj){ + getPRNotificationDetails(notificationBodyObj) { this.worklistMainService - .getPRNotificationBody(notificationBodyObj) - .subscribe((result: PRNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "PR"); - }); + .getPRNotificationBody(notificationBodyObj) + .subscribe((result: PRNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "PR"); + }); } - - getMONotificationDetails(notificationBodyObj){ - this.worklistMainService + + getMONotificationDetails(notificationBodyObj) { + this.worklistMainService .getMONotificationBody(notificationBodyObj) .subscribe((result: MONotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "MO"); + this.handleWorkListBodyResult(result, "MO"); }); - } - - getPONotificationDetails(notificationBodyObj){ + } + + getPONotificationDetails(notificationBodyObj) { this.worklistMainService - .getPONotificationBody(notificationBodyObj) - .subscribe((result: PONotificatonBodyResponse) => { - console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - this.handleWorkListBodyResult(result, "PO"); - }); + .getPONotificationBody(notificationBodyObj) + .subscribe((result: PONotificatonBodyResponse) => { + console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); + this.handleWorkListBodyResult(result, "PO"); + }); } getEITNotificationDetails(notificationBodyObj) { @@ -246,17 +238,17 @@ export class WorklistMainMRComponent implements OnInit { this.pInformation = result.P_INFORMATION; this.pQuestion = result.P_QUESTION; if (Type == "MO") { - if (result.GetMoNotificationBodyList) { - this.notificationBodyRes = - result.GetMoNotificationBodyList; + if (result.GetMoNotificationBodyList) { + this.notificationBodyRes = + result.GetMoNotificationBodyList; + } + } - } - } } //End handleWorkListBodyResult - + getNotificationButtons(notificationButtonsObj) { this.worklistMainService .getNotificationButtons(notificationButtonsObj) @@ -270,6 +262,20 @@ export class WorklistMainMRComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; + this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); + console.log("test" + this.notificationButtonRes.length); + for (let i = 0; i < this.notificationButtonRes.length; i++) { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { + this.approveDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { + this.rejectDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + this.requestDis = true; + } // if result == null + } // valid it + } // if result == null } // valid it } // End handleWorkListButtonsResult @@ -285,14 +291,12 @@ export class WorklistMainMRComponent implements OnInit { handleApplayActionResult(result) { if (this.common.validResponse(result)) { if (result.MessageStatus == 1) { - // this.navCtrl.push("HomePage"); - //this.common.openHome(); - //this.common.openNotificationPage(); - // for( var i = 0; i < this.notificationArray.length; i++){ - // if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) { - // this.notificationArray.splice(i, 1); - // } - // } + + this.messageSuccess = true; + + setTimeout(() => { + this.messageSuccess = false; + }, 5000); this.getNotificationCountAfterSubmit(); this.nextNotfification(); } @@ -320,11 +324,14 @@ export class WorklistMainMRComponent implements OnInit { } } - actionButton() { - let ButtonAction: string = this.actionType; + actionButton(action) { + console.log("actionButton" + action); + alert("don't forget"); + //let ButtonAction: string = this.actionType; + let ButtonAction: string = action; var responseAttrDic = this.notExampleJsonObject; this.P_RESPOND_ATTRIBUTES_TBL = []; - for (let i=0;i { this.applyAction(this.WorkListActionObj); - }, this.ts.trPK('general', 'ok'), - () => {}, this.ts.trPK('general', 'cancel'), + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), this.ts.trPK('vacation-rule', 'confirmation'), - this.confirmMsg); + this.confirmMsg); + + ////////////////////////////////////////////////////////// - - // alert.onDidDismiss((data) => { // if (data == true) { // this.continueDelete(attach); // } // }); - - //this.openApplyModal(this.WorkListActionObj); - - + + // this.openApplyModal(this.WorkListActionObj); + + ////////////this.applyAction(this.WorkListActionObj); } @@ -423,14 +432,10 @@ export class WorklistMainMRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainMRComponent.PASS_RES_ATTR ); - this.common.openWorklistRFCPage(); + // this.common.openWorklistRFCPage(); + this.openRFCModal(); } else if (ButtonAction == "ANSWER_INFO") { - // this.navCtrl.push("WorkListReplacmentRollPage", { - // pQuestion: this.pQuestion, - // passNotificationInfo: this.getPassNotificationDetails, - // passActionMode: ButtonAction, - // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL - // }); + this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); this.common.sharedService.setSharedData( this.getPassNotificationDetails, @@ -444,7 +449,8 @@ export class WorklistMainMRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainMRComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + //this.common.openWorklistRollReplacement(); + this.openReplacementRoll(); } else if ( ButtonAction == "DELEGATE" || ButtonAction == "REQUEST_INFO" || @@ -470,7 +476,8 @@ export class WorklistMainMRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainMRComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + // this.common.openWorklistRollReplacement(); + this.openReplacementRoll(); } else if ( ButtonAction == "UPDATE_ACTION" || ButtonAction == "CONTINUE_ACTION" @@ -562,29 +569,29 @@ export class WorklistMainMRComponent implements OnInit { this.hideForwordEmployee = result.NotificationRespondRolesList[0]; } this.notificationDynamicFields(result.NotificationGetRespondAttributesList); - this.NotificationGetRespondAttributesList=result.NotificationGetRespondAttributesList; + this.NotificationGetRespondAttributesList = result.NotificationGetRespondAttributesList; this.common.sharedService.setSharedData( this.NotificationGetRespondAttributesList, WorklistMainMRComponent.PASS_RES_ATTR ); - this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList; + this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList; if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema); } // valid it } // End handleWorkListButtonsResult - notificationDynamicFields(notificationAttr){ + notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; - for(let i=0;i { @@ -675,21 +682,23 @@ export class WorklistMainMRComponent implements OnInit { this.IsReachEnd = false; } } + this.turnCateFun(this.actionHistoryRes); + } } } - async openNoteDetail(note,sender) { + async openNoteDetail(note, sender) { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); - console.log("note"+note); + console.log("note" + note); this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') - this.common.sharedService.setSharedData(sender,'ViewNoteModalPageSender') + this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') const modal = await this.modalCtrl.create({ component: ViewNoteModalComponent, - backdropDismiss:false, + backdropDismiss: false, }); modal.cssClass = 'note-modal'; @@ -731,7 +740,7 @@ export class WorklistMainMRComponent implements OnInit { } }//end infiniteScroll -//**********Attachment *****************// + //**********Attachment *****************// async OpenAttachFiles(value, Type) { @@ -752,7 +761,7 @@ export class WorklistMainMRComponent implements OnInit { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); // console.log("note"+note); - this.common.sharedService.setSharedData( this.getPassNotificationDetails,WorklistMainMRComponent.PASS_NOTIFICATION_INFO); + this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainMRComponent.PASS_NOTIFICATION_INFO); this.common.sharedService.setSharedData(WorkListActionObj, 'ApplyActionModalPage') // this.common.sharedService.setSharedData( // this.WorkListActionObj, @@ -761,23 +770,23 @@ export class WorklistMainMRComponent implements OnInit { const modal = await this.modalCtrl.create({ component: ApplyActionModalComponent, - backdropDismiss:false, + backdropDismiss: false, }); modal.cssClass = 'note-modal'; - + modal.onDidDismiss() .then((data) => { console.log(data); // Here's your selected user! - }); + }); - // data => { - // console.log('MODAL DATA', data); - // }); + // data => { + // console.log('MODAL DATA', data); + // }); // const { data } = await this.modalCtrl.onWillDismiss(); // console.log(data); return await modal.present(); - + } @@ -820,7 +829,7 @@ export class WorklistMainMRComponent implements OnInit { loadMoreNotificationBody() { console.log("loadMoreNotificationBody MR"); if (!this.IsReachEnd) { - console.log("this.IsReachEnd"+ this.IsReachEnd); + console.log("this.IsReachEnd" + this.IsReachEnd); this.worklistMainService.getMONotificationBody(this.WorkListBodyObj). subscribe((result: any) => { @@ -836,9 +845,9 @@ export class WorklistMainMRComponent implements OnInit { this.IsReachEnd = false; } this.notificationBodyRes.push(element); - }, (Error) => console.log(Error), () => - //infiniteScroll.target.complete() - console.log("test") + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") ); }// if list length >0 else { @@ -846,7 +855,7 @@ export class WorklistMainMRComponent implements OnInit { } }// if response == 1 //this.pageNum++; - // infiniteScroll.target.complete(); + // infiniteScroll.target.complete(); }); } else { @@ -872,25 +881,148 @@ export class WorklistMainMRComponent implements OnInit { this.IsReachEnd = false; } this.actionHistoryRes.push(element); - }, (Error) => console.log(Error), () => - //infiniteScroll.target.complete() - console.log("TEST")); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); }// if list length >0 else { this.IsReachEnd = true; } }// if response == 1 //this.pageNum++; - // infiniteScroll.target.complete(); + // infiniteScroll.target.complete(); }); } else { //if (infiniteScroll) - //infiniteScroll.target.complete(); + //infiniteScroll.target.complete(); } }//end infiniteScroll + async openMoreActions() { + + const modal = await this.modalCtrl.create({ + component: MoreActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + // this.selectedAction = data.data; + this.actionType = data.data.BUTTON_ACTION; + console.log(this.actionType); + ///call Action button + this.actionButton(this.actionType); + } + }); + + return await modal.present(); + + + + + } + + + /////////////////////////////////////////// + + public checkLines(note) { + console.log(note.split("\n").length); + console.log(note.length); + + if (note && note != null) { + + + return (note.length > this.lines_note_limit) ? true : false; + + + + } + + + + return false; + }; + + + public turnCateFun(actionHis) { + for (let i = 0; i < actionHis.length; i++) { + actionHis[i].visible = false; + + } + + this.actionHistoryRes = actionHis; + console.log("test"); + } + + + async openReplacementRoll() { + + const modal = await this.modalCtrl.create({ + component: WorkListReplacementRollComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss().then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + + async openRFCModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListRfcComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index b29116a2..83d464b5 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -1,4 +1,4 @@ - + {{ts.trPK('worklistMain','title')}} @@ -6,33 +6,50 @@ - - - - {{ts.trPK('worklistMain','info')}} - - - {{ts.trPK('worklistMain','line_details')}} - - - - {{'worklistMain, actionHis' | translate}} + + + +
+ +
+
Transaction Successful
+
+ + +
{{getPassNotificationDetails.SUBJECT}}
+ + + + + + {{ts.trPK('worklistMain','line_details')}} + + + + {{'worklistMain, action' | translate}} + + + + {{'general, file' | translate}} - - - - {{'general, attachment' | translate}} - + + {{ts.trPK('worklistMain','info')}} + - -
- - - + + + + +
{{pInformation}}
@@ -40,8 +57,8 @@ - - + + @@ -49,8 +66,8 @@ - - + - - + +
-
+ @@ -81,16 +98,16 @@
- - + +
-
- + @@ -98,40 +115,40 @@ - - - + + +
-
+ +
- - + +
-
- +
@@ -139,15 +156,15 @@
- - + +
-
- +
@@ -155,15 +172,15 @@
- - + +
-
- + @@ -172,16 +189,16 @@ - - + +
-
- + @@ -190,15 +207,15 @@ - - + +
-
- +
@@ -206,15 +223,15 @@
- - + +
-
- + @@ -223,16 +240,16 @@ - - + +
-
- +
@@ -241,15 +258,15 @@
- - + +
-
- +
@@ -257,26 +274,17 @@
- - + +
-
- + @@ -286,14 +294,17 @@
- - + +
+

{{ 'general, empty' | translate}}

- - -
- - - - + + + + + + + + +
+ + - - - - - - - - + + +
{{Lines.ITEM_CODE}}
- +
@@ -390,8 +401,8 @@
- - + +
@@ -410,9 +421,9 @@
- + - +
@@ -431,9 +442,9 @@
- + - +
@@ -452,9 +463,9 @@
- + - +
@@ -474,9 +485,9 @@
- + - +
@@ -496,9 +507,9 @@
- + - +
@@ -506,12 +517,8 @@ {{Lines.REQUESTOR}}
- + + @@ -519,7 +526,7 @@
- + @@ -528,18 +535,11 @@
- - - - + @@ -549,10 +549,7 @@
@@ -560,32 +557,36 @@
-
- +
+ + + + -
-
- + + + - - - + + + -
+

{{ 'general, empty' | translate}}

- +
-
+ -
-
+
+ +
+ {{actionHistory.NAME}} + + +
+
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} {{actionHistory.NOTE}} + + +
+ + +
+
+ +
+ + {{actionHistory.ACTION}} - {{actionHistory.NAME}} - + - {{actionHistory.NOTIFICATION_DATE| dateString }} + {{actionHistory.NOTIFICATION_DATE| dateString }}
@@ -619,72 +647,110 @@ - - - - - -
-

{{ 'general, notAttch' | translate}}

-
+ + + +
+

{{ 'general, notAttch' | translate}}

+
- -
- - -
- -
-
-
-
- -
-
- -
- - {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} -
+ + +
+ +
+
+
+
+ +
+
+ +
+ + {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} + + + +
+ +
+ + +
+ + + - -
- + + +
+
+
+
+ -
- - - +
+ +
+
Transaction Successful
+
- + - - + - + + + + + + + + + + + + + + + Approve + + + + + Reject + + + + + Request + + + + Skip + + + + + More + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss index db039aed..a321bdf4 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss @@ -1,8 +1,110 @@ -.itemHISBtn{ - padding: 5px; - color: var(--light); - background: var(--darkgray); - border-radius: 3px; - width: 85%; - height: 40px; -} \ No newline at end of file +// .itemHISBtn{ +// padding: 5px; +// color: var(--light); +// background: var(--darkgray); +// border-radius: 3px; +// width: 85%; +// height: 40px; +// } + + +// .rowBtn{ +// display: flex; +// flex-direction: row; +// justify-content: center; +// align-items: center; +// background: white; +// } + + + +// .rowBorder{ +// border-bottom: solid 0.03cm var(--grayBG); + +// } +// .colBorder{ +// border-right: solid 0.03cm var(--grayBG); + +// } + +// .dateActionHistory{ +// text-align: end; +// // margin-top: -25px; +// } + + +// .actionBtn{ +// --border-radius: 50% !important; +// height: 55px; +// width: 55px; +// --background: var(--newgreen); // will be dynamic +// background: transparent; +// margin:10px; +// } + +// .itemAttch{ +// border-radius: 11px; +// margin: 8px; +// --min-height: 60px; +// --max-height: 60px; +// } + +// .less { +// max-height: 54px; +// } + +// .noDataDiv{ +// background: #ffffff; +// height: 11%; +// text-align: center; +// padding-top: 1px; +// border-radius: 10px; +// margin: 10px; +// } + + +// .container { +// font-size: 14px; +// line-height: 14px; +// height: 16px; +// overflow: hidden; +// text-align: justify; +// } + +// .show { +// overflow: visible; +// height: auto; +// } + +// .showMore{ +// padding: 0px; +// background: transparent; +// color: blue; +// text-decoration: underline; +// font-size: 14px; +// } + +// .succssfullMSG{ +// height: 100%; +// width: 100%; +// background: var(--newgreen); +// color: white; +// font-weight: bold; +// font-size: 20px; +// text-align: center; +// vertical-align: middle; +// padding-top: 30px; +// } + +// .succssfullIcon{ +// width: 60%; +// text-align: center; +// height: 60%; +// } + +// .subjectNotification{ +// text-align: center; +// padding-top: 10px; +// font-weight: bold; +// } + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index 558f1976..488aba47 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -32,6 +32,9 @@ import { POItemHistoryRes } from '../models/POItemHistoryRes'; import { POItemHistoryRequest } from '../models/POItemHistoryReq'; import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes'; import { QuotationAnalysisRequest } from '../models/quotationAnalysisReq'; +import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component' +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; @Component({ selector: 'app-worklist-main-po', @@ -44,12 +47,14 @@ export class WorklistMainPoComponent implements OnInit { private WorkListActionObj: WorkListActionRequest; private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListAttachObj: WorkListButtonRequest; - private PRList:PRNotificatonBodyList + private PRList: PRNotificatonBodyList; + public static PASS_NOTIFICATION_INFO = "passNotificationInfo"; public static PASS_PO_INFO = "passPOInfo"; public static PASS_PO_HEADER_ID = "passPOHeader"; - public static PASS_ACTION_MODE = "passActionMode"; + public static PASS_ACTION_MORE = "passActioMore"; + getPassNotificationDetails: any; public static PASS_RES_ATTR = "passResAttr"; TransactionID: number = -999; @@ -71,13 +76,13 @@ export class WorklistMainPoComponent implements OnInit { selEmployeeID: any; actionType: string = ""; notificationArray: any; - notificationDynamicAttributeArr:any; + notificationDynamicAttributeArr: any; private textInput: TextInput; private textArea: TextAreaInput; notificationCount: any; - attachmentRes:any; - PRHeader:any;//change the tpye later - PRLines:any;//change the tpye later + attachmentRes: any; + PRHeader: any;//change the tpye later + PRLines: any;//change the tpye later IsReachEnd: boolean = false; P_PAGE_NUM: number = 1; P_PAGE_LIMIT: number = 100; @@ -95,6 +100,22 @@ export class WorklistMainPoComponent implements OnInit { PO_NUMBER: any; itemHistoryRes: any; QutationAnalysisRes: any; + activeSegment: any = "info"; + lines_note_limit: number = 15; + notiActionBtnMore: any = []; + demoeAttach: any = []; + orgNote: any; + truncating: boolean = true; + hidden: boolean = true; + selectedIndex = -1; + showLessBtn: boolean; + showMoreBtn: boolean = true; + selectedAction: any = []; + messageSuccess: boolean = false; + approveDis: boolean = false; + rejectDis: boolean = false; + requestDis: boolean = false; + constructor( public common: CommonService, @@ -106,7 +127,7 @@ export class WorklistMainPoComponent implements OnInit { public worklistAttachService: WorklistAttachService, private modalCtrl: ModalController, public worklistService: WorklistService, - ) { + ) { this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; @@ -118,43 +139,13 @@ export class WorklistMainPoComponent implements OnInit { this.intializeNotificationDetail(); - let segment = document.querySelector('ion-segment'); - let slides = document.querySelector('ion-slides'); - - segment.addEventListener('ionChange', (ev) => onSegmentChange(ev)); - slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev)); - - // On Segment change slide to the matching slide - function onSegmentChange(ev) { - console.log("ev.detail.value"+ev.detail.value); - slideTo(ev.detail.value); - } - - function slideTo(index) { - console.log("index: "+index); - - slides.slideTo(index); - } - - // On Slide change update segment to the matching value - async function onSlideDidChange(ev) { - var index = await slides.getActiveIndex(); - console.log("index: "+index); - clickSegment(index); - } - - function clickSegment(index) { - - segment.value = index; - } - - - }//ngOn intializeNotificationDetail() { - document.getElementById("notificationDynamicFields").innerHTML=""; + if (this.messageSuccess) { + document.getElementById("notificationDynamicFields").innerHTML = ""; + } console.log("intializeNotificationDetail"); this.getPassNotificationDetails = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_DATA, @@ -194,18 +185,24 @@ export class WorklistMainPoComponent implements OnInit { this.getActionHistory(this.WorkListActionHistoryObj); this.getAttachmentNotification(this.WorkListAttachObj); - - if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){ - this.getPONotificationDetails(this.WorkListBodyObj); - } + + if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") { + this.getPONotificationDetails(this.WorkListBodyObj); + } + } + + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + console.log(" event.detail.value: " + event.detail.value); } - getPONotificationDetails(notificationBodyObj){ + + getPONotificationDetails(notificationBodyObj) { this.worklistMainService - .getPONotificationBody(notificationBodyObj) - .subscribe((result: PONotificatonBodyResponse) => { - console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - this.handleWorkListBodyResult(result, "PO"); - }); + .getPONotificationBody(notificationBodyObj) + .subscribe((result: PONotificatonBodyResponse) => { + console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); + this.handleWorkListBodyResult(result, "PO"); + }); } handleWorkListBodyResult(result, Type) { @@ -224,64 +221,64 @@ export class WorklistMainPoComponent implements OnInit { this.notificationBodyRes = result.GetAbsenceCollectionNotificationBodyList; } - }else if (Type == "PR") { + } else if (Type == "PR") { if (result.GetPrNotificationBodyList) { console.log("PR"); - this.PRHeader=result.GetPrNotificationBodyList.PRHeader; - this.PRLines=result.GetPrNotificationBodyList.PRLines; - for( var i = 0; i < this.PRHeader.length; i++){ - if(this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total'){ - this.totalH=this.PRHeader[i].HDR_ATTRIBUTE_NAME; - this.valueH=this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + this.PRHeader = result.GetPrNotificationBodyList.PRHeader; + this.PRLines = result.GetPrNotificationBodyList.PRLines; + for (var i = 0; i < this.PRHeader.length; i++) { + if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.PRHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE; - //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" - } - if(this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax'){ - this.taxH=this.PRHeader[i].HDR_ATTRIBUTE_NAME; - this.taxvalueH=this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.PRHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + } + + // HDR_ATTRIBUTE_VALUE } - - // HDR_ATTRIBUTE_VALUE - } this.notificationBodyRes = result.GetPrNotificationBodyList; } - - }else if (Type == "PO") { - if (result.GetPoNotificationBodyList) { - console.log("PO"); - this.POHeader=result.GetPoNotificationBodyList.POHeader; - this.POLines=result.GetPoNotificationBodyList.POLines; - for( var i = 0; i < this.POHeader.length; i++){ - this.PO_NUMBER=this.POHeader[i].PO_NUMBER; + } else if (Type == "PO") { + if (result.GetPoNotificationBodyList) { + console.log("PO"); - if(this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total'){ - this.totalH=this.POHeader[i].HDR_ATTRIBUTE_NAME; - this.valueH=this.POHeader[i].HDR_ATTRIBUTE_VALUE; + this.POHeader = result.GetPoNotificationBodyList.POHeader; + this.POLines = result.GetPoNotificationBodyList.POLines; + for (var i = 0; i < this.POHeader.length; i++) { + this.PO_NUMBER = this.POHeader[i].PO_NUMBER; - //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" - } - if(this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax'){ - this.taxH=this.POHeader[i].HDR_ATTRIBUTE_NAME; - this.taxvalueH=this.POHeader[i].HDR_ATTRIBUTE_VALUE; + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + } + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPoNotificationBodyList; } - - // HDR_ATTRIBUTE_VALUE - } - this.notificationBodyRes = - result.GetPoNotificationBodyList; - } - }// - } + }// + } } //End handleWorkListBodyResult - - - + + + getNotificationButtons(notificationButtonsObj) { this.worklistMainService .getNotificationButtons(notificationButtonsObj) @@ -292,14 +289,31 @@ export class WorklistMainPoComponent implements OnInit { handleWorkListButtonsResult(result) { if (this.common.validResponse(result)) { + this.notiActionBtnMore = [] // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - } // if result == null - } // valid it - } // End handleWorkListButtonsResult + this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); + console.log("test" + this.notificationButtonRes.length); + for (let i = 0; i < this.notificationButtonRes.length; i++) { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { + this.approveDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { + this.rejectDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + this.requestDis = true; + } // if result == null + } // valid it + + } // valid it + } // End handleWorkListButtonsResult + + } applyAction(WorkListActionObj) { + console.log("applyactio"); this.worklistMainService .actionButton(WorkListActionObj) .subscribe((result: any) => { @@ -310,14 +324,14 @@ export class WorklistMainPoComponent implements OnInit { handleApplayActionResult(result) { if (this.common.validResponse(result)) { if (result.MessageStatus == 1) { - // this.navCtrl.push("HomePage"); - //this.common.openHome(); - //this.common.openNotificationPage(); - // for( var i = 0; i < this.notificationArray.length; i++){ - // if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) { - // this.notificationArray.splice(i, 1); - // } - // } + + + this.messageSuccess = true; + + setTimeout(() => { + this.messageSuccess = false; + }, 5000); + this.getNotificationCountAfterSubmit(); this.nextNotfification(); } @@ -345,11 +359,16 @@ export class WorklistMainPoComponent implements OnInit { } } - actionButton() { - let ButtonAction: string = this.actionType; + actionButton(action) { + + console.log("actionButton" + action); + alert("don't forget"); + //let ButtonAction: string = this.actionType; + let ButtonAction: string = action; + var responseAttrDic = this.notExampleJsonObject; this.P_RESPOND_ATTRIBUTES_TBL = []; - for (let i=0;i { this.applyAction(this.WorkListActionObj); - }, this.ts.trPK('general', 'ok'), - () => {}, this.ts.trPK('general', 'cancel'), + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), this.ts.trPK('vacation-rule', 'confirmation'), - this.confirmMsg); + this.confirmMsg); + + - - // alert.onDidDismiss((data) => { // if (data == true) { // this.continueDelete(attach); // } // }); - + //this.openApplyModal(this.WorkListActionObj); - - + + ////////////this.applyAction(this.WorkListActionObj); } @@ -448,7 +467,8 @@ export class WorklistMainPoComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainPoComponent.PASS_RES_ATTR ); - this.common.openWorklistRFCPage(); + //this.common.openWorklistRFCPage(); + this.openRFCModal(); } else if (ButtonAction == "ANSWER_INFO") { // this.navCtrl.push("WorkListReplacmentRollPage", { // pQuestion: this.pQuestion, @@ -469,7 +489,8 @@ export class WorklistMainPoComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainPoComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); } else if ( ButtonAction == "DELEGATE" || ButtonAction == "REQUEST_INFO" || @@ -495,7 +516,8 @@ export class WorklistMainPoComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainPoComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); } else if ( ButtonAction == "UPDATE_ACTION" || ButtonAction == "CONTINUE_ACTION" @@ -587,29 +609,29 @@ export class WorklistMainPoComponent implements OnInit { this.hideForwordEmployee = result.NotificationRespondRolesList[0]; } this.notificationDynamicFields(result.NotificationGetRespondAttributesList); - this.NotificationGetRespondAttributesList=result.NotificationGetRespondAttributesList; + this.NotificationGetRespondAttributesList = result.NotificationGetRespondAttributesList; this.common.sharedService.setSharedData( this.NotificationGetRespondAttributesList, WorklistMainPoComponent.PASS_RES_ATTR ); - this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList; + this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList; if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema); } // valid it } // End handleWorkListButtonsResult - notificationDynamicFields(notificationAttr){ + notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; - for(let i=0;i { @@ -689,6 +711,7 @@ export class WorklistMainPoComponent implements OnInit { if (this.common.validResponse(result)) { if (this.common.hasData(result.GetActionHistoryList)) { this.actionHistoryRes = result.GetActionHistoryList; + this.P_PAGE_NUM++; this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; let lastItemIndex = this.actionHistoryRes.length - 1; @@ -701,20 +724,22 @@ export class WorklistMainPoComponent implements OnInit { } } } + this.turnCateFun(this.actionHistoryRes); + } } - async openNoteDetail(note,sender) { + async openNoteDetail(note, sender) { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); - console.log("note"+note); + console.log("note" + note); this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') - this.common.sharedService.setSharedData(sender,'ViewNoteModalPageSender') + this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') const modal = await this.modalCtrl.create({ component: ViewNoteModalComponent, - backdropDismiss:false, + backdropDismiss: false, }); modal.cssClass = 'note-modal'; @@ -755,7 +780,7 @@ export class WorklistMainPoComponent implements OnInit { } }//end infiniteScroll -//**********Attachment *****************// + //**********Attachment *****************// async OpenAttachFiles(value, Type) { @@ -774,9 +799,9 @@ export class WorklistMainPoComponent implements OnInit { console.log(itemID); this.IsReachEnd = false; const request = new POItemHistoryRequest(); - request.P_ITEM_ID=parseInt(itemID); - request.P_PAGE_LIMIT=100; - request.P_PAGE_NUM=1; + request.P_ITEM_ID = parseInt(itemID); + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; this.worklistMainService.getPOItemHistory(request). subscribe((result: POItemHistoryRes) => { // this.common.sharedService.setSharedData( @@ -788,7 +813,7 @@ export class WorklistMainPoComponent implements OnInit { WorklistMainPoComponent.PASS_PO_INFO ); //open page - // this.common.openItemHistoryPage(); + // this.common.openItemHistoryPage(); this.handleItemHistoryResult(result); }); } @@ -801,21 +826,22 @@ export class WorklistMainPoComponent implements OnInit { } } - else{ + else { this.common.presentAlert( this.ts.trPK("general", "empty") - ); } + ); + } } - getQutationAnalysis(headerID,itemID) { - console.log(itemID+headerID); + getQutationAnalysis(headerID, itemID) { + console.log(itemID + headerID); this.IsReachEnd = false; const request = new QuotationAnalysisRequest(); - request.P_ITEM_ID=parseInt(itemID); - request.P_PO_HEADER_ID=headerID; - request.P_PAGE_LIMIT=100; - request.P_PAGE_NUM=1; + request.P_ITEM_ID = parseInt(itemID); + request.P_PO_HEADER_ID = headerID; + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; this.worklistMainService.getQutationAnalysis(request). subscribe((result: QuotationAnalysisResponse) => { this.common.sharedService.setSharedData( @@ -827,7 +853,7 @@ export class WorklistMainPoComponent implements OnInit { WorklistMainPoComponent.PASS_PO_HEADER_ID ); //open page - + this.handleQutationAnalysisResult(result); }); @@ -840,10 +866,10 @@ export class WorklistMainPoComponent implements OnInit { //open page //set sheard data // - - this.common.openQutationAnalysisPage(); - + this.common.openQutationAnalysisPage(); + + // this.QutationAnalysisRes = result.GetQutationAnalysisList; // this.P_PAGE_NUM++; // let lastItemIndex = this.QutationAnalysisRes.length - 1; @@ -856,18 +882,19 @@ export class WorklistMainPoComponent implements OnInit { // } // } }//hasData - else{ - this.common.presentAlert( - this.ts.trPK("general", "empty") - ); } + else { + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); + } } } - + loadMoreNotificationBody() { console.log("loadMoreNotificationBody PO"); if (!this.IsReachEnd) { - console.log("this.IsReachEnd"+ this.IsReachEnd); + console.log("this.IsReachEnd" + this.IsReachEnd); this.worklistMainService.getPONotificationBody(this.WorkListBodyObj). subscribe((result: any) => { @@ -882,9 +909,9 @@ export class WorklistMainPoComponent implements OnInit { this.IsReachEnd = false; } this.notificationBodyRes.push(element); - }, (Error) => console.log(Error), () => - //infiniteScroll.target.complete() - console.log("test") + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") ); }// if list length >0 else { @@ -892,7 +919,7 @@ export class WorklistMainPoComponent implements OnInit { } }// if response == 1 //this.pageNum++; - // infiniteScroll.target.complete(); + // infiniteScroll.target.complete(); }); } else { @@ -918,25 +945,155 @@ export class WorklistMainPoComponent implements OnInit { this.IsReachEnd = false; } this.actionHistoryRes.push(element); - }, (Error) => console.log(Error), () => - //infiniteScroll.target.complete() - console.log("TEST")); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); }// if list length >0 else { this.IsReachEnd = true; } }// if response == 1 //this.pageNum++; - // infiniteScroll.target.complete(); + // infiniteScroll.target.complete(); }); } else { //if (infiniteScroll) - //infiniteScroll.target.complete(); + //infiniteScroll.target.complete(); } }//end infiniteScroll + async openMoreActions() { + + const modal = await this.modalCtrl.create({ + component: MoreActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + // this.selectedAction = data.data; + this.actionType = data.data.BUTTON_ACTION; + console.log(this.actionType); + ///call Action button + this.actionButton(this.actionType); + } + }); + + return await modal.present(); + + + + + } + + /////////////////////////////////////////// + + public checkLines(note) { + console.log(note.split("\n").length); + console.log(note.length); + + if (note && note != null) { + + + return (note.length > this.lines_note_limit) ? true : false; + + + + } + + + + return false; + }; + + + public turnCateFun(actionHis) { + for (let i = 0; i < actionHis.length; i++) { + actionHis[i].visible = false; + + } + // actionHis.map((obj) => { + // obj.visible = false; + // // or via brackets + // // obj['total'] = 2; + // return obj; + // }) + this.actionHistoryRes = actionHis; + console.log("test"); + } + + async openRepRolModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListReplacementRollComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + + async openRFCModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListRfcComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + } diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index d3b32a89..6e82b0cf 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -1,186 +1,184 @@ - + {{ts.trPK('worklistMain','title')}} - - - - - - {{ts.trPK('worklistMain','info')}} - - - - {{ts.trPK('worklistMain','itemReq')}} - - - - - {{'worklistMain, actionHis' | translate}} - - - - - - {{'general, attachment' | translate}} - - - - - + + +
{{getPassNotificationDetails.SUBJECT}}
+ + + + + + {{ts.trPK('worklistMain','itemReq')}} + + + {{'worklistMain, action' | translate}} + + + {{'general, file' | translate}} - - + -
{{pInformation}}
+ + {{ts.trPK('worklistMain','info')}} + +
- - - - - - - -
- - -
-
+ + - - - -
+ + +
- - -
-
+ + + - - - -
+ + + +
- - -
-
- - - -
+ +
+ + + +
- - -
-
- - - -
- - - -
-
- - - -
- - + + + +
+ + - -
-
+ +
+
- + + + - - - + --> -
+ - - +
- - -
+ + - -
- + + +
-
-
+ + +
+
+
- -
- - -
{{totalH}}
-
{{valueH}}
-
- -
{{taxH}}
-
{{taxvalueH}}
+ +
+ + +
{{totalH}}
+
{{valueH}}
-
-
+ + +
{{taxH}}
+
{{taxvalueH}}
-
-
+
+
+
+
-
- -
+ + + - -
-
-
+ +
+
- - - + + - - - - + - + + +
+

{{ 'general, empty' | translate}}

+
+ -
-

{{ 'general, empty' | translate}}

-
- -
- - -
- + + + + + + +
+ + - + - - - - -
- + + + +
+ - {{Lines.COST_CENTER}} -
- - - -
- - {{Lines.ITEM_CODE}} -
-
- + {{Lines.ITEM_CODE}} +
+
+ + + +
- - -
- - {{Lines.UOM}} -
- + {{Lines.UOM}} +
- - -
- - {{Lines.UNIT_PRICE}} -
-
- + + +
+ {{Lines.UNIT_PRICE}} - - -
- - {{Lines.LINE_AMOUNT}} -
+
+
+ + + +
- + {{Lines.LINE_AMOUNT}} +
- - -
- - {{Lines.QUANTITY}} -
-
-
- + + +
- + {{Lines.QUANTITY}} +
+ +
- - - - - - - - -
-

{{ 'general, empty' | translate}}

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

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+ + -
- +
--> + +
+ + -
-
- - {{actionHistory.ACTION}} - {{actionHistory.NAME}} - - - {{actionHistory.NOTIFICATION_DATE| dateString }} - - -
- -
+
+ + + {{actionHistory.NAME}} + - +
+
+
+
+ Note: {{actionHistory.NOTE}} +
+
- - - - - - -
-

{{ 'general, notAttch' | translate}}

-
-
- - -
- - -
- -
-
-
-
- -
-
- +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
- - {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} -
- -
-
- -
- + + + + +
+ + + {{actionHistory.ACTION}} + + + + {{actionHistory.NOTIFICATION_DATE| dateString }} + + +
+ +
+ + + + + + + + +
+

{{ 'general, notAttch' | translate}}

+
+ +
+ + + +
+ +
+
- - - +
+ +
+
+ +
+ + {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} - + +
+ +
- - - +
+ +
@@ -418,14 +417,28 @@ - - + +
+ + +
+
Transaction Successful
+
+ + + + + + {{'actionHis, action' | translate}} @@ -438,7 +451,6 @@ - @@ -447,10 +459,59 @@ -
- - - + + --> + + + + + + + + + + + Approve + + + + + Reject + + + + + Request + + + + Skip + + + + + More + + + diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss index db039aed..74a23cee 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss @@ -1,8 +1,106 @@ -.itemHISBtn{ - padding: 5px; - color: var(--light); - background: var(--darkgray); - border-radius: 3px; - width: 85%; - height: 40px; -} \ No newline at end of file +// .itemHISBtn{ +// padding: 5px; +// color: var(--light); +// background: var(--darkgray); +// border-radius: 3px; +// width: 85%; +// height: 40px; +// } + + +// .rowBtn{ +// display: flex; +// flex-direction: row; +// justify-content: center; +// align-items: center; +// background: white; +// } + + + +// .rowBorder{ +// border-bottom: solid 0.03cm var(--grayBG); + +// } +// .colBorder{ +// border-right: solid 0.03cm var(--grayBG); + +// } + +// .dateActionHistory{ +// text-align: end; +// // margin-top: -25px; +// } + + +// .actionBtn{ +// --border-radius: 50% !important; +// height: 55px; +// width: 55px; +// --background: var(--newgreen); // will be dynamic +// background: transparent; +// margin:10px; +// } + +// .itemAttch{ +// border-radius: 11px; +// margin: 8px; +// --min-height: 60px; +// --max-height: 60px; +// } + +// .less { +// max-height: 54px; +// } + +// .noDataDiv{ +// background: #ffffff; +// height: 11%; +// text-align: center; +// padding-top: 1px; +// border-radius: 10px; +// margin: 10px; +// } + +// .container { +// font-size: 14px; +// line-height: 14px; +// height: 16px; +// overflow: hidden; +// text-align: justify; +// } + +// .show { +// overflow: visible; +// height: auto; +// } + +// .showMore{ +// padding: 0px; +// background: transparent; +// color: blue; +// text-decoration: underline; +// font-size: 14px; +// } +// .succssfullMSG{ +// height: 100%; +// width: 100%; +// background: var(--newgreen); +// color: white; +// font-weight: bold; +// font-size: 20px; +// text-align: center; +// vertical-align: middle; +// padding-top: 30px; +// } + +// .succssfullIcon{ +// width: 60%; +// text-align: center; +// height: 60%; +// } +// .subjectNotification{ +// text-align: center; +// padding-top: 10px; +// font-weight: bold; +// } \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index bfb8ab5f..4a8ce8aa 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -28,6 +28,10 @@ import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.compo import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component'; import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component'; +import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component'; +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; + @Component({ selector: 'app-worklist-main-pr', templateUrl: './worklist-main-pr.component.html', @@ -83,6 +87,19 @@ export class WorklistMainPRComponent implements OnInit { confirmMsg: string; delMsg: string; closeMsg: string; + truncating: boolean; + orgNote: any; + lines_note_limit: any = 15; + selectedIndex: any; + showLessBtn: boolean; + showMoreBtn: boolean; + demoeAttach: any = []; + notiActionBtnMore: any = []; + messageSuccess: boolean = false; + activeSegment: any = "info"; + approveDis: boolean; + rejectDis: boolean; + requestDis: boolean; constructor( @@ -109,43 +126,19 @@ export class WorklistMainPRComponent implements OnInit { this.intializeNotificationDetail(); - let segment = document.querySelector('ion-segment'); - let slides = document.querySelector('ion-slides'); - segment.addEventListener('ionChange', (ev) => onSegmentChange(ev)); - slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev)); - // On Segment change slide to the matching slide - function onSegmentChange(ev) { - console.log("ev.detail.value" + ev.detail.value); - slideTo(ev.detail.value); - } - function slideTo(index) { - console.log("index: " + index); + } - slides.slideTo(index); - } - // On Slide change update segment to the matching value - async function onSlideDidChange(ev) { - var index = await slides.getActiveIndex(); - console.log("index: " + index); - clickSegment(index); - } - function clickSegment(index) { - segment.value = index; + intializeNotificationDetail() { + if (this.messageSuccess) { + document.getElementById("notificationDynamicFields").innerHTML = ""; } - - - } - - - intializeNotificationDetail() { - document.getElementById("notificationDynamicFields").innerHTML = ""; console.log("intializeNotificationDetail"); this.getPassNotificationDetails = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_DATA, @@ -197,6 +190,10 @@ export class WorklistMainPRComponent implements OnInit { this.getPRNotificationDetails(this.WorkListBodyObj); } } + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + console.log(" event.detail.value: " + event.detail.value); + } getPRNotificationDetails(notificationBodyObj) { this.worklistMainService @@ -298,7 +295,20 @@ export class WorklistMainPRComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - } // if result == null + this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); + console.log("test" + this.notificationButtonRes.length); + for (let i = 0; i < this.notificationButtonRes.length; i++) { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { + this.approveDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { + this.rejectDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + this.requestDis = true; + } // if result == null + } // valid it + } } // valid it } // End handleWorkListButtonsResult @@ -313,14 +323,14 @@ export class WorklistMainPRComponent implements OnInit { handleApplayActionResult(result) { if (this.common.validResponse(result)) { if (result.MessageStatus == 1) { - // this.navCtrl.push("HomePage"); - //this.common.openHome(); - //this.common.openNotificationPage(); - // for( var i = 0; i < this.notificationArray.length; i++){ - // if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) { - // this.notificationArray.splice(i, 1); - // } - // } + + // show succsfull popup + this.messageSuccess = true; + + setTimeout(() => { + this.messageSuccess = false; + }, 5000); + this.getNotificationCountAfterSubmit(); this.nextNotfification(); } @@ -348,8 +358,14 @@ export class WorklistMainPRComponent implements OnInit { } } - actionButton() { - let ButtonAction: string = this.actionType; + actionButton(action) { + + console.log("actionButton" + action); + alert("don't forget"); + //let ButtonAction: string = this.actionType; + let ButtonAction: string = action; + + var responseAttrDic = this.notExampleJsonObject; this.P_RESPOND_ATTRIBUTES_TBL = []; for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { @@ -451,7 +467,8 @@ export class WorklistMainPRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainPRComponent.PASS_RES_ATTR ); - this.common.openWorklistRFCPage(); + // this.common.openWorklistRFCPage(); + this.openRFCModal(); } else if (ButtonAction == "ANSWER_INFO") { // this.navCtrl.push("WorkListReplacmentRollPage", { // pQuestion: this.pQuestion, @@ -472,7 +489,8 @@ export class WorklistMainPRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainPRComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); } else if ( ButtonAction == "DELEGATE" || ButtonAction == "REQUEST_INFO" || @@ -498,7 +516,8 @@ export class WorklistMainPRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainPRComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); } else if ( ButtonAction == "UPDATE_ACTION" || ButtonAction == "CONTINUE_ACTION" @@ -703,6 +722,8 @@ export class WorklistMainPRComponent implements OnInit { } } } + this.turnCateFun(this.actionHistoryRes); + } } @@ -876,9 +897,136 @@ export class WorklistMainPRComponent implements OnInit { //infiniteScroll.target.complete(); } }//end infiniteScroll + //////////////////////////////////////////////////////// + + public checkLines(note) { + console.log(note.split("\n").length); + console.log(note.length); + + if (note && note != null) { -} + return (note.length > this.lines_note_limit) ? true : false; + } + + + + return false; + }; + + + public turnCateFun(actionHis) { + for (let i = 0; i < actionHis.length; i++) { + actionHis[i].visible = false; + + } + // actionHis.map((obj) => { + // obj.visible = false; + // // or via brackets + // // obj['total'] = 2; + // return obj; + // }) + this.actionHistoryRes = actionHis; + console.log("test"); + } + + + async openMoreActions() { + + + + + const modal = await this.modalCtrl.create({ + component: MoreActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + // this.selectedAction = data.data; + this.actionType = data.data.BUTTON_ACTION; + console.log(this.actionType); + this.actionButton(this.actionType); + ///call Action button + } + }); + + return await modal.present(); + + + + + } + async openRepRolModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListReplacementRollComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + async openRFCModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListRfcComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + +} \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index c9965cd0..c120b383 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -1,136 +1,529 @@ - - - {{ts.trPK('worklistMain','title')}} - - - - + + + {{ts.trPK('worklistMain','title')}} + + + + - -
{{pInformation}}
- - - -
{{ts.trPK('worklistMain','info')}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
+ + + +
{{getPassNotificationDetails.SUBJECT}}
+ + + + + {{ts.trPK('worklistMain','title')}} + + + + {{'worklistMain, action' | translate}} + + + + {{'general, file' | translate}} + + + + {{ts.trPK('worklistMain','info')}} + + + + + + + +
{{pInformation}}
+ + +
+ + + + + +
+ + + + + +
+ +
+
+
+
+ +
+
+ + +
Employee will also on leave
+ + + + + +
+ +
+ + + + + +
+
+
+ + + + +
+
+ + + +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + + + + + + +
+ + + + +
+ + +
+ + + +
+ + +
+
+ + + + +
+ + +
+ + + +
+ + +
+
+ + + +
+ + +
+ + + +
+ + +
+
+ + + +
+ +
+
+
+ + + + +
+ + + + + + +
Employee Detail
+ +
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ + +
+
+ + + +
+ + +
+
+
+
+ +
+
+
+ + + + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{actionHistory.NOTIFICATION_DATE| dateString }} +
+
+
+
+
+
+ + + +
+
+ +
+ + +
+

{{ 'general, notAttch' | translate}}

+
+
+ + + +
+ +
+
+
+
+ +
+
+ +
+ + {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} + + + +
+ +
+ + +
+
+ + +
-
+
- -
- - {{'actionHis, action' | translate}} - - {{notificationButtons.BUTTON_LABEL}} - - - +
+ + + + +
+
+
+
- -
- {{ts.trPK('general','submit')}} -
-
- {{'worklistMain, skip' | translate}} -
-
\ No newline at end of file +
+ + +
+
Transaction Successful
+
+ + + + + + + + + + + + + + + + Approve + + + + + Reject + + + + + Request + + + + Skip + + + + + More + + + + + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss index afa6f886..a152e092 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss @@ -69,4 +69,202 @@ color: var(--secondary); border: 2px solid var(--gray); min-width: auto; - } \ No newline at end of file + } +//////////////////////// + .itemHISBtn{ + padding: 5px; + color: var(--light); + background: var(--darkgray); + border-radius: 3px; + width: 85%; + height: 40px; + } + + + .rowBtn{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + background: white; + } + + + + .rowBorder{ + border-bottom: solid 0.03cm var(--grayBG); + + + } + .colBorder{ + border-right: solid 0.03cm var(--grayBG); + + } + + .dateActionHistory{ + text-align: end; + // margin-top: -25px; + margin-top: -3px; + } + + + .actionBtn{ + --border-radius: 50% !important; + height: 55px; + width: 55px; + --background: var(--newgreen); // will be dynamic + background: transparent; + margin:10px; + } + + .itemAttch{ + border-radius: 11px; + margin: 8px; + --min-height: 60px; + --max-height: 60px; + } + + .less { + max-height: 54px; + } + + .noDataDiv{ + background: #ffffff; + height: 11%; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + } + + .container { + font-size: 14px; + line-height: 14px; + height: 15px; + overflow: hidden; + text-align: justify; + } + + .show { + overflow: visible; + height: auto; + } + + .showMore{ + padding: 0px; + background: transparent; + color: blue; + text-decoration: underline; + font-size: 14px; + } + + .succssfullMSG{ + height: 100%; + width: 100%; + background: var(--newgreen); + color: white; + font-weight: bold; + font-size: 20px; + text-align: center; + vertical-align: middle; + padding-top: 30px; + } + + .succssfullIcon{ + width: 60%; + text-align: center; + height: 60%; + } + //////////////////////////////// + .subOrdinateList{ + // margin: 10px; + // border-top-left-radius: 45px; + // border-bottom-left-radius: 45px; + // border: var(--cusgray) 1px solid !important; + --background: transparent; + margin-left: -15px; + margin-right: 7px; +} +.status{ + text-align: center; +background: green; +border-radius: 10px; +font-size: 12px; +height: 40px; +color: white; +} +.rowHeader{ + border-bottom: 1px solid var(--cusgray); + padding-bottom: 10px; + margin-bottom: -17px; +} + +.container{ + position:relative; +} +.overflow-hid-div{ + overflow:hidden; + margin-left:50px; + width:200px; + height: 200px; + background-color:red; + +} +.inner{ + width:50px; + height: 50px; + background-color:green; + position: absolute; + left:25px; + top:25px; + +} +.gridSubordinates{ + margin-left: 38px; + border-top-left-radius: 28px; + border-bottom-left-radius: 40px; + // padding-left: 8px; + background:var(--light); + border-top-right-radius: 16px; + border-bottom-right-radius: 16px; +} + +.subOrdinateDiv{ + z-index: 4; + margin-left: -44px; + position: absolute; + top: -2px; +} +.subOrdinateImg{ + width: 85px; + border: #e4e4e4 solid 2px; + -moz-border-radius: 50%; + border-radius: 50%; + border: 3px solid #f0efef; +} + +.subOrdinateRow{ + margin-left: 40px; +} + +.label{ +font-size: 14px; +} + +.subjectNotification{ + text-align: center; + padding-top: 10px; + font-weight: bold; +} + +.submitterInfo{ + padding-top: 10px; + padding-bottom: 10px; +} +ion-card{ + color: black !important; +} +//// +.tabBar{ + height:70px +} diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 983ffb57..ff2de615 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -15,10 +15,29 @@ import { HomeComponent } from "src/app/notification/home/home.component"; import { TextInput } from 'src/app/uI-elements/text.input'; import { TextAreaInput } from 'src/app/uI-elements/text-area.input'; import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; -import { Events } from '@ionic/angular'; +import { Events, ModalController } from '@ionic/angular'; import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes'; import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes'; import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes'; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { WorklistAttachService } from 'src/app/absence/service/work-list-attach.service'; +import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq'; +import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; +import { WorklistService } from '../service/worklist.service'; +import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component'; +import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component'; +import { GetSubordinatesLeavesRequest } from '../../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest'; +import { DashboredService } from '../../hmg-common/services/dashbored/dashbored.service' +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { WorklistsubmitterInfoResponse } from '../models/WorklistsubmitterInfoRes'; +import { WorkListSubmitterInfoRequest } from '../models/WorklistsubmitterInfoReq'; +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; +import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component'; + + + @Component({ selector: "app-worklist-main", templateUrl: "./worklist-main.component.html", @@ -51,29 +70,85 @@ export class WorklistMainComponent implements OnInit { selEmployeeID: any; actionType: string = ""; notificationArray: any; - notificationDynamicAttributeArr:any; + notificationDynamicAttributeArr: any; private textInput: TextInput; private textArea: TextAreaInput; + private WorkListAttachObj: WorkListButtonRequest; + P_PAGE_NUM: number = 1; + P_PAGE_LIMIT: number = 100; notificationCount: any; + activeSegment: any = "info"; + lines_note_limit: any = 15; + attachmentRes: any; + private WorkListActionHistoryObj: WorkListActionHistoryRequest; + IsReachEnd: boolean = false; + notiActionBtnMore: any = []; + messageSuccess: boolean = false; + confirmMsg: string; + newArr: any = []; + selEmp: any; + subordinatesleaveList: any; + private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest; + submitterInfoRes: any; + approveDis: boolean = false; + rejectDis: boolean = false; + requestDis: boolean = false; + moreDisabled: boolean = true; + constructor( + public worklistService: WorklistService, public common: CommonService, public ts: TranslatorService, public worklistMainService: WorklistMainService, public elementRef: ElementRef, public menuService: MenuService, public events: Events, - ) { } + public worklistAttachService: WorklistAttachService, + private modalCtrl: ModalController, + public dashboredService: DashboredService, + public authService: AuthenticationService + + + ) { + this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + } ngOnInit() { + + this.selEmp = this.common.sharedService.getSharedData( + MenuResponse.SHARED_SEL_EMP, + false + ); + if (this.selEmp) { } else { + this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { + if (user) { + this.selEmp = user.ASSIGNMENT_NUMBER; + + } + }); + } + + console.log(" this.selEmp" + this.selEmp); this.intializeNotificationDetail(); + + + } + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + console.log(" event.detail.value: " + event.detail.value); } intializeNotificationDetail() { - document.getElementById("notificationDynamicFields").innerHTML=""; + if (this.messageSuccess) { + document.getElementById("notificationDynamicFields").innerHTML = ""; + } this.getPassNotificationDetails = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_DATA, false ); + console.log(this.getPassNotificationDetails.ROW_NUM); this.notificationArray = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_ARR, @@ -81,6 +156,8 @@ export class WorklistMainComponent implements OnInit { ); this.WorkListBodyObj = new WorkListBodyRequest(); this.WorkListButtonsObj = new WorkListButtonRequest(); + this.WorkListAttachObj = new WorkListButtonRequest(); + this.WorkListSubmitterInfoObj = new WorkListSubmitterInfoRequest(); this.WorkListActionObj = new WorkListActionRequest(); @@ -96,45 +173,65 @@ export class WorklistMainComponent implements OnInit { this.WorkListActionObj.P_ACTION_MODE = ""; this.WorkListActionObj.P_COMMENTS = ""; this.WorkListActionObj.P_APPROVER_INDEX = null; + + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + + this.WorkListSubmitterInfoObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + this.WorkListSubmitterInfoObj.P_PAGE_NUM = 1; + this.WorkListSubmitterInfoObj.P_SELECTED_EMPLOYEE_NUMBER = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER; + this.WorkListSubmitterInfoObj.P_SELECTED_RESP_ID = -999; + this.WorkListSubmitterInfoObj.P_SEARCH_EMAIL_ADDRESS = ""; + this.WorkListSubmitterInfoObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.WorkListSubmitterInfoObj.P_SEARCH_USER_NAME = ""; + + this.getsubmitterInfo(this.WorkListSubmitterInfoObj); + + this.getNotificationButtons(this.WorkListButtonsObj); this.getNotificationResAttr(this.WorkListButtonsObj); + this.getAttachmentNotification(this.WorkListAttachObj); + this.getActionHistory(this.WorkListActionHistoryObj); if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { this.getEITNotificationDetails(this.WorkListBodyObj); } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { this.getAbsenceNotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){ - this.getPONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO"){ + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") { + this.getPONotificationDetails(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") { this.getMONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR"){ - this.getPRNotificationDetails(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") { + this.getPRNotificationDetails(this.WorkListBodyObj); } } - getPRNotificationDetails(notificationBodyObj){ + getPRNotificationDetails(notificationBodyObj) { this.worklistMainService - .getPRNotificationBody(notificationBodyObj) - .subscribe((result: PRNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "PR"); - }); + .getPRNotificationBody(notificationBodyObj) + .subscribe((result: PRNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "PR"); + }); } - - getMONotificationDetails(notificationBodyObj){ - this.worklistMainService + + getMONotificationDetails(notificationBodyObj) { + this.worklistMainService .getMONotificationBody(notificationBodyObj) .subscribe((result: MONotificatonBodyResponse) => { //this.handleWorkListBodyResult(result, "MO"); }); - } - - getPONotificationDetails(notificationBodyObj){ + } + + getPONotificationDetails(notificationBodyObj) { this.worklistMainService - .getPONotificationBody(notificationBodyObj) - .subscribe((result: PONotificatonBodyResponse) => { - // console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - // this.handleWorkListBodyResult(result, "PO"); - }); + .getPONotificationBody(notificationBodyObj) + .subscribe((result: PONotificatonBodyResponse) => { + // console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); + // this.handleWorkListBodyResult(result, "PO"); + }); } getEITNotificationDetails(notificationBodyObj) { @@ -167,8 +264,17 @@ export class WorklistMainComponent implements OnInit { if (result.GetAbsenceCollectionNotificationBodyList) { this.notificationBodyRes = result.GetAbsenceCollectionNotificationBodyList; + + // getDimensions(this.notificationBodyRes) { + let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) { + return list.SEGMENT_NAME === "END_DATE" || list.SEGMENT_NAME === "START_DATE"; + }); + + // return obj; + // } + this.getSubordinatesleave(obj) } - }else if (Type == "PR") { + } else if (Type == "PR") { if (result.GetAbsenceCollectionNotificationBodyList) { this.notificationBodyRes = result.GetAbsenceCollectionNotificationBodyList; @@ -178,7 +284,7 @@ export class WorklistMainComponent implements OnInit { } //End handleWorkListBodyResult - + getNotificationButtons(notificationButtonsObj) { this.worklistMainService .getNotificationButtons(notificationButtonsObj) @@ -192,8 +298,27 @@ export class WorklistMainComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - } // if result == null - } // valid it + this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); + console.log("test" + this.notificationButtonRes.length); + for (let i = 0; i < this.notificationButtonRes.length; i++) { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { + this.approveDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { + this.rejectDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + this.requestDis = true; + } // if result == null + else ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") + { + this.moreDisabled = false; + + } + } // valid it + } + } } // End handleWorkListButtonsResult applyAction(WorkListActionObj) { @@ -215,6 +340,13 @@ export class WorklistMainComponent implements OnInit { // this.notificationArray.splice(i, 1); // } // } + + this.messageSuccess = true; + + setTimeout(() => { + this.messageSuccess = false; + }, 5000); + this.getNotificationCountAfterSubmit(); this.nextNotfification(); } @@ -242,11 +374,12 @@ export class WorklistMainComponent implements OnInit { } } - actionButton() { - let ButtonAction: string = this.actionType; + actionButton(action) { + //let ButtonAction: string = this.actionType; + let ButtonAction: string = action; var responseAttrDic = this.notExampleJsonObject; this.P_RESPOND_ATTRIBUTES_TBL = []; - for (let i=0;i { + this.applyAction(this.WorkListActionObj); + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg) + + // this.openApplyModal(this.WorkListActionObj); + + } if (ButtonAction == "RFC") { // alert("Return For Correction"); this.WorkListActionObj.P_ACTION_MODE = ButtonAction; - // this.navCtrl.push("WorkListRfcPage", { - // passNotificationInfo: this.getPassNotificationDetails, - // passActionMode: ButtonAction, - // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL - // }); + this.common.sharedService.setSharedData( this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO @@ -301,7 +471,8 @@ export class WorklistMainComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainComponent.PASS_RES_ATTR ); - this.common.openWorklistRFCPage(); + //this.common.openWorklistRFCPage(); + this.openRFCModal(); } else if (ButtonAction == "ANSWER_INFO") { // this.navCtrl.push("WorkListReplacmentRollPage", { // pQuestion: this.pQuestion, @@ -322,7 +493,8 @@ export class WorklistMainComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + //this.common.openWorklistRollReplacement(); + this.openRepRolModal(); } else if ( ButtonAction == "DELEGATE" || ButtonAction == "REQUEST_INFO" || @@ -348,7 +520,8 @@ export class WorklistMainComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL, WorklistMainComponent.PASS_RES_ATTR ); - this.common.openWorklistRollReplacement(); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); } else if ( ButtonAction == "UPDATE_ACTION" || ButtonAction == "CONTINUE_ACTION" @@ -440,22 +613,22 @@ export class WorklistMainComponent implements OnInit { this.hideForwordEmployee = result.NotificationRespondRolesList[0]; } this.notificationDynamicFields(result.NotificationGetRespondAttributesList); - this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList; + this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList; if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema); } // valid it } // End handleWorkListButtonsResult - notificationDynamicFields(notificationAttr){ + notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; - for(let i=0;i { + this.handleWorkListAttachResult(result); + }); + } + + handleWorkListAttachResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + } + + getActionHistory(WorkListActionHistoryObj) { + this.IsReachEnd = false; + this.worklistService.getActionHistory(WorkListActionHistoryObj). + subscribe((result: WorkListActionHistoryResponse) => { + this.handleWorkListActionHistoryResult(result); + }); + + + } + handleWorkListActionHistoryResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetActionHistoryList)) { + this.actionHistoryRes = result.GetActionHistoryList; + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + let lastItemIndex = this.actionHistoryRes.length - 1; + if (result.GetActionHistoryList[lastItemIndex]) { + let lastitem = result.GetActionHistoryList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + } + this.turnCateFun(this.actionHistoryRes); + + } + } + } + + public checkLines(note) { + + + if (note && note != null) { + + + return (note.length > this.lines_note_limit) ? true : false; + + + } + + + + return false; + }; + + + public turnCateFun(actionHis) { + for (let i = 0; i < actionHis.length; i++) { + actionHis[i].visible = false; + + } + + this.actionHistoryRes = actionHis; + console.log("test"); + } + + async openMoreActions() { + + + + + const modal = await this.modalCtrl.create({ + component: MoreActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + // this.selectedAction = data.data; + this.actionType = data.data.BUTTON_ACTION; + console.log(this.actionType); + ///call Action button + this.actionButton(this.actionType); + } + }); + + return await modal.present(); + + + + + } + async OpenAttachFiles(value, Type) { + + + this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage') + const modal = await this.modalCtrl.create({ + component: WorkListAttachViewComponent + }); + + return await modal.present(); + } + + + ///calling getSubleave + + getSubordinatesleave(list) { + + console.log(list); + let to; + let from; + for (let i = 0; i < list.length; i++) { + if (list[i].SEGMENT_NAME == "END_DATE") + to = list[i].DATE_VALUE; + + else if (list[i].SEGMENT_NAME == "START_DATE") { + from = list[i].DATE_VALUE; + } + } + console.log(new Date(to)); + console.log(new Date(from)); + + + + + const request = new GetSubordinatesLeavesRequest(); + request.P_DATE_FROM = "/Date(" + Date.parse(from) + ")/";//new Date(from); + request.P_DATE_TO = "/Date(" + Date.parse(to) + ")/" //new Date(to); + request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; + // ="'/Date(" + Date.parse(from) + ")'" + + + this.dashboredService.getSubordinatesLeaves(request). + subscribe((result: any) => { + + this.handleSubordinatesLeavesResult(result); + }); + } + public handleSubordinatesLeavesResult(result) { + if (this.common.validResponse(result)) { + // GetSubordinatesLeavesList it used in dashbored + // if (this.common.hasData(result.GetSubordinatesLeavesList)) { + if (this.common.hasData(result.SubordinatesOnLeavesList)) { + + this.subordinatesleaveList = result.SubordinatesOnLeavesList; + + } + } + } + + getsubmitterInfo(notificationSubmitterInfoObj) { + this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj). + subscribe((result: WorklistsubmitterInfoResponse) => { + this.handleSubmitterInfoResult(result); + }); + } + handleSubmitterInfoResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (this.common.hasData(result.MemberInformationList)) { + //if (result.MemberInformationList != null) { + this.submitterInfoRes = result.MemberInformationList; + } // if result == null + } // valid it + }// End handleWorkListButtonsResult + + async openRepRolModal() { + + const modal = await this.modalCtrl.create({ + component: WorkListReplacementRollComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + + async openRFCModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListRfcComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + + + async openApplyModal(WorkListActionObj) { + + this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO); + this.common.sharedService.setSharedData(WorkListActionObj, 'ApplyActionModalPage') + // this.common.sharedService.setSharedData( + // this.WorkListActionObj, + // WorklistMainPRComponent.PASS_NOTIFICATION_INFO + // ); + + const modal = await this.modalCtrl.create({ + component: ApplyActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data); // Here's your selected user! + }); + + + return await modal.present(); + + } + + + + + } diff --git a/Mohem/src/app/pipes/json-date/json-date.ts b/Mohem/src/app/pipes/json-date/json-date.ts new file mode 100644 index 00000000..9be7121a --- /dev/null +++ b/Mohem/src/app/pipes/json-date/json-date.ts @@ -0,0 +1,21 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +/** + * Generated class for the JsonDatePipe pipe. + * + * See https://angular.io/api/core/Pipe for more info on Angular Pipes. + */ +@Pipe({ + name: 'jsonDate', +}) +export class JsonDatePipe implements PipeTransform { + /** + * Takes a value and makes it lowercase. + */ + transform(value: string): any { + if(value) + return new Date(parseInt(value.substr(6))); + else + return value; + } +} diff --git a/Mohem/src/app/pipes/pipes.module.ts b/Mohem/src/app/pipes/pipes.module.ts index de2e17a1..c754645c 100644 --- a/Mohem/src/app/pipes/pipes.module.ts +++ b/Mohem/src/app/pipes/pipes.module.ts @@ -1,11 +1,13 @@ import { NgModule } from '@angular/core'; import { DateStringPipe } from './date-string/date-string'; import { FilterLangPipe } from './filter-lang/filter-lang'; +import { TurncatePipe } from './turncate/turncate.pipe'; @NgModule({ declarations: [DateStringPipe, - FilterLangPipe], + FilterLangPipe, + TurncatePipe], imports: [], exports: [DateStringPipe, - FilterLangPipe] + FilterLangPipe,TurncatePipe] }) export class PipesModule {} diff --git a/Mohem/src/app/pipes/turncate/turncate.pipe.spec.ts b/Mohem/src/app/pipes/turncate/turncate.pipe.spec.ts new file mode 100644 index 00000000..5275fc6d --- /dev/null +++ b/Mohem/src/app/pipes/turncate/turncate.pipe.spec.ts @@ -0,0 +1,8 @@ +import { TurncatePipe } from './turncate.pipe'; + +describe('TurncatePipe', () => { + it('create an instance', () => { + const pipe = new TurncatePipe(); + expect(pipe).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/pipes/turncate/turncate.pipe.ts b/Mohem/src/app/pipes/turncate/turncate.pipe.ts new file mode 100644 index 00000000..992d3782 --- /dev/null +++ b/Mohem/src/app/pipes/turncate/turncate.pipe.ts @@ -0,0 +1,27 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'turncate' +}) +export class TurncatePipe implements PipeTransform { + + transform(value: any, args?: any): any { + console.log("args" + args); + + let limit = args.length > 0 ? parseInt(args[0], 10) : 10; + let trail = args.length > 1 ? args[1] : '...'; + + console.log("limit" + limit); + + console.log("parseInt(args[0], 10)" + parseInt(args[0], 10)); + console.log("trail" + trail); + console.log("limit" + limit); + console.log("parseInt(args[0], 10)" + parseInt(args[0], 10)); + + return value.length > limit ? value.substring(0, limit) + trail : value; } + + + + + +} diff --git a/Mohem/src/assets/imgs/action-approve.png b/Mohem/src/assets/imgs/action-approve.png new file mode 100644 index 00000000..05268bab Binary files /dev/null and b/Mohem/src/assets/imgs/action-approve.png differ diff --git a/Mohem/src/assets/imgs/action-info.png b/Mohem/src/assets/imgs/action-info.png new file mode 100644 index 00000000..f0e6f7e7 Binary files /dev/null and b/Mohem/src/assets/imgs/action-info.png differ diff --git a/Mohem/src/assets/imgs/action-more.png b/Mohem/src/assets/imgs/action-more.png new file mode 100644 index 00000000..de9aa0e7 Binary files /dev/null and b/Mohem/src/assets/imgs/action-more.png differ diff --git a/Mohem/src/assets/imgs/action-reject.png b/Mohem/src/assets/imgs/action-reject.png new file mode 100644 index 00000000..866f068c Binary files /dev/null and b/Mohem/src/assets/imgs/action-reject.png differ diff --git a/Mohem/src/assets/imgs/action-skip.png b/Mohem/src/assets/imgs/action-skip.png new file mode 100644 index 00000000..74e21661 Binary files /dev/null and b/Mohem/src/assets/imgs/action-skip.png differ diff --git a/Mohem/src/assets/imgs/green.png b/Mohem/src/assets/imgs/green.png new file mode 100644 index 00000000..71aa2632 Binary files /dev/null and b/Mohem/src/assets/imgs/green.png differ diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index e922a87b..bb49a900 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -465,6 +465,10 @@ "en": "Attachment", "ar": "مرفق" }, + "file": { + "en": "file", + "ar": "ملف" + }, "select-attachment": { "en": "Select Attachment", "ar": "إختر مرفق" @@ -1681,7 +1685,7 @@ "ar": "معلومات الموظف" }, "info":{ - "en": "Information", + "en": "Info", "ar":"تفاصيل" }, "notfDetails":{ @@ -1761,19 +1765,19 @@ "ar":"العناصر المطلوبة" }, "approveMsg":{ - "en": "Are you sure to approve this purchase requisition ?", + "en": "Are you sure to approve this request ?", "ar":"العناصر المطلوبة" }, "rejectMsg":{ - "en": "Are you sure to reject this purchase requisition ?", + "en": "Are you sure to reject this request?", "ar":"العناصر المطلوبة" }, "delMsg":{ - "en": "Are you sure to delete this purchase requisition ?", + "en": "Are you sure to delete this request?", "ar":"العناصر المطلوبة" }, "closeMsg":{ - "en": "Are you sure to close this purchase requisition ?", + "en": "Are you sure to close this request?", "ar":"العناصر المطلوبة" }, "Supplier":{ @@ -2041,7 +2045,6 @@ "en": "Line Details", "ar":"Line Details" } - }, "payslip": { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c0368be8..bf6ea0e7 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -768,7 +768,19 @@ color: var(--dark); // right: 5%; // bottom: 5%; background: rgba(0, 0, 0, 0.5) !important; - padding: 60% 10% !important; + padding: 30% 10% !important; + --height: 12cm !important; + // --width: 80% !important; + --border-radius: 0.4cm; + +} + +.replaceRoll-modal { + + padding: 30% 1% !important; + --height: 15cm !important; + --width: 100% !important; + --border-radius: 0.4cm; } @@ -819,7 +831,7 @@ color: var(--dark); } .cancelBtn { - background:var(--red) !important; + background:var(--darkblue) !important; white-space: normal !important; color:var(--light) !important; text-transform: capitalize !important; @@ -830,9 +842,11 @@ color: var(--dark); min-width: 5px !important; width: 10px !important; margin: 8px !important; + --background:transparent; + } .confirmBtn { - background:var(--green) !important; + background:var(--newgreen) !important; white-space: normal !important; color:var(--light) !important; text-transform: capitalize !important; @@ -843,6 +857,7 @@ color: var(--dark); min-width: 5px !important; width: 10px !important; margin: 8px !important; + --background:transparent; } .buttonClassWhite { @@ -916,12 +931,81 @@ border:0px --min-height: 1.6cm !important; width: 315px; } -// .slides-gray-bullets .swiper-wrapper { -// margin-top: 14px !important; -// } -// .swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction { -// /* bottom: 10px; */ -// left: 0; -// width: 100%; -// + +.active-Segment { + border-radius: 25px !important; + // font-size: 0.3cm !important; + background: var(--newgreen) !important; + color: var(--light) !important; + font-weight: bold !important; + text-transform: none; + border: none; +} + +.normal-Segment { + border-radius: 10px !important; + // font-size: 0.3cm !important; + background: rgba(255, 255, 255, 0) !important; + color: var(--dark) !important; + font-weight: bold !important; + text-transform: none; + border: none; +} + +.active-Segment, +.normal-Segment { + flex: 1 100%; +} + +.ion-segment-all { + height: 50px !important; + background: white !important; + border-radius: 25px !important; + border: 1px solid #cccccc; + margin-top: 10px; +} + +.checkOutOkBtn{ + margin-left: 55px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; + border-radius: 5px !important; + height: 32px !important; + min-height: 30px !important; + background: var(--lightblue) !important; + -webkit-box-flex: 1; + flex: 1 1 auto; + border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + color: white !important; + border: none !important; + +} + +.checkOutCancelBtn{ + margin-left: 55px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; + border-radius: 5px !important; + height: 32px !important; + min-height: 30px !important; + background: var(--darkblue) !important; + -webkit-box-flex: 1; + flex: 1 1 auto; + border-top: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + border-right: 0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2); + color: white !important; + border: none !important; +} + +.more-modal { + background: rgba(0, 0, 0, 0.5) !important; + padding: 30% 10% !important; + --height: 12cm !important; + --border-radius: 0.4cm; + +} + diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index ff4399e6..fc5b409a 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -2,7 +2,7 @@ --background: #f0efef; } .footerSearchBtn{ - padding: 0px !important; + padding: 50px !important; background: #f0efef !important; } @@ -15,6 +15,7 @@ background: #f0efef; margin-top: 20px; width: 95%; + margin-left:9px } .gridItemReq{ @@ -29,8 +30,9 @@ text-align: left; } .itemReqDiv{ - padding-bottom: 10px; - padding-top: 10px; + padding:10px; + // padding-bottom: 10px; + // padding-top: 10px; } .arrowIcon{ width: 18px !important; @@ -47,13 +49,13 @@ margin-left: 10px !important; border-top-right-radius: 7px } .cardContent{ - width:100%; - margin-top: 33px + // width:100%; + // margin-top: 33px } .colItemReq{ - color: var(--dark); - font-weight: bold; - font-size: 16px; + color: var(--darkblue); + font-weight: bold !important;; + font-size: 16px ; text-align: left; display: contents; font-family: var(--ion-font-family,inherit); @@ -169,6 +171,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated .timeline { position: relative; margin: 15px 0 0 0; + // border-bottom: solid 1px var(--cusgray); } .timeline:before { @@ -178,9 +181,9 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated top: 0; bottom: 0; width: 4px; - background: #e4e4e4; + // background: #e4e4e4; z-index: 1; - left: 66px; + left: 35px; /* margin-left: -10px; */ /* z-index: 1; */ } @@ -188,10 +191,10 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated .timeline .timeline-thumb { border-radius: 500px; - width: 40px !important; + width: 70px !important; z-index: 2; position: absolute; - left: 48px; + left: 0px; // :root[dir="ltr"]{ // left: 37px; // } @@ -203,7 +206,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated } .timeline .timeline-thumb.timeline-icon { - height: 40px; + height: 70px; // text-align: center; // color: white; // border: 5px solid #CBD0D3; @@ -213,7 +216,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated .timeline .timeline-item { - width: 50px; + width: 40px; } @@ -253,49 +256,101 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated .bg-blue-dot { border: var(--blue) solid 1px; - background: var(--gray); + + background-repeat: no-repeat; + background-image: url("/assets/imgs/profile.png"); + background-size: 100% 100%; } .bg-orange-dot { border: var(--orange) solid 1px; - background: var(--gray); + // background: var(--gray); + background-repeat: no-repeat; + background-image: url("/assets/imgs/profile.png"); + background-size: 100% 100%; } .bg-red-dot { border: var(--red) solid 1px; - background: var(--gray); + // background: var(--gray); + background-repeat: no-repeat; + background-image: url("/assets/imgs/profile.png"); + background-size: 100% 100%; } .bg-green-dot { border: var(--green) solid 1px; - background: var(--gray); + // background: var(--gray); + background-repeat: no-repeat; + background-image: url("/assets/imgs/profile.png"); + background-size: 100% 100%; } .bg-blue-txt { - color: var(--blue) !important; + color: var(--light) !important; font-weight:bold; + background: var( --blue); + border-radius: 9px; + text-align: center; + margin-top: 10px; + position: relative; + width: auto; + height: 100%; + display: inline-block !important; + padding: 0px 7px 0px 7px; + } .bg-orange-txt { font-weight:bold; - color: var(--orange) !important; + color: var(--light) !important; + background: var( --orange); + border-radius: 9px; + text-align: center; + width: 30%; + margin-top: 10px; + position: relative; + width: auto; + height: 100%; + display: inline-block !important; + padding: 0px 7px 0px 7px; + } .bg-red-txt { font-weight:bold; + color: var(--light) !important; + background: var( --red); + border-radius: 9px; + text-align: center; + width: 30%; + margin-top: 10px; + position: relative; + width: auto; + height: 100%; + display: inline-block !important; + padding: 0px 7px 0px 7px; - color: var(--red) !important; - } .bg-green-txt { font-weight:bold; + color: var(--light) !important; + background: var( --green); + border-radius: 9px; + text-align: center; + width: 30%; + margin-top: 10px; + position: relative; + width: auto; + height: 100%; + display: inline-block !important; + padding: 0px 7px 0px 7px; - color: var(--green) !important; } @@ -310,7 +365,7 @@ ion-item{ background-color: transparent; .item-date{ width: 55px; - font-size: 14px; + font-size: 14px !important; font-weight: bold; text-align: center; @@ -324,7 +379,7 @@ ion-item{ ion-label , [item-end]{ white-space: normal; - font-size: 14px; + font-size: 14px !important; // :root[dir="ltr"]{ // margin-left: 10px; // } @@ -366,3 +421,133 @@ left: 66px; } +.itemHISBtn{ + padding: 5px; + color: var(--light); + background: var(--darkgray); + border-radius: 3px; + width: 85%; + height: 40px; +} + + +.rowBtn{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + background: white; +} + + + +.rowBorder{ + border-bottom: solid 0.03cm var(--grayBG); + +} +.colBorder{ + border-right: solid 0.03cm var(--grayBG); + +} + +.dateActionHistory{ + text-align: end; + // margin-top: -25px; +} + + +.actionBtn{ + --border-radius: 50% !important; + height: 55px; + width: 55px; + --background: var(--newgreen); // will be dynamic + background: transparent; + margin:10px; +} + +.itemAttch{ + border-radius: 11px; + margin: 8px; + --min-height: 60px; + --max-height: 60px; +} + +.less { + max-height: 54px; + } + + .noDataDiv{ + background: #ffffff; + height: 11%; + text-align: center; + padding-top: 1px; + border-radius: 10px; + margin: 10px; + } + + .containerNote { + font-size: 14px; + line-height: 14px; + height: 15px; + overflow: hidden; + text-align: justify; + } + + .show { + overflow: visible; + height: auto; + } + + .showMore{ + padding: 0px; + background: transparent; + color: blue; + text-decoration: underline; + font-size: 14px; + } + .succssfullMSG{ + height: 100%; + width: 100%; + background: var(--newgreen); + color: white; + font-weight: bold; + font-size: 20px; + text-align: center; + vertical-align: middle; + padding-top: 30px; + } + + .succssfullIcon{ + width: 60%; + text-align: center; + height: 60%; + } + .subjectNotification{ + text-align: center; + padding-top: 10px; + font-weight: bold; + } + .tabBar{ + height:70px + } + .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; + } + + ion-card{ + color:black !important; + } + + .line{ + padding-bottom:87px; + } \ No newline at end of file