diff --git a/Mohem/src/app/hmg-common/hmg-common.module.ts b/Mohem/src/app/hmg-common/hmg-common.module.ts index 1dabd064..173b2452 100644 --- a/Mohem/src/app/hmg-common/hmg-common.module.ts +++ b/Mohem/src/app/hmg-common/hmg-common.module.ts @@ -144,6 +144,7 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component'; DatePipeTransform, DateTimePipe, SafeHtmlPipe, + // TurncatePipe, BackButtonComponent, IfDatePipe, DynamicTableComponent, @@ -202,6 +203,7 @@ import { CardFilterComponent} from './ui/card-filter/card-filter.component'; 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 d56e5734..a2d96030 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -481,8 +481,8 @@ public getMonthNameAr(value: number): string { buttons: [ { text: cancelLabel, - role: 'cancel', - cssClass: 'cancelBtn', + role: "cancel", + cssClass: "checkOutCancelBtn", handler: () => { if (onCancel) { onCancel(); @@ -494,7 +494,7 @@ public getMonthNameAr(value: number): string { 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/home/home.module.ts b/Mohem/src/app/home/home.module.ts index 3df41b48..8aea1549 100644 --- a/Mohem/src/app/home/home.module.ts +++ b/Mohem/src/app/home/home.module.ts @@ -6,6 +6,7 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; import { HomePage } from './home.page'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; +import { WorklistMainService } from '../notification/service/work-list.main.service'; const routes: Routes = [ { @@ -26,7 +27,8 @@ const routes: Routes = [ HomePage ], providers: [ - BarcodeScanner + BarcodeScanner, + WorklistMainService ] }) export class HomePageModule { } diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 0a9c0d18..055ca710 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -33,6 +33,7 @@ import {GetOpenNotificationsResponse} from '../hmg-common/services/dashbored/mod import {GetSubordinatesAttdStatusResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse' import {GetSubordinatesLeavesResponse} from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse' import { AccrualService } from '../accrual-balances/services/accrual.service'; +import { WorklistMainService } from '../notification/service/work-list.main.service'; @Component({ selector: 'app-home', @@ -122,6 +123,7 @@ export class HomePage implements OnInit { public displayTime: any; public menuEntries: any; public percent: any; + public countAllNotification: number =0; constructor( public ts: TranslatorService, @@ -143,7 +145,8 @@ export class HomePage implements OnInit { private file: File, private permissions: DevicePermissionsService, public DS: DashboredService, - public accrualService: AccrualService + public accrualService: AccrualService, + public workListService: WorklistMainService, ) { this.events.subscribe('img-change', displayImg => { this.userImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg); @@ -525,12 +528,20 @@ export class HomePage implements OnInit { this.DS.getOpenNotifications( () => { console.log('Error '); }).subscribe((result: GetOpenNotificationsResponse) => { if (this.common.validResponse(result)) { const key = 'P_OPEN_NTF_NUMBER'; - this.statsButtons[0].statsValue = result[key]; + this.countAllNotification = result[key]; + this.ITGCountAllNotification(); this.common.sharedService.setSharedData(result, 'worklistNotifications'); } }); } + ITGCountAllNotification(){ + this.workListService.getITGDetails() + .subscribe((result: any) => { + this.statsButtons[0].statsValue = this.countAllNotification + result.TotalCount; + }); + } + getSubordinatesLeaves() { const request: GetSubordinatesLeavesRequest = new GetSubordinatesLeavesRequest(); request.P_DATE_FROM = '/Date(1578603600000+0300)/'; // test 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/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index dde5a6a6..c554512c 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -54,7 +54,7 @@ - + {{segment.name}} @@ -65,7 +65,7 @@
{{data.key}} -
+

{{workList.SUBJECT}}

diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index c6d3c58e..bbae1ee5 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -18,6 +18,9 @@ import { DatePipe } from '@angular/common'; styleUrls: ['./home.component.scss'] }) export class HomeComponent implements OnInit { + public static REQUSET_NAME = 'requst_name'; + public static REQUSET_INFO = 'requset_info'; + public static ALL_REQUEST = 'all_request'; public static NOTIFICATION_DATA = 'notification_data'; public static NOTIFICATION_ARR = 'notification_arr'; @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll; @@ -46,10 +49,11 @@ export class HomeComponent implements OnInit { public isSearch = false; public direction = 'ltr'; public ITGCount: number = 0; - public ITGSegment:{name: string, data: any, style: boolean} [] =[]; + public ITGSegment:{name: string, code:any, data: any, style: boolean} [] =[]; public ITGAllItem: any = []; public selectedITGToActive = false; public ITGItem: any =[] + public activeSegment: any; public currentActiveIndex = 0; public previousActiveIndex = 0; @@ -154,11 +158,11 @@ export class HomeComponent implements OnInit { ngOnInit() { // this.direction = TranslatorService.getCurrentDirection(); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); - this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; this.Details(); this.Count(); this.assignDataToFilters(); this.getAllPushNotificationFun(); + this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; } assignDataToFilters() { @@ -177,7 +181,10 @@ export class HomeComponent implements OnInit { } else if (notification.ITEM_TYPE === 'INVMOA') { this.filters[4].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; - } + }else if (notification.ITEM_TYPE === 'ITG') { + this.filters[5].value = notification.OPEN_NTF_NUMBER; + this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER; + } } } @@ -335,13 +342,13 @@ export class HomeComponent implements OnInit { } openNotificationDetail(obj) { - this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA); + this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA); // this.common.openWorklistMainPage(); if (obj.REQUEST_TYPE === 'PR') { this.common.openWorklistMainPRPage(); - } else if (obj.REQUEST_TYPE === 'PO') { + } else if (obj[0].REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); - } else if (obj.REQUEST_TYPE === 'MO') { + } else if (obj[0].REQUEST_TYPE === 'MO') { this.common.openWorklistMainMRPage(); } else { this.common.openWorklistMainPage(); @@ -399,7 +406,7 @@ export class HomeComponent implements OnInit { this.workListService.getITGCount() .subscribe((result: any) => { for(let i= 0; i< result.RequestType.length; i++){ - this.ITGSegment[i] = {name: result.RequestType[i].RequestTypeName, data:result.RequestType[i].RequestDetails, style: false}; + this.ITGSegment[i] = {name: result.RequestType[i].RequestTypeName, code: result.RequestType[i].RequestTypeCode, data:result.RequestType[i].RequestDetails, style: false}; } }); } @@ -442,6 +449,7 @@ export class HomeComponent implements OnInit { Details() { this.workListService.getITGDetails() .subscribe((result: any) => { + this.totalRequestCount = this.totalRequestCount + result.TotalCount; this.filters[5].value = result.TotalCount; }); } @@ -463,8 +471,9 @@ export class HomeComponent implements OnInit { setActive(selectedSegment){ this.ITGItem =[]; let count=0; + this.activeSegment = selectedSegment; for(let i =0; i< this.ITGSegment.length; i++){ - if(this.ITGSegment[i].name === selectedSegment){ + if(this.ITGSegment[i].code === selectedSegment){ this.ITGSegment[i].style = true; this.ITGItem[count] = this.ITGSegment[i].data; count++; @@ -476,7 +485,9 @@ export class HomeComponent implements OnInit { openITG(segmentInfo){ - console.log(segmentInfo); + this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO); + this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME); + this.common.sharedService.setSharedData(this.ITGItem,HomeComponent.ALL_REQUEST); this.common.openWorklistITGPage(); } } 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/models/itgFormDetailsRequest.ts b/Mohem/src/app/notification/models/itgFormDetailsRequest.ts new file mode 100644 index 00000000..41054f12 --- /dev/null +++ b/Mohem/src/app/notification/models/itgFormDetailsRequest.ts @@ -0,0 +1,12 @@ +import { Request } from 'src/app/hmg-common/services/models/request'; + +export class itgRequest extends Request { + public RequestType: string; + public ItemID: number; + public TaskID: number; + public EmployeeNumber: string; + public Comments: string; + public IsSubTask: boolean; + public NewUserEMPId: string; + public AdditionalFields?: [{}]; +} 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 9f58f632..caa8cc34 100644 --- a/Mohem/src/app/notification/notification.module.ts +++ b/Mohem/src/app/notification/notification.module.ts @@ -29,7 +29,8 @@ import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/work import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component'; // import { WorklistMainComponent } from './worklist-main/worklist-main.component'; - +import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component' +import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component'; const routes: Routes = [ @@ -105,6 +106,14 @@ const routes: Routes = [ { path: 'worklist-main-ITG', component: WorkListMainItgComponent + }, + { + path: 'more-action-modal', + component: MoreActionModalComponent + }, + { + path: 'worklist-replacement-itg', + component: WorkListReplacementItgComponent } ] } @@ -126,6 +135,7 @@ const routes: Routes = [ WorkListReplacementRollComponent, WorkListRfcComponent, ViewNoteModalComponent, + MoreActionModalComponent, ApplyActionModalComponent, ViewReplacementModalComponent, WorkListActionHistoryComponent, @@ -137,7 +147,8 @@ const routes: Routes = [ QutationAnalysisComponent, WorklistMainMRComponent, WorklistAdvancedSearchComponent, - WorkListMainItgComponent + WorkListMainItgComponent, + WorkListReplacementItgComponent // WorklistMainComponent ], entryComponents: [ 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/service/work-list.main.service.ts b/Mohem/src/app/notification/service/work-list.main.service.ts index 53f88780..720f5c1e 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -19,6 +19,7 @@ import { MOItemHistoryRes } from "../models/MOItemHistoryRes"; import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes'; import { Request } from 'src/app/hmg-common/services/models/request'; import { LoginModel } from '../../authentication/models/LoginModel'; +import { itgRequest } from '../models/itgFormDetailsRequest'; @Injectable() export class WorklistMainService { @@ -47,6 +48,8 @@ export class WorklistMainService { 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; public static getITGFormTaskDetails = 'Services/COCWS.svc/REST/ITGFormsPendingTasks'; + public static getITGFormDetails = + 'Services/COCWS.svc/REST/ITGGetFormDetials'; @@ -249,6 +252,19 @@ export class WorklistMainService { ); } + public getITGFormDetails(request:itgRequest, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + console.log(request); + return this.api.post( + WorklistMainService.getITGFormDetails, + request, + onError, + errorLabel + ); + } + + public getITGDetails( onError?: any, errorLabel?: string): Observable { const request = new Request; @@ -262,4 +278,19 @@ export class WorklistMainService { ); } + + public getITGActionRequest(itgrequest:itgRequest,actionURL:string, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(itgrequest); + itgrequest.EmployeeNumber = itgrequest.P_USER_NAME; + console.log(itgrequest); + console.log(actionURL); + return this.api.post( + actionURL, + itgrequest, + onError, + errorLabel + ); + } + + } 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-main-itg/work-list-main-itg.component.html b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html index 87b6b0ef..fa90523a 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html @@ -1,3 +1,151 @@ -

- work-list-main-itg works! -

+ + + {{ts.trPK('worklistMain','title')}} + + + + + + + + + + + {{segmentVal.name}} + + + + + + + + + +
+ +
+
+ + + +
+ + +
+
+
+
+
+ + + + + + + + + + + + +
+ +
+
+ + +
+
+

{{approvalInfo.Action}}

+
+
+

{{approvalInfo.Name}}

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

Comment

+
+ + + + {{object.Label}} + + + {{value}} + + + + {{value}} + + +
+
+
+
+
+
+ + + + + + + + + + + + + {{action.name}} + + + + + + Skip + + + + + + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss index e69de29b..8abe3c97 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss @@ -0,0 +1,13 @@ + + +.timeline-thumb { + height: 30px !important; + left: 54px !important; +} + +.timeline-icon{ + width: 30px !important; +} +.timeline:before{ + position: fixed !important; +} \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts index 8b79ccae..2d1f4a92 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts @@ -1,4 +1,13 @@ import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { HomeComponent } from '../home/home.component'; +import { WorklistMainService } from '../service/work-list.main.service'; +import { itgRequest } from '../models/itgFormDetailsRequest'; +import { ModalController } from '@ionic/angular'; +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListReplacementItgComponent } from '../work-list-replacement-itg/work-list-replacement-itg.component'; + @Component({ selector: 'app-work-list-main-itg', @@ -7,8 +16,327 @@ import { Component, OnInit } from '@angular/core'; }) export class WorkListMainItgComponent implements OnInit { - constructor() { } + public static APPROVAL = "Services/COCWS.svc/REST/ITGApproveRequest" + public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest' + public static DELEGATE = 'Services/COCWS.svc/REST/ITGDelegateRequest'; + public static REQUEST_INFORMATION = 'Services/COCWS.svc/REST/ITGRequestInformation'; + public static ANSWER = 'Services/COCWS.svc/REST/ITGAnswer'; + public static GRANT = 'Services/COCWS.svc/REST/ITGGrantAccess'; + + public request_info: any; + public request_name: any; + public all_request: any; + public request = new itgRequest(); + public activeSegment: any = "info"; + public request_details: any; + public segmentsArray: { name: string, number: number }[] = []; + public segmentData: { name: string, data: any }[] = []; + public header: any = []; + public rows: any = []; + public workList: any; + public commentText: string; + public replcamentID: string; + public actionSelected: any; + public options: any; + public index: number = 0; + public grantDATA: any; + public grantInfo: any; + public grantFieldsConditionalValue: any = []; + public filteredGrantFieldsConditionalValue: any = []; + public grantFieldsLabel: any = []; + public grantFieldsValue: any = []; + public grantRequest: any = []; + public ExchangeServerSelected: any; + public ExchangeServerDBSelected: any; + public actionBTN: { name: string, image: string, isAvailable: boolean }[] = []; + constructor( + public common: CommonService, + public ts: TranslatorService, + public workListService: WorklistMainService, + public modalCtrl: ModalController) { } + + ngOnInit() { + this.request_info = this.common.sharedService.getSharedData(HomeComponent.REQUSET_INFO); + this.request_name = this.common.sharedService.getSharedData(HomeComponent.REQUSET_NAME); + this.all_request = this.common.sharedService.getSharedData(HomeComponent.ALL_REQUEST); + this.all_request = this.all_request[0]; + this.changeITGForm(this.request_info, this.request_name); + } + + + + changeITGForm(data, requestName) { + this.request_info = data; + this.request_name = requestName; + this.request.RequestType = this.request_name; + this.request.ItemID = this.request_info.ItemID; + this.request.TaskID = this.request_info.ID; + this.request.Comments = this.request_info.Comments; + this.request.NewUserEMPId = this.request_info.NewUserEMPId; + this.workListService.getITGFormDetails(this.request).subscribe((result: any) => { + this.request_details = result.ITGRequest; + this.grantInfo = result.ITGRequest.GrantFields; + let count = 0; + for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) { + this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i }; + this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields} + } + this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length } + this.workList = this.request_details.WFHistory; + this.options = this.request_details.AllowedActions; + this.activeSegment = this.segmentsArray[0].name; + for (let i = 0; i < this.options.length; i++) { + this.imageURL(this.options[i].Action); + this.actionBTN[i] = { name: this.options[i].Action, image: this.imageURL(this.options[i].Action), isAvailable: this.options[i].IsAvailable } + } + + if (this.grantInfo) { + let count = 0; + this.grantFieldsConditionalValue = []; + for (let i = 0; i < this.grantInfo.length; i++) { + if (this.grantInfo[i].Value) { + for (let j = 0; j < this.grantInfo[i].Value.length; j++) { + this.grantFieldsValue[j] = this.grantInfo[i].Value[j]; + } + } + if (this.grantInfo[i].ConditionalValue) { + for (let j = 0; j < this.grantInfo[i].ConditionalValue.length; j++) { + this.grantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j]; + count++; + } + } + } + } + //result.ITGRequest.FieldGoups.Fields + }); + } + + imageURL(actionName) { + if (actionName == "Approve") { + return "../assets/imgs/action-approve.png" + } + if (actionName == "Reject") { + return "../assets/imgs/action-reject.png" + } + if (actionName == "RequestInformation") { + return "../assets/imgs/action-info.png" + } + if (actionName == "Grant") { + return "../assets/imgs/action-info.png" + } + if (actionName == "Delegate") { + return "../assets/imgs/action-info.png" + } + } + + public segmentChangedClick(event: any) { + this.activeSegment = event.detail.value; + } + + skip() { + for (let i = 0; i < this.all_request.length; i++) { + if (this.index < this.all_request.length) { + if (this.request_info.ID == this.all_request[i].ID) { + this.index = i + 1; + this.clearDataArray(); + this.changeITGForm(this.all_request[i + 1], this.request_name); + break; + } else { + alert("not found") + break; + } + } else { + alert(" not found at all") + break; + } + } + } + + clearDataArray() { + this.commentText = ''; + this.actionSelected = ''; + this.segmentsArray = []; + this.segmentData = []; + this.workList = []; + this.actionBTN = []; + } + + + + actionService(action, comments?, grantRequests?) { + let url: string; + let request = new itgRequest(); + request.RequestType = this.request_name; + request.ItemID = this.request_info.ItemID; + request.TaskID = this.request_info.ID; + request.Comments = this.commentText; + request.Comments = this.request_info.Comments; + request.EmployeeNumber = this.request_info.EmployeeNumber; + request.NewUserEMPId = this.replcamentID; + this.common.confirmAlertDialogAction( + () => { + if (action == 1) { //approved + url = WorkListMainItgComponent.APPROVAL; + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + // this.common.openNotificationPage(); + this.skip(); + }); + } else if (action == 2) {//reject + url = WorkListMainItgComponent.REJECT; + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + // this.common.openNotificationPage(); + this.skip(); + }); + } else if (action == 3) {//request more info + request.NewUserEMPId = this.replcamentID; + url = WorkListMainItgComponent.REQUEST_INFORMATION; + if (!comments) { + this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); + } else { + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + // this.common.openNotificationPage(); + this.skip(); + }); + } + } else if (action == 4) {//delegate + request.NewUserEMPId = this.replcamentID; + url = WorkListMainItgComponent.DELEGATE; + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + // this.common.openNotificationPage(); + this.skip(); + }); + } else if (action == 5) { //answer + url = WorkListMainItgComponent.ANSWER; + if (!comments) { + this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); + } else { + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + // this.common.openNotificationPage(); + this.skip(); + }); + } + } else if (action == 6) { //grant + url = WorkListMainItgComponent.GRANT; + if (!comments) { + this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); + } + else { + if (this.grantRequest) { + request.AdditionalFields = this.grantRequest; + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + // this.common.openNotificationPage(); + this.skip(); + }); + } else { + this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); + } + } + + } + }, this.ts.trPK('general', 'ok'), + () => { this.actionSelected = '' }, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg(action)); + + + } + + confirmMsg(action) { + if (action === 1) { + return this.ts.trPK('worklist', 'approveMsg'); + } + if (action === 2) { + return this.ts.trPK('worklist', 'rejectMsg'); + } + if (action === 3) { + return this.ts.trPK('worklist', 'requestInformationMsg'); + } + if (action === 4) { + return this.ts.trPK('worklist', 'delegateMsg'); + } + if (action === 5) { + return this.ts.trPK('worklist', 'answerMsg'); + } + if (action === 6) { + return this.ts.trPK('worklist', 'grantMsg'); + } + + } + + selectAtion(actionSelected) { + this.actionSelected = actionSelected; + if (this.actionSelected == "Answer") { + this.actionService(5, this.commentText) + } + if (this.actionSelected == "Approve") { + this.actionService(1, this.commentText); + } + if (this.actionSelected == "Delegate") { + // this.actionService(4, this.commentText) + // this.common.openWorklistRollReplacement(); + this.presentModal(4); + } + if (this.actionSelected === 'Doable') { + } + if (this.actionSelected === 'Grant') { + this.actionService(6, this.commentText, this.grantRequest); + } + if (this.actionSelected === 'NotDoable') { + } + if (this.actionSelected === 'Question') { + } + if (this.actionSelected === 'Reject') { + this.actionService(2, this.commentText); + } + if (this.actionSelected === 'RequestInformation') { + this.presentModal(3); + } + + } + + + + async presentModal(actionNumber) { + const modal = await this.modalCtrl.create({ + component: WorkListReplacementItgComponent, + backdropDismiss: false, + }); + modal.cssClass = 'replaceRoll-modal'; + modal.onDidDismiss() + .then((data) => { + this.replcamentID = data.data.empData.USER_NAME; + + if (actionNumber == 3) { + this.actionService(3, this.commentText); + } else if (actionNumber == 4) { + this.actionService(4); + } + + }); + return await modal.present(); + } + + filterGrantDB(valueSelected, object, selectedOption?) { + let count = 0; + this.filteredGrantFieldsConditionalValue = []; + this.grantRequest.push({ Key: object.FieldName, Value: valueSelected }); + for (let i = 0; i < this.grantInfo.length; i++) { + if (selectedOption === this.grantInfo[i].ConditionalFieldName) { + for (let j = 0; j < this.grantFieldsConditionalValue.length; j++) { + if (valueSelected === this.grantFieldsConditionalValue[j].Key) { + this.filteredGrantFieldsConditionalValue[count] = this.grantInfo[i].ConditionalValue[j].Value[0]; + count++; + } + } + } + } + } - ngOnInit() {} } diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html new file mode 100644 index 00000000..d4538af0 --- /dev/null +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html @@ -0,0 +1,60 @@ + + + + {{ 'vacation-rule, search-employee' | translate}} + + + + + + + + + +
+ + + {{'vacation-rule, search-by' | translate}} + + {{'vacation-rule, search-by-name' | translate}} + {{'vacation-rule, search-by-username' | translate}} + {{'vacation-rule, search-by-email' | translate}} + + + + + + + + + + + + + + + + {{employee.EMPLOYEE_DISPLAY_NAME}}
{{employee.USER_NAME}}
+ {{employee.EMAIL_ADDRESS}}
+ +
+
+
+ +
+ + +
+ {{'general, save' | translate}} + +
+
\ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.spec.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.spec.ts new file mode 100644 index 00000000..7dc3e986 --- /dev/null +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { WorkListReplacementItgComponent } from './work-list-replacement-itg.component'; + +describe('WorkListReplacementItgComponent', () => { + let component: WorkListReplacementItgComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ WorkListReplacementItgComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(WorkListReplacementItgComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts new file mode 100644 index 00000000..da811721 --- /dev/null +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts @@ -0,0 +1,131 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { ReplacementServiceRequest } from 'src/app/vacation-rule/model/replacement-Service.request'; +import { VacationRuleServiceService } from 'src/app/vacation-rule/service/vacation-rule-service.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; + + +@Component({ + selector: 'app-work-list-replacement-itg', + templateUrl: './work-list-replacement-itg.component.html', + styleUrls: ['./work-list-replacement-itg.component.scss'], +}) +export class WorkListReplacementItgComponent implements OnInit { + P_SEARCH_USER_NAME: string = ""; + P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = ""; + P_SEARCH_EMAIL_ADDRESS: string = ""; + P_PAGE_NUM: number = 1; + P_PAGE_LIMIT: number = 50; + ReplacementList: any = []; + IsReachEnd: boolean = false; + selEmp: string = null; + callback: any; + searchKey: any = ""; + searchKeySelect: string = ""; + replacmentRequest: any = ""; + isAbs: boolean = false; + isSave: boolean = false; + + constructor(public vacationRuleService: VacationRuleServiceService, + public ts: TranslatorService, + public cs: CommonService, + public modalController: ModalController) { } + + ngOnInit() {} + + SearchReplacementList() { + this.ReplacementList = []; + this.IsReachEnd = false; + this.P_PAGE_NUM = 1; + if (this.searchKey) { + switch (this.searchKeySelect) { + case '1': { + + this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.searchKey; + this.P_SEARCH_USER_NAME = ""; + this.P_SEARCH_EMAIL_ADDRESS = ""; + + break; + } + case '2': { + this.P_SEARCH_USER_NAME = this.searchKey; + this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.P_SEARCH_EMAIL_ADDRESS = ""; + break; + } + case '3': { + this.P_SEARCH_EMAIL_ADDRESS = this.searchKey; + this.P_SEARCH_USER_NAME = ""; + this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + break; + } + default: { + this.P_SEARCH_USER_NAME = ""; + this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.P_SEARCH_EMAIL_ADDRESS = ""; + break; + } + } + } else { + this.P_SEARCH_USER_NAME = ""; + this.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + this.P_SEARCH_EMAIL_ADDRESS = ""; + } + + const request = new ReplacementServiceRequest(); + request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME; + request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME; + request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS; + request.P_PAGE_NUM = this.P_PAGE_NUM; + request.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; + + this.vacationRuleService.getReplacementList(request). + subscribe((result: any) => { + this.handleReplacment(result); + }); + } + + handleReplacment(result) { + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.ReplacementList)) { + this.ReplacementList = result.ReplacementList; + this.P_PAGE_NUM++; + let lastItemIndex = this.ReplacementList.length - 1; + if (result.ReplacementList[lastItemIndex]) { + let lastitem = result.ReplacementList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + } + } + } + } + + doInfinite(infiniteScroll) { + + } + + closePage() { + this.isSave = true; + let data: any = null; + if (this.isSave == true) { + if (this.selEmp) { + data = this.ReplacementList[this.selEmp]; + } else { + data = null; + } + if (typeof this.callback == 'function') { + this.callback(data); + } + + this.modalController.dismiss({ + 'dismissed': true, + empData: data + }); + } + } +} 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..9765eccf 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 e5e24418..e1bfcfa7 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -466,6 +466,10 @@ "en": "Attachment", "ar": "مرفق" }, + "file": { + "en": "file", + "ar": "ملف" + }, "select-attachment": { "en": "Select Attachment", "ar": "إختر مرفق" @@ -1674,6 +1678,34 @@ "note": { "en":"Note", "ar":"مذكرة" + }, + "approveMsg":{ + "en":"are you sure that you want to approve this request?", + "ar":"هل انت متاكد من قبول هذا الطلب؟" + }, + "rejectMsg":{ + "en":"are you sure that you want to reject this request?", + "ar":"هل انت متاكد من رفض هذا الطلب؟" + }, + "delegateMsg":{ + "en":"are you sure that you want to delegate this request?", + "ar":"هل انت متاكد من تحويل هذا الطلب؟" + }, + "requestInformationMsg":{ + "en":"are you sure that you want to more information for this request?", + "ar":"هل انت متاكد من طلب مزيد من المعلومات لهذا الطلب؟" + }, + "grantMsg":{ + "en":"are you sure that you want to grant access for this request?", + "ar":"هل انت متاكد من انشاء صلاحيه لهذا الطلب؟" + }, + "answerMsg":{ + "en":"press on ok to continue", + "ar":"اضغط على موافق للاستمرار" + }, + "empty-comment":{ + "en":"you shoud add comment", + "ar":"يجب عليك اضافة تعليق" } }, "worklistMain": { @@ -1698,7 +1730,7 @@ "ar": "معلومات الموظف" }, "info":{ - "en": "Information", + "en": "Info", "ar":"تفاصيل" }, "notfDetails":{ @@ -1778,19 +1810,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":{ @@ -2058,7 +2090,6 @@ "en": "Line Details", "ar":"Line Details" } - }, "payslip": { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index bc7eb10a..809593a0 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -769,7 +769,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; } @@ -820,7 +832,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; @@ -831,9 +843,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; @@ -844,6 +858,7 @@ color: var(--dark); min-width: 5px !important; width: 10px !important; margin: 8px !important; + --background:transparent; } .checkOutOkBtn{ @@ -953,6 +968,83 @@ border:0px width: 315px; } + +.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; + +} + // .swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction { // /* bottom: 10px; */ // left: 0; diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index ff4399e6..79cfc57a 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); @@ -62,10 +64,6 @@ margin-left: 10px !important; white-space: normal; overflow: hidden; box-sizing: border-box; - - - - } .colItemReqHeader{ @@ -169,6 +167,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 +177,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 +187,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 +202,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 +212,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 +252,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 +361,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 +375,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 +417,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