From 18dabcb13e8824bbafb73d7174d94249ba0caca9 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Sun, 23 Feb 2020 16:15:34 +0300 Subject: [PATCH 01/23] add vacation rule --- .../services/common/common.service.ts | 4 +- .../ui/fab-button/fab-button.component.html | 10 +- .../ui/fab-button/fab-button.component.scss | 36 +- .../ui/fab-button/fab-button.component.ts | 5 +- Mohem/src/app/home/home.page.html | 4 +- Mohem/src/app/home/home.page.ts | 1 + .../vacation-rule/home/home.component.html | 58 +- .../vacation-rule/home/home.component.scss | 61 ++ .../app/vacation-rule/home/home.component.ts | 8 +- .../notification-type.component.html | 10 +- .../replacement-list.component.html | 73 +- .../replacement-list.component.scss | 156 +++- .../replacement-list.component.ts | 93 +- .../app/vacation-rule/vacation-rule.module.ts | 3 + .../vacation-type.component.html | 171 +++- .../vacation-type.component.scss | 63 +- .../vacation-type/vacation-type.component.ts | 855 +++++++++++++++++- Mohem/src/assets/imgs/delete-circle.png | Bin 0 -> 983 bytes Mohem/src/assets/imgs/green.png | Bin 0 -> 977 bytes Mohem/src/assets/imgs/update-circle.png | Bin 0 -> 886 bytes Mohem/src/assets/localization/i18n.json | 10 + Mohem/src/theme/styles.scss | 15 +- Mohem/src/theme/worklist.scss | 4 +- 23 files changed, 1548 insertions(+), 92 deletions(-) create mode 100644 Mohem/src/assets/imgs/delete-circle.png create mode 100644 Mohem/src/assets/imgs/green.png create mode 100644 Mohem/src/assets/imgs/update-circle.png 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 88fdba44..dc65e9a3 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -482,7 +482,7 @@ public getMonthNameAr(value: number): string { { text: cancelLabel, role: "cancel", - cssClass: "cancelBtn", + 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/ui/fab-button/fab-button.component.html b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html index 8e405be4..18d70a13 100644 --- a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.html @@ -3,10 +3,16 @@
- + - +
+

{{ 'attendance-tracking,title' | translate }}

+
+
+ + +
diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss index e6cfd86d..cc8cdf42 100644 --- a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.scss @@ -1,15 +1,15 @@ ////////////////////book btn///////////////////// -ion-fab-button{ - --background: var(--darkblue)!important; - // background: url(/assets/icon/sliderBG.jpg); - background-size: cover; - background-position: top right; - border-radius: 50%; - height:112px; - width: 112px; -} +// ion-fab-button{ +// --background: var(--darkblue)!important; +// // background: url(/assets/icon/sliderBG.jpg); +// background-size: cover; +// background-position: top right; +// border-radius: 50%; +// height:112px; +// width: 112px; +// } .cbookApointmentBtn{ // --background:transparent !important; @@ -19,6 +19,22 @@ ion-fab-button{ --background: transparent; } +.addnon{ + --background: var(--darkblue)!important; + background-size: cover; + background-position: top right; + border-radius: 50%; + height: 80px; + width: 80px; + width: 80px; + height: 80px; + right: 8%; + position: fixed; + color: white; + bottom: 20%; + border-radius: 50%; + z-index: 999; +} .fab-p{ // position: absolute; @@ -51,7 +67,7 @@ button-inner{ } .iconFab{ - margin-top: -37px; + margin-top: -37px; width: 100px; height: 60px; } diff --git a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts index c61f785e..cd6b4502 100644 --- a/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts +++ b/Mohem/src/app/hmg-common/ui/fab-button/fab-button.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; import { TranslatorService } from '../../services/translator/translator.service'; @Component({ @@ -7,13 +7,14 @@ import { TranslatorService } from '../../services/translator/translator.service' styleUrls: ['./fab-button.component.scss'], }) export class FabButtonComponent implements OnInit { - + @Input() type:string; @Output() trigger = new EventEmitter(); public direction: any; constructor( ) { } ngOnInit() { + console.log("type" + this.type); this.direction = TranslatorService.getCurrentDirection(); } diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index ab687c35..362f46a6 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -28,8 +28,8 @@

Monthly Attendance

View your Monthly Time Sheet - - View Detail + + View Detail Vacation Rule *
diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index c29c014b..b013bc8f 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -596,6 +596,7 @@ export class HomePage implements OnInit { this.common.openEditProfile(); } + } diff --git a/Mohem/src/app/vacation-rule/home/home.component.html b/Mohem/src/app/vacation-rule/home/home.component.html index 0106c44a..4d59d520 100644 --- a/Mohem/src/app/vacation-rule/home/home.component.html +++ b/Mohem/src/app/vacation-rule/home/home.component.html @@ -1,6 +1,6 @@ - - + + @@ -10,13 +10,13 @@ - + -
- + + + + + + + + {{notBadge}} + +

{{item.RULE_STATUS}}


+

{{item.RULE_NAME}} | {{item.ITEM_TYPE_DISPLAY_NAME}}


+

{{item.BEGIN_DATE | dateString }} - {{item.END_DATE | dateString}}


+

Created on:


+ +
+ + + + +
+ + + + + + + + + + + + + + + +
+ +
- - -
+
+ + +
+ + \ No newline at end of file diff --git a/Mohem/src/app/vacation-rule/home/home.component.scss b/Mohem/src/app/vacation-rule/home/home.component.scss index af66a677..e777adaa 100644 --- a/Mohem/src/app/vacation-rule/home/home.component.scss +++ b/Mohem/src/app/vacation-rule/home/home.component.scss @@ -69,3 +69,64 @@ ion-card-header { margin: 0px 5px !important; } } + +//////////new design//////////////////////// +.itemVR +{ + background: #f0efef !important; + --background: #f0efef !important; + border: #dbdbdb 1px solid; + border-radius: 10px; + margin-bottom: 7px; +} +.listVR{ + background: transparent !important; + +} + +.red-status{ + color: var(--light) !important; + font-weight:bold; + background: var( --red); + border-radius: 9px; + text-align: center; + margin-top: 10px; + position: relative; + width: auto; + height: 100%; + display: inline-block !important; + padding: 0px 15px 0px 15px; +} + +.green-status{ + color: var(--light) !important; + font-weight:bold; + background: var( --custgreen); + border-radius: 9px; + text-align: center; + margin-top: 10px; + position: relative; + width: auto; + height: 100%; + display: inline-block !important; + padding: 0px 15px 0px 15px; +} + +.textBold{ + color: black; + font-weight: bold; + font-size: 17px; + +} +.label{ + margin-top: -19px; + border-bottom: #eaeaea solid; + padding-bottom: 8px; + color: black !important; +} +.createdOn{ + margin: -12px 0px -14px 0px; +} +.optionBtn{ +background: transparent !important; +} diff --git a/Mohem/src/app/vacation-rule/home/home.component.ts b/Mohem/src/app/vacation-rule/home/home.component.ts index 7ba084bc..fb95a2a3 100644 --- a/Mohem/src/app/vacation-rule/home/home.component.ts +++ b/Mohem/src/app/vacation-rule/home/home.component.ts @@ -25,7 +25,7 @@ export class HomeComponent implements OnInit { isUpdate: boolean = false; IsReachEnd: boolean = false; RespondAttributeList: any; - + add:any='add'; button: ButtonInput; // dateTime: DateTimeInput; // date: DateInput; @@ -37,7 +37,7 @@ export class HomeComponent implements OnInit { constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, private router: Router) { this.P_PAGE_NUM = 1; - this.P_PAGE_LIMIT = 1; + this.P_PAGE_LIMIT = 50; //this.button = new ButtonInput('btnSubmit', 'Submit', 'containerDiv', 'Y'); // this.dateTime = new DateTimeInput('Start Date', 'SDate', '', 'containerDiv', 'Y', 'Y', 'Y'); @@ -141,7 +141,9 @@ export class HomeComponent implements OnInit { this.isUpdate = true; this.cs.sharedService.setSharedData(this.isUpdate, 'isUpdate'); - this.router.navigate(['/vacation-rule/create-vacation-rule']); + // this.router.navigate(['/vacation-rule/create-vacation-rule']); + this.cs.navigateForward('/vacation-rule/vacation-type'); + } diff --git a/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html index 3db310f4..794c5bcb 100644 --- a/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html +++ b/Mohem/src/app/vacation-rule/notification-type/notification-type.component.html @@ -10,25 +10,19 @@ -
    +
  • {{'vacation-rule, itemType' | translate}}
  • - -
  • {{'vacation-rule, notification-type' | translate}}
  • -
    -
  • {{'vacation-rule, create-vacation-rule' | translate}}
  • -
    -
