From a8457cc11e98c1435f920af4788d9d319da94805 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Tue, 3 Dec 2019 10:38:47 +0300 Subject: [PATCH] PR fix design --- .../confirm-login/confirm-login.component.ts | 22 ++-- .../apply-action-modal.component.html | 21 ++++ .../apply-action-modal.component.scss | 1 + .../apply-action-modal.component.spec.ts | 27 +++++ .../apply-action-modal.component.ts | 81 ++++++++++++++ .../app/notification/notification.module.ts | 10 +- .../view-note-modal.component.html | 7 +- .../view-note-modal.component.scss | 5 + .../worklist-main-pr.component.html | 78 +++++++++++--- .../worklist-main-pr.component.scss | 91 +++++++++++++--- .../worklist-main-pr.component.ts | 100 +++++++++++++++++- Mohem/src/assets/imgs/arrowRight.png | Bin 0 -> 516 bytes Mohem/src/assets/localization/i18n.json | 17 +++ Mohem/src/theme/styles.scss | 48 ++++++++- Mohem/src/theme/variables.scss | 5 + 15 files changed, 462 insertions(+), 51 deletions(-) create mode 100644 Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.html create mode 100644 Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.scss create mode 100644 Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.spec.ts create mode 100644 Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts create mode 100644 Mohem/src/assets/imgs/arrowRight.png diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index 9e697fd4..673eb4a5 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -568,31 +568,31 @@ export class ConfirmLoginComponent implements OnInit { - title: 'Biometric Authetnciation', // (Android Only) | optional | Default: " Biometric Sign On" + // title: 'Biometric Authetnciation', // (Android Only) | optional | Default: " Biometric Sign On" - // subtitle: 'Coolest Plugin ever' ,// (Android Only) | optional | Default: null + // // subtitle: 'Coolest Plugin ever' ,// (Android Only) | optional | Default: null - // description: this.ts.trPK("general", "auth-please"),// optional | Default: null + // // description: this.ts.trPK("general", "auth-please"),// optional | Default: null - fallbackButtonTitle: this.ts.trPK("general", "use-pin"), // optional | When disableBackup is false defaults to "Use Pin". + // fallbackButtonTitle: this.ts.trPK("general", "use-pin"), // optional | When disableBackup is false defaults to "Use Pin". - // When disableBackup is true defaults to "Cancel" + // // When disableBackup is true defaults to "Cancel" - disableBackup:true, // optional | default: false + // disableBackup:true, // optional | default: false - // clientId: "Fingerprint Authetnciation", + clientId: "Fingerprint Authetnciation", - // clientSecret: "Ate343_9347lajF", // Only necessary for Android + clientSecret: "Ate343_9347lajF", // Only necessary for Android - // disableBackup: true, // Only for Android(optional) + disableBackup: true, // Only for Android(optional) - // localizedFallbackTitle: this.ts.trPK("general", "use-pin"), // Only for iOS + localizedFallbackTitle: this.ts.trPK("general", "use-pin"), // Only for iOS - // localizedReason: this.ts.trPK("general", "auth-please") // Only for iOS + localizedReason: this.ts.trPK("general", "auth-please") // Only for iOS }) diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.html b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.html new file mode 100644 index 00000000..2011e9ce --- /dev/null +++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.html @@ -0,0 +1,21 @@ + +
+
+
+
+ + + + + {{ts.trPK('general','confirm')}} + + + + + {{ts.trPK('general','cancel')}} + + + + + +
\ No newline at end of file diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.scss b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.scss new file mode 100644 index 00000000..0519ecba --- /dev/null +++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.scss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.spec.ts b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.spec.ts new file mode 100644 index 00000000..e0ea8d8a --- /dev/null +++ b/Mohem/src/app/notification/apply-action-modal/apply-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 { ApplyActionModalComponent } from './apply-action-modal.component'; + +describe('ApplyActionModalComponent', () => { + let component: ApplyActionModalComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ApplyActionModalComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ApplyActionModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..666e31b9 --- /dev/null +++ b/Mohem/src/app/notification/apply-action-modal/apply-action-modal.component.ts @@ -0,0 +1,81 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { WorklistMainService } from '../service/work-list.main.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { TextAreaInput } from 'src/app/uI-elements/text-area.input'; + +@Component({ + selector: 'app-apply-action-modal', + templateUrl: './apply-action-modal.component.html', + styleUrls: ['./apply-action-modal.component.scss'], +}) +export class ApplyActionModalComponent implements OnInit { + private textArea: TextAreaInput; + getpassResAttr: any; + getPassNotificationDetails: any; + getPassNotification: any; + + 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'); + + + } + + ngOnInit() { + document.getElementById("notificationDynamicFields").innerHTML=""; + console.log(this.getPassNotificationDetails); + //this.applyAction(this.getPassNotificationDetails); + this.notificationDynamicFields(this.getpassResAttr); + } + + applyAction() { + this.worklistMainService + .actionButton(this.getPassNotification) + .subscribe((result: any) => { + this.handleApplayActionResult(result); + }); + } + + handleApplayActionResult(result) { + if (this.cs.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.getNotificationCountAfterSubmit(); + ///////////// this.nextNotfification(); + } + } // valid it + } + + notificationDynamicFields(notificationAttr){ + const containerId = 'notificationDynamicFields'; + for(let i=0;i - + - +

{{getSenderNote}}

- + diff --git a/Mohem/src/app/notification/view-note-modal/view-note-modal.component.scss b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.scss index 0d612628..1dd9b769 100644 --- a/Mohem/src/app/notification/view-note-modal/view-note-modal.component.scss +++ b/Mohem/src/app/notification/view-note-modal/view-note-modal.component.scss @@ -11,4 +11,9 @@ border: solid 1px red; .closeIcon{ --background: transparent !important; background: transparent; + --box-shadow: transparent; + width: 50%; + float: right; + --background-focused: none; + --background-hover: none; } \ No newline at end of file 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 79f71b25..0ff720a8 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 @@ -9,7 +9,7 @@ - + {{ts.trPK('worklistMain','info')}} @@ -174,11 +174,11 @@
-
+
- + @@ -289,23 +289,30 @@
+
-
-
+ + +
- {{actionHistory.ACTION}} - {{actionHistory.NAME}} + {{actionHistory.ACTION}} + {{actionHistory.NAME}} {{actionHistory.NOTIFICATION_DATE| dateString }} @@ -339,7 +346,7 @@
-
+
@@ -370,17 +377,56 @@ - - -
+ + + + +
+
+
+
+ + + + + + + + + + + {{'actionHis, action' | translate}} + + + {{notificationButtons.BUTTON_LABEL}} + + + + + + + + + {{'worklistMain, skip' | translate}} + + + + + + + + + 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 9c2e5e6f..1d9aa14f 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,7 +1,18 @@ .colorBG{ --background: #f0efef; } + .footerSearchBtn{ + padding: 0px !important; + background: #f0efef !important; +} +.actionList{ + // position: fixed; + // bottom: 0px; + width: 215px; + border-top-left-radius: 7px; + border-top-right-radius: 7px +} .cardContent{ width:100%; margin-top: 33px @@ -36,7 +47,7 @@ font-weight:bold; // --background-hover: rgba(var(--ion-color-contrast-rgb),0.04); // --background-activated: var(--danger); // --color: rgba(--primary); - --color-checked: var(--secondary); + --color-checked: var(--dark); --indicator-color-checked: var(--secondary); --background: #f0efef; --background-activated: #f0efef; @@ -107,7 +118,7 @@ font-weight:bold; width: 4px; background: #e4e4e4; z-index: 1; - left: 62px; + left: 66px; /* margin-left: -10px; */ /* z-index: 1; */ } @@ -115,27 +126,26 @@ font-weight:bold; .timeline .timeline-thumb { border-radius: 500px; - width: 50px; + width: 40px !important; z-index: 2; position: absolute; - left: 38px; + left: 48px; // :root[dir="ltr"]{ // left: 37px; // } // :root[dir="rtl"]{ // right: 37px; // } - width: 50px; float: right; top: 9px; } .timeline .timeline-thumb.timeline-icon { - height: 50px; + height: 40px; // text-align: center; // color: white; // border: 5px solid #CBD0D3; - transform: scale(0.3); + // transform: scale(0.2); } @@ -164,14 +174,71 @@ font-weight:bold; } .bg-color-dot { + + background: var(--gray); + + /* background: linear-gradient(45deg, var(--primary) 0%, #19a163 36%, var(--secondary) 59%, var(--customnavy) 100%); */ + // border: var(--secondary) solid 1px; // background-color: #ff3b30 !important; - background: var(--primary); - background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); - background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); - background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + // background: var(--primary); + //background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + //background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + //background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); } + + .bg-blue-dot { + + border: var(--blue) solid 1px; + background: var(--gray); + + } + .bg-orange-dot { + + border: var(--orange) solid 1px; + background: var(--gray); + } + .bg-red-dot { + + border: var(--red) solid 1px; + background: var(--gray); + + } + .bg-green-dot { + + border: var(--green) solid 1px; + background: var(--gray); + } + + + .bg-blue-txt { + + color: var(--blue) !important; + font-weight:bold; + + } + .bg-orange-txt { + font-weight:bold; + + color: var(--orange) !important; + } + .bg-red-txt { + font-weight:bold; + + color: var(--red) !important; + + + } + .bg-green-txt { + font-weight:bold; + + color: var(--green) !important; + } + + + + .notification-list{ ion-item{ @@ -215,7 +282,7 @@ border-bottom: #dedede 1px solid; } .left { .timeline:before{ -left: 62px; +left: 66px; } .notification-list ion-item{ padding-left: 3px; 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 0cbe192c..c31ae21e 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 @@ -27,6 +27,7 @@ import { WorklistService } from '../service/worklist.service'; import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.component'; 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'; @Component({ selector: 'app-worklist-main-pr', templateUrl: './worklist-main-pr.component.html', @@ -78,6 +79,10 @@ export class WorklistMainPRComponent implements OnInit { valueH: any; taxH: any; taxvalueH: any; + NotificationGetRespondAttributesList: any; + confirmMsg: string; + delMsg: string; + closeMsg: string; constructor( @@ -370,8 +375,8 @@ export class WorklistMainPRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL.push(obj); } if ( - ButtonAction == "APPROVED" || - ButtonAction == "REJECTED" || + ButtonAction == "APPROVE" || + ButtonAction == "REJECT" || ButtonAction == "DEL" || ButtonAction == "CLOSE" ) { @@ -379,7 +384,51 @@ export class WorklistMainPRComponent implements OnInit { this.WorkListActionObj.P_ACTION_MODE = ButtonAction; this.WorkListActionObj.P_COMMENTS = ""; this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; - this.applyAction(this.WorkListActionObj); + //sheardData + + // this.common.sharedService.setSharedData( + // this.WorkListActionObj, + // WorklistMainPRComponent.PASS_NOTIFICATION_INFO + // ); + if (ButtonAction == "APPROVE"){ + this.confirmMsg =this.ts.trPK('worklistMain', 'approveMsg') + } + else if (ButtonAction == "REJECT"){ + this.confirmMsg =this.ts.trPK('worklistMain', 'rejectMsg') + + } + else if (ButtonAction == "DEL"){ + this.confirmMsg =this.ts.trPK('worklistMain', 'delMsg') + + } + else if (ButtonAction == "CLOSE"){ + this.confirmMsg =this.ts.trPK('worklistMain', 'closeMsg') + + } + + this.common.confirmAlertDialog( + () => { + this.applyAction(this.WorkListActionObj); + }, this.ts.trPK('general', 'ok'), + () => {}, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg); + + + + + + // alert.onDidDismiss((data) => { + // if (data == true) { + // this.continueDelete(attach); + // } + // }); + + //this.openApplyModal(this.WorkListActionObj); + + + + ////////////this.applyAction(this.WorkListActionObj); } if (ButtonAction == "RFC") { @@ -541,6 +590,13 @@ export class WorklistMainPRComponent implements OnInit { this.hideForwordEmployee = result.NotificationRespondRolesList[0]; } this.notificationDynamicFields(result.NotificationGetRespondAttributesList); + this.NotificationGetRespondAttributesList=result.NotificationGetRespondAttributesList; + + this.common.sharedService.setSharedData( + this.NotificationGetRespondAttributesList, + WorklistMainPRComponent.PASS_RES_ATTR + ); + this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList; if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema); } // valid it @@ -713,6 +769,42 @@ export class WorklistMainPRComponent implements OnInit { return await modal.present(); } - + + + + async openApplyModal(WorkListActionObj) { + // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); + // modalPage.present(); + // console.log("note"+note); + this.common.sharedService.setSharedData( this.getPassNotificationDetails,WorklistMainPRComponent.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! + }); + + // data => { + // console.log('MODAL DATA', data); + // }); + // const { data } = await this.modalCtrl.onWillDismiss(); + // console.log(data); + return await modal.present(); + + } + } + + + diff --git a/Mohem/src/assets/imgs/arrowRight.png b/Mohem/src/assets/imgs/arrowRight.png new file mode 100644 index 0000000000000000000000000000000000000000..812669798320de53ec941a58fc78ca9456e40ad6 GIT binary patch literal 516 zcmV+f0{i`mP)Fv=ft_nz7~Yo*&J^Gm*Gk#< zN;IA$BKHhnrGTO{iyl}bRx7|4D}w=hlI2f>jMyy1Qfu8pHd=!%5zD%!kPR*pUnybi zh}<9>5ZwhK%wHbiceG$RAT!N;S0=_CPiCBoOVq7@3V zY^X%q53C`TYe*C_BCk!i+FI5bk(JcOS~SflzczxukW|};Ya3cdM5Gd(NYeArBTT}>wZXzW%S_INfaL2uF8OLqS zREr!T`R0U(-EvMdG5rNlsde6$eDD}OB?vETW|_$`0Q>^ojMP