+ -->
diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.html b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.html index b36cf41d..44770b53 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.html +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.html @@ -1,17 +1,17 @@ - + - {{ 'vacation-rule, search-employee' | translate}} - + {{ 'vacation-rule, search-employee' | translate}} + - -
+ + {{'vacation-rule, search-by' | translate}} @@ -23,13 +23,16 @@ - - - - + + + + + + + - + + +
+
+
+ + + + +
+ + + +
+ +
+ +
+ + + {{employee.EMPLOYEE_DISPLAY_NAME}} +
{{employee.USER_NAME}}
+ {{employee.EMAIL_ADDRESS}} +
+
+
+ +
+
+ + +
-
+ + + + +
+ + {{'general, save' | translate}} + + + {{'general, cancel' | translate}} +
\ No newline at end of file diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss index 0187d5a3..31ba8d46 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss @@ -2,7 +2,18 @@ ion-item { margin-top: 5%; margin-right: 7%; } - +.labelRep{ + --color: initial; + display: block; + color: var(--color); + font-family: var(--ion-font-family,inherit); + font-size: inherit; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} .footer-button { border-radius: 3px; padding: 0 1.1em; @@ -12,4 +23,145 @@ ion-item { .item-radio-checked ion-label { color: #3ac1f1 !important; } -.boldTxt{font-weight:bold;} \ No newline at end of file +.boldTxt{font-weight:bold;} +//////////////////////// +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; + min-height: 90px; + // background-color: #0095ff; + // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); +} + + + +.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; +} + + diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts index d294e22c..d136c2a1 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts @@ -28,6 +28,7 @@ export class ReplacementListComponent implements OnInit { replacmentRequest: any = ""; isAbs: boolean = false; isSave: boolean = false; + active: any; constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, public modalController: ModalController) { } @@ -104,27 +105,97 @@ export class ReplacementListComponent implements OnInit { } } - doInfinite(infiniteScroll) { - - } + closePage() { this.isSave = true; let data: any = null; if (this.isSave == true) { if (this.selEmp) { - data = this.ReplacementList[this.selEmp]; + // data = this.ReplacementList[this.selEmp]; + data=this.selEmp; } else { - data = null; + let msg: string = this.ts.trPK("replacementRoll", "msg"); + this.cs.presentAlert(msg); + return; } - if (typeof this.callback == 'function') { - this.callback(data); + // if (typeof this.callback == 'function') { + // this.callback(data); + // } + + + // this.modalController.dismiss({ + // 'dismissed': true, + // empData: data + // }); + + + this.modalController.dismiss(data); + + // }else{ + + // let msg: string = this.ts.trPK("replacementRoll", "msg"); + // this.cs.presentAlert(msg); + // return; + + + // } + } + + } + closeModal() { + this.modalController.dismiss(); + } - this.modalController.dismiss({ - 'dismissed': true, - empData: data - }); + select(selectEmp,index){ + console.log(selectEmp.EMPLOYEE_DISPLAY_NAME); + this.selEmp=selectEmp + console.log("this.selEmp" + this.selEmp); + + this.active=index; + } + + + doInfinite(infiniteScroll) { + if (!this.IsReachEnd) { + + + const request = new ReplacementServiceRequest(); + 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) => { + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.ReplacementList)) { + this.P_PAGE_NUM++; + result.ReplacementList.forEach(vr => { + if (vr.ROW_NUM == vr.NO_OF_ROWS) { + this.IsReachEnd = true; + } + else { + this.IsReachEnd = false; + } + this.ReplacementList.push(vr); + // this.pro.GetVacationRulesList.push(vr); + }); + } else { + this.IsReachEnd = true; + } + } + //this.P_PAGE_NUM++; + if (infiniteScroll) + infiniteScroll.target.complete(); + + + // console.log(resFlag); + }, (Error) => console.log(Error), () => infiniteScroll.target.complete()); + } else { + if (infiniteScroll) + infiniteScroll.target.complete(); } } } diff --git a/Mohem/src/app/vacation-rule/vacation-rule.module.ts b/Mohem/src/app/vacation-rule/vacation-rule.module.ts index 7f2456cc..d376a3e0 100644 --- a/Mohem/src/app/vacation-rule/vacation-rule.module.ts +++ b/Mohem/src/app/vacation-rule/vacation-rule.module.ts @@ -13,6 +13,7 @@ import { CreateVacationRuleComponent } from './create-vacation-rule/create-vacat import { ReplacementListComponent } from './replacement-list/replacement-list.component'; // import { MaterialDesignFrameworkModule } from 'angular6-json-schema-form'; +import { PipesModule } from '../pipes/pipes.module'; const routes: Routes = [ { @@ -48,6 +49,8 @@ const routes: Routes = [ CommonModule, FormsModule, IonicModule, + PipesModule, + HmgCommonModule, // { // ngModule: JsonSchemaFormModule, diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html index ef4dc2d2..b526fb7f 100644 --- a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html +++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.html @@ -1,45 +1,44 @@ - - + + {{ 'vacation-rule, vacation-type' | translate}} - + -
    +
  • {{'vacation-rule, itemType' | translate}}
  • - -
  • {{'vacation-rule, notification-type' | translate}}
  • -
    -
  • {{'vacation-rule, create-vacation-rule' | translate}}
  • -
    -
+ --> - + +
+
+
+ +
- + {{'vacation-rule, itemType' | translate}} + [(ngModel)]="index" (ionChange)="vacationRuleSel($event)" required> {{x.ITEM_TYPE_DISPLAY_NAME}} @@ -54,12 +53,148 @@

+
+
+ +
+ +
+ + + + + + {{'vacation-rule, all-label' | translate}} + + + + {{'vacation-rule, select-label' | translate}} + + + + + + + + + + {{'vacation-rule, notification' | translate}} + + + {{x.NOTIFICATION_DISPLAY_NAME}} + + + + +
+ +
+
+ +
+ + + + + +

{{'vacation-rule, itemType' | translate}}


+

{{P_ITEM_TYPE_TITLE}}

+
+ +

{{'vacation-rule, notification' | translate}}


+

{{Notification_Title}}

+
+
+
+ + + + + + + {{'vacation-rule, start-date' | translate}} + + + + {{'vacation-rule, end-date' | translate}} + + + + {{'vacation-rule, message-label' | translate}} + + + + + + + {{assignMode.RADIO_BUTTON_LABEL}} + + + + {{'vacation-rule, deliver' | translate}} + + + + + {{'vacation-rule, close' | translate}} + + + + + + {{'vacation-rule, respond' | translate}} + + + + +
+
+ + + + + + + + + + +
+
- +
- + -
+ + +
+ +
+ +
+ +
+
+ + +
\ No newline at end of file diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss index 2c5eb1e1..c42fe244 100644 --- a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss +++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.scss @@ -12,7 +12,7 @@ li { } ion-item { - width: 100%; + width: 95%; margin-left: 2%; margin-right: 5%; } @@ -30,6 +30,67 @@ p.smallTip { min-width: 200px; } +.noteInput{ + border: solid var(--gray) 1px; + border-radius: 15px; + margin: 8px 17px 0px 17px; + padding: 10px 2px 10px 2px; +} +// new css // +.divStep{ + border: solid var(--gray) 1px; + border-radius: 15px; + padding: 10px 2px 10px 2px; + background: white; + box-shadow: 0px 0px 6px 0px #d5d5d5ab; + margin-bottom: 17px; +} +.ionItemStep{ + width: 100%; + margin-left: 5%; + margin-right: 5%; + margin-top: 10px; + border-radius: 30px; + border: 1px solid #dbdbdb; +} + +.selectItem{ + border: solid 1px #dbdbdb; + border-radius: 25px; + margin: 15px; + width: 100%; +} + +.labelTitle{ + + margin-left: 15px; +} +.labelValue{ + margin-top: -27px; + font-weight: 900; + margin-left: 15px; +} + +.labelRadio{ +white-space: pre-line !important; +color: black !important; +} +.dynamicFields{ + width: 321px; + border: #dbdbdb solid 1px; + border-radius: 16px; + margin: 10px; + padding: 10px; + +} +.stepHeaderDiv{ + text-align: center; + margin: auto; + font-weight: bolder; +} +.stepHeaderLebal{ + margin:0; +} // .progcontainer { // margin: auto; // text-align: center; diff --git a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts index ac3df459..04823ce6 100644 --- a/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts +++ b/Mohem/src/app/vacation-rule/vacation-type/vacation-type.component.ts @@ -1,10 +1,23 @@ import { vacationTypeResponse } from './../model/vacationType.Respond'; import { notificationTypeResponse } from './../model/notification.Respond'; import { VacationTypeRequest } from './../model/VacationTypeRequest'; -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ElementRef } from '@angular/core'; import { VacationRuleServiceService } from '../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'; +import { notificationTypeRequest } from '../model/notification.Request'; +import * as moment from 'moment'; +import { vacationRuleResponse } from '../model/vacationRule.Respond'; +import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request'; +import { ReplacementServiceRequest } from '../model/replacement-Service.request'; +import { NumberInput } from 'src/app/uI-elements/number.input'; +import { DateInput } from 'src/app/uI-elements/date.input'; +import { SelectInput } from 'src/app/uI-elements/select.input'; +import { TextInput } from 'src/app/uI-elements/text.input'; +import { ModalController } from '@ionic/angular'; +import { ReplacementListComponent } from '../replacement-list/replacement-list.component'; +import { createVacationRequest } from '../model/createVacation.Request'; +import { WorkListReplacementRollComponent } from 'src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component'; @Component({ selector: 'app-vacation-type', @@ -12,14 +25,194 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service styleUrls: ['./vacation-type.component.scss'], }) export class VacationTypeComponent implements OnInit { - ruleTypeList: any; index: any; + vactionRuleSelected:any =-1; + notificationTypeSelected: number; + notification_list: any; //// + notificationTypeShow:boolean=false; + notificationSelected: any; + createVacationRuleShow: boolean=false; + createBtn: boolean; + Sdate: any; + isUpdate: any; + SelAction: any; + updateData: any; + notificationType: { NOTIFICATION_NAME: any; NOTIFICATION_DISPLAY_NAME: any; NOTIFICATION_SUBJECT: any; FYI_FLAG: any; }; + P_ITEM_TYPE_TITLE: any; + selEmployeeID: any; + selEmployeeName: any; + employeeSel: any; + msgVal: any; + notifTypeSel: any; + itemType: any; + Edate: string; + Notification_Title: any; + showForType_Y: boolean; + isDeliver: boolean; + REASSIGN_val: any =[]; + var_notification: any; + exampleJsonObject: {}; + RespondAttributeList: any=[]; + GetRespondAttributeValueList: any; + wFLookUpList: any; + Resp2_val: any; + dateInput: DateInput; + numberInput: NumberInput; + selectInput: any; + textInput: TextInput; + hideForwordEmployee: any; + notifTypeSelP2: string; + P_RESPOND_ATTRIBUTES_TBL: any=[]; + vacationRuleRequest: createVacationRequest; + confirmMsg: string; + + constructor(public vacationRuleService: VacationRuleServiceService, + public ts: TranslatorService, + public cs: CommonService, + public modalController: ModalController, + private elementRef: ElementRef) { - constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService) { } + + + } ngOnInit() { - this.getVacationType(); + this.isUpdate = this.cs.sharedService.getSharedData('isUpdate'); + if (this.isUpdate) { + this.initCreateVaction(); + + } + else{ + this.getVacationType(); + } + } + + initCreateVaction(){ + this.Sdate = moment().format('YYYY-MM-DDTHH:mm:ssZ'); + this.Edate=""; + + // this.isUpdate = this.cs.sharedService.getSharedData('isUpdate'); + + if (this.isUpdate) { + this.updateData = this.cs.sharedService.getSharedData(vacationRuleResponse.SHARED_DATA, false); + this.SelAction = this.updateData.ACTION; + if (this.updateData.ACTION == "RESPOND" && this.updateData.FYI_FLAG == "Y") { + this.SelAction = "Close" + } + this.notificationType = { + NOTIFICATION_NAME: this.updateData.NOTIFICATION_NAME, + NOTIFICATION_DISPLAY_NAME: this.updateData.NOTIFICATION_SUBJECT, + NOTIFICATION_SUBJECT: this.updateData.NOTIFICATION_SUBJECT, + FYI_FLAG: this.updateData.FYI_FLAG + } + /*************** */ + this.P_ITEM_TYPE_TITLE = this.updateData.ITEM_TYPE_DISPLAY_NAME; + this.selEmployeeID = this.updateData.REPLACEMENT_USER_NAME; + if (this.selEmployeeID) { + this.selEmployeeName = this.updateData.RULE_NAME; + this.employeeSel = this.updateData.RULE_NAME; + } + /************ */ + this.msgVal = this.updateData.MESSAGE; + this.notifTypeSel = this.updateData.ACTION; + this.itemType = this.updateData; + this.notificationType = this.updateData; + //this.Sdate = this.updateData.BEGIN_DATE; + //this.Edate = this.updateData.END_DATE; + let _Sdate = this.updateData.BEGIN_DATE ? this.updateData.BEGIN_DATE : ""; + let _Edate = this.updateData.END_DATE ? this.updateData.END_DATE : ""; + //let tzoffset = moment().utcOffset(); //offset in milliseconds + if (_Sdate) { + this.Sdate = moment(_Sdate).format('YYYY-MM-DDTHH:mm:ssZ'); + //this.Sdate = (new Date(myStartTime - tzoffset)).toISOString().slice(0, -1); + //this.startTime = this.Sdate; + } + if (_Edate) { + this.Edate = moment(_Edate).format('YYYY-MM-DDTHH:mm:ssZ'); + //this.Edate = (new Date(myEndTime - tzoffset)).toISOString().slice(0, -1); + // this.endTime = this.Edate; + } + + //this.schemaNotific =this.updateData.RespondAttributeList; + + //this.notifTypeSel=this.REASSIGN_val[0].RADIO_BUTTON_LABEL; + //console.log(this.notifTypeSel); + // this.getNotificationReassign(); + } else { + this.msgVal=""; + this.isUpdate = false; + this.SelAction = ""; + this.employeeSel = ""; + this.itemType = this.cs.sharedService.getSharedData(vacationTypeResponse.SHARED_DATA, false); + this.notificationType = this.cs.sharedService.getSharedData(notificationTypeResponse.SHARED_DATA, false); + } + this.Notification_Title = this.notificationType.NOTIFICATION_DISPLAY_NAME; + this.P_ITEM_TYPE_TITLE = this.itemType.ITEM_TYPE_DISPLAY_NAME; + console.log("showForType_Y"); + if (this.notificationType.FYI_FLAG == 'Y') { + this.showForType_Y = true; + } else { + this.showForType_Y = false; + } + if (this.itemType.ITEM_TYPE == "*") { + this.isDeliver = false; + } else { + this.isDeliver = true; + } + + this.getNotificationReassign(); + this.respondAttributes(); + + + } + vacationRuleSel(event){ + this.vactionRuleSelected=event.detail.value; + if(this.notificationTypeShow){ + //this.notificationTypeShow = false + this.notificationTypeShow = false + this.notifTypeSelP2 = "*"; + //this.part3show = false + } + if (this.createVacationRuleShow){ + this.createVacationRuleShow = false + this.createBtn=false; + + + + } + + + + + console.log("event: "+ event.detail.value); + } + notificationSel(event){ + + this.notificationSelected=event.detail.value; + if(this.createVacationRuleShow){ + //this.notificationTypeShow = false + this.createVacationRuleShow = false + this.createBtn=false; + //this.part3show = false + } + + + // + console.log("notificationSel event: "+ event.detail.value); + + } + + notificationTypeSel(event){ + // notifTypeSelP2 + this.notificationTypeSelected=event.detail.value; + if(this.createVacationRuleShow){ + //this.notificationTypeShow = false + this.createVacationRuleShow = false + this.createBtn=false; + //this.part3show = false + } + } getVacationType() { @@ -38,6 +231,11 @@ export class VacationTypeComponent implements OnInit { } NextPage() { + //notification_list + + if(this.vactionRuleSelected >= 0 ){ + //&& !this.notificationTypeShow && !this.notificationTypeShow){ + if(!this.notificationTypeShow){ this.cs.sharedService.setSharedData(this.ruleTypeList[this.index], vacationTypeResponse.SHARED_DATA); if (this.ruleTypeList[this.index].ITEM_TYPE == "*") { @@ -47,12 +245,657 @@ export class VacationTypeComponent implements OnInit { notificatioAtt.NOTIFICATION_NAME = "*"; notificatioAtt.NOTIFICATION_SUBJECT = ""; this.cs.sharedService.setSharedData(notificatioAtt, notificationTypeResponse.SHARED_DATA); - this.cs.navigateForward('/vacation-rule/create-vacation-rule'); + //part 3 + this.createVacationRuleShow = true + this.createBtn=true; + // if (this.notifTypeSelP2 == "*") { + // let notificatioAtt: notificationTypeResponse = new notificationTypeResponse(); + // notificatioAtt.FYI_FLAG = ""; + // notificatioAtt.NOTIFICATION_DISPLAY_NAME = "All"; + // notificatioAtt.NOTIFICATION_NAME = "*"; + // notificatioAtt.NOTIFICATION_SUBJECT = ""; + // this.cs.sharedService.setSharedData(notificatioAtt, notificationTypeResponse.SHARED_DATA); + // } else { + // this.cs.sharedService.setSharedData(this.notification_list[this.var_notification], notificationTypeResponse.SHARED_DATA); + // } + + this.initCreateVaction(); + + //this.cs.navigateForward('/vacation-rule/create-vacation-rule'); + + } else { + //part 2 + this.getNotificationType(); + + // this.cs.navigateForward('/vacation-rule/notification-type'); + } + + }//end part not show + else{ + // check if notifictype sele and part 3 not show + //this.notificationSelected=event.detail.value; + ///if(this.createVacationRuleShow + if((this.notificationSelected >= 0 || this.notifTypeSelP2 == '*') && !this.createVacationRuleShow){ + //call part3 + this.createVacationRuleShow = false + this.createBtn=false; + + if (this.notifTypeSelP2 == "*") { + let notificatioAtt: notificationTypeResponse = new notificationTypeResponse(); + notificatioAtt.FYI_FLAG = ""; + notificatioAtt.NOTIFICATION_DISPLAY_NAME = "All"; + notificatioAtt.NOTIFICATION_NAME = "*"; + notificatioAtt.NOTIFICATION_SUBJECT = ""; + this.cs.sharedService.setSharedData(notificatioAtt, notificationTypeResponse.SHARED_DATA); + } else { + this.cs.sharedService.setSharedData(this.notification_list[this.var_notification], notificationTypeResponse.SHARED_DATA); + } + + this.initCreateVaction(); + } + + } + } + + + else{ + alert("please select vaction rule"); + } + + }//////////////////////////////// + + getNotificationType() { + let request: notificationTypeRequest = new notificationTypeRequest(); + request.P_ITEM_TYPE = this.ruleTypeList[this.index].ITEM_TYPE; //;this.itemTypeObj.ITEM_TYPE; + this.vacationRuleService.getNotificationType(request, () => { + this.getNotificationType(); + }, this.ts.trPK('general', 'retry')).subscribe((result) => { + console.log(result); + if (this.cs.validResponse(result)) { + console.log(result.GetItemTypeNotificationsList); + this.notification_list = result.GetItemTypeNotificationsList; + //rest radio button of notifTypeSel (All , select) + this.notificationTypeShow=true; + + } else { + this.cs.presentAlert(result.ErrorEndUserMessage); + } + }); + } + + getNotificationReassign() { + let request: LoginRequest = new LoginRequest(); + + this.vacationRuleService.notificationReassign(request, () => { + this.getNotificationReassign(); + }, this.ts.trPK('general', 'retry')).subscribe((result) => { + console.log(result); + if (this.cs.validResponse(result)) { + console.log(result.GetNotificationReassignModeList); + this.REASSIGN_val = result.GetNotificationReassignModeList;//[0].RADIO_BUTTON_ACTION; + this.notifTypeSel = this.REASSIGN_val[0].RADIO_BUTTON_ACTION; + this.reverseAction(); + this.createVacationRuleShow = true; + this.createBtn=true; + } else { + this.cs.presentAlert(result.ErrorEndUserMessage); + } + }); + } + reverseAction() { + if (this.updateData) { + switch (this.SelAction) { + case 'FORWARD': { + this.notifTypeSel = "DELEGATE"; + break; + } + case 'RESPOND': { + this.notifTypeSel = "RESPOND"; + break; + } + case 'CLOSE': { + this.notifTypeSel = "CLOSE"; + break; + } + case 'NOOP': { + this.notifTypeSel = "DELIVER"; + break; + } + case 'TRANSFER': { + this.notifTypeSel = "TRANSFER"; + break; + } + default: { + this.notifTypeSel = ""; + break; + } + } + } + } +///////////////////////////////////// +respondAttributes() { + let request: notificationTypeRequest = new notificationTypeRequest(); + request.P_NOTIFICATION_NAME = this.notificationType.NOTIFICATION_NAME; + request.P_ITEM_TYPE = this.itemType.ITEM_TYPE; + // this.vacationRuleService.respondAttributes( + // request). + // subscribe((result: Response) => { + // this.handlerespondAttributesResult(result); + // }); + this.vacationRuleService.respondAttributes(request, () => { + this.respondAttributes(); + }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlerespondAttributesResult(result); + }); + + +} +handlerespondAttributesResult(result) { + if (this.cs.validResponse(result)) { + this.RespondAttributeList = result.RespondAttributesList; + if (result.RespondRolesList != "" && result.RespondRolesList[0].ATTRIBUTE_NAME != null && result.RespondRolesList[0].ATTRIBUTE_NAME != undefined) { + this.Resp2_val = result.RespondRolesList[0].ATTRIBUTE_NAME; + this.hideForwordEmployee = result.RespondRolesList[0]; + } + + if (result.RespondAttributesList) { + //this.schemaNotific = JSON.parse(result.P_Schema); + ////////************************************** */ + this.createVacationDynamicFields(result.RespondAttributesList); + } + this.reverseAction(); + if (this.isUpdate) { + this.fillResposeAtrributes(result.RespondAttributesList); + } + // ATTRIBUTE_DISPLAY_NAME: "Note" + // ATTRIBUTE_FORMAT: "4000" + // ATTRIBUTE_NAME: "WF_NOTE" + // ATTRIBUTE_TYPE: "VARCHAR2" + } +} + +createVacationDynamicFields(RespondAttributesList) { + console.log("createVacationDynamicFields"); + const containerId = 'CVDynamicFields'; + for (let i = 0; i < RespondAttributesList.length; i++) { + if (RespondAttributesList[i].ATTRIBUTE_TYPE == "VARCHAR2") { + console.log("1"); + + this.textInput = new TextInput(RespondAttributesList[i].ATTRIBUTE_DISPLAY_NAME, RespondAttributesList[i].ATTRIBUTE_NAME, "", containerId, "", "", "", ""); + } else if (RespondAttributesList[i].ATTRIBUTE_TYPE == "LOOKUP") { + console.log("2"); + //call create WF_LOOKUP + //call there or when the got response from responsedAtt + this.selectInput = new SelectInput(RespondAttributesList[i].ATTRIBUTE_DISPLAY_NAME, RespondAttributesList[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); + this.getWFLookUp(RespondAttributesList[i].ATTRIBUTE_FORMAT, RespondAttributesList[i].ATTRIBUTE_NAME); + + } else if (RespondAttributesList[i].ATTRIBUTE_TYPE == "DATE") { + console.log("3"); + + this.dateInput = new DateInput(RespondAttributesList[i].ATTRIBUTE_DISPLAY_NAME, RespondAttributesList[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); + } else if (RespondAttributesList[i].ATTRIBUTE_TYPE == "NUMBER") { + console.log("4"); + + this.numberInput = new NumberInput(RespondAttributesList[i].ATTRIBUTE_DISPLAY_NAME, RespondAttributesList[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); + } + } +} + +fillResposeAtrributes(respList) { + let body = { + P_RULE_ID: this.updateData.RULE_ID, + GetRespondAttributeValueTBL: respList + } + this.vacationRuleService.getRespondAttributeValues( + body). + subscribe((result: Response) => { + this.handleFillResponseAttr(result); + }); +} + +handleFillResponseAttr(result) { + if (this.cs.validResponse(result)) { + if (result.GetRespondAttributeValueList && result.GetRespondAttributeValueList.length > 0) { + this.GetRespondAttributeValueList=result.GetRespondAttributeValueList; + let resp_val: any = result.GetRespondAttributeValueList[0].P_ATTRIBUTE_NAME; + let Emp_ID: any = result.GetRespondAttributeValueList[0].P_ATTRIBUTE_TEXT_VALUE; + let valueList = result.GetRespondAttributeValueList; + var obj = {}; + if (resp_val == this.Resp2_val) { + let request: ReplacementServiceRequest = new ReplacementServiceRequest(); + + request.P_SEARCH_USER_NAME = Emp_ID; + request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; + request.P_SEARCH_EMAIL_ADDRESS = ""; + request.P_PAGE_NUM = 1; + request.P_PAGE_LIMIT = 1000 + + this.vacationRuleService.getReplacementList(request). + subscribe((result: Response) => { + this.handleFillRole(result); + }); + } + for (let i = 0; i < valueList.length; i++) { + obj[valueList[i].P_ATTRIBUTE_NAME] = valueList[i].P_ATTRIBUTE_TEXT_VALUE; + } + this.exampleJsonObject = obj; + //Call set value of responsed attribute + // this.createVacationDynamicFields(this.exampleJsonObject);//ashwaq + this.setRespondAttributeValue(); + // this.exampleJsonObject = new Map(valueList.map(obj => [ obj., obj.P_ATTRIBUTE_TEXT_VALUE ])); + } + } +} +handleFillRole(result) { + if (this.cs.validResponse(result)) { + this.selEmployeeName = result.ReplacementList[0].EMPLOYEE_DISPLAY_NAME; + this.selEmployeeID = result.ReplacementList[0].USER_NAME; + } +} +setRespondAttributeValue(){ + + for (let i = 0; i < this.RespondAttributeList.length; i++) { + if(this.RespondAttributeList[i].ATTRIBUTE_NAME == this.GetRespondAttributeValueList[i].P_ATTRIBUTE_NAME){ + if (this.RespondAttributeList[i].ATTRIBUTE_TYPE == "VARCHAR2") { + console.log("1"); + let x = (document.getElementById(this.RespondAttributeList[i].ATTRIBUTE_NAME)) as HTMLInputElement; + x.value=this.GetRespondAttributeValueList[i].P_ATTRIBUTE_NUMBER_VALUE; + } else if (this.RespondAttributeList[i].ATTRIBUTE_TYPE == "LOOKUP") { + console.log("2"); + //call create WF_LOOKUPP_ATTRIBUTE_NAME + //call there or when the got response from responsedAtt + + let x = (document.getElementById(this.RespondAttributeList[i].ATTRIBUTE_NAME)) as HTMLSelectElement; + if(this.wFLookUpList){ + let index= this.wFLookUpList.findIndex(x => x.LOOKUP_CODE == this.GetRespondAttributeValueList[i].P_ATTRIBUTE_TEXT_VALUE); + console.log("Hel: "+ index); + x.options[index+1].selected=true; + + } + + } else if (this.RespondAttributeList[i].ATTRIBUTE_TYPE == "DATE") { + console.log("3"); + + } else if (this.RespondAttributeList[i].ATTRIBUTE_TYPE == "NUMBER") { + console.log("4"); + let x = (document.getElementById(this.RespondAttributeList[i].ATTRIBUTE_NAME)) as HTMLInputElement; + x.value=this.GetRespondAttributeValueList[i].P_ATTRIBUTE_NUMBER_VALUE; + + } + }//end if + } + +} + +getWFLookUp(resAttrFormat: any, ATTRIBUTE_NAME) { + + const request = { + P_LOOKUP_TYPE: resAttrFormat, + } + + this.vacationRuleService.getLookup(request, () => { }, this.ts.trPK('general', 'retry')).subscribe( + (result: any) => { + if (this.cs.validResponse(result)) { + // console.log("Lookup result "+ result); + + this.wFLookUpList=result.WFLookUpList + this.fillDropdownList(result.WFLookUpList, ATTRIBUTE_NAME); + } else { + this.cs.presentAlert(result.ErrorEndUserMessage); + } + }); + +} + +fillDropdownList(optionList: any = [],attributeID) { + let elemID: any = attributeID; + let eitObj: any; + + if (optionList.length > 0) { + + let select = document.getElementById(elemID) as HTMLSelectElement; + document.getElementById(elemID).innerHTML = ""; + + + var firstoption = document.createElement("option"); + firstoption.text = this.ts.trPK("general", "choose"); + firstoption.value = ""; + select.add(firstoption); + for (let i = 0; i < optionList.length; i++) { + + var option = document.createElement("option"); + option.text = optionList[i].LOOKUP_MEANING; + option.value = optionList[i].LOOKUP_CODE; + select.add(option); + + } + + select.disabled = false; + } + +} + +async SearchReplacment() { + const modal = await this.modalController.create({ + component: ReplacementListComponent + }); + modal.cssClass = 'replaceRoll-modal'; + + + modal.onDidDismiss() + .then((data) => { + const user = data.data; + console.log(data) + console.log(user); + if (data) { + this.selEmployeeName = user.EMPLOYEE_DISPLAY_NAME; + this.selEmployeeID = user.USER_NAME; + this.employeeSel = this.selEmployeeName + "," + this.selEmployeeID + } + + + + + + }); + + return await modal.present(); +} + +clearEmployee() { + this.selEmployeeName = ""; + this.selEmployeeID = ""; +} + +///////////////////////////////////////////// + +ApplyFunc() { + (this.elementRef.nativeElement.querySelectorAll('ion-item') as HTMLElement[]).forEach((x) => { + if (x.classList.contains('requiredItem')) { + x.classList.add('ng-touched'); + x.classList.remove('ng-untouched'); + } + }); + let msg: string = ""; + if (this.notifTypeSel == undefined) { + msg = this.ts.trPK('vacation-rule', 'fillAction'); + this.cs.presentAlert(msg); + } else if (this.msgVal == undefined) { + msg = this.ts.trPK('vacation-rule', 'fillMsg'); + this.cs.presentAlert(msg); + } else if (this.Sdate == undefined) { + msg = this.ts.trPK('vacation-rule', 'fillSDate'); + this.cs.presentAlert(msg); + } + // else if (this.selEmployeeID == undefined) { + // msg = this.ts.trPK('vacation-rule', 'fillReplacement'); + // this.cs.presentAlert(msg); + // } + else { + // var responseAttrDic = this.exampleJsonObject;//haroon + var responseAttrDic =this.RespondAttributeList; // Ashwaq + this.P_RESPOND_ATTRIBUTES_TBL = []; + for (let key in responseAttrDic) { + let obj: any = {}; + obj.ATTRIBUTE_NAME =responseAttrDic[key].ATTRIBUTE_NAME;//ashwaq to get ATTRIBUTE_NAME + + if (typeof responseAttrDic[key] === "number") { + obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(responseAttrDic[key].ATTRIBUTE_NAME) as HTMLInputElement).value; + + } + + else { + obj.ATTRIBUTE_TEXT_VALUE =(document.getElementById(responseAttrDic[key].ATTRIBUTE_NAME) as HTMLInputElement).value; + + } + this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + } + + + + let repUserName = this.selEmployeeID; + if(repUserName == null || repUserName ==""){ + + } + if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { + let obj: any = {}; + repUserName = ""; + obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; + obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; + this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + } + let pAction = ""; + pAction = this.getActionValue(); + let jsonSDate = ""; + let jsonEDate = ""; + if (this.Sdate) { + let startDate = moment(this.Sdate).format('YYYY-MM-DDTHH:mm:ssZ'); + jsonSDate = this.cs.convertISODateToJsonDate(startDate); + } else { + jsonSDate = null; + } + if (this.Edate) { + + let endDate = moment(this.Edate).format('YYYY-MM-DDTHH:mm:ssZ'); + jsonEDate = this.cs.convertISODateToJsonDate(endDate); } else { - this.cs.navigateForward('/vacation-rule/notification-type'); + jsonEDate = null; } + let request: createVacationRequest = new createVacationRequest(); + request.P_BEGIN_DATE = jsonSDate; + request.P_END_DATE = jsonEDate; + request.P_MESSAGE = this.msgVal; + request.P_REPLACEMENT_USER_NAME = repUserName; + request.P_ITEM_TYPE = this.itemType.ITEM_TYPE; + request.P_NOTIFICATION_NAME = this.notificationType.NOTIFICATION_NAME; + request.P_ACTION = pAction; + request.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; + this.vacationRuleRequest = request; + + + + + + this.vacationRuleService.createVacationRule(request, () => { + }, this.ts.trPK('general', 'retry')).subscribe((result) => { + if (this.cs.validResponse(result)) { + console.log(result); + this.handlecreateVacationResult(result); + } else { + this.cs.presentAlert(result.ErrorEndUserMessage); + } + }); } +} +handlecreateVacationResult(result) { + if (this.cs.validResponse(result)) { + this.cs.JustAlertDialog(this.ts.trPK('general', 'ok'), this.ts.trPK('vacation-rule', 'rule-success')) + this.goToStart(); + + } +} + +goToStart() { + + this.cs.navigateRoot('/home') +} + +updateVacationRule() { + (this.elementRef.nativeElement.querySelectorAll('ion-item') as HTMLElement[]).forEach((x) => { + if (x.classList.contains('requiredItem')) { + x.classList.add('ng-touched'); + x.classList.remove('ng-untouched'); + } + }); + let msg: string = ""; + if (this.notifTypeSel == undefined) { + msg = this.ts.trPK('vacation-rule', 'fillAction'); + } else if (this.msgVal == undefined) { + msg = this.ts.trPK('vacation-rule', 'fillMsg'); + } else if (this.Sdate == undefined) { + msg = this.ts.trPK('vacation-rule', 'fillSDate'); + } else { + var responseAttrDic = this.exampleJsonObject; + this.P_RESPOND_ATTRIBUTES_TBL = []; + for (let key in responseAttrDic) { + let obj: any = {}; + obj.ATTRIBUTE_NAME = key; + if (typeof responseAttrDic[key] === "number") { + obj.ATTRIBUTE_NUMBER_VALUE = responseAttrDic[key]; + } + + else { + obj.ATTRIBUTE_TEXT_VALUE = responseAttrDic[key]; + } + this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + } + let repUserName = this.selEmployeeID; + if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { + let obj: any = {}; + repUserName = ""; + obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; + obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; + this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + } + let pAction = ""; + pAction = this.getActionValue(); + let jsonSDate = ""; + let jsonEDate = ""; + + if (this.Sdate) { + + let startDate = moment(this.Sdate).format('YYYY-MM-DDTHH:mm:ssZ'); + + jsonSDate = this.cs.convertISODateToJsonDate(startDate); + } else { + jsonSDate = null; + } + + if (this.Edate) { + + let endDate = moment(this.Edate).format('YYYY-MM-DDTHH:mm:ssZ'); + jsonEDate = this.cs.convertISODateToJsonDate(endDate); + } else { + jsonEDate = null; + } + let body: any = { + P_RULE_ID: this.updateData.RULE_ID, + P_BEGIN_DATE: jsonSDate, + P_END_DATE: jsonEDate, + P_MESSAGE: this.msgVal, + P_REPLACEMENT_USER_NAME: repUserName, + P_ACTION: pAction, + RespondAttributeList: this.P_RESPOND_ATTRIBUTES_TBL + } + this.vacationRuleService.updateVacationRule( + body). + subscribe((result: Response) => { + this.handleupdateVacationResult(result); + }); + } } + +handleupdateVacationResult(result) { + if (this.cs.validResponse(result)) { + this.cs.JustAlertDialog(this.ts.trPK('general', 'ok'), this.ts.trPK('vacation-rule', 'rule-update-success')) + this.goToStart(); + } +} + + +getActionValue(): string { + let pAction = ""; + //this.pAction = this.notifTypeSel; + //console.log(this.pAction); + if (this.notifTypeSel) { + switch (this.notifTypeSel) { + case 'DELEGATE': { + pAction = "FORWARD"; + break; + } + case 'RESPOND': { + pAction = "RESPOND"; + break; + } + case 'CLOSE': { + pAction = "RESPOND"; + break; + } + case 'DELIVER': { + pAction = "NOOP"; + break; + } + case 'TRANSFER': { + pAction = "TRANSFER"; + break; + } + default: { + pAction = ""; + break; + } + } + return pAction; + } +} + +async openReplacementRoll() { + + const modal = await this.modalController.create({ + component: ReplacementListComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss().then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + this.selEmployeeName = data.data.EMPLOYEE_DISPLAY_NAME; + this.selEmployeeID = data.data.USER_NAME; + this.employeeSel = this.selEmployeeName + "," + this.selEmployeeID + } + }); + + return await modal.present(); + + + + +} + +////// +openConfirmAlertDialogAction(flag){ + if(flag==true){ + + this.confirmMsg = this.ts.trPK('vacation-rule', 'confirm-msg-success') + + } + else{ + this.confirmMsg= this.ts.trPK('vacation-rule', 'update-msg-success') + + } +this.cs.confirmAlertDialogAction( + () => { + if(flag==true){ + this.ApplyFunc(); + } + else{ + this.updateVacationRule(); + } + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg + ) +} + + +////// +} \ No newline at end of file diff --git a/Mohem/src/assets/imgs/delete-circle.png b/Mohem/src/assets/imgs/delete-circle.png new file mode 100644 index 0000000000000000000000000000000000000000..3c478232df20c5148f7cac545731c1e2363c30c7 GIT binary patch literal 983 zcmV;|11S87P)Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91E1&}a z1ONa40RR91D*ylh08JES!TEI>i~7Yb$~nII=~&E z65N503Zf1oDu}4SqJoGD;2Wb8wh~!7onkZZjc>KLGrN-R*~#6TG<-yEVGd2Vvh=8l zT3B`b&bk`u@s3GP;wFPXT zJRYEhtK%z^SMnQDQw`i2i1J)Swo%S$^HdJdKEdm z6%37Acze5V!jo-Y+__D%qOFd@GZ-?u69=cDvy^g7q?N}MECrfr zGc4SZXoks=Yc-pDV?ztqX}80Tk?Wd#Io#9N#cr6qaP8QO9XMz_+PQEPs*iz3SU#1= zk5}_Q9Hnyy4z(Ul3^Iz(dK4tu7>AQuM|@^>vKPWo<3l2Ht*P&|B^MQ33WsoP;IQYZ zS&AJ({ZJjDK#3GM#KVC@&a;<-0Eo7bvn`eF5Y*m z{&jI(yvAbQuHiD`QH|u6rZWlGJ_a67*ZFEqg~gyh20v2W&^xHtKYaD!NO<;^B0m*Y zT!>5I5bDl79Kw;%p4O$%H&q?P1%ZBUm%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*jsy(#(SIx6spx?`P9L&)1>$^?Rw$4v1a60NE zp>=CgqlNtBG!;#Vw_`W45BB9og7I7Px#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91Dxd=Z z1ONa40RR91DgXcg0Qb^|F#rGp>`6pHR9Fekm*H`nKoCabO#Yh^=s!P{2p4prEzwk-|aJpO_*AmCJ?u5Pj|YOu zg!t65M+1}0p4()&gxG8v7I%#%ufV4>KDUBdJ?vGdR zcjt@ynsTwf;g!rkVpm&($DzTeyoN{UwvrR(3)uDG`_68a zT2E`Dmp&_k0>-E$$=5`DcX9~Qgll2{SJ>#sD%#sVyOp{zwdcwe3l|0>6ikG%j?Tmn z5%%+bKV=MSVO;imLqp+N-_fy32NL(~zqgkR)Z5seVzlMtpN-S6KVHJp_6^1FX-$&z zSam!ZioXmcZ0+aF3rIm@6$DiT-qH=UP(cSlIl&#Iu!IsOsUdsvp-CN%OV(TCN8dqq zT&8;UR4t{0K@mBSuw;W#7@we>bISqQ!+gcUT(|R_aKu=X{Cu8Cj z-^Pm.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction { @@ -992,3 +993,15 @@ border:0px justify-content: center !important; } +.replaceRoll-modal { + + padding: 30% 1% !important; + --height: 15cm !important; + --width: 100% !important; + --border-radius: 0.4cm; + +} +.header-toolbar-new { + --background: #22c6b3; + background: #22c6b3; +} \ No newline at end of file diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index ff4399e6..7a8ec184 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -1,5 +1,7 @@ .colorBG{ - --background: #f0efef; + --background: #f0efef !important; + background: #f0efef !important; + } .footerSearchBtn{ padding: 0px !important; From c3339148edab923f08bd9cae1b999fa812e7a63a Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 26 Feb 2020 16:07:04 +0300 Subject: [PATCH 02/23] fix my team request for employee list --- Mohem/src/app/eit/home/home.component.html | 44 ++++++++++++++++++- Mohem/src/app/eit/home/home.component.ts | 2 + Mohem/src/app/home/home.page.ts | 1 + .../app/my-team/details/details.component.ts | 1 + 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/Mohem/src/app/eit/home/home.component.html b/Mohem/src/app/eit/home/home.component.html index 761904cc..28c4956e 100644 --- a/Mohem/src/app/eit/home/home.component.html +++ b/Mohem/src/app/eit/home/home.component.html @@ -12,7 +12,9 @@ - + + + @@ -46,4 +48,44 @@ *ngIf="menuItem.children && menuItem.MENU_ENTRY_TYPE=='MENU'" slot="end" class="arrow-down"> --> + + + + + + + + + + +
+ + {{menuItem.PROMPT}} + + + + + +
+ + + + +  {{subPage.PROMPT}} + + + + + +
+
+ +
+
+
\ No newline at end of file diff --git a/Mohem/src/app/eit/home/home.component.ts b/Mohem/src/app/eit/home/home.component.ts index 82ac3374..2f250a21 100644 --- a/Mohem/src/app/eit/home/home.component.ts +++ b/Mohem/src/app/eit/home/home.component.ts @@ -16,9 +16,11 @@ export class HomeComponent implements OnInit { selMenu: MenuResponse = new MenuResponse(); // Selected Side Menu selectedMenu: any; + pageType :string; constructor(private cs: CommonService, private ts: TranslatorService) { this.menu = this.cs.sharedService.getSharedData('menuEntries', false); + this.pageType = this.cs.sharedService.getSharedData('homemenuentries', false); this.selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); const title: string = this.ts.trPK('eit', 'my-requests'); this.headerTitle = this.menu.PROMPT ? this.menu.PROMPT : title; diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 9c086dd5..b81dc705 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -431,6 +431,7 @@ export class HomePage implements OnInit { this.menuEntries = tree; console.log(this.menuEntries); this.common.sharedService.setSharedData(tree, "menuEntries"); + this.common.sharedService.setSharedData("home", "homemenuentries"); // this.common.navigateForward("/eit/homepage"); // this.common.openEITPage(); } diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index 3a98c7c1..8f430397 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -520,6 +520,7 @@ doInfinite(infiniteScroll) { sortMenuEntires(list) { const tree = this.common.list_to_tree(list); this.common.sharedService.setSharedData(tree, 'menuEntries'); + this.common.sharedService.setSharedData("myteam", "homemenuentries"); this.common.openEITPage(); } From 8c55d3995abdd0912c7f64a862f357b4f98816f1 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 26 Feb 2020 16:14:21 +0300 Subject: [PATCH 03/23] edit time input --- Mohem/package.json | 2 +- Mohem/src/app/uI-elements/time.input.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mohem/package.json b/Mohem/package.json index 80fa73f1..e4223885 100755 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -201,4 +201,4 @@ "android" ] } -} +} \ No newline at end of file diff --git a/Mohem/src/app/uI-elements/time.input.ts b/Mohem/src/app/uI-elements/time.input.ts index 001589f0..ace25328 100644 --- a/Mohem/src/app/uI-elements/time.input.ts +++ b/Mohem/src/app/uI-elements/time.input.ts @@ -31,7 +31,7 @@ export class TimeInput extends UiElement { this.formatDate(); } const template = - "
" + + "
" + " " + // " "+ "
"+this.value+"
"+ From 5557f7d3bac598a04d67491d1337baf87b935692 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Wed, 26 Feb 2020 16:35:47 +0300 Subject: [PATCH 04/23] add vacation rule to service list --- Mohem/package-lock.json | 13 ++++++++++--- Mohem/package.json | 4 ++-- Mohem/src/app/home/home.page.html | 13 +++++++++++-- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Mohem/package-lock.json b/Mohem/package-lock.json index 2a5976ca..7eadf53b 100644 --- a/Mohem/package-lock.json +++ b/Mohem/package-lock.json @@ -1217,11 +1217,18 @@ } }, "@ionic-native/vibration": { - "version": "5.19.1", - "resolved": "https://registry.npmjs.org/@ionic-native/vibration/-/vibration-5.19.1.tgz", - "integrity": "sha512-f9fMtBRJmVLklRrnqcSqKktw6skdp+dDQpbBOq1m5VSQF7b6EKkCIUTN69EjeSn2z3AD0kSYn1hCGTp2q+cJIw==", + "version": "5.21.6", + "resolved": "https://registry.npmjs.org/@ionic-native/vibration/-/vibration-5.21.6.tgz", + "integrity": "sha512-sVmB4sHJ0MG+3IwmSvaHUATEM9D8ZFKko/1orHALTwGN57o0Ncf/n37PKWdPp8BANmYhTAoj6iOBd+YNonhf3w==", "requires": { "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } } }, "@ionic-native/zbar": { diff --git a/Mohem/package.json b/Mohem/package.json index 43dc7e46..c515f9b0 100755 --- a/Mohem/package.json +++ b/Mohem/package.json @@ -52,7 +52,7 @@ "@ionic-native/sqlite": "^5.18.0", "@ionic-native/status-bar": "^5.0.0", "@ionic-native/themeable-browser": "^5.18.0", - "@ionic-native/vibration": "^5.19.1", + "@ionic-native/vibration": "^5.21.6", "@ionic-native/zbar": "^5.10.0", "@ionic/angular": "^4.1.0", "@ng-bootstrap/ng-bootstrap": "^4.2.2", @@ -204,4 +204,4 @@ "android" ] } -} \ No newline at end of file +} diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 362f46a6..4e43c464 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -28,8 +28,8 @@

Monthly Attendance

View your Monthly Time Sheet - - View Detail Vacation Rule * + + View Detail
@@ -48,6 +48,15 @@ icon="assets/icon/new-design/leave_balance.png"> + + + + + + From f1157f48f6a0ac6de7d72152ec2c5bb45d6ddc6d Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 26 Feb 2020 16:46:29 +0300 Subject: [PATCH 05/23] fixed timecard module --- .../date-info-modal.component.ts | 2 +- .../employee-information.component.html | 4 +- .../employee-information.component.ts | 2 + .../services-button.component.html | 3 +- Mohem/src/app/home/home.page.html | 2 +- Mohem/src/app/home/home.page.ts | 5 + .../my-team/details/details.component.html | 5 +- .../app/my-team/details/details.component.ts | 9 - .../src/app/my-team/home/home.component.html | 3 +- .../time-card-details.component.html | 228 ++- .../time-card-details.component.scss | 1225 +++++++++++------ .../time-card-details.component.ts | 335 ++--- 12 files changed, 1048 insertions(+), 775 deletions(-) diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts index 6bee539f..001b4b25 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts @@ -89,7 +89,7 @@ export class DateInfoModalComponent implements OnInit { { data: [this.percChart], backgroundColor: [ - '#22C6B3' + '#094875' ], borderWidth: 2 }] diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html index f6b03e26..f3099eaa 100644 --- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html +++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html @@ -13,9 +13,9 @@

{{name}}

{{title}} - + - +
@@ -62,6 +62,13 @@ [icon]="subMenu.ICON"> + + + + Date: Thu, 27 Feb 2020 14:18:48 +0300 Subject: [PATCH 09/23] edit home last login way --- .../confirm-login/confirm-login.component.ts | 25 +++++++++++-------- .../ui/welcome-login/welcome.component.ts | 8 +++--- Mohem/src/theme/styles.scss | 14 +++++------ 3 files changed, 26 insertions(+), 21 deletions(-) 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 5c2853a9..a7f708bf 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -634,23 +634,26 @@ export class ConfirmLoginComponent implements OnInit { // this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); - let request = new GetLoginInfoRequest(); + let request ={ + DeviceType: this.cs.getDeviceType(), - this.authService.setPublicFields(request); + DeviceToken:this.deviceToken - request.MobileNumber = this.loginData.MobileNumber; + } ; - request.P_USER_NAME=this.loginData.P_USER_NAME; + // this.authService.setPublicFields(request); - request.UserName=this.loginData.P_USER_NAME; + // request.MobileNumber = this.loginData.MobileNumber; - request.LogInTokenID =this.loginData.LogInTokenID; + // request.P_USER_NAME=this.loginData.P_USER_NAME; - request.CompanyID =1;//cs=1 , HMG=2 + // request.UserName=this.loginData.P_USER_NAME; - request.DeviceType= this.cs.getDeviceType(); + // request.LogInTokenID =this.loginData.LogInTokenID; - request.DeviceToken=this.deviceToken; + // request.CompanyID =1;//cs=1 , HMG=2 + + @@ -668,7 +671,7 @@ export class ConfirmLoginComponent implements OnInit { - private getMobileInfo(request: GetLoginInfoRequest) { + private getMobileInfo(request: any) { console.log("2"); @@ -790,7 +793,7 @@ export class ConfirmLoginComponent implements OnInit { request.DeviceType= this.cs.getDeviceType(); - request.DeviceToken="5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; + request.DeviceToken=this.deviceToken;//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36";//this.deviceToken; //request.TokenID= diff --git a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts index cd19d7f9..31d50324 100644 --- a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts +++ b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts @@ -87,7 +87,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { false ); - + console.log( this.user); this.userName = localStorage.getItem("user"); this.password = localStorage.getItem("password"); @@ -96,6 +96,8 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { this.logintype= localStorage.getItem("login-type"); this.lastLoginDate= localStorage.getItem("login-at"); + + // this.lastLoginDate= new Date(this.lastLoginDate).toISOString() @@ -185,7 +187,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { console.log(this.confimLogin.buttons[0]); this.confimLogin.buttons[0].forEach(element => { - if (this.logintype === element.value) { + if (this.user.LoginType === element.value) { console.log(this.logintype ); console.log(element.value); console.log("this.logintype === element.value"); @@ -199,7 +201,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { }); } - }, 200); + }, 100); } public moreLoginOptions() {} diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c0626ee3..c3380444 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1022,10 +1022,10 @@ color: var(--dark); } .checkOutOkBtn{ - /* margin-left: 50px !important; */ - /* margin-right: 55px !important; */ + margin-left: 50px !important; + margin-right: 55px !important; margin-top: 10px !important; - /* margin-bottom: 10px !important; */ + margin-bottom: 10px !important; border-radius: 5px !important; height: 40px !important; min-height: 40px !important; @@ -1042,10 +1042,10 @@ color: var(--dark); } .checkOutCancelBtn{ - /* margin-left: 55px !important; */ - /* margin-right: 55px !important; */ - /* margin-top: 10px !important; */ - /* margin-bottom: 10px !important; */ + margin-left: 50px !important; + margin-right: 55px !important; + margin-top: 10px !important; + margin-bottom: 10px !important; border-radius: 5px !important; height: 40px !important; min-height: 40px !important; From 4a0ca75f6d4f72ad770510b692ef30cbed216ad0 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Sun, 1 Mar 2020 11:24:40 +0300 Subject: [PATCH 10/23] fix login --- Mohem/src/app/app.component.ts | 1 + .../src/app/authentication/login/login.component.ts | 6 +++--- .../src/app/authentication/sms-page/sms-page.page.ts | 12 +++++++++--- Mohem/src/app/home/home.page.ts | 2 ++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 7378cfea..01c88780 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -60,6 +60,7 @@ export class AppComponent implements OnInit, AfterViewInit { ngAfterViewInit() {} initializeApp() { this.start = false; + this.menu.enable(false) this.lazyLoadingService.monitorLazyLoading(15, true); this.platform.ready().then(() => { this.ts.loadResources(() => { diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 244012bc..7442330d 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -237,12 +237,12 @@ export class LoginComponent implements OnInit, OnDestroy { console.log("success"); this.cs.stopLoading(); if (this.cs.validResponse(result)) { - // alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList.EMPLOYEE_NAME); + // alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME); this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER; this.loginData.P_USER_NAME = this.username; - // this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME; + // this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME; this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.remeberMyInfo(); @@ -325,7 +325,7 @@ export class LoginComponent implements OnInit, OnDestroy { console.log(result); this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.P_USER_NAME = this.username; - this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME; + // this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME; this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts index eb7895b3..20a94df0 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -496,9 +496,13 @@ console.log("successful insertMobileLogin" ); const key = e.which; const t = e.target; let sib = t.nextElementSibling; + let sibPre =t.previousElementSibling; if (key !== 9 && (key < 48 || key > 57)) { if (key === 8 || key === 46) { + + + return true; } else { e.preventDefault(); @@ -509,11 +513,13 @@ console.log("successful insertMobileLogin" ); if (key === 9) { return true; } - if (sib) { //sib = document.querySelector('input'); - if (e.target.value) { + if (e.target.value ==="") { + sibPre.setFocus()} + else{ sib.setFocus(); + } } } // } else { @@ -523,6 +529,6 @@ console.log("successful insertMobileLogin" ); - } + } \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 77e17c73..442a55fd 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -172,6 +172,8 @@ export class HomePage implements OnInit { } ngOnInit() { + this.menu.enable(true) + // this.getUserDetails(); // this.getCount(); // this.events.subscribe('getNotCount', badge => { From 8f9ef27ee153dac57ed430e65bb52d2e1e9f8c55 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Mon, 2 Mar 2020 09:58:36 +0300 Subject: [PATCH 11/23] add my team to side menu & handle accural balance in absence page --- Mohem/src/app/absence/home/home.component.ts | 10 ++++++---- Mohem/src/app/app.component.html | 9 +++++++++ Mohem/src/app/app.component.ts | 14 +++++++++++++- Mohem/src/app/home/home.page.html | 7 ------- Mohem/src/app/home/home.page.ts | 12 +++++++++--- Mohem/src/assets/imgs/my_team_icon.png | Bin 0 -> 470 bytes Mohem/src/assets/localization/i18n.json | 4 ++-- 7 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 Mohem/src/assets/imgs/my_team_icon.png diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index 398820e9..05b25d8b 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -55,7 +55,9 @@ export class HomeComponent implements OnInit { public absService: AbsenceListService, public accrualService: AccrualService, public authService: AuthenticationService - ) {} + ) { + // this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false); + } ngOnInit() { @@ -66,8 +68,8 @@ export class HomeComponent implements OnInit { private getUserDetails(){ this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { if (user) { - this.emp_no=user.EMPLOYEE_NUMBER; - this.getAccrualBalance(); + // this.emp_no=user.EMPLOYEE_NUMBER; + // this.getAccrualBalance(); } }); @@ -236,7 +238,7 @@ createAbsence() { let todayDate = month + '/' + day + '/' + year; let effectiveDate = todayDate; const request = { - P_SELECTED_EMPLOYEE_NUMBER: this.emp_no, + P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, P_EFFECTIVE_DATE: effectiveDate }; diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 4a975deb..42371b1a 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -114,6 +114,15 @@ --> + + + + + + + {{ts.trPK('myTeam','myTeam-header')}} + + - - - - -
-
-
-

{{percentage}}

- Completed



+ + + + + + +
+
+
+

{{percentage}}

+ Completed



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

{{nameDay}}

+
+ +

{{day}}

+
-

{{nameDay}}

-
+

{{nameMonth}}

+ -

{{day}}

-
- -

{{nameMonth}}

-
- -

{{year}}

-
- -

{{ts.trPK('attendance','present')}}

-
-
-
- - - -
- +

{{year}}

+ + +

{{ts.trPK('attendance','present')}}

+
+
+ + - +

{{shiftTime}}

{{ts.trPK('attendance-tracking','shift-time')}}

- + +

{{scheduled}}

{{ts.trPK('attendance-tracking','regular')}}

-
- - + + +

{{startDate}}

{{ts.trPK('attendance-tracking','check-in')}}

- + + +

{{endDate}}

{{ts.trPK('attendance-tracking','check-out')}}

-
- - + +

{{lateIn}}

{{ts.trPK('attendance-tracking','late-in')}}

- + +

{{excess}}

{{ts.trPK('attendance-tracking','excess')}}

-
- - + +

{{shortage}}

{{ts.trPK('attendance-tracking','shortage')}}

- + +

{{earlyOut}}

{{ts.trPK('attendance-tracking','early-out')}}

- -
- - - + + + + diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss index 53ea08a2..10600f8b 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss @@ -1,54 +1,23 @@ .result-text-container { - - // padding: 0; - - // margin: 0; - - // position: absolute; - - // left: 50%; - - // top: 50%; - - // display: block; - - // text-align: center; - - // transform: translate(-50%, -50%); -//////////////////////////here padding: 0; margin: 0; position: absolute; - left: 58%; - top: 67%; + left: 42%; + top: 60%; display: block; text-align: center; - -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); - h2 { - font-size: 25px; - - // font-family: WorkSans-Bold; font-weight: bold; - margin: 0 auto; - line-height: 36px; - } - span { - width: 125px; - display: block; - margin: 0 auto; - font-size: 12px; - font-family: workSans-Regular; color: rgb(163, 163, 163) !important; } @@ -57,20 +26,26 @@ .today-graph{ display: block; height: 127px; - width: 288px; + width: 270px; + margin-left: -60px; } .amountlabel{ - color: black !important; - font-weight: bold !important; - font-size: 13px !important; -// border-top: 1px solid rgb(163, 163, 163) !important; - margin-left: 0px !important; - margin-bottom: -29px !important; + color: black !important; + font-weight: bold !important; + font-size: 13px !important; + margin-bottom: -29px !important; + width: 100%; + display: block; + text-align: center; } .rowlabel{ -color: rgb(163, 163, 163) !important; -font-size: 13px !important; -font-family: WorkSans-Bold; + color: #a3a3a3 !important; + font-size: 13px !important; + font-family: WorkSans-Bold; + display: block; + width: 100%; + text-align: center; + padding: 1px; } .grid{ padding-bottom: -20px !important; @@ -95,18 +70,9 @@ height: 360px !important; } .div{ - // border: 1px solid #a3a3a3 !important; - // text-align: center; - // width: 274%; - // border-radius: 8%; - // height: 40%; - // margin-right: -11px; border: 1px solid #a3a3a3 !important; - border-radius: 9px; - width: 241%; - margin-right: -226px; - - + border-radius: 10px; + margin-bottom:10px; } .p0{ margin-bottom: -13px !important; @@ -128,22 +94,28 @@ height: 360px !important; display: block; width: 100%; } - .p2{ font-weight: bold !important; + .p2{ + font-weight: bold !important; font-size: 17px !important; margin-bottom: 43px !important; margin-top: 0px !important; color: black !important; font-weight: bold !important; - margin-left: 33px; - } - .p3{ /* margin-bottom: -72px !important; */ + text-align: center; + display: block; + width: 100%; + } + .p3{ color: black !important; font-weight: bold !important; font-size: 19px; margin-top: -43px; - margin-left: 27px; + text-align: center; + display: block; + width: 100%; } - .p4{ margin-bottom: 56px !important; + .p4{ + margin-bottom: 56px !important; margin-top: -26px !important; color: black !important; } @@ -158,23 +130,7 @@ height: 360px !important; height: 21px; width: 110px; padding-top: 7px; - /* font-family: WorkSans-Bold !important; */ padding-bottom: 21px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; - } - // .less{ background-color: #22C6B3; - // background-color: #22C6B3; - // border: none; - // color: white; - // text-align: center; - // text-decoration: none; - // display: inline-block; - // font-size: 12px; - // border-radius: 30px; - // height: 26px; - // padding: 6px 24px; - // margin-left: 123px; - // /* margin-top: -19px; */ - // margin-bottom: 17px; - // } \ No newline at end of file + } \ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts index 001b4b25..1cc15754 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.ts @@ -98,7 +98,7 @@ export class DateInfoModalComponent implements OnInit { slideChanged(ev) { this.slides.getActiveIndex().then(index => { - const shiftDetails = this.SHIFTDETAILS[index]; + const shiftDetails = this.SHIFTDETAILS.GetScheduleShiftsDetailsList[index]; this.assignData(shiftDetails); }); } diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index bf839752..ae4acf22 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -132,12 +132,7 @@ export class DetailsComponent implements OnInit { this.currentDate = new Date(); this.showData = false; this.nextMonth = new Date().getMonth() + 2; - this.preMonth = new Date().getMonth() - 2; - if (this.preMonth < 0) { - this.preMonth = this.preMonth * - 1; - } else { - this.preMonth = this.preMonth * - 1; - } + this.preMonth = new Date().getMonth(); this.calendarConfig(this.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear()); } @@ -210,6 +205,7 @@ export class DetailsComponent implements OnInit { } + changeMonthTitle(title) { this.monthTitle = title; this.getTimeCardSummaryDetails(); diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts index 8383911a..7b2230aa 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts @@ -76,12 +76,7 @@ export class TimeCardDetailsComponent implements OnInit { ngOnInit() { this.showData = false; this.nextMonth = new Date().getMonth() + 2; - this.preMonth = new Date().getMonth() - 2; - if (this.preMonth < 0) { - this.preMonth = this.preMonth * - 1; - } else { - this.preMonth = this.preMonth * - 1; - } + this.preMonth = new Date().getMonth(); this.calendarConfig(this.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear()); } @@ -218,7 +213,6 @@ export class TimeCardDetailsComponent implements OnInit { }); } - nextSlide() { this.normalDays = []; if (this.currentMonthName !== this.month) { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c3380444..1e791c08 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1284,12 +1284,9 @@ border:0px } .calendar-modal { - --height: 15cm !important; + --height: 13cm !important; --width: 88% !important; --border-radius: 0.4cm; - - // height: 544px !important; - // width: 332px !important; } From d26cea9024c0cdb53e3ebfa3a3486d8a3865ba19 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Mon, 2 Mar 2020 18:08:33 +0300 Subject: [PATCH 13/23] fixed attendance and calendar issues --- .../circle-calendar.component.ts | 29 ++++---- .../date-info-modal.component.scss | 2 +- .../employee-information.component.html | 6 +- .../employee-information.component.ts | 9 ++- .../my-team/details/details.component.html | 8 +-- .../app/my-team/details/details.component.ts | 66 ++++++------------- .../src/app/my-team/home/home.component.html | 2 +- .../time-card-details.component.html | 4 -- .../time-card-details.component.ts | 65 ++++++------------ Mohem/src/theme/styles.scss | 7 +- 10 files changed, 77 insertions(+), 121 deletions(-) diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts b/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts index c664d3dc..842cbd83 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts @@ -17,11 +17,6 @@ import { GetSwipesRequest } from 'src/app/time-card/service/models/get-swipes-re styleUrls: ['./circle-calendar.component.scss'] }) export class CircleCalendarComponent implements OnInit { - - @Input() eventsdateDayOff: any = []; - @Input() eventsdateAttend: any = []; - @Input() eventsdateAbsent: any = []; - @Input() normalDays: any = []; @Input() dayHoursTypeDetailsList: any = []; @Input() currentDateParent: string; @Output() monthTitle = new EventEmitter(); @@ -86,10 +81,7 @@ export class CircleCalendarComponent implements OnInit { } reRenderCalendar() { - this.renderDate(this.eventsdateAbsent, 'absent'); - this.renderDate(this.eventsdateAttend, 'present'); - this.renderDate(this.eventsdateDayOff, 'dayoff'); - this.renderDate(this.normalDays, 'scheduleDay'); + this.renderDate(this.dayHoursTypeDetailsList); } public async dateModal(shiftDetails) { @@ -106,14 +98,23 @@ export class CircleCalendarComponent implements OnInit { await modal.present(); } - public renderDate(arrayDays, cssClass) { + public renderDate(arrayDays) { const td = document.querySelectorAll('.swiper-slide-active .monthview-datetable td:not(.text-muted)'); arrayDays.forEach(dateObj => { - const date = dateObj.startTime; + const date = dateObj.customScheduleDate; td.forEach(element => { // tslint:disable-next-line: triple-equals - if (date.getDate() == element.textContent.trim()) { - element.classList.add(cssClass); + if (date.getDate() == element.textContent.trim() && dateObj.customPresent === true) { + element.classList.add('present'); + // tslint:disable-next-line: triple-equals + } else if (date.getDate() == element.textContent.trim() && dateObj.customAbsent === true) { + element.classList.add('absent'); + // tslint:disable-next-line: triple-equals + } else if (date.getDate() == element.textContent.trim() && dateObj.customDaysOff === true) { + element.classList.add('dayoff'); + // tslint:disable-next-line: triple-equals + } else if (date.getDate() == element.textContent.trim() && dateObj.customSchedule === true) { + element.classList.add('scheduleDay'); } }); }); @@ -124,7 +125,7 @@ export class CircleCalendarComponent implements OnInit { console.log(event.selectedTime.getDate()); const selectedIndex = event.selectedTime.getDate(); this.selectedIndexData = this.dayHoursTypeDetailsList[selectedIndex - 1]; - if (this.selectedIndexData.present) { + if (this.selectedIndexData.customPresent) { const rtpID = this.selectedIndexData.RTP_ID; this.getScheduleShiftDetails(rtpID); } diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss index 10600f8b..7f648459 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss @@ -78,7 +78,7 @@ height: 360px !important; margin-bottom: -13px !important; color: black !important; font-weight: bold !important; - font-size: 15px !important; + font-size: 14px !important; margin-top: 8px; text-align: center; display: block; diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html index f3099eaa..a90e4704 100644 --- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html +++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.html @@ -1,6 +1,6 @@
- +
Team Member Image @@ -9,11 +9,11 @@
- +

{{name}}

{{title}}
- +
diff --git a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts index 47d44bb7..47fe4440 100644 --- a/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts +++ b/Mohem/src/app/hmg-common/ui/employee-information/employee-information.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; @Component({ selector: 'app-employee-information', @@ -12,10 +12,15 @@ export class EmployeeInformationComponent implements OnInit { @Input() title: string; @Input() employeeImage: string; @Input() employeePhoneNumber: string; - + // tslint:disable-next-line: no-output-on-prefix + @Output() onGetDetails = new EventEmitter(); constructor() { } ngOnInit() {} + getDetails() { + this.onGetDetails.emit(); + } + } diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index 3e0c7759..af154d2f 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -23,7 +23,7 @@
- + Call @@ -174,12 +174,8 @@
{{ts.trPK('attendance','monthly-attendance-calendar')}} @@ -223,7 +219,7 @@ [title]="subordinate.POSITION_NAME" [employeeImage]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" [employeePhoneNumber]="subordinate.EMPLOYEE_MOBILE_NUMBER" - (click)="getDetails(i)"> + (onGetDetails)="getDetails(i)"> diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index ae4acf22..a5e58229 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -54,10 +54,6 @@ export class DetailsComponent implements OnInit { public attendedDays: number; public futrueDays = 0; public totalAttendancePrecentage = 0; - public arrDaysAttendance: any = []; - public arrDaysAbsent: any = []; - public arrDaysOff: any = []; - public normalDays: any = []; public monthTitle: string = moment().format('MMMM'); public yearTitle: string; public activeMonth: any; @@ -120,7 +116,6 @@ export class DetailsComponent implements OnInit { public segmentChanged(event: any) { this.activeSegment = event.detail.value; if (this.activeSegment === 'Attendance') { - this.normalDays = []; this.initAttendance(); } } @@ -137,9 +132,6 @@ export class DetailsComponent implements OnInit { } calendarConfig(month?, year?) { - this.arrDaysOff = []; - this.arrDaysAttendance = []; - this.arrDaysAbsent = []; this.month = month; this.year = year; this.getTimeCardSummaryDetails(month, year); @@ -169,14 +161,12 @@ export class DetailsComponent implements OnInit { console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); this.countAllAttendDays(result.GetDayHoursTypeDetailsList); - this.dayHoursTypeDetailsList = result.GetDayHoursTypeDetailsList; } }); } nextSlide() { - this.normalDays = []; if (this.currentMonthName !== this.month) { this.showData = false; if (this.nextMonth > 12) { @@ -191,7 +181,6 @@ export class DetailsComponent implements OnInit { } previousSlide() { - this.normalDays = []; this.showData = false; if (this.preMonth === 0) { this.currentYear = this.currentYear - 1; @@ -219,48 +208,35 @@ export class DetailsComponent implements OnInit { for (let i = 0; i < allDays.length; i++) { // tslint:disable-next-line: triple-equals if (allDays[i].ATTENDED_FLAG == 'Y') { - allDays[i].present = true; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAttendance.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = true; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') { - allDays[i].present = false; - allDays[i].absent = true; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAbsent.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE), - isoTime: '09:00:00', - allDay: false - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = true; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = true; - allDays[i].schedule = false; - this.arrDaysOff.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = true; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } else { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = true; - this.normalDays.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = true; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } } this.showData = true; + this.dayHoursTypeDetailsList = allDays; } public getTimeCardSummaryDetails(month?, year?) { diff --git a/Mohem/src/app/my-team/home/home.component.html b/Mohem/src/app/my-team/home/home.component.html index 1a297ab0..76a56be7 100644 --- a/Mohem/src/app/my-team/home/home.component.html +++ b/Mohem/src/app/my-team/home/home.component.html @@ -69,7 +69,7 @@ [title]="subordinate.POSITION_NAME" [employeeImage]="subordinate.EMPLOYEE_IMAGE ? 'data:image/png;base64,'+subordinate.EMPLOYEE_IMAGE : '../assets/imgs/profile.png'" [employeePhoneNumber]="subordinate.EMPLOYEE_MOBILE_NUMBER" - (click)="getDetails(i)"> + (onGetDetails)="getDetails(i)"> diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.html b/Mohem/src/app/time-card/time-card-details/time-card-details.component.html index d2f9d80d..9eb7fe15 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.html +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.html @@ -84,12 +84,8 @@
{{ts.trPK('attendance','monthly-attendance-calendar')}} diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts index 7b2230aa..377dfbd3 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts @@ -53,9 +53,6 @@ export class TimeCardDetailsComponent implements OnInit { public attendedDays: number; public futrueDays = 0; public totalAttendancePrecentage = 0; - public arrDaysAttendance: any = []; - public arrDaysAbsent: any = []; - public arrDaysOff: any = []; public monthTitle: string = moment().format('MMMM'); public yearTitle: string; public isChange = false; @@ -64,7 +61,6 @@ export class TimeCardDetailsComponent implements OnInit { public showData = false; public currentYear = new Date().getFullYear(); public dayHoursTypeDetailsList = []; - public normalDays: any = []; public currentDate = new Date(); public options = { cutoutPercentage: 80, @@ -81,9 +77,6 @@ export class TimeCardDetailsComponent implements OnInit { } calendarConfig(month?, year?) { - this.arrDaysOff = []; - this.arrDaysAttendance = []; - this.arrDaysAbsent = []; this.month = month; this.year = year; this.getTimeCardSummaryDetails(month, year); @@ -113,7 +106,6 @@ export class TimeCardDetailsComponent implements OnInit { console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); this.countAllAttendDays(result.GetDayHoursTypeDetailsList); - this.dayHoursTypeDetailsList = result.GetDayHoursTypeDetailsList; } }); @@ -124,48 +116,35 @@ export class TimeCardDetailsComponent implements OnInit { for (let i = 0; i < allDays.length; i++) { // tslint:disable-next-line: triple-equals if (allDays[i].ATTENDED_FLAG == 'Y') { - allDays[i].present = true; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAttendance.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = true; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') { - allDays[i].present = false; - allDays[i].absent = true; - allDays[i].daysOff = false; - allDays[i].schedule = false; - this.arrDaysAbsent.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE), - isoTime: '09:00:00', - allDay: false - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = true; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = true; - allDays[i].schedule = false; - this.arrDaysOff.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = true; + allDays[i].customSchedule = false; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } else { - allDays[i].present = false; - allDays[i].absent = false; - allDays[i].daysOff = false; - allDays[i].schedule = true; - this.normalDays.push({ - startTime: new Date(allDays[i].SCHEDULE_DATE), - endTime: new Date(allDays[i].SCHEDULE_DATE) - }); + allDays[i].customPresent = false; + allDays[i].customAbsent = false; + allDays[i].customDaysOff = false; + allDays[i].customSchedule = true; + allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); } } this.showData = true; + this.dayHoursTypeDetailsList = allDays; } public getTimeCardSummaryDetails(month?, year?) { @@ -214,7 +193,6 @@ export class TimeCardDetailsComponent implements OnInit { } nextSlide() { - this.normalDays = []; if (this.currentMonthName !== this.month) { this.showData = false; if (this.nextMonth > 12) { @@ -229,7 +207,6 @@ export class TimeCardDetailsComponent implements OnInit { } previousSlide() { - this.normalDays = []; this.showData = false; if (this.preMonth === 0) { this.currentYear = this.currentYear - 1; diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 1e791c08..b2768650 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1284,7 +1284,7 @@ border:0px } .calendar-modal { - --height: 13cm !important; + --height: 13.5cm !important; --width: 88% !important; --border-radius: 0.4cm; } @@ -1409,6 +1409,11 @@ table.monthview-datetable th small { border-radius: 20px !important; } +.disable-phone { + pointer-events: none; + opacity: .3; +} + // .replaceRoll-modal { // padding: 30% 1% !important; From f00e63f49dabd821dd32d440f9aa0d14c9218c7c Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Tue, 3 Mar 2020 15:50:22 +0300 Subject: [PATCH 14/23] remove image from confirmlogin and sms --- .../confirm-login/confirm-login.component.html | 4 ++-- Mohem/src/app/authentication/login/login.component.html | 6 +++--- Mohem/src/app/authentication/sms-page/sms-page.page.html | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.html b/Mohem/src/app/authentication/confirm-login/confirm-login.component.html index 931f7349..5ab6a2b0 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.html +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.html @@ -13,11 +13,11 @@ [ngClass]="{'content-class':accessFromOutSide, 'ion-padding': !accessFromOutSide}" has-bouncing="false" forceOverscroll="false" scrollY="false" class="ion-no-padding"> - + + - + --> diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.html b/Mohem/src/app/authentication/sms-page/sms-page.page.html index 725130e9..f2811d6a 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.html +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.html @@ -9,13 +9,13 @@ - + + - + -->

From 8d1ad091e937e84d849039b745576f1479ab41e2 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Wed, 4 Mar 2020 08:45:57 +0300 Subject: [PATCH 15/23] add image and fix text and chaneg the BG color for any page did not have data --- Mohem/src/app/absence/home/home.component.html | 4 ++-- .../src/app/eit/eit-list/eit-list.component.html | 12 ++++++------ Mohem/src/app/home/home.page.ts | 8 ++++---- Mohem/src/assets/imgs/box.png | Bin 0 -> 9470 bytes Mohem/src/assets/localization/i18n.json | 2 +- Mohem/src/imgs/box.png | Bin 0 -> 9470 bytes Mohem/src/theme/styles.scss | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 Mohem/src/assets/imgs/box.png create mode 100644 Mohem/src/imgs/box.png diff --git a/Mohem/src/app/absence/home/home.component.html b/Mohem/src/app/absence/home/home.component.html index 86fd1dcc..07feaeaf 100644 --- a/Mohem/src/app/absence/home/home.component.html +++ b/Mohem/src/app/absence/home/home.component.html @@ -13,7 +13,7 @@ - +
@@ -148,7 +148,7 @@
- + diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.html b/Mohem/src/app/eit/eit-list/eit-list.component.html index b442044d..36b2b14c 100644 --- a/Mohem/src/app/eit/eit-list/eit-list.component.html +++ b/Mohem/src/app/eit/eit-list/eit-list.component.html @@ -5,7 +5,7 @@ - +
@@ -157,7 +157,7 @@ *ngIf="!getResEITTransactionList || getResEITTransactionList[0]?.Collection_Transaction.length <= 0"> - +

{{'general, noData' | translate}}

@@ -228,12 +228,12 @@
- -
+ -
+ \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 02bde739..9fcfad65 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -542,7 +542,7 @@ export class HomePage implements OnInit { (result: OpenMissingSwipesResponse) => { if (this.common.validResponse(result)) { const key = "GetOpenMissingSwipesList"; - this.statsButtons[1].statsValue = result[key].P_OPEN_MISSING_SWIPES; + this.statsButtons[1].statsValue = Math.ceil(result[key].P_OPEN_MISSING_SWIPES); } } ); @@ -613,7 +613,7 @@ openPeriodDateDashbored() { ITGCountAllNotification() { this.workListService.getITGDetails().subscribe((result: any) => { this.statsButtons[0].statsValue = - this.countAllNotification + result.TotalCount; + Math.ceil(this.countAllNotification + result.TotalCount); }); } @@ -693,7 +693,7 @@ getSubordinatesAttStatus() { "HMG Annual Vacation Accrual Plan" ) { this.statsButtons[2].statsValue = - accrualBalance.ACCRUAL_NET_ENTITLEMENT; + Math.ceil(accrualBalance.ACCRUAL_NET_ENTITLEMENT); this.common.sharedService.setSharedData( accrualBalance, "leaveAccrualBalance" @@ -711,7 +711,7 @@ getSubordinatesAttStatus() { totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; } } - this.statsButtons[3].statsValue = totalTicketsLeft; + this.statsButtons[3].statsValue = Math.ceil(totalTicketsLeft); } }); } diff --git a/Mohem/src/assets/imgs/box.png b/Mohem/src/assets/imgs/box.png new file mode 100644 index 0000000000000000000000000000000000000000..a34ee59df1856409ffefb0d4670bea7106c0e9f3 GIT binary patch literal 9470 zcmVPx#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR91exL&Y z1ONa40RR91cmMzZ0E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hPK^}*f7Vx(kL=;m QeE Date: Wed, 4 Mar 2020 14:31:15 +0300 Subject: [PATCH 16/23] edit payment info & employee profile update --- Mohem/src/app/app.component.ts | 5 +++++ Mohem/src/app/home/home.page.ts | 4 ++++ Mohem/src/app/payslip/home/home.component.html | 12 +++++++----- Mohem/src/app/payslip/home/home.component.ts | 2 +- .../edit-profile/edit-profile.component.ts | 17 ++++++++++++----- Mohem/src/app/profile/home/home.component.ts | 3 +-- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 9cdfc021..2c882ac2 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -57,6 +57,7 @@ export class AppComponent implements OnInit, AfterViewInit { ngOnInit() { this.initializeApp(); + } ngAfterViewInit() {} initializeApp() { @@ -94,9 +95,13 @@ export class AppComponent implements OnInit, AfterViewInit { ? user.CompanyImageDescription : "Powered By Cloud Solutions"; this.User_name_Emp = user.EMPLOYEE_DISPLAY_NAME; + if(this.cs.getUpdateImage().status){ + this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + }else{ this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE : "../assets/imgs/profile.png"; + } this.User_Job_name=user.JOB_NAME; console.log(user); diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 02bde739..64d54133 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -320,9 +320,13 @@ export class HomePage implements OnInit { this.userData, AuthenticatedUser.SHARED_DATA ); + if(this.common.getUpdateImage().status){ + this.userImage =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.common.getUpdateImage().img); + }else{ this.userImage = user.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.userImage; + } this.callDashboardServices(); } else { console.log(user); diff --git a/Mohem/src/app/payslip/home/home.component.html b/Mohem/src/app/payslip/home/home.component.html index 142a36a5..cb9a57a0 100644 --- a/Mohem/src/app/payslip/home/home.component.html +++ b/Mohem/src/app/payslip/home/home.component.html @@ -257,6 +257,7 @@
{{ts.trPK('payslip','payment-information')}}
+
@@ -265,7 +266,7 @@ - + @@ -276,7 +277,7 @@ - + @@ -285,7 +286,7 @@ - + @@ -297,7 +298,7 @@ - + @@ -306,10 +307,11 @@ - +
+
\ No newline at end of file diff --git a/Mohem/src/app/payslip/home/home.component.ts b/Mohem/src/app/payslip/home/home.component.ts index 7fd9b363..8f826d99 100644 --- a/Mohem/src/app/payslip/home/home.component.ts +++ b/Mohem/src/app/payslip/home/home.component.ts @@ -257,7 +257,7 @@ getPaymentInfo(ActionContextID){ handleGetPaymentInfoResult(result){ if (result.GetPaymentInformationList != null) { - this.GetPaymentInformationList = result.GetPaymentInformationList[0]; + this.GetPaymentInformationList = result.GetPaymentInformationList; } } diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts index 58c888f3..61b0d210 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -7,6 +7,7 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { DomSanitizer } from '@angular/platform-browser'; // import { DomSanitizer } from '@angular/platform-browser'; @@ -35,17 +36,19 @@ export class EditProfileComponent implements OnInit { public cs: CommonService, public authService: AuthenticationService, public DS :DashboredService, - public sharedData: SharedDataService + public sharedData: SharedDataService, + public events: Events, + private sanitizer: DomSanitizer, // private events: Events, // private sanitizer: DomSanitizer, ) { - // this.events.subscribe("img-change", displayImg => { - // console.log("app compont: "+displayImg); - // this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + this.events.subscribe("img-change", displayImg => { + console.log("app compont: "+displayImg); + this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); - // }); + }); } @@ -63,9 +66,13 @@ export class EditProfileComponent implements OnInit { this.personalInfo = user; this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME; this.User_Job_name=this.personalInfo.JOB_NAME; + if(this.cs.getUpdateImage().status){ + this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + }else{ this.user_image = user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE : "../assets/imgs/profile.png"; + } console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); console.log("user name: "+ user.EMPLOYEE_NAME); console.log("name: "+ this.personalInfo.JOB_NAME); diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 2e192b1f..25192f94 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -51,8 +51,7 @@ export class HomeComponent implements OnInit { if(this.cs.getUpdateImage().status){ // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); - this.imageSrc = "data:image/png;base64,"+this.cs.getUpdateImage().img; - // alert("this.imageSrc"+ this.imageSrc); + this.imageSrc =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); }else{ this.imageSrc = user.EMPLOYEE_IMAGE ? "data:image/png;base64," + user.EMPLOYEE_IMAGE From 68357f35b25dc478a4dd32da743cf99b8ceec255 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 4 Mar 2020 18:02:14 +0300 Subject: [PATCH 17/23] fixed worklist flow --- .../home/home.component.html | 10 +- .../ui/card-filter/card-filter.component.html | 2 +- .../app/notification/home/home.component.html | 46 +++--- .../app/notification/home/home.component.scss | 7 +- .../app/notification/home/home.component.ts | 143 ++++++++++++------ Mohem/src/theme/styles.scss | 6 +- 6 files changed, 140 insertions(+), 74 deletions(-) diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html index 48d2c99c..1a4ae913 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.html +++ b/Mohem/src/app/attendance-tracking/home/home.component.html @@ -67,19 +67,19 @@ {{ts.trPK('attendance-tracking','check-in')}} - 08:00 + {{attendanceTrackingList.P_SWIPE_IN | slice:0:-3}} - + {{ts.trPK('attendance-tracking','check-out')}} - 08:00 + {{attendanceTrackingList.P_SWIPE_OUT | slice:0:-3}} {{ts.trPK('attendance-tracking','late-in')}} - 08:00 + {{attendanceTrackingList.P_LATE_IN_HOURS | slice:0:-3}} - + {{ts.trPK('attendance-tracking','regular')}} {{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} diff --git a/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html index fb3f1a49..3865efe3 100644 --- a/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html +++ b/Mohem/src/app/hmg-common/ui/card-filter/card-filter.component.html @@ -1,5 +1,5 @@
- {{value}} + {{value}} {{text}}
diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 3a4e61fb..37797f78 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -14,11 +14,16 @@
Open Request Analysis
-
-

{{totalRequestCount}}

+
+ {{newWorkListResponse.length + ITGCount}} of + {{newWorkListResponse.length}} of +

{{totalRequestCount}}

+

{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}

+

{{newWorkListResponse[0].NO_OF_ROWS}}

TOTAL
OPEN REQUEST
- + +
@@ -61,32 +66,35 @@
-
-
- {{data.key}} -
+
+
+
+ {{formattedData.date}} +

{{workList.SUBJECT}}

-
- +
-
-
- {{segmentInfo.ModifiedDate |date}} -
-

{{segmentInfo.Title}}

+
+
+ {{segmentInfo.ModifiedDate |date}} +
+

{{segmentInfo.Title}}

+
-
+
+ +
+ No Data Available +
+ -
- No Data Available -
- + diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index 19ac087d..9c0e235d 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -333,6 +333,8 @@ ion-content { margin-top: 15px; display: block; padding: 0 20px; + position: relative; + z-index: 99; ion-col{ background: white; border-radius: 12px; @@ -382,9 +384,8 @@ ion-content { font-family: WorkSans-Regular; padding: 30px; position: absolute; - left: 50%; - margin-left: -100px; - margin-top: 100px; + left: 85px; + top: 50px; } .disable-filter { pointer-events: none; diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 7b9e3d72..ed68d94e 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -58,10 +58,18 @@ export class HomeComponent implements OnInit { public worklistNotifications: any; public totalRequestCount = 0; public newWorkListResponse = []; - public showFormattedData = {}; + public showFormattedData = []; + public allFormattedData = []; public selectedFilter = 'ALL'; public showSearchButton = false; public itemType = ''; + + public totalHR = 0; + public totalPO = 0; + public totalPR = 0; + public totalMR = 0; + + public showChart = false; public options = { cutoutPercentage: 80, tooltips: { enabled: false }, @@ -153,11 +161,9 @@ export class HomeComponent implements OnInit { } ngOnInit() { - // this.direction = TranslatorService.getCurrentDirection(); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); this.Details(); this.Count(); - this.assignDataToFilters(); this.getAllPushNotificationFun(); this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; } @@ -165,42 +171,38 @@ export class HomeComponent implements OnInit { assignDataToFilters() { this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER; const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; + for (const notification of openNotificationsArray) { if (notification.ITEM_TYPE === 'HRSSA') { - this.filters[1].value = notification.OPEN_NTF_NUMBER; + this.filters[1].value = this.totalHR; this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'POAPPRV') { - this.filters[2].value = notification.OPEN_NTF_NUMBER; + this.filters[2].value = this.totalPO; this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'REQAPPRV') { - this.filters[3].value = notification.OPEN_NTF_NUMBER; + this.filters[3].value = this.totalPR; this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'INVMOA') { - this.filters[4].value = notification.OPEN_NTF_NUMBER; + this.filters[4].value = this.totalMR; 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; + } } - } + this.showChart = true; } - - activeFilter(index: number) { if (this.currentActiveIndex !== index) { - this.showFormattedData = {}; this.previousActiveIndex = this.currentActiveIndex; this.currentActiveIndex = index; this.filters[this.previousActiveIndex].active = false; this.filters[this.currentActiveIndex].active = true; - if (this.filters[this.currentActiveIndex].value !== 0) { - const selectedKey = this.filters[this.currentActiveIndex].key; - this.resetData(); - this.itemType = (selectedKey !== 'ITG' && selectedKey !== 'ALL') ? this.filters[this.currentActiveIndex].key : ''; - this.getAllPushNotificationFun(); - } this.selectedFilter = this.filters[this.currentActiveIndex].key; + if (this.selectedFilter !== 'ITG') { + this.getFilteredData(this.selectedFilter); + } } } @@ -230,13 +232,13 @@ export class HomeComponent implements OnInit { async openSearchModal() { const modal = await this.modalController.create({ component: WorklistAdvancedSearchComponent, - cssClass: 'advanced-search-modal', + cssClass: 'advanced-search-modal-custom', backdropDismiss: false, componentProps: {} }); modal.onDidDismiss().then(result => { if (result.data) { - if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') { + if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') { this.showSearchButton = true; this.itemType = result.data.itemType; this.notificationType = result.data.notificationType; @@ -245,7 +247,7 @@ export class HomeComponent implements OnInit { this.inputSearch = result.data.inputSearch; this.WorkListObj.P_PAGE_NUM = 1; this.newWorkListResponse = []; - this.showFormattedData = {}; + this.showFormattedData = []; this.selectedFilter = 'ALL'; this.filters[this.currentActiveIndex].active = false; this.currentActiveIndex = 0; @@ -268,7 +270,7 @@ export class HomeComponent implements OnInit { this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : ''; this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3') ? moment(this.inputDate).format('DD-MMM-YYYY') : ''; - this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; ; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : ''; this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1'; if (this.selectedValue === '5') { @@ -277,7 +279,6 @@ export class HomeComponent implements OnInit { this.WorkListObj.P_SEARCH_SENT_DATE = ''; this.WorkListObj.P_SEARCH_SUBJECT = ''; } - this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => { if (this.common.validResponse(result)) { this.handleWorkListResult(result.GetWorkList); @@ -286,24 +287,82 @@ export class HomeComponent implements OnInit { ); } - categorizeData(arrayToCategorize: any) { - const datePipe = new DatePipe('en-US'); - const formattedData = {}; - for (const workList of arrayToCategorize) { - workList.FORMATTED_DATE = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y'); - if (!(workList.FORMATTED_DATE in formattedData)) { - formattedData[workList.FORMATTED_DATE] = new Array(); - formattedData[workList.FORMATTED_DATE].push(workList); - } else { - formattedData[workList.FORMATTED_DATE].push(workList); + getFilteredData(filter: string) { + if (filter === 'ALL') { + this.showFormattedData = this.allFormattedData; + } else { + let arrayToFilter; + arrayToFilter = this.newWorkListResponse.filter((workList) => { + return workList.ITEM_TYPE === filter; + }); + this.showFormattedData = this.categorizeData(arrayToFilter); + } + } + + checkDateExistance(currentDate: any, formattedData: any) { + let existsBefore = false; + let index = 0; + for (let i = 0; i < formattedData.length; i++) { + if (formattedData[i].date === currentDate) { + existsBefore = true; + index = i; + break; } + } + return { + exists: existsBefore, + indexNumber: index + }; + } + + addCountInFilters(workList: any) { + if (workList.ITEM_TYPE === 'HRSSA') { + this.totalHR = this.totalHR + 1; + } else if (workList.ITEM_TYPE === 'POAPPRV') { + this.totalPO = this.totalPO + 1; + } else if (workList.ITEM_TYPE === 'REQAPPRV') { + this.totalPR = this.totalPR + 1; + } else if (workList.ITEM_TYPE === 'INVMOA') { + this.totalMR = this.totalMR + 1; + } + } + + categorizeData(arrayToCategorize: any) { + this.totalHR = 0; + this.totalPO = 0; + this.totalPR = 0; + this.totalMR = 0; + + const datePipe = new DatePipe('en-US'); + const formattedData = []; + for (const workList of arrayToCategorize) { + this.addCountInFilters(workList); + const currentDate = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y'); + const currentObject = { + date: '', + data: [] + }; + if (formattedData.length === 0) { + currentObject.date = currentDate; + currentObject.data.push(workList); + formattedData.push(currentObject); + } else { + const existsBefore = this.checkDateExistance(currentDate, formattedData); + if (existsBefore.exists) { + formattedData[existsBefore.indexNumber].data.push(workList); + } else { + currentObject.date = currentDate; + currentObject.data.push(workList); + formattedData.push(currentObject); + } + } } - return formattedData; + return formattedData; } sortArray(arrayToSort: any) { return arrayToSort.sort((a: any, b: any) => - new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime() + new Date(b.date).getTime() - new Date(a.date).getTime() ); } @@ -330,9 +389,10 @@ export class HomeComponent implements OnInit { } else { this.newWorkListResponse = this.newWorkListResponse.concat(result); } - this.newWorkListResponse = this.sortArray(this.newWorkListResponse); - console.log(this.newWorkListResponse); - this.showFormattedData = this.categorizeData(this.newWorkListResponse); + const categorizedWorkListResponse = this.categorizeData(this.newWorkListResponse); + this.assignDataToFilters(); + this.showFormattedData = this.sortArray(categorizedWorkListResponse); + this.allFormattedData = this.showFormattedData; this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); } else { this.newWorkListResponse = []; @@ -352,10 +412,6 @@ export class HomeComponent implements OnInit { } } - isEmptyObject() { - return (this.showFormattedData && (Object.keys(this.showFormattedData).length > 0) || this.ITGItem.length > 0); - } - resetData() { if (this.infiniteScroll) { this.infiniteScroll.complete(); @@ -366,7 +422,8 @@ export class HomeComponent implements OnInit { this.inputDate = ''; this.inputSearch = ''; this.newWorkListResponse = []; - this.showFormattedData = {}; + this.showFormattedData = []; + this.allFormattedData = []; this.WorkListObj.P_SEARCH_FROM_USER = ''; this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ''; this.WorkListObj.P_SEARCH_SENT_DATE = ''; @@ -413,13 +470,13 @@ export class HomeComponent implements OnInit { Details() { this.workListService.getITGDetails() .subscribe((result: any) => { + this.ITGCount = result.TotalCount; this.totalRequestCount = this.totalRequestCount + result.TotalCount; this.filters[5].value = result.TotalCount; }); } ITGNotification() { - // this.Details(); this.isAll = false; this.isPR = false; this.isPO = false; diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index c3380444..5a57f192 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1191,7 +1191,7 @@ border:0px // } .advanced-search-modal { - --height: 9cm !important; + --height: 12cm !important; --width: 88% !important; --border-radius: 0.6cm; } @@ -1277,8 +1277,8 @@ border:0px } -.advanced-search-modal { - --height: 12cm !important; +.advanced-search-modal-custom { + --height: 9cm !important; --width: 80% !important; --border-radius: 0.4cm; } From 5f24329ef9e5a2d2e486db99c29409398f349cda Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 5 Mar 2020 12:05:06 +0300 Subject: [PATCH 18/23] orienttion --- Mohem/config.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Mohem/config.xml b/Mohem/config.xml index 55d5ce3c..0943daff 100644 --- a/Mohem/config.xml +++ b/Mohem/config.xml @@ -20,6 +20,7 @@ + From 14e2654ae49b87587278a70dd3b7d886d7086728 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Thu, 5 Mar 2020 12:41:26 +0300 Subject: [PATCH 19/23] fix login --- Mohem/src/app/app.component.ts | 88 ++++++++++++++++++- .../authentication/login/login.component.ts | 73 ++++++++++++--- .../ui/welcome-login/welcome.component.ts | 2 +- Mohem/src/app/pipes/pipes.module.ts | 5 +- 4 files changed, 152 insertions(+), 16 deletions(-) diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 01c88780..fd62f41e 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -10,6 +10,9 @@ import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/mod import { PushService } from '../../src/app/hmg-common/services/push/push.service'; import { LazyLoadingService } from "./hmg-common/services/lazy-loading/lazy-loading.service"; import { DomSanitizer } from '@angular/platform-browser'; +// import { SplashScreen } from '@ionic-native/splash-screen'; +import { SplashScreen } from '@ionic-native/splash-screen/ngx'; + @Component({ selector: "app-root", @@ -29,10 +32,12 @@ export class AppComponent implements OnInit, AfterViewInit { companyDesc: string = "Powered By Cloud Solutions"; public direction = "ltr"; User_Job_name: string; + public logoutFlage: any =false; requestGetLoginInfo: { DeviceType: string; DeviceToken: string; //this.deviceToken }; user: boolean; + deviceToken: string; constructor( public ts: TranslatorService, private cs: CommonService, @@ -43,7 +48,9 @@ export class AppComponent implements OnInit, AfterViewInit { private menu: MenuController, private authService: AuthenticationService, private sanitizer: DomSanitizer, - public pushService: PushService + public pushService: PushService, + private splashScreen: SplashScreen + ) { this.events.subscribe("img-change", displayImg => { console.log("app compont: "+displayImg); @@ -78,6 +85,11 @@ export class AppComponent implements OnInit, AfterViewInit { private startReceivingPushService() { console.log("platform.ready") this.pushService.startReceiving(); + setTimeout(() => { + + this.getLastLoginInfo(); + },5000); + } subscribeEvents() { this.events.subscribe("setMenu", () => { @@ -128,8 +140,14 @@ export class AppComponent implements OnInit, AfterViewInit { } logout() { this.cs.sharedService.clearAll(); - this.menu.toggle(); - this.cs.openLogin(); + //this.menu.toggle(); + this.menu.enable(false); + this.logoutFlage=true; + this.events.publish('logoutFlage', this.logoutFlage); + + this.getLastLoginInfo(); + // this.cs.openLogin(); + } // profile() { @@ -166,6 +184,70 @@ export class AppComponent implements OnInit, AfterViewInit { this.menu.toggle(); } + getLastLoginInfo(){ + this.deviceToken= localStorage.getItem('devicyeToken'); + console.log("let deviceToken app" + this.deviceToken); + + if (this.deviceToken) { + console.log('login enabled first time: ' + this.deviceToken); + } else { + console.log("no deviceToken" ); + + this.pushService.startReceiving(); + setTimeout(() => { + this.deviceToken= localStorage.getItem('deviceToken'); + console.log('login enabled second time: ' + this.deviceToken); + + }, 1000); + } + + + this.requestGetLoginInfo= { + DeviceType:this.cs.getDeviceType(),//'Android', + DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken + } + this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => { + + if (this.cs.validResponse(res)) { + + if(res.Mohemm_GetMobileLoginInfoList.length > 0){ + + this.cs.sharedService.setSharedData( + // res.Patient_SELECTDeviceIMEIbyIMEIList[0], + res.Mohemm_GetMobileLoginInfoList[0], + AuthenticationService.IMEI_USER_DATA + ); + this.user = true; + this.events.publish('user', this.user); + + this.splashScreen.hide(); + if(this.logoutFlage){ + this.cs.openLogin(); + + } + + } + else{ + this.user = false; + this.events.publish('user', this.user); + this.splashScreen.hide(); + if(this.logoutFlage){ + this.cs.openLogin(); + + } + + } + + + }else{ + // this.user = false; + // this.splashScreen.hide(); + // if(this.logoutFlage){ + // this.cs.openLogin(); + // } + } + }); + } } diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 7442330d..aa8ad0a2 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, NgZone, OnDestroy } from "@angular/core"; import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { Router } from "@angular/router"; -import { AlertController, Platform } from "@ionic/angular"; +import { AlertController, Platform, Events } from "@ionic/angular"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { CheckUserAuthenticationResponse } from "src/app/hmg-common/services/authentication/models/check-user-auth.response"; import { SmsReaderService } from "src/app/hmg-common/services/sms/sms-reader.service"; @@ -49,6 +49,8 @@ export class LoginComponent implements OnInit, OnDestroy { user: boolean =false; DeviceType: string; requestGetLoginInfo:any; + logoutFlage: boolean ; + getuser:any=""; constructor( public cs: CommonService, @@ -58,40 +60,89 @@ export class LoginComponent implements OnInit, OnDestroy { public ts: TranslatorService, public smsService: SmsReaderService, private faio: FingerprintAIO, + public events:Events, public ngZone: NgZone, public device: Device, public splash: SplashScreen, public sharedData: SharedDataService, public plt: Platform, public pushService: PushService - ) { } + ) { + this.events.subscribe("logoutFlage", logoutFlage => { + console.log("login compont logoutFlage: "+logoutFlage); + if(logoutFlage == true){ + console.log(" subscribe check logoutFlage: "+logoutFlage); + this.logoutFlage = logoutFlage; + localStorage.setItem('logoutFlage',logoutFlage); + } + }); + + this.getuser = this.cs.sharedService.getSharedData( + AuthenticationService.IMEI_USER_DATA, + false + ); + // alert(" this.getuser "+this.getuser); + if(this.getuser){ + this.user = true; + + } + else{ + this.user = false; + + } + } ngOnInit() { // this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); // console.log("get deviceToken login"+ this.deviceToken) + + + // this.getuser = this.cs.sharedService.getSharedData( + // AuthenticationService.IMEI_USER_DATA, + // false + // ); + + // if(this.getuser){ + // console.log("this.getuser"+this.getuser); + // this.logoutFlage = true; + + // } + + this.events.subscribe("user", user => { + console.log("login compont: "+user); + this.user = user; + + }); + + + this.deviceToken= localStorage.getItem('devicyeToken'); - console.log("let deviceToken" + this.deviceToken); + console.log("let deviceToken" + this.deviceToken); if (this.deviceToken) { - console.log('login enabled first time: ' + this.deviceToken); + console.log('login enabled first time: ' + this.deviceToken); } else { console.log("no deviceToken" ); this.pushService.startReceiving(); setTimeout(() => { - this.deviceToken= localStorage.getItem('deviceToken'); - console.log('login enabled second time: ' + this.deviceToken); + // alert('login enabled second time: ' + this.deviceToken); }, 1000); } - setTimeout(() => { + // setTimeout(() => { + // alert("this.logoutFlage in setTime" +localStorage.getItem('logoutFlage')); + // alert("this.this.user in setTime" + this.user); + + // if(localStorage.getItem('logoutFlage')== "true"){ + // this.getLastLoginInfo(); - this.getLastLoginInfo(); - },5000); + // } + // },1000); @@ -355,12 +406,14 @@ export class LoginComponent implements OnInit, OnDestroy { getLastLoginInfo(){ this.requestGetLoginInfo= { - DeviceType:this.cs.getDeviceType(), + DeviceType:this.cs.getDeviceType(),//"Android",//this.cs.getDeviceType(), DeviceToken:this.deviceToken//"5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken } this.authService.getLoginInfo(this.requestGetLoginInfo,() => {}, this.ts.trPK('general', 'ok')).subscribe(res => { if (this.cs.validResponse(res)) { + if(res.Mohemm_GetMobileLoginInfoList.length > 0){ + this.cs.sharedService.setSharedData( // res.Patient_SELECTDeviceIMEIbyIMEIList[0], res.Mohemm_GetMobileLoginInfoList[0], diff --git a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts index 31d50324..aa5abdec 100644 --- a/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts +++ b/Mohem/src/app/hmg-common/ui/welcome-login/welcome.component.ts @@ -87,7 +87,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy { false ); - console.log( this.user); + console.log( "this.user in welcome login"+ this.user); this.userName = localStorage.getItem("user"); this.password = localStorage.getItem("password"); diff --git a/Mohem/src/app/pipes/pipes.module.ts b/Mohem/src/app/pipes/pipes.module.ts index c754645c..3a3a580a 100644 --- a/Mohem/src/app/pipes/pipes.module.ts +++ b/Mohem/src/app/pipes/pipes.module.ts @@ -2,12 +2,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'; +import{ JsonDatePipe} from './json-date/json-date' @NgModule({ - declarations: [DateStringPipe, + declarations: [DateStringPipe,JsonDatePipe, FilterLangPipe, TurncatePipe], imports: [], exports: [DateStringPipe, - FilterLangPipe,TurncatePipe] + FilterLangPipe,TurncatePipe,JsonDatePipe] }) export class PipesModule {} From 3651f5a04a622998f732945fcbfd6c1d62491030 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 5 Mar 2020 12:52:06 +0300 Subject: [PATCH 20/23] edit math floor --- Mohem/src/app/home/home.page.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 9fcfad65..f23aec0e 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -542,7 +542,7 @@ export class HomePage implements OnInit { (result: OpenMissingSwipesResponse) => { if (this.common.validResponse(result)) { const key = "GetOpenMissingSwipesList"; - this.statsButtons[1].statsValue = Math.ceil(result[key].P_OPEN_MISSING_SWIPES); + this.statsButtons[1].statsValue = Math.floor(result[key].P_OPEN_MISSING_SWIPES); } } ); @@ -613,7 +613,7 @@ openPeriodDateDashbored() { ITGCountAllNotification() { this.workListService.getITGDetails().subscribe((result: any) => { this.statsButtons[0].statsValue = - Math.ceil(this.countAllNotification + result.TotalCount); + Math.floor(this.countAllNotification + result.TotalCount); }); } @@ -693,7 +693,7 @@ getSubordinatesAttStatus() { "HMG Annual Vacation Accrual Plan" ) { this.statsButtons[2].statsValue = - Math.ceil(accrualBalance.ACCRUAL_NET_ENTITLEMENT); + Math.floor(accrualBalance.ACCRUAL_NET_ENTITLEMENT); this.common.sharedService.setSharedData( accrualBalance, "leaveAccrualBalance" @@ -711,7 +711,7 @@ getSubordinatesAttStatus() { totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; } } - this.statsButtons[3].statsValue = Math.ceil(totalTicketsLeft); + this.statsButtons[3].statsValue = Math.floor(totalTicketsLeft); } }); } From 289e5f14526072d54ef24a86ecf0807a1ecc02f1 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Thu, 5 Mar 2020 15:11:12 +0300 Subject: [PATCH 21/23] enhance login --- Mohem/config.xml | 5 +++- Mohem/src/app/app.component.ts | 28 +++++++++++++++---- .../services/common/common.service.ts | 10 ++++++- .../hmg-common/services/push/push.service.ts | 5 ++++ 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/Mohem/config.xml b/Mohem/config.xml index 55d5ce3c..866ace59 100644 --- a/Mohem/config.xml +++ b/Mohem/config.xml @@ -15,11 +15,14 @@ - + + + + diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index ee77b995..0a08df19 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -88,9 +88,9 @@ export class AppComponent implements OnInit, AfterViewInit { console.log("platform.ready") this.pushService.startReceiving(); setTimeout(() => { - + console.log(" in setTimeout startReceiving"); this.getLastLoginInfo(); - },5000); + },4000); } subscribeEvents() { @@ -202,8 +202,18 @@ export class AppComponent implements OnInit, AfterViewInit { } getLastLoginInfo(){ - this.deviceToken= localStorage.getItem('devicyeToken'); - console.log("let deviceToken app" + this.deviceToken); + + + console.log(" getLastLoginInfo"); + console.log("get method :"+this.cs.getDeviceToken()); + this.deviceToken= this.cs.getDeviceToken(); + //this.cs.sharedService.getSharedData("new-device-token",false);// localStorage.getItem('devicyeToken'); + console.log("let deviceToken app" + this.cs.sharedService.getSharedData("new-device-token",false)); + console.log("localStorage.getItem app" + localStorage.getItem('devicyeToken')); + console.log("sheard DEVICE_TOKEN" + this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false)); + + + if (this.deviceToken) { console.log('login enabled first time: ' + this.deviceToken); @@ -236,8 +246,10 @@ export class AppComponent implements OnInit, AfterViewInit { ); this.user = true; this.events.publish('user', this.user); + setTimeout(() => { + this.splashScreen.hide(); + },3000); - this.splashScreen.hide(); if(this.logoutFlage){ this.cs.openLogin(); @@ -247,7 +259,11 @@ export class AppComponent implements OnInit, AfterViewInit { else{ this.user = false; this.events.publish('user', this.user); - this.splashScreen.hide(); + + setTimeout(() => { + this.splashScreen.hide(); + },3000); + if(this.logoutFlage){ this.cs.openLogin(); 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 660e0b80..08163c91 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -80,6 +80,7 @@ export class CommonService { private loadingProgress: any; public updateImage:boolean=false; public setUpdateImg:any; + DT: any; constructor( public nav: NavController, public router: Router, @@ -1412,6 +1413,13 @@ public getMonthNameAr(value: number): string { return objImg; } - + setDeviceToken(deviceToken){ + this.DT=deviceToken; + } + + getDeviceToken(){ + return this.DT; + } + } diff --git a/Mohem/src/app/hmg-common/services/push/push.service.ts b/Mohem/src/app/hmg-common/services/push/push.service.ts index 95d50785..c1b5ed3f 100644 --- a/Mohem/src/app/hmg-common/services/push/push.service.ts +++ b/Mohem/src/app/hmg-common/services/push/push.service.ts @@ -222,7 +222,12 @@ export class PushService { this.firebasex.getToken().then(token => { // alert("token: "+ token); + this.cs.sharedService.setSharedData(token, "new-device-token"); + localStorage.setItem('deviceToken', token); + this.cs.setDeviceToken(token); //last way to set the device Token to get it through getDeviceToken + this.registerInBackend(token); + }).catch(error => console.error('Error getting token', error)); From 9c9b85db3ca7746946469d4d34a340bb4359a55c Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 5 Mar 2020 15:58:08 +0300 Subject: [PATCH 22/23] fixed count issue --- .../app/notification/home/home.component.ts | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index ed68d94e..717d8e8f 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -9,6 +9,8 @@ import { IonInfiniteScroll } from '@ionic/angular'; import { WorklistMainService } from '../service/work-list.main.service'; import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/worklist-advanced-search.component'; import { DatePipe } from '@angular/common'; +import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; +import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; @Component({ selector: 'app-home', @@ -146,9 +148,11 @@ export class HomeComponent implements OnInit { constructor( public common: CommonService, public ts: TranslatorService, + // tslint:disable-next-line: no-shadowed-variable public WorklistService: WorklistService, public workListService: WorklistMainService, - public modalController: ModalController + public modalController: ModalController, + public DS: DashboredService ) { this.WorkListObj = new WorkListRequest(); this.WorkListObj.P_NOTIFICATION_TYPE = '1'; @@ -161,11 +165,24 @@ export class HomeComponent implements OnInit { } ngOnInit() { - this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); + this.openNotificationsDashboard(); + } + + callWorkListServices() { this.Details(); this.Count(); this.getAllPushNotificationFun(); - this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; + } + + openNotificationsDashboard() { + this.DS.getOpenNotifications().subscribe((result: GetOpenNotificationsResponse) => { + if (this.common.validResponse(result)) { + this.worklistNotifications = result; + this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; + this.common.sharedService.setSharedData(result, 'worklistNotifications'); + this.callWorkListServices(); + } + }); } assignDataToFilters() { From 470e1c7d8e5539384e9acdc55bb663c7e07e6f7c Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 5 Mar 2020 17:07:42 +0300 Subject: [PATCH 23/23] fixed worklist issues --- Mohem/src/app/notification/home/home.component.html | 4 ++-- Mohem/src/app/notification/home/home.component.ts | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 37797f78..546dc045 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -70,8 +70,8 @@
{{formattedData.date}} -
-

{{workList.SUBJECT}}

+
+

{{workList.SUBJECT}}

diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 717d8e8f..790b2ac3 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -312,7 +312,8 @@ export class HomeComponent implements OnInit { arrayToFilter = this.newWorkListResponse.filter((workList) => { return workList.ITEM_TYPE === filter; }); - this.showFormattedData = this.categorizeData(arrayToFilter); + const sortData = this.sortArray(arrayToFilter); + this.showFormattedData = this.categorizeData(sortData); } } @@ -417,12 +418,12 @@ export class HomeComponent implements OnInit { } openNotificationDetail(obj) { - this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA); + this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA); if (obj.REQUEST_TYPE === 'PR') { this.common.openWorklistMainPRPage(); - } else if (obj[0].REQUEST_TYPE === 'PO') { + } else if (obj.REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); - } else if (obj[0].REQUEST_TYPE === 'MO') { + } else if (obj.REQUEST_TYPE === 'MO') { this.common.openWorklistMainMRPage(); } else { this.common.openWorklistMainPage();