diff --git a/Mohem/src/app/absence/home/home.component.html b/Mohem/src/app/absence/home/home.component.html index cb229b7b..3d4c4ec9 100644 --- a/Mohem/src/app/absence/home/home.component.html +++ b/Mohem/src/app/absence/home/home.component.html @@ -22,50 +22,68 @@
- - - - -
-
-
- + +
+ +
+ + +
+
+ +
+ + + {{ts.trPK('absenceList','currentBalance')}} + {{accrualNet}} + + +
+ +
+ + + {{ts.trPK('absenceList','usedBalance')}} + {{accrualUsed}} + +
+
+ +
+
+
- + - + - + - +
- - - -
@@ -94,38 +112,10 @@
- - - - - - +
- -
+ --> + diff --git a/Mohem/src/app/absence/home/home.component.scss b/Mohem/src/app/absence/home/home.component.scss index a3f81d81..0e176a32 100644 --- a/Mohem/src/app/absence/home/home.component.scss +++ b/Mohem/src/app/absence/home/home.component.scss @@ -56,13 +56,9 @@ .header-div { - background-color: #269DB8; text-transform: capitalize; - height: 160px; - /* position: relative; */ - /* display: block; */ - margin-bottom: -28px; + height: 100px; } .header-toolbar-new{ @@ -102,12 +98,9 @@ } .datetime{ - // text-align: center; - // font-family: WorkSans-Bold; - // margin-left: 111px; text-align: center; font-family: WorkSans-Bold; - margin-left: 47px; + margin-left: -120px; margin-top: -19px; } @@ -119,52 +112,40 @@ .iconCalendar{ // margin-left: -241px; // margin-top: 5px; - margin-left: 30px !important; + margin-left: -12px !important; width: 22% !important; height: 26px !important; - margin-top: -69px !important; - margin-bottom: 20px !important; + margin-top: -50px !important; + margin-bottom: 23px !important; } -.today-graph{ - // display:block !important; - // height: 150px !important; - // width: 300 !important; - // margin-left: -70px !important; - display: block !important; - height: 196px; - width: 385px; - padding-left: 51px; - // padding-top: 29px; - margin-left: -70px !important; -} -.today-graph-ar{ - // display: block !important; - // height: 196px; - // width: 385px; - // padding-left: 51px; - /* margin-left: -70px !important; */ - // font-size: 14px; - // margin-left: -48px; - // margin-right: 63px; - // margin-bottom: -30px; - display: block !important; - height: 175px; - width: 320px; - padding-left: 51px; - font-size: 14px; - margin-right: 75px; - margin-bottom: -30px; -} +// .today-graph{ + +// display: block !important; +// height: 196px; +// width: 385px; +// padding-left: 51px; +// // padding-top: 29px; +// margin-left: -70px !important; +// } +// .today-graph-ar{ +// display: block !important; +// height: 175px; +// width: 320px; +// padding-left: 51px; +// font-size: 14px; +// margin-right: 75px; +// margin-bottom: -30px; +// } .headerGrid{ background-color: white !important; border: 1px solid #cac8c8 !important; border-radius: 20px !important; padding-top: 28px; - padding-bottom: 14px; + padding-bottom: 26px; margin-left: 13px; margin-right: 13px; - margin-top: -136px; + margin-top: -93px; margin-bottom: 10px; } @@ -310,3 +291,217 @@ margin-top: -13px; height: 6px; right: 16px; } +.subTitle{ + margin-top: -10px; + margin-left: 10px; + font-family: WorkSans-Bold; + font-size: 16px; +} + +.subTitle-ar{ + margin-top: -10px; + margin-right: 10px; + font-family: WorkSans-Bold; + font-size: 16px; +} + + +.today-graph { + display: block; + height: 102px; + width: 211px; + margin-top: 20px; +margin-left: -39px; +max-height: 4cm; +} + +.today-graph-ar { + display: block; + height: 102px; + width: 211px; + margin-top: 20px; + /* margin-right: -39px; */ + max-height: 4cm; + margin-right: 105px; +} + +.graph-container{ + margin-left: 160px; + position: relative; + margin-top: -98px; +} +// .label-container{ +// position: absolute; +// // width: 20%; +// // right: 30px; +// top: 50%; +// margin-top: -27px; +// left: 20px; + +// } + + +.green-label-container{ + margin-top: 20px; margin-left: 12px; + +} +.green-label-container-ar{ + margin-top: 20px; margin-right: 12px; + +} + +.black-label-container{ + margin-left: 12px; +} +.black-label-container-ar{ + margin-right: 12px; +} +.used-label-container{ + // border-top: 5px solid #292F42; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #b60c0c; + margin-top: 30px; +} +.current-label-container{ + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: black; + margin-top: 21px; +} +.current-label{ + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #269DB8; + // margin-top: 30px; +} +.span-one{ + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: #269DB8; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; + +} + +.span-one-ar{ + display: block; + font-size: 12px; + color: #269DB8; + margin-right: 6px; + margin-top: -2px; + font-weight: bold; + +} + +.span-two{ + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: #269DB8; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; + font-family: WorkSans-Bold; + +} + +.black-span1{ + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 20px; + font-weight: bold; + +} +.black-span1-ar{ + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-right: 6px; + margin-top: 20px; + font-weight: bold; + +} +.black-span2{ + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 20px; + font-weight: bold; + font-family: WorkSans-Bold; + +} +.red-span1{ + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: #b60c0c; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; + +} +.red-span1-ar{ + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: #b60c0c; + margin-right: 6px; + margin-top: 28px; + font-weight: bold; + +} +.red-span2{ + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: #b60c0c; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; + font-family: WorkSans-Bold; + +} +.yearLabel{ + font-size: 13px; + color: gray; + font-family: WorkSans-Bold; + margin-left: 29px; + margin-top: 5px; +} +.yearLabel-ar{ + font-size: 13px; + color: gray; + font-family: WorkSans-Bold; + margin-right: 29px; + margin-top: 5px; +} \ No newline at end of file diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index fd50e4ef..1e08083c 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -37,17 +37,18 @@ export class HomeComponent implements OnInit { balance: any; ACCRUAL_NET_ENTITLEMENT: any; ACCRUAL_USED_ENTITLEMENT: any; - ACCRUAL_YEARLY_ENTITLEMENT: any; - totalnumber: any; - public direction: string; - + ACCRUAL_YEARLY_ENTITLEMENT: any; + totalnumber: any; + public direction: string; + public options = { cutoutPercentage: 80, tooltips: { enabled: false }, - legend: { display: false }}; - gaugeType = "full"; - // gaugeValue = 11.200; - // gaugeLabel = ""; + legend: { display: false } + }; + gaugeType = "full"; + // gaugeValue = 11.200; + // gaugeLabel = ""; constructor( public common: CommonService, @@ -58,22 +59,23 @@ export class HomeComponent implements OnInit { public authService: AuthenticationService ) { this.direction = TranslatorService.getCurrentDirection(); - // this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false); + // this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false); } ngOnInit() { this.Sdate = new Date().toISOString(); - + this.getUserDetails(); + this.getAccrualBalance(); } - private getUserDetails(){ + private getUserDetails() { this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { - if (user) { - // this.emp_no=user.EMPLOYEE_NUMBER; - // this.getAccrualBalance(); - } - }); + if (user) { + // this.emp_no=user.EMPLOYEE_NUMBER; + // this.getAccrualBalance(); + } + }); @@ -101,34 +103,36 @@ export class HomeComponent implements OnInit { this.accrualNet = this.leaveAccrualBalance.ACCRUAL_NET_ENTITLEMENT; this.accrualUsed = this.leaveAccrualBalance.ACCRUAL_USED_ENTITLEMENT; this.accrualYearly = this.leaveAccrualBalance.ACCRUAL_YEARLY_ENTITLEMENT; - this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly; - this.totalnumber= this.totalnumber.toFixed(3); + this.totalnumber = this.accrualNet + this.accrualUsed + this.accrualYearly; + this.totalnumber = this.totalnumber.toFixed(3); this.request = this.common.sharedService.getSharedData('leaveAccrualBalanceDate', false); console.log("this.request" + this.request.P_EFFECTIVE_DATE); this.effectiveDate = this.request.P_EFFECTIVE_DATE; this.data = { // labels: ['earingTotal', 'deductionTotal'], datasets: [ - // { data: [this.accrualNet,this.accrualYearly,this.accrualUsed], - { - data: [this.accrualNet,this.accrualUsed], - backgroundColor: [ - '#1FA269', - '#CB3232',], - borderWidth: 2 - } - ] - }; + // { data: [this.accrualNet,this.accrualYearly,this.accrualUsed], + { + data: [this.accrualNet, this.accrualUsed], + backgroundColor: [ + // '#1FA269', + // '#CB3232',], + '#269DB8', + '#b60c0c',], + borderWidth: 1 + } + ] + }; this.getAbsenceTransaction(); } -AccrualBalances() { + AccrualBalances() { this.common.openAccuralPage(); } -AttachmentDocuments(id) { + AttachmentDocuments(id) { const request = { P_ABSENCE_ATTENDANCE_ID: id }; @@ -156,7 +160,7 @@ AttachmentDocuments(id) { //this.GetAbsenceTransactionList =result.GetAbsenceTransactionList; } } -getAbsenceTransaction() { + getAbsenceTransaction() { this.IsReachEnd = false; const request = { P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, @@ -170,7 +174,7 @@ getAbsenceTransaction() { }); } - handleAbsListResult(result) { + handleAbsListResult(result) { if (this.common.validResponse(result)) { if (this.common.hasData(result.GetAbsenceTransactionList)) { this.GetAbsenceTransactionList = result.GetAbsenceTransactionList; @@ -187,7 +191,7 @@ getAbsenceTransaction() { } } } -doInfinite(event: any) { + doInfinite(event: any) { if (!this.IsReachEnd) { // this.P_PAGE_NUM++; const request = { @@ -227,11 +231,11 @@ doInfinite(event: any) { } } } -createAbsence() { + createAbsence() { this.common.openSubmitAbsencePage(); } -/////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////// getAccrualBalance() { if (this.Sdate) { let today = new Date(this.Sdate); @@ -252,31 +256,32 @@ createAbsence() { }); } } - + handleAccrualResult(result) { if (this.common.validResponse(result)) { this.balance = result.GetAccrualBalancesList; - } - if(this.balance){ - this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT; - this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT; - // this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT; - // this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly; - this.totalnumber= this.accrualNet + this.accrualUsed; - this.totalnumber= this.totalnumber.toFixed(3); - this.data = { - // labels: ['earingTotal', 'deductionTotal'], - datasets: [ - // { data: [this.accrualNet,this.accrualYearly,this.accrualUsed], - { data: [this.accrualNet,this.accrualUsed], - backgroundColor: [ - '#1FA269', - '#CB3232',], - borderWidth: 2 - } - ] - }; + } + if (this.balance) { + this.accrualNet = this.balance[0].ACCRUAL_NET_ENTITLEMENT; + this.accrualUsed = this.balance[0].ACCRUAL_USED_ENTITLEMENT; + // this.accrualYearly = this.balance[0].ACCRUAL_YEARLY_ENTITLEMENT; + // this.totalnumber= this.accrualNet + this.accrualUsed + this.accrualYearly; + this.totalnumber = this.accrualNet + this.accrualUsed; + this.totalnumber = this.totalnumber.toFixed(3); + this.data = { + // labels: ['earingTotal', 'deductionTotal'], + datasets: [ + // { data: [this.accrualNet,this.accrualYearly,this.accrualUsed], + { + data: [this.accrualNet, this.accrualUsed], + backgroundColor: [ + '#269DB8', + '#b60c0c',], + borderWidth: 1 + } + ] + }; - } + } } } diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.html b/Mohem/src/app/absence/submit-absence/submit-absence.component.html index 7fac58dd..ec40c78c 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.html +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.html @@ -3,15 +3,21 @@ [headerText]="'submitAbsence, submitAbsence' | translate"> - - + +
+ + +
+ - {{item.ABSENCE_ATTENDANCE_TYPE_NAME}} + {{ts.trPK('submitAbsence','startDate')}} @@ -52,7 +58,7 @@
-
+
{{ts.trPK('general','next')}} diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss index deb4981b..94ac7f71 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.scss +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.scss @@ -21,3 +21,94 @@ } + .label-Select{ + color: var(--dark); + font-size: 15px; + border: none; + font-weight: 400; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + width: 80%; + padding: 1px 0px; + background-color: var(--light); + border-bottom: var(--cusgray) solid 1px; + border-radius: 0px; + // margin-left: 20px; + margin-left: 30px; + // margin-top: -10px; + // -webkit-appearance: none; + // -moz-appearance: none; + text-indent: 1px; + // text-overflow: ''; + box-shadow: none; + -webkit-box-shadow:none; + -moz-box-shadow: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + + :root[dir="ltr"]{ + background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%), linear-gradient(to right, #ffffff, #ffffff); + background-position: calc(100% - 14px) calc(1em + 2px), calc(100% - 8px) calc(1em + 2px), 100% 0; + background-size: 6px 6px, 6px 6px, 2.9em 2.9em; + background-repeat: no-repeat; + padding-right: 20px; + } + :root[dir="rtl"]{ + background-image: linear-gradient(-135deg, #999 50%, transparent 50%),linear-gradient(-45deg, transparent 50%, #999 50%), linear-gradient(to right, #ffffff, #ffffff); + background-position: calc(1em - 10px) calc(100% - 8px), calc(1em - 4px) calc(100% - 8px), 0 100%; + background-size: 6px 6px, 6px 6px, 2.9em 2.9em; + background-repeat: no-repeat; + padding-left: 20px; + } +} + +.label{ + font-size: 16px; + // margin-left: 15px; + color: #a2a5a6 !important; + display: block; + overflow: hidden; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + /* font-size: inherit; */ + // text-overflow: ellipsis; + // white-space: nowrap; + white-space: normal; + // padding-top: 10px; + padding: 5px 0px; + padding-left: 10px !important; + margin: 10px auto; + :root[dir="ltr"]{ + font-family: var(--fontFamilySemiBoldEN) !important; + } + :root[dir="rtl"]{ + font-family: var(--fontFamilyIOSAR) !important; + font-weight: bold; + } + + +} + +.Field-en{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 20px; + padding-left: 20px !important; + padding-top: 6px !important; + color: #999999 !important; +} + +.Field-ar{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 20px; + padding-right: 20px !important; + padding-top: 6px !important; + color: #999999 !important; +} + + + diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts index 4139c84e..b4b5da86 100644 --- a/Mohem/src/app/app-routing.module.ts +++ b/Mohem/src/app/app-routing.module.ts @@ -1,33 +1,42 @@ -import { NgModule } from '@angular/core'; -import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; - - -const routes: Routes = [ - { path: '', redirectTo: 'authentication/login', pathMatch: 'full' }, - { - path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule'}, - { path: 'home', loadChildren: './home/home.module#HomePageModule' }, - { path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' }, - { path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }, - { path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' }, - { path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' }, - { path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' }, - { path: 'eit', loadChildren: './eit/eit.module#EITPageModule' }, - { path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' }, - { path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' }, - { path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' }, - { path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' }, - { path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' }, - { path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }, { path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' } +import { NgModule } from '@angular/core'; +import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; - -]; - -@NgModule({ - imports: [ - /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/ - RouterModule.forRoot(routes), - ], - exports: [RouterModule] -}) -export class AppRoutingModule { } + +const routes: Routes = [ + { path: '', redirectTo: 'authentication/login', pathMatch: 'full' }, + { + path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule' + }, + { path: 'home', loadChildren: './home/home.module#HomePageModule' }, + { path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' }, + { path: 'vacation-rule', loadChildren: './vacation-rule/vacation-rule.module#VacationRulePageModule' }, + { path: 'accrual-balances', loadChildren: './accrual-balances/accrual-balances.module#AccrualBalancesPageModule' }, + { path: 'my-team', loadChildren: './my-team/my-team.module#MyTeamPageModule' }, + { path: 'attendance', loadChildren: './attendance/attendance.module#AttendancePageModule' }, + { path: 'eit', loadChildren: './eit/eit.module#EITPageModule' }, + { path: 'absence', loadChildren: './absence/absence.module#AbsencePageModule' }, + { path: 'notification', loadChildren: './notification/notification.module#NotificationPageModule' }, + { path: 'my-specialist', loadChildren: './my-specialist/my-specialist.module#MySpecialistPageModule' }, + { path: 'my-subordinate', loadChildren: './my-subordinate/my-subordinate.module#MySubordinatePageModule' }, + { path: 'time-card', loadChildren: './time-card/time-card.module#TimeCardPageModule' }, + { path: 'payslip', loadChildren: './payslip/payslip.module#PayslipPageModule' }, + { path: 'attendance-tracking', loadChildren: './attendance-tracking/attendance-tracking.module#AttendanceTrackingPageModule' }, + { path: 'itemforsale', loadChildren: './itemforsale/itemforsale.module#ItemforsalePageModule' }, + { path: 'offersdiscount', loadChildren: './offersdiscount/offersdiscount.module#OffersdiscountPageModule' }, + { path: 'mowadhafi', loadChildren: './mowadhafi/mowadhafi.module#MowadhafiPageModule' }, + { path: 'erm-channel', loadChildren: './erm-channel/erm-channel.module#ErmChannelPageModule' }, + { path: 'backend-integrations', loadChildren: './backend-integrations/backend-integrations.module#BackendIntegrationsPageModule' } + + + + +]; + +@NgModule({ + imports: [ + /*RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules}),*/ + RouterModule.forRoot(routes), + ], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index a8aaa491..d7a25f37 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -45,6 +45,15 @@ + + + + + + {{ts.trPK('userProfile','HR-Request')}} + + + @@ -122,6 +131,14 @@ {{ts.trPK('myTeam','myTeam-header')}} + + + + + + {{ts.trPK('userProfile','HR-Request')}} + + @@ -147,7 +164,6 @@ {{notBadge}} -

{{title}}

diff --git a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss index ff7c3d40..7be7a63d 100644 --- a/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss +++ b/Mohem/src/app/hmg-common/ui/services-button/services-button.component.scss @@ -26,7 +26,7 @@ } .pClass { - font-size: 12PX; + font-size: 9px; text-align: center; margin-top: 10px; color: black; diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss index 554643f1..0663997a 100644 --- a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.scss @@ -3,7 +3,7 @@ margin-bottom: 0px; border: 1px solid #ccc; border-radius: 20px; - width: 100%; + width: 200px; max-width: 105px; height: 160px; padding: 10px; @@ -29,7 +29,7 @@ .titleBox { display: block; span { - font-size: 30px; + font-size: 25px; font-weight: bold; color: black; text-align: left; @@ -44,6 +44,7 @@ font-weight: bold; text-align: left; display: block; + font-size: 14px !important; } .iconFab{ diff --git a/Mohem/src/app/home/attendance-options/attendance-options.component.ts b/Mohem/src/app/home/attendance-options/attendance-options.component.ts index 6cc32f42..8de622b0 100644 --- a/Mohem/src/app/home/attendance-options/attendance-options.component.ts +++ b/Mohem/src/app/home/attendance-options/attendance-options.component.ts @@ -18,6 +18,7 @@ import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; import { DevicePermissionsService } from 'src/app/hmg-common/services/device-permissions/device-permissions.service'; import { Geolocation } from '@ionic-native/geolocation/ngx'; import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; +import { FirebaseX } from '@ionic-native/firebase-x/ngx'; @Component({ @@ -36,12 +37,17 @@ export class AttendanceOptionsComponent implements OnInit { public enableLocationQR = false; public enableLocationNFC = false; public enableLocationWIFI = false; + public enableFirestore = false; public deviceNFC = false; public nfcIOSSuccess = false; public lat = 0; public longt = 0; public isFakeLocationUsed = false; public deviceID: string; + public firebasex: FirebaseX + public isDocumentAvailable = false; + public document: any; + constructor( private nfc: NFC, @@ -61,6 +67,7 @@ export class AttendanceOptionsComponent implements OnInit { ) {} ngOnInit() { + this.common.startLoading(); this.direction = TranslatorService.getCurrentLanguageName(); this.userData = this.common.sharedService.getSharedData( AuthenticatedUser.SHARED_DATA, @@ -71,6 +78,11 @@ export class AttendanceOptionsComponent implements OnInit { this.checkNFCStatus("one"); } + public checkFirebaseDocument() { + const id = this.userData.EMPLOYEE_NUMBER; + this.attendScanService.checkFirestoreDocument(id); + } + async checkNFCStatus(checkValue: string) { try { let nfcStatus = await this.nfc.enabled(); @@ -100,43 +112,40 @@ export class AttendanceOptionsComponent implements OnInit { } public setServicesPrivilage() { - for (const servicePrivilage of AuthenticationService.servicePrivilage) { - if ( - servicePrivilage.Previlege && - servicePrivilage.ServiceName === "enableNFC" - ) { - this.serviceEnableNFC = true; - } - if ( - servicePrivilage.Previlege && - servicePrivilage.ServiceName === "enableQR" - ) { - this.serviceEnableQR = true; - } - if ( - servicePrivilage.Previlege && - servicePrivilage.ServiceName === "enableWIFI" - ) { - this.serviceEnableWifi = true; - } - if ( - servicePrivilage.Previlege && - servicePrivilage.ServiceName === "enableLocationQR" - ) { - this.enableLocationQR = true; - } - if ( - servicePrivilage.Previlege && - servicePrivilage.ServiceName === "enableLocationNFC" - ) { - this.enableLocationNFC = true; - } - if ( - servicePrivilage.Previlege && - servicePrivilage.ServiceName === "enableLocationWIFI" - ) { - this.enableLocationWIFI = true; + try { + for (const servicePrivilage of AuthenticationService.servicePrivilage) { + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableNFC") { + this.serviceEnableNFC = true; + } + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableQR") { + this.serviceEnableQR = true; + } + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableWIFI") { + this.serviceEnableWifi = true; + } + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableLocationQR") { + this.enableLocationQR = true; + } + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableLocationNFC") { + this.enableLocationNFC = true; + } + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableLocationWIFI") { + this.enableLocationWIFI = true; + } + + if (servicePrivilage.Previlege && servicePrivilage.ServiceName === "enableFirestore") { + this.enableFirestore = true; + this.common.sharedService.setSharedData(true, 'enableFirestore'); + this.checkFirebaseDocument(); + } else { + this.enableFirestore = false; + this.common.sharedService.setSharedData(false, 'enableFirestore'); + this.common.stopLoading(); + } } + } catch (error) { + console.log(error); + this.common.stopLoading(); } } @@ -178,6 +187,9 @@ export class AttendanceOptionsComponent implements OnInit { console.log("Error inside in swipe attendance"); }) .subscribe((result: Response) => { + if (this.enableFirestore) { + this.attendScanService.processFirebaseDocument('NFC-IOS', result); + } if (this.common.validResponse(result)) { this.ngZone.run(() => { this.nfcIOSSuccess = true; @@ -228,6 +240,17 @@ export class AttendanceOptionsComponent implements OnInit { const isAndroid = this.platform.is("android"); const isIOS = this.platform.is("ios"); const isWifiEnabled = await this.wifiWizard2.isWifiEnabled(); + const versionType = this.device.version; + const versionTypeInt = parseInt(versionType); + console.log('version type: ' + versionType); + console.log('version Type: ' + versionTypeInt); + + if(isAndroid && versionTypeInt > 10) { + if(!isWifiEnabled){ + this.showWifiNotEnabled(); + return; + } + } if (isIOS) { if(!isWifiEnabled){ @@ -248,17 +271,16 @@ export class AttendanceOptionsComponent implements OnInit { }); return; } - - // opening wifi dailog if all above conditions are passed (isWifiEnabled == true) - let modal = await this.modalController.create({ - component: WifiModalComponent, - showBackdrop: true, - backdropDismiss: false, - componentProps:{ enableLocationWIFI: this.enableLocationWIFI, lat: this.lat, longt: this.longt}, - }); - modal.cssClass = "wifi-modal"; - await modal.present(); } + // opening wifi dailog if all above conditions are passed (isWifiEnabled == true) + let modal = await this.modalController.create({ + component: WifiModalComponent, + showBackdrop: true, + backdropDismiss: false, + componentProps:{ enableLocationWIFI: this.enableLocationWIFI, lat: this.lat, longt: this.longt}, + }); + modal.cssClass = "wifi-modal"; + await modal.present(); } diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 5cc9479e..b323351c 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -7,7 +7,7 @@ - + + + + + {{'general,other-services' | translate}} + + + + + + + + + + + + + + + + + + + + + diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 268fe9c3..2e63be2b 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -37,8 +37,9 @@ import { WorklistMainService } from '../notification/service/work-list.main.serv import { isThisISOWeek } from 'date-fns'; import { Router } from '@angular/router'; import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx'; -import { NFC, Ndef} from "@ionic-native/nfc/ngx" +import { NFC, Ndef } from "@ionic-native/nfc/ngx" import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component'; +import { FirebaseX } from '@ionic-native/firebase-x/ngx'; @Component({ selector: 'app-home', @@ -73,28 +74,28 @@ export class HomePage implements OnInit { show: true }, { - title: this.ts.trPK('home','worklist'), + title: this.ts.trPK('home', 'worklist'), statsValue: 0, icon: 'assets/icon/new-design/work_list.png', link: '1', show: true }, { - title: this.ts.trPK('home','missing-swipes'), + title: this.ts.trPK('home', 'missing-swipes'), statsValue: 0, icon: 'assets/icon/new-design/missing_swipe.png', link: '2', - show:true + show: true }, { - title: this.ts.trPK('home','leave-balance'), + title: this.ts.trPK('home', 'leave-balance'), statsValue: 0, icon: 'assets/icon/new-design/leave_balance.png', link: '3', show: this.isShow, }, { - title: this.ts.trPK('absenceList','tickets-balance'), + title: this.ts.trPK('absenceList', 'tickets-balance'), statsValue: 0, icon: 'assets/icon/new-design/ticket_balance.png', link: '4', @@ -102,14 +103,9 @@ export class HomePage implements OnInit { } ]; - public slideOptsOne = { - slidesPerView: 3.5, - spaceBetween: 10 - }; - public slideOptsTwo = { - slidesPerView: 3.2, - spaceBetween: 10 - }; + public slideOptsOne = {}; + + public slideOptsTwo = {}; public runTimer = false; public hasStarted = false; public hasFinished = false; @@ -132,6 +128,7 @@ export class HomePage implements OnInit { public vacationRuleIcon: string; direction: string; public isPostNoLoad = true; + public showStaticServices = false; constructor( public ts: TranslatorService, @@ -158,7 +155,8 @@ export class HomePage implements OnInit { private platform: Platform, public backgroundGeolocation: BackgroundGeolocation, public modalController: ModalController, - private nfc: NFC + private nfc: NFC, + public firebasex: FirebaseX ) { this.events.subscribe('img-change', displayImg => { this.userImage = this.sanitizer.bypassSecurityTrustUrl( @@ -169,11 +167,6 @@ export class HomePage implements OnInit { ngOnInit() { let openDigitalIDCard = this.sharedData.getSharedData("loginWithDigitalIDButton", true); - this.platform.backButton.subscribeWithPriority(9999, () => { - if (this.router.isActive('/home', true)) { - this.common.openHome(); - } - }); this.direction = TranslatorService.getCurrentLanguageName(); this.myTeamTitle = this.ts.trPK('myTeam', 'myTeam-header'); this.vacationRuleTitle = this.ts.trPK('vacation-rule', 'vacationRule'); @@ -182,14 +175,27 @@ export class HomePage implements OnInit { this.events.subscribe('getNotCount', badge => { this.notBadge = badge; }); - if(openDigitalIDCard === true){ + if (openDigitalIDCard === true) { console.log("DONE"); this.openDigitalId(); } } + public slideSettingsTwo() { + const width = this.platform.width(); + this.slideOptsOne = { + slidesPerView: width > 320 ? 3.5 : 3, + spaceBetween: 10 + }; + this.slideOptsTwo = { + slidesPerView: width > 320 ? 3.2 : 2.5, + spaceBetween: width > 320 ? 10 : 5 + }; + this.showStaticServices = true; +} ionViewWillEnter() { this.common.startLoading(); + this.slideSettingsTwo(); this.common.sharedService.setSharedData(true, 'loadWorkList'); this.remainingTime = 0; this.displayTime = '00:00:00'; @@ -269,11 +275,11 @@ export class HomePage implements OnInit { this.common.presentAlert(this.ts.trPK('home', 'position-error')); } }, (error) => { - this.common.presentAlert(this.ts.trPK('home', 'position-error')); + this.common.presentAlert(this.ts.trPK('home', 'position-error')); }); } else { - this.geolocation.getCurrentPosition({maximumAge: 3000, timeout: 10000, enableHighAccuracy: true}).then(resp => { - if(resp && resp.coords.latitude && resp.coords.longitude) { + this.geolocation.getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }).then(resp => { + if (resp && resp.coords.latitude && resp.coords.longitude) { this.lat = resp.coords.latitude; this.longt = resp.coords.longitude; this.attendance(); @@ -283,7 +289,7 @@ export class HomePage implements OnInit { }).catch(error => { this.common.presentAlert(this.ts.trPK('home', 'position-error')); }); - } + } } else { return false; } @@ -293,11 +299,11 @@ export class HomePage implements OnInit { setServicesPrivilage() { for (const servicePrivilage of AuthenticationService.servicePrivilage) { if (servicePrivilage.Previlege === false) { - if(servicePrivilage.ServiceName === 'accrualBalance'){ + if (servicePrivilage.ServiceName === 'accrualBalance') { this.statsButtons[3].show = false; this.statsButtons[4].show = false; } - if(servicePrivilage.ServiceName === 'vacationRule'){ + if (servicePrivilage.ServiceName === 'vacationRule') { this.showVcationRule = false; } // document @@ -305,7 +311,7 @@ export class HomePage implements OnInit { // .setAttribute('disabled', 'disabled'); // document.getElementById(servicePrivilage.ServiceName).style.filter = // 'grayscale(1)'; - }else{ + } else { this.statsButtons[3].show = true; this.statsButtons[4].show = true; this.showVcationRule = true; @@ -344,11 +350,11 @@ export class HomePage implements OnInit { ); 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; - } + } else { + this.userImage = user.EMPLOYEE_IMAGE + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : this.userImage; + } this.callDashboardServices(); } else { console.log(user); @@ -403,12 +409,12 @@ export class HomePage implements OnInit { for (let i = 0; i < this.menuList.length; i++) { if (this.menuList[i].MENU_TYPE === 'M') { this.events.publish('myTeamFlag', 'true'); - // this.common.sharedService.setSharedData('true', "myTeamFlag"); + // this.common.sharedService.setSharedData('true', "myTeamFlag"); } } // if (item.MENU_TYPE === 'M') { - // this.common.openMyTeamPage(); + // this.common.openMyTeamPage(); // // this.navCtrl.push("MySubordinatePage"); // } else if (item.MENU_TYPE === 'S') { // this.common.sharedService.setSharedData(item, 'mySpecList'); @@ -480,15 +486,15 @@ export class HomePage implements OnInit { for (let i = 0; i < result.GetMenuEntriesList.length; i++) { // tslint:disable-next-line: triple-equals if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_TKT_NEW_EIT_SS') { - this.ticketRequestObject = result.GetMenuEntriesList[i]; - // tslint:disable-next-line: triple-equals + this.ticketRequestObject = result.GetMenuEntriesList[i]; + // tslint:disable-next-line: triple-equals } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HR_LOA_SS') { this.leaveRequestObject = result.GetMenuEntriesList[i]; - // tslint:disable-next-line: triple-equals - } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { - this.missingSwipeRequestObject = result.GetMenuEntriesList[i]; - } - } + // tslint:disable-next-line: triple-equals + } else if (result.GetMenuEntriesList[i].FUNCTION_NAME == 'HMG_OTL_MISSING_SWIPE_EIT_SS') { + this.missingSwipeRequestObject = result.GetMenuEntriesList[i]; + } + } this.sortMenuEntires(result.GetMenuEntriesList); } } @@ -541,12 +547,12 @@ export class HomePage implements OnInit { request.QRValue = this.scannedResult.text; request.UID = this.deviceID; request.EmployeeID = this.userData.EMPLOYEE_NUMBER; - this.attendanceService.fakeAttendanceSwipeScanner(request, () => {console.log('Error inside in swipe attendance');}) + this.attendanceService.fakeAttendanceSwipeScanner(request, () => { console.log('Error inside in swipe attendance'); }) .subscribe((result: Response) => { if (this.common.validResponse(result)) { - this.common.presentAlert(this.ts.trPK('home', 'fake-location')); + this.common.presentAlert(this.ts.trPK('home', 'fake-location')); } - }); + }); } swipeAttendance() { @@ -569,13 +575,13 @@ export class HomePage implements OnInit { } openPersonalInfo() { - this.common.openProfile(); + this.common.openProfile('sideMenu'); } // Dashboard Services showOrganizationSalaries() { this.DS.getOrganizationSalaries().subscribe( - (result: OrganizationSalariesResponse) => {} + (result: OrganizationSalariesResponse) => { } ); } @@ -592,7 +598,7 @@ export class HomePage implements OnInit { showPerformanceAppraisal() { this.DS.getPerformanceAppraisal().subscribe( - (result: PerformanceAppraisalResponse) => {} + (result: PerformanceAppraisalResponse) => { } ); } @@ -604,7 +610,7 @@ export class HomePage implements OnInit { return seconds; } -convertAndAssignTime(data) { + convertAndAssignTime(data) { this.remainingTime = this.convertInSeconds(data.P_REMAINING_HOURS.split(':')); this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':')); this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':')); @@ -614,22 +620,22 @@ convertAndAssignTime(data) { } else if (this.isCheckedIn && this.remainingTime === 0) { this.percent = 100; } -} + } -showAttendanceTracking() { - const request = { - P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER - }; - this.DS.getAttendanceTracking(request, '', '', this.isPostNoLoad).subscribe((result: AttendanceTrackingResponse) => { + showAttendanceTracking() { + const request = { + P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER + }; + this.DS.getAttendanceTracking(request, '', '', this.isPostNoLoad).subscribe((result: AttendanceTrackingResponse) => { if (this.common.validResponse(result)) { clearTimeout(this.intervalCountdown); const key = 'GetAttendanceTrackingList'; this.convertAndAssignTime(result[key]); } }); -} + } -openPeriodDateDashbored() { + openPeriodDateDashbored() { this.DS.getOpenPeriodDates(() => { console.log('Error '); }).subscribe((result: OpenPeriodDatesResponse) => { if (this.common.validResponse(result)) { console.log('response'); @@ -638,7 +644,7 @@ openPeriodDateDashbored() { } openNotificationsDashbored() { - this.DS.getOpenNotifications('', '', this.isPostNoLoad).subscribe((result: GetOpenNotificationsResponse) => { + this.DS.getOpenNotifications('', '', false).subscribe((result: GetOpenNotificationsResponse) => { if (this.common.validResponse(result)) { const key = 'P_OPEN_NTF_NUMBER'; this.countAllNotification = result[key]; @@ -654,7 +660,7 @@ openPeriodDateDashbored() { ITGCountAllNotification() { this.workListService.getITGDetails('', '', this.isPostNoLoad).subscribe((result: any) => { this.statsButtons[1].statsValue = - Math.floor(this.countAllNotification + result.TotalCount); + Math.floor(this.countAllNotification + result.TotalCount); this.common.stopLoading(); }); } @@ -673,7 +679,7 @@ openPeriodDateDashbored() { }); } -getSubordinatesAttStatus() { + getSubordinatesAttStatus() { const request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest(); request.P_SCHEDULE_DATE_FROM = '/Date(1578603600000+0300)/'; // test request.P_SCHEDULE_DATE_TO = '/Date(1576011600000+0300)/'; // test @@ -731,8 +737,7 @@ getSubordinatesAttStatus() { this.accrualBalancesList = result.GetAccrualBalancesList; for (const accrualBalance of result.GetAccrualBalancesList) { if (accrualBalance.ACCURAL_PLAN_NAME === 'HMG Annual Vacation Accrual Plan') { - this.statsButtons[3].statsValue = - Math.floor(accrualBalance.ACCRUAL_NET_ENTITLEMENT); + this.statsButtons[3].statsValue = accrualBalance.ACCRUAL_NET_ENTITLEMENT === null ? 0 : Number(accrualBalance.ACCRUAL_NET_ENTITLEMENT.toFixed(2)); this.common.sharedService.setSharedData(accrualBalance, 'leaveAccrualBalance'); this.common.sharedService.setSharedData(request, 'leaveAccrualBalanceDate'); this.common.sharedService.setSharedData(this.accrualBalancesList, 'tickitsbalance'); @@ -740,18 +745,18 @@ getSubordinatesAttStatus() { totalTicketsLeft = totalTicketsLeft + accrualBalance.ACCRUAL_NET_ENTITLEMENT; } } - this.statsButtons[4].statsValue = Math.floor(totalTicketsLeft); + this.statsButtons[4].statsValue = Number(totalTicketsLeft.toFixed(2)); } }); } -openattentracking() { + openattentracking() { this.common.openAttenTrackingpage(); -} + } -public showAttendanceOptions() { - this.common.openAttendanceOptionsComponent(); -} + public showAttendanceOptions() { + this.common.openAttendanceOptionsComponent(); + } openStatsButton(link: any) { // tslint:disable-next-line: triple-equals @@ -759,19 +764,19 @@ public showAttendanceOptions() { this.isFakeLocationUsed = false; // this.getDeviceLocation(); this.showAttendanceOptions(); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '1') { this.common.startLoading(); this.common.openNotificationPage(); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '2') { this.openPage(this.missingSwipeRequestObject); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '3') { this.openPage(this.leaveRequestObject); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (link == '4') { - this.openPage(this.ticketRequestObject); + this.openPage(this.ticketRequestObject); } } @@ -782,4 +787,13 @@ public showAttendanceOptions() { }); return await modal.present(); } + itemForSale() { + this.common.navigateForward('/itemforsale/items'); + } + offersDiscount() { + this.common.navigateForward('/offersdiscount/home'); + } + openAnnouncement() { + this.common.openAnnouncement(); + } } diff --git a/Mohem/src/app/home/nfc-modal/nfc-modal.component.ts b/Mohem/src/app/home/nfc-modal/nfc-modal.component.ts index 202e996f..c5d761ef 100644 --- a/Mohem/src/app/home/nfc-modal/nfc-modal.component.ts +++ b/Mohem/src/app/home/nfc-modal/nfc-modal.component.ts @@ -58,6 +58,7 @@ export class NfcModalComponent implements OnInit { public swipeAttendanceNFC (nfcSerialCode: any) { this.nfcReader.unsubscribe(); + const enableFirestore = this.common.sharedService.getSharedData('enableFirestore', false); const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); request.PointType = 2; request.Latitude = this.lat; @@ -71,6 +72,9 @@ export class NfcModalComponent implements OnInit { console.log('Error inside in swipe attendance'); this.modalController.dismiss(); }).subscribe((result: Response) => { + if (enableFirestore) { + this.attendScanService.processFirebaseDocument('NFC-ANDROID', result); + } if (this.common.validResponse(result)) { this.ngZone.run(() => { this.gifStatus = true; diff --git a/Mohem/src/app/home/wifi-model/wifi-modal.component.ts b/Mohem/src/app/home/wifi-model/wifi-modal.component.ts index 6d8073d4..196f8eee 100644 --- a/Mohem/src/app/home/wifi-model/wifi-modal.component.ts +++ b/Mohem/src/app/home/wifi-model/wifi-modal.component.ts @@ -10,6 +10,7 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl import { Platform } from "@ionic/angular"; import { WifiWizard2 } from "@ionic-native/wifi-wizard-2/ngx"; import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; +import { AttendScanService } from "../../hmg-common/services/attend-services/attend-scan.service"; @Component({ selector: 'app-wifi-modal', @@ -36,6 +37,7 @@ export class WifiModalComponent implements OnInit { private wifiWizard2: WifiWizard2, private openNativeSettings: OpenNativeSettings, private platform: Platform, + public attendScanService: AttendScanService ) { } ngOnInit() { @@ -134,7 +136,10 @@ export class WifiModalComponent implements OnInit { } } - async swipeAttendanceWifi(code:any) { + async swipeAttendanceWifi(code:any) { + const isPlatformValue = this.platform.is('ios') ? 'WIFI-IOS' : 'WIFI-ANDROID'; + const enableFirestore = this.common.sharedService.getSharedData('enableFirestore', false); + const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); request.PointType = 3; request.Latitude = this.lat; @@ -153,6 +158,9 @@ export class WifiModalComponent implements OnInit { this.disconnectWifi(); }) .subscribe((result: Response) => { + if (enableFirestore) { + this.attendScanService.processFirebaseDocument(isPlatformValue, result); + } this.disconnectWifi(); if (this.common.validResponse(result)) { this.ngZone.run(() => { diff --git a/Mohem/src/app/itemforsale/home/home.component.html b/Mohem/src/app/itemforsale/home/home.component.html new file mode 100644 index 00000000..4086bfe6 --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.html @@ -0,0 +1,273 @@ + + +
+ + + + +
+
+
+
+ +
+
+
{{ts.trPK('itemforsale','select-category')}}
+
{{ts.trPK('itemforsale','completed')}}
+
+ +
+
+ +
+
+ + +
+
{{ts.trPK('itemforsale','add-details')}}
+ +
{{step >2 ? "Completed" : "Locked"}}
+
+ +
+
+
+
+
{{ts.trPK('itemforsale','review-sell')}}
+
{{step >3 ? "Completed" : "Locked"}}
+
+ +
+
+
+
+ + + +
+

What are you offering?

+
+ + + +
+
+ +
+
+

Mobile & Tablets

+
+
+
+ +
+
+ +
+
+

Cars & Vehicles

+
+
+
+ +
+
+ +
+
+

Electronic Applicance

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

Furniture & Home Decor

+
+
+
+ +
+
+ +
+
+

Fashion & beauty

+
+
+
+ +
+
+ +
+
+

Books, Sports & Hobbies

+
+
+
+
+
+
+

Add Details

+
+
+ + +

Item Info

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

Item Condition

+ + + + + + + New + + + + Used + + + + +
+
+ + + + +

Item Price

+ + + +
+
+ + +

Item Photos

+
+ + +
+
+
X
+ +
+ +
+
+ +
+
+
X
+ +
+ +
+
+ +
+
+ + +
+ +
+
+
+ + + +
+
+ +
+

Review & Sell

+
+ + +
+

Furniture Table

+ + + +

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

+
+

Used

+ + + +
+ + + Selling for

500 SAR

+
+
+ +
+
+ +
+ +
+ + +
+ + cancel + + +
+
+ + + +
+ + cancel + + {{ts.trPK('general','next')}} + + + Confirm +
+
+ +
\ No newline at end of file diff --git a/Mohem/src/app/itemforsale/home/home.component.scss b/Mohem/src/app/itemforsale/home/home.component.scss new file mode 100644 index 00000000..da69d29b --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.scss @@ -0,0 +1,343 @@ +.md-stepper-horizontal { + + width: 95%; + margin: 0 auto; + background-color: #FFFFFF; + box-shadow: 0 3px 8px -6px #DDDDDD; + + margin: auto; + position: relative; + border-radius: 25px; +} +.md-stepper-horizontal .md-step { + display: table-cell; + position: relative; + padding: 20px 10px; + text-align: left; +} +.md-stepper-horizontal .md-step:hover, +.md-stepper-horizontal .md-step:active { + background-color:rgba(0,0,0,0.04); +} +.md-stepper-horizontal .md-step:active { + border-radius: 15% / 75%; +} +.md-stepper-horizontal .md-step:first-child:active { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.md-stepper-horizontal .md-step:last-child:active { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.md-stepper-horizontal .md-step:hover .md-step-circle { + background-color:#757575; +} +.md-stepper-horizontal ion-col:last-child .md-step-bar-left { + display:none; +} +.md-stepper-horizontal .md-step .md-step-circle { + width: 30px; + height: 30px; + border-radius: 50%; + text-align: center; + line-height: 30px; + font-size: 16px; + font-weight: 600; + color: #FFFFFF; + z-index: 3; +} +.md-stepper-horizontal .md-step:last-child .md-step-circle { +margin-left:0px +} +.md-stepper-horizontal.green .md-step.active .md-step-circle { + background-color:#00AE4D; +} +.md-stepper-horizontal.orange .md-step.active .md-step-circle { + background-color:#CC9B14; +} +.md-stepper-horizontal .md-step.active .md-step-circle { + background-color: rgb(33,150,243); +} +.md-stepper-horizontal .md-step.done .md-step-circle:before { + font-family:'FontAwesome'; + font-weight:100; + content: "\f00c"; +} +.md-stepper-horizontal .md-step.done .md-step-circle *, +.md-stepper-horizontal .md-step.editable .md-step-circle * { + display:none; +} +.md-stepper-horizontal .md-step.editable .md-step-circle { + -moz-transform: scaleX(-1); + -o-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + transform: scaleX(-1); +} +.md-stepper-horizontal .md-step.editable .md-step-circle:before { + font-family:'FontAwesome'; + font-weight:100; + content: "\f040"; +} +.md-stepper-horizontal .md-step .md-step-title { + margin-top: 5px; + font-size: 10px; + font-weight:bold; +} +.md-stepper-horizontal .md-step .md-step-title, +.md-stepper-horizontal .md-step .md-step-optional { + text-align: center; + color:rgba(0,0,0,.26); + margin-left:0 ; +} +.md-stepper-horizontal .md-step.orange .md-step-title, .md-stepper-horizontal .md-step.green .md-step-title { + font-weight: 600; + color:black; +} +.md-stepper-horizontal .md-step.active.done .md-step-title, +.md-stepper-horizontal .md-step.active.editable .md-step-title { + font-weight:600; +} +.md-stepper-horizontal .md-step .md-step-optional { + font-size:10px; +} + +.md-stepper-horizontal .md-step .md-step-bar-left, +.md-stepper-horizontal .md-step .md-step-bar-right { + position: absolute; + top: 36px; + height: 2px; + background: #DDDDDD; + width: 120px; + z-index: 0; + left: 25px; +} + +.md-stepper-horizontal .md-step .md-step-bar-left { + margin-right: 0px; + left: 40%; +} +.orange .md-step-bar-left { +background:#CC9B14 !important; +font-weight: bold; +} +.green .md-step-bar-left { + background:#1FA169 !important; + font-weight: bold; + } +.header{ + height: 15%; + width: 100%; + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 85%; + width: 100%; + position: absolute; + background: #F5F5F5; + top: 15%; +} +.md-step-optional{ + font-size: 12px; + background: #cccccc; + color: #ffffff !important; + padding: 2px 5px 2px 5px; + border-radius: 5px; + margin: 5px; +} +.orange .md-step-optional{ + font-size: 12px; + background: #CC9B14; + color: #ffffff !important; + padding:2px 5px 2px 5px; + border-radius: 5px; + margin-left:0 ; +} +.green .md-step-optional{ + font-size: 12px; + background-color:#00AE4D; + color: #ffffff !important; + padding: 2px 5px 2px 5px; + border-radius: 5px; +} +.green .md-step-circle{ + background-color:#00AE4D !important; +} +.orange .md-step-circle{ + background: #CC9B14 !important; +} +.grey .md-step-circle{ + background: #E3E3E3 !important; +} +.content{ +position: relative; +margin-bottom: 70px; +} +.offering{ + font-weight: bold; + margin: 20px 20px 0px; + position: relative; +} +.offering h2{ + font-weight: bold; + font-size: 20px; + margin-bottom: 0; +} +.sale-icon{ + box-shadow: 1px 1px 5px 1px #cccc; + padding: 10px; + margin: 2px; + border-radius: 15px; + background: #fff; + height: 115px; + position: relative; +} + +.sale-icon ion-icon{ + font-size: 35px; +} +.sale-icon p{ + margin-bottom: 0; + font-size: 12px; + font-weight: bold; + position: absolute; + bottom: 10px; + text-align: left; + padding: 5px; +} +.add-details{ + background: #fff; + margin: 15px; + padding: 10px; + box-shadow: 3px 4px 3px -1px #ccc; + border-radius: 20px; +} +.add-details ion-item{ + border-radius: 25px; + border: 1px solid #cdcd; + padding: 5px; +} +.add-details p{ + font-weight: normal; + font-size: 12px; +} +.add-details ion-label{ + margin: 10px; + position: relative; + bottom: 3px; +} +.add-details ion-radio { + --color-checked: #009688; +} +.image-container{ + position: relative; + height: 70px; +} +.image-container .uploaded{ +position: relative; +} +.image-container .uploaded .closed{ + position: absolute; + right: 0; + font-size: 14px; + color: #fff; + top: -15px; + right: -10px; + font-weight: bolder; + background: red; + padding: 6px; + border-radius: 50%; + text-align: center; + line-height: .7; +} +.image-container .uploaded img{ + width: 70px; +} +.footer-button{ + background: var(--newgreen)!important;border-radius: 10px; --background: transparent; + width: 80%; +} +.description-details .orange{ + color: #CC9B14; + font-weight: bold; + font-size: 14px; +} +.description-details img{ + margin:10px; +} +.waring{ + color: #CA3332; + padding: 10px; + font-size: 10px; + +} +.waring label{ + font-size: 11px; + padding: 0px 10px; + display: inline-block; + position: relative; + position: absolute; +} +.waring img{ + margin: 0px; +} +.selling h2{ + display: inline-block; + font-weight: bolder; + font-size: 25px; +} +.selling strong{ + font-size: 14px; +} +.flaot-button{float:right;margin:30px} +.orange-border{ +border-top:2px solid #CC9B14; +} +.green-border{ + border-top:2px solid #00AE4D; +} +.md-step span{ + position: relative; + z-index: 2; +} +.red-button{ +--background:#CA3332; +} +ion-footer{ + bottom: 0; + position: fixed; +} +.small-btn{ + width: 40%; +} +.uploader-box{ + border-width: 2px; + border-color: #259CB8; + border-style: dotted; + border-radius: 10px; + left: 10px; + +} +.review-title{ + font-size: 14px; + font-weight: bold; +} +.camera-icon{ + font-size: 35px; + position: absolute; + margin: auto; + left: 0; + right: 0; + top: 60px; + bottom: 0; + color: #259CB8; +} +.top img{ + position: absolute; + top: 15px; +} diff --git a/Mohem/src/app/itemforsale/home/home.component.spec.ts b/Mohem/src/app/itemforsale/home/home.component.spec.ts new file mode 100644 index 00000000..5ec1377b --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HomeComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/home/home.component.ts b/Mohem/src/app/itemforsale/home/home.component.ts new file mode 100644 index 00000000..ace51a36 --- /dev/null +++ b/Mohem/src/app/itemforsale/home/home.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'], +}) +export class HomeComponent implements OnInit { + step: any = 1; + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + openItem() { + + + this.cs.navigateForward('/itemforsale/items'); + } + nextStep() { + this.step = 2; + } + openMyAds() { + this.cs.navigateForward('/itemforsale/my-ads'); + } + +} diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.html b/Mohem/src/app/itemforsale/item-details/item-details.component.html new file mode 100644 index 00000000..add7aca6 --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.html @@ -0,0 +1,63 @@ + +
+ + + +
+
+
+
+ + + + + + Furniture Table + + + + Keep close to Nature's heart... and break clear away, once in awhile, + and climb a mountain or spend a week in the woods. Wash your spirit clean. +
+

New

+

500 SAR

+
+ + +
+ + + + + +

Mohammed Imran

+

Posted on 22 April 2020

+

View Profile

+
+ +
+ +
+
+ + +
+
+ + + +
+ + + + {{ts.trPK('sms','title')}} + + + + {{ts.trPK('vacation-rule','call')}} +
+
+
\ No newline at end of file diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.scss b/Mohem/src/app/itemforsale/item-details/item-details.component.scss new file mode 100644 index 00000000..bcd3e47a --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.scss @@ -0,0 +1,79 @@ +.header{ + height: 150px; + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 88%; + width: 100%; + position: absolute; + background: #F5F5F5; + top: 20%; +} +ion-card-header{ + background-color: #fff; + padding: 10px 10px 5px !important; +} +ion-card-header img{ + height: 320px; +} +ion-card-title{ + margin: 15px 10px 0px; +} +ion-card-content{ + padding-top: 0px; + padding-bottom: 0px; +} +.content-bottom{ + padding-top: 15px; +} +.green{ + color:#1FA169; + font-weight: bold; + +} +.content-bottom h1{ + font-size: 22px; + font-weight: bold; +} +.details-button ion-button{ + --background: #565656; + width: 150px; + border-radius: 8px; +} +.profile-title{ + color:#000; + font-weight: bold; +} +.profile-img{ + height: 50px; + width: 50px; + border-radius: 50%; +} +ion-avatar{ + height: 50px; + width: 50px; + text-align: center; +} +ion-avatar p{ + color:#000; +} +ion-avatar a{ + color:#259CB8; + text-decoration: underline; +} +ion-footer{ + position: fixed; + bottom: 0; +} +.icon-footer{ + margin: 0px; + position: relative; + left: -10px; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts b/Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts new file mode 100644 index 00000000..d730d52f --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ItemDetailsComponent } from './item-details.component'; + +describe('ItemDetailsComponent', () => { + let component: ItemDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ItemDetailsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ItemDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/item-details/item-details.component.ts b/Mohem/src/app/itemforsale/item-details/item-details.component.ts new file mode 100644 index 00000000..cae7ea97 --- /dev/null +++ b/Mohem/src/app/itemforsale/item-details/item-details.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-item-details', + templateUrl: './item-details.component.html', + styleUrls: ['./item-details.component.scss'], +}) +export class ItemDetailsComponent implements OnInit { + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + +} diff --git a/Mohem/src/app/itemforsale/itemforsale.module.ts b/Mohem/src/app/itemforsale/itemforsale.module.ts new file mode 100644 index 00000000..6a7aea24 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.module.ts @@ -0,0 +1,50 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Routes, RouterModule } from '@angular/router'; + +import { IonicModule } from '@ionic/angular'; + +import { ItemforsalePage } from './itemforsale.page'; +import { HomeComponent } from './home/home.component'; +import { ItemsComponent } from './items/items.component'; +import { ItemDetailsComponent } from './item-details/item-details.component'; +import { MyAdsComponent } from './my-ads/my-ads.component'; +import { HmgCommonModule } from '../hmg-common/hmg-common.module'; + +const routes: Routes = [ + { + path: '', + component: ItemforsalePage, + children: [ + { + path: 'home', + component: HomeComponent + }, + { + path: 'items', + component: ItemsComponent + }, + { + path: 'items-details', + component: ItemDetailsComponent + }, + { + path: 'my-ads', + component: MyAdsComponent + } + ], + } +]; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + HmgCommonModule, + RouterModule.forChild(routes) + ], + declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent] +}) +export class ItemforsalePageModule { } diff --git a/Mohem/src/app/itemforsale/itemforsale.page.html b/Mohem/src/app/itemforsale/itemforsale.page.html new file mode 100644 index 00000000..d26b79fd --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/itemforsale.page.scss b/Mohem/src/app/itemforsale/itemforsale.page.scss new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.scss @@ -0,0 +1 @@ + diff --git a/Mohem/src/app/itemforsale/itemforsale.page.spec.ts b/Mohem/src/app/itemforsale/itemforsale.page.spec.ts new file mode 100644 index 00000000..e630eb19 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ItemforsalePage } from './itemforsale.page'; + +describe('ItemforsalePage', () => { + let component: ItemforsalePage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ItemforsalePage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ItemforsalePage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/itemforsale.page.ts b/Mohem/src/app/itemforsale/itemforsale.page.ts new file mode 100644 index 00000000..b997aec1 --- /dev/null +++ b/Mohem/src/app/itemforsale/itemforsale.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-itemforsale', + templateUrl: './itemforsale.page.html', + styleUrls: ['./itemforsale.page.scss'], +}) +export class ItemforsalePage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/Mohem/src/app/itemforsale/items/items.component.html b/Mohem/src/app/itemforsale/items/items.component.html new file mode 100644 index 00000000..bab28e0c --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.html @@ -0,0 +1,186 @@ + +
+ + +
+
+ + + {{ts.trPK('itemforsale','title')}} + + + {{ts.trPK('itemforsale','my-posted-ad')}} + + +
+
+
+ +
+
+ +
+ + + + + + + + + + + +

{{ts.trPK('itemforsale','browse-categories')}}

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

Mobile & Tablets

+
+
+
+
+
+
+ +
+
+

Cars & Vehicle

+
+
+
+
+
+
+ +
+
+

Electronic Appliance

+
+
+
+
+
+
+ +
+
+

Fashion & Beauty

+
+
+
+ +
+
+ + + + + + + Furniture Table + + + + Keep close to Nature's heart... and break +

+ Used +

+ + + + 500 SAR + + + + + + + +
+
+
+ + + + + + Furniture Table + + + + Keep close to Nature's heart... and break +

+ New +

+ + + + 500 SAR + + + + + + + +
+
+
+
+
+
+ +
+ + + + + + + +

Furniture Table

+

+ Posted on 24 April 2021 +

+

good condition only 6th month used

+ + +

Pending Review

+
+ + + + +
+
+ +
+
+ +
+ + +
+ + {{ts.trPK('itemforsale','create-new-ad')}} + +
+
+ +
+ \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/items/items.component.scss b/Mohem/src/app/itemforsale/items/items.component.scss new file mode 100644 index 00000000..bcba7e10 --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.scss @@ -0,0 +1,222 @@ + +.header{ + + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} +.bottom{ + height: 100%; + width: 100%; + position: absolute; + background: #F5F5F5; + +} + + +.filterText{ + margin: 5px 15px 15px; + font-size: 18px; + font-weight: bold; +} +.container-icon{ + padding: 0 10px 20px; + position: relative; + white-space:nowrap; + overflow-x:auto; +} + +.box-icon{ + width: 100px; + height: 100px; + margin: 0px; + display: inline-block; +} +.sale-icon{ + box-shadow: 1px 1px 5px 1px #cccc; + padding: 5px; + margin: 5px; + border-radius: 10px; + background: #fff; +} +.sale-icon ion-icon{ + font-size: 25px; +} +.sale-icon p{ + margin-top: 5px; + margin-bottom: 5px; + margin-left: 5px; + font-size: 14px; +} +.bottom-icon{ + text-overflow: clip; + white-space: normal; +} +ion-card-header{ + background: #fff; +} +ion-card-header img{ + margin:15px auto; + border-radius: 6px; + height: 170px; +} +ion-card-title{ + + font-weight: bold; + font-size: 14px; + padding: 5px +} +.orange{ + color: #CC9B14; + font-weight: bold; +} +.green{ + color:#1FA169; + font-weight: bold; +} +ion-card-content p{ + margin-left: 0; + margin-right: 0; + margin-top: 15px; + margin-bottom: 0px; + font-size: 12px; + font-weight: bold; +} +.my-ads ion-item{ + margin: 10px; + --border-radius: 10px; + padding: 15px 10px 0px 10px; + width: 100%; +} +.my-ads ion-thumbnail img{ + position: relative; + top: -10px; + border-radius: 6px; +} +.my-ads .details-text{ + font-size: 11px; + margin: 0; +} +.my-ads .yellow, .my-ads .green{ + font-size: 11px; +} +ion-segment-button{ + --background-checked: #000; + --indicator-color : transparent!important; + border: none; +} +ion-segment-button ion-label{ + padding: 0; + font-size: 16px; + white-space: normal; + font-weight: bold; +} +.segment-button-checked ion-label{ +color: #fff !important; +} +.segment-button-checked{ + background: rgb(46, 46, 46); +} +ion-item.SearchtextBox{ + --background: #fff; + margin: 10px; + --border-radius: 100px; + padding: 5px; +} +ion-item h3{ + color: #000; + font-weight: bold; + font-size: 14px; +} +.yellow{ + color:#CC9B14; + font-weight: bold; +} + +ion-item .icon{ + margin: 5px 0px; +} +.edit{ + position: absolute; + right: 0px; +} +.fab-button{ + position: fixed; + bottom: 5%; + z-index: 2; + right: 10%; +} +.fab-button ion-fab-button{ + --background: #259CB8; +} +ion-footer{ + position: absolute; + bottom: 0; +} +ion-footer .footer-button{ + --background: #259CB8; + width: 80%; + background: #259CB8; + border-radius: 10px; +} +ion-segment{ + height:55px +} +ion-card{ + margin: 0px; + --background: #fff; + --border-radius: 53px; + border-radius: 10px; +} +.filter-icon{ + margin-left: 15px; +} +.top img{ + width: 25px; + height: 30px; + margin: 5px 5px 0px 5px; +} +.forward-arrow{ + color:#259CB8; + font-size: 26px; +} +ion-card-content{ + padding: 0 15px 10px 15px; + font-size: 11px; +} +.label-thumb h2{ + font-size: 14px; + font-weight: bold; +} +.posted-on{ + color: #969696; + float: right; + position: absolute; + top: 0; + right: 0; + font-size: 10px; + margin: 5px; + padding: 0px 5px; +} +.details-text{ + white-space: normal; +} +ion-card-content ion-icon{ +font-size: 25px; +} +ion-card-content strong{ + margin-left: -5px; + font-size: 16px; +} +ion-fab-button{ + height: 60px; + width: 60px; +} +.grid-row{ + margin:10px; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/items/items.component.spec.ts b/Mohem/src/app/itemforsale/items/items.component.spec.ts new file mode 100644 index 00000000..5fb9a465 --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ItemsComponent } from './items.component'; + +describe('ItemsComponent', () => { + let component: ItemsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ItemsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ItemsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/items/items.component.ts b/Mohem/src/app/itemforsale/items/items.component.ts new file mode 100644 index 00000000..73fc2398 --- /dev/null +++ b/Mohem/src/app/itemforsale/items/items.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-items', + templateUrl: './items.component.html', + styleUrls: ['./items.component.scss'], +}) +export class ItemsComponent implements OnInit { + segment: any = '1'; + constructor(public ts: TranslatorService, public cs: CommonService,) { } + + ngOnInit() { } + openDetails() { + this.cs.navigateForward('/itemforsale/items-details'); + } + segmentChanged(value) { + this.segment = value.detail.value; + } + openSale() { + this.cs.navigateForward('/itemforsale/home'); + } + +} diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.html b/Mohem/src/app/itemforsale/my-ads/my-ads.component.html new file mode 100644 index 00000000..935e7403 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.html @@ -0,0 +1,11 @@ + +
+ + + + + {{ts.trPK('itemforsale','title')}} + +
+ +
\ No newline at end of file diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.scss b/Mohem/src/app/itemforsale/my-ads/my-ads.component.scss new file mode 100644 index 00000000..ba158bb6 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.scss @@ -0,0 +1,11 @@ +.header{ + height: 150px; + width: 100%; + + position: absolute; + background: #259CB8; + top: 0; +} +.header-toolbar{ + --background: #259CB8 !important; +} \ No newline at end of file diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts b/Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts new file mode 100644 index 00000000..992ee2d6 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MyAdsComponent } from './my-ads.component'; + +describe('MyAdsComponent', () => { + let component: MyAdsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MyAdsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MyAdsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/itemforsale/my-ads/my-ads.component.ts b/Mohem/src/app/itemforsale/my-ads/my-ads.component.ts new file mode 100644 index 00000000..5c5b34b2 --- /dev/null +++ b/Mohem/src/app/itemforsale/my-ads/my-ads.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-my-ads', + templateUrl: './my-ads.component.html', + styleUrls: ['./my-ads.component.scss'], +}) +export class MyAdsComponent implements OnInit { + + constructor(public ts: TranslatorService, public cs: CommonService,) { } + ngOnInit() { } + +} diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.html b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.html new file mode 100644 index 00000000..471bcca0 --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.html @@ -0,0 +1,127 @@ + + + + + + + + +
+ + +
+ {{ts.trPK('userProfile','ServiceType')}} +
+
+ + + + +
+ + + + {{ticket.typeName}} + + +
+ + + + +
+
+
+ + +
+
+ + + + + + + + + + + + + + +
+
+ {{ts.trPK('userProfile','SupportingDocument')}} +
+
+
+ + +
+ + + + + + + + + + + + + + +
+
+ {{ts.trPK('userProfile','Description')}} +
+ + + + + +
+
+
+
+ +
+ +
+ {{ts.trPK('general','cancel')}} + {{ts.trPK('general','submit')}} +
+
+ + diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss new file mode 100644 index 00000000..c0f5006c --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.scss @@ -0,0 +1,529 @@ + + +.header-toolbar-new{ + --background: #269DB8; + } + + .contentBg{ + padding: 0px 20px; +} + +.contentBg:before { + position: absolute; + content: ""; + background: #269DB8; + height: 140px; + width: 100%; + left: 0; + top: 0px; + z-index: 1; +} + +@media screen and (min-width: 1px) and (max-width:767px){ + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + }} + + @media screen and (min-width: 768px) and (max-width:1024px){ + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + }} + + .user-info{ + text-align: center; + margin-bottom: 3px; + .user-image-container{ + position: relative; + width: 100%; + height: 24px; + justify-content: space-between; + display: flex; + margin: 0 auto; + align-items: center; + }} + + .Boldtext{ + font-size: 13px; + font-family: WorkSans-Bold; + color: black !important; + display: block !important; + // line-height: 0px !important; + } + + .Nametext{ + font-size: 15px; + font-family: WorkSans-Bold; + color: black !important; + display: block !important; + // line-height: 0px !important; + } + + .employee-information-indetail{ + background: white; + margin-top: 15px; + border-radius: 20px; + margin-bottom: 15px; + border-radius: 20px; + border: 1px solid #ccc; + ion-col{ + padding: 15px; + // border-bottom: 1px solid #ccc; + } + h2{ + font-size: 13px; + // font-family: WorkSans-Bold; + margin: 0; + font-weight: bold; + color: rgb(128, 124, 124); + } + p{ + font-size: 13px; + margin: 0; + font-family: WorkSans-Bold; + // margin-bottom: 10px; + } + } + + @media screen and (min-width: 1px) and (max-width:767px){ + .user-image{ + position: relative; + display: block; + width: 95%; + height: 100%; + border-radius: 80px; + /* border: 1px solid #ccc; */ + margin-top: -125px; + + }} + @media screen and (min-width: 768px) and (max-width:1024px){ + .user-image{ + position: relative; + display: block; + width: 95%; + height: 100%; + border-radius: 80px; + margin-bottom: 371px; + }} + + .img{ + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + background: transparent; + border-radius: 70% !important; + position: relative; + top: 3px; + } + + .sendCodeBtn{ + --background: #269DB8; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-left: 5px !important; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 4px; */ + height: 26px; + /* padding: 6px 24px; */ + font-size: 15px; + width: 322px; + } + + .verify-code{ + position: relative; + background: white; + border-radius: 20px; + z-index: 1; + border-radius: 20px; + border: 1px solid #ccc; + padding: 21px 3px 34px 14px; + margin: 25px 22px 2px 22px; + + + } + + + +// .sms_code{ +// margin: 0px; +// text-align: center; +// } + +ion-input { + margin: 0 5px; + text-align: center; + line-height: 0; + font-size: 32px; + //border: solid 1px #ccc; + border: 1px solid #ccc !important; + //box-shadow: 0 0 5px #ccc inset; + outline: none; + width: 20%; + transition: all .2s ease-in-out; + border-radius: 3px; + display: inline-block; + &:focus { + border-color:var(--ion-color-secondary) !important; + box-shadow: 0 0 5px var(--ion-color-secondary) !important; + } + + &::selection { + background: transparent; + } + } + + .sendVerifyBtn{ + --background: #269DB8; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 4px; */ + height: 26px; + font-size: 15px; + width: 322px; + margin-left: 22px; + } + + @media screen and (min-width: 1px) and (max-width:320px){ + .custom-radio .radio-icon { + margin: 0px; + border-radius: 50%; + border-width: var(--border-width); + border-style: var(--border-style); + border-color: #dcdcdc; + margin-top: 6px !important; + border-color: #d8d4d4 !important; + margin-bottom: 18px;} + + .text-label{ + color: black !important; + font-size: 9px; + margin-left: 2px; + margin-right: 2px; + font-family: 'WorkSans-Bold'; + } } + + @media screen and (min-width: 325px){ + .custom-radio .radio-icon { + margin: 0px; + border-radius: 50%; + border-width: var(--border-width); + border-style: var(--border-style); + border-color: #dcdcdc; + margin-top: 6px !important; + border-color: #d8d4d4 !important; + margin-bottom: 18px;} + + .text-label{ + color: black !important; + font-size: 10px; + margin-left: 15px; + margin-right: 13px; + font-family: 'WorkSans-Bold'; + } } + + // .radio-list{ + // background: white; + // margin-left: 18px; + // /* margin-right: 10px; */ + // margin-top: 12px; + // } + + .result-serviceType{ + position: relative; + background: white; + border-radius: 20px; + z-index: 1; + border-radius: 25px; + border: 1px solid #ccc; + margin: 15px; + } + + .request-heading { + span { + display: block; + margin-bottom: 15px; + // padding-top: 8px; + padding-left: 3px; + /* font-weight: bold; */ + font-size: 14px; + font-family: 'WorkSans-Bold'; + } + } + + .filed1{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + margin: 10px; + padding-left: 10px !important; + padding-top: 10px !important; + color: #636161; + padding-bottom: 10px; + width: 130% !important; + } + + .filedDesc{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + // margin: 10px; + padding-left: 20px !important; + padding-top: 6px !important; + color: #636161; + --padding-bottom: 90px; + font-size: 13px; + text-align: start; + } + .filedDesc-ar{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + // margin: 10px; + padding-right: 20px !important; + padding-top: 6px !important; + color: #636161; + --padding-bottom: 90px; + font-size: 13px; + text-align: start; + } + + .labelDesc{ + display: block; + padding-top: 8px; + padding-left: 15px; + font-size: 14px; + font-weight: bold; + color: #adabab; + } + + .selectLabel{ + display: block; + padding-top: 8px; + padding-left: 15px; + font-size: 14px; + /* font-family: 'WorkSans-Bold'; */ + font-weight: bold; + color: black; + } + + + // .cancelRequest{ + // padding: 10px 7px 10px 0px; + // ion-button{ + // border-radius: 7px; + // padding: 12px 30px 12px 30px; + // background: #d00a0a; + // --background: transparent; + // --box-shadow: none !important; + // height: auto; + // min-height: inherit; + // font-size: 16px; + // font-weight: bold; + // margin-top: -5px; + // }} + // .submitRequest{ + // padding: 10px 7px 10px 0px; + // ion-button{ + // border-radius: 7px; + // padding: 12px 30px 12px 30px; + // background: #19a163; + // --background: transparent; + // --box-shadow: none !important; + // height: auto; + // min-height: inherit; + // font-size: 16px; + // font-weight: bold; + // margin-top: -5px; + // }} + + +.gridDiv{ + width: 100%; + height: 40px; + margin-top: 18px; + font-size: 14px; +} + +.gridCancelBtn{ + min-width: auto; + // margin: 0px; + padding: 10px; + border: 1px solid var(--cusgray); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + width: 45%; + height: 100%; + border-radius: 8px; + background: #d00a0a; + color: white; + margin-left: 15px; + margin-right: 5px; + font-family: 'WorkSans-bold'; + font-size: 16px; + min-height: 1.0cm; + --background: #d00a0a !important; +} + +.main-button{ + --box-shadow:none; + } + +.gridSubmitBtn{ + min-width: auto; + // margin: 0px; + padding: 10px; + border: 1px solid var(--cusgray); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + width: 45%; + height: 100%; + border-radius: 8px; + background: #19a163; + color: white; + // margin-left: 15px; + // margin-right: 5px; + font-family: 'WorkSans-bold'; + font-size: 16px; + min-height: 1.0cm; + --background: #19a163 !important;} + + + .filed-container{ + margin-right: -17px; + margin-left: -25px; + } + + .labels{ + display: block; + margin-top: 15px; + padding-top: 8px; + padding-left: 3px; + font-size: 14px; + font-family: 'WorkSans-Bold'; + } + + .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 315px; + } + .footer{ + padding: 15px 0px 0px 0px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + .Btn{ + margin: auto; text-align: center; display: block; + } + .footer2{ + padding: 15px 0px 0px 24px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + + ion-footer .footer-button{ + --background: #259CB8; + width: 80%; + } + @media screen and (min-width: 325px){ + .fileUpload { + position: relative; + overflow: hidden; + margin: 10px; + margin-left: -233px; + }} + @media screen and (min-width: 1px) and (max-width:320px){ + .fileUpload { + position: relative; + overflow: hidden; + margin: 10px; + margin-left: -158px; + + }} + + .fileUpload input.upload { + position: absolute; + top: 0; + right: 0; + margin: 0; + padding: 0; + font-size: 20px; + cursor: pointer; + opacity: 0; + filter: alpha(opacity=0); + } + + .iconButton .imgSize{ + width: 10px !important; + height: 10px; + } + + button.iconButton.button.button-ios.button-default.button-default-ios, +button.iconButton.button.button-md.button-default.button-default-md { + padding: 0px; +} + +select option[data-default] { + color: #888; + } + + .Field-en{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 20px; + padding-left: 20px !important; + padding-top: 6px !important; + color: #999999 !important; + } + + .Field-ar{ + border-radius: 30px; + border: 1px solid #a2a5a6!important; + margin-bottom: 20px; + padding-right: 20px !important; + padding-top: 6px !important; + color: #999999 !important; + } + + .button-native { + box-shadow: none!important; + } \ No newline at end of file diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.spec.ts b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.spec.ts new file mode 100644 index 00000000..c9dda9a7 --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HrRequestFormComponent } from './hr-request-form.component'; + +describe('HrRequestFormComponent', () => { + let component: HrRequestFormComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HrRequestFormComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HrRequestFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts new file mode 100644 index 00000000..d0b0d3bb --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request-form/hr-request-form.component.ts @@ -0,0 +1,420 @@ +import { Component, OnInit } from '@angular/core'; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { MowadhafiService } from '../mowadhafi.service'; +import { Location } from '@angular/common'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { LoginModel } from 'src/app/authentication/models/LoginModel'; +import { SendActivationByType } from 'src/app/authentication/models/sendActivationByType'; +import { FileUploader } from 'ng2-file-upload'; +@Component({ + selector: 'app-hr-request-form', + templateUrl: './hr-request-form.component.html', + styleUrls: ['./hr-request-form.component.scss'], +}) +export class HrRequestFormComponent implements OnInit { + public EmpName: string; + public EmpNum: string; + public EmpGroup: string; + public EmpMobile: string; + public EmpJob: string; + public EmpOrgName: string; + public EmpPayrol: string; + public EmpPosition: string; + public EmpEmail: string; + public EmpCatMeaning: string; + public EmpGRADENAME: string; + public EmpLocation: string; + public EmpImg: string; + public userImage: any = '../assets/imgs/profile.png'; + public loginData = new LoginModel(); + public searchKeySelect = 'Complaints'; + myColor: string = 'secondary'; + public showRequestDetails = false; + public proID = "CS" + public inquiry: string; + public HR: string; + public complaints: string; + public Projectresult: any; + public EmpRelations: any; + public Hr: any; + public Payroll: any; + public GovRelation: any; + public projName: any; + public topicName: any; + public departTypeList: any; + public topicTypeList: any; + public sectionTypeList: any; + public projectDetial: any; + public projectDep: any; + public sectionDep: any; + public projectCode; + public SelectedServiceType: any; + public depType: any =""; + public secType: any =""; + public topicType: any =""; + indexLastObj: any; + addAttachRequest: any = []; + TransactionID: any; + public teckitDetial: any; + public teckitInfo: any; + public Description: any; + public selectedFile: any; + filterAllowedType: any = [ + "application/pdf", + "image/jpeg", + "image/png", + "text/plain", + "image/jpg", + "application/vnd.ms-excel", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + ]; + projctid:any; + employeeNumber:any; + ticketType: any =[]; + public direction: string; + HRServices = ''; + Complaints=''; + Inquiry=''; + input = document.getElementById ("firstLabel"); + + + + constructor( + public ts: TranslatorService, + public cs: CommonService, + public authService: AuthenticationService, + public sharedData: SharedDataService, + public events: Events, + public MowadhafiService: MowadhafiService, + private location: Location, + private menu: MenuController, + + + ) { + this.direction = TranslatorService.getCurrentLanguageName(); + } + + ngOnInit() { + this.projectCode = this.cs.sharedService.getSharedData("projcet-code",false); + this.getTicketTypes(); + this.getProject(); + + + } + + + public isValidForm(): boolean { + if (this.depType && this.SelectedServiceType && this.secType && this.topicType) { + return false; + } + return true; +} + + + onSelectChange(event, type) { + const value = event.target.value; + console.log(value); + // this.topicTypeList =[]; + // this.sectionTypeList =[]; + if(type==1){ + this.depType = value; + this.sectionTypeList =[]; + this.topicTypeList =[]; + this.getDepartmentSections(value); + + }else if(type==2){ + this.getSectionTopics(value); + this.topicTypeList =[]; + } + + } + + onFileSelectedclick(event){ + event.target.value = ''; + } + + + + goback() { + this.location.back(); + + } + + showSelectedField() { } + + getTicketTypes() { + const request = { + EmployeeNumber: "", + + }; + this.MowadhafiService.getTicketTypes(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlegetTicketTypesResult(result); + + }) + } + handlegetTicketTypesResult(result) { + this.ticketType =result.Mohemm_Itg_TicketTypesList; + + } + + ///////////////////////////////////////////////// + + getProject() { + const request = { + EmployeeNumber: "", + ItgProjectCode: this.projectCode + + }; + this.MowadhafiService.getProject(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlegetProjectResult(result); + + }) + } + handlegetProjectResult(result) { + this.Projectresult = result.Mohemm_Itg_ProjectsList; + this.projctid=this.Projectresult[0].projectId; + this.getProjectDepartments(); + } + +//////////////////////////////////////////////////// + getProjectDepartments() { + const request = { + EmployeeNumber: "", + ItgProjectId: this.Projectresult[0].projectId, + + + }; + this.MowadhafiService.getProjectDepartments(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlegetProjectDepartmentsResult(result); + + }) + } + handlegetProjectDepartmentsResult(result) { + this.departTypeList = result.Mohemm_ITG_ProjectDepartmentsList; + // this.getDepartmentSections(); + + } + ////////////////////////////////////////////////////// + + getDepartmentSections(value) { + const request = { + EmployeeNumber: "", + ItgProjectDepartmentId: value ?value : this.departTypeList.projectDepartmentId, + + + }; + this.MowadhafiService.getDepartmentSections(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlegetDepartmentSectionsResult(result); + + }) + } + handlegetDepartmentSectionsResult(result) { + this.sectionTypeList = result.Mohemm_ITG_DepartmentSectionsList; + // this.getSectionTopics(); + } + + getSectionTopics(value=null) { + const request = { + EmployeeNumber: "", + // ItgDepartmentSectionId: this.sectionTypeList.departmentSectionId, + ItgDepartmentSectionId: value ?value : this.sectionTypeList.departmentSectionId, + + }; + this.MowadhafiService.getSectionTopics(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlegetSectionTopicsResult(result); + + }) + } + handlegetSectionTopicsResult(result) { + // this.topicName=result.Mohemm_ITG_SectionTopicsList[0].topicName + this.topicTypeList = result.Mohemm_ITG_SectionTopicsList; + + + } + + + /*******************Create Ticket Function*************/ + + CreateTicket() { + + var authUser =this.authService.getAuthenticatedRequest(); + this.cs.startLoading(); + var request = new FormData(); + request.append('ticketTypeId', this.SelectedServiceType); + request.append('projectId', this.projctid); + request.append('departmentId', this.depType); + request.append('sectionId', this.secType); + request.append('sectionTopicId', this.topicType); + request.append('description', this.Description); + console.log("TEST:______") + console.log(this.selectedFile); + if(this.selectedFile && this.selectedFile !== undefined){ + request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name); + } + request.append('employeeNumber', authUser.P_USER_NAME); + request.append('ticketStatus', 'new'); + request.append('channelId', '3'); + request.append('Channel', authUser.Channel.toString()); + request.append('LogInToken', authUser.LogInTokenID); + request.append('Token', authUser.TokenID); + request.append('EmployeeNumber', authUser.P_USER_NAME); + request.append('MobileNo', authUser.MobileNumber); + + + this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.cs.stopLoading(); + this.handlegetCreateTicketResult(result); + this.checkERM('After Service Submission'); + //hear you have to redirect page + + this.cs.openMyRequestPage(); + }) + } + handlegetCreateTicketResult(result) { + + + } + + + + + + public cancelRequest() { + this.cs.openMyRequestPage(); + // this.menu.toggle(); + } + + + /*******************Add attchement Functions*************/ + public uploader: FileUploader = new FileUploader({ + allowedMimeType: [ + "application/pdf", + "image/jpeg", + "image/png", + "text/plain", + "image/jpg", + "application/vnd.ms-excel", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + ], + maxFileSize: 10 * 1024 * 1024, + formatDataFunctionIsAsync: true, + formatDataFunction: async item => { + return new Promise((resolve, reject) => { + resolve({ + name: item._file.name, + length: item._file.size, + contentType: item._file.type, + date: new Date() + }); + }); + } + }); + + + + + onFileSelected(input) { + if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { + let msg: string = ""; + msg = this.ts.trPK("general", "noFileSelect"); + this.cs.presentAlert(msg); + return; + } // todo: show alert that you tried uploading wrong files + else { + const file = input.target.files[0]; + this.selectedFile = input.target.files; + + + this.getBase64(file).then(data => + this.pushObject(data, file.name, file.type) + ); + } + } + + + getBase64(file) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); + } + + pushObject(fileData, name, type) { + + this.indexLastObj++; + try { + let array = name.split("."); + let attachType: string = array[array.length - 1]; + + this.addAttachRequest.push({ + AttachmentID: this.indexLastObj, + P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1], + P_FILE_DATA: fileData.split(",")[1], + P_FILE_NAME: name, //.split('.')[0], + P_TRANSACTION_ID: this.TransactionID + }); + } catch (e) { } + } + + removeFile(objectitem) { + let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem); + this.uploader.queue.splice(objIndex1, 1); + let objIndex = this.addAttachRequest.findIndex( + item => item.AttachmentID == objectitem.AttachmentID + ); + this.addAttachRequest.splice(objIndex, 1); + } + + + submitRequest() { + + } + + + checkERM(status) { + + this.authService.checkAds({ + EmployeeNumber: '', + ItgEnableAt: status, //After Service Submission + ItgServiceName: "Ticket" + }, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => { + + var result = JSON.parse(res.Mohemm_ITG_ResponseItem).result.data; + + this.cs.sharedService.setSharedData( + result, + AuthenticationService.SERVEY_DATA + ) + if (!CommonService.SKIP && result) { + if (result.notificationType == 'Survey') { + this.cs.navigateForward('/erm-channel/survey'); + } else { + this.authService.adsDetails({ + "ItgNotificationMasterId": result['notificationMasterId'] + }, + () => { }, this.ts.trPK('general', 'ok') + ).subscribe((result) => { + var data = result.Mohemm_ITG_ResponseItem; + if (data) { + this.cs.sharedService.setSharedData( + JSON.parse(data), + AuthenticationService.ADS_DATA + ); + this.cs.navigateForward('/erm-channel/home'); + } + + }) + } + } + }) + + } + +} diff --git a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html new file mode 100644 index 00000000..d201af44 --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.html @@ -0,0 +1,132 @@ + + + + + + + +
+
+ +
+ +
+ + +
{{ts.trPK('userProfile','profile-details')}}
+
+ +

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

+

{{EmpCatMeaning}}

+ +
+ +

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

+

{{EmpLocation}}

+ +
+ +

{{ts.trPK('userProfile','phone-no')}}

+

{{EmpMobile}}

+ +
+ +

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

+

{{EmpOrgName}}

+ +
+ +

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

+

{{EmpPosition}}

+ +
+ +

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

+

{{EmpPayrol}}

+
+ + +

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

+

{{EmpPosition}}

+ +
+ +

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

+

{{EmpGRADENAME}}

+ +
+
+
+ +
+ + + + + + + + + + + +
+ + +
+ {{ts.trPK('userProfile','createHR-Request')}} +
+
diff --git a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss new file mode 100644 index 00000000..3999867e --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.scss @@ -0,0 +1,616 @@ + + +.header-toolbar-new{ + --background: #269DB8; + } + ion-content { + --ion-background-color: whitesmoke; +} + .contentBg{ + padding: 0px 20px; +} + +.contentBg:before { + position: absolute; + content: ""; + background: #269DB8; + height: 140px; + width: 100%; + left: 0; + top: 0px; + z-index: 1; +} + +@media screen and (min-width: 1px) and (max-width:767px){ + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + }} + + @media screen and (min-width: 768px) and (max-width:1024px){ + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + }} + + .user-info{ + text-align: center; + margin-bottom: 3px; + .user-image-container{ + position: relative; + width: 100%; + height: 24px; + justify-content: space-between; + display: flex; + margin: 0 auto; + align-items: center; + }} + + .Boldtext{ + // font-size: 13px; + // font-family: WorkSans-Bold; + // color: black !important; + // display: block !important; + text-align: center; + // font: normal normal 600 16px/19px Poppins; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 16px; + line-height: 19px; + + } + .p{ + text-align: center; + // font: normal normal 600 13px/0px Poppins; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 13px; + line-height: 0px; + } + .p1{ + text-align: center; + // font: normal normal 600 13px/6px Poppins; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 13px; + line-height: 6px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + } + .Nametext{ + // font-size: 15px; + // font-family: WorkSans-Bold; + // color: black !important; + // display: block !important; + text-align: center; + /* font: normal normal 600 21px/31px Poppins; */ + letter-spacing: -0.84px; + color: #2B353E; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 21px; + font-size: 21px; + + } + + .title{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 12px; + margin-bottom: -22px; + } + + .title-ar{ + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 12px; + margin-bottom: -22px; + } + + .employee-information-indetail{ + background: white; + // margin-top: 15px; + border-radius: 20px; + // margin-bottom: 15px; + border-radius: 20px; + border: 1px solid #ccc; + ion-col{ + padding: 15px; + // border-bottom: 1px solid #ccc; + } + h2{ + // font-size: 13px; + // margin: 0; + // font-weight: bold; + // color: rgb(128, 124, 124); + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 0px; + font-size: 13px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + } + p{ + // font-size: 13px; + // margin: 0; + // font-family: WorkSans-Bold; + + text-align: left; + // font: normal normal 600 16px/5px Poppins; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 5px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + + + } + } + + .employee-information-indetail-ar{ + background: white; + // margin-top: 15px; + border-radius: 20px; + // margin-bottom: 15px; + border-radius: 20px; + border: 1px solid #ccc; + ion-col{ + padding: 15px; + // border-bottom: 1px solid #ccc; + } + h2{ + // font-size: 13px; + // margin: 0; + // font-weight: bold; + // color: rgb(128, 124, 124); + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 0px; + font-size: 13px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + } + p{ + // font-size: 13px; + // margin: 0; + // font-family: WorkSans-Bold; + + text-align: right; + // font: normal normal 600 16px/5px Poppins; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 5px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + + + } + } + + @media screen and (min-width: 1px) and (max-width:767px){ + .user-image{ + position: relative; + display: block; + width: 95%; + height: 100%; + border-radius: 80px; + /* border: 1px solid #ccc; */ + margin-top: -125px; + + }} + @media screen and (min-width: 768px) and (max-width:1024px){ + .user-image{ + position: relative; + display: block; + width: 95%; + height: 100%; + border-radius: 80px; + margin-bottom: 371px; + }} + + .img{ + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + background: transparent; + border-radius: 70% !important; + position: relative; + top: 3px; + } + + .sendCodeBtn{ + --background: #269DB8; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-left: 5px !important; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 4px; */ + height: 26px; + /* padding: 6px 24px; */ + font-size: 15px; + width: 322px; + } + + .verify-code{ + position: relative; + background: white; + border-radius: 20px; + z-index: 1; + border-radius: 20px; + border: 1px solid #ccc; + padding: 21px 3px 34px 14px; + margin: 25px 22px 2px 22px; + + + } + + + +// .sms_code{ +// margin: 0px; +// text-align: center; +// } + +ion-input { + margin: 0 5px; + text-align: center; + line-height: 0; + font-size: 32px; + //border: solid 1px #ccc; + border: 1px solid #ccc !important; + //box-shadow: 0 0 5px #ccc inset; + outline: none; + width: 20%; + transition: all .2s ease-in-out; + border-radius: 3px; + display: inline-block; + &:focus { + border-color:var(--ion-color-secondary) !important; + box-shadow: 0 0 5px var(--ion-color-secondary) !important; + } + + &::selection { + background: transparent; + } + } + + .sendVerifyBtn{ + --background: #269DB8; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 4px; */ + height: 26px; + font-size: 15px; + width: 322px; + margin-left: 22px; + } + + .custom-radio .radio-icon { + margin: 0px; + border-radius: 50%; + border-width: var(--border-width); + border-style: var(--border-style); + border-color: #dcdcdc; + margin-top: 6px !important; + border-color: #d8d4d4 !important; + margin-bottom: 18px;} + + .text-label{ + color: black !important; + font-size: 10px; + margin-left: 15px; + margin-right: 18px; + font-family: 'WorkSans-Bold'; + } + + // .radio-list{ + // background: white; + // margin-left: 18px; + // /* margin-right: 10px; */ + // margin-top: 12px; + // } + + .result-serviceType{ + position: relative; + background: white; + border-radius: 20px; + z-index: 1; + border-radius: 25px; + border: 1px solid #ccc; + margin: 15px; + } + + .request-heading { + span { + display: block; + margin-bottom: 15px; + // padding-top: 8px; + // padding-left: 15px; + /* font-weight: bold; */ + font-size: 14px; + font-family: 'WorkSans-Bold'; + } + } + + .filed1{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + margin: 10px; + padding-left: 11px !important; + padding-top: 6px !important; + color: #636161; + padding-bottom: 15px; + // padding-right: 252px; + padding-right: 115px; + } + .filed2{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + margin: 10px; + padding-left: 11px !important; + padding-top: 6px !important; + color: #636161; + padding-bottom: 15px; + // padding-right: 252px; + padding-right: 153px; + } + .filed3{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + margin: 10px; + padding-left: 11px !important; + padding-top: 6px !important; + color: #636161; + padding-bottom: 15px; + // padding-right: 252px; + padding-right: 61px; + } + .filedDesc{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + // margin: 10px; + padding-left: 20px !important; + padding-top: 6px !important; + color: #636161; + --padding-bottom: 90px; + font-size: 13px; + text-align: start; + } + .filedDesc-ar{ + border-radius: 30px; + border: 1px solid #d3d5d5 !important; + // margin: 10px; + padding-right: 20px !important; + padding-top: 6px !important; + color: #636161; + --padding-bottom: 90px; + font-size: 13px; + text-align: start; + } + + .labelDesc{ + display: block; + padding-top: 8px; + padding-left: 15px; + font-size: 14px; + font-weight: bold; + color: #adabab; + } + + .selectLabel{ + display: block; + padding-top: 8px; + padding-left: 15px; + font-size: 14px; + /* font-family: 'WorkSans-Bold'; */ + font-weight: bold; + color: black; + } + + + // .cancelRequest{ + // padding: 10px 7px 10px 0px; + // ion-button{ + // border-radius: 7px; + // padding: 12px 30px 12px 30px; + // background: #d00a0a; + // --background: transparent; + // --box-shadow: none !important; + // height: auto; + // min-height: inherit; + // font-size: 16px; + // font-weight: bold; + // margin-top: -5px; + // }} + // .submitRequest{ + // padding: 10px 7px 10px 0px; + // ion-button{ + // border-radius: 7px; + // padding: 12px 30px 12px 30px; + // background: #19a163; + // --background: transparent; + // --box-shadow: none !important; + // height: auto; + // min-height: inherit; + // font-size: 16px; + // font-weight: bold; + // margin-top: -5px; + // }} + + +.gridDiv{ + width: 100%; + height: 40px; + margin-top: 18px; + font-size: 14px; +} + +.gridCancelBtn{ + min-width: auto; + // margin: 0px; + padding: 10px; + border: 1px solid var(--cusgray); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + width: 45%; + height: 100%; + border-radius: 8px; + background: #d00a0a; + color: white; + margin-left: 15px; + margin-right: 5px; + font-family: 'WorkSans-bold'; +} + +.gridSubmitBtn{ + min-width: auto; + // margin: 0px; + padding: 10px; + border: 1px solid var(--cusgray); + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + width: 45%; + height: 100%; + border-radius: 8px; + background: #19a163; + color: white; + // margin-left: 15px; + // margin-right: 5px; + font-family: 'WorkSans-bold';} + + + .filed-container{ + margin-right: -17px; + margin-left: -25px; + } + + .labels{ + display: block; + margin-top: 15px; + padding-top: 8px; + padding-left: 15px; + font-size: 14px; + font-family: 'WorkSans-Bold'; + } + + @media screen and (min-width: 325px) { .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 315px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + }} + @media screen and (min-width: 1px) and (max-width:320px) { + .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 231px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + }} + + + .footer{ + padding: 15px 0px 0px 0px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + .Btn{ + margin: auto; text-align: center; display: block; + } + .footer2{ + padding: 15px 0px 0px 24px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + + ion-footer .footer-button{ + --background: #259CB8; + width: 80%; + } + + .fileUpload { + position: relative; + overflow: hidden; + margin: 10px; + margin-left: -233px; + } + .fileUpload input.upload { + position: absolute; + top: 0; + right: 0; + margin: 0; + padding: 0; + font-size: 20px; + cursor: pointer; + opacity: 0; + filter: alpha(opacity=0); + } + + .hL{ + line-height: 19px !important; + } \ No newline at end of file diff --git a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.spec.ts b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.spec.ts new file mode 100644 index 00000000..c5507cea --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HRRequestComponent } from './hr-request.component'; + +describe('HrRequestComponent', () => { + let component: HRRequestComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HRRequestComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HRRequestComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts new file mode 100644 index 00000000..149a8596 --- /dev/null +++ b/Mohem/src/app/mowadhafi/hr-request/hr-request.component.ts @@ -0,0 +1,153 @@ +import { Component, OnInit } from '@angular/core'; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { MowadhafiService } from '../mowadhafi.service'; +import { Location } from '@angular/common'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { LoginModel } from 'src/app/authentication/models/LoginModel'; +import { SendActivationByType } from 'src/app/authentication/models/sendActivationByType'; +import { FileUploader } from 'ng2-file-upload'; + +@Component({ + selector: 'app-hr-request', + templateUrl: './hr-request.component.html', + styleUrls: ['./hr-request.component.scss'], +}) +export class HRRequestComponent implements OnInit { + + public EmpName: string; + public EmpNum: string; + public EmpGroup: string; + public EmpMobile: string; + public EmpJob: string; + public EmpOrgName: string; + public EmpPayrol: string; + public EmpPosition: string; + public EmpEmail: string; + public EmpCatMeaning: string; + public EmpGRADENAME: string; + public EmpLocation: string; + public EmpImg: string; + public userImage: any = '../assets/imgs/profile.png'; + public loginData = new LoginModel(); + + + + + public direction: string; + constructor( + public ts: TranslatorService, + public cs: CommonService, + public authService: AuthenticationService, + public sharedData: SharedDataService, + public events: Events, + public MowadhafiService: MowadhafiService, + private location: Location, + private menu: MenuController, + + ) { + this.direction = TranslatorService.getCurrentLanguageName(); + } + + ngOnInit() { + this.getUserInformation(); + this.checkERM('Before Service Initiation'); + + + } + + goback() { + this.location.back(); + + } + + getUserInformation() { + const request = { + // P_SELECTED_EMPLOYEE_NUMBER:"121816", + P_SELECTED_RESP_ID: -999, + P_PAGE_NUM: 1, + P_PAGE_LIMIT: 1 + + }; + this.MowadhafiService.getUserInfo(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handleUserInfoResult(result); + + }) + } + + handleUserInfoResult(result) { + this.EmpName = result.MemberInformationList[0].EMPLOYEE_NAME; + console.log("____________" + this.EmpName); + this.EmpNum = result.MemberInformationList[0].EMPLOYEE_NUMBER; + this.EmpGroup = result.MemberInformationList[0].BUSINESS_GROUP_NAME; + this.EmpMobile = result.MemberInformationList[0].EMPLOYEE_MOBILE_NUMBER; + // this.EmpJob = result.MemberInformationList[0].JOB_NAME; + this.EmpOrgName = result.MemberInformationList[0].ORGANIZATION_NAME; + this.EmpPayrol = result.MemberInformationList[0].PAYROLL_NAME; + // this.EmpPosition = result.MemberInformationList[0].POSITION_NAME; + + let jobTitle = result.MemberInformationList[0].POSITION_NAME + jobTitle = jobTitle.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.EmpPosition = jobTitle[0] + " " + jobTitle[1]; + }​ else { + this.EmpPosition = ''; + } + + this.EmpEmail = result.MemberInformationList[0].EMPLOYEE_EMAIL_ADDRESS; + this.EmpCatMeaning = result.MemberInformationList[0].EMPLOYMENT_CATEGORY_MEANING; + this.EmpGRADENAME = result.MemberInformationList[0].GRADE_NAME; + this.EmpLocation = result.MemberInformationList[0].LOCATION_NAME; + this.EmpImg = result.MemberInformationList[0].EMPLOYEE_IMAGE + // console.log("total no "+this.EmpTotal) + } + + + public createRequest() { + this.cs.openHRRequestFormPage(); + // this.menu.toggle(); + } + checkERM(status) { + + this.authService.checkAds({ + EmployeeNumber: '', + ItgEnableAt: status, //After Service Submission + ItgServiceName: "Ticket" + }, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => { + + var result = JSON.parse(res.Mohemm_ITG_ResponseItem).result.data; + + this.cs.sharedService.setSharedData( + result, + AuthenticationService.SERVEY_DATA + ) + if (!CommonService.SKIP && result) { + if (result.notificationType == 'Survey') { + this.cs.navigateForward('/erm-channel/survey'); + } else { + this.authService.adsDetails({ + "ItgNotificationMasterId": result['notificationMasterId'] + }, + () => { }, this.ts.trPK('general', 'ok') + ).subscribe((result) => { + var data = result.Mohemm_ITG_ResponseItem; + if (data) { + this.cs.sharedService.setSharedData( + JSON.parse(data), + AuthenticationService.ADS_DATA + ); + this.cs.navigateForward('/erm-channel/home'); + } + + }) + } + } + }) + + } + +} diff --git a/Mohem/src/app/mowadhafi/mowadhafi.module.ts b/Mohem/src/app/mowadhafi/mowadhafi.module.ts new file mode 100644 index 00000000..7d06791f --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.module.ts @@ -0,0 +1,52 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Routes, RouterModule } from '@angular/router'; + +import { IonicModule } from '@ionic/angular'; + +import { MowadhafiPage } from './mowadhafi.page'; +import { HmgCommonModule } from '../hmg-common/hmg-common.module'; +import {MyRequestComponent} from './my-request/my-request.component'; +import {HRRequestComponent} from './hr-request/hr-request.component'; +import {RequestDetailsComponent} from'./request-details/request-details.component'; +import {HrRequestFormComponent} from './hr-request-form/hr-request-form.component'; + +const routes: Routes = [ + { + path: '', + component: MowadhafiPage, + children:[{ + path: 'my-request', + component: MyRequestComponent + }, + { + path: 'hr-request', + component: HRRequestComponent + }, + { + path: 'request-details', + component: RequestDetailsComponent + }, + { + path: 'hr-request-form', + component: HrRequestFormComponent + } + + + ] + } +]; + +@NgModule({ + imports: [ + HmgCommonModule, + CommonModule, + FormsModule, + IonicModule, + RouterModule.forChild(routes) + ], + declarations: [MowadhafiPage,MyRequestComponent,HRRequestComponent + ,RequestDetailsComponent,HrRequestFormComponent] +}) +export class MowadhafiPageModule {} diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.html b/Mohem/src/app/mowadhafi/mowadhafi.page.html new file mode 100644 index 00000000..f5a9c2de --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.page.html @@ -0,0 +1,10 @@ + + + + + diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.scss b/Mohem/src/app/mowadhafi/mowadhafi.page.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts b/Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts new file mode 100644 index 00000000..0cbe6701 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MowadhafiPage } from './mowadhafi.page'; + +describe('MowadhafiPage', () => { + let component: MowadhafiPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MowadhafiPage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MowadhafiPage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/mowadhafi.page.ts b/Mohem/src/app/mowadhafi/mowadhafi.page.ts new file mode 100644 index 00000000..f1bfcc21 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-mowadhafi', + templateUrl: './mowadhafi.page.html', + styleUrls: ['./mowadhafi.page.scss'], +}) +export class MowadhafiPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts b/Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts new file mode 100644 index 00000000..11f58d27 --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { MowadhafiService } from './mowadhafi.service'; + +describe('MowadhafiService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: MowadhafiService = TestBed.get(MowadhafiService); + expect(service).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/mowadhafi.service.ts b/Mohem/src/app/mowadhafi/mowadhafi.service.ts new file mode 100644 index 00000000..20f13c9a --- /dev/null +++ b/Mohem/src/app/mowadhafi/mowadhafi.service.ts @@ -0,0 +1,123 @@ +import { Injectable } from '@angular/core'; +import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; +import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { HttpClient, HttpHeaders } from '@angular/common/http'; +@Injectable({ + providedIn: 'root' +}) +export class MowadhafiService { + public static EMPLOYEE_SHARED_DATA = 'employee'; + public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES'; + public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS'; + public static getUserInfo = 'Services/ERP.svc/REST/Get_UserInformation'; + public static getTicketTypes = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTypes'; + public static getProject = 'Services/COCWS.svc/REST/Mohemm_ITG_GetProjects'; + public static getProjectDepartments = 'Services/COCWS.svc/REST/Mohemm_ITG_GetProjectDepartments'; + public static getDepartmentSections = 'Services/COCWS.svc/REST/Mohemm_ITG_GetDepartmentSections'; + public static getSectionTopics = 'Services/COCWS.svc/REST/Mohemm_ITG_GetSectionTopics'; + public static getTicketsByEmployee = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketsByEmployee'; + public static getTicketStatisticsByEmp = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee'; + public static getTicketTransaction = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction'; + public static getTicketDetails = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails'; + public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicket'; + + constructor( + public con: ConnectorService, + private authService: AuthenticationService, + public http: HttpClient + ) { } + public getEmployeeSubordinates(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getMyTeam, request, onError, errorLabel); + } + + public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getSuborinateStatus, request, onError, errorLabel); + } + + public getUserInfo(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getUserInfo, request, onError, errorLabel); + } + public getTicketTypes(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + console.log(request); + return this.con.post(MowadhafiService.getTicketTypes, request, onError, errorLabel); + } + public getProject(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + // request.ItgProjectCode = request.projectCode; + return this.con.post(MowadhafiService.getProject, request, onError, errorLabel); + } + public getProjectDepartments(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + request.ItgProjectDepartmentId = absence.ItgProjectDepartmentId; + return this.con.post(MowadhafiService.getProjectDepartments, request, onError, errorLabel); + } + public getDepartmentSections(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + request.ItgDepartmentSectionId = absence.ItgProjectDepartmentId; + return this.con.post(MowadhafiService.getDepartmentSections, request, onError, errorLabel); + } + public getSectionTopics(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + return this.con.post(MowadhafiService.getSectionTopics, request, onError, errorLabel); + } + public getTicketsByEmployee(absence: any, onError?: any, errorLabel?: string) { + let request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + return this.con.post(MowadhafiService.getTicketsByEmployee, request, onError, errorLabel); + } + + public getTicketStatisticsByEmp(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + return this.con.post(MowadhafiService.getTicketStatisticsByEmp, request, onError, errorLabel); + } + + public getTicketTransaction(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + return this.con.post(MowadhafiService.getTicketTransaction, request, onError, errorLabel); + } + + public getTicketDetails(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.EmployeeNumber = request.P_USER_NAME; + return this.con.post(MowadhafiService.getTicketDetails, request, onError, errorLabel); + } + + public getCreateTicket(absence: any, onError?: any, errorLabel?: string) { + const request = absence; + this.authService.authenticateRequest(request); + request.employeeNumber = request.P_USER_NAME; + const HttpUploadOptions = { + headers: new HttpHeaders({ "Content-Type": "multipart/form-data", }) + } + // return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel); + + return this.http.post(ConnectorService.host + MowadhafiService.getCreateTicket, absence, { + reportProgress: true, + observe: 'events' + } + ) + } + +} \ No newline at end of file diff --git a/Mohem/src/app/mowadhafi/my-request/my-request.component.html b/Mohem/src/app/mowadhafi/my-request/my-request.component.html new file mode 100644 index 00000000..dab49ddb --- /dev/null +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.html @@ -0,0 +1,51 @@ + + + + + + + +
+ + +
+
{{ticket.ticketTypeName}}
+
{{ts.trPK('userProfile','postedDate')}} {{(ticket.created)?.substring(0,10)}}
+
+ + {{ticket.description}} + + {{ticket.ticketStatusName}} +
+
+
+ +
+
+ +
+ {{ts.trPK('work-list','No-data-available')}} +
+
+ +
+ {{ts.trPK('userProfile','createHR-Request')}} +
+
+ diff --git a/Mohem/src/app/mowadhafi/my-request/my-request.component.scss b/Mohem/src/app/mowadhafi/my-request/my-request.component.scss new file mode 100644 index 00000000..f331455b --- /dev/null +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.scss @@ -0,0 +1,253 @@ + + +ion-content { + --ion-background-color: whitesmoke; +} + + .empty-en{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 0px 0px 100px; + } + .empty-ar{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 100px 0px 0px; + } + + .result-container{ + // position: relative; + // background: white; + // border-radius: 20px; + // z-index: 1; + // margin: 15px; + // border-radius: 10px; + // border: 1px solid #ccc; + background: #FFFFFF 0% 0% no-repeat padding-box; + box-shadow: 0px 0px 5px #00000029; + border-radius: 10px; + opacity: 1; + } + .text{ + // font-size: 15px; + // margin-top: -9px; + // font-family: 'WorkSans-bold'; + //font-weight: 600; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // width: 77px; + // height: 20px; + text-align: left; + letter-spacing: -0.56px; + color: #2B353E; + opacity: 1; + font-size: 14px; + line-height: 11px; + + } + + // @media screen and (min-width: 325px){ + // .date{ + // margin-top: -9px; + // margin-right: -49px; + // color: gray; + // font-size: 12px; + // }} + + // @media screen and (min-width: 1px) and (max-width:320px) { + // .date{ + // margin-top: -9px; + // margin-right: -55px; + // color: gray; + // font-size: 12px; + // margin-left: -88px; + // }} + + // @media screen and (min-width: 325px){ + // .date-ar{ + // margin-top: -9px; + // // margin-right: -49px; + // color: gray; + // font-size: 12px; + // }} + + // @media screen and (min-width: 1px) and (max-width:320px) { + // .date-ar{ + // margin-top: -9px; + // margin-right: -55px; + // color: gray; + // font-size: 12px; + // margin-left: -88px; + // }} + .date{ + text-align: left; + letter-spacing: -0.4px; + color: #969696; + opacity: 1; + // font-weight: 600; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 10px; + line-height: 16px; + } + .desc{ + // width: 287px; + // height: 32px; + text-align: left; + // font: normal normal medium 11px/16px Poppins; + letter-spacing: -0.44px; + color: #535353; + opacity: 1; + font-family: var(--fontFamilyPoppins-Medium, inherit); + // font-weight: 500; + font-size: 11px; + line-height: 16px; + } + .status{ + color: #259CB8; + width: 75px; + height: 15px; + text-align: left; + letter-spacing: -0.4px; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // font-family: 'Poppins'; + //font-weight: 600; + font-size: 10px; + line-height: 16px; + } + + @media screen and (min-width: 300px){ + .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 315px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + }} + + @media screen and (min-width: 1px) and (max-width:290px) { + .CreateBtn{ + --background: var(--newgreen) !important; + background: var(--newgreen) !important; + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 1.0cm; + --border-radius: 7px !important; + border-radius: 7px !important; + --min-height: 1.6cm !important; + width: 257px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + }} + + .footer{ + padding: 15px 0px; + background-color: var(--light) !important; + border: 0px !important; + box-shadow: none !important; + -webkit-box-shadow: none; + } + .Btn{ + margin: auto; text-align: center; display: block; + } + + .New{ + margin-top: 5px; + color: #1FA169; + font-family:'WorkSans-bold'; + } + + .ReOpen{ margin-top: 5px; + color: #1FA169; + font-family:'WorkSans-bold';} + .AssToManager{ margin-top: 5px; + color: #259CB8; + font-family:'WorkSans-bold';} + .AssToSpec{ margin-top: 5px; + color: #259CB8; + font-family:'WorkSans-bold';} + .Pending{ margin-top: 5px; + color: #E29D03; + font-family:'WorkSans-bold';} + .BackToSpec{ margin-top: 5px; + color: #3A476E; + font-family:'WorkSans-bold';} + .Closed{ margin-top: 5px; + color: #CA3332; + font-family:'WorkSans-bold';} + .BackToManager{ margin-top: 5px; + color: #3A476E; + font-family:'WorkSans-bold';} + .AssignedToHR{ margin-top: 5px; + color: #259CB8; + font-family:'WorkSans-bold';} + + .empty-en{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 0px 0px 100px; + } + .empty-ar{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 100px 0px 0px; + } + + .no-data-available { + background: white; + font-family: WorkSans-Regular; + padding: 30px; + position: absolute; + left: 85px; + bottom: 40%; + } + .show{ + background-color: white; + border: none; + color: black; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-left: 120px !important; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 30px; */ + height: 26px; + padding: 6px 24px; + } + + .show-ar{ + background-color: white; + border: none; + color: black; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-right: 120px !important; + margin-top: 15px !important; + margin-bottom: 20px !important; + // border-radius: 30px; + height: 26px; + padding: 6px 24px; + } + + .div{ + position: relative; + display: flex; + justify-content: space-between; + } \ No newline at end of file diff --git a/Mohem/src/app/mowadhafi/my-request/my-request.component.spec.ts b/Mohem/src/app/mowadhafi/my-request/my-request.component.spec.ts new file mode 100644 index 00000000..a7e6eb81 --- /dev/null +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MyRequestComponent } from './my-request.component'; + +describe('MyRequestComponent', () => { + let component: MyRequestComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MyRequestComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MyRequestComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/my-request/my-request.component.ts b/Mohem/src/app/mowadhafi/my-request/my-request.component.ts new file mode 100644 index 00000000..06e83aa2 --- /dev/null +++ b/Mohem/src/app/mowadhafi/my-request/my-request.component.ts @@ -0,0 +1,106 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { MowadhafiService } from '../mowadhafi.service'; +import { Location } from '@angular/common'; + +@Component({ + selector: 'app-my-request', + templateUrl: './my-request.component.html', + styleUrls: ['./my-request.component.scss'], +}) +export class MyRequestComponent implements OnInit { + public direction: String; + public ticketsInfo : any = []; + public ticketCount = 10; + public ticketPage = 1; + public increseCount = 0; + public ticketTotal :any; + + @Input() + ngClass:string |string[]| Set| {[klass:string]:any;} + + constructor( + public ts: TranslatorService, + public cs: CommonService, + public authService: AuthenticationService, + public sharedData: SharedDataService, + public events: Events, + public MowadhafiService: MowadhafiService, + private location: Location, + private menu: MenuController, + + ) { + this.direction = TranslatorService.getCurrentLanguageName(); + } + + ngOnInit() { + this.cs.startLoading(); + this.getTicketsByEmployee(); + } + + goback() { + this.location.back(); + + } + + public openHRRequestPage() { + this.cs.openHRRequestPage(); + // this.menu.toggle(); + } + + public openRequestDetailsPage(item) { + this.cs.sharedService.setSharedData(item,'ticket-info') + this.cs.openRequestDetailsPage(); + // this.menu.toggle(); + } + + + getTicketsByEmployee() { + const request = { + // TokenID:"xxx", + EmployeeNumber: "", + ItgPageSize: this.ticketCount, + ItgPageNo: this.ticketPage + + }; + this.MowadhafiService.getTicketsByEmployee(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + this.handlegetTicketsByEmployeeResult(result); + + }) + } + + handlegetTicketsByEmployeeResult(result){ + this.ticketsInfo=result.Mohemm_ITG_TicketsByEmployeeList; + this.ticketTotal=this.ticketsInfo[0].totalItemsCount; + console.log("length______________________-."); + console.log(this.ticketsInfo.length); + this.ticketCount += 10; + // this.ticketPage += 1; + // if(this.ticketsInfo.length > this.ticketCount){ + // this.ticketCount = this.ticketsInfo.length - this.ticketCount; + // }else{ + // this.ticketCount = this.ticketCount * this.increseCount + // } + // this.increseCount++; + // this.ticketPage = this.increseCount; + // let x; + // if(this.cs.validResponse(result)){ + // x = JSON.parse(result.Mohemm_ITG_ResponseItem); + // console.log(x); + // this.ticketsInfo=x.result.data; + // for (let i = 0; i < this.ticketsInfo.length; i++) { + // // console.log(i + ' : ' + this.ticketsInfo[i].ticketTypeName) + + // } + // console.log("length______________________-."); + // console.log(this.ticketsInfo.length); + + // } + } + +} diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.html b/Mohem/src/app/mowadhafi/request-details/request-details.component.html new file mode 100644 index 00000000..f4aab9a3 --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.html @@ -0,0 +1,68 @@ + + + + + + + +
+ + +
+
{{status}}
+
{{ts.trPK('userProfile','postedDate')}}{{date}}
+
+ + +

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

+

{{ticketRefre}}

+
+ +

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

+

{{section}}

+
+ +

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

+

{{topic}}

+
+ +

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

+

{{description}}

+
+
+
+
+ +
+ + +
+
+
+ + {{ts.trPK('userProfile','actionBy')}}{{action.actionBy}} +
+

{{action.comments}}

+ +
+
+
+
{{(action.actionDate)?.substring(0,10)}}
+
+
+
+
+
+
+
+ +
+ + diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.scss b/Mohem/src/app/mowadhafi/request-details/request-details.component.scss new file mode 100644 index 00000000..a0ae8e95 --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.scss @@ -0,0 +1,414 @@ + + ion-content { + --ion-background-color: whitesmoke; +} + + .sendCodeBtn{ + --background: #269DB8; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin-left: 23px !important; + margin-top: 15px !important; + margin-bottom: 20px !important; + /* border-radius: 4px; */ + height: 26px; + /* padding: 6px 24px; */ + font-size: 15px; + width: 322px; + } + + .empty-en{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 0px 0px 100px; + } + .empty-ar{ + color: black; + text-align: center; + font-size: 15px; + font-family: WorkSans-Bold; + margin: 50px 100px 0px 0px; + } + + .result-container{ + // position: relative; + // background: white; + + // border-radius: 20px; + // z-index: 1; + // margin: 15px; + // border-radius: 10px; + // border: 1px solid #ccc; + background: #FFFFFF 0% 0% no-repeat padding-box; + box-shadow: 0px 0px 5px #00000029; + border-radius: 10px; + opacity: 1; + } + + .result-containerList{ + // position: relative; + // background: white; + // border-radius: 20px; + // z-index: 1; + // margin: 15px; + // border-radius: 10px; + // border: 1px solid #ccc; + background: #FFFFFF 0% 0% no-repeat padding-box; + box-shadow: 0px 0px 5px #00000029; + border-radius: 10px; + opacity: 1; + } + .text{ + text-align: left; + /* font-family: var(--fontFamilyPoppins-Medium, inherit); */ + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 11px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + + } + + .text-ar{ + text-align: right; + /* font-family: var(--fontFamilyPoppins-Medium, inherit); */ + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 11px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + + } + @media screen and (min-width: 1px) and (max-width:320px) { + .date{ + // margin-right: -38px; + color: gray; + font-size: 12px; + margin-left: -44px; + }} + + @media screen and (min-width: 325px) { + .date{ + // margin-top: -9px; + margin-right: -49px; + color: gray; + font-size: 12px; + }} + + @media screen and (min-width: 1px) and (max-width:320px) { + .date-ar{ + // margin-right: -38px; + color: gray; + font-size: 10px; + margin-left: 58px; + }} + + @media screen and (min-width: 325px) { + .date-ar{ + // margin-top: -9px; + margin-right: -49px; + color: gray; + font-size: 12px; + }} + + .labels{ + // font-size: 13px; + // margin-bottom: 0px; + // margin-top: -10px; + // color: #a9a5a5; + // font-family: 'WorkSans-bold'; + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // font-weight: 600; + line-height: 20px; + font-size: 13px; + // font: normal normal 600 13px/20px Poppins; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + padding-bottom: 3px; + } + .labels-ar{ + // font-size: 13px; + // margin-bottom: 0px; + // margin-top: -10px; + // color: #a9a5a5; + // font-family: 'WorkSans-bold'; + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // font-weight: 600; + line-height: 20px; + font-size: 13px; + // font: normal normal 600 13px/20px Poppins; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + padding-bottom: 3px; + } + .request-list-container { + position: relative; + padding-left: 37px; + clear: both; + min-height: 200px; + padding-top: 15px; + } + .request-list-container:before{ + content: ""; + position: absolute; + height: 100%; + width: 4px; + left: 7px; + top: 15px; + background-color: #f5f4f4; + } + .request-list-container-ar { + position: relative; + padding-left: 60px; + clear: both; + min-height: 200px; + // margin-bottom: 80px; + padding-top: 15px; + } + .request-list-container-ar:before{ + content: ""; + position: absolute; + height: 100%; + width: 4px; + left: 30px; + top: 15px; + right: 6px; + background-color: #dddddd; + } + + .text-span { + position: relative; + display: block; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + // font-weight: 600; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 25px; + font-size: 16px; + } + .text-span:before{ + content: ""; + position: absolute; + left: -35px; + border-radius: 50%; + width: 15px; + height: 15px; + background-color: #269db8; + top: 1px; + } + + .text-span-ar{ + position: relative; + display: block; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + // font-weight: 600; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 25px; + font-size: 16px; + margin-right: 37px; + } + .text-span-ar:before{ + content: ""; + position: absolute; + right: -35px; + border-radius: 50%; + width: 15px; + height: 15px; + background-color: #269db8; + top: 1px; + } + + .action-data{ + background-color: white; + padding: 1px; + border-radius: 20px; + font-family: WorkSans-Regular; + // padding-left: 15px; + margin-right: 20px; + margin-bottom: 15px; + p{ + // font-size: 14px; + text-align: left; + letter-spacing: -0.52px; + color: #535353; + opacity: 1; + //font-weight: 500; + font-family: var(--fontFamilyPoppins-Medium, inherit); + line-height: 18px; + font-size: 13px; + } + } + + .action-data-ar{ + background-color: white; + padding: 1px; + border-radius: 20px; + font-family: WorkSans-Regular; + // padding-left: 15px; + margin-right: 20px; + margin-bottom: 15px; + p{ + // font-size: 14px; + text-align: right; + letter-spacing: -0.52px; + color: #535353; + opacity: 1; + //font-weight: 500; + font-family: var(--fontFamilyPoppins-Medium, inherit); + line-height: 18px; + font-size: 13px; + } + } + .date-span{ + text-align: right; + + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + //font-weight: 600; + line-height: 20px; + font-size: 13px; + // font: normal normal 600 13px/20px Poppins; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + } + // @media screen and (min-width: 325px){ + // .date-span{ + // font-size: 13px; + // margin-bottom: 0px; + // margin-top: -10px; + // color: gray; + // margin-left: 160px; + + // }} + // @media screen and (min-width: 1px) and (max-width:320px) { + // .date-span{ + // font-size: 13px; + // margin-bottom: 0px; + // margin-top: -10px; + // color: gray; + // margin-left: 76px; + + // }} + + // @media screen and (min-width: 1px) and (max-width:320px) { + // .date-span-ar{ + // font-size: 13px; + // margin-bottom: 0px; + // margin-top: -10px; + // color: gray; + // margin-right: 60px; + // }} + + // @media screen and (min-width: 325px){ + // .date-span-ar{ + // font-size: 13px; + // margin-bottom: 0px; + // margin-top: -10px; + // color: gray; + // margin-right: 140px; + // }} + + + .New{ + margin-top: 5px; + color: #1FA169; + font-family:'WorkSans-bold'; + } + + .ReOpen{ margin-top: 5px; + color: #1FA169; + } + .AssToManager{ margin-top: 5px; + color: #259CB8; + } + .AssToSpec{ margin-top: 5px; + color: #259CB8; + } + .Pending{ margin-top: 5px; + color: #E29D03; + } + .BackToSpec{ margin-top: 5px; + color: #3A476E; + } + .Closed{ margin-top: 5px; + color: #CA3332; + } + .BackToManager{ margin-top: 5px; + color: #3A476E; + } + .AssignedToHR{ margin-top: 5px; + color: #259CB8; + } + + // .card-content{ + // margin-left: -3px; margin-right: -9px;} + // .card-content-ar{ + // margin-left: -122px; + // } + + + .status{ + text-align: left; + /* font: normal normal 600 10px/16px Poppins; */ + letter-spacing: -0.4px; + opacity: 1; + + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // font-weight: 600; + line-height: 16px; + font-size: 10px; + color: #269db8; + } + .postedDate{ + text-align: left !important; + // font-weight: 600; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 16px !important; + font-size: 10px !important; + letter-spacing: -0.4px !important; + color: #969696 !important; + opacity: 1 !important; + } + .DescrText{ + text-align: left; + // font: normal normal medium 13px/18px Poppins; + letter-spacing: -0.52px; + color: #535353; + opacity: 1; + // font-weight: 500; + font-family: var(--fontFamilyPoppins-Medium, inherit); + line-height: 5px; + font-size: 13px; + } + .DescrText-ar{ + text-align: right; + // font: normal normal medium 13px/18px Poppins; + letter-spacing: -0.52px; + color: #535353; + opacity: 1; + // font-weight: 500; + font-family: var(--fontFamilyPoppins-Medium, inherit); + line-height: 5px; + font-size: 13px; + } + .div{ + position: relative; + display: flex; + justify-content: space-between; + margin-bottom: -12px; + } + diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts b/Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts new file mode 100644 index 00000000..8d0a3756 --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RequestDetailsComponent } from './request-details.component'; + +describe('RequestDetailsComponent', () => { + let component: RequestDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RequestDetailsComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RequestDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/mowadhafi/request-details/request-details.component.ts b/Mohem/src/app/mowadhafi/request-details/request-details.component.ts new file mode 100644 index 00000000..2c5a6f2e --- /dev/null +++ b/Mohem/src/app/mowadhafi/request-details/request-details.component.ts @@ -0,0 +1,111 @@ +import { Component, OnInit } from '@angular/core'; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; +import { MowadhafiService } from '../mowadhafi.service'; +import { Location } from '@angular/common'; + +@Component({ + selector: 'app-request-details', + templateUrl: './request-details.component.html', + styleUrls: ['./request-details.component.scss'], +}) +export class RequestDetailsComponent implements OnInit { + public direction : String; + public actionInfo:any = []; + public teckitInfo:any; + public description:any; + public section:any; + public topic:any; + public ticketRefre:any; + public date:any; + public status:any; + public teckitDetial:any; + public statusID :any; + + + constructor( + public ts: TranslatorService, + public cs: CommonService, + public authService: AuthenticationService, + public sharedData: SharedDataService, + public events: Events, + public MowadhafiService: MowadhafiService, + private location: Location, + private menu: MenuController, + + ) { + this.direction = TranslatorService.getCurrentLanguageName(); + } + + ngOnInit() { + this.teckitDetial = this.cs.sharedService.getSharedData('ticket-info', true) + this.getTicketDetails(); + this.getTicketTransaction(); + } + + goback() { + this.location.back(); + + } + + + + getTicketTransaction(){ + const request = { + EmployeeNumber:'', + ItgTicketId:this.teckitDetial.ticketId, + + }; + this.MowadhafiService.getTicketTransaction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetTicketTransactionResult(result); + + }) } + handlegetTicketTransactionResult(result){ + let x; + if(this.cs.validResponse(result)){ + x = JSON.parse(result.Mohemm_ITG_ResponseItem); + console.log(x); + this.actionInfo=x.result.data; + for (let i = 0; i < this.actionInfo.length; i++) { + console.log(i + ' : ' + this.actionInfo[i].ticketTypeName) + + } + } + + } + + getTicketDetails(){ + const request = { + EmployeeNumber:'', + ItgTicketId:this.teckitDetial.ticketId, + + }; + this.MowadhafiService.getTicketDetails(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + { + this.handlegetTicketDetailsResult(result); + + }) } + handlegetTicketDetailsResult(result){ + + let res; + if(this.cs.validResponse(result)){ + res = JSON.parse(result.Mohemm_ITG_ResponseItem); + console.log(res); + this.teckitInfo = res.result.data; + this.status =this.teckitInfo.ticketStatusName; + this.statusID =this.teckitInfo.ticketStatusId; + this.date =this.teckitInfo.created.substring(0, 10); + this.ticketRefre =this.teckitInfo.ticketReferenceNo; + this.section = this.teckitInfo.sectionName; + this.topic =this.teckitInfo.topicName; + this.description =this.teckitInfo.description; + } + + } + +} diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index f2837622..f65b4100 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -1,25 +1,131 @@ - - - - - - {{ts.trPK('userProfile','emp-detail')}} - - + + + + +
-
+
- -
+ + +
-
-

+

+

{{ts.trPK('myTeam','todayAttendance')}}

- {{ts.trPK('myTeam','check-in')}} + {{ts.trPK('myTeam','check-in')}}

{{attendanceTrackingList.P_SWIPE_IN | slice:0:-3}}

--:--

- {{ts.trPK('myTeam','check-out')}} + {{ts.trPK('myTeam','check-out')}}

{{attendanceTrackingList.P_SWIPE_OUT | slice:0:-3}}

--:--

@@ -98,16 +217,53 @@
+ +
+ + + +
+
+ + {{ts.trPK('attendance','monthly-attendance-calendar')}} + + + + +
+
+ + + + + + + +
+
- -
-
- {{ts.trPK('myTeam','attendance-statistics')}} -
-
-
-
- {{ts.trPK('attendance','present')}} - {{attendedDays}} +
+ + +
+ {{ts.trPK('attendance-tracking','schedule')}} +

{{timeCardSummaryData?.SCHEDULE_DAYS}}

-
- {{ts.trPK('attendance','absent')}} - {{absentDays}} + + + +
+ {{ts.trPK('attendance-tracking','off-days')}} +

{{timeCardSummaryData?.OFF_DAYS}}

+
+ + +
+ {{ts.trPK('attendance-tracking','non-analyzed')}} +

{{timeCardSummaryData?.NOT_ANALYZED_DAYS}}

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

{{timeCardSummaryData?.SHORTAGE_HRS}}

+
+
+ +
+
+
+
+ + + {{ts.trPK('attendance','present')}} + {{attendedDays}} + +
+
+ + + {{ts.trPK('attendance','absent')}} + {{absentDays}} +
-
+
+

{{totalAttendancePrecentage}}

{{ts.trPK('absenceList','days')}}
- +
+ + + + +
+
+
+ + {{ts.trPK('attendance','monthly-attendance-calendar')}} + + + + + +
+ +
+
+ +
+ + + + + + + +
- - -
- {{ts.trPK('attendance-tracking','schedule')}} -

{{timeCardSummaryData.SCHEDULE_DAYS}}

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

{{timeCardSummaryData.OFF_DAYS}}

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

{{timeCardSummaryData.NOT_ANALYZED_DAYS}}

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

{{timeCardSummaryData.SHORTAGE_HRS}}

-
-
-
+ +
+
- +
-
-
+
+
+
{{ts.trPK('myTeam','my-team-members')}}
+
{{EmployeeTotal}}
+
+ + -
+ + @@ -241,46 +478,49 @@
- - + + + +

{{ts.trPK('userProfile','profile-details')}}

-

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

-

{{employee.LOCATION_NAME}}

+

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

+

{{employee.EMPLOYMENT_CATEGORY_MEANING}}

-

{{ts.trPK('userProfile','phone-no')}}

-

{{employee.EMPLOYEE_MOBILE_NUMBER}}

+

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

+

{{employee.LOCATION_NAME}}

-

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

-

{{employee.ORGANIZATION_NAME}}

+

{{ts.trPK('userProfile','phone-no')}}

+

{{employee.EMPLOYEE_MOBILE_NUMBER}}

-

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

-

{{employee.JOB_NAME}}

+

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

+

{{employee.ORGANIZATION_NAME}}

-

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

-

{{employee.PAYROLL_NAME}}

+

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

+

{{jobName}}

+

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

+

{{employee.PAYROLL_NAME}}

+
+ -

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

-

{{employee.POSITION_NAME}}

+

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

+

{{jobName}}

-

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

-

{{employee.GRADE_NAME}}

+

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

+

{{employee.GRADE_NAME}}

diff --git a/Mohem/src/app/my-team/details/details.component.scss b/Mohem/src/app/my-team/details/details.component.scss index 136a9943..49b07c86 100644 --- a/Mohem/src/app/my-team/details/details.component.scss +++ b/Mohem/src/app/my-team/details/details.component.scss @@ -32,11 +32,19 @@ ion-title{ text-align: center; margin-bottom: 15px; .user-image-container{ - position: relative; - width: 80px; - height: 80px; - display: block; - margin: 0 auto; + position: relative; + width: 100%; + height: 24px; + justify-content: space-between; + display: flex; + margin: 0 auto; + align-items: center; + } + // position: relative; + // width: 80px; + // height: 80px; + // display: block; + // margin: 0 auto; // &:before{ // position: absolute; // content: ""; @@ -53,16 +61,27 @@ ion-title{ // background-color: green !important; // } } + + @media screen and (min-width: 1px) and (max-width:767px){ .user-image{ - overflow: hidden; - position: relative; - display: block; - width: 100%; - height: 100%; - border-radius: 80px; - border: 1px solid #ccc; - margin: 0px auto 6px; - } + position: relative; + display: block; + width: 30%; + height: 100%; + border-radius: 80px; + /* border: 1px solid #ccc; */ + margin-top: -125px; + + }} + @media screen and (min-width: 768px) and (max-width:1024px){ + .user-image{ + position: relative; + display: block; + width: 30%; + height: 100%; + border-radius: 80px; + margin-bottom: 371px; + }} h1{ margin: 0; padding: 0; @@ -71,18 +90,21 @@ ion-title{ margin-bottom: 4px; } span{ - font-size: 14px; + font-size: 12px; display: block; - color: #888 + // color: #888 + } - } + $actionBtnSize : 36px; .user-actions{ text-align: center; + margin-left: 1px; .action-button{ font-size: 11px; - white-space: nowrap; - color: #888; + font-weight: bold; + // white-space: nowrap; + // color: #888; .action-button-icon{ width: $actionBtnSize; height: $actionBtnSize; @@ -92,33 +114,52 @@ ion-title{ background-color: #269DB8; line-height: $actionBtnSize; margin-bottom: 3px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + display: flex; img{ margin: 0 auto; vertical-align: middle; } + .span{ + font-size: 10px; + display: block; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + } } } } -.employee-information-indetail{ - background: white; - margin-top: 15px; + + .employee-information-indetail{ + background: #FFFFFF 0% 0% no-repeat padding-box; + box-shadow: 0px 0px 5px #00000029; border-radius: 20px; - margin-bottom: 15px; - ion-col{ - padding: 15px; - border-bottom: 1px solid #ccc; - } - h2{ - font-size: 13px; - font-family: WorkSans-Bold; - margin: 0; - font-weight: bold; - } - p{ - font-size: 13px; - margin: 0; - } -} + opacity: 1; + } +// .employee-information-indetail{ +// background: white; +// margin-top: 15px; +// border-radius: 20px; +// margin-bottom: 15px; +// border-radius: 20px; +// border: 1px solid #ccc; +// ion-col{ +// padding: 15px; +// // border-bottom: 1px solid #ccc; +// } +// h2{ +// font-size: 13px; +// // font-family: WorkSans-Bold; +// margin: 0; +// font-weight: bold; +// color: rgb(128, 124, 124); +// } +// p{ +// font-size: 13px; +// margin: 0; +// font-family: WorkSans-Bold; +// // margin-bottom: 10px; +// } +// } .segments-container { border-radius: 100px; @@ -128,33 +169,115 @@ ion-title{ color: black; } -.active-Segment { - font-size: 0.3cm !important; - background: #269DB8 !important; - text-transform: none; - --color-checked: none; - border-radius: 100px; - border:0; - } - .active-Segment ion-label{ - font-size: 11px; - color: white !important; - } - .normal-Segment ion-label{ - color: black !important; - font-size: 11px; - } - .normal-Segment { - font-size: 0.3cm !important; - text-transform: none; - --color-checked: none; - border: 0; - } +@media screen and (min-width: 1px) and (max-width:767px){ + .active-Segment { + width: 11%; + max-width: 11%; + min-width: 39px; + height: 30% !important; + min-height: 39px; + padding-right: -10px; + border-radius: 50% !important; + // margin-right: 22px; + // margin-left: 22px; + margin-left: 19px; + background-color: #269DB8; + display: flex; + } + } + @media screen and (min-width: 768px) and (max-width:1024px){ + .active-Segment{ + + background: #269DB8 !important; + // padding-left: 17px; + // display: flex; + width: 11%; + max-width: 11%; + min-width: 39px; + height: 30% !important; + min-height: 39px; + padding-right: -10px; + border-radius: 50% !important; + padding-left: 6px; + margin-right: 10px; + margin-left: 57px; + // margin-left: 14px; + display: flex; + + }} + + @media screen and (min-width: 1px) and (max-width:767px){ + .normal-Segment { + width: 11%; + max-width: 11%; + min-width: 39px; + height: 30% !important; + min-height: 39px; + padding-right: -10px; + border-radius: 50% !important; + // margin-right: 22px; + // margin-left: 22px; + margin-left: 15px; + background: #414040 !important; + display: flex; + + } + } + @media screen and (min-width: 768px) and (max-width:1024px){ + .normal-Segment{ + width: 11%; + max-width: 11%; + min-width: 39px; + height: 30% !important; + min-height: 39px; + padding-right: -10px; + border-radius: 50% !important; + padding-left: 6px; + margin-right: 10px; + margin-left: 57px; + // margin-left: 14px; + background: #414040 !important; + display: flex; + }} + + + + @media screen and (min-width: 1px) and (max-width:767px){ + .imgSize{ + position: absolute; + /* right: 15px; */ + top: 0; + bottom: 0; + // left: 7px; + margin: auto; + height: 18px; + display: flex; + }} + @media screen and (min-width: 768px) and (max-width:1024px){ + .imgSize{position: absolute; + top: 0; + bottom: 0; + left: 2px; + margin: auto; + height: 28px; + display: flex;}} + + .colum-container{ padding: 15px; border-bottom: 1px solid #ccc; } - + .img{ + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + border-radius: 78% !important; + position: relative; + /* top: 34px; */ + background: transparent; + margin-left: -3px; + } ///////////////////////// Team Members css //////////////////////@extend .filters-row { @@ -207,7 +330,8 @@ ion-title{ /////////////////////////////////////////////////////// Attendance /////////////////////// .header{ - margin-top: 20px; + // margin-top: 20px; + margin-top: 1px; } .slidPrev{ @@ -244,14 +368,47 @@ ion-title{ /* margin-left: 136px; */ margin-right: -251px; } + +@media screen and (min-width: 1px) and (max-width:767px){ .result-graph { position: relative; background: white; - margin-top: 20px; + // margin-top: 20px; + padding-bottom: 5px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; +}} + +@media screen and (min-width: 768px) and (max-width:1024px){ + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 5px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + }} +.result-graph-attendence { + position: relative; + background: white; + // margin-top: 20px; padding-bottom: 20px; border-radius: 20px; z-index: 1; margin-bottom: 10px; + margin-top: 10px; + border-radius: 20px; + border: 1px solid #ccc; } .request-heading { @@ -273,7 +430,7 @@ ion-title{ padding: 0; margin: 0; position: absolute; - left: 50%; + left: 69%; top: 50%; display: block; text-align: center; @@ -292,9 +449,31 @@ ion-title{ font-family: workSans-Regular; } } + @media screen and (min-width: 325px){ + .today-graph { + // width: 100%; + max-height: 4cm; + display: block; + height: 132px; + width: 264px; + margin-left: 154px; + }} + @media screen and (min-width: 1px) and (max-width:320px) { .today-graph { - width: 100%; + // width: 100%; + max-height: 4cm; + display: block; + height: 132px; + width: 264px; + margin-left: 84px; + }} + + .today-graph-ar { max-height: 4cm; + display: block; + height: 132px; + width: 264px; + margin-right: -74px; } .green-label{ @@ -359,68 +538,163 @@ ion-title{ .attendance-information{ background: white; border-radius: 20px; - padding: 10px; - @media screen and (min-width: 300px) and (max-width:359px) { + padding: 9px; + font-weight: bolder; + // border-right: 1px solid rgb(221, 221, 221); + + // @media screen and (min-width: 300px) and (max-width:359px) { h2{ padding: 0; margin: 0; - font-size: 14px; + font-size: 10px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); } span{ - font-size: 9px; + font-size: 10px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); } - } + + // } - @media screen and (min-width: 360px) { - h2{ - padding: 0; - margin: 0; - font-size: 18px; - } - span{ - font-size: 11px; - } - } + // @media screen and (min-width: 360px) { + // h2{ + // padding: 0; + // margin: 0; + // font-size: 10px; + // font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // } + // span{ + // font-size: 10px; + // font-family: var(--fontFamilyPoppins-SemiBold, inherit); + // margin-bottom: 3px; + // } + + // } } + @media screen and (min-width: 325px) { + .statsIcon{ + background: white; + margin-left: 12px; + margin-top: 6px; + }} + @media screen and (min-width: 1px) and (max-width:320px) { + .statsIcon{ + background: white; + margin-left: -15px; + margin-top: 6px; + }} + @media screen and (min-width: 325px) { + .statsIcon-ar{ + background: white; +// margin-left: 12px; + margin-top: 6px; +}} +@media screen and (min-width: 1px) and (max-width:320px) { +.statsIcon-ar{ + background: white; + margin-right: -2px; + margin-top: 6px; +}} .month-year-span{ - font-size: 20px; - font-family: WorkSans-Bold; + font-size: 16px; + // font-family: WorkSans-Bold; + font-weight: bold; } .green-label-container{ - border-top: 5px solid #269DB8; - padding: 1px 0px; - margin: 15px 0px + // border-top: 5px solid #269DB8; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #269DB8; + } .blue-label-container{ - border-top: 5px solid #292F42; - padding: 1px 0px; - margin: 15px 0px + // border-top: 5px solid #292F42; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #292F42; + margin-top: 30px; } .span-one{ + // display: block; + // font-size: 12px; + // color: black; display: block; font-size: 12px; color: black; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; + } .span-two{ + // display: block; + // font-size: 22px; display: block; - font-size: 22px; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; font-family: WorkSans-Bold; + +} + +.spa-one{ + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; + +} +.spa-two{ + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; + font-family: WorkSans-Bold; + } .graph-container{ margin-left: -50px; position: relative; margin-right: 50px; } + +.graph-container-ar{ + margin-right: -50px; + position: relative; + margin-left: 50px; +} .label-container{ position: absolute; - width: 20%; - right: 30px; + // width: 20%; + // right: 30px; top: 50%; - margin-top: -60px; + margin-top: -27px; + left: 20px; + } +@media screen and (min-width: 325px){ .attendance-summary .attendance-information { span{ height: 32px; @@ -428,17 +702,37 @@ ion-title{ line-height: 14px; } h2{ - text-align: right; - font-family: WorkSans-Bold; + // text-align: right; + // font-family: WorkSans-Bold; + font-weight: bolder; + font-size: 13px; } -} +}} +@media screen and (min-width: 1px) and (max-width:320px) { +.attendance-summary .attendance-information { + span{ + height: 32px; + display: block; + line-height: 7px; + font-size: 7px; + } + h2{ + // text-align: right; + // font-family: WorkSans-Bold; + font-weight: bolder; + font-size: 13px; + } + +}} .calendar-container{ background: white; margin-bottom: 100px; - margin-top: 20px; + margin-top: 10px; border-radius: 20px; + border: 1px solid #ccc; + padding-bottom: 25px; span{ text-align: left; display: block; @@ -462,4 +756,282 @@ ion-title{ } +.Boldtext{ + // font-size: 13px; + // font-family: WorkSans-Bold; + // color: black !important; + // display: block !important; + text-align: center; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 16px; + line-height: 19px; +} + +.attendence{ + position: relative; + background: white; + border-radius: 20px; + border: 1px solid #ccc; +} + +.attendence-text{ + margin-bottom: 1px; + margin-left: 10px; + // font-family: WorkSans-Bold; + font-size: 16px; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); +} +.stats{ + color: #289DB8; font-size: 9px; + margin-right: 5px; + font-family: 'WorkSans-Bold'; +} + +.stats-ar{ + color: #289DB8; font-size: 9px; + margin-left: 5px; + font-family: 'WorkSans-Bold'; +} + +.text{ + font-size: 16px; + font-weight: bolder; + font-family: 'WorkSans-Bold'; + margin-top: 27px; +} + +.number{ + width: 22px; + height: 20px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + padding-left: 4px; +} + +.number-ar{ + width: 22px; + height: 20px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + padding-right: 4px; +} + +.numberEmp{ + color: white; + font-size: 12px; + font-weight: bolder; + /* margin-left: 3px; */ + padding-top: 2px; +} + +.slider-container{ + padding-bottom: 20px; +} + +.filters-row { + margin-top: 10px; + margin-left: 20px; + } + + .disable-filter { + pointer-events: none; + opacity: .3; + } +.favIcon{ + height: 18px; margin-left: 23px; +} + +.favIcon-ar{ + height: 18px; margin-right: 23px; +} + +.call{ + margin-right: 16px; +} + +.call-ar{ + margin-left: 16px; +} +.name{ + text-align: center; + letter-spacing: -0.84px; + color: #2B353E; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 21px; + font-size: 21px; +} +.email{ + text-align: center; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 13px; + line-height: 6px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + padding-top: 3px; +} +.subTitle{ + text-align: center; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 13px; + line-height: 0px; +} +.profile{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 20px; + margin-bottom: 2px; +} +.label1{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 0px; + font-size: 13px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; +} + +.label2{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 5px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; +} + +.profile-ar{ + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 20px; + margin-bottom: 2px; +} +.label1-ar{ +text-align: right; +font-family: var(--fontFamilyPoppins-SemiBold, inherit); +line-height: 0px; +font-size: 13px; +letter-spacing: -0.52px; +color: #A2A2A2; +opacity: 1; +} + +.label2-ar{ +text-align: right; +font-family: var(--fontFamilyPoppins-SemiBold, inherit); +line-height: 5px; +font-size: 16px; +letter-spacing: -0.64px; +color: #2B353E; +opacity: 1; +} +@media screen and (min-width: 768px) and (max-width:1024px){ +.div{ + position: relative; + display: flex; + margin-left: 48px; + +}} +@media screen and (min-width: 1px) and (max-width:767px){ +.div{ + position: relative; + display: flex; + margin-left: -1px; +}} + +.MyTeamdiv{ + position: relative; + display: flex; + margin-bottom: -12px; +} +.numberEmp{ + color: white; + font-size: 12px; + font-weight: bolder; + /* padding-top: 5px; */ + /* padding-right: 20px; */ + margin-left: 13px; + width: 23px; + height: 23px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + /* padding-left: 4px; */ + text-align: center; + padding-top: 3px; +} + +.numberEmp-ar{ + color: white; + font-size: 12px; + font-weight: bolder; + /* padding-top: 5px; */ + /* padding-right: 20px; */ + margin-right: 13px; + width: 23px; + height: 23px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + /* padding-left: 4px; */ + text-align: center; + padding-top: 3px; +} + +.MyTeamtext{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 11px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 30px; + margin-bottom: 28px; +} + + .btnTitle{ + text-align: center; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 10px; + font-size: 11px; + color: #4D4D4D; + margin-top: -13px; + } +.btnDiv{ + position: relative; + display: flex; + justify-content: space-between; + margin-bottom: -15px; + margin-top: -12px; + +} + + + \ No newline at end of file diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index 42f15451..4a2b0d4a 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -13,6 +13,7 @@ import { GetDayAndHoursDetailsRequest } from 'src/app/time-card/service/models/g import { GetTimeCardSummaryRequest } from 'src/app/time-card/service/models/get-time-card-summary.request'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { AttendanceTrackingResponse } from 'src/app/hmg-common/services/dashbored/attendance-tracking.response'; +import { WorklistService } from 'src/app/notification/service/worklist.service'; @Component({ selector: 'app-details', templateUrl: './details.component.html', @@ -57,7 +58,8 @@ export class DetailsComponent implements OnInit { public yearTitle: string; public activeMonth: any; public currentMonthName = ''; - + favoriteUserList: [] = []; + public showAttendence = false; public showData = false; public currentYear = new Date().getFullYear(); public attendanceTrackingList: any = []; @@ -67,6 +69,7 @@ export class DetailsComponent implements OnInit { year: any; preMonth: number; nextMonth: any; + currentMonth: any; public direction: string; public options = { cutoutPercentage: 80, @@ -85,7 +88,134 @@ export class DetailsComponent implements OnInit { // tslint:disable-next-line: max-line-length public monthsNameArray = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; public monthIndex = new Date().getMonth() + 1; + public EmpTotal = []; + public selectedFilter = ''; + public itemType = ''; + public monthNo: any; + isFavorite = false; + public EmpNumer:any; + public isFavor:any; + public EmployeeTotal:any; + // public activeSegment = 'About'; + + + + public filters = [ + { + // value: '', + name: 'JAN', + active: true, + color: '#0a0a0a', + key: 'January', + monthNo: 1, + disable: false + }, + { + // value: '', + name: 'FEB', + active: false, + color: '#0a0a0a', + key: 'February', + monthNo: 2, + disable: false + }, + { + // value: '', + name: 'MAR', + active: false, + color: '#0a0a0a', + key: 'March', + monthNo: 3, + disable: false + }, + { + // value: '', + name: 'APRIL', + active: false, + color: '#0a0a0a', + key: 'April', + monthNo: 4, + disable: false + }, + { + // value: '', + name: 'MAY', + active: false, + color: '#0a0a0a', + key: 'May', + monthNo: 5, + disable: false + }, + { + // value: '', + name: 'JUN', + active: false, + color: '#0a0a0a', + key: 'June', + monthNo: 6, + disable: false + }, + { + // value: '', + name: 'JUL', + active: false, + color: '#0a0a0a', + key: 'July', + monthNo: 7, + disable: false + }, + { + // value: '', + name: 'AUG', + active: false, + color: '#0a0a0a', + key: 'Augest', + monthNo: 8, + disable: false + }, + { + // value: '', + name: 'SEP', + active: false, + color: '#0a0a0a', + key: 'September', + monthNo: 9, + disable: false + }, + { + // value: '', + name: 'NOV', + active: false, + color: '#0a0a0a', + key: 'November', + monthNo: 10, + disable: false + }, + { + // value: '', + name: 'OCT', + active: false, + color: '#0a0a0a', + key: 'October', + monthNo: 11, + disable: false + }, + { + // value: '', + name: 'DEC', + active: false, + color: '#0a0a0a', + key: 'December', + monthNo: 12, + disable: false + } + ]; + public slideOptsOne = { + slidesPerView: 7, + spaceBetween: 1 + }; + public jobName: any; constructor( public timeCardService: TimeCardService, @@ -96,6 +226,7 @@ export class DetailsComponent implements OnInit { public modalController: ModalController, public authService: AuthenticationService, public dashboardService: DashboredService, + public worklistService: WorklistService, ) { this.direction = TranslatorService.getCurrentLanguageName(); } @@ -111,15 +242,22 @@ export class DetailsComponent implements OnInit { showAttendanceTracking() { this.common.startLoading(); this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false); + console.log(this.employee); + + let jobTitle = this.employee.POSITION_NAME.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + const request = { P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER }; this.dashboardService.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => { - if (this.common.validResponse(result)) { - const key = 'GetAttendanceTrackingList'; - this.attendanceTrackingList = result[key]; - } - }); + if (this.common.validResponse(result)) { + const key = 'GetAttendanceTrackingList'; + this.attendanceTrackingList = result[key]; + } + }); } public segmentChanged(event: any) { @@ -128,8 +266,14 @@ export class DetailsComponent implements OnInit { this.common.startLoading(); this.initAttendance(); } + else if(this.activeSegment != 'Attendance' && this.activeSegment != 'TeamMembers'){ + this.activeSegment = 'About'; + } } + + + initAttendance() { this.data = {}; // tslint:disable-next-line: max-line-length @@ -139,7 +283,10 @@ export class DetailsComponent implements OnInit { this.showData = false; this.nextMonth = new Date().getMonth() + 2; this.preMonth = new Date().getMonth(); - this.calendarConfig(this.common.getMonthName(new Date().getMonth() + 1) , new Date().getFullYear()); + // this.currentActiveIndex = this.nextMonth -1; + this.activeFilter(this.preMonth); + this.calendarConfig(this.common.getMonthName(new Date().getMonth() + 1), new Date().getFullYear()); + } calendarConfig(month?, year?) { @@ -169,26 +316,43 @@ export class DetailsComponent implements OnInit { this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { - console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); this.countAllAttendDays(result.GetDayHoursTypeDetailsList); } }); } + monthCardSliders(monthNo) { + + + /* change + */ + this.currentMonthName = this.direction === 'en' ? this.common.getMonthName(this.monthIndex) : this.common.getMonthNameAr(this.monthIndex); + this.currentYear = new Date().getFullYear(); + this.currentDate = new Date(new Date().getFullYear(), monthNo - 1); + this.showData = false; + this.nextMonth = monthNo;//new Date().getMonth() + 2; + this.preMonth = monthNo - 1;///new Date().getMonth(); + + //end + this.calendarConfig(this.getMonthName(monthNo), this.currentYear); + + + } nextSlide() { if (this.currentMonthName !== this.month) { - this.common.startLoading(); - this.showData = false; - if (this.nextMonth > 12) { - this.currentYear = this.currentYear + 1; - this.nextMonth = 1; - } - this.currentDate = new Date(this.currentYear, (this.nextMonth - 1), 1); - this.calendarConfig(this.getMonthName(this.nextMonth) , this.currentYear); - this.nextMonth = this.nextMonth + 1; - this.preMonth = this.nextMonth - 2; + this.common.startLoading(); + this.showData = false; + if (this.nextMonth > 12) { + this.currentYear = this.currentYear + 1; + this.nextMonth = 1; + } + this.currentDate = new Date(this.currentYear, (this.nextMonth - 1), 1); + this.calendarConfig(this.getMonthName(this.nextMonth), this.currentYear); + this.nextMonth = this.nextMonth + 1; + this.preMonth = this.nextMonth - 2; + } } @@ -196,12 +360,12 @@ export class DetailsComponent implements OnInit { this.common.startLoading(); this.showData = false; if (this.preMonth === 0) { - this.currentYear = this.currentYear - 1; - this.preMonth = 12; + this.currentYear = this.currentYear - 1; + this.preMonth = 12; } this.currentDate = new Date(this.currentYear, (this.preMonth - 1), 1); - console.log(this.currentDate); - this.calendarConfig(this.getMonthName(this.preMonth) , this.currentYear); + + this.calendarConfig(this.getMonthName(this.preMonth), this.currentYear); this.preMonth = this.preMonth - 1; this.nextMonth = this.preMonth + 2; } @@ -226,14 +390,14 @@ export class DetailsComponent implements OnInit { allDays[i].customDaysOff = false; allDays[i].customSchedule = false; allDays[i].customScheduleDate = new Date(allDays[i].SCHEDULE_DATE); - // tslint:disable-next-line: triple-equals + // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].ABSENT_FLAG == 'Y') { 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 + // tslint:disable-next-line: triple-equals } else if (allDays[i].ATTENDED_FLAG == 'N' && allDays[i].DAY_TYPE === 'OFF') { allDays[i].customPresent = false; allDays[i].customAbsent = false; @@ -276,15 +440,24 @@ export class DetailsComponent implements OnInit { this.totalAttendancePrecentage = this.absentDays + this.attendedDays; if (this.totalAttendancePrecentage > 0) { this.data = { + // labels: ['Apsent', 'Present'], datasets: [ { + label: "# of Votes", data: [this.absentDays, this.attendedDays], backgroundColor: [ - '#269DB8', + 'black', '#269DB8' ], - borderWidth: 2 - }] + borderWidth: 1, + // cutoutPrecentage:20 , + + }], + labels: [ + 'Apsent', + 'Present' + + ] }; } } @@ -309,7 +482,7 @@ export class DetailsComponent implements OnInit { return 'July'; case 8: return 'August'; - case 9 : + case 9: return 'September'; case 10: return 'October'; @@ -322,32 +495,32 @@ export class DetailsComponent implements OnInit { } public getMonthNameAr(value: any): any { switch (value) { - case 1: - return 'يناير'; - case 2: - return ' فبراير'; - case 3: - return 'مارس'; - case 4: - return 'أبريل'; - case 5: - return 'مايو'; - case 6: - return 'يونيو'; - case 7: - return 'يوليو'; - case 8: - return 'أغسطس'; - case 9: - return 'سبتمبر'; - case 10: - return ' اكتوبر'; - case 11: - return ' نوفمبر'; - case 12: - return 'ديسمبر'; + case 1: + return 'يناير'; + case 2: + return ' فبراير'; + case 3: + return 'مارس'; + case 4: + return 'أبريل'; + case 5: + return 'مايو'; + case 6: + return 'يونيو'; + case 7: + return 'يوليو'; + case 8: + return 'أغسطس'; + case 9: + return 'سبتمبر'; + case 10: + return ' اكتوبر'; + case 11: + return ' نوفمبر'; + case 12: + return 'ديسمبر'; } -} + } intializeMemberDetail(userID?) { @@ -356,8 +529,8 @@ export class DetailsComponent implements OnInit { this.pageLimit = 50; this.pageNum = 1; this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false); - const employees = this.common.sharedService.getSharedData( DetailsComponent.opendEmployeesARR, false); - if ( employees ) { + const employees = this.common.sharedService.getSharedData(DetailsComponent.opendEmployeesARR, false); + if (employees) { this.opendEmployees.push(this.employee); this.common.sharedService.setSharedData(this.opendEmployees, DetailsComponent.opendEmployeesARR); } @@ -366,6 +539,8 @@ export class DetailsComponent implements OnInit { this.isSpecialist = this.common.sharedService.getSharedData('isSpecialist', false) ? true : false; if (this.employee) { this.getEmpSubordinate(userID); + this.isFavorite = false; + this.getFavorit(); } } @@ -378,14 +553,14 @@ export class DetailsComponent implements OnInit { } else { // tslint:disable-next-line: prefer-for-of for (let i = 0; i < this.opendEmployees.length; i++) { - if (this.opendEmployees[i].EMPLOYEE_NUMBER === this.employee.SUPERVISOR_NUMBER) { - this.common.sharedService.setSharedData( - this.opendEmployees[i], - MyTeamService.EMPLOYEE_SHARED_DATA - ); - break; + if (this.opendEmployees[i].EMPLOYEE_NUMBER === this.employee.SUPERVISOR_NUMBER) { + this.common.sharedService.setSharedData( + this.opendEmployees[i], + MyTeamService.EMPLOYEE_SHARED_DATA + ); + break; + } } - } this.intializeMemberDetail(this.employee.SUPERVISOR_NUMBER); } } @@ -416,8 +591,8 @@ export class DetailsComponent implements OnInit { if (userID) { selEmpNo = userID; } else { - selEmpNo = this.employee.EMPLOYEE_NUMBER; - } + selEmpNo = this.employee.EMPLOYEE_NUMBER; + } const body = { P_SELECTED_EMPLOYEE_NUMBER: selEmpNo, P_SEARCH_EMPLOYEE_NUMBER: searchEmpNum, @@ -428,14 +603,15 @@ export class DetailsComponent implements OnInit { }; this.getEmployeeSubordinatesRequestObject = body; this.myTeamService.getEmployeeSubordinates(body).subscribe((result: any) => { - console.log('one'); + if (this.common.validResponse(result)) { - this.handleEmpResult(result.GetEmployeeSubordinatesList); - } + this.handleEmpResult(result.GetEmployeeSubordinatesList); + } }); } handleEmpResult(result) { + this.EmployeeTotal = result.length; const lastItemIndex = result.length - 1; const lastItem = result[lastItemIndex]; if (lastItem) { @@ -461,23 +637,23 @@ export class DetailsComponent implements OnInit { } else { this.empSubordinate = []; } -} + } -doInfinite(infiniteScroll) { - if (!this.isReachEnd) { - this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => { - console.log('two'); + doInfinite(infiniteScroll) { + if (!this.isReachEnd) { + this.myTeamService.getEmployeeSubordinates(this.getEmployeeSubordinatesRequestObject).subscribe((result: any) => { + if (this.common.validResponse(result)) { this.handleEmpResult(result.GetEmployeeSubordinatesList); } this.infiniteScroll.complete(); }); - } else { - if (this.infiniteScroll) { - this.infiniteScroll.complete(); + } else { + if (this.infiniteScroll) { + this.infiniteScroll.complete(); + } } } -} getDetails(index) { this.common.sharedService.setSharedData(this.empSubordinate[index], MyTeamService.EMPLOYEE_SHARED_DATA); @@ -546,4 +722,158 @@ doInfinite(infiniteScroll) { this.showEmailInput = true; } } + + showCalender() { + if (this.showAttendence) { + this.showAttendence = false + + } else { + this.showAttendence = true + } + } + + // getSuborinatesAttStatus() { + // const request = { + // // SearchMonth: "January", + // // SearchYear: 2021 + // SearchMonth: "", + // SearchYear: Number + + // }; + // // this.myTeamService.getSuborinatesAttStatus().subscribe((result: any) => + // this.myTeamService.getSuborinatesAttStatus(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + // this.handleRespondSuborinatesAttStatusResult(result); + + // }) + // } + + // handleRespondSuborinatesAttStatusResult(result) { + // // this.EmpTotal = result.GetSubordinatesAttdStatusList.length; + // this.EmpTotal = result.GetSubordinatesAttdStatusList[0].NUMBER_OF_EMPLOYEES; + + // } + + activeFilter(index: number) { + + if (this.currentActiveIndex !== index) { + this.previousActiveIndex = this.currentActiveIndex; + this.currentActiveIndex = index; + this.filters[this.previousActiveIndex].active = false; + this.filters[this.currentActiveIndex].active = true; + this.selectedFilter = this.filters[this.currentActiveIndex].key; + } + } + + disableFilters() { + for (const filter of this.filters) { + if (filter.key === this.itemType) { + filter.disable = false; + filter.active = true; + // filter.value = this.nextMonth - 1; + this.selectedFilter = filter.name; + } else if (this.itemType === '') { + filter.disable = false; + filter.active = false; + } else { + filter.disable = true; + filter.active = false; + } + } + if (this.itemType === '') { + this.filters[0].active = true; + } + } + + //save favorite here + + setFavorite(selEmp) { + selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME; + selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; + selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; + var confirmBoxhtml = `
+

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

+
+
+
`; + if (selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + if (!selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + + confirmBoxhtml += `
+ + ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` + + + +
+
` + let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == selEmp.USER_NAME) + if (userIndex == -1) + this.common.presentConfirmDialog( + confirmBoxhtml + , () => { + + var request = + [ { "USER_NAME": this.employee.EMPLOYEE_NUMBER, "EMPLOYEE_DISPLAY_NAME": this.employee.EMPLOYEE_DISPLAY_NAME, "EMAIL_ADDRESS": this.employee.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": this.employee.EMPLOYEE_IMAGE, "IsFavorite": !this.isFavorite}]; + + this.saveUserFavruiteList(request); + // this.isFavorite = false; + + }, () => { + + }) + + // if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + // this.isSelect = true; + // } + // else { + // this.isSelect = false; + + + + // } + } + + getFavruite() { + + this.worklistService.getFavorite({}, () => { + }).subscribe((result) => { + if (this.common.validResponse(result)) { + this.common.stopLoading(); + this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + + + + } + }) + } + saveUserFavruiteList(request) { + this.worklistService.saveFavoriteList(request, () => { + }).subscribe((result) => { + if (this.common.validResponse(result)) { + this.common.toastPK("replacementRoll", "favorite-saved"); + this.isFavorite = !this.isFavorite; + + } + }) + } + + getFavorit(){ + this.worklistService.getFavoriteMyTeam({}, () => { + }).subscribe((result) => { + this.EmpNumer = result.Mohemm_GetFavoriteReplacementsList; + + this.EmpNumer.forEach(element => { + if(element.USER_NAME === this.employee.EMPLOYEE_NUMBER){ + + this.isFavorite = true; + + } + }); + + }); + } + + } diff --git a/Mohem/src/app/my-team/home/home.component.html b/Mohem/src/app/my-team/home/home.component.html index 5af1f667..2280064d 100644 --- a/Mohem/src/app/my-team/home/home.component.html +++ b/Mohem/src/app/my-team/home/home.component.html @@ -7,7 +7,72 @@
-
+
+
+ {{ts.trPK('myTeam','search-by')}} +
+
+ + + + + + {{ts.trPK('searchForReplacment','name')}} + {{ts.trPK('searchForReplacment','name')}} + + + + {{ts.trPK('searchForReplacment','userName')}} + {{ts.trPK('searchForReplacment','userName')}} + + + + {{ts.trPK('searchForReplacment','email')}} + {{ts.trPK('searchForReplacment','email')}} + + + + + + + +
+ + + +
+
+ + + +
+
+
+
+ +
+
+
{{ts.trPK('myTeam','my-team-members')}}
+
{{EmployeeTotal}}
+
+ + + + + -
+ -
+ + + + - \ No newline at end of file + + \ No newline at end of file diff --git a/Mohem/src/app/my-team/home/home.component.scss b/Mohem/src/app/my-team/home/home.component.scss index ded6a0aa..04d07eca 100644 --- a/Mohem/src/app/my-team/home/home.component.scss +++ b/Mohem/src/app/my-team/home/home.component.scss @@ -10,6 +10,11 @@ ion-title{ height: 100%; } +@media only screen and (max-width: 360px) { + .contentBg{ + padding: 0px 15px !important; + } +} .contentBg{ padding: 0px 20px; @@ -29,21 +34,52 @@ ion-content { --ion-background-color: whitesmoke; } .request-heading { + padding-left: 15px; + margin-top: 10px; span { - text-align: center; - display: block; - padding-top: 8px; - font-family: workSans-Regular; + // display: block; + // padding-top: 8px; + // padding-left: 15px; + // font-weight: bold; + // font-size: 12px; + // margin-top: 9px; + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 18px; + font-size: 12px; + letter-spacing: -0.48px; + color: #2B353E; + opacity: 1; } } +.search-label{ + // border: 1px solid #ccc; + // margin-left: 15px; + // margin-right: 15px; + // border-radius: 22px; + // margin-top: 24px; + // font-size: 11px; + // color: rgb(143, 141, 141); + border: 1px solid #ccc; + margin-left: 15px; + margin-right: 15px; + border-radius: 35px; + margin-top: 24px; + font-size: 11px; + color: #8f8d8d; + margin-right: 15px !important; + padding: 10px; +} + .result-graph { position: relative; background: white; margin-top: 20px; - padding-bottom: 20px; + padding-bottom: 35px; border-radius: 20px; z-index: 1; + border: 1px solid #ccc; } .result-text-container { padding: 0; @@ -139,16 +175,24 @@ ion-content { width: 100%; height: 100%; border-radius: 80px; - border: 1px solid #ccc; + border: 1px solid rgb(170, 169, 169); margin: 0px auto 6px; } .search-container{ - margin-top: 15px; + // margin-top: 15px; + // margin-top: -35px; + // margin-left: 262px; + width: 30px; + height: 30px; + position: absolute; + top: 45px; + right: 38px; + z-index: 999999; ion-col{ - background: white; - border-radius: 12px; - padding-right: 10px; + // background: white; + // border-radius: 12px; + // padding-right: 10px; flex: none; ion-icon{ margin-right: 3px; @@ -162,3 +206,156 @@ ion-content { } } } + +// .myClass .toggle-icon { +// background-color: purple; // this changes the background, ie the grey stripe. +// .toggle-inner { +// background-color: yellow; // this changes the backgroundcolor of the toggle dot. +// } +// } + +@media only screen and (max-width: 375px) { + .text-label{ + margin-left: 6px !important; + } +} + +@media only screen and (max-width: 320px) { + .text-label{ + margin-left: 2px !important; + } +} + + +.text-label{ + // --color: black !important; + // font-size: 13px; + // margin-left: 15px; + // margin-right: 18px; + text-align: left; + // font: normal normal 600 12px/18px Poppins; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 18px; + font-size: 12px; + letter-spacing: -0.48px; + color: #575757 !important; + opacity: 1; + margin-left: 15px; + margin-right: 18px; +} + +.radio-list{ + background: white; + // margin-left: 18px; + /* margin-right: 10px; */ + // margin-top: 12px; +} + +// .selected .radio-icon { +// border-color: #0064D9; +// color: red; +// } + + .radio-icon{ + +.custom-radio .radio-icon { + margin: 0px; + border-radius: 50%; + border-width: var(--border-width); + border-style: var(--border-style); + border-color: #dcdcdc; + margin-top: 6px !important; + border-color: #d8d4d4 !important;} +} +.text{ + // font-size: 16px; + // font-weight: bolder; + // font-family: 'WorkSans-Bold'; + // margin-top: 27px; + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 11px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 30px; + margin-bottom: 28px; +} + + +// .number{ +// width: 21px; +// height: 21px; +// padding-right: -10px; +// border-radius: 100%; +// background-color: #269DB8; +// z-index: 9; +// margin-top: 26px; +// } + +// .numberEmp{ +// color: white; +// font-size: 12px; +// font-weight: bolder; +// margin-left: 3px; +// padding-top: 2px; +// } +.number{ + width: 22px; + height: 20px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + padding-left: 4px; +} +.number-ar{ + width: 22px; + height: 20px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + padding-right: 4px; +} +.numberEmp{ + color: white; + font-size: 12px; + font-weight: bolder; + /* padding-top: 5px; */ + /* padding-right: 20px; */ + margin-left: 13px; + width: 23px; + height: 23px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + /* padding-left: 4px; */ + text-align: center; + padding-top: 3px; +} +.numberEmp-ar{ + color: white; + font-size: 12px; + font-weight: bolder; + /* padding-top: 5px; */ + /* padding-right: 20px; */ + margin-right: 13px; + width: 23px; + height: 23px; + border-radius: 100%; + background-color: #269DB8; + z-index: 9; + margin-top: 25px; + /* padding-left: 4px; */ + text-align: center; + padding-top: 3px; +} +.div{ + position: relative; + display: flex; + // justify-content: space-between; + margin-bottom: -12px; +} diff --git a/Mohem/src/app/my-team/home/home.component.ts b/Mohem/src/app/my-team/home/home.component.ts index edc30021..6e5f23da 100644 --- a/Mohem/src/app/my-team/home/home.component.ts +++ b/Mohem/src/app/my-team/home/home.component.ts @@ -7,6 +7,7 @@ import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-respo import { MyTeamService } from '../service/my-team.service'; import { ModalController, IonInfiniteScroll } from '@ionic/angular'; import { DetailsComponent } from '../details/details.component'; +import { Body } from '@angular/http/src/body'; @Component({ selector: 'app-home', templateUrl: './home.component.html', @@ -28,6 +29,10 @@ export class HomeComponent implements OnInit { public selEmpNo: any; public totalEmployees = 0; public pageFirstVisit = false; + myColor: string = 'secondary'; + public EmpTotal = []; + public EmployeeTotal: any; + public direction:any; public options = { cutoutPercentage: 80, @@ -79,9 +84,12 @@ export class HomeComponent implements OnInit { public previousActiveIndex = 0; public currentActiveIndex = 0; public searchNameOrUserName = ''; + public searchUserName = ''; public searchEmail = ''; public showEmailInput = false; public showUserNameOrNameInput = true; + public showUserNameInput = false; + arrList: any[]; constructor( public ts: TranslatorService, @@ -90,12 +98,21 @@ export class HomeComponent implements OnInit { public myTeamService: MyTeamService, public modalController: ModalController, private location: Location - ) {} + ) { + + this.direction = TranslatorService.getCurrentLanguageName(); + } ngOnInit() { this.common.sharedService.setSharedData( [], DetailsComponent.opendEmployeesARR); this.setIntitial(); + + // this.getSuborinatesAttStatus(); } + toggleColor() { + this.myColor = 'secondary'; + // this.myColor = '#269DB8' +} // activeFilter(index: number) { // this.previousActiveIndex = this.currentActiveIndex; @@ -117,16 +134,39 @@ export class HomeComponent implements OnInit { } } - searchEmployee() { - this.isSearch = true; - this.empSubordinate = []; - this.getEmpSubordinate(); + searchEmployee(event) { + // this.isSearch = true; + // this.empSubordinate = []; + // this.getEmpSubordinate(); + const val = event.target.value; + console.log(this.searchKeySelect) + if (val === '') { + this.empSubordinate = this.arrList; + this.isSearch = false; + } + if(this.searchKeySelect === 'Name'){ + this.empSubordinate = this.arrList.filter((item) => { + this.isSearch = true; + return (item.EMPLOYEE_NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } else if(this.searchKeySelect === 'User Name'){ + this.empSubordinate = this.arrList.filter((item) => { + this.isSearch = true; + return (item.EMPLOYEE_NUMBER.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } else if(this.searchKeySelect === 'Email'){ + this.empSubordinate = this.arrList.filter((item) => { + this.isSearch = true; + return (item.EMPLOYEE_EMAIL_ADDRESS.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + } getEmpSubordinate() { this.pageNum = 1; this.isReachEnd = false; - const searchEmpNum = (this.searchKeySelect === 'User Name') ? this.searchNameOrUserName : ''; + const searchEmpNum = (this.searchKeySelect === 'User Name') ? this.searchUserName : ''; const searchEmpName = (this.searchKeySelect === 'Name') ? this.searchNameOrUserName : ''; const searchEmpEmail = (this.searchKeySelect === 'Email') ? this.searchEmail : ''; @@ -157,6 +197,7 @@ export class HomeComponent implements OnInit { } handleEmpResult(result) { + this.EmployeeTotal = result.length; const lastItemIndex = result.length - 1; const lastItem = result[lastItemIndex]; if (lastItem) { @@ -182,6 +223,7 @@ export class HomeComponent implements OnInit { } else { this.empSubordinate = []; } + this.arrList = this.empSubordinate; } doInfinite(infiniteScroll) { @@ -201,12 +243,18 @@ export class HomeComponent implements OnInit { clearSearch() { this.isSearch = false; - this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM = 1; - this.empSubordinate = []; - this.isReachEnd = false; + this.empSubordinate = this.arrList; this.searchNameOrUserName = ''; + this.searchUserName = ''; this.searchEmail = ''; - this.getEmpSubordinate(); + // this.isSearch = false; + // this.getEmployeeSubordinatesRequestObject.P_PAGE_NUM = 1; + // this.empSubordinate = []; + // this.isReachEnd = false; + // this.searchNameOrUserName = ''; + // this.searchUserName = ''; + // this.searchEmail = ''; + // this.getEmpSubordinate(); } getDetails(index) { @@ -220,12 +268,49 @@ export class HomeComponent implements OnInit { } showSelectedField(value: any) { - if (this.searchKeySelect === 'User Name' || this.searchKeySelect === 'User Name') { + if (this.searchKeySelect === 'Name') { this.showEmailInput = false; + this.showUserNameInput = false; this.showUserNameOrNameInput = true; } else if (this.searchKeySelect === 'Email') { this.showUserNameOrNameInput = false; + this.showUserNameInput = false; this.showEmailInput = true; + } else if (this.searchKeySelect === 'User Name') { + this.showUserNameOrNameInput = false; + this.showEmailInput = false; + this.showUserNameInput = true; } } + + + + // getSuborinatesAttStatus(){ + // const request = { + // // SearchMonth:"January", + // SearchYear:Number, + + // }; + // // this.myTeamService.getSuborinatesAttStatus().subscribe((result: any) => + // this.myTeamService.getSuborinatesAttStatus(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> + // { + // this.handleRespondSuborinatesAttStatusResult(result); + + // }) + // } + + // handleRespondSuborinatesAttStatusResult(result){ + // // this.EmpTotal = result.GetSubordinatesAttdStatusList.length; + // this.EmpTotal = result.GetSubordinatesAttdStatusList[0].NUMBER_OF_EMPLOYEES; + // console.log("total no "+this.EmpTotal) + // } + filterList(event) { + const val = event.target.value; + if (val === '') { + this.arrList = this.empSubordinate; + } + this.arrList = this.empSubordinate.filter((item) => { + return (item.title_EN.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } } diff --git a/Mohem/src/app/my-team/my-team.module.ts b/Mohem/src/app/my-team/my-team.module.ts index 784d9bbb..49925b71 100644 --- a/Mohem/src/app/my-team/my-team.module.ts +++ b/Mohem/src/app/my-team/my-team.module.ts @@ -8,12 +8,15 @@ import { IonicModule } from '@ionic/angular'; import { MyTeamPage } from './my-team.page'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; +import { from } from 'rxjs'; +import { WorklistService } from '../notification/service/worklist.service'; + const routes: Routes = [ { path: '', component: MyTeamPage, - children:[{ + children: [{ path: 'home', component: HomeComponent }, @@ -24,8 +27,10 @@ const routes: Routes = [ { path: 'details-2', component: DetailsComponent - } - ] + }, + + + ] } ]; @@ -36,7 +41,10 @@ const routes: Routes = [ FormsModule, IonicModule, RouterModule.forChild(routes) + ], - declarations: [MyTeamPage,HomeComponent,DetailsComponent] + providers: [WorklistService], + declarations: [MyTeamPage, HomeComponent, DetailsComponent, + ] }) -export class MyTeamPageModule {} +export class MyTeamPageModule { } diff --git a/Mohem/src/app/my-team/service/my-team.service.ts b/Mohem/src/app/my-team/service/my-team.service.ts index ebda3f1d..87507d70 100644 --- a/Mohem/src/app/my-team/service/my-team.service.ts +++ b/Mohem/src/app/my-team/service/my-team.service.ts @@ -7,6 +7,9 @@ import { AuthenticationService } from "src/app/hmg-common/services/authenticatio export class MyTeamService { public static EMPLOYEE_SHARED_DATA = 'employee'; public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES'; + // public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS'; + + constructor( public con: ConnectorService, private authService: AuthenticationService @@ -16,4 +19,16 @@ export class MyTeamService { this.authService.authenticateRequest(request); return this.con.post(MyTeamService.getMyTeam, request, onError, errorLabel); } + + // public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){ + // const request = absence; + // this.authService.authenticateRequest(request); + // console.log("________________________________"); + // console.log(request); + // return this.con.post(MyTeamService.getSuborinateStatus, request, onError, errorLabel); + // } + + + + } diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index fc4f266c..66268864 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnInit, ViewChild, NgZone } from '@angular/core'; import { ModalController } from '@ionic/angular'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; @@ -75,6 +75,8 @@ export class HomeComponent implements OnInit { public totalPO = 0; public totalPR = 0; public totalMR = 0; + public totalIC = 0; + public showChart = false; public isPostNoLoad = true; @@ -86,13 +88,14 @@ export class HomeComponent implements OnInit { public data = { datasets: [ { - data: [0, 0, 0, 0, 0], + data: [0, 0, 0, 0, 0, 0], backgroundColor: [ '#18a169', '#38c9b3', '#114475', '#3cb9d5', - '#cc3232' + '#cc3232', + '#9e7e97' ], borderWidth: 5 }] @@ -145,6 +148,14 @@ export class HomeComponent implements OnInit { color: '#cc3232', key: 'ITG', disable: false + }, + { + value: 0, + name: 'IC', + active: false, + color: '#9e7e97', + key: 'INVITEM', + disable: false } ]; public slideOptsOne = { @@ -162,7 +173,8 @@ export class HomeComponent implements OnInit { public WorklistService: WorklistService, public workListService: WorklistMainService, public modalController: ModalController, - public DS: DashboredService + public DS: DashboredService, + public ngZone: NgZone ) { this.WorkListObj = new WorkListRequest(); this.WorkListObj.P_NOTIFICATION_TYPE = '1'; @@ -221,11 +233,15 @@ export class HomeComponent implements OnInit { } assignDataToFilters() { - this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER; - this.filters[1].value = this.totalHR; - this.filters[2].value = this.totalPO; - this.filters[3].value = this.totalPR; - this.filters[4].value = this.totalMR; + this.ngZone.run(() => { + this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER; + this.filters[1].value = this.totalHR; + this.filters[2].value = this.totalPO; + this.filters[3].value = this.totalPR; + this.filters[4].value = this.totalMR; + this.filters[6].value = this.totalIC; + }); + if (this.totalHR === 0) { this.data.datasets[0].data[0] = 0; @@ -243,6 +259,10 @@ export class HomeComponent implements OnInit { this.data.datasets[0].data[3] = 0; } + if (this.totalIC === 0) { + this.data.datasets[0].data[5] = 0; + } + const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; for (const notification of openNotificationsArray) { @@ -258,6 +278,9 @@ export class HomeComponent implements OnInit { } else if (notification.ITEM_TYPE === 'INVMOA') { this.filters[4].value = this.totalMR; this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; + } else if (notification.ITEM_TYPE === 'INVITEM') { + this.filters[6].value = this.totalIC; + this.data.datasets[0].data[5] = notification.OPEN_NTF_NUMBER; } } // this.data.datasets[0].data[4] = this.ITGCount; @@ -290,7 +313,7 @@ export class HomeComponent implements OnInit { } openProfilePage() { - this.common.openProfile(); + this.common.openProfile('sideMenu'); } disableFilters() { @@ -414,14 +437,19 @@ export class HomeComponent implements OnInit { this.totalPR = this.totalPR + 1; } else if (workList.ITEM_TYPE === 'INVMOA') { this.totalMR = this.totalMR + 1; + } else if (workList.ITEM_TYPE === 'INVITEM') { + this.totalIC = this.totalIC + 1; } } categorizeData(arrayToCategorize: any) { - this.totalHR = 0; - this.totalPO = 0; - this.totalPR = 0; - this.totalMR = 0; + this.ngZone.run(() => { + this.totalHR = 0; + this.totalPO = 0; + this.totalPR = 0; + this.totalMR = 0; + this.totalIC = 0; + }) const datePipe = new DatePipe('en-US'); const formattedData = []; @@ -490,6 +518,10 @@ export class HomeComponent implements OnInit { } } else { this.newWorkListResponse = []; + // this.assignDataToFilters(); + if (this.showFormattedData.length === 0) { + this.resetFiltersUI(); + } this.data.datasets[0].data[4] = this.ITGCount; this.showChart = true; // this.common.stopLoading(); @@ -497,6 +529,23 @@ export class HomeComponent implements OnInit { } } + public resetFiltersUI () { + this.ngZone.run(() => { + this.filters[0].value = 0; + this.filters[1].value = 0; + this.filters[2].value = 0; + this.filters[3].value = 0; + this.filters[4].value = 0; + this.filters[6].value = 0; + + this.data.datasets[0].data[0] = 0; + this.data.datasets[0].data[1] = 0; + this.data.datasets[0].data[2] = 0; + this.data.datasets[0].data[3] = 0; + this.data.datasets[0].data[5] = 0; + }); + } + openNotificationDetail(obj) { this.common.sharedService.setSharedData(this.selectedFilter, 'selectedFilter'); this.common.sharedService.setSharedData(false, 'loadWorkList'); @@ -507,6 +556,8 @@ export class HomeComponent implements OnInit { this.common.openWorklistMainPOPage(); } else if (obj.REQUEST_TYPE === 'MO') { this.common.openWorklistMainMRPage(); + } else if (obj.REQUEST_TYPE === 'ITEM_CREATION') { + this.common.openWorklistMainICPage(); } else { this.common.openWorklistMainPage(); } diff --git a/Mohem/src/app/notification/notification.module.ts b/Mohem/src/app/notification/notification.module.ts index e191db27..d9b5da73 100644 --- a/Mohem/src/app/notification/notification.module.ts +++ b/Mohem/src/app/notification/notification.module.ts @@ -28,9 +28,10 @@ import { WorklistMainMRComponent } from './worklist-main-mr/worklist-main-mr.com import { WorklistAdvancedSearchComponent } from './worklist-advanced-search/worklist-advanced-search.component'; import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-itg.component'; // import { WorklistMainComponent } from './worklist-main/worklist-main.component'; -import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component' +import { MoreActionModalComponent } from './more-action-modal/more-action-modal.component' import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component'; import { MoItemHistoryComponent } from './mo-item-history/mo-item-history.component'; +import { WorklistMainIcComponent } from './worklist-main-ic/worklist-main-ic.component'; const routes: Routes = [ @@ -50,7 +51,7 @@ const routes: Routes = [ path: 'worklist-main', component: WorklistMainComponent }, - { + { path: 'work-list-replacement-roll', component: WorkListReplacementRollComponent }, @@ -84,40 +85,44 @@ const routes: Routes = [ component: WorklistMainPRComponent }, { - path: 'apply-action-modal', - component: ApplyActionModalComponent - }, - { - path: 'worklist-main-PO', - component: WorklistMainPoComponent - }, - { - path: 'item-history-PO', - component: ItemHistoryComponent - }, - { - path: 'qutation-analysis-PO', - component: QutationAnalysisComponent - }, - { - path: 'worklist-main-MR', - component: WorklistMainMRComponent - }, - { - path: 'worklist-main-ITG', - component: WorkListMainItgComponent - }, - { - path: 'more-action-modal', - component: MoreActionModalComponent - }, - { - path: 'worklist-replacement-itg', - component: WorkListReplacementItgComponent - }, - { - path: 'item-history-MO', - component: MoItemHistoryComponent + path: 'apply-action-modal', + component: ApplyActionModalComponent + }, + { + path: 'worklist-main-PO', + component: WorklistMainPoComponent + }, + { + path: 'item-history-PO', + component: ItemHistoryComponent + }, + { + path: 'qutation-analysis-PO', + component: QutationAnalysisComponent + }, + { + path: 'worklist-main-MR', + component: WorklistMainMRComponent + }, + { + path: 'worklist-main-ITG', + component: WorkListMainItgComponent + }, + { + path: 'more-action-modal', + component: MoreActionModalComponent + }, + { + path: 'worklist-replacement-itg', + component: WorkListReplacementItgComponent + }, + { + path: 'item-history-MO', + component: MoItemHistoryComponent + }, + { + path: 'item-creation-IC', + component: WorklistMainIcComponent } ] } @@ -153,7 +158,8 @@ const routes: Routes = [ WorklistAdvancedSearchComponent, WorkListMainItgComponent, WorkListReplacementItgComponent, - MoItemHistoryComponent + MoItemHistoryComponent, + WorklistMainIcComponent // WorklistMainComponent ], entryComponents: [ @@ -161,4 +167,4 @@ const routes: Routes = [ ], providers: [WorklistService, WorklistMainService, WorklistAttachService] }) -export class NotificationPageModule {} +export class NotificationPageModule { } diff --git a/Mohem/src/app/notification/service/work-list.main.service.ts b/Mohem/src/app/notification/service/work-list.main.service.ts index b4d19488..dec72b70 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -23,33 +23,22 @@ import { itgRequest } from '../models/itgFormDetailsRequest'; @Injectable() export class WorklistMainService { - public static getEITNotificationBody = - "Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY"; - public static getAbsenceNotificationBody = - "Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY"; - public static getPoNotificationBody = - "Services/ERP.svc/REST/GET_PO_NOTIFICATION_BODY"; - public static getMONotificationBody = - "Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY"; - public static getPRNotificationBody = - "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; + public static getEITNotificationBody = "Services/ERP.svc/REST/GET_EIT_NOTIFICATION_BODY"; + public static getAbsenceNotificationBody = "Services/ERP.svc/REST/GET_ABSENCE_NOTIFICATION_BODY"; + public static getPoNotificationBody = "Services/ERP.svc/REST/GET_PO_NOTIFICATION_BODY"; + public static getMONotificationBody = "Services/ERP.svc/REST/GET_MO_NOTIFICATION_BODY"; + public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; + public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY"; public static getPOItemHistory = "Services/ERP.svc/REST/GET_PO_ITEM_HISTORY"; public static getMOItemHistory = "Services/ERP.svc/REST/GET_MO_ITEM_HISTORY"; - public static getNotificationButtons = - "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS"; + public static getNotificationButtons = "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS"; public static getUserInfo = "Services/ERP.svc/REST/Get_UserInformation"; - public static getNotificationAction = - "Services/ERP.svc/REST/NOTIFICATION_ACTIONS"; - public static getNotificationRespondAtt = - "Services/ERP.svc/REST/NOTIFICATION_GET_RESPOND_ATTRIBUTES"; - public static getQutationAnalysisUrl = - "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS"; - public static getITGFormTaskCount = - 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; - public static getITGFormTaskDetails = - 'Services/COCWS.svc/REST/ITGFormsPendingTasks'; - public static getITGFormDetails = - 'Services/COCWS.svc/REST/ITGGetFormDetials'; + public static getNotificationAction = "Services/ERP.svc/REST/NOTIFICATION_ACTIONS"; + public static getNotificationRespondAtt = "Services/ERP.svc/REST/NOTIFICATION_GET_RESPOND_ATTRIBUTES"; + public static getQutationAnalysisUrl = "Services/ERP.svc/REST/GET_QUOTATION_ANALYSIS"; + public static getITGFormTaskCount = 'Services/COCWS.svc/REST/ITGGetTaskCountRequestType'; + public static getITGFormTaskDetails = 'Services/COCWS.svc/REST/ITGFormsPendingTasks'; + public static getITGFormDetails = 'Services/COCWS.svc/REST/ITGGetFormDetials'; @@ -118,6 +107,21 @@ export class WorklistMainService { ); } + public getICNotificationBody( + WorkListBodyRequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = WorkListBodyRequest; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistMainService.getICNotificationBody, + request, + onError, + errorLabel + ); + } + public getPONotificationBody( WorkListBodyRequest: any, onError?: any, diff --git a/Mohem/src/app/notification/service/worklist.service.ts b/Mohem/src/app/notification/service/worklist.service.ts index 2c719e86..1673443f 100644 --- a/Mohem/src/app/notification/service/worklist.service.ts +++ b/Mohem/src/app/notification/service/worklist.service.ts @@ -15,7 +15,8 @@ export class WorklistService { public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST'; public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST'; public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY'; - + public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements'; + public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements'; constructor( public api: ConnectorService, public authService: AuthenticationService, @@ -50,4 +51,21 @@ export class WorklistService { return this.api.post(WorklistService.getActionHistory, request, onError, errorLabel); } -} \ No newline at end of file + public getFavorite(req: any, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(req); + return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); + } + public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable { + var req: any = {}; + req['Mohemm_ChangeReplacementsInputList'] = request; + this.authService.authenticateRequest(req); + console.log(req); + return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel); + } + + public getFavoriteMyTeam(req: any, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(req); + return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); + } +} + diff --git a/Mohem/src/app/notification/work-list-details/work-list-details.component.html b/Mohem/src/app/notification/work-list-details/work-list-details.component.html index eefc7a43..3c25611b 100644 --- a/Mohem/src/app/notification/work-list-details/work-list-details.component.html +++ b/Mohem/src/app/notification/work-list-details/work-list-details.component.html @@ -38,7 +38,7 @@ - + @@ -54,7 +54,7 @@ - + diff --git a/Mohem/src/app/notification/work-list-details/work-list-details.component.ts b/Mohem/src/app/notification/work-list-details/work-list-details.component.ts index 460148c8..2635ee81 100644 --- a/Mohem/src/app/notification/work-list-details/work-list-details.component.ts +++ b/Mohem/src/app/notification/work-list-details/work-list-details.component.ts @@ -44,6 +44,19 @@ export class WorkListDetailsComponent implements OnInit { this.handleNotificationBody(); } + public formatJobName(title: any) { + let jobName: any; + if (title) { + let jobTitle = title.split('.'); + if (jobTitle && jobTitle.length > 1) { + jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + } else { + jobName = ''; + } + return jobName; + } + getsubmitterInfo(notificationSubmitterInfoObj) { this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj). subscribe((result: WorklistsubmitterInfoResponse) => { diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html index 0f66b227..3cdc7f66 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html @@ -37,11 +37,11 @@
- +
- +
@@ -88,8 +88,70 @@ + - + +
+ +
+
+ +
+
+ + + {{approvalInfo.Name}} + + +
+
+
+ Note: {{approvalInfo.Notes}} +
+
+ + +
+ +
+ Note: {{approvalInfo.Notes}} +
+ +
+
+ + {{approvalInfo.Action}} + + + {{returnDateTime(approvalInfo.Date) }} +
+ + + + + + + + + + + + + +
+
+ + +
+ +
+ @@ -139,11 +203,11 @@
- +
- +
@@ -191,7 +255,7 @@ - + - + - + + if there is additional screen like in VIDA --> +
+ + + + + +

{{ 'submitAbsence, comments' | translate}}

+
+
+ + + + + +
+
+
-
+
- + -
{{'worklistMain, Tran_Succ' | translate}}
+
{{'worklistMain, Tran_Succ' | translate}}
-
+
@@ -466,22 +547,23 @@ - + - - {{action.name}} - Request Info - + + {{action.name}} + + {{'worklistMain, request' | translate}} + - - Skip + + Skip diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss index a2fcbc06..b8bf1e75 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.scss @@ -6,11 +6,38 @@ } .timeline-icon{ - width: 30px !important; + width: 55px !important; } .timeline:before{ position: fixed !important; } .tabs-margin{ margin-left: 0px; -} \ No newline at end of file +} + +@media only screen and (max-width: 320px) { + .footer-btn-img{ + max-width: none !important; + width: 40px !important; + } +} +.footer-btn-img{ + max-width: none; + width: 50px; +} +.timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; + } + + .req_info{ + width: 25px; + height: 25px; + display: inline-block; + margin: 0; + } + + .deligate{ + margin-left: 25px; + } \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts index fd126539..4db168ab 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts @@ -18,20 +18,22 @@ import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-mo export class WorkListMainItgComponent implements OnInit { @ViewChild('slides') slides: IonSlides; - public static APPROVAL = "Services/COCWS.svc/REST/ITGApproveRequest" - public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest' + // tslint:disable: member-ordering + public static APPROVAL = 'Services/COCWS.svc/REST/ITGApproveRequest'; + public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest'; public static DELEGATE = 'Services/COCWS.svc/REST/ITGDelegateRequest'; public static REQUEST_INFORMATION = 'Services/COCWS.svc/REST/ITGRequestInformation'; public static ANSWER = 'Services/COCWS.svc/REST/ITGAnswer'; public static GRANT = 'Services/COCWS.svc/REST/ITGGrantAccess'; + // tslint:disable: variable-name public request_info: any; public request_name: any; public all_request: any; public all_request_names: any; public is_all_items_sents: any; public request = new itgRequest(); - public activeSegment: any = "info"; + public activeSegment: any = 'info'; public request_details: any; public segmentsArray: { name: string, number: number }[] = []; public segmentData: { name: string, data: any }[] = []; @@ -44,7 +46,7 @@ export class WorkListMainItgComponent implements OnInit { public replcamentID: string; public actionSelected: any; public options: any; - public index: number = 0; + public index = 0; public grantDATA: any; public grantInfo: any; public grantFieldsConditionalValue: any = []; @@ -67,7 +69,7 @@ export class WorkListMainItgComponent implements OnInit { public modalCtrl: ModalController) { } ngOnInit() { - this.direction = TranslatorService.getCurrentLanguageName() + this.direction = TranslatorService.getCurrentLanguageName(); this.request_info = this.common.sharedService.getSharedData(HomeComponent.REQUSET_INFO); this.request_name = this.common.sharedService.getSharedData(HomeComponent.REQUSET_NAME); this.all_request = this.common.sharedService.getSharedData(HomeComponent.ALL_REQUEST); @@ -90,25 +92,22 @@ export class WorkListMainItgComponent implements OnInit { this.workListService.getITGFormDetails(this.request).subscribe((result: any) => { this.request_details = result.ITGRequest; this.grantInfo = result.ITGRequest.GrantFields; - let count = 0; for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) { this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i }; - this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields } + this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields }; + // tslint:disable: prefer-for-of for (let j = 0; j < this.segmentData[i].data.length; j++) { - if (this.segmentData[i].data[j].Type === "table") { - this.dataLabelAndValue.push(JSON.parse(this.segmentData[i].data[j].Value)) + if (this.segmentData[i].data[j].Type === 'table') { + this.dataLabelAndValue.push(JSON.parse(this.segmentData[i].data[j].Value)); } - // if (this.segmentData[i].data[j].TableValue){ - // this.requestDetailsData[count] ={ name:this.segmentData[i].data[j].TableValue.Header, - // data: this.segmentData[i].data[j].TableValue.Rows} - // count++; - // } } } this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length }; this.segmentsArray = [this.segmentsArray[1], this.segmentsArray[2], this.segmentsArray[0]]; this.segmentData = [this.segmentData[1], this.segmentData[0]]; - this.workList = this.request_details.WFHistory; + this.workList = this.request_details.WFHistory.reverse(); + this.common.sharedService.setSharedData(this.workList, 'workflow-user'); + // this.workList = this.request_details.WFHistory; this.options = this.request_details.AllowedActions; this.activeSegment = this.segmentsArray[0].name; for (let i = 0; i < this.options.length; i++) { @@ -135,50 +134,56 @@ export class WorkListMainItgComponent implements OnInit { } } } - //result.ITGRequest.FieldGoups.Fields }); } imageURL(actionName) { - if (actionName == "Approve") { - return "../assets/imgs/mohemm-action/Approve.png" + if (actionName === 'Approve') { + return '../assets/imgs/mohemm-action/Approve.png'; } - if (actionName == "Reject") { - return "../assets/imgs/mohemm-action/Reject.png" + if (actionName === 'Reject') { + return '../assets/imgs/mohemm-action/Reject.png'; } - if (actionName == "RequestInformation") { - return "../assets/imgs/mohemm-action/info.png" + if (actionName === 'RequestInformation') { + return '../assets/imgs/mohemm-action/info.png'; } - if (actionName == "Grant") { - return "../assets/imgs/mohemm-action/info.png" + if (actionName === 'Grant') { + return '../assets/imgs/mohemm-action/info.png'; } - if (actionName == "Delegate") { - return "../assets/imgs/mohemm-action/info.png" + if (actionName === 'Delegate') { + return '../assets/imgs/mohemm-action/delegate.png'; } - if (actionName == "Answer") { - return "../assets/imgs/mohemm-action/info.png" + if (actionName === 'Answer') { + return '../assets/imgs/mohemm-action/info.png'; + } + if (actionName === 'Question') { + return '../assets/imgs/mohemm-action/info.png'; + } + if (actionName === 'ReportGenerated') { + return '../assets/imgs/mohemm-action/ReportGenerated.png'; + } + if (actionName === 'Doable') { + return '../assets/imgs/mohemm-action/info.png'; + } + if (actionName === 'NotDoable') { + return '../assets/imgs/mohemm-action/info.png'; + } + if (actionName === 'DataCorrected') { + return '../assets/imgs/mohemm-action/info.png'; } } public segmentChangedClick(event: any) { - if (event.detail.value === "Request Details") { + if (event.detail.value === 'Request Details') { this.slides.slideTo(0); this.activeSegment = event.detail.value; - } - else if (event.detail.value === "Approval Level") { + } else if (event.detail.value === 'Approval Level') { this.slides.slideTo(1); this.activeSegment = event.detail.value; - } - else if (event.detail.value === "Requester Details") { + } else if (event.detail.value === 'Requester Details') { this.slides.slideTo(2); this.activeSegment = event.detail.value; } - // for(let i=0; i< this.segmentsArray.length; i++){ - // if(this.segmentsArray[i].name === event.detail.value){ - // this.slides.slideTo(i); - // this.activeSegment = event.detail.value; - // } - // } } slideChanged(event: any) { @@ -212,11 +217,9 @@ export class WorkListMainItgComponent implements OnInit { } } } - } - //if user clicked on spicific type of ITG request - else { + } else { // if user clicked on spicific type of ITG request for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request - if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found. + if (this.request_info.ID === this.all_request[i].ID) { // check if the ID for the request is found. this.index = i + 1; if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request. this.clearDataArray(); @@ -228,11 +231,6 @@ export class WorkListMainItgComponent implements OnInit { return; } } - // else { - // this.common.sharedService.setSharedData(true, 'loadWorkList'); - // this.common.openNotificationPage(); - // return; - // } } } this.common.sharedService.setSharedData(true, 'loadWorkList'); @@ -254,7 +252,7 @@ export class WorkListMainItgComponent implements OnInit { actionService(action, comments?, grantRequests?) { let url: string; - let request = new itgRequest(); + const request = new itgRequest(); request.RequestType = this.request_name; request.ItemID = this.request_info.ItemID; request.TaskID = this.request_info.ID; @@ -264,14 +262,14 @@ export class WorkListMainItgComponent implements OnInit { request.NewUserEMPId = this.replcamentID; this.common.confirmAlertDialogAction( () => { - if (action == 1) { //approved + if (action === 1) { // approved url = WorkListMainItgComponent.APPROVAL; this.workListService.getITGActionRequest(request, url) .subscribe((result: any) => { - if (result.MessageStatus != 1) { + if (result.MessageStatus !== 1) { this.common.presentAlert(this.ts.trPK('general', 'error-itg')); - } else if (result.MessageStatus == 1) { + } else if (result.MessageStatus === 1) { this.messageSuccess = true; setTimeout(() => { this.messageSuccess = false; @@ -281,26 +279,28 @@ export class WorkListMainItgComponent implements OnInit { }, 2000); } }); - } else if (action == 2) {//reject + } else if (action === 2) {// reject url = WorkListMainItgComponent.REJECT; - this.workListService.getITGActionRequest(request, url) - .subscribe((result: any) => { - if (result.MessageStatus != 1) { - this.common.presentAlert(this.ts.trPK('general', 'error-itg')); + if (!comments) { + this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); + } else { + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + if (result.MessageStatus !== 1) { + this.common.presentAlert(this.ts.trPK('general', 'error-itg')); - } else if (result.MessageStatus == 1) { - setTimeout(() => { - this.messageSuccess = true; - this.common.sharedService.setSharedData(true, 'loadWorkList'); - // this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ')); - // this.common.sharedService.setSharedData(true, 'loadWorkList'); - this.confirmMsg(2); - this.skip(); - this.messageSuccess = false; - }, 2000); - } - }); - } else if (action == 3) {//request more info + } else if (result.MessageStatus === 1) { + setTimeout(() => { + this.messageSuccess = true; + this.common.sharedService.setSharedData(true, 'loadWorkList'); + this.confirmMsg(2); + this.skip(); + this.messageSuccess = false; + }, 2000); + } + }); + } + } else if (action === 3) {// request more info request.NewUserEMPId = this.replcamentID; url = WorkListMainItgComponent.REQUEST_INFORMATION; if (!comments) { @@ -309,12 +309,11 @@ export class WorkListMainItgComponent implements OnInit { request.Comments = comments; this.workListService.getITGActionRequest(request, url) .subscribe((result: any) => { - if (result.MessageStatus != 1) { - //this.common.presentAlert(result.Message); + if (result.MessageStatus !== 1) { this.common.presentAlert(this.ts.trPK('general', 'error-itg')); } - if (result.MessageStatus == 1) { + if (result.MessageStatus === 1) { this.messageSuccess = true; setTimeout(() => { this.messageSuccess = false; @@ -327,15 +326,15 @@ export class WorkListMainItgComponent implements OnInit { } }); } - } else if (action == 4) {//delegate + } else if (action === 4) {// delegate request.NewUserEMPId = this.replcamentID; url = WorkListMainItgComponent.DELEGATE; this.workListService.getITGActionRequest(request, url) .subscribe((result: any) => { - if (result.MessageStatus != 1) { + if (result.MessageStatus !== 1) { this.common.presentAlert(this.ts.trPK('general', 'error-itg')); - } else if (result.MessageStatus == 1) { + } else if (result.MessageStatus === 1) { this.messageSuccess = true; setTimeout(() => { this.messageSuccess = false; @@ -347,17 +346,17 @@ export class WorkListMainItgComponent implements OnInit { }, 2000); } }); - } else if (action == 5) { //answer + } else if (action === 5) { // answer url = WorkListMainItgComponent.ANSWER; if (!comments) { this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); } else { this.workListService.getITGActionRequest(request, url) .subscribe((result: any) => { - if (result.MessageStatus != 1) { + if (result.MessageStatus !== 1) { this.common.presentAlert(this.ts.trPK('general', 'error-itg')); - } else if (result.MessageStatus == 1) { + } else if (result.MessageStatus === 1) { this.messageSuccess = true; setTimeout(() => { this.messageSuccess = false; @@ -370,20 +369,19 @@ export class WorkListMainItgComponent implements OnInit { } }); } - } else if (action == 6) { //grant + } else if (action === 6) { // grant url = WorkListMainItgComponent.GRANT; if (!comments) { this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); - } - else { + } else { if (this.grantRequest) { request.AdditionalFields = this.grantRequest; this.workListService.getITGActionRequest(request, url) .subscribe((result: any) => { - if (result.MessageStatus != 1) { + if (result.MessageStatus !== 1) { this.common.presentAlert(this.ts.trPK('general', 'error-itg')); - } else if (result.MessageStatus == 1) { + } else if (result.MessageStatus === 1) { this.messageSuccess = true; setTimeout(() => { this.messageSuccess = false; @@ -400,6 +398,31 @@ export class WorkListMainItgComponent implements OnInit { } } + } else if (action === 7) { // grant + url = WorkListMainItgComponent.GRANT; + if (this.grantRequest) { + request.AdditionalFields = this.grantRequest; + this.workListService.getITGActionRequest(request, url) + .subscribe((result: any) => { + if (result.MessageStatus !== 1) { + this.common.presentAlert(this.ts.trPK('general', 'error-itg')); + + } else if (result.MessageStatus === 1) { + this.messageSuccess = true; + setTimeout(() => { + this.messageSuccess = false; + this.common.sharedService.setSharedData(true, 'loadWorkList'); + // this.common.presentAlert(this.ts.trPK('worklistMain', 'Tran_Succ')); + this.common.sharedService.setSharedData(true, 'loadWorkList'); + this.confirmMsg(6); + this.skip(); + }, 2000); + } + }); + } else { + this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment')); + } + } }, this.ts.trPK('general', 'ok'), () => { @@ -431,30 +454,34 @@ export class WorkListMainItgComponent implements OnInit { if (action === 6) { return this.ts.trPK('worklist', 'grantMsg'); } + if (action === 7) { + return this.ts.trPK('worklist', 'grantMsg'); + } } selectAtion(actionSelected) { this.actionSelected = actionSelected; - if (this.actionSelected == "Answer") { - this.actionService(5, this.commentText) + if (this.actionSelected === 'Answer') { + this.actionService(5, this.commentText); } - if (this.actionSelected == "Approve") { + if (this.actionSelected === 'Approve') { this.actionService(1, this.commentText); } - if (this.actionSelected == "Delegate") { - // this.actionService(4, this.commentText) - // this.common.openWorklistRollReplacement(); + if (this.actionSelected === 'Delegate') { this.presentModal(4); } if (this.actionSelected === 'Doable') { + this.actionService(1, this.commentText); } if (this.actionSelected === 'Grant') { this.actionService(6, this.commentText, this.grantRequest); } if (this.actionSelected === 'NotDoable') { + this.actionService(2, this.commentText); } if (this.actionSelected === 'Question') { + this.actionService(5, this.commentText); } if (this.actionSelected === 'Reject') { this.actionService(2, this.commentText); @@ -462,7 +489,12 @@ export class WorkListMainItgComponent implements OnInit { if (this.actionSelected === 'RequestInformation') { this.presentModal(3); } - + if (this.actionSelected === 'ReportGenerated') { + this.actionService(7, this.grantRequest); + } + if (this.actionSelected === 'DataCorrected') { + this.actionService(7, this.grantRequest); + } } @@ -475,12 +507,14 @@ export class WorkListMainItgComponent implements OnInit { modal.cssClass = 'replaceRoll-modal'; modal.onDidDismiss() .then((data) => { - this.replcamentID = data.data.empData.USER_NAME; - - if (actionNumber == 3) { - this.actionService(3, this.commentText); - } else if (actionNumber == 4) { - this.actionService(4); + if(data.data.empData){ + this.replcamentID = data.data.empData.USER_NAME ? data.data.empData.USER_NAME : data.data.empData.EmployeeID; + this.commentText = data.data.comments ? data.data.comments: null; + if (actionNumber === 3) { + this.actionService(3, this.commentText); + } else if (actionNumber === 4) { + this.actionService(4); + } } }); @@ -503,4 +537,47 @@ export class WorkListMainItgComponent implements OnInit { } } + returnDateTime(stringDate: string) { + let allDateTime = stringDate.split(' '); + let time = allDateTime[1].split(':', 2); + let dateArr= allDateTime[0].split('/') + let correctDate = dateArr[1]+'/'+dateArr[0]+'/'+dateArr[2]; + let fullDate = this.transform(correctDate); + return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2]; + + } + locale = { + en: { + // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + } + }; + transform(value: string) { + let x = new Date(Date.parse(value)); + //return value.toLowerCase(); + let month = this.getMonthNameShort('en', x.getMonth()) + return "" + x.getDate() + " " + month + " " + x.getFullYear(); + + + } + + getMonthNameShort(lang, month) { + lang = lang && (lang in this.locale) ? lang : 'en'; + return this.locale[lang].month_names_short[month]; + } + + backgroundColor(statusName: string){ + // {'bg-blue-txt' : approvalInfo.Action === 'Submit','bg-red-txt': approvalInfo.Action == 'Not Doable' ,'bg-orange-txt' : approvalInfo.Action === 'Pending' ,'bg-red-txt' : approvalInfo.Action === 'Rejected','bg-green-txt' : approvalInfo.Action != 'Pending' && approvalInfo.Action != 'Rejected' && approvalInfo.Action != 'Submit'} + switch (statusName) { + case 'Submit': + return 'bg-blue-txt'; + case 'Pending': + return 'bg-orange-txt'; + case 'Not Doable' || 'Rejected': + return 'bg-red-txt'; + default: + return 'bg-green-txt'; + } + } + } diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html index 70329cb2..aec4a7d0 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html @@ -1,19 +1,19 @@ - - - {{ 'vacation-rule, search-employee' | translate}} - - - - - - - - - -
- - + + + {{ 'worklistMain, delegate' | translate}} + + + + + + + + + + + + + + + + + + + {{'replacementRoll, searchBy' | translate}} + + + + + + +

{{'replacementRoll, workflow' | translate}}

+
+
+ + + +

{{'replacementRoll, favorite' | translate}}

+
+
+ + + +

{{'replacementRoll, employee-id' | translate}}

+
+
+ + + +

{{'replacementRoll, employee-email' | translate}}

+
+
+ + + +

{{'replacementRoll, employee-name' | translate}}

+
+
+
+
+ + + + + + + + +
+ + +
+ + +
+ + - - + + +
+
+ {{'replacementRoll, search-result' | translate}} +
+
+ + + + +
+
+
+ + + + + + + {{employee.EMPLOYEE_DISPLAY_NAME}} + + +
+ +
+
+ +
+
+ + +
+
+ {{'replacementRoll, related' | translate}} +
+ +
+
+
+ + + + + + {{employee.Name}} + + +
+ +
+
+
+
+
+
- -
- {{'general, save' | translate}} - +
+
+ {{'replacementRoll, favorite' | translate}}
- \ No newline at end of file + +
+
+
+ + + + + + {{employee.EMPLOYEE_DISPLAY_NAME}} + + +
+ +
+
+
+
+
+ +
+ + + + +
Transaction Successful
+
+
+ + + + +
+ + + + + +
+
+ +
+ + + + +
+ {{'general, save' | translate}} + +
+
+ {{'general, close' | translate}} + +
+
\ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss index e69de29b..5f0ca300 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.scss @@ -0,0 +1,280 @@ + +.disabledButton{ + opacity:.5; + + } + + .radio-label{ + margin: 4px; + position: relative; + bottom: 4px; + } + ion-radio{ + --color-checked: #269db8; + } + .center{text-align: center;} + .boldTxtNav{ + font-weight: bold; + } + .employee-details{ + display:inline-block; + margin: 10px; + } + .empImgeRep{ + display: inline-block; + height: 40px; + width: 40px; + } + .star-fav{ + float: right; + margin: 10px; + } + .star-fav-left{ + float: right; + margin: 10px 5px; + } + .uk-margin{margin: 15px 15px 0px 15px; + font-weight: bold; + clear: both; + position: relative; + top: 10px;} + .uk-padding{ padding: 20px;} + .uk-padding .employee-details{ + bottom: 10px; + position: relative;} + + .filterInput{ + border: solid var(--gray) 1px; + border-radius: 21px; + padding-left: 10px !important; + } + .filterInput-ar{ + + border: solid var(--gray) 1px; + border-radius: 21px; + --padding-start: 10px !important; + + } + .square-container{ + width:100%; + clear: both; + } + .square{ + clear: both; + } + .top-radio-row{ + font-size: 12px; + } + + button.item-button.button.button-md.button-clear.button-clear-md { + background-color: transparent; + } + + .footer-button { + background: #dbdbdb; + border-radius: 10px; + color: black; + --background: transparent; + font-weight: bold; + width: 75%; + } + + // 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{ + + z-index: 3; + position: relative; + top: 0; + + } + .profileImage{ + width:60px !important; + + } + + .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; + } + + .filterInput-ar{ + // border: solid var(--gray) 1px; + // border-radius: 21px; + // padding-left: 10px !important; + border: solid var(--gray) 1px; + border-radius: 21px; + // width:250px + // padding-left: 145px !important; + //margin-left: 123px; + // padding-right: 129px; + //margin-right: -136px; + + } + .filterBtn{ + background: var(--newgreen); + --background: var (--newgreen); + border-radius: 50%; + height: 60px; + width: 60px; + } + .filterBtn-ar{ + // background: var(--newgreen); + // --background: var (--newgreen); + // border-radius: 50%; + // height: 60px; + // width: 60px; + background: var(--newgreen); + --background: var (--newgreen); + border-radius: 50%; + height: 60px; + width: 60px; + margin-left: -183px; + margin-right: 260px; + } + + + + *{ + box-sizing: border-box; + } + + .square-container{ + // padding: 8px; + width:100%; + } + .square{ + // width:calc(100% / 2); + width:100%; + 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: 92px; + // background-color: #0095ff; + // box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); + } + + .disabledButton{ + opacity:.5; + + } + + .radio-label{ + font-size: 9px; + margin: 4px; + position: relative; + bottom: 4px; + } + ion-radio{ + --color-checked: #269db8; + } + .center{text-align: center;padding: 5px;} + .boldTxtNav{ + font-weight: bold; + padding: 5px; + } + .employee-details{ + display:inline-block; + margin: 10px; + text-overflow: ellipsis; + white-space: nowrap; + width: 70%; + } + .empImgeRep{ + display: inline-block; + height: 40px; + width: 40px; + } + .star-fav{ + float: right; + margin: 15px 0px 0px 0px; + } + .uk-margin{margin: 15px 15px 0px 15px; + font-weight: bold; + clear: both; + position: relative; + top: 10px;} + .uk-padding{ padding: 20px;} + .uk-padding .employee-details{ + bottom: 10px; + position: relative;} + + .star-fav-left{ + float: left; + margin: 10px 5px; + } + .top-radio-row{ + font-size: 12px; + display: block; + padding-bottom: 25px; + padding-top: 15px; + } + .textSearchType{ + padding-top: 8px; + font-size: 12px; + } + + \ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts index da811721..a1c5c5c1 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts @@ -4,6 +4,7 @@ import { ReplacementServiceRequest } from 'src/app/vacation-rule/model/replaceme import { VacationRuleServiceService } from 'src/app/vacation-rule/service/vacation-rule-service.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { WorklistService } from '../service/worklist.service'; @Component({ @@ -12,6 +13,7 @@ import { CommonService } from 'src/app/hmg-common/services/common/common.service styleUrls: ['./work-list-replacement-itg.component.scss'], }) export class WorkListReplacementItgComponent implements OnInit { + messageSuccess = false; P_SEARCH_USER_NAME: string = ""; P_SEARCH_EMPLOYEE_DISPLAY_NAME: string = ""; P_SEARCH_EMAIL_ADDRESS: string = ""; @@ -22,17 +24,44 @@ export class WorkListReplacementItgComponent implements OnInit { selEmp: string = null; callback: any; searchKey: any = ""; - searchKeySelect: string = ""; + searchKeySelect: string = "1"; replacmentRequest: any = ""; isAbs: boolean = false; isSave: boolean = false; + isSelect: boolean = false; + typingTimer: any; + userSelected: any; + active: any; + isAnswer: boolean = false; + favoriteUserList = []; + userNote: any; + isFilter = true; + relatedList = []; + public direction = ''; + arr = []; + constructor(public vacationRuleService: VacationRuleServiceService, + public ts: TranslatorService, + public cs: CommonService, + public worklistService: WorklistService, + public modalController: ModalController) { + this.direction = TranslatorService.getCurrentDirection(); + } - constructor(public vacationRuleService: VacationRuleServiceService, - public ts: TranslatorService, - public cs: CommonService, - public modalController: ModalController) { } - - ngOnInit() {} + ngOnInit() { + this.getFavruite(); + if(!this.relatedList || this.relatedList.length === 0 || this.relatedList === undefined){ + this.arr = this.cs.sharedService.getSharedData('workflow-user', false); + var lookupObject = {}; + + for(var i in this.arr) { + lookupObject[this.arr[i]['Name']] = this.arr[i]; + } + console.log(lookupObject); + for(i in lookupObject) { + this.relatedList.push(lookupObject[i]); + } + } + } SearchReplacementList() { this.ReplacementList = []; @@ -105,16 +134,17 @@ export class WorkListReplacementItgComponent implements OnInit { } } - doInfinite(infiniteScroll) { + // doInfinite(infiniteScroll) { - } + // } closePage() { this.isSave = true; let data: any = null; if (this.isSave == true) { if (this.selEmp) { - data = this.ReplacementList[this.selEmp]; + data = this.selEmp; + this.messageSuccess = true; } else { data = null; } @@ -124,8 +154,153 @@ export class WorkListReplacementItgComponent implements OnInit { this.modalController.dismiss({ 'dismissed': true, - empData: data + empData: data, + comments: this.userNote }); } } + + closeFunction(){ + this.modalController.dismiss({ + 'dismissed': true, + // comments: this.userNote + }); + } + + onChangeSelect(select) { + console.log(select.detail.value); + let selectValue = select.detail.value; + + if (selectValue == "1") { + this.listOfRealted = this.relatedList; + this.isSelect = true; + this.isFilter = true; + } else if(selectValue == "4" ){ + this.listOfFav = this.favoriteUserList; + this.isFilter = true; + } else if(selectValue === '2' || selectValue === '3' || selectValue === '5'){ + this.isSelect = true; + this.isFilter = false; + } + else { + this.isSelect = false; + + } + } + getPlaceHolder() { + return this.searchKeySelect == '1' ? this.ts.trPK('replacementRoll', 'searchbyname') : this.searchKeySelect == '2' ? this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyemail'); + } + onChangeInput() { + this.ReplacementList = []; + clearTimeout(this.typingTimer); + this.typingTimer = setTimeout(() => { + if (this.searchKey.length > 2) { + this.SearchReplacementList(); + } + }, 3000); + } + select(selectEmp, index) { + console.log(selectEmp); + this.selEmp = selectEmp + this.userSelected = true; + this.active = index; + this.searchKey = selectEmp.EMPLOYEE_DISPLAY_NAME ? selectEmp.EMPLOYEE_DISPLAY_NAME : selectEmp.Name; + console.log(this.searchKey) + //this.closePage(); + } + + + setFavorite(selEmp) { + selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME; + selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; + selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; + var confirmBoxhtml = `
+

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

+
+
+
`; + if (selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + if (!selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + + confirmBoxhtml += `
+ + ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` + + + +
+
` + let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == selEmp.USER_NAME) + if (userIndex == -1) + this.cs.presentConfirmDialog( + confirmBoxhtml + , () => { + var request = + [{ "USER_NAME": selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": selEmp.EMPLOYEE_IMAGE, "IsFavorite": true }]; + + this.saveUserFavruiteList(request); + }, () => { + + }) + + // if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + // this.isSelect = true; + // } + // else { + // this.isSelect = false; + + + + // } + } + saveUserFavruiteList(request) { + this.worklistService.saveFavoriteList(request, () => { + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + this.cs.toastPK("replacementRoll", "favorite-saved"); + + } + }) + } + getFavruite() { + this.cs.startLoading(); + this.worklistService.getFavorite({}, () => { + + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + this.cs.stopLoading(); + this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + } + }) + } + + listOfRealted = []; + listOfFav = [] + + filterList(event){ + console.log(this.relatedList); + console.log(this.favoriteUserList); + const val = event.target.value; + if(this.searchKeySelect === '1'){ + if(val === '') { + this.relatedList = this.listOfRealted; + } else { + this.relatedList = this.listOfRealted.filter((item) => { + return (item.Name.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + } else if(this.searchKeySelect ==='4') { + if(val === '') { + this.favoriteUserList = this.listOfFav; + } else { + this.favoriteUserList = this.listOfFav.filter((item) => { + return (item.EMPLOYEE_DISPLAY_NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + }else{ + return; + } + } } diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index f6d2571c..6b6e238d 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -1,165 +1,213 @@ - {{ 'replacementRoll, title' | translate}} + {{ + 'replacementRoll, title' | translate}} + {{ 'worklistMain, request' | translate}} + + {{ 'worklistMain, delegate' | translate}} + - -
- - - {{'replacementRoll, searchBy' | translate}} - - {{'addAttach, name' | translate}} - {{'login, username' | translate}} - {{'general, email' | translate}} - - - - - - - - - - - - - - - - - + +
+ + + + {{'replacementRoll, searchBy' | translate}} + + + + + +

{{'replacementRoll, workflow' | translate}}

+
+ + +

{{'replacementRoll, favorite' | translate}}

+
+ + +

{{'replacementRoll, employee-id' | translate}}

+
+ + +

{{'replacementRoll, employee-email' | translate}}

+
+ + +

{{'replacementRoll, employee-name' | translate}}

+
+
+
+ + + +
+ + + + +
+ +
+ + +
+ + +
+
+ {{"replacementRoll, question" | translate}} : + {{pQuestion}} ? + {{"replacementRoll, answer" | translate}} + + + + + +
+ +
+
+ {{'replacementRoll, related' | translate}} +
+
+
+
+ + + + + {{employee.NAME}} - - - - -
- {{"replacementRoll, question" | translate}} : - {{pQuestion}} ? - {{"replacementRoll, answer" | translate}} - - - - - -
-
- - - - - - +
+
+
+
+ +
+ +
+
+ {{'replacementRoll, favorite' | translate}} +
+
+
+
- - + + + -
-
-
- + {{employee.EMPLOYEE_DISPLAY_NAME}} - - + +
+ +
+
+
+
+
+ +

+ Sorry there is no data +

+
+
+
+ {{'replacementRoll, search-result' | translate}} +
+
- + -
- -
-
- +
+
+
+ - {{employee.EMPLOYEE_DISPLAY_NAME}} -
{{employee.USER_NAME}}
- {{employee.EMAIL_ADDRESS}} - -
-
+ + + + + {{employee.EMPLOYEE_DISPLAY_NAME}} + + +
+ +
+
-
- -
- +
+ +
+ + + +
- - - - -
Transaction Successful
-
+ + + + + +
Transaction Successful
+
+
-
- - - - - -
-
+ + + +
+
- + {{'general, submit' | translate}} - + {{'general, cancel' | translate}}
\ No newline at end of file diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss index 5fbd6377..64b9ebd1 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss @@ -3,10 +3,12 @@ button.item-button.button.button-md.button-clear.button-clear-md { } .footer-button { - border-radius: 3px; - padding: 0 1.1em; - min-height: 45px; - min-width: 200px; + background: #dbdbdb; + border-radius: 10px; + color: black; + --background: transparent; + font-weight: bold; + width: 75%; } // ion-item { @@ -27,8 +29,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { .profileImageDiv{ - text-align: center; - margin-bottom: -27px; + z-index: 3; position: relative; top: 0; @@ -36,8 +37,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { } .profileImage{ width:60px !important; - // margin-left: -25px; - // margin-right: 22px; + } .activated{ @@ -81,16 +81,18 @@ button.item-button.button.button-md.button-clear.button-clear-md { border-radius: 21px; padding-left: 10px !important; } + .filterInput-ar{ // border: solid var(--gray) 1px; // border-radius: 21px; // padding-left: 10px !important; border: solid var(--gray) 1px; border-radius: 21px; + // width:250px // padding-left: 145px !important; - margin-left: 123px; + //margin-left: 123px; // padding-right: 129px; - margin-right: -136px; + //margin-right: -136px; } .filterBtn{ @@ -127,7 +129,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { } .square{ // width:calc(100% / 2); - width:50%; + width:100%; float:left; position: relative; // padding-bottom: calc(100% / 2); @@ -152,9 +154,58 @@ button.item-button.button.button-md.button-clear.button-clear-md { } - - - - - +.radio-label{ + font-size: 9px; + margin: 4px; + position: relative; + bottom: 4px; +} +ion-radio{ + --color-checked: #269db8; + } +.center{text-align: center;padding: 5px;} +.boldTxtNav{ + font-weight: bold; + padding: 5px; +} +.employee-details{ + display:inline-block; + margin: 10px; + text-overflow: ellipsis; + white-space: nowrap; + width: 70%; +} +.empImgeRep{ + display: inline-block; + height: 40px; + width: 40px; +} +.star-fav{ + float: right; + margin: 15px 0px 0px 0px; +} +.uk-margin{margin: 15px 15px 0px 15px; + font-weight: bold; + clear: both; + position: relative; + top: 10px;} +.uk-padding{ padding: 20px;} +.uk-padding .employee-details{ + bottom: 10px; + position: relative;} + + .star-fav-left{ + float: left; + margin: 10px 5px; + } + .top-radio-row{ + font-size: 12px; + display: block; + padding-bottom: 25px; + padding-top: 15px; + } + .textSearchType{ + padding-top: 8px; + font-size: 12px; + } diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index e2c9f2ed..88cd77b1 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -30,7 +30,7 @@ export class WorkListReplacementRollComponent implements OnInit { P_PAGE_NUM: number; P_PAGE_LIMIT: number; ReplacementList: any = []; - searchBy: string = ""; + searchBy: string = "1"; IsReachEnd: boolean = false; ReplacmentListRes: WorKListReplacmentEmployeeResponse; private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest(); @@ -43,17 +43,38 @@ export class WorkListReplacementRollComponent implements OnInit { messageSuccess: boolean = false; public direction: string; P_RESPOND_ATTRIBUTES_TBL: any[]; + typingTimer: any; + userSelected: boolean; + actionHistory = []; + arr = []; + favoriteUserList: [] = []; + isFilter = true; constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; this.P_PAGE_LIMIT = 50; this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false); console.log(this.getPassActionMode); - + // this.getFavruite(); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false); console.log(this.getpassResAttr); this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false); - if (this.getPassActionMode == "ANSWER_INFO") { + + // tslint:disable-next-line: max-line-length + this.arr = this.cs.sharedService.getSharedData('actionHistoryData', false) ? this.cs.sharedService.getSharedData('actionHistoryData', false) : []; + var lookupObject = {}; + + for(var i in this.arr) { + lookupObject[this.arr[i]['USER_NAME']] = this.arr[i]; + } + + for(i in lookupObject) { + this.actionHistory.push(lookupObject[i]); + } + + console.log(this.actionHistory); + + if (this.getPassActionMode === 'ANSWER_INFO') { this.isAnswer = true; } @@ -68,6 +89,12 @@ export class WorkListReplacementRollComponent implements OnInit { this.WorkListActionObj.RespondAttributeList = [];// this.getpassResAttr; this.WorkListActionObj.P_APPROVER_INDEX = null; this.direction = TranslatorService.getCurrentLanguageName(); + var requestInfoDel = this.cs.sharedService.getSharedData('requestInfoDelUser'); + if (requestInfoDel != null) { + this.userSelected = true; + this.inputSearch = requestInfoDel.NAME; + this.selEmp = requestInfoDel; + } } ngOnInit() { @@ -100,6 +127,14 @@ export class WorkListReplacementRollComponent implements OnInit { this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; break; } + case '5': { + + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.inputSearch; + this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = ""; + this.WorkListReplacmentEmployeeObj.P_SEARCH_EMAIL_ADDRESS = ""; + + break; + } default: { this.WorkListReplacmentEmployeeObj.P_SEARCH_USER_NAME = ""; this.WorkListReplacmentEmployeeObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = ""; @@ -182,6 +217,10 @@ export class WorkListReplacementRollComponent implements OnInit { console.log(selectEmp.EMPLOYEE_DISPLAY_NAME); this.selEmp = selectEmp this.active = index; + this.userSelected = true; + this.selEmp.EMPLOYEE_DISPLAY_NAME = this.selEmp.EMPLOYEE_DISPLAY_NAME ? this.selEmp.EMPLOYEE_DISPLAY_NAME : selectEmp.NAME; + this.inputSearch = selectEmp.EMPLOYEE_DISPLAY_NAME ? selectEmp.EMPLOYEE_DISPLAY_NAME : selectEmp.NAME; + //this.getreplacmentemployee(); } clear() { this.selEmpName = ""; @@ -246,21 +285,31 @@ export class WorkListReplacementRollComponent implements OnInit { // this.modalCtrl.dismiss(); } + + + this.workListMainService.actionButton(this.WorkListActionObj). subscribe((result: any) => { - this.handleApplayActionResult(result); + if (this.cs.validResponse(result)) { + if (result.MessageStatus == 1) { + + this.handleApplayActionResult(result); + } + } }); } else { - let msg: string = this.ts.trPK("replacementRoll", "enterNote"); - this.cs.showErrorMessageDialog(() => { - }, this.ts.trPK('general', 'ok'), msg); + this.cs.redToastPK("replacementRoll", "enterNote"); + // let msg: string = this.ts.trPK("replacementRoll", "enterNote"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); } } else { - let msg: string = this.ts.trPK("replacementRoll", "msg"); - this.cs.showErrorMessageDialog(() => { - }, this.ts.trPK('general', 'ok'), msg); + this.cs.redToastPK("replacementRoll", "msg"); + // let msg: string = this.ts.trPK("replacementRoll", "msg"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); } } else if (this.isAnswer == true) { if (this.userNote) { @@ -275,14 +324,16 @@ export class WorkListReplacementRollComponent implements OnInit { this.handleApplayActionResult(result); }); } else { - let msg: string = this.ts.trPK("replacementRoll", "enterNote"); - this.cs.showErrorMessageDialog(() => { - }, this.ts.trPK('general', 'ok'), msg); + this.cs.redToastPK("replacementRoll", "enterNote"); + // let msg: string = this.ts.trPK("replacementRoll", "enterNote"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); } } else { - let msg: string = this.ts.trPK("replacementRoll", "msg"); - this.cs.showErrorMessageDialog(() => { - }, this.ts.trPK('general', 'ok'), msg); + this.cs.redToastPK("replacementRoll", "msg"); + // let msg: string = this.ts.trPK("replacementRoll", "msg"); + // this.cs.showErrorMessageDialog(() => { + // }, this.ts.trPK('general', 'ok'), msg); } } @@ -292,6 +343,21 @@ export class WorkListReplacementRollComponent implements OnInit { this.cs.sharedService.setSharedData(true, 'loadWorkList'); + + this.messageSuccess = true; + + setTimeout(() => { + this.messageSuccess = false; + //this.modalCtrl.dismiss(succ); + this.modalCtrl.dismiss({ + 'dismissed': true, + data: "Success" + }); + if (this.selEmp && this.isAnswer == false) + this.setFavorite(this.selEmp); + }, 5000); + + this.cs.openNotificationPage(); // this.messageSuccess = true; // setTimeout(() => { @@ -369,26 +435,157 @@ export class WorkListReplacementRollComponent implements OnInit { closeModal() { this.modalCtrl.dismiss(); } + + selectedType; onChangeSelect(select) { console.log(select.detail.value); let selectValue = select.detail.value; - if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + if (selectValue == '1') { this.isSelect = true; + this.isFilter = true; + this.selectedType = 1; + this.listOfRealted = this.actionHistory; + } else if(selectValue === '4'){ + console.log(this.listOfFav.length) + if(this.favoriteUserList.length === 0 || this.favoriteUserList === undefined ) { + this.getFavruite(); + } + this.isFilter = true; + this.selectedType = 4; + } else if( selectValue === '2' || selectValue === '3' || selectValue === '5'){ + this.isSelect = true; + this.isFilter = false; + this.selectedType = 0; } else { this.isSelect = false; - + this.selectedType = 0; } } onChangeInput() { - if (this.inputSearch.length > 0) { - this.searchKeyEnter = true; + this.ReplacementList = []; + clearTimeout(this.typingTimer); + this.typingTimer = setTimeout(() => { + if (this.inputSearch.length > 2) { + this.getreplacmentemployee(); + } + }, 3000); - } else { - this.searchKeyEnter = false; + // if (this.inputSearch.length > 0) { + // this.searchKeyEnter = true; + // this.getreplacmentemployee(); + // } else { + // this.searchKeyEnter = false; + + // } + } + getPlaceHolder() { + return this.searchBy == '1' ? this.ts.trPK('replacementRoll', 'searchbyname') : this.searchBy == '2' ? this.ts.trPK('replacementRoll', 'searchbyusername') : this.ts.trPK('replacementRoll', 'searchbyemail'); + } + getFavruite() { + this.cs.startLoading(); + this.worklistService.getFavorite({}, () => { + + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + this.cs.stopLoading(); + this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + this.listOfFav = this.favoriteUserList; + } + }) + } + saveUserFavruiteList(request) { + this.worklistService.saveFavoriteList(request, () => { + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + this.cs.toastPK("replacementRoll", "favorite-saved"); + + } + }) + } + + setFavorite(selEmp) { + selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME; + selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; + selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; + var confirmBoxhtml = `
+

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

+
+
+
`; + if (selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + if (!selEmp.EMPLOYEE_IMAGE) + confirmBoxhtml += '
'; + + confirmBoxhtml += `
+ + ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` + + + +
+
` + let userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] == selEmp.USER_NAME) + if (userIndex == -1) + this.cs.presentConfirmDialog( + confirmBoxhtml + , () => { + var request = + [{ "USER_NAME": selEmp['USER_NAME'], "EMPLOYEE_DISPLAY_NAME": selEmp['EMPLOYEE_DISPLAY_NAME'], "EMAIL_ADDRESS": selEmp.EMAIL_ADDRESS, "EMPLOYEE_IMAGE": selEmp.EMPLOYEE_IMAGE, "IsFavorite": true }]; + + this.saveUserFavruiteList(request); + }, () => { + + }) + + // if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + // this.isSelect = true; + // } + // else { + // this.isSelect = false; + + + + // } + } + + // onChangeInput() { + // if (this.inputSearch.length > 0) { + // this.searchKeyEnter = true; + + // } else { + // this.searchKeyEnter = false; + + // } + // } + + listOfRealted: any = []; + listOfFav: any = []; + + filterList(event){ + const val = event.target.value; + if(this.selectedType === 1){ + if(val === '') { + this.actionHistory = this.listOfRealted; + } else { + this.actionHistory = this.listOfRealted.filter((item) => { + return (item.NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + } else if(this.selectedType === 4) { + if(val === '') { + this.favoriteUserList = this.listOfFav; + } else { + this.favoriteUserList = this.listOfFav.filter((item) => { + return (item.EMPLOYEE_DISPLAY_NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + }else{ + return; } } } diff --git a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss index c40369aa..b625942e 100644 --- a/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss +++ b/Mohem/src/app/notification/work-list-rfc/work-list-rfc.component.scss @@ -87,6 +87,7 @@ border-radius: 21px; padding-left: 10px !important; } + .filterBtn{ background: var(--newgreen); --background: var (--newgreen); diff --git a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html index 33b67cfb..67b487cc 100644 --- a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html +++ b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html @@ -53,6 +53,7 @@ PO PR MR + IC diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html new file mode 100644 index 00000000..b22aa453 --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.html @@ -0,0 +1,451 @@ + + + + +
+
{{getPassNotificationDetails.SUBJECT}}
+ + + + + + {{'worklistMain,itemReq'| translate}} + + + + {{'worklistMain, action' | translate}} + + + + {{'worklistMain, attach-file' | translate}} + + + + + {{'worklistMain, info'| translate}} + + + + + + +
+

{{ 'general, empty' | translate}}

+
+ + +
+ + + +
{{pInformation}}
+
+
+ + + +
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+ + + + + + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{returnDateTime(actionHistory.NOTIFICATION_DATE)}} +
+ + + + + +
+
+
+
+
+ + + +
+
+ +
+
+ + + + + +
+

{{ 'general, notAttch' | translate}}

+
+
+ + + + + {{i+1}}. {{attachList.FILE_NAME}} + + + + + + + + +
+
+
+
+
+ + + + + + +
+ + + + + +
+ {{Lines.OPERATING_UNIT}} +
+ + +
+ {{Lines.CATEGORY}} +
+
+ + + +
+ {{Lines.REQUESTER}} +
+ + +
+ {{Lines.ANALYZED_BY}} +
+
+ + + +
+ {{Lines.APPROVED_DATE}} +
+ + +
+ {{Lines.ITEM_TYPE}} +
+
+ + + +
+ {{Lines.RELATED_TO}} +
+ + +
+ {{Lines.REQUEST_DATE| date}} + +
+
+ + + +
+ {{Lines.ANALYZED_DATE| date}} +
+ + +
+ {{Lines.URGENT_FLAG_DISP}} +
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+ + + + +
{{'worklistMain, Tran_Succ' | translate}}
+
+
+
+ + + + + + + + + + + + + {{approve_label}} + + + + + + {{close_label}} + + + + + + {{reject_label}} + + + + + {{reqInfo_label}} + + + + {{'worklistMain, skip' | translate}} + + + + + {{'worklistMain, more' | translate}} + + + + + + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss new file mode 100644 index 00000000..cf5e4beb --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.scss @@ -0,0 +1,50 @@ + +.no-padding-label { + padding: 0px !important; +} + +.margin-left { + margin-left: 0px; +} + +.active-Segment { + font-size: 0.3cm !important; + background: #269DB8 !important; + text-transform: none; + --color-checked: none; + border-radius: 100px; + border:0; + } + .active-Segment ion-label{ + font-size: 11px; + color: white !important; + } + .normal-Segment ion-label{ + color: black !important; + font-size: 11px; + } + .normal-Segment { + font-size: 0.3cm !important; + text-transform: none; + --color-checked: none; + border: 0; + } + .action-btn { + white-space: nowrap; + font-size: 10px; + } + .name{ + color:black !important ;font-weight: bold; + } + .timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; + } + .req_info{ + width: 20px; + height: 20px; + display: inline-block; + margin:15px 10px 0px 0px; + } + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts new file mode 100644 index 00000000..5364d18a --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { WorklistMainIcComponent } from './worklist-main-ic.component'; + +describe('WorklistMainIcComponent', () => { + let component: WorklistMainIcComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ WorklistMainIcComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(WorklistMainIcComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts new file mode 100644 index 00000000..f5c2abec --- /dev/null +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts @@ -0,0 +1,1305 @@ +import { Component, OnInit, ElementRef, ViewChild } from "@angular/core"; +import { CommonService } from "src/app/hmg-common/services/common/common.service"; +import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { WorkListBodyRequest } from "../models/NotificationBodyReq"; +import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes"; +import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes"; +import { NotificatonButtonResponse } from "../models/NotificationButtonRes"; +import { WorkListActionRequest } from "../models/NotificationActionReq"; +import { WorkListButtonRequest } from "../models/NotificationButtonReq"; +// import { isDate } from 'angular6-json-schema-form'; +import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response"; +import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request"; +import { WorklistMainService } from "../service/work-list.main.service"; +import { HomeComponent } from "src/app/notification/home/home.component"; +import { TextInput } from 'src/app/uI-elements/text.input'; +import { TextAreaInput } from 'src/app/uI-elements/text-area.input'; +import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; +import { Events, ModalController } from '@ionic/angular'; +import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes'; +import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes'; +import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes'; +import { WorklistAttachService } from 'src/app/absence/service/work-list-attach.service'; +import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes'; +import { PRNotificatonBodyList } from '../models/PRNotificationBodyList'; +import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq'; +import { WorklistService } from '../service/worklist.service'; +import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.component'; +import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; +import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component'; +import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component'; +import { POItemHistoryRes } from '../models/POItemHistoryRes'; +import { POItemHistoryRequest } from '../models/POItemHistoryReq'; +import { QuotationAnalysisResponse } from '../models/quotationAnalysisRes'; +import { QuotationAnalysisRequest } from '../models/quotationAnalysisReq'; +import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component' +import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; +import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; +import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; +import { IonSlides } from '@ionic/angular'; + +@Component({ + selector: 'app-worklist-main-ic', + templateUrl: './worklist-main-ic.component.html', + styleUrls: ['./worklist-main-ic.component.scss'], +}) +export class WorklistMainIcComponent implements OnInit { + @ViewChild('slides') slides: IonSlides; + private WorkListBodyObj: WorkListBodyRequest; + private WorkListButtonsObj: WorkListButtonRequest; + private WorkListActionObj: WorkListActionRequest; + private WorkListActionHistoryObj: WorkListActionHistoryRequest; + private WorkListAttachObj: WorkListButtonRequest; + private PRList: PRNotificatonBodyList; + + public static PASS_NOTIFICATION_INFO = "passNotificationInfo"; + public static PASS_PO_INFO = "passPOInfo"; + public static PASS_PO_HEADER_ID = "passPOHeader"; + public static PASS_ACTION_MODE = "passActionMode"; + public static PASS_ACTION_MORE = "passActioMore"; + public isPostNoLoad = true; + public worklistNotifications: any; + public totalRequestCount = 0; + getPassNotificationDetails: any; + public static PASS_RES_ATTR = "passResAttr"; + TransactionID: number = -999; + notificationBodyRes: any = []; + actionHistoryRes: any = []; + notificationButtonRes: any; + actionMode: any; + pInformation: string = ""; + pQuestion: string = ""; + RespondAttributesListRes: any; + schemaNotific: any; + NotRespondAttributeList: any; + Resp2_val: any; + notExampleJsonObject: any; + hideForwordEmployee: any; + exampleJsonObject: any; + dataOfAttr: any; + P_RESPOND_ATTRIBUTES_TBL: any; + selEmployeeID: any; + actionType: string = ""; + notificationArray: any; + notificationDynamicAttributeArr: any; + private textInput: TextInput; + private textArea: TextAreaInput; + notificationCount: any; + attachmentRes: any; + PRHeader: any;//change the tpye later + PRLines: any;//change the tpye later + IsReachEnd: boolean = true; + P_PAGE_NUM: number = 1; + P_PAGE_LIMIT: number = 100; + headerTotal: any; + totalH: any; + valueH: any; + taxH: any; + taxvalueH: any; + NotificationGetRespondAttributesList: any; + confirmMsg: string; + delMsg: string; + closeMsg: string; + POHeader: any; + POLines: any; + PO_NUMBER: any; + itemHistoryRes: any; + QutationAnalysisRes: any; + activeSegment: any = "line_details"; + lines_note_limit: number = 19; + notiActionBtnMore: any = []; + demoeAttach: any = []; + orgNote: any; + truncating: boolean = true; + hidden: boolean = true; + selectedIndex = -1; + showLessBtn: boolean; + showMoreBtn: boolean = true; + selectedAction: any = []; + messageSuccess: boolean = false; + approveDis: boolean = false; + rejectDis: boolean = false; + requestDis: boolean = false; + moreDisabled: boolean = true; + direction: string; + defaultSegment = ''; + approve_label: any; + reject_label: any; + reqInfo_label: any; + closeDis: boolean = false; + selectedFilter: string; + ; + close_label: any; + + constructor( + public common: CommonService, + public ts: TranslatorService, + public worklistMainService: WorklistMainService, + public elementRef: ElementRef, + public menuService: MenuService, + public events: Events, + public worklistAttachService: WorklistAttachService, + private modalCtrl: ModalController, + public worklistService: WorklistService, + public dashboredService: DashboredService, + + ) { + this.direction = TranslatorService.getCurrentLanguageName() + this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); + this.WorkListActionHistoryObj.P_PAGE_NUM = 1; + this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + } + + ngOnInit() { + this.WorkListAttachObj = new WorkListButtonRequest(); + this.selectedFilter = this.common.sharedService.getSharedData('selectedFilter', false); + this.intializeNotificationDetail(); + }//ngOn + + + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + if (this.activeSegment === 'line_details') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'info') { + this.slides.slideTo(3); + } + // console.log(" event.detail.value: " + event.detail.value); + } + + public slideChanged(event: any) { + this.slides.getActiveIndex().then(index => { + // console.log(index); + // console.log(event); + if (index === 0) { + this.activeSegment = 'line_details'; + } + else if (index === 1) { + this.activeSegment = 'action-history'; + } + else if (index === 2) { + this.activeSegment = 'attach'; + } + else if (index === 3) { + this.activeSegment = 'info'; + } + // console.log(this.activeSegment); + }); + } + + + + + intializeNotificationDetail() { + this.approveDis = false; + this.rejectDis = false; + this.requestDis = false; + this.closeDis = false; + this.moreDisabled = true; + + if (this.messageSuccess) { + document.getElementById("notificationDynamicFieldsPO").innerHTML = ""; + } + // console.log("intializeNotificationDetail"); + this.getPassNotificationDetails = this.common.sharedService.getSharedData( + HomeComponent.NOTIFICATION_DATA, + false + ); + // console.log(this.getPassNotificationDetails.ROW_NUM); + this.notificationArray = this.common.sharedService.getSharedData( + HomeComponent.NOTIFICATION_ARR, + false + ); + this.WorkListBodyObj = new WorkListBodyRequest(); + this.WorkListButtonsObj = new WorkListButtonRequest(); + + this.WorkListActionObj = new WorkListActionRequest(); + + this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID; + this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + this.WorkListBodyObj.P_PAGE_NUM = 1; + this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + + this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_ACTION_MODE = ""; + this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_APPROVER_INDEX = null; + + this.WorkListActionHistoryObj.P_PAGE_NUM = 1; + this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; + + this.getNotificationButtons(this.WorkListButtonsObj); + this.getNotificationResAttr(this.WorkListButtonsObj); + this.getActionHistory(this.WorkListActionHistoryObj); + this.getAttachmentNotification(this.WorkListAttachObj); + + + if (this.getPassNotificationDetails.REQUEST_TYPE == "ITEM_CREATION") { + this.getICNotificationDetails(this.WorkListBodyObj); + } + } + + public segmentChanged1(event: any) { + this.activeSegment = event.detail.value; + // console.log(" event.detail.value: " + event.detail.value); + } + + getICNotificationDetails(notificationBodyObj) { + this.worklistMainService + .getICNotificationBody(notificationBodyObj) + .subscribe((result: any) => { + // console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); + this.handleWorkListBodyResult(result, "IC"); + }); + } + + handleWorkListBodyResult(result, Type) { + this.notificationBodyRes = []; + if (this.common.validResponse(result)) { + this.pInformation = result.P_INFORMATION; + this.pQuestion = result.P_QUESTION; + if (Type == "EIT") { + if (result.GetEITCollectionNotificationBodyList) { + this.notificationBodyRes = + result.GetEITCollectionNotificationBodyList; + } + } else if (Type == "ABSENCE") { + // console.log("ABSENCE"); + if (result.GetAbsenceCollectionNotificationBodyList) { + this.notificationBodyRes = + result.GetAbsenceCollectionNotificationBodyList; + } + } else if (Type == "PR") { + if (result.GetPrNotificationBodyList) { + // console.log("PR"); + + this.PRHeader = result.GetPrNotificationBodyList.PRHeader; + this.PRLines = result.GetPrNotificationBodyList.PRLines; + for (var i = 0; i < this.PRHeader.length; i++) { + if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.PRHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.PRHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.PRHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.PRHeader[i].HDR_ATTRIBUTE_VALUE; + + } + + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPrNotificationBodyList; + } + + } else if (Type == "PO") { + if (result.GetPoNotificationBodyList) { + // console.log("PO"); + + this.POHeader = result.GetPoNotificationBodyList.POHeader; + this.POLines = result.GetPoNotificationBodyList.POLines; + for (var i = 0; i < this.POHeader.length; i++) { + this.PO_NUMBER = this.POHeader[i].PO_NUMBER; + + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + } + + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPoNotificationBodyList; + } + } else if (Type == "IC") { + if (result.GetItemCreationNtfBodyList) { + this.POHeader = result.GetItemCreationNtfBodyList.ItemCreationHeader; + this.POLines = result.GetItemCreationNtfBodyList.ItemCreationLines; + for (var i = 0; i < this.POHeader.length; i++) { + this.PO_NUMBER = this.POHeader[i].PO_NUMBER; + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Requisition Total') { + this.totalH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.valueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + //this. header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'" + } + if (this.POHeader[i].HDR_ATTRIBUTE_NAME === 'Non-Recoverable Tax') { + this.taxH = this.POHeader[i].HDR_ATTRIBUTE_NAME; + this.taxvalueH = this.POHeader[i].HDR_ATTRIBUTE_VALUE; + + } + + // HDR_ATTRIBUTE_VALUE + } + this.notificationBodyRes = + result.GetPoNotificationBodyList; + } + }// + } + } //End handleWorkListBodyResult + + + + + getNotificationButtons(notificationButtonsObj) { + this.worklistMainService + .getNotificationButtons(notificationButtonsObj) + .subscribe((result: NotificatonButtonResponse) => { + this.handleWorkListButtonsResult(result); + }); + } + + handleWorkListButtonsResult(result) { + if (this.common.validResponse(result)) { + this.notiActionBtnMore = [] + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetNotificationButtonsList != null) { + this.notificationButtonRes = result.GetNotificationButtonsList; + this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); + // console.log("test" + this.notificationButtonRes.length); + for (let i = 0; i < this.notificationButtonRes.length; i++) { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; + + this.approveDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.rejectDis = true; + } else + if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; + + this.requestDis = true; + } // if result == null + else if // if result == null + (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { + this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.closeDis = true; + } + else if ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { + this.moreDisabled = false; + + } + + } // valid it + + } // valid it + } // End handleWorkListButtonsResult + + + } + applyAction(WorkListActionObj) { + // console.log("applyactio"); + this.worklistMainService + .actionButton(WorkListActionObj) + .subscribe((result: any) => { + this.handleApplayActionResult(result); + }); + } + + handleApplayActionResult(result) { + if (this.common.validResponse(result)) { + // tslint:disable-next-line: triple-equals + if (result.MessageStatus == 1) { + this.common.sharedService.setSharedData(true, 'loadWorkList'); + this.messageSuccess = true; + setTimeout(() => { + this.messageSuccess = false; + // this.openNotificationsDashboard(); + this.nextNotfification(); + }, 5000); + } + } // valid it + } + + // public nextNotfification() { + // //let itemExist = false; + // let itemNo = this.getPassNotificationDetails.ROW_NUM; + // itemNo += 1; + // if (itemNo > this.notificationArray.length) { + // this.common.openNotificationPage(); + // } else { + // for (let i = 0; i < this.notificationArray.length; i++) { + // if (this.notificationArray[i].ROW_NUM == itemNo) { + // this.common.sharedService.setSharedData(this.notificationArray[i], HomeComponent.NOTIFICATION_DATA); + // // itemExist = true; + // this.intializeNotificationDetail(); + // break; + // } + // } + // // if(itemExist==false){ + // // this.nextNotfification(); + // // } + // } + // } + + public nextNotfification() { + if (document.getElementById('notificationDynamicFieldsPO') != null) { + document.getElementById('notificationDynamicFieldsPO').innerHTML = ''; + } + + let itemNo = this.getPassNotificationDetails.ROW_NUM; + let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); + let previousRequest = this.notificationArray[index].REQUEST_TYPE; + let previousRequestType = this.notificationArray[index].ITEM_TYPE; + index += 1; + + if (index < this.notificationArray.length) { + this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); + this.activeSegment = 'line_details'; + if (this.selectedFilter === 'ALL') { + this.checkRequestType(index); + } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { + this.checkRequestType(index); + } else { + this.common.openNotificationPage(); + } + } else { + this.common.openNotificationPage(); + } + } + + + checkRequestType(index) { + if (this.notificationArray[index].REQUEST_TYPE === 'PO') { + this.intializeNotificationDetail(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'PR') { + this.common.openWorklistMainPRPage(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'MO') { + this.common.openWorklistMainMRPage(); + } else { + this.common.openWorklistMainPage(); + } + } + + actionButton(action) { + + // console.log("actionButton" + action); + // alert("don't forget"); + //let ButtonAction: string = this.actionType; + let ButtonAction: string = action; + + var responseAttrDic = this.notExampleJsonObject; + this.P_RESPOND_ATTRIBUTES_TBL = []; + for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { + let obj: any = {}; + obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME; + if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") { + obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; + } + // else if (isDate(responseAttrDic[key])) { + // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; + // } + else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; + } + this.P_RESPOND_ATTRIBUTES_TBL.push(obj); + } + // console.log("a" + this.P_RESPOND_ATTRIBUTES_TBL); + + 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); + // } + + if ( + ButtonAction == "APPROVE" || + ButtonAction == "REJECT" || + ButtonAction == "DEL" || + ButtonAction == "CLOSE" + ) { + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_ACTION_MODE = ButtonAction; + this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; + + //sheardData + + // this.common.sharedService.setSharedData( + // this.WorkListActionObj, + // WorklistMainPRComponent.PASS_NOTIFICATION_INFO + // ); + if (ButtonAction == "APPROVE") { + this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') + } + else if (ButtonAction == "REJECT") { + this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') + + } + else if (ButtonAction == "DEL") { + this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg') + + } + else if (ButtonAction == "CLOSE") { + this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') + + } + + this.common.confirmAlertDialogAction( + () => { + this.applyAction(this.WorkListActionObj); + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg); + + + + + + // alert.onDidDismiss((data) => { + // if (data == true) { + // this.continueDelete(attach); + // } + // }); + + //this.openApplyModal(this.WorkListActionObj); + + + + ////////////this.applyAction(this.WorkListActionObj); + } + + if (ButtonAction == "RFC") { + // alert("Return For Correction"); + this.WorkListActionObj.P_ACTION_MODE = ButtonAction; + // this.navCtrl.push("WorkListRfcPage", { + // passNotificationInfo: this.getPassNotificationDetails, + // passActionMode: ButtonAction, + // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.sharedService.setSharedData( + ButtonAction, + WorklistMainIcComponent.PASS_ACTION_MODE + ); + this.common.sharedService.setSharedData( + this.P_RESPOND_ATTRIBUTES_TBL, + WorklistMainIcComponent.PASS_RES_ATTR + ); + //this.common.openWorklistRFCPage(); + this.openRFCModal(); + } else if (ButtonAction == "ANSWER_INFO") { + // this.navCtrl.push("WorkListReplacmentRollPage", { + // pQuestion: this.pQuestion, + // passNotificationInfo: this.getPassNotificationDetails, + // passActionMode: ButtonAction, + // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL + // }); + this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.sharedService.setSharedData( + ButtonAction, + WorklistMainIcComponent.PASS_ACTION_MODE + ); + this.common.sharedService.setSharedData( + this.P_RESPOND_ATTRIBUTES_TBL, + WorklistMainIcComponent.PASS_RES_ATTR + ); + // console.log("c" + this.P_RESPOND_ATTRIBUTES_TBL); + + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); + } else if ( + ButtonAction == "DELEGATE" || + ButtonAction == "REQUEST_INFO" || + ButtonAction == "TRANSFER" || + ButtonAction == "TRANSFER_INFO" || + ButtonAction == "APPROVE_AND_FORWARD" || + ButtonAction == "FORWARD" + + + ) { + // alert("multi option: "+ ButtonAction); + this.WorkListActionObj.P_ACTION_MODE = ButtonAction; + // this.navCtrl.push("WorkListReplacmentRollPage", { + // passNotificationInfo: this.getPassNotificationDetails, + // passActionMode: ButtonAction, + // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.sharedService.setSharedData( + ButtonAction, + WorklistMainIcComponent.PASS_ACTION_MODE + ); + this.common.sharedService.setSharedData( + this.P_RESPOND_ATTRIBUTES_TBL, + WorklistMainIcComponent.PASS_RES_ATTR + ); + // this.common.openWorklistRollReplacement(); + this.openRepRolModal(); + } else if ( + ButtonAction == "UPDATE_ACTION" || + ButtonAction == "CONTINUE_ACTION" + ) { + if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + EITNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + EITNotificatonBodyResponse.NOT_WORKLIST + ); + // this.navCtrl.push("EitUpdateListPage"); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + AbsenceNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + AbsenceNotificatonBodyResponse.NOT_WORKLIST + ); + // this.navCtrl.push("SubmitAbsencePage", { + // dirfromNotificationPage: true, + // submitAbsObjList: this.notificationBodyRes[0].Collection_Notification + // }); + this.common.openConfirmAbsece(); + } + } + else if (this.notificationButtonRes.length > 0 && !ButtonAction) { + (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"); + } + }); + this.common.presentAlert( + this.ts.trPK("worklistMain", "actionRequird") + ); + } + } + + openActionHistory() { + // this.navCtrl.push("WorkListActionHistoryPage", { + // passNotificationInfo: this.getPassNotificationDetails + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.openWorklistHistoryPage(); + } + + + + openSupportDocuments() { + // this.navCtrl.push("WorkListAttachPage", { + // passNotificationInfo: this.getPassNotificationDetails + // }); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + WorklistMainIcComponent.PASS_NOTIFICATION_INFO + ); + this.common.openWorklistAttachPage(); + } + + getNotificationResAttr(notificationButtonsObj) { + // console.log("getNotificationResAttr"); + this.NotRespondAttributeList = []; + + this.worklistMainService + .notificationResponseAttr(notificationButtonsObj) + .subscribe((result: NotificatonButtonResponse) => { + this.handleNotificationResAttrResult(result); + }); + } + + handleNotificationResAttrResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + this.NotRespondAttributeList = + result.NotificationGetRespondAttributesList; + if ( + result.NotificationRespondRolesList != "" && + result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && + result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined + ) { + this.Resp2_val = result.NotificationRespondRolesList[0].ATTRIBUTE_NAME; + this.hideForwordEmployee = result.NotificationRespondRolesList[0]; + } + this.notificationDynamicFields(result.NotificationGetRespondAttributesList); + this.NotificationGetRespondAttributesList = result.NotificationGetRespondAttributesList; + + this.common.sharedService.setSharedData( + this.NotificationGetRespondAttributesList, + WorklistMainIcComponent.PASS_RES_ATTR + ); + + this.notificationDynamicAttributeArr = result.NotificationGetRespondAttributesList; + if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema); + } // valid it + } // End handleWorkListButtonsResult + + notificationDynamicFields(notificationAttr) { + const containerId = 'notificationDynamicFieldsPO'; + for (let i = 0; i < notificationAttr.length; i++) { + if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); + // console.log(this.textArea); + + } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { + + } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { + + } else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") { + + } + } + } + + openNotificationBody() { + if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + EITNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + EITNotificatonBodyResponse.NOT_WORKLIST + ); + // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); + this.common.sharedService.setSharedData("EIT", "NotBodyType"); + this.common.openNotificationDetailsPage(); + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + this.common.sharedService.setSharedData( + this.notificationBodyRes, + AbsenceNotificatonBodyResponse.SHARED_DATA + ); + this.common.sharedService.setSharedData( + this.getPassNotificationDetails, + AbsenceNotificatonBodyResponse.NOT_WORKLIST + ); + this.common.sharedService.setSharedData("ABSENCE", "NotBodyType"); + //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); + this.common.openNotificationDetailsPage(); + } + } + + // getNotificationCountAfterSubmit() { + // const req: any = {}; + // this.menuService.getNotificationCount(req).subscribe((result: any) => { + // if (this.common.validResponse(result)) { + // this.notificationCount = + // result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM; + // if (this.notificationCount <= 0) { + // this.notificationCount = null; + // } + // this.events.publish("getNotCount", this.notificationCount); + // } + // }); + // } + + + + + getAttachmentNotification(WorkListAttachObj) { + this.attachmentRes = []; + this.worklistAttachService.getAttach(WorkListAttachObj). + subscribe((result: NotificationGetAttachResponse) => { + this.handleWorkListAttachResult(result); + }); + } + + handleWorkListAttachResult(result) { + if (this.common.validResponse(result)) { + // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); + if (result.GetAttachementList != null) { + this.attachmentRes = result.GetAttachementList; + } // if result == null + } // valid it + } + + getActionHistory(WorkListActionHistoryObj) { + this.IsReachEnd = true; + this.actionHistoryRes = []; + this.worklistService.getActionHistory(WorkListActionHistoryObj). + subscribe((result: WorkListActionHistoryResponse) => { + this.handleWorkListActionHistoryResult(result); + }); + + + } + handleWorkListActionHistoryResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetActionHistoryList)) { + this.actionHistoryRes = result.GetActionHistoryList; + + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + let lastItemIndex = this.actionHistoryRes.length - 1; + if (result.GetActionHistoryList[lastItemIndex]) { + let lastitem = result.GetActionHistoryList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + } + } + this.turnCateFun(this.actionHistoryRes); + + } + } + + async openNoteDetail(note, sender) { + // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); + // modalPage.present(); + // console.log("note" + note); + + this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') + this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') + + const modal = await this.modalCtrl.create({ + component: ViewNoteModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + return await modal.present(); + } + + doInfinite(infiniteScroll) { + // console.log("doInfinite action history"); + if (!this.IsReachEnd) { + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => infiniteScroll.target.complete()); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + infiniteScroll.target.complete(); + + }); + } else { + if (infiniteScroll) + infiniteScroll.target.complete(); + } + }//end infiniteScroll + + //**********Attachment *****************// + + + async OpenAttachFiles(value, Type) { + // let modal: Modal = this.modalCtrl.create('WorkListAttachViewPage', { displayData: value, TypeData: Type }); + // modal.present(); + + this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage') + const modal = await this.modalCtrl.create({ + component: WorkListAttachViewComponent + }); + + return await modal.present(); + } + + getItemHistory(itemID) { + // console.log(itemID); + this.IsReachEnd = false; + const request = new POItemHistoryRequest(); + request.P_ITEM_ID = parseInt(itemID); + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; + this.worklistMainService.getPOItemHistory(request). + subscribe((result: POItemHistoryRes) => { + // this.common.sharedService.setSharedData( + // result.GetItemHistoryList, + // WorklistMainIcComponent.ItemHistoryList + // ); + this.common.sharedService.setSharedData( + itemID, + WorklistMainIcComponent.PASS_PO_INFO + ); + //open page + // this.common.openItemHistoryPage(); + this.handleItemHistoryResult(result); + }); + } + + + handleItemHistoryResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetPoItemHistoryList)) { + this.common.openItemHistoryPage(); + + } + } + else { + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); + } + + } + + getQutationAnalysis(headerID, itemID) { + // console.log(itemID + headerID); + this.IsReachEnd = false; + const request = new QuotationAnalysisRequest(); + request.P_ITEM_ID = parseInt(itemID); + request.P_PO_HEADER_ID = headerID; + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; + this.worklistMainService.getQutationAnalysis(request). + subscribe((result: QuotationAnalysisResponse) => { + this.common.sharedService.setSharedData( + itemID, + WorklistMainIcComponent.PASS_PO_INFO + ); + this.common.sharedService.setSharedData( + headerID, + WorklistMainIcComponent.PASS_PO_HEADER_ID + ); + //open page + + this.handleQutationAnalysisResult(result); + }); + + + } + handleQutationAnalysisResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetQuotationAnalysisList)) { + + //open page + //set sheard data + // + + this.common.openQutationAnalysisPage(); + + + // this.QutationAnalysisRes = result.GetQutationAnalysisList; + // this.P_PAGE_NUM++; + // let lastItemIndex = this.QutationAnalysisRes.length - 1; + // if (result.GetQutationAnalysisList[lastItemIndex]) { + // let lastitem = result.GetQutationAnalysisList[lastItemIndex]; + // if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + // this.IsReachEnd = true; + // } else { + // this.IsReachEnd = false; + // } + // } + }//hasData + else { + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); + } + + } + } + + loadMoreNotificationBody() { + // console.log("loadMoreNotificationBody PO"); + if (!this.IsReachEnd) { + // console.log("this.IsReachEnd" + this.IsReachEnd); + + this.worklistMainService.getPONotificationBody(this.WorkListBodyObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetPoNotificationBodyList != undefined) { + this.P_PAGE_NUM++; + this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM; + (result.GetPoNotificationBodyList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.notificationBodyRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") + ); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + // if (infiniteScroll) + // infiniteScroll.target.complete(); + } + }//end infiniteScroll + + loadMoreActionHistory() { + console.log("doInfinite action history MR"); + + if (!this.IsReachEnd) { + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + //if (infiniteScroll) + //infiniteScroll.target.complete(); + } + }//end infiniteScroll + + async openMoreActions() { + + + + + const modal = await this.modalCtrl.create({ + component: MoreActionModalComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'note-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + // this.selectedAction = data.data; + this.actionType = data.data.BUTTON_ACTION; + console.log(this.actionType); + ///call Action button + this.actionButton(this.actionType); + } + }); + + return await modal.present(); + + + + + } + + /////////////////////////////////////////// + + public checkLines(note) { + console.log(note.split("\n").length); + console.log(note.length); + + if (note && note != null) { + + + return (note.length > this.lines_note_limit) ? true : false; + + + + } + + + + return false; + }; + + + public turnCateFun(actionHis) { + for (let i = 0; i < actionHis.length; i++) { + actionHis[i].visible = false; + + } + // actionHis.map((obj) => { + // obj.visible = false; + // // or via brackets + // // obj['total'] = 2; + // return obj; + // }) + this.actionHistoryRes = actionHis; + console.log("test"); + } + + async openRepRolModal() { + + + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); + + const modal = await this.modalCtrl.create({ + component: WorkListReplacementRollComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data.data == "cancel" || data.data.data == undefined) { + return; + } else if (data.data.data == "Success") { + // this.openNotificationsDashboard(); + this.messageSuccess = true; + setTimeout(() => { + this.messageSuccess = false; + this.nextNotfification(); + }, 2000); + // this.nextNotfification(); + + } + }); + + return await modal.present(); + + + + + } + + async openRFCModal() { + + + + + const modal = await this.modalCtrl.create({ + component: WorkListRfcComponent, + backdropDismiss: false, + + }); + modal.cssClass = 'replaceRoll-modal'; + + modal.onDidDismiss() + .then((data) => { + console.log(data.data); + + if (data.data == "cancel" || data.data == undefined) { + return; + } else { + + + } + }); + + return await modal.present(); + + + + + } + + openNotificationsDashboard() { + this.dashboredService.getOpenNotifications('', '', this.isPostNoLoad).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'); + } + }); + } + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } + + returnDateTime(stringDate: string){ + let allDateTime = stringDate.split(' '); + let time = allDateTime[1].split(':', 2); + let fullDate = this.transform(stringDate); + return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2]; + + } + locale = { + en: { + // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + } +}; + transform(value: string) { + let x = new Date(Date.parse(value)); + //return value.toLowerCase(); + let month = this.getMonthNameShort('en',x.getMonth()) + return ""+ x.getDate()+" "+ month +" "+x.getFullYear(); + + + } + + + + + getMonthNameShort(lang,month) { + lang = lang && (lang in this.locale) ? lang : 'en'; + return this.locale[lang].month_names_short[month]; +}; + +} diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 56e1f721..59a8ead5 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -437,89 +437,79 @@ - - - -
-

{{ 'general, empty' | translate}}

-
-
- -
- - -
- - - -
- - -
-
- - {{actionHistory.NAME}} - - -
-
-
- Note: {{actionHistory.NOTE}} -
-
- - -
- -
- Note: {{actionHistory.NOTE}} - - -
- + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{returnDateTime(actionHistory.NOTIFICATION_DATE)}} +
+ + + + + +
+
-
- - - - - {{actionHistory.ACTION}} - - - - {{actionHistory.NOTIFICATION_DATE| dateString }} - - +
- -
- + - + - - - + + diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss index b539fa22..424d9366 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss @@ -1,110 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 15px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } - .no-padding-label { padding: 0px !important; } @@ -112,7 +5,30 @@ .margin-left { margin-left: 0px; } - +@media only screen and (max-width: 320px) { + .active-Segment { + font-size: 0.3cm !important; + background: #269DB8 !important; + text-transform: none; + --color-checked: none; + border-radius: 100px; + border:0; + } + .active-Segment ion-label{ + font-size: 8px !important; + color: white !important; + } + .normal-Segment ion-label{ + color: black; + font-size: 8px !important; + } + .normal-Segment { + font-size: 0.3cm; + text-transform: none; + --color-checked: none; + border: 0; + } +} .active-Segment { font-size: 0.3cm !important; background: #269DB8 !important; @@ -139,4 +55,18 @@ .action-btn { white-space: nowrap; font-size: 10px; + } + .req_info{ + width: 20px; + height: 20px; + display: inline-block; + margin: 15px 10px 0px 0px; + } + .name{ + color:black !important ;font-weight: bold; + } + .timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; } \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 180ef69d..c64765f5 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -94,7 +94,7 @@ export class WorklistMainMRComponent implements OnInit { delMsg: string; closeMsg: string; activeSegment: any = 'info'; - lines_note_limit: any = 24; + lines_note_limit: any = 19; orgNote: string; truncating: boolean; selectedIndex: any; @@ -112,9 +112,9 @@ export class WorklistMainMRComponent implements OnInit { public isPostNoLoad = true; public worklistNotifications: any; public totalRequestCount = 0; - approve_label: any =""; - reject_label: any=""; - reqInfo_label: any=""; + approve_label: any = ""; + reject_label: any = ""; + reqInfo_label: any = ""; close_label: any; closeDis: boolean = false; selectedFilter: string; @@ -142,47 +142,39 @@ export class WorklistMainMRComponent implements OnInit { ngOnInit() { this.WorkListAttachObj = new WorkListButtonRequest(); - this.selectedFilter = this.common.sharedService.getSharedData('selectedFilter', false); + this.selectedFilter = this.common.sharedService.getSharedData('selectedFilter', false); this.intializeNotificationDetail(); } public segmentChanged(event: any) { this.activeSegment = event.detail.value; - if(this.activeSegment === 'info') - { - this.slides.slideTo(0); - } - else if(this.activeSegment === 'item-req') - { - this.slides.slideTo(1); - } - else if(this.activeSegment === 'action-history') - { - this.slides.slideTo(2); - } - else if(this.activeSegment === 'attach') - { - this.slides.slideTo(3); - } + if (this.activeSegment === 'info') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'item-req') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(3); + } } public slideChanged(event: any) { this.slides.getActiveIndex().then(index => { - if(index === 0) - { + if (index === 0) { this.activeSegment = 'info'; } - else if(index === 1) - { + else if (index === 1) { this.activeSegment = 'item-req'; } - else if(index === 2) - { + else if (index === 2) { this.activeSegment = 'action-history'; } - else if(index === 3) - { + else if (index === 3) { this.activeSegment = 'attach'; } }); @@ -316,7 +308,7 @@ export class WorklistMainMRComponent implements OnInit { getNotificationButtons(notificationButtonsObj) { - this.notificationButtonRes=[]; + this.notificationButtonRes = []; this.worklistMainService .getNotificationButtons(notificationButtonsObj) .subscribe((result: NotificatonButtonResponse) => { @@ -332,31 +324,30 @@ export class WorklistMainMRComponent implements OnInit { this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore'); // console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED" ) { - this.approve_label=this.notificationButtonRes[i].BUTTON_LABEL; - + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { + this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED" ) { - this.reject_label=this.notificationButtonRes[i].BUTTON_LABEL; + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { + this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; this.rejectDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { - this.reqInfo_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; this.requestDis = true; } // if result == null else if // if result == null - (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { - this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; - this.closeDis = true; - } - else if( - this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") - { - this.moreDisabled = false; + (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { + this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.closeDis = true; + } + else if ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { + this.moreDisabled = false; - } + } } // valid it @@ -413,10 +404,10 @@ export class WorklistMainMRComponent implements OnInit { public nextNotfification() { //let itemExist = false; - if( document.getElementById("notificationDynamicFieldsMR") != null){ + if (document.getElementById("notificationDynamicFieldsMR") != null) { document.getElementById("notificationDynamicFieldsMR").innerHTML = ""; - } + } let itemNo = this.getPassNotificationDetails.ROW_NUM; let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); let previousRequest = this.notificationArray[index].REQUEST_TYPE; @@ -438,23 +429,23 @@ export class WorklistMainMRComponent implements OnInit { } } - checkRequestType(index){ - if (this.notificationArray[index].REQUEST_TYPE === 'PO' ) { + checkRequestType(index) { + if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); } else - if (this.notificationArray[index].REQUEST_TYPE === 'PR' ) { - this.common.openWorklistMainPRPage(); - } else - if (this.notificationArray[index].REQUEST_TYPE === 'MO' ) { - this.intializeNotificationDetail(); - } else { - this.common.openWorklistMainPage(); - } + if (this.notificationArray[index].REQUEST_TYPE === 'PR') { + this.common.openWorklistMainPRPage(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'MO') { + this.intializeNotificationDetail(); + } else { + this.common.openWorklistMainPage(); + } } actionButton(action) { // console.log('actionButton' + action); - // alert("don't forget"); + // alert("don't forget"); //let ButtonAction: string = this.actionType; let ButtonAction: string = action; var responseAttrDic = this.notExampleJsonObject; @@ -514,7 +505,7 @@ export class WorklistMainMRComponent implements OnInit { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } - // this.openApplyModal(this.WorkListActionObj); + // this.openApplyModal(this.WorkListActionObj); this.common.confirmAlertDialogAction( () => { @@ -682,7 +673,7 @@ export class WorklistMainMRComponent implements OnInit { getNotificationResAttr(notificationButtonsObj) { // console.log("getNotificationResAttr"); - this.NotRespondAttributeList=[]; + this.NotRespondAttributeList = []; this.worklistMainService .notificationResponseAttr(notificationButtonsObj) .subscribe((result: NotificatonButtonResponse) => { @@ -779,7 +770,7 @@ export class WorklistMainMRComponent implements OnInit { getAttachmentNotification(WorkListAttachObj) { - this.attachmentRes=[]; + this.attachmentRes = []; this.worklistAttachService.getAttach(WorkListAttachObj). subscribe((result: NotificationGetAttachResponse) => { this.handleWorkListAttachResult(result); @@ -797,7 +788,7 @@ export class WorklistMainMRComponent implements OnInit { getActionHistory(WorkListActionHistoryObj) { this.IsReachEnd = true; - this.actionHistoryRes=[]; + this.actionHistoryRes = []; this.worklistService.getActionHistory(WorkListActionHistoryObj). subscribe((result: WorkListActionHistoryResponse) => { this.handleWorkListActionHistoryResult(result); @@ -1105,7 +1096,7 @@ export class WorklistMainMRComponent implements OnInit { async openReplacementRoll() { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, backdropDismiss: false, @@ -1118,13 +1109,13 @@ export class WorklistMainMRComponent implements OnInit { if (data.data.data == 'cancel' || data.data.data == undefined) { return; - } else if (data.data.data == 'Success') { + } else if (data.data.data == 'Success') { // this.openNotificationsDashboard(); this.messageSuccess = true; - setTimeout(() => { - this.messageSuccess = false; - this.nextNotfification(); - }, 2000); + setTimeout(() => { + this.messageSuccess = false; + this.nextNotfification(); + }, 2000); // this.nextNotfification(); } @@ -1170,17 +1161,17 @@ export class WorklistMainMRComponent implements OnInit { } - getMOItemHistory(itemID ,orgID) { + getMOItemHistory(itemID, orgID) { // console.log(itemID); this.IsReachEnd = false; const request = new MOItemHistoryReq(); request.P_ITEM_ID = parseInt(itemID); request.P_PAGE_LIMIT = 100; request.P_PAGE_NUM = 1; - request.P_ORG_ID= parseInt(orgID); - + request.P_ORG_ID = parseInt(orgID); + + - this.worklistMainService.getMOItemHistory(request). subscribe((result: MOItemHistoryRes) => { // this.common.sharedService.setSharedData( @@ -1222,6 +1213,41 @@ export class WorklistMainMRComponent implements OnInit { } }); } + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } + + returnDateTime(stringDate: string){ + let allDateTime = stringDate.split(' '); + let time = allDateTime[1].split(':', 2); + let fullDate = this.transform(stringDate); + return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2]; + + } + locale = { + en: { + // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + } +}; + transform(value: string) { + let x = new Date(Date.parse(value)); + //return value.toLowerCase(); + let month = this.getMonthNameShort('en',x.getMonth()) + return ""+ x.getDate()+" "+ month +" "+x.getFullYear(); + + + } + + + + + getMonthNameShort(lang,month) { + lang = lang && (lang in this.locale) ? lang : 'en'; + return this.locale[lang].month_names_short[month]; +}; + } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 02711308..37ba1670 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -170,6 +170,81 @@ + + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ + +
+
+ +
+
+ + + {{actionHistory.NAME}} + + +
+
+
+ Note: {{actionHistory.NOTE}} +
+
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + + +
+ + +
+
+ {{actionHistory.ACTION}} + + + + {{returnDateTime(actionHistory.NOTIFICATION_DATE)}} +
+ + + + + +
+
+
+
+
+ + + +
+
+ +
+
- +

{{ 'general, notAttch' | translate}}

diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss index ffee0278..593f2549 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.scss @@ -1,112 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 16px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } - -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } - -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } .no-padding-label { padding: 0px !important; @@ -116,7 +7,8 @@ margin-left: 0px; } -.active-Segment { +@media only screen and (max-width: 320px) { + .active-Segment { font-size: 0.3cm !important; background: #269DB8 !important; text-transform: none; @@ -124,21 +16,62 @@ border-radius: 100px; border:0; } + .active-Segment ion-label{ + font-size: 8px !important; + color: white !important; + } + .normal-Segment ion-label{ + color: black; + font-size: 8px !important; + } + .normal-Segment { + font-size: 0.3cm; + text-transform: none; + --color-checked: none; + border: 0; + } +} + +.active-Segment { + font-size: 0.3cm; + background: #269DB8 ; + text-transform: none; + --color-checked: none; + border-radius: 100px; + border:0; + } .active-Segment ion-label{ font-size: 11px; color: white !important; } .normal-Segment ion-label{ - color: black !important; + color: black; font-size: 11px; } .normal-Segment { - font-size: 0.3cm !important; + font-size: 0.3cm; text-transform: none; --color-checked: none; border: 0; } + + .action-btn { white-space: nowrap; font-size: 10px; - } \ No newline at end of file + } + .name{ + color:black !important ;font-weight: bold; + } + .timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; + } + .req_info{ + width: 20px; + height: 20px; + display: inline-block; + margin: 15px 10px 0px 0px; + } + \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index a37979ef..844f3af6 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -107,7 +107,7 @@ export class WorklistMainPoComponent implements OnInit { itemHistoryRes: any; QutationAnalysisRes: any; activeSegment: any = "line_details"; - lines_note_limit: number = 24; + lines_note_limit: number = 19; notiActionBtnMore: any = []; demoeAttach: any = []; orgNote: any; @@ -129,7 +129,7 @@ export class WorklistMainPoComponent implements OnInit { reqInfo_label: any; closeDis: boolean = false; selectedFilter: string; -; + ; close_label: any; constructor( @@ -449,11 +449,11 @@ export class WorklistMainPoComponent implements OnInit { if (index < this.notificationArray.length) { this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); this.activeSegment = 'line_details'; - if(this.selectedFilter === 'ALL'){ - this.checkRequestType(index); + if (this.selectedFilter === 'ALL') { + this.checkRequestType(index); } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { this.checkRequestType(index); - }else { + } else { this.common.openNotificationPage(); } } else { @@ -462,7 +462,7 @@ export class WorklistMainPoComponent implements OnInit { } - checkRequestType(index){ + checkRequestType(index) { if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.intializeNotificationDetail(); } else @@ -1170,7 +1170,7 @@ export class WorklistMainPoComponent implements OnInit { async openRepRolModal() { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, @@ -1245,5 +1245,38 @@ export class WorklistMainPoComponent implements OnInit { }); } + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } + + returnDateTime(stringDate: string){ + let allDateTime = stringDate.split(' '); + let time = allDateTime[1].split(':', 2); + let fullDate = this.transform(stringDate); + return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2]; + + } + locale = { + en: { + // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + } +}; + transform(value: string) { + let x = new Date(Date.parse(value)); + //return value.toLowerCase(); + let month = this.getMonthNameShort('en',x.getMonth()) + return ""+ x.getDate()+" "+ month +" "+x.getFullYear(); + + + } + + + + getMonthNameShort(lang,month) { + lang = lang && (lang in this.locale) ? lang : 'en'; + return this.locale[lang].month_names_short[month]; +}; } diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index b4f6cd3a..ccc730ee 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -199,44 +199,50 @@ - + + +

{{ 'general, empty' | translate}}

- -
-
+ +
+
-
+ src="../assets/imgs/profile.png">
- - + + {{actionHistory.NAME}} -
-
-
-
- Note: {{actionHistory.NOTE}} -
+ +
+
+
+ Note: {{actionHistory.NOTE}}
-
-
- Note: {{actionHistory.NOTE}} -
- +
+ + +
+ +
+ Note: {{actionHistory.NOTE}} + +
+ +
- {{actionHistory.NOTIFICATION_DATE| dateString }} + {{returnDateTime(actionHistory.NOTIFICATION_DATE)}} + + + + + +
- + + + - - + + diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss index c58a5c9b..a8895a39 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss @@ -1,109 +1,3 @@ -// .itemHISBtn{ -// padding: 5px; -// color: var(--light); -// background: var(--darkgray); -// border-radius: 3px; -// width: 85%; -// height: 40px; -// } - - -// .rowBtn{ -// display: flex; -// flex-direction: row; -// justify-content: center; -// align-items: center; -// background: white; -// } - - - -// .rowBorder{ -// border-bottom: solid 0.03cm var(--grayBG); - -// } -// .colBorder{ -// border-right: solid 0.03cm var(--grayBG); - -// } - -// .dateActionHistory{ -// text-align: end; -// // margin-top: -25px; -// } - - -// .actionBtn{ -// --border-radius: 50% !important; -// height: 55px; -// width: 55px; -// --background: var(--newgreen); // will be dynamic -// background: transparent; -// margin:10px; -// } - -// .itemAttch{ -// border-radius: 11px; -// margin: 8px; -// --min-height: 60px; -// --max-height: 60px; -// } - -// .less { -// max-height: 54px; -// } - -// .noDataDiv{ -// background: #ffffff; -// height: 11%; -// text-align: center; -// padding-top: 1px; -// border-radius: 10px; -// margin: 10px; -// } - -// .container { -// font-size: 14px; -// line-height: 14px; -// height: 16px; -// overflow: hidden; -// text-align: justify; -// } - -// .show { -// overflow: visible; -// height: auto; -// } - -// .showMore{ -// padding: 0px; -// background: transparent; -// color: blue; -// text-decoration: underline; -// font-size: 14px; -// } -// .succssfullMSG{ -// height: 100%; -// width: 100%; -// background: var(--newgreen); -// color: white; -// font-weight: bold; -// font-size: 20px; -// text-align: center; -// vertical-align: middle; -// padding-top: 30px; -// } - -// .succssfullIcon{ -// width: 60%; -// text-align: center; -// height: 60%; -// } -// .subjectNotification{ -// text-align: center; -// padding-top: 10px; -// font-weight: bold; -// } .no-padding-label { padding: 0px !important; @@ -139,4 +33,19 @@ // white-space: pre-wrap; white-space: nowrap; font-size: 10px; - } \ No newline at end of file + } + +.name{ + color:black !important ;font-weight: bold; +} +.timeline-item{ + margin: 0; + white-space: nowrap; + font-size: 10px; +} +.req_info{ + width: 20px; + height: 20px; + display: inline-block; + margin:15px 10px 0px 0px; +} diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index 7fa0f6d3..83f68c84 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -95,7 +95,7 @@ export class WorklistMainPRComponent implements OnInit { closeMsg: string; truncating: boolean; orgNote: any; - lines_note_limit: any = 24; + lines_note_limit: any = 19; selectedIndex: any; showLessBtn: boolean; showMoreBtn: boolean; @@ -146,22 +146,18 @@ export class WorklistMainPRComponent implements OnInit { public segmentChanged(event: any) { this.activeSegment = event.detail.value; - if(this.activeSegment === 'info') - { - this.slides.slideTo(0); - } - else if(this.activeSegment === 'item-req') - { - this.slides.slideTo(1); - } - else if(this.activeSegment === 'action-history') - { - this.slides.slideTo(2); - } - else if(this.activeSegment === 'attach') - { - this.slides.slideTo(3); - } + if (this.activeSegment === 'info') { + this.slides.slideTo(0); + } + else if (this.activeSegment === 'item-req') { + this.slides.slideTo(1); + } + else if (this.activeSegment === 'action-history') { + this.slides.slideTo(2); + } + else if (this.activeSegment === 'attach') { + this.slides.slideTo(3); + } console.log(" event.detail.value: " + event.detail.value); } @@ -169,20 +165,16 @@ export class WorklistMainPRComponent implements OnInit { this.slides.getActiveIndex().then(index => { console.log(index); console.log(event); - if(index === 0) - { + if (index === 0) { this.activeSegment = 'info'; } - else if(index === 1) - { + else if (index === 1) { this.activeSegment = 'item-req'; } - else if(index === 2) - { + else if (index === 2) { this.activeSegment = 'action-history'; } - else if(index === 3) - { + else if (index === 3) { this.activeSegment = 'attach'; } console.log(this.activeSegment); @@ -194,7 +186,7 @@ export class WorklistMainPRComponent implements OnInit { this.approveDis = false; this.rejectDis = false; this.requestDis = false; - this.closeDis =false; + this.closeDis = false; this.moreDisabled = true; if (this.messageSuccess) { @@ -362,29 +354,28 @@ export class WorklistMainPRComponent implements OnInit { console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') { - this.approve_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL; this.approveDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') { - this.reject_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL; this.rejectDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { - this.reqInfo_label=this.notificationButtonRes[i].BUTTON_LABEL; + this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; this.requestDis = true; } // if result == null else if // if result == null - (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { - this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; - this.closeDis = true; - } + (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") { + this.close_label = this.notificationButtonRes[i].BUTTON_LABEL; + this.closeDis = true; + } else if ( - this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") - { - this.moreDisabled = false; + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") { + this.moreDisabled = false; - } + } } // valid it } } // valid it @@ -438,11 +429,11 @@ export class WorklistMainPRComponent implements OnInit { public nextNotfification() { //let itemExist = false; - if( document.getElementById("notificationDynamicFieldsPR") != null){ - + if (document.getElementById("notificationDynamicFieldsPR") != null) { + document.getElementById("notificationDynamicFieldsPR").innerHTML = ""; - } + } let itemNo = this.getPassNotificationDetails.ROW_NUM; console.log(itemNo); let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); @@ -454,31 +445,31 @@ export class WorklistMainPRComponent implements OnInit { if (index < this.notificationArray.length) { this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); this.activeSegment = 'info'; - if(this.selectedFilter === 'ALL'){ + if (this.selectedFilter === 'ALL') { this.checkRequestType(index); } else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) { this.checkRequestType(index); - } else { - this.common.openNotificationPage(); - } + } else { + this.common.openNotificationPage(); + } } else { this.common.openNotificationPage(); } } - checkRequestType(index){ - if (this.notificationArray[index].REQUEST_TYPE === 'PO' ) { + checkRequestType(index) { + if (this.notificationArray[index].REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); } else - if (this.notificationArray[index].REQUEST_TYPE === 'PR' ) { - this.intializeNotificationDetail(); - } else - if (this.notificationArray[index].REQUEST_TYPE === 'MO' ) { - this.common.openWorklistMainMRPage(); - } else { - this.common.openWorklistMainPage(); - } + if (this.notificationArray[index].REQUEST_TYPE === 'PR') { + this.intializeNotificationDetail(); + } else + if (this.notificationArray[index].REQUEST_TYPE === 'MO') { + this.common.openWorklistMainMRPage(); + } else { + this.common.openWorklistMainPage(); + } } actionButton(action) { @@ -755,7 +746,7 @@ export class WorklistMainPRComponent implements OnInit { for (let i = 0; i < notificationAttr.length; i++) { if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', ''); - console.log(this.textArea ); + console.log(this.textArea); } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') { @@ -1104,7 +1095,7 @@ export class WorklistMainPRComponent implements OnInit { - + this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData'); const modal = await this.modalCtrl.create({ component: WorkListReplacementRollComponent, backdropDismiss: false, @@ -1176,5 +1167,38 @@ export class WorklistMainPRComponent implements OnInit { } }); } + openRequestInfoDel(userData, flag) { + this.common.sharedService.setSharedData(userData, 'requestInfoDelUser'); + this.actionButton(flag); + } + + returnDateTime(stringDate: string){ + let allDateTime = stringDate.split(' '); + let time = allDateTime[1].split(':', 2); + let fullDate = this.transform(stringDate); + return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2]; + + } + locale = { + en: { + // month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + } +}; + transform(value: string) { + let x = new Date(Date.parse(value)); + //return value.toLowerCase(); + let month = this.getMonthNameShort('en',x.getMonth()) + return ""+ x.getDate()+" "+ month +" "+x.getFullYear(); + + + } + + + + getMonthNameShort(lang,month) { + lang = lang && (lang in this.locale) ? lang : 'en'; + return this.locale[lang].month_names_short[month]; +}; } \ No newline at end of file diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index b9a2af3f..7366e112 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -10,8 +10,7 @@ class="ion-segment-all"> - + {{'worklistMain, info'| translate}} @@ -24,8 +23,9 @@ [ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'"> {{'worklistMain, action' | translate}} - - + + {{'worklistMain, attach-file' | translate}} @@ -40,21 +40,24 @@ -
{{pInformation}}
+
{{pInformation}} +
- +
- + *ngFor="let notificationBody of item.Collection_Notification;" + size="6" [hidden]="notificationBody.DISPLAY_FLAG == 'N'"> +
@@ -65,41 +68,49 @@
- {{ts.trPK('worklistMain','employee-on-leave')}} + {{ts.trPK('worklistMain','employee-on-leave')}}
- - +
-
-
- + -
+
-
+
@@ -107,181 +118,193 @@
- + - - - - - -
- - - - -
- -
- - -
- -
-
- - - - -
- -
- - -
- -
-
- - - -
- -
- - -
- -
-
-
- -
-
-
-
-
- - - - - -
- {{'userProfile, emp-detail' | translate}}
- -
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - - -
- - -
-
- - - -
- - -
-
-
-
- -
-
-
-
- - - - - - - -
-
+ + + + + +
+ + + + +
+ +
+ + +
+ +
+
+ + + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+
+ +
+
+
+
+
+ + + + + +
+ {{'userProfile, emp-detail' | translate}}
+ +
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + + + + +
+ + +
+
+
+
+ +
+
+
+
+ + + + + + + + + - +
@@ -298,10 +321,11 @@
+ src="../assets/imgs/profile.png"> +
- - + + {{actionHistory.NAME}} @@ -322,7 +346,8 @@
+ (click)="actionHistory.visible = !actionHistory.visible">{{ + actionHistory.visible ? 'Show less': 'Show More' }}
@@ -333,7 +358,14 @@ - {{actionHistory.NOTIFICATION_DATE| dateString }} + {{returnDateTime(actionHistory.NOTIFICATION_DATE)}} + + + + +
@@ -341,9 +373,9 @@
- + + + +
+ + + +
+ + +
+
+ + {{attachRes.FILE_NAME }} + +
+ + + + + + + +
+
+ +
+ + + +
{{'confirmAddEit, comment' | translate}}
+ + + + +
+ + +
{{'confirmAddEit, approverList' | translate}}
+
+

{{ 'general, empty' | translate}}

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

{{ 'general, empty' | translate}}

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

{{User_name_Emp}}

-

{{User_Job_name}}

+

{{personalInfo.EMPLOYEE_NAME}}

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

{{ts.trPK('userProfile','Years of Services')}}

-
+ + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - {{ts.trPK('userProfile','edit-profile')}} - - - - - - - - - - - {{ts.trPK('userProfile','performance-evaluation')}} - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
\ No newline at end of file diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.scss b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss index 4d784a03..85728b60 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.scss +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.scss @@ -1,216 +1,130 @@ +ion-col.colBold, ion-col.colBold > label{ + font-weight:bold; +} - -.list-ios { - // margin-left: 0; - // margin-right: 0; - // margin-top: 32px; - // margin-bottom: 32px; - // background: var(--ion-item-background,var(--ion-background-color,#fff)); - margin-left: 0; - margin-right: 0; - margin-top: -15px; - margin-bottom: 32px; - border: 1px solid #d8d8d8; - background: var(--ion-item-background, var(--ion-background-color, #fff)); - border-radius: 10px; - padding-top: 60px; +.colorBG{ +--background: #f0efef; +} +.header-div{ + text-transform: capitalize; + background: #269DB8; + display: block; + position: relative; + height: 160px; + margin-bottom: 60px; } -.header-toolbar-new{ - --background: #269DB8; +// .profileCont{ +// background-color: #d9d7d7 !important; + + +.menubutton { +background: #f0ecec; +min-height: 39px; +width: 35px !important; +height: 20px; +border-radius: 50%; } -.colorBG{ - --background: #f0efef; - } - .header-div{ - text-transform: capitalize; - background: #269DB8; - display: block; + +.changeIcon{ + /* background: #c1c1c1; */ + width: 21px; + /* height: 26px; */ + border-radius: 50% !important; position: relative; - height: 113px; - margin-bottom: 60px; - } + color: #7f8c8d; + height: 35px; + +} +.changeImgBtn{ + position: absolute; + top: 80%; + left: 65%; +} +.changeImgBtn-ar{ + position: absolute; + top: 80%; + left: 66%; +} .profileImg{ width: 160px; - height: 160px; - display: -webkit-inline-box; - display: inline-flex; - overflow: hidden; - /* background: transparent; */ - border-radius: 78% !important; - position: relative; - top: 34px; - // background: white; - background: transparent; - margin-left: -3px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + // background: transparent; + border-radius: 69% !important; + position: relative; + top: 34px; + // background: white; + background: transparent; +} +.Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 34px; + text-align: center; } -.proTitles { - margin: 0; - padding: 0; - font-size: 16px; - text-align: center; - font-weight: bolder; - color: white; - margin-top: -33px; - } - - .Text { - margin: 0; - padding: 0; - text-align: center; - font-weight: bolder; - color: black; - font-size: 16px; - margin-top: 34px; - margin-bottom: 10px; - text-align: center; - } - - - - ion-thumbnail.menu-thumb{ - width:20px; - height:20px; - // margin-top: 5px !important; - } - - .profile{ - color: black !important; - // font-weight: bolder !important; - - } - - .gridService-en{ - margin-top: 87px; - border-radius: 10px; - margin-bottom: -49px; - margin-left: 30px; - margin-right: 30px; - } - .gridService-ar{ - margin-top: 87px; - border-radius: 10px; - margin-bottom: -49px; - margin-left: 17px; - margin-right: 17px; - } - - .columns{ - // margin: 10px; - // background: #0B4775; - // border-radius: 27px; - // padding-left: 30px; - // padding-right: 6px; - // padding-top: 19px; - // padding-bottom: 26px; - } - .columns-ar{ - // margin: 10px; - // background: #0B4775; - // border-radius: 27px; - // padding-left: 7px; - // padding-right: 3px; - // padding-top: 19px; - // padding-bottom: 26px; - } - - .service{ - font-size: 28px; - // font-weight: bolder; - color: white; - letter-spacing: 1px; - font-weight: bold; - } - .services{ - - font-size: 12px; - color: white; - } - .service-ar{ - font-size: 28px; - color: white; - letter-spacing: 1px; - font-weight: bold; - margin-right: 26px; - } - .services-ar{ - font-size: 20px; - color: white; - margin-right: 25px; - } - - .list{ - margin-left: 14px; - margin-right: 14px; - border-radius: 10px; - // background: white; - border:#bebbbb !important; - padding: 2px; - } - .p{ - color: black !important; - font-size: medium; - text-align: center; - border-bottom: rgb(190, 187, 187) solid 1px; - } - .itemline{ - border-bottom: rgb(190, 187, 187) solid 1px; - } - .itemlins{ - border-bottom: rgb(190, 187, 187) solid 1px; - margin-bottom: 209px; +.line{ + + padding-top: 0px !important; + /* margin-bottom: 0px; */ + /* margin: 0px; */ + border-right: 1px #c5c2c2 solid !important; + line-height: 10px !important; +} +.proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; +} + + +.profileGrid{ + border: #bebbbb solid 1px; + border-radius: 9px; + padding: 0px; + margin-top: 54px; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 10px; + color: black; + // font-weight: bold; + background: white; - } - .empName { - margin: 0; - padding: 0; - text-align: center; - font-weight: bolder; - color: black; - font-size: 16px; - margin-top: 38px; - - } - .empJob{ - - margin: 0; - padding: 0; - text-align: center; - color: black; - font-size: 16px; - margin-top: 4px; - - } - .arrow{ - width: 20px; - height: 22px !important; - } - .arrow-ar{ - float: left; - font-size: 25px; - color: grey; - -webkit-transform: rotate(180deg); - transform: rotate(180deg); - } - - .verticalLine { - width:1%; - height:50px; - background:white; - margin-top: 100%; - // margin-left: 10%; } -.service-row-en{ - width: 79%; - margin: -12px 0px 0px 35px; + + + +.lebl{ + + color: black; + font-size: 14px !important; + font-weight: bold !important; + padding-top: 9px; + padding-left: 5px; + } -.service-row-ar{ - width: 95%; - margin: -12px 0px 35px 0px; +.rowBolds{ + color: black !important; + font-size: 14px !important; + /* padding: 6px !important; */ + padding-bottom: 9px; + padding-left: 5px; + padding-top: 4px; + } \ No newline at end of file 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 16b4fe15..c59b712d 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -1,14 +1,11 @@ import { Component, OnInit } from '@angular/core'; -import { Platform, Events, MenuController } from '@ionic/angular'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; -import { 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 { Events } from '@ionic/angular'; import { DomSanitizer } from '@angular/platform-browser'; -// import { DomSanitizer } from '@angular/platform-browser'; + @Component({ @@ -17,47 +14,35 @@ import { DomSanitizer } from '@angular/platform-browser'; styleUrls: ['./edit-profile.component.scss'], }) export class EditProfileComponent implements OnInit { - - - User_name_Emp: string = ''; - User_Job_name: string; - public direction: string; - private menu: MenuController; - setImage:any; - // imageSrc: any = "../assets/imgs/profile.png"; - user_image: any = '../assets/imgs/profile.png'; personalInfo: any; - appraisalArr :any =[]; - public performanceData: any=[]; - public static PERFORMANCE_DATA = 'perAppData'; - + setImage:any; + imageSrc: any = '../assets/imgs/profile.png'; + public direction: string; + // user_image: any = "../assets/imgs/profile.png"; constructor( public ts: TranslatorService, public cs: CommonService, public authService: AuthenticationService, - public DS :DashboredService, - public sharedData: SharedDataService, - public events: Events, + private events: Events, private sanitizer: DomSanitizer, - // private events: Events, - // private sanitizer: DomSanitizer, - ) - { - this.direction = TranslatorService.getCurrentDirection(); - this.events.subscribe('img-change', displayImg => { - console.log('app compont: '+displayImg); - this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); - - }); + ) { + this.direction = TranslatorService.getCurrentDirection(); + this.events.subscribe('img-change', displayImg => { + // alert("1 - profile home : "+displayImg); + //this.user_image = "data:image/png;base64"+displayImg; + this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + + }); + } ngOnInit() { - this.getProfile(); + this.getProfile(); } - getProfile() { console.log('getProfile'); this.authService @@ -65,60 +50,27 @@ export class EditProfileComponent implements OnInit { .subscribe((user: AuthenticatedUser) => { if (user) { 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); - console.log('job name: '+ user.JOB_NAME); - - }}); -} - -openEditprofile(){ - this.cs.openProfile(); -} - -openPerormance(){ - this.showPerformanceAppraisal(); - -} - -showPerformanceAppraisal(){ - this.DS.getPerformanceAppraisal(()=>{ - this.showPerformanceAppraisal(); - }).subscribe((result: PerformanceAppraisalResponse) => { - this.handlePerformanceAppraisalResult(result); - - }); -} - -private handlePerformanceAppraisalResult(result){ - if (this.cs.validResponse(result)) { - if (this.cs.hasData(result.GetPerformanceAppraisalList)) { - this.appraisalArr =result.GetPerformanceAppraisalList; - this.performanceData=[]; - - for(let i=0;i + - -
-
-
- - -
- - -
-

{{personalInfo.EMPLOYEE_NAME}}

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

{{ts.trPK('userProfile','personal-informaion')}}

+
+
+ +

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

+
+

{{personalInfo.EMPLOYMENT_CATEGORY_MEANING}}

+
+ +

{{ts.trPK('userProfile','phone-no')}}

+
+

{{personalInfo.EMPLOYEE_MOBILE_NUMBER}}

+
+ +

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

+
+

{{personalInfo.BUSINESS_GROUP_NAME}}

+
+ +

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

+
+

{{personalInfo.PAYROLL_NAME}}

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

{{ts.trPK('general','basic-details')}}

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

{{ts.trPK('general','full-name')}}

+
+

{{fullName}}

+
+ +

{{ts.trPK('general','marital-status')}}

+
+

{{maritalStatus}}

+
+ +

{{ts.trPK('general','birth_date')}}

+
+

{{birthDate}}

+
+ +

{{ts.trPK('general','civil-identity-number')}}

+
+

{{civilIdentityNumber}}

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

{{ts.trPK('general','main-address')}}

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

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

+
+

{{address}}

+
+ +

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

+
+

{{street}}

+
+ +

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

+
+

{{area}}

+
+ +

{{ts.trPK('userProfile','p-o-box')}}

+
+

{{poBox}}

+
+ +

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

+
+

{{city}}

+
+ +

{{ts.trPK('userProfile','postal-code')}}

+
+

{{postalCode}}

+
+
+
- - - - - - - - - - - + + + -
- -
- - -
\ No newline at end of file diff --git a/Mohem/src/app/profile/home/home.component.scss b/Mohem/src/app/profile/home/home.component.scss index e8143682..8ea8bfd1 100644 --- a/Mohem/src/app/profile/home/home.component.scss +++ b/Mohem/src/app/profile/home/home.component.scss @@ -1,130 +1,1353 @@ -ion-col.colBold, ion-col.colBold > label{ - font-weight:bold; +.list-ios { + // margin-left: 0; + // margin-right: 0; + // margin-top: 32px; + // margin-bottom: 32px; + // background: var(--ion-item-background,var(--ion-background-color,#fff)); + margin-left: 0; + margin-right: 0; + margin-top: -15px; + margin-bottom: 32px; + border: 1px solid #d8d8d8; + background: var(--ion-item-background, var(--ion-background-color, #fff)); + border-radius: 10px; + padding-top: 60px; } -.colorBG{ +.header-toolbar-new { + --background: #269db8; +} +.colorBG { --background: #f0efef; - } -.header-div{ - text-transform: capitalize; - background: #269DB8; +} +.header-div { + text-transform: capitalize; + background: #269db8; + display: block; + position: relative; + height: 113px; + margin-bottom: 60px; +} + +.profileImg { + width: 160px; + height: 160px; + display: -webkit-inline-box; + display: inline-flex; + overflow: hidden; + /* background: transparent; */ + border-radius: 78% !important; + position: relative; + top: 34px; + // background: white; + background: transparent; + margin-left: -3px; +} + +.proTitles { + margin: 0; + padding: 0; + font-size: 16px; + text-align: center; + font-weight: bolder; + color: white; + margin-top: -33px; +} + +.Text { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 34px; + margin-bottom: 10px; + text-align: center; +} + +ion-thumbnail.menu-thumb { + width: 20px; + height: 20px; + // margin-top: 5px !important; +} + +.profile { + color: black !important; + // font-weight: bolder !important; +} + +.gridService-en { + // margin-top: 87px; + // border-radius: 10px; + margin-bottom: -49px; + // margin-left: 30px; + // margin-right: 30px; +} +.gridService-ar { + // margin-top: 87px; + // border-radius: 10px; + margin-bottom: -49px; + // margin-left: 17px; + // margin-right: 17px; +} + +.columns { + // margin: 10px; + // background: #0B4775; + // border-radius: 27px; + // padding-left: 30px; + // padding-right: 6px; + // padding-top: 19px; + // padding-bottom: 26px; +} +.columns-ar { + // margin: 10px; + // background: #0B4775; + // border-radius: 27px; + // padding-left: 7px; + // padding-right: 3px; + // padding-top: 19px; + // padding-bottom: 26px; +} + +.service { + font-size: 12px; + // font-weight: bolder; + color: white; + // letter-spacing: 1px; + // font-weight: bold; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); +} +.services { + font-size: 12px; + color: white; +} +.service-ar { + font-size: 20px; + color: white; + // letter-spacing: 1px; + font-weight: bold; + margin-right: 10px; +} +.services-ar { + font-size: 20px; + color: white; + margin-right: 25px; +} + +.list { + margin-left: 14px; + margin-right: 14px; + border-radius: 10px; + // background: white; + border: #bebbbb !important; + padding: 2px; +} +.p { + color: black !important; + font-size: medium; + text-align: center; + border-bottom: rgb(190, 187, 187) solid 1px; +} +.itemline { + border-bottom: rgb(190, 187, 187) solid 1px; +} +.itemlins { + border-bottom: rgb(190, 187, 187) solid 1px; + margin-bottom: 209px; +} +.empName { + margin: 0; + padding: 0; + text-align: center; + font-weight: bolder; + color: black; + font-size: 16px; + margin-top: 38px; +} +.empJob { + margin: 0; + padding: 0; + text-align: center; + color: black; + font-size: 16px; + margin-top: 4px; +} +.arrow { + width: 20px; + height: 22px !important; +} +.arrow-ar { + float: left; + font-size: 25px; + color: grey; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} + +.verticalLine { + width: 1%; + height: 50px; + background: white; + margin-top: 100%; + // margin-left: 10%; +} + +.service-row-en { + width: 85%; + margin: -12px 0px 0px 25px; +} +.service-row-ar { + width: 108%; + margin: -12px 0px 0px 0px; +} + +ion-content { + --ion-background-color: whitesmoke; +} +ion-title { + color: white; + position: absolute; + top: 0; + text-align: center; + left: 15%; + right: 15%; + font-size: 0.5cm; + font-weight: bold; + height: 100%; + font-family: WorkSans-Regular; +} +.contentBg { + padding: 0px 20px; +} + +.contentBg:before { + position: absolute; + content: ""; + background: #269db8; + height: 140px; + width: 100%; + left: 0; + top: 0px; + z-index: 1; +} + +.user-info { + text-align: center; + margin-bottom: 15px; + .user-image-container { + position: relative; + width: 100%; + height: 24px; + justify-content: space-between; + display: flex; + margin: 0 auto; + align-items: center; + } + // position: relative; + // width: 80px; + // height: 80px; + // display: block; + // margin: 0 auto; + // &:before{ + // position: absolute; + // content: ""; + // width: 20px; + // height: 20px; + // border-radius: 20px; + // border: 1px solid white; + // top: 0; + // right: 0; + // background-color: red; + // z-index: 9; + // } + // &.present:before{ + // background-color: green !important; + // } +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .user-image { + position: relative; display: block; + width: 30%; + height: 100%; + border-radius: 80px; + /* border: 1px solid #ccc; */ + margin-top: -125px; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .user-image { + // position: relative; + // display: block; + // width: 30%; + // height: 100%; + // border-radius: 80px; + // margin-bottom: 371px; position: relative; - height: 160px; - margin-bottom: 60px; + display: block; + width: 30%; + height: 100%; + border-radius: 80px; + margin-bottom: 321px; + margin-left: 52px; + } +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .user-image-ar { + position: relative; + display: block; + width: 30%; + height: 100%; + border-radius: 80px; + /* border: 1px solid #ccc; */ + margin-top: -125px; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .user-image-ar { + // position: relative; + // display: block; + // width: 30%; + // height: 100%; + // border-radius: 80px; + // margin-bottom: 371px; + position: relative; + display: block; + width: 30%; + height: 100%; + border-radius: 80px; + margin-bottom: 321px; + margin-right: 52px; + }} +h1 { + margin: 0; + padding: 0; + font-family: WorkSans-Bold; + font-size: 18px; + margin-bottom: 4px; +} +span { + font-size: 11px; + display: block; + // color: #888 +} + +$actionBtnSize: 36px; +.user-actions { + text-align: center; + .action-button { + font-size: 11px; + font-weight: bold; + // white-space: nowrap; + // color: #888; + .action-button-icon { + width: $actionBtnSize; + height: $actionBtnSize; + border-radius: $actionBtnSize; + margin: 0 auto; + display: block; + background-color: #269db8; + line-height: $actionBtnSize; + margin-bottom: 3px; + img { + margin: 0 auto; + vertical-align: middle; + } + } + } +} +.employee-information-indetail { + background: white; + margin-top: 15px; + border-radius: 20px; + margin-bottom: 15px; + border-radius: 20px; + border: 1px solid #ccc; + ion-col { + padding: 15px; + // border-bottom: 1px solid #ccc; } + h2 { + font-size: 13px; + // font-family: WorkSans-Bold; + margin: 0; + font-weight: bold; + color: rgb(128, 124, 124); + } + p { + font-size: 13px; + margin: 0; + font-family: WorkSans-Bold; + // margin-bottom: 10px; + } +} -// .profileCont{ -// background-color: #d9d7d7 !important; +.segments-container { + border-radius: 100px; + overflow: hidden; + margin-top: 15px; + background: white; + color: black; +} +@media screen and (min-width: 1px) and (max-width: 767px) { + .active-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 30% !important; + min-height: 36px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 22px; + margin-left: 22px; + background-color: #269db8; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .active-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 56% !important; + min-height: 68px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 62px; + margin-left: 45px; + background: #269db8 !important; + padding-left: 17px; + } +} -.menubutton { - background: #f0ecec; - min-height: 39px; - width: 35px !important; - height: 20px; - border-radius: 50%; -} - - .changeIcon{ - /* background: #c1c1c1; */ - width: 21px; - /* height: 26px; */ - border-radius: 50% !important; - position: relative; - color: #7f8c8d; - height: 35px; - - - } - - .changeImgBtn{ +@media screen and (min-width: 1px) and (max-width: 767px) { + .normal-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 30% !important; + min-height: 36px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 22px; + margin-left: 22px; + background: #414040 !important; + } +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .normal-Segment { + width: 11%; + max-width: 11%; + min-width: 11%; + height: 56% !important; + min-height: 68px; + padding-right: -10px; + border-radius: 50% !important; + margin-right: 62px; + margin-left: 45px; + background: #414040 !important; + padding-left: 17px; + } +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .imgSize { position: absolute; - top: 80%; - left: 65%; + /* right: 15px; */ + top: 0; + bottom: 0; + left: 7px; + margin: auto; + height: 18px; } - .changeImgBtn-ar{ +} +@media screen and (min-width: 768px) and (max-width: 1024px) { + .imgSize { position: absolute; - top: 80%; - left: 66%; - } -.profileImg{ - width: 160px; - height: 160px; - display: -webkit-inline-box; - display: inline-flex; - overflow: hidden; - // background: transparent; - border-radius: 69% !important; + top: 0; + bottom: 0; + left: 9px; + margin: auto; + height: 28px; + } +} + +.colum-container { + padding: 15px; + border-bottom: 1px solid #ccc; +} +.img { + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + border-radius: 78% !important; + position: relative; + /* top: 34px; */ + background: transparent; + margin-left: 119%; +} +.img-ar { + width: 100px; + height: 100px; + display: inline-flex; + overflow: hidden; + border-radius: 78% !important; + position: relative; + /* top: 34px; */ + background: transparent; + margin-right: 119%; +} +///////////////////////// Team Members css //////////////////////@extend + +.filters-row { + margin-top: 10px; +} + +.search-dropdown { + background: #269db8; + ion-select { + .select-text { + margin-left: -10px; + } + .select-icon { + .select-icon-inner { + opacity: 1; + color: white; + margin-top: -1px; + } + } + } +} + +.input-container { + background: white; + ion-input { + border-bottom-color: transparent; + } +} + +.search-container { + margin-top: 15px; + ion-col { + background: white; + border-radius: 12px; + padding-right: 10px; + flex: none; + ion-icon { + margin-right: 3px; + font-size: 14px; + margin-left: 3px; + vertical-align: middle; + } + span { + font-size: 12px; + vertical-align: middle; + } + } +} + +/////////////////////////////////////////////////////// Attendance /////////////////////// +.header { + // margin-top: 20px; + margin-top: 1px; +} + +.slidPrev { + margin-left: 10px; + background: transparent; +} + +.slidNext { + background: transparent; + margin-top: -1px; + margin-left: 43px; +} +.activeArrow { + height: 20px; + width: 20px; + color: #269db8; +} +.disabledArrow { + height: 20px; + width: 20px; + color: gray; +} + +.activeArrow-ar { + height: 20px; + width: 20px; + color: #269db8; + margin-right: 275px; +} +.disabledArrow-ar { + height: 20px; + width: 20px; + color: gray; + /* margin-left: 136px; */ + margin-right: -251px; +} + +@media screen and (min-width: 1px) and (max-width: 767px) { + .result-graph { position: relative; - top: 34px; - // background: white; - background: transparent; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + width: 90%; + left: 5%; + } + .result-graph-ar { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + width: 90%; + right: 5%; + } } - .Text { - margin: 0; - padding: 0; - text-align: center; - font-weight: bolder; - color: black; - font-size: 16px; - margin-top: 34px; - text-align: center; +@media screen and (min-width: 768px) and (max-width: 1024px) { + .result-graph { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + width: 90%; + left: 5%; + } + + .result-graph-ar { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 89px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 114px !important; + width: 90%; + right: 5%; + } +} +.result-graph-attendence { + position: relative; + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 10px; + border-radius: 20px; + border: 1px solid #ccc; +} + +.request-heading { + text-align: left; + display: block; + padding-top: 8px; + margin-bottom: 10px; + margin-left: 10px; +} +.request-heading-ar { + text-align: right; + display: block; + padding-top: 8px; + margin-bottom: 10px; + margin-right: 12px; +} + +.result-text-container { + padding: 0; + margin: 0; + position: absolute; + left: 85%; + top: 50%; + display: block; + text-align: center; + transform: translate(-50%, -50%); + h2 { + font-size: 38px; + font-family: WorkSans-Bold; + margin: 0 auto; + line-height: 36px; } + span { + width: 125px; + display: block; + margin: 0 auto; + font-size: 12px; + font-family: workSans-Regular; + } +} +.today-graph { + // width: 100%; + max-height: 4cm; + display: block; + height: 132px; + width: 264px; + margin-left: 154px; +} + +.green-label { + font-size: 12px; + margin-top: -13px; +} + +.green-amount { + font-size: 17px; + font-family: WorkSans-Bold; + margin-top: -3px; +} - .line{ +.blue-label { + font-size: 12px; + margin-top: -13px; +} + +.blue-amount { + font-size: 17px; + font-family: WorkSans-Bold; + margin-top: -4px; +} - padding-top: 0px !important; - /* margin-bottom: 0px; */ - /* margin: 0px; */ - border-right: 1px #c5c2c2 solid !important; - line-height: 10px !important; - +.labelGrid { + background-color: white !important; + border-radius: 20px !important; + height: 88px !important; + border: 1px solid #d6d4d4; + position: relative; + padding: 10px; + + label { + font-size: 9px; + line-height: 11px !important; + display: block; } - .proTitles { + h2 { + font-size: 25px; + font-weight: bold; + display: block; + text-align: right; margin: 0; - padding: 0; - font-size: 16px; - text-align: center; - font-weight: bolder; - color: white; - margin-top: -33px; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + padding: 10px; } +} +.bodyGrid { + margin-top: 7px !important; + margin-left: 15px !important; + margin-right: 15px !important; + background-color: white !important; + border-radius: 20px !important; + height: 321px !important; + border: 1px solid #d6d4d4 !important; +} - .profileGrid{ - border: #bebbbb solid 1px; - border-radius: 9px; - padding: 0px; - margin-top: 54px; - margin-left: 10px; - margin-right: 10px; - margin-bottom: 10px; - color: black; - // font-weight: bold; - background: white; +.attendance-information { + background: white; + border-radius: 20px; + padding: 9px; + font-weight: bolder; + // border-right: 1px solid rgb(221, 221, 221); + @media screen and (min-width: 300px) and (max-width: 359px) { + h2 { + padding: 0; + margin: 0; + font-size: 14px; + } + span { + font-size: 9px; + } } - + @media screen and (min-width: 360px) { + h2 { + padding: 0; + margin: 0; + font-size: 14px; + } + span { + font-size: 11px; + margin-bottom: 3px; + } + } +} + +.month-year-span { + font-size: 16px; + // font-family: WorkSans-Bold; + font-weight: bold; +} + +.green-label-container { + // border-top: 5px solid #269DB8; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #269db8; +} - - .lebl{ +.blue-label-container { + // border-top: 5px solid #292F42; + // padding: 1px 0px; + // margin: 15px 0px + width: 12px; + height: 12px; + padding-right: -10px; + border-radius: 100%; + background-color: #292f42; + margin-top: 30px; +} +.span-one { + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; +} +.span-two { + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: -2px; + font-weight: bold; + font-family: WorkSans-Bold; +} - color: black; - font-size: 14px !important; - font-weight: bold !important; - padding-top: 9px; - padding-left: 5px; - +.spa-one { + // display: block; + // font-size: 12px; + // color: black; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; +} +.spa-two { + // display: block; + // font-size: 22px; + display: block; + font-size: 12px; + color: black; + margin-left: 6px; + margin-top: 28px; + font-weight: bold; + font-family: WorkSans-Bold; +} +.graph-container { + margin-left: -50px; + position: relative; + margin-right: 50px; +} +.label-container { + position: absolute; + // width: 20%; + // right: 30px; + top: 50%; + margin-top: -27px; + left: 20px; +} +.attendance-summary .attendance-information { + span { + height: 32px; + display: block; + line-height: 14px; + } + h2 { + // text-align: right; + // font-family: WorkSans-Bold; + font-weight: bolder; + font-size: 13px; + } +} + +.calendar-container { + background: white; + margin-bottom: 100px; + margin-top: 10px; + border-radius: 20px; + border: 1px solid #ccc; + padding-bottom: 25px; + span { + text-align: left; + display: block; + padding-top: 8px; + margin-bottom: 10px; + margin-left: 10px; } - .rowBolds{ - color: black !important; - font-size: 14px !important; - /* padding: 6px !important; */ - padding-bottom: 9px; - padding-left: 5px; - padding-top: 4px; +} +.calendar-container-ar { + background: white; + margin-bottom: 100px; + margin-top: 20px; + border-radius: 20px; + span { + text-align: right; + display: block; + padding-top: 8px; + margin-bottom: 6px; + margin-right: 12px; + } +} + +.Boldtext { + font-size: 13px; + font-family: WorkSans-Bold; + color: black !important; + display: block !important; + // line-height: 0px !important; +} + +.attendence { + position: relative; + background: white; + border-radius: 20px; + border: 1px solid #ccc; +} + +.attendence-text { + margin-bottom: 1px; + margin-left: 10px; + font-family: WorkSans-Bold; + font-size: 16px; +} +.stats { + color: #289db8; + font-size: 9px; + margin-right: 5px; + font-family: "WorkSans-Bold"; +} + +.text { + font-size: 16px; + font-weight: bolder; + font-family: "WorkSans-Bold"; + margin-top: 27px; +} + +.number { + width: 20px; + height: 20px; + padding-right: -10px; + border-radius: 100%; + background-color: #269db8; + z-index: 9; + margin-top: 26px; +} + +.numberEmp { + color: white; + font-size: 13px; + font-weight: bolder; + margin-left: 6px; +} + +.slider-container { + padding-bottom: 20px; +} + +.filters-row { + margin-top: 10px; + margin-left: 20px; +} + +.disable-filter { + pointer-events: none; + opacity: 0.3; +} + +.header-background-style-card { + padding-top: 1px; + background: #269db8; + height: 115px; +} + +.text-years { + text-align: center; + width: 20px; +} +@media screen and (min-width: 1px) and (max-width:766px){ +.grid-card { + right: 5px; + position: relative; + display: block; + z-index: 5; + width: 103%; +}} +@media screen and (min-width: 1px) and (max-width:766px){ +.grid-card-ar { + left: 5px; + position: relative; + display: block; + z-index: 5; + width: 103%; +}} +@media screen and (min-width: 768px) and (max-width:1050px){ +.grid-card { + right: 5px; + position: relative; + display: block; + z-index: 5; + width: 101%; +}} +@media screen and (min-width: 768px) and (max-width:1050px){ +.grid-card-ar { + left: 5px; + position: relative; + display: block; + z-index: 5; + width: 101%; +}} + +@media screen and (min-width: 1px) and (max-width:766px){ +.changeImgBtn { + position: absolute; + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; + bottom: 55px; + right: 36%; + top: -15%; + z-index: 99; +}} +@media screen and (min-width: 768px) and (max-width:1050px){ +.changeImgBtn { + position: absolute; + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; + bottom: 55px; + right: 41%; + top: -10%; + z-index: 99; +}} +@media screen and (min-width: 1060px) and (max-width:1090px){ + .changeImgBtn { + position: absolute; + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; + bottom: 55px; + right: 41%; + top: -10%; + z-index: 99; + }} + +@media screen and (min-width: 1px) and (max-width:766px){ + .changeImgBtn-ar { + position: absolute; + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; + bottom: 55px; + left: 36%; + top: -15%; + z-index: 99; + }} + @media screen and (min-width: 768px) and (max-width:1050px){ + .changeImgBtn-ar { + position: absolute; + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; + bottom: 55px; + left: 41%; + top: -10%; + z-index: 99; + }} + @media screen and (min-width: 1060px) and (max-width:1090px){ + .changeImgBtn-ar { + position: absolute; + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; + bottom: 55px; + left: 46%; + top: -10%; + z-index: 99; + }} + +.menubutton { + background: #f0ecec; + min-height: 25px; + width: 24px !important; + height: 20px; + border-radius: 50%; +} + +.changeIcon { + border: 0; + width: 13px; + margin: -2px; + // bottom: 6px; + // width: 10px; + // border-radius: 50% !important; + // position: relative; + // color: #7f8c8d; + // height: 35px; +} + +.card-style-details-info { + background: white; + // margin-top: 20px; + padding-bottom: 20px; + border-radius: 20px; + z-index: 1; + margin-bottom: 10px; + margin-top: 56px; + border-radius: 20px; + border: 1px solid #ccc; + padding-top: 12px; + width: 90%; + left: 5%; +} + +.login-input { + border: none; +} + +.card-size-info-en{ + // width: 88%; + // left: 2%; + width: 89%; + left: 10px; +} + +.card-size-info-ar{ + width: 90%; + right: 2%; +} + +// .header-label-text-form{ +// opacity: 1; +// color: #2B353E; +// font: normal normal 600 20px/30px Poppins; +// letter-spacing: -0.8px; +// } + +// .type-label-text-form{ +// font: normal normal 600 13px/20px Poppins; +// letter-spacing: -0.52px; +// color: #A2A2A2; +// opacity: 1; +// } + +// .result-label-text-form{ +// font: normal normal 600 16px/25px Poppins; +// letter-spacing: -0.64px; +// color: #2B353E; +// opacity: 1; +// } +.update{ + --background: #20A169; background: white; width: 100%; +} +.add{ + --background: #00bcd4; background: white; width: 100%; +} +.add-icon-styling { + background-color: #191814; + width: 35px; + height: 35px; + color: white; + border-radius: 50%; +} + +.name{ + text-align: center; + letter-spacing: -0.84px; + color: #2B353E; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 21px; + font-size: 21px; +} +.email{ + text-align: center; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 13px; + line-height: 6px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; +} + + +.subTitle{ + text-align: center; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 13px; + line-height: 0px; + margin-bottom: 7px; +} + + +.boldText{ + text-align: center; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + font-size: 16px; + line-height: 19px; +} + +.btnTitle{ + text-align: center; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 10px; + font-size: 11px; + color: #4D4D4D; +} + +.Profileheader-label-text-form{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 30px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 12px; + margin-bottom: 2px; +} + +.header-label-text-form{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 30px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: -3px; + margin-bottom: 2px; + margin-left: -11px;} + + +.type-label-text-form{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 13px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; +} + +.result-label-text-form{ + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; +} + + +.Profileheader-label-text-form-ar{ + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 30px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: 12px; + margin-bottom: 2px; +} + +.header-label-text-form-ar{ + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 30px; + font-size: 20px; + letter-spacing: -0.8px; + color: #2B353E; + opacity: 1; + margin-top: -3px; + margin-bottom: 2px; + margin-left: -11px;} + + +.type-label-text-form-ar{ + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 13px; + letter-spacing: -0.52px; + color: #A2A2A2; + opacity: 1; +} - } \ No newline at end of file +.result-label-text-form-ar{ + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 20px; + font-size: 16px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index befdf290..17d08d22 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -1,74 +1,358 @@ import { Component, OnInit } from '@angular/core'; +import { Events, MenuController, ModalController } from '@ionic/angular'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; -import { Events } from '@ionic/angular'; +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 { EditDetailProfileComponent } from '../modal/edit-detail-profile/edit-detail-profile.component'; +import { ProfileService } from '../service/profile.service' +import { ActivatedRoute } from '@angular/router'; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; + @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.scss'] }) export class HomeComponent implements OnInit { - personalInfo: any; - setImage:any; - imageSrc: any = '../assets/imgs/profile.png'; + public direction: string; - // user_image: any = "../assets/imgs/profile.png"; + public setImage: any; + public user_image: any = '../assets/imgs/profile.png'; + public personalInfo: any; + public appraisalArr: any = []; + public performanceData: any = []; + public static PERFORMANCE_DATA = 'perAppData'; + public personalInfoSegment = false; + public basicDetailsSegment = false; + public addressSegment = false; + public editBasic = false; + public editAddress = false; + public targetValue: any; + public employeeBasicDetails: any = []; + public fullName: string; + public maritalStatus: string; + public birthDate: any; + public civilIdentityNumber: any; + public menuEntries: any; + public basicDetailsSubMenu: any; + public addressSubMenu: any; + public transactionNo = 0; + public address: any; + public street: any; + public area: any; + public poBox: any; + public city: any; + public postalCode: any; + public country: any; + public employeeAdress: any = []; + public jobName: any; + constructor( public ts: TranslatorService, public cs: CommonService, public authService: AuthenticationService, - private events: Events, + public DS: DashboredService, + public sharedData: SharedDataService, + public events: Events, private sanitizer: DomSanitizer, - - + public modalController: ModalController, + public profileService: ProfileService, + public router: ActivatedRoute ) { this.direction = TranslatorService.getCurrentDirection(); this.events.subscribe('img-change', displayImg => { - // alert("1 - profile home : "+displayImg); - //this.user_image = "data:image/png;base64"+displayImg; - this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); - this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); - + console.log('app compont: ' + displayImg); + this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,' + displayImg); + }); + this.router.queryParams.subscribe(params => { + this.targetValue = params.targetValue; + if (this.targetValue === 'sideMenu') { + this.personalInfoSegment = true; + this.basicDetailsSegment = false; + this.addressSegment = false; + } else if (this.targetValue === 'basicDetails') { + this.personalInfoSegment = false; + this.basicDetailsSegment = true; + this.addressSegment = false; + } else if (this.targetValue === 'address') { + this.personalInfoSegment = false; + this.basicDetailsSegment = false; + this.addressSegment = true; + } else { + this.personalInfoSegment = true; + this.basicDetailsSegment = false; + this.addressSegment = false; + } }); - - } ngOnInit() { this.getProfile(); + this.menuEntries = this.cs.sharedService.getSharedData('menuEntries', false); + if (this.menuEntries) { + this.setMenuEntries(); + } + } + + public setMenuEntries() { + let personalInformationChildren: any; + let personalInfoNestedChildren: any; + + if (this.targetValue === 'sideMenu') { + for (let i = 0; i < this.menuEntries.length; i++) { + if (this.menuEntries[i].MENU_NAME === 'MBL_E_PROFESSIONALS_01') { + personalInformationChildren = this.menuEntries[i].children; + for (let j = 0; j < personalInformationChildren.length; j++) { + if (personalInformationChildren[j].MENU_NAME = 'MBL_PERINFO_SS' && personalInformationChildren[j].ENTRY_SEQUENCE === 15) { + personalInfoNestedChildren = personalInformationChildren[j].children; + for (let k = 0; k < personalInfoNestedChildren.length; k++) { + if (personalInfoNestedChildren[k].REQUEST_TYPE === 'BASIC_DETAILS') { + this.basicDetailsSubMenu = personalInfoNestedChildren[k]; + } + if (personalInfoNestedChildren[k].REQUEST_TYPE === 'ADDRESS') { + this.addressSubMenu = personalInfoNestedChildren[k]; + } + } + } + } + } + } + } else { + const menuEntriesLocalArray: any = this.menuEntries.children; + for (let i = 0; i < menuEntriesLocalArray.length; i++) { + if (menuEntriesLocalArray[i].REQUEST_TYPE === 'BASIC_DETAILS') { + this.basicDetailsSubMenu = menuEntriesLocalArray[i]; + } + if (menuEntriesLocalArray[i].REQUEST_TYPE === 'ADDRESS') { + this.addressSubMenu = menuEntriesLocalArray[i]; + } + } + } + console.log(this.basicDetailsSubMenu); + console.log(this.addressSubMenu); } - getProfile() { + + public getProfile() { console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { + console.log(user); this.personalInfo = user; - console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); - console.log('user name: '+ user.EMPLOYEE_NAME); - - if(this.cs.getUpdateImage().status){ - // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); - 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 - : this.imageSrc; - console.log('2-'+user); - } - } - else { - console.log('3-'+user); + + let jobTitle = user.POSITION_NAME.split('.'); + if (jobTitle && jobTitle.length > 1) { + this.jobName = jobTitle[0] + " " + jobTitle[1]; + }​ + + 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.getBasicDetails(); + this.getAddress(); } }); } + public getBasicDetails() { + const body = { + P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, + P_MENU_TYPE: "E", + P_SELECTED_RESP_ID: -999 + }; + this.profileService.getEmployeeBasicDetails(body).subscribe((result: any) => { + if (this.cs.validResponse(result)) { + this.employeeBasicDetails = result.GetEmployeeBasicDetailsList; + this.cs.sharedService.setSharedData(this.employeeBasicDetails, 'employeeDetails'); + console.log(this.employeeBasicDetails); + for (let i = 0; i < this.employeeBasicDetails.length; i++) { + if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'FULL_NAME') { + this.fullName = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP; + } else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'MARITAL_STATUS') { + this.maritalStatus = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP; + } else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'DATE_OF_BIRTH') { + this.birthDate = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP; + } else if (this.employeeBasicDetails[i].APPLICATION_COLUMN_NAME === 'NATIONAL_IDENTIFIER') { + this.civilIdentityNumber = this.employeeBasicDetails[i].SEGMENT_VALUE_DSP; + } + } + } + }); + } + + public getAddress() { + const body = { + P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, + P_MENU_TYPE: "E", + P_SELECTED_RESP_ID: -999 + }; + this.profileService.getEmployeeAddress(body).subscribe((result) => { + console.log(result); + this.employeeAdress = result.GetEmployeeAddressList; + this.country = { name: result.P_COUNTRY_NAME, code: result.P_COUNTRY_CODE } + for (let i = 0; i < this.employeeAdress.length; i++) { + if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'ADDRESS_LINE1') { + this.address = this.employeeAdress[i].SEGMENT_VALUE_DSP; + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_1') { + this.street = this.employeeAdress[i].SEGMENT_VALUE_DSP; + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_2') { + this.area = this.employeeAdress[i].SEGMENT_VALUE_DSP; + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'REGION_3') { + this.poBox = this.employeeAdress[i].SEGMENT_VALUE_DSP; + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'TOWN_OR_CITY') { + this.city = this.employeeAdress[i].SEGMENT_VALUE_DSP; + } else if (this.employeeAdress[i].APPLICATION_COLUMN_NAME === 'POSTAL_CODE') { + this.postalCode = this.employeeAdress[i].SEGMENT_VALUE_DSP; + } + } + }) + } + + public openEditprofile() { + this.cs.openProfile('sideMenu'); + } + + public openPerormance() { + this.showPerformanceAppraisal(); + } + + public showPerformanceAppraisal() { + this.DS.getPerformanceAppraisal(() => { + this.showPerformanceAppraisal(); + }).subscribe((result: PerformanceAppraisalResponse) => { + this.handlePerformanceAppraisalResult(result); + }); + } + + private handlePerformanceAppraisalResult(result) { + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.GetPerformanceAppraisalList)) { + this.appraisalArr = result.GetPerformanceAppraisalList; + this.performanceData = []; + for (let i = 0; i < this.appraisalArr.length; i++) { + this.performanceData.push({ name: this.appraisalArr[i].APPRAISAL_YEAR, value: parseInt(this.appraisalArr[i].APPRAISAL_SCORE).toFixed() }); + } + console.log('PerformanceAppraisalResponse'); + this.sharedData.setSharedData(this.performanceData, PerformanceAppraisalResponse.PERFORMANCE_DATA); + this.cs.openPerformanceevaluation(); + } else { + let msg: string = this.ts.trPK("userProfile", "no-appraisal"); + this.cs.presentAlert(msg); + } + } + } + + public selectedSegment(segmentData) { + switch (segmentData) { + case "personal": + this.personalInfoSegment = true; + this.basicDetailsSegment = false; + this.addressSegment = false; + this.editBasic = false; + this.editAddress = false; + break; + case "basic": + this.personalInfoSegment = false; + this.basicDetailsSegment = true; + this.addressSegment = false; + this.editBasic = false; + this.editAddress = false; + break; + case "address": + this.personalInfoSegment = false; + this.basicDetailsSegment = false; + this.addressSegment = true; + this.editBasic = false; + this.editAddress = false; + break; + } + } + + public allowEdit(allowVal: string) { - public ChangeImage() { + let selMenu: MenuResponse = new MenuResponse(); + selMenu = this.cs.sharedService.getSharedData(MenuResponse.SHARED_DATA, false); + selMenu.GetMenuEntriesList = allowVal === 'basic' ? this.basicDetailsSubMenu : this.addressSubMenu; + this.cs.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); + + if (allowVal === 'basic') { + this.transactionNo++; + // tslint:disable-next-line: max-line-length + this.cs.sharedService.setSharedData({ dirfromNotificationPage: false, submitEITObjList: undefined, transNo: this.transactionNo }, 'AddEITData'); + this.openAddBasicDetails(); + } else { + this.openAddAddress(); + } + } + + public disableEdit(disableVal) { + switch (disableVal) { + case 1: + this.editBasic = false; + break; + case 2: + this.editAddress = false; + break; + } + } + + async presentModal(source: string) { + const modal = await this.modalController.create({ + component: EditDetailProfileComponent, + cssClass: 'my-custom-modal-css' + }); + + modal.onDidDismiss() + .then((data) => { + console.log(data); + if (data.data && data.data.actionClicked === 'next') { + this.cs.sharedService.setSharedData(data.data, ProfileService.SELECTED_STATUS); + if (data.data && data.data.data == 1 && source === 'address') { + this.cs.sharedService.setSharedData(this.addressSubMenu, ProfileService.ADRESS_ENTRIES); + this.cs.sharedService.setSharedData(this.employeeAdress, ProfileService.EMP_ADDRESS); + this.cs.sharedService.setSharedData(this.country, ProfileService.COUNTRY); + + this.cs.openAddAddress(); + } else if (data.data && data.data.data == 2 && source === 'address') { + this.cs.openAddAddress(); + } else if (data.data && data.data.data == 1 && source === 'basicDetails') { + this.cs.openAddBasicDetails('correct'); + } else if (data.data && data.data.data == 2 && source === 'basicDetails') { + this.cs.openAddBasicDetails('new'); + } + } + }) + return await modal.present(); + } + + public updateImageProfile() { this.cs.openChangeImagePage(); } + + public openAddAddress() { + if (this.addressSubMenu && this.addressSubMenu.UPDATE_BUTTON === 'Y') { + this.presentModal('address'); + } else { + this.cs.openAddAddress(); + } + } + + public openAddBasicDetails() { + if (this.basicDetailsSubMenu && this.basicDetailsSubMenu.UPDATE_BUTTON === 'Y') { + this.presentModal('basicDetails'); + } else { + this.cs.openAddBasicDetails('correct'); + } + } } diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html new file mode 100644 index 00000000..54400f91 --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.html @@ -0,0 +1,39 @@ + + +

+ {{ts.trPK('general','type-of-change')}}

+
+ + + + + + +

{{ts.trPK('general','correct-or-complete')}}

+ +
+ + + +

{{ts.trPK('general','new-info')}}

+
+ +
+ +
+
+ + + + + + {{ts.trPK('eit','cancel-text')}} + + + + {{ts.trPK('general','next')}} + + + + +
\ No newline at end of file diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss new file mode 100644 index 00000000..38c1b5ac --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.scss @@ -0,0 +1,3 @@ +ion-label{ + white-space: normal; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts new file mode 100644 index 00000000..588a31d3 --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditDetailProfileComponent } from './edit-detail-profile.component'; + +describe('EditDetailProfileComponent', () => { + let component: EditDetailProfileComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditDetailProfileComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditDetailProfileComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts new file mode 100644 index 00000000..cf9a5842 --- /dev/null +++ b/Mohem/src/app/profile/modal/edit-detail-profile/edit-detail-profile.component.ts @@ -0,0 +1,32 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-edit-detail-profile', + templateUrl: './edit-detail-profile.component.html', + styleUrls: ['./edit-detail-profile.component.scss'], +}) +export class EditDetailProfileComponent implements OnInit { + public isChange: any; + + constructor( + public modalController: ModalController, + public ts: TranslatorService, + ) { } + + colorRadio = "#269db8" + + ngOnInit() { } + + dismiss(actionValue: any) { + // using the injected ModalController this page + // can "dismiss" itself and optionally pass back data + this.modalController.dismiss({ + dismissed: true, + actionClicked: actionValue, + data: this.isChange + }); + } + +} diff --git a/Mohem/src/app/profile/models/EITNotificationBodyItems.ts b/Mohem/src/app/profile/models/EITNotificationBodyItems.ts new file mode 100644 index 00000000..4c1bf836 --- /dev/null +++ b/Mohem/src/app/profile/models/EITNotificationBodyItems.ts @@ -0,0 +1,18 @@ +export class EITNotificationBodyItems { + public TRANSACTION_NUMBER :number; + public DESC_FLEX_NAME : string; + public ACTION : string; + public EXTRA_INFO_ID :number; + public DESC_FLEX_CONTEXT_COD : string; + public APPLICATION_COLUMN_NAME : string; + public SEGMENT_SEQ_NUM :number; + public DATATYPE : string; + public SEGMENT_NAME : string; + public VARCHAR2_VALUE : string; + public SEGMENT_PROMPT : string; + public NUMBER_VALUE :number; + public SEGMENT_VALUE_DSP : string; + public DATE_VALUE : string ; + public PREV_SEGMENT_VALUE_DSP : string; + public DISPLAY_FLAG : string ; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/EITNotificationBodyRes.ts b/Mohem/src/app/profile/models/EITNotificationBodyRes.ts new file mode 100644 index 00000000..f6051d5d --- /dev/null +++ b/Mohem/src/app/profile/models/EITNotificationBodyRes.ts @@ -0,0 +1,8 @@ +import { EITNotificationBodyItems } from './EITNotificationBodyItems'; +import { Response } from '../../hmg-common/services/models/response'; + +export class EITNotificatonBodyResponse extends Response { +public static SHARED_DATA = 'Notif_BODY_List'; +public static NOT_WORKLIST = 'Notif_WORK_LOST'; +public EITNotificationBodyItems: EITNotificationBodyItems []; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/EITTransactionsReq.ts b/Mohem/src/app/profile/models/EITTransactionsReq.ts new file mode 100644 index 00000000..8eabc296 --- /dev/null +++ b/Mohem/src/app/profile/models/EITTransactionsReq.ts @@ -0,0 +1,13 @@ +import { Request } from '../../hmg-common/services/models/request'; + +export class EITTransactionsRequest extends Request{ +public static SUBMIT_EIT_ACTION='submit-basic-action'; +public static SHARED_DATA='submit_basic_obj'; +public P_PAGE_NUM : Number; +public P_PAGE_LIMIT : Number; +public P_MENU_TYPE:String; +public P_SELECTED_EMPLOYEE_NUMBER:String; +public P_FUNCTION_NAME:String; +public P_SELECTED_RESP_ID : Number; + +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/NotificationButtonReq.ts b/Mohem/src/app/profile/models/NotificationButtonReq.ts new file mode 100644 index 00000000..908ddc4f --- /dev/null +++ b/Mohem/src/app/profile/models/NotificationButtonReq.ts @@ -0,0 +1,6 @@ +import { Request } from '../../hmg-common/services/models/request'; + +export class WorkListButtonRequest extends Request{ + //public static SHARED_DATA = ''; + public P_NOTIFICATION_ID :any; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/NotificationGetAttachRes.ts b/Mohem/src/app/profile/models/NotificationGetAttachRes.ts new file mode 100644 index 00000000..109fe921 --- /dev/null +++ b/Mohem/src/app/profile/models/NotificationGetAttachRes.ts @@ -0,0 +1,21 @@ +import { Response } from '../../hmg-common/services/models/response'; + +export class NotificationGetAttachResponse extends Response { +public static SHARED_DATA = ''; +public SEQ_NUM = 0;// Int +public FILE_NAME = '';//String +public FILE_DATA = '';//base64 +public PK1_VALUE = '';//String +public PK2_VALUE = '';//String +public PK3_VALUE = '';//String +public PK4_VALUE = '';//String +public FILE_CONTENT_TYPE = '';//String +public ATTACHED_DOCUMENT_ID = 0;//Int +public DOCUMENT_ID = 0;//Int +public CATEGORY_ID = 0;//Int +public DATATYPE_ID = 0;//Int +public ENTITY_NAME = '';//String +public FILE_ID = 0;//Int +public PK5_VALUE = '';//String + +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/add.eit.response.ts b/Mohem/src/app/profile/models/add.eit.response.ts new file mode 100644 index 00000000..b54537a7 --- /dev/null +++ b/Mohem/src/app/profile/models/add.eit.response.ts @@ -0,0 +1,8 @@ +import { Response } from '../../hmg-common/services/models/response'; +import { EitRespModel } from './eit.response.model' + +export class AddEitResponse extends Response { + public static SHARED_DATA = 'add-eit-response'; + SubmitEITTransactionList: EitRespModel; +} + diff --git a/Mohem/src/app/profile/models/basic.request.ts b/Mohem/src/app/profile/models/basic.request.ts new file mode 100644 index 00000000..68f183ec --- /dev/null +++ b/Mohem/src/app/profile/models/basic.request.ts @@ -0,0 +1,12 @@ +import { EitTransactionModel } from './eit.transaction.model'; + +export class BasicRequest { + public static SHARED_DATA = 'basic-request'; + public P_MENU_TYPE: string; + public P_SELECTED_EMPLOYEE_NUMBER: string; + public P_FUNCTION_NAME: string; + public P_SELECTED_RESP_ID: Number; + // P_DESC_FLEX_CONTEXT_CODE: string; + EITTransactionTBL: EitTransactionModel[]; + P_ACTION_TYPE: string; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/eit.response.model.ts b/Mohem/src/app/profile/models/eit.response.model.ts new file mode 100644 index 00000000..bd6f4a5d --- /dev/null +++ b/Mohem/src/app/profile/models/eit.response.model.ts @@ -0,0 +1,6 @@ +export class EitRespModel { + P_ITEM_KEY: string; + P_RETURN_MSG:string; + P_RETURN_STATUS:string; + P_TRANSACTION_ID:number; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/eit.transaction.model.ts b/Mohem/src/app/profile/models/eit.transaction.model.ts new file mode 100644 index 00000000..aa65466a --- /dev/null +++ b/Mohem/src/app/profile/models/eit.transaction.model.ts @@ -0,0 +1,7 @@ +export class EitTransactionModel { + TRANSACTION_NUMBER: number; + NUMBER_VALUE: number; + NAME: string; + DATE_VALUE: string; + VARCHAR2_VALUE: string; +} \ No newline at end of file diff --git a/Mohem/src/app/profile/models/submit.eit.action.ts b/Mohem/src/app/profile/models/submit.eit.action.ts new file mode 100644 index 00000000..80b4cb28 --- /dev/null +++ b/Mohem/src/app/profile/models/submit.eit.action.ts @@ -0,0 +1,6 @@ +// tslint:disable-next-line:class-name +export enum EIT_ACTION { + ADD = 1, + DELETE = 2, + UPDATE=3 +} diff --git a/Mohem/src/app/profile/profile.module.ts b/Mohem/src/app/profile/profile.module.ts index c1bd6191..42bd13b9 100644 --- a/Mohem/src/app/profile/profile.module.ts +++ b/Mohem/src/app/profile/profile.module.ts @@ -6,24 +6,44 @@ import { HmgCommonModule } from '../hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; import { NgxChartsModule } from '@swimlane/ngx-charts'; +import { DatePicker } from "@ionic-native/date-picker/ngx"; import { ProfilePage } from './profile.page'; import { HomeComponent } from './home/home.component'; -import {EditProfileComponent} from './edit-profile/edit-profile.component'; -import {ProfileImageComponent} from './profile-image/profile-image.component' -import {PerformanceEvaluationComponent} from './performance-evaluation/performance-evaluation.component' +import { EditProfileComponent } from './edit-profile/edit-profile.component'; +import { ProfileImageComponent } from './profile-image/profile-image.component' +import { PerformanceEvaluationComponent } from './performance-evaluation/performance-evaluation.component' import { from } from 'rxjs'; +import { EditDetailProfileComponent } from './modal/edit-detail-profile/edit-detail-profile.component'; +import { AddBasicDetailsComponent } from './add-basic-details/add-basic-details.component'; +import { AddAddressComponent } from './add-address/add-address.component'; +import { ConfirmAddressComponent } from './confirm-address/confirm-address.component'; +import { SubmitAddressModalComponent } from './submit-eit-modal/submit-address-modal.component'; +import { ConfirmBasicDetailsComponent } from './confirm-basic-details/confirm-basic-details.component'; const routes: Routes = [ { path: '', component: ProfilePage, children: [ { - path: 'home', - component: HomeComponent + path: 'home', + component: HomeComponent + }, + { + path: 'add-address', + component: AddAddressComponent + }, + { + path: 'confirm-add-address', + component: ConfirmAddressComponent + + }, + { + path: 'confirm-basic', + component: ConfirmBasicDetailsComponent } ], }, @@ -32,11 +52,11 @@ const routes: Routes = [ component: ProfilePage, children: [ { - path: 'profileImg', - component: ProfileImageComponent + path: 'profileImg', + component: ProfileImageComponent } ], - + }, { @@ -44,8 +64,8 @@ const routes: Routes = [ component: ProfilePage, children: [ { - path: 'editprofile', - component: EditProfileComponent + path: 'editprofile', + component: EditProfileComponent } ], }, @@ -55,12 +75,23 @@ const routes: Routes = [ component: ProfilePage, children: [ { - path: 'performanceevaluation', - component: PerformanceEvaluationComponent + path: 'performanceevaluation', + component: PerformanceEvaluationComponent } ], }, + { + path: '', + component: ProfilePage, + children: [ + { + path: 'addBasicDetails', + component: AddBasicDetailsComponent + } + ], + } + ]; @NgModule({ @@ -70,9 +101,24 @@ const routes: Routes = [ IonicModule, HmgCommonModule, NgxChartsModule, - RouterModule.forChild(routes) ], - declarations: [ProfilePage , HomeComponent,ProfileImageComponent,EditProfileComponent,PerformanceEvaluationComponent] + declarations: [ + ProfilePage, + EditDetailProfileComponent, + AddAddressComponent, + HomeComponent, + ProfileImageComponent, + EditProfileComponent, + PerformanceEvaluationComponent, + ConfirmAddressComponent, + SubmitAddressModalComponent, + AddBasicDetailsComponent, + ConfirmAddressComponent, + ConfirmBasicDetailsComponent, + AddBasicDetailsComponent], + entryComponents: [EditDetailProfileComponent, SubmitAddressModalComponent], + + providers: [DatePicker] }) -export class ProfilePageModule {} +export class ProfilePageModule { } diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index ce94bf0a..0feb9512 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -6,22 +6,125 @@ import { AuthenticationService } from "src/app/hmg-common/services/authenticatio providedIn: 'root' }) export class ProfileService { - public static updateEmpImage ="Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE"; - constructor( - public api: ConnectorService, - public authService: AuthenticationService - ) {} - - public updateImageProfile( updateImgRequest: any,onError?: any,errorLabel?: string - ): Observable { - console.log("services"); - const request = updateImgRequest; - this.authService.authenticateRequest(request); - return this.api.post( - ProfileService.updateEmpImage, - request, - onError, - errorLabel - ); - } + public static updateEmpImage = "Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE"; + public static getEmployeeBasicDetails = "Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS"; + /* EIT Services URLs */ + public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES'; + public static getEITTransctions = 'Services/ERP.svc/REST/GET_EIT_TRANSACTIONS'; + public static getBASICDFFStrutre = 'Services/ERP.svc/REST/GET_BASIC_DET_DFF_STRUCTURE'; + public static getBASICCOLStructure = 'Services/ERP.svc/REST/GET_BASIC_DET_COLS_STRUCTURE'; + public static getSetValue = 'Services/ERP.svc/REST/GET_VALUE_SET_VALUES'; + public static getDefaultValue = 'Services/ERP.svc/REST/GET_DEFAULT_VALUE'; + public static validateEITTransctions = 'Services/ERP.svc/REST/VALIDATE_EIT_TRANSACTION'; + public static submitEit = 'Services/ERP.svc/REST/SUBMIT_EIT_TRANSACTION'; + public static resubmitEit = 'Services/ERP.svc/REST/RESUBMIT_EIT_TRANSACTION'; + public static startEitProcess = 'Services/ERP.svc/REST/START_ADDRESS_APPROVAL_PROCESS'; + public static startBasicProcess = 'Services/ERP.svc/REST/START_BASIC_DET_APPR_PROCESS'; + public static updateAttach = 'Services/ERP.svc/REST/UPDATE_ATTACHMENT'; + public static deleteAttach = 'Services/ERP.svc/REST/DELETE_ATTACHMENT'; + public static getApproversList = 'Services/ERP.svc/REST/GET_APPROVERS_LIST'; + public static addAttachment = 'Services/ERP.svc/REST/ADD_ATTACHMENT'; + public static cancelHRTransaction = 'Services/ERP.svc/REST/CANCEL_HR_TRANSACTION'; + public static getAttach = 'Services/ERP.svc/REST/GET_ATTACHMENTS'; + + public static getEmployeeAddress = "Services/ERP.svc/REST/GET_EMPLOYEE_ADDRESS"; + public static getCountries = "Services/ERP.svc/REST/GET_COUNTRIES"; + public static getDiffStructure = "Services/ERP.svc/REST/GET_ADDRESS_DFF_STRUCTURE"; + public static submitAddressTransactions = "Services/ERP.svc/REST/SUBMIT_ADDRESS_TRANSACTION"; + public static submitBasicDetailsTransaction = "Services/ERP.svc/REST/SUBMIT_BASIC_DET_TRANSACTION"; + + public static ADRESS_ENTRIES = 'address-entries'; + public static EMP_ADDRESS = 'emp-address'; + public static COUNTRY = 'country'; + public static SELECTED_STATUS = 'selected-status'; + constructor( + public con: ConnectorService, + public authService: AuthenticationService + ) { } + + public updateImageProfile(updateImgRequest: any, onError?: any, errorLabel?: string + ): Observable { + const request = updateImgRequest; + this.authService.authenticateRequest(request); + return this.con.post( + ProfileService.updateEmpImage, + request, + onError, + errorLabel + ); + } + + public getEmployeeAddress(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getEmployeeAddress, request, onError, errorLabel); + } + + public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel); + } + + public getBasicDFFStrutre(BASICDFFStrutreReq: any, onError?: any, errorLabel?: string): Observable { + const request = BASICDFFStrutreReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getBASICDFFStrutre, request, onError, errorLabel); + } + + public getColumnStructure(body: any, onError?: any, errorLabel?: string): Observable { + const request = body; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getBASICCOLStructure, request, onError, errorLabel); + } + + public getDefaultValue(DefaultValueReq: any, onError?: any, errorLabel?: string): Observable { + const request = DefaultValueReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getDefaultValue, request, onError, errorLabel); + } + + public getSetValue(SetValueReq: any, onError?: any, errorLabel?: string): Observable { + const request = SetValueReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getSetValue, request, onError, errorLabel); + } + + public submitEit(eit: any, onError?: any, errorLabel?: string): Observable { + const request = eit; + request.EITTransactionTBLModel = eit.EITTransactionTBL; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.submitEit, request, onError, errorLabel); + } + + public getCountries(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getCountries, request, onError, errorLabel); + } + public getAddressDiffStructure(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicEmployeeDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.getDiffStructure, request, onError, errorLabel); + } + public submitAddressTransaction(validateEITTransactionReq: any, onError?: any, errorLabel?: string): Observable { + const request = validateEITTransactionReq; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.submitAddressTransactions, request, onError, errorLabel); + } + public submitBasicDetailsTransaction(basicDetailsRequest: any, onError?: any, errorLabel?: string): Observable { + const request = basicDetailsRequest; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.submitBasicDetailsTransaction, request, onError, errorLabel); + } + public startEitApprovalProcess(eitProcess: any, onError?: any, errorLabel?: string): Observable { + const request = eitProcess; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.startEitProcess, request, onError, errorLabel); + } + public startBasicDetailsApprovalProcess(basicDetailsProcess: any, onError?: any, errorLabel?: string): Observable { + const request = basicDetailsProcess; + this.authService.authenticateRequest(request); + return this.con.post(ProfileService.startBasicProcess, request, onError, errorLabel); + } } \ No newline at end of file diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.html b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.html new file mode 100644 index 00000000..4bbf7b6b --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.html @@ -0,0 +1,39 @@ + + + + + +

{{'eit,confirmation' | translate}}

+ +
+
+ {{'eit,no-attachment' | translate}} +
+
+ {{'eit,no-note' | translate}} +
+
+ + + + + {{'eit,submit' | translate}} + {{ts.trPK('general','ok')}} + + + + + {{ts.trPK('general','cancel')}} + + + + +
+ \ No newline at end of file diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.scss b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.scss new file mode 100644 index 00000000..5a81509a --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.scss @@ -0,0 +1,53 @@ +.rowBtn{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.Header{ + color: black !important; + font-size: 25px !important; + font-weight: bold !important;; + margin: 0; + text-align: center; + margin-bottom: 20px; +} + +.labelRadio{ + color: black !important; + font-weight: bold !important; + padding-bottom: 20px; +} + +.labelcheck{ + color: red !important; + font-weight: bold !important; + margin-bottom: 10px; +} + +.submitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background:: #269DB8; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} +.submitCancelButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background:: #269DB8; + width: 100% !important; + color: white!important; + border-radius: 16px !important; +} + + + diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.spec.ts b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.spec.ts new file mode 100644 index 00000000..17bae3a8 --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SubmitAddressModalComponent } from './submit-address-modal.component'; + +describe('SubmitEitModalComponent', () => { + let component: SubmitAddressModalComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SubmitAddressModalComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SubmitAddressModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.ts b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.ts new file mode 100644 index 00000000..21b7f00f --- /dev/null +++ b/Mohem/src/app/profile/submit-eit-modal/submit-address-modal.component.ts @@ -0,0 +1,36 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { ModalController } from '@ionic/angular'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; + +@Component({ + selector: 'app-submit-eit-modal', + templateUrl: './submit-address-modal.component.html', + styleUrls: ['./submit-address-modal.component.scss'], +}) +export class SubmitAddressModalComponent implements OnInit { + submitAttachmentList: any = []; + eitComments: string; + constructor(public ts: TranslatorService, private modalCtrl: ModalController, private cs: CommonService) { + this.submitAttachmentList = this.cs.sharedService.getSharedData('submitAttachmentList', false); + this.eitComments = this.cs.sharedService.getSharedData('eitComments', false); + } + + ngOnInit() { + console.log("modal"); + //this.actionBtns = this.cs.sharedService.getSharedData("passActionMore" , false); + console.log("modal"); + + } + closeModal() { + this.modalCtrl.dismiss(); + } + + + OkBtnModal() { + let data = "ok"; + this.modalCtrl.dismiss(data); + } + +} + 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 b8e5d124..d44e960a 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 @@ -116,8 +116,8 @@ button.item-button.button.button-md.button-clear.button-clear-md { .filterInput-ar{ border: solid var(--gray) 1px; border-radius: 21px; - margin-left: 115px; - margin-right: -132px; + // margin-left: 115px; + // margin-right: -132px; } .filterBtn{ 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 f4fa3715..15900c2a 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 @@ -30,16 +30,15 @@
- - - {{'vacation-rule, itemType' | translate}} - - - {{x.ITEM_TYPE_DISPLAY_NAME}} - - + +
+ + +
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 7edf7d17..c4fc2246 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 @@ -162,3 +162,72 @@ color: black !important; // .cusprogressbar li.active:before { // background-color: #209a83; // } + + +.label-Select{ + color: var(--dark); + font-size: 15px; + border: none; + font-weight: 400; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + width: 80%; + // padding: 1px 0px; + background-color: var(--light); + border-bottom: var(--cusgray) solid 1px; + border-radius: 0px; + // margin-left: 20px; + margin-left: 34px; + margin-top: -10px; + // -webkit-appearance: none; + // -moz-appearance: none; + text-indent: 1px; + // text-overflow: ''; + box-shadow: none; + -webkit-box-shadow:none; + -moz-box-shadow: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + + :root[dir="ltr"]{ + background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%), linear-gradient(to right, #ffffff, #ffffff); + background-position: calc(100% - 14px) calc(1em + 2px), calc(100% - 8px) calc(1em + 2px), 100% 0; + background-size: 6px 6px, 6px 6px, 2.9em 2.9em; + background-repeat: no-repeat; + padding-right: 20px; + } + :root[dir="rtl"]{ + background-image: linear-gradient(-135deg, #999 50%, transparent 50%),linear-gradient(-45deg, transparent 50%, #999 50%), linear-gradient(to right, #ffffff, #ffffff); + background-position: calc(1em - 10px) calc(100% - 8px), calc(1em - 4px) calc(100% - 8px), 0 100%; + background-size: 6px 6px, 6px 6px, 2.9em 2.9em; + background-repeat: no-repeat; + padding-left: 20px; + } +} + +.label{ + font-size: 16px; + // margin-left: 15px; + color: #a2a5a6 !important; + display: block; + overflow: hidden; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + white-space: normal; + // padding-top: 10px; + // padding: 5px 0px; + padding-left: 10px !important; + margin: 10px auto; + :root[dir="ltr"]{ + font-family: var(--fontFamilySemiBoldEN) !important; + } + :root[dir="rtl"]{ + font-family: var(--fontFamilyIOSAR) !important; + font-weight: bold; + } + + +} \ No newline at end of file diff --git a/Mohem/src/assets/font/Poppins-Black.ttf b/Mohem/src/assets/font/Poppins-Black.ttf new file mode 100644 index 00000000..a9520b78 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-Black.ttf differ diff --git a/Mohem/src/assets/font/Poppins-Bold.ttf b/Mohem/src/assets/font/Poppins-Bold.ttf new file mode 100644 index 00000000..b94d47f3 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-Bold.ttf differ diff --git a/Mohem/src/assets/font/Poppins-ExtraBold.ttf b/Mohem/src/assets/font/Poppins-ExtraBold.ttf new file mode 100644 index 00000000..8f008c36 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-ExtraBold.ttf differ diff --git a/Mohem/src/assets/font/Poppins-ExtraLight.ttf b/Mohem/src/assets/font/Poppins-ExtraLight.ttf new file mode 100644 index 00000000..ee623825 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-ExtraLight.ttf differ diff --git a/Mohem/src/assets/font/Poppins-Light.ttf b/Mohem/src/assets/font/Poppins-Light.ttf new file mode 100644 index 00000000..2ab02219 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-Light.ttf differ diff --git a/Mohem/src/assets/font/Poppins-Medium.ttf b/Mohem/src/assets/font/Poppins-Medium.ttf new file mode 100644 index 00000000..e90e87ed Binary files /dev/null and b/Mohem/src/assets/font/Poppins-Medium.ttf differ diff --git a/Mohem/src/assets/font/Poppins-Regular.ttf b/Mohem/src/assets/font/Poppins-Regular.ttf new file mode 100644 index 00000000..be06e7fd Binary files /dev/null and b/Mohem/src/assets/font/Poppins-Regular.ttf differ diff --git a/Mohem/src/assets/font/Poppins-SemiBold.ttf b/Mohem/src/assets/font/Poppins-SemiBold.ttf new file mode 100644 index 00000000..dabf7c24 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-SemiBold.ttf differ diff --git a/Mohem/src/assets/font/Poppins-Thin.ttf b/Mohem/src/assets/font/Poppins-Thin.ttf new file mode 100644 index 00000000..f5c0fdd5 Binary files /dev/null and b/Mohem/src/assets/font/Poppins-Thin.ttf differ diff --git a/Mohem/src/assets/font/Poppins/Poppins-Bold.ttf b/Mohem/src/assets/font/Poppins/Poppins-Bold.ttf new file mode 100644 index 00000000..b94d47f3 Binary files /dev/null and b/Mohem/src/assets/font/Poppins/Poppins-Bold.ttf differ diff --git a/Mohem/src/assets/font/Poppins/Poppins-Medium.ttf b/Mohem/src/assets/font/Poppins/Poppins-Medium.ttf new file mode 100644 index 00000000..e90e87ed Binary files /dev/null and b/Mohem/src/assets/font/Poppins/Poppins-Medium.ttf differ diff --git a/Mohem/src/assets/font/Poppins/Poppins-Regular.ttf b/Mohem/src/assets/font/Poppins/Poppins-Regular.ttf new file mode 100644 index 00000000..be06e7fd Binary files /dev/null and b/Mohem/src/assets/font/Poppins/Poppins-Regular.ttf differ diff --git a/Mohem/src/assets/icon/home/HR req.png b/Mohem/src/assets/icon/home/HR req.png new file mode 100644 index 00000000..77bb9db7 Binary files /dev/null and b/Mohem/src/assets/icon/home/HR req.png differ diff --git a/Mohem/src/assets/icon/home/announcement@2x.png b/Mohem/src/assets/icon/home/announcement@2x.png new file mode 100644 index 00000000..f80dd054 Binary files /dev/null and b/Mohem/src/assets/icon/home/announcement@2x.png differ diff --git a/Mohem/src/assets/icon/home/announcementIntegration.png b/Mohem/src/assets/icon/home/announcementIntegration.png new file mode 100644 index 00000000..f80dd054 Binary files /dev/null and b/Mohem/src/assets/icon/home/announcementIntegration.png differ diff --git a/Mohem/src/assets/icon/home/item_for_sale.png b/Mohem/src/assets/icon/home/item_for_sale.png new file mode 100644 index 00000000..2e9cbbe3 Binary files /dev/null and b/Mohem/src/assets/icon/home/item_for_sale.png differ diff --git a/Mohem/src/assets/icon/home/offers_discount.png b/Mohem/src/assets/icon/home/offers_discount.png new file mode 100644 index 00000000..d081b00c Binary files /dev/null and b/Mohem/src/assets/icon/home/offers_discount.png differ diff --git a/Mohem/src/assets/icon/rate/bad.svg b/Mohem/src/assets/icon/rate/bad.svg new file mode 100644 index 00000000..1a717423 --- /dev/null +++ b/Mohem/src/assets/icon/rate/bad.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/icon/rate/close.svg b/Mohem/src/assets/icon/rate/close.svg new file mode 100644 index 00000000..195fbfe8 --- /dev/null +++ b/Mohem/src/assets/icon/rate/close.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/icon/rate/dislike.svg b/Mohem/src/assets/icon/rate/dislike.svg new file mode 100644 index 00000000..9a70b738 --- /dev/null +++ b/Mohem/src/assets/icon/rate/dislike.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Mohem/src/assets/icon/rate/good.svg b/Mohem/src/assets/icon/rate/good.svg new file mode 100644 index 00000000..690d4d0b --- /dev/null +++ b/Mohem/src/assets/icon/rate/good.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/icon/rate/info.svg b/Mohem/src/assets/icon/rate/info.svg new file mode 100644 index 00000000..039dfff8 --- /dev/null +++ b/Mohem/src/assets/icon/rate/info.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Mohem/src/assets/icon/rate/like.svg b/Mohem/src/assets/icon/rate/like.svg new file mode 100644 index 00000000..4611580d --- /dev/null +++ b/Mohem/src/assets/icon/rate/like.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Mohem/src/assets/icon/rate/normal.svg b/Mohem/src/assets/icon/rate/normal.svg new file mode 100644 index 00000000..1885ab6a --- /dev/null +++ b/Mohem/src/assets/icon/rate/normal.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/icon/rate/poor.svg b/Mohem/src/assets/icon/rate/poor.svg new file mode 100644 index 00000000..95ce430d --- /dev/null +++ b/Mohem/src/assets/icon/rate/poor.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/icon/rate/star-half.svg b/Mohem/src/assets/icon/rate/star-half.svg new file mode 100644 index 00000000..2b0894e5 --- /dev/null +++ b/Mohem/src/assets/icon/rate/star-half.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Mohem/src/assets/icon/rate/star-unfill.svg b/Mohem/src/assets/icon/rate/star-unfill.svg new file mode 100644 index 00000000..0b0fc380 --- /dev/null +++ b/Mohem/src/assets/icon/rate/star-unfill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Mohem/src/assets/icon/rate/star0fill.svg b/Mohem/src/assets/icon/rate/star0fill.svg new file mode 100644 index 00000000..51627d8f --- /dev/null +++ b/Mohem/src/assets/icon/rate/star0fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/icon/rate/xcellent.svg b/Mohem/src/assets/icon/rate/xcellent.svg new file mode 100644 index 00000000..eab98b33 --- /dev/null +++ b/Mohem/src/assets/icon/rate/xcellent.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/add-photo.svg b/Mohem/src/assets/imgs/add-photo.svg new file mode 100644 index 00000000..1184176a --- /dev/null +++ b/Mohem/src/assets/imgs/add-photo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/call-o.svg b/Mohem/src/assets/imgs/call-o.svg new file mode 100644 index 00000000..b5a9434a --- /dev/null +++ b/Mohem/src/assets/imgs/call-o.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/call.svg b/Mohem/src/assets/imgs/call.svg new file mode 100644 index 00000000..e7b1638d --- /dev/null +++ b/Mohem/src/assets/imgs/call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/check-white.svg b/Mohem/src/assets/imgs/check-white.svg new file mode 100644 index 00000000..8abee1cc --- /dev/null +++ b/Mohem/src/assets/imgs/check-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/check.svg b/Mohem/src/assets/imgs/check.svg new file mode 100644 index 00000000..cdc86abe --- /dev/null +++ b/Mohem/src/assets/imgs/check.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/close.svg b/Mohem/src/assets/imgs/close.svg new file mode 100644 index 00000000..631fcfaa --- /dev/null +++ b/Mohem/src/assets/imgs/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/create req.svg b/Mohem/src/assets/imgs/create req.svg new file mode 100644 index 00000000..8cbae617 --- /dev/null +++ b/Mohem/src/assets/imgs/create req.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/create-req.svg b/Mohem/src/assets/imgs/create-req.svg new file mode 100644 index 00000000..8cbae617 --- /dev/null +++ b/Mohem/src/assets/imgs/create-req.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/delegate.svg b/Mohem/src/assets/imgs/delegate.svg new file mode 100644 index 00000000..18d6ba94 --- /dev/null +++ b/Mohem/src/assets/imgs/delegate.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/fav filled.svg b/Mohem/src/assets/imgs/fav filled.svg new file mode 100644 index 00000000..7987c91b --- /dev/null +++ b/Mohem/src/assets/imgs/fav filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/fav.svg b/Mohem/src/assets/imgs/fav.svg new file mode 100644 index 00000000..cbad1863 --- /dev/null +++ b/Mohem/src/assets/imgs/fav.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/favFilled.svg b/Mohem/src/assets/imgs/favFilled.svg new file mode 100644 index 00000000..7987c91b --- /dev/null +++ b/Mohem/src/assets/imgs/favFilled.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/add.svg b/Mohem/src/assets/imgs/itemsforsale/add.svg new file mode 100644 index 00000000..85fea720 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/add.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/alert.svg b/Mohem/src/assets/imgs/itemsforsale/alert.svg new file mode 100644 index 00000000..efd65f37 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/alert.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/animal pers.svg b/Mohem/src/assets/imgs/itemsforsale/animal pers.svg new file mode 100644 index 00000000..ff55246d --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/animal pers.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/arrow.svg b/Mohem/src/assets/imgs/itemsforsale/arrow.svg new file mode 100644 index 00000000..f8ce0eba --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/book and sports.svg b/Mohem/src/assets/imgs/itemsforsale/book and sports.svg new file mode 100644 index 00000000..4d9fc733 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/book and sports.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/call.svg b/Mohem/src/assets/imgs/itemsforsale/call.svg new file mode 100644 index 00000000..0daf5db0 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/call.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/cars.svg b/Mohem/src/assets/imgs/itemsforsale/cars.svg new file mode 100644 index 00000000..b3cc0eeb --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/cars.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/delete.svg b/Mohem/src/assets/imgs/itemsforsale/delete.svg new file mode 100644 index 00000000..55cfa715 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/delete.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/edit.svg b/Mohem/src/assets/imgs/itemsforsale/edit.svg new file mode 100644 index 00000000..da982cc2 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/edit.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/electronic_appliances.svg b/Mohem/src/assets/imgs/itemsforsale/electronic_appliances.svg new file mode 100644 index 00000000..813d504e --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/electronic_appliances.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/fashion.svg b/Mohem/src/assets/imgs/itemsforsale/fashion.svg new file mode 100644 index 00000000..8cf9feb8 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/fashion.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/filter.svg b/Mohem/src/assets/imgs/itemsforsale/filter.svg new file mode 100644 index 00000000..b4c4a6dc --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/filter.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/furniture.svg b/Mohem/src/assets/imgs/itemsforsale/furniture.svg new file mode 100644 index 00000000..d732f427 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/furniture.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/kid toys.svg b/Mohem/src/assets/imgs/itemsforsale/kid toys.svg new file mode 100644 index 00000000..b9893fdd --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/kid toys.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/mobile.svg b/Mohem/src/assets/imgs/itemsforsale/mobile.svg new file mode 100644 index 00000000..33fbbee5 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/mobile.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/other.svg b/Mohem/src/assets/imgs/itemsforsale/other.svg new file mode 100644 index 00000000..cafb9fe5 --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/other.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/itemsforsale/sms.svg b/Mohem/src/assets/imgs/itemsforsale/sms.svg new file mode 100644 index 00000000..3a18040d --- /dev/null +++ b/Mohem/src/assets/imgs/itemsforsale/sms.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/light-bulb.svg b/Mohem/src/assets/imgs/light-bulb.svg new file mode 100644 index 00000000..a5fba678 --- /dev/null +++ b/Mohem/src/assets/imgs/light-bulb.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png new file mode 100644 index 00000000..27417cb3 Binary files /dev/null and b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png differ diff --git a/Mohem/src/assets/imgs/mohemm-action/delegate.png b/Mohem/src/assets/imgs/mohemm-action/delegate.png new file mode 100644 index 00000000..2539bfd4 Binary files /dev/null and b/Mohem/src/assets/imgs/mohemm-action/delegate.png differ diff --git a/Mohem/src/assets/imgs/offers n discounts/banks.svg b/Mohem/src/assets/imgs/offers n discounts/banks.svg new file mode 100644 index 00000000..be89596c --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/banks.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/car care.svg b/Mohem/src/assets/imgs/offers n discounts/car care.svg new file mode 100644 index 00000000..b3cc0eeb --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/car care.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/cloths.svg b/Mohem/src/assets/imgs/offers n discounts/cloths.svg new file mode 100644 index 00000000..8cf9feb8 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/cloths.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/electronic.svg b/Mohem/src/assets/imgs/offers n discounts/electronic.svg new file mode 100644 index 00000000..813d504e --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/electronic.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/fitness.svg b/Mohem/src/assets/imgs/offers n discounts/fitness.svg new file mode 100644 index 00000000..4d9fc733 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/fitness.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/location.svg b/Mohem/src/assets/imgs/offers n discounts/location.svg new file mode 100644 index 00000000..0d208c81 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/location.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/property.svg b/Mohem/src/assets/imgs/offers n discounts/property.svg new file mode 100644 index 00000000..ef9cd1e5 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/property.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/shipping.svg b/Mohem/src/assets/imgs/offers n discounts/shipping.svg new file mode 100644 index 00000000..86769728 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/shipping.svg @@ -0,0 +1,3 @@ + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/shopping.svg b/Mohem/src/assets/imgs/offers n discounts/shopping.svg new file mode 100644 index 00000000..c177048a --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/shopping.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/offers n discounts/tourism.svg b/Mohem/src/assets/imgs/offers n discounts/tourism.svg new file mode 100644 index 00000000..b8c6f7e0 --- /dev/null +++ b/Mohem/src/assets/imgs/offers n discounts/tourism.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Mohem/src/assets/imgs/profile-icons/basic-detail@21.png b/Mohem/src/assets/imgs/profile-icons/basic-detail@21.png new file mode 100644 index 00000000..b569617a Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/basic-detail@21.png differ diff --git a/Mohem/src/assets/imgs/profile-icons/basic-detail@2x.png b/Mohem/src/assets/imgs/profile-icons/basic-detail@2x.png new file mode 100644 index 00000000..413b18ab Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/basic-detail@2x.png differ diff --git a/Mohem/src/assets/imgs/profile-icons/editing@2x.png b/Mohem/src/assets/imgs/profile-icons/editing@2x.png new file mode 100644 index 00000000..16950e66 Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/editing@2x.png differ diff --git a/Mohem/src/assets/imgs/profile-icons/info-a@2x.png b/Mohem/src/assets/imgs/profile-icons/info-a@2x.png new file mode 100644 index 00000000..79c470d6 Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/info-a@2x.png differ diff --git a/Mohem/src/assets/imgs/profile-icons/info@2x.png b/Mohem/src/assets/imgs/profile-icons/info@2x.png new file mode 100644 index 00000000..30d0bede Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/info@2x.png differ diff --git a/Mohem/src/assets/imgs/profile-icons/main address-a@2x.png b/Mohem/src/assets/imgs/profile-icons/main address-a@2x.png new file mode 100644 index 00000000..df4dce43 Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/main address-a@2x.png differ diff --git a/Mohem/src/assets/imgs/profile-icons/main-address@2x.png b/Mohem/src/assets/imgs/profile-icons/main-address@2x.png new file mode 100644 index 00000000..03c87f8a Binary files /dev/null and b/Mohem/src/assets/imgs/profile-icons/main-address@2x.png differ diff --git a/Mohem/src/assets/imgs/profile.svg b/Mohem/src/assets/imgs/profile.svg new file mode 100644 index 00000000..735b72f7 --- /dev/null +++ b/Mohem/src/assets/imgs/profile.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/req info.svg b/Mohem/src/assets/imgs/req info.svg new file mode 100644 index 00000000..5bf4b298 --- /dev/null +++ b/Mohem/src/assets/imgs/req info.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Mohem/src/assets/imgs/team-members.svg b/Mohem/src/assets/imgs/team-members.svg new file mode 100644 index 00000000..fbfbaa33 --- /dev/null +++ b/Mohem/src/assets/imgs/team-members.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Mohem/src/assets/imgs/view days.svg b/Mohem/src/assets/imgs/view days.svg new file mode 100644 index 00000000..cdeb2c3f --- /dev/null +++ b/Mohem/src/assets/imgs/view days.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Mohem/src/assets/imgs/view stats.svg b/Mohem/src/assets/imgs/view stats.svg new file mode 100644 index 00000000..ab5ab989 --- /dev/null +++ b/Mohem/src/assets/imgs/view stats.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/imgs/view-attendance.svg b/Mohem/src/assets/imgs/view-attendance.svg new file mode 100644 index 00000000..f0d0087f --- /dev/null +++ b/Mohem/src/assets/imgs/view-attendance.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Mohem/src/assets/imgs/view-days.svg b/Mohem/src/assets/imgs/view-days.svg new file mode 100644 index 00000000..cdeb2c3f --- /dev/null +++ b/Mohem/src/assets/imgs/view-days.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Mohem/src/assets/imgs/view-stats.svg b/Mohem/src/assets/imgs/view-stats.svg new file mode 100644 index 00000000..ab5ab989 --- /dev/null +++ b/Mohem/src/assets/imgs/view-stats.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 4ec28a25..01c556c6 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -38,8 +38,8 @@ "ar": "هل أنت متأكد من إغلاق الحساب" }, "forgot-id": { - "en": "Forgot Patient ID", - "ar": "نسيت رقم الملف" + "en": "Forgot Employee ID", + "ar": "نسيت رقم الموظف" }, "forgot-password": { "en": "Forgot Password", @@ -62,12 +62,12 @@ "ar": "كشف بالراتب" }, "forgot-your-id": { - "en": "Forgot Your Patient ID", - "ar": "هل نسيت رقم ملف المريض" + "en": "Forgot Your Employee ID", + "ar": "هل نسيت رقمك الوظيفي" }, "forgot-desc": { - "en": "Enter your mobile number to receive your patient file number via SMS", - "ar": "أدخل رقم جوالك لاستلام رقم الملف الخاص بك عن طريق الرسائل النصية" + "en": "Enter your mobile number to receive your ID number via SMS", + "ar": "أدخل رقم جوالك لاستلام الرقم الوظيفي الخاص بك عن طريق الرسائل النصية" }, "enter-email": { "en": "Please you need to enter your email", @@ -98,8 +98,8 @@ "ar": "دخول / تسجيل" }, "id-or-file": { - "en": "ID or File No", - "ar": "هوية أو رقم الملف" + "en": "Employee ID ", + "ar": "الرقم الوظيفي" }, "national-id-or-iqama": { "en": "National ID or Iqama", @@ -122,12 +122,12 @@ "ar": "الرجاء التحقق من تسجيل الدخول باستخدام أحد هذه الخيارات" }, "verify-with-fingerprint": { - "en": "Verify with fingerprint", - "ar": "تحقق باستخدام بصمة" + "en": "Verify with fingerprint", + "ar": "تحقق باستخدام بصمة الإصبع" }, "verify-with-faceid": { - "en": "Verify with face ID", - "ar": "تحقق باستخدام معرف الوجه" + "en": "Verify with face ID", + "ar": "تحقق باستخدام بصمة الوجه" }, "verify-with-sms": { "en": "Verify with SMS", @@ -142,12 +142,12 @@ "ar": ":آخر تسجيل دخول" }, "last-login-with": { - "en": "Last login using:", - "ar": "آخر تسجيل دخول مع" + "en": "Last login using:", + "ar": "آخر تسجيل دخول بإستخدام" }, "biometric-support": { - "en": "It seems that your phone is supporting biometric feature, do you want login with with biometric?", - "ar": "يبدو أن هاتفك يدعم ميزة البيومترية ، هل تريد تسجيل الدخول باستخدام البيومترية؟" + "en": "It seems that your phone is supporting biometric feature, do you want login with biometric?", + "ar": "يبدو أن هاتفك يدعم ميزة البصمة ، هل تريد تسجيل الدخول باستخدام البصمة؟" }, "verify-fingerprint": { "en": "To activate fingerprint login service, please verify by using one of the following options. ", @@ -161,9 +161,9 @@ "en": "Verify its you", "ar": "Verify its you" }, - "check-user-place-holder":{ - "en":"Employee ID", - "ar":"رقم الموظف " + "check-user-place-holder": { + "en": "Employee ID", + "ar": "رقم الموظف " }, "check-user-text1": { "en": "Please Enter your Employee ID, A ", @@ -213,9 +213,41 @@ "en": "Allow the Mohemm app to access your location for marking your attendance", "ar": "اسمح لتطبيق مهم بالوصول إلى موقعك لتحديد حضورك" }, - "not-now":{ - "en":"not now", - "ar":"لاحقاً" + "other-services": { + "en": "Other Services", + "ar": "خدمات أخرى" + }, + "items-sales": { + "en": "Items For Sale", + "ar": "بضاعه للبع" + }, + "offers-discount": { + "en": "Offers & Discount", + "ar": "العروض والخصومات" + }, + "filter-offers": { + "en": "Filter Offers & Discounts", + "ar": "تصفية العروض والخصومات" + }, + "apply-filters": { + "en": "Apply Filters", + "ar": "تطبيق المرشحات" + }, + "discount": { + "en": "Discount", + "ar": "خصم" + }, + "offer-valid": { + "en": "Offer Valid", + "ar": "العرض صالح" + }, + "expired": { + "en": "Offer Expired", + "ar": "انتهى العرض" + }, + "not-now": { + "en": "not now", + "ar": "لاحقاً" }, "birth_date": { "en": "Birth Date", @@ -234,10 +266,9 @@ "ar": " انتهت مهلة الاتصال بسبب خطأ في الشبكة أو الخوادم قد تكون مشغولة!" }, "error-itg": { - "en": "Dear, this service is not available now, please try again later", + "en": "Dear, this service is not available now, please try again later", "ar": " هذه الخدمة غير متاحة الآن ، يرجى المحاولة مرة أخرى في وقت لاحق" }, - "details": { "en": "Details", "ar": "التفاصيل" @@ -350,8 +381,12 @@ "en": "Nationality", "ar": "الجنسية" }, + "religion": { + "en": "Religion", + "ar": "الديانة" + }, "empty": { - "en": "Sorry no data avaiable", + "en": "Sorry no data available", "ar": "لا يوجد بيانات" }, "no-match": { @@ -416,7 +451,7 @@ }, "other": { "en": "Other", - "ar": "أخري" + "ar": "أخرى" }, "provide-missing": { "en": "Please provide required information", @@ -458,7 +493,6 @@ "en": "Optional", "ar": "خياري" }, - "advanced-search": { "en": "Advanced Search", "ar": "بحث متقدم" @@ -656,8 +690,8 @@ "ar": "إستخدم الرقم التعريفي" }, "auth-please": { - "en": "Please Authenticated", - "ar": "عرف نفسك" + "en": "Please Authenticated", + "ar": "عرف نفسك" }, "dial-code": { "en": "Dial Code", @@ -717,7 +751,7 @@ }, "send-email-short": { "en": "Email", - "ar": "بريد" + "ar": "بريد إلكتروني" }, "hi": { "en": "HI", @@ -732,8 +766,8 @@ "ar": "تمت مزامنة البيانات بنجاح" }, "already-synced": { - "en": "Latest data already synced", - "ar": "أحدث البيانات المتزامنة بالفعل" + "en": "Latest data has already been synced", + "ar": "تمت مزامنة أحدث البيانات مسبقاً" }, "weekly": { "en": "Weekly", @@ -764,8 +798,8 @@ "ar": "الخطوات المغطاة" }, "hours-asleep": { - "en": "Time asleep in hours", - "ar": "الوقت نائم في ساعات" + "en": "Time asleep in hours", + "ar": "وقت النوم بالساعات" }, "bad": { "en": "Bad", @@ -876,8 +910,8 @@ "ar": "هل أنت متأكد من حذف هذا الملف نهائيًا؟" }, "option-attendance": { - "en":"Attendance Options", - "ar":"خيارات تسجيل الحضور" + "en": "Attendance Options", + "ar": "خيارات تسجيل الحضور" }, "select-attendance": { "en": "Select Method to Mark your Attendance", @@ -900,8 +934,8 @@ "ar": "فشل التحقق ، يرجى زيارة أقرب مكتب استقبال في الفرع" }, "forget-wifi-connection-text": { - "en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the Wi-Fi from settings.", - "ar": "فشل الاتصال بشبكة 'HMG-MOHEMM' الرجاء اختيار نسيت الاتصال من اعدادت الشبكة" + "en": "Invalid Wi-Fi configuration exists with 'HMG-MOHEMM', please forget the network from settings.", + "ar": "الرجاء اختيار نسيان الشبكه من اعدادت الشبكة 'HMG-MOHEMM'فشل الاتصال بشبكة " }, "qr-text": { "en": "QR Code", @@ -933,19 +967,63 @@ }, "wifi-connect-message": { "en": "Connecting", - "ar": "توصيل" + "ar": "جاري الإتصال" }, "success-attendance": { "en": "Your attendance is marked successfully.", "ar": "تم تسجيل حضورك بنجاح" }, - "digital-id":{ - "en":"Employee Digital ID", - "ar":"هوية الموظف الرقمية" + "digital-id": { + "en": "Employee Digital ID", + "ar": "هوية الموظف الرقمية" + }, + "appreciate-service": { + "en": "We appreciate you for completing the service of", + "ar": "نحن نقدر لك استكمال خدمة" + }, + "basic-details": { + "en": "Basic Details", + "ar": "المعلومات الاساسية" + }, + "full-name": { + "en": "Full Name", + "ar": "الاسم كامل" }, - "appreciate-service":{ - "en":"We appreciate you for completing the service of", - "ar":"نحن نقدر لك استكمال خدمة" + "marital-status": { + "en": "Marital Status", + "ar": "الاحالة الاجتماعية" + }, + "civil-identity-number": { + "en": "Civil identity number", + "ar": "رقم الهوية المدنية" + }, + "effective-date": { + "en": "Effective Date", + "ar": "تاريخ الفعالية " + }, + "gender": { + "en": "Gender", + "ar": "النوع" + }, + "education-level": { + "en": "Education Level", + "ar": "المستوى التعليمي" + }, + "main-address": { + "en": "Main Address", + "ar": "العنوان الرئيسي" + }, + "correct-or-complete": { + "en": "correct or complete the current details", + "ar": "تعديل او اكمال التفاصيل الحالية" + }, + "new-info": { + "en": "enter new Information because of a real change to the current details (e.g because of a change in marital status)", + "ar": "أدخل معلومات جديدة بسبب تغيير حقيقي في التفاصيل الحالية (على سبيل المثال بسبب تغيير في الحالة الاجتماعية)" + }, + "type-of-change": { + "en": " Select the type of change you want to make.", + "ar": " حدد نوع التغيير الذي تريد القيام به." } }, "home": { @@ -977,9 +1055,9 @@ "en": "Penading Request", "ar": "طلبات قيد الانتظار" }, - "missing-swipes":{ - "en":"Missing Swipes", - "ar":"فقدان البصمة" + "missing-swipes": { + "en": "Missing Swipes", + "ar": "تسجيل بصمة حضور سابقة " }, "leave-balance": { "en": "Leave Balance", @@ -1044,8 +1122,8 @@ }, "work-list": { "open-analysis": { - "en": "Open Request Analysis", - "ar": "فتح تحليل الطلب" + "en": "Open Request Analysis", + "ar": "تحليل الطلبات المفتوحة" }, "total": { "en": "Total", @@ -1068,8 +1146,8 @@ "ar": "بحث متقدم" }, "No-data-available": { - "en": "No History Available", - "ar": "لا يوجد محفوظات متاحة" + "en": "No History Available", + "ar": "لايوجد سجل بيانات سابقة " } }, "userProfile": { @@ -1077,10 +1155,86 @@ "en": "My Profile", "ar": "معلوماتي" }, + "profile-details": { + "en": "Profile Details", + "ar": "تفاصيل الملف الشخصي" + }, + "showMore": { + "en": "Show More", + "ar": "عرض المزيد" + }, "edit-profile": { "en": "Edit Profile", "ar": "تعديل المعلومات" }, + "ServiceType": { + "en": "Service Type", + "ar": "نوع الخدمة" + }, + "DeptName": { + "en": "Department Name", + "ar": "اسم القسم" + }, + "refrence": { + "en": "Tiket Reference", + "ar": "مرجع التذكره" + }, + "section": { + "en": "Section", + "ar": " القسم" + }, + "topic": { + "en": "Topic", + "ar": "العنوان" + }, + "actionBy": { + "en": "Action By :", + "ar": "الرد بواسطة :" + }, + "postedDate": { + "en": "Posted on", + "ar": "نشر في" + }, + "RelatedSection": { + "en": "Related Section", + "ar": "قسم ذو صله" + }, + "RelatedTopic": { + "en": "Related Topic", + "ar": "عنوان ذو صله" + }, + "selectSec": { + "en": "Select Section", + "ar": "اختر القسم" + }, + "selectTopic": { + "en": "Select Topic", + "ar": "اختر الموضوع" + }, + "selectDep": { + "en": "Select Department", + "ar": "اختر القسم" + }, + "SupportingDocument": { + "en": "Supporting Document", + "ar": "ارفاق ملف" + }, + "Description": { + "en": "Description", + "ar": "الوصف" + }, + "MyHR-request": { + "en": "MY HR REQUEST", + "ar": "طلباتي" + }, + "createHR-Request": { + "en": "CREATE HR REQUEST", + "ar": "انشاء طلب" + }, + "HR-Request": { + "en": "HR Request", + "ar": "HR طلبات" + }, "performance-evaluation": { "en": "Performance Evaluation", "ar": "تقييم الاداء" @@ -1125,13 +1279,17 @@ "en": "Employee Detail", "ar": "بيانات الموظف" }, + "role": { + "en": "Role", + "ar": "الدور الوظيفي" + }, "address": { "en": "Address", "ar": "العنوان" }, "payrol": { "en": "Payroll", - "ar": "المشروع" + "ar": "سجل الرواتب" }, "orgEmail": { "en": "Organization Email Address", @@ -1176,6 +1334,62 @@ "successChange": { "en": "Profile Photo changed successfully ", "ar": "تم تغيير الصورة الشخصية بنجاح" + }, + "personal-informaion": { + "en": "Personal Informaion", + "ar": "المعلومات الشخصية" + }, + "family-name": { + "en": "Family Name", + "ar": "اسم العائلة" + }, + "preferred-name": { + "en": "Preferred Name", + "ar": "الاسم المفضل" + }, + "previous-family-name": { + "en": "Previous Family Name", + "ar": "اسم العائلة السابق" + }, + "father-name": { + "en": "Father Name<", + "ar": "اسم الاب" + }, + "grand-father-name": { + "en": "GrandFather Name", + "ar": "اسم الجد" + }, + "arabic-first-name": { + "en": "Arabic First Name", + "ar": "الاسم الاول بالعربي" + }, + "arabic-father-name": { + "en": "Arabic Father Name", + "ar": "اسم الاب بالعربي" + }, + "arabic-grand-father-name": { + "en": "Arabic GrandFather Name", + "ar": "اسم الجد بالعربي" + }, + "street": { + "en": "Street", + "ar": "شارع" + }, + "area": { + "en": "Area", + "ar": "المنطقة" + }, + "p-o-box": { + "en": "P.O Box", + "ar": "صندوق البريد" + }, + "city": { + "en": "City", + "ar": "المدينة" + }, + "postal-code": { + "en": "Postal Code", + "ar": "الرمز البريدي" } }, "changePassword": { @@ -1227,7 +1441,7 @@ }, "monthly-attendance-calendar": { "ar": "سجل الحضور الشهري", - "en": "Monthly Attendance Calendar" + "en": "Monthly Attendance" }, "completed": { "ar": "منجز", @@ -1245,7 +1459,7 @@ "vacation-rule": { "vacationRule": { "en": "Vacation Rule", - "ar": "الإنابة بالإجازات" + "ar": "الإنابة بالإجازات" }, "apply-for-vacation-rule": { "en": "Apply for vacation Rule", @@ -1324,8 +1538,8 @@ "ar": "التالى" }, "notification-type": { - "en": "Notification Type", - "ar": "نوع إعلام" + "en": "Notification Type", + "ar": "نوع الإشعار" }, "notification-tip": { "en": "Indicate the notification format that will activate this rule", @@ -1421,7 +1635,7 @@ }, "confirmation": { "en": "Confirmation", - "ar": "البريد الإلكتروني" + "ar": "تأكيد" }, "rule-success": { "en": "Rule created successfully", @@ -1437,11 +1651,11 @@ }, "confirm-msg-success": { "en": "Are you sure, you want to Apply for Vacation Rule?", - "ar": " تريد التقديم على قواعد الاجازات ؟, هل انت متأكد" + "ar": " هل أنت متأكد من رغبتك في التقديم على قواعد الإجازات ؟" }, "update-msg-success": { "en": "Are you sure, you want to Update this Vacation Rule?", - "ar": "تريد تحديث قواعد الاجازات ؟, هل انت متأكد" + "ar": "هل أنت متأكد من رغبتك في تحديث قاعدة الإجازات هذه ؟" } }, "absenceList": { @@ -1449,6 +1663,14 @@ "en": "Absence list", "ar": "قائمة الإجازات" }, + "AccrualUsed": { + "en": "Accrual Used", + "ar": "الأستحقاق المستخدم" + }, + "PreviousYears": { + "en": "Previous Years", + "ar": "السنوات السابقه" + }, "accrualBalances": { "en": "Accrual Balances", "ar": "رصيد حساب المستحقات" @@ -1577,6 +1799,10 @@ "en": "Late", "ar": "التأخير" }, + "search-by": { + "en": "Search By", + "ar": "البحث بواسطة" + }, "attendance-statistics": { "en": "Attendance Statistics", "ar": "احصائيات الحضور" @@ -1590,7 +1816,19 @@ "ar": "عدد" }, "team-members": { - "en": "TEAM MEMBERS", + "en": "Team Members", + "ar": " اعضاء الفريق" + }, + "view-attendence": { + "en": "View Attendance", + "ar": " عرض الحضور" + }, + "profile-details": { + "en": "Profile Details", + "ar": " الملف الشخصي" + }, + "my-team-members": { + "en": "My Team Members", "ar": " اعضاء الفريق" }, "team-stats": { @@ -1919,6 +2157,10 @@ "en": "Enter a note", "ar": "أدخل ملاحظة" }, + "favorite-saved": { + "en": "Your Favorite saved successfully", + "ar": "تم حفظ مفضلتك بنجاح" + }, "msg": { "en": "Select a replacement", "ar": "اختر بديل" @@ -1946,7 +2188,48 @@ "msgRFC": { "en": "Select a person", "ar": "اختيار شخص" + }, + "searchbyusername": { + "en": "Search by username", + "ar": "البحث باسم المستخدم" + }, + "searchbyname": { + "en": " Search ", + "ar": "بحث " + }, + "searchbyemail": { + "en": "Search by email", + "ar": "البحث عن طريق البريد الإلكتروني" + }, + "search-result": { + "en": "Search Results", + "ar": "نتائج البحث" + }, + "related": { + "en": "Related", + "ar": "متعلق ب" + }, + "favorite": { + "en": "Favorite", + "ar": "مفضل" + }, + "workflow":{ + "en":"WorkFlow", + "ar":"سير العمل" + }, + "employee-id":{ + "en":"Employee ID", + "ar":"هوية الموظف" + }, + "employee-email":{ + "en":"Employee Email", + "ar":"البريد الإلكتروني للموظف" + }, + "employee-name":{ + "en":"Employee Name", + "ar":"اسم الموظف" } + }, "worklist": { "view": { @@ -2036,6 +2319,122 @@ "empty-comment": { "en": "you shoud add comment", "ar": "يجب عليك اضافة تعليق" + }, + "product-name": { + "en": "Product Name", + "ar": "اسم المنتج" + }, + "product-description": { + "en": "Product Description", + "ar": "وصف للمنتج" + }, + "Unit-price": { + "en": "Unit Price", + "ar": "سعر الوحدة" + }, + "manufacturer-name": { + "en": "Manufacturer Name", + "ar": "اسم المصنع" + }, + "manufacturer-part-number": { + "en": "Manufacturer Part Number", + "ar": "رقم قطعة المصنع" + }, + "supplier-name": { + "en": "Supplier Name", + "ar": "اسم المورد" + }, + "supplier-contact": { + "en": "Supplier Contact", + "ar": "عقد المورد" + }, + "charge-to-patient": { + "en": "Charge to Patient", + "ar": "رسوم على المرضى" + }, + "justification": { + "en": "Justification", + "ar": "تبرير" + }, + "item-code": { + "en": "Item Code", + "ar": "رمز الصنف" + }, + "item-description": { + "en": "Item Description", + "ar": "وصف الصنف" + }, + "group-code": { + "en": "Group Code", + "ar": "رمز المجموعة" + }, + "group-description": { + "en": "Group Description", + "ar": "وصف المجموعة" + }, + "subgroup-code": { + "en": "Subgroup Code", + "ar": "رمز المجموعة الفرعية" + }, + "subgroup-description": { + "en": "Subgroup Description", + "ar": "وصف المجموعة الفرعية" + }, + "primary-uom": { + "en": "Primary UOM", + "ar": "Primary UOM" + }, + "template-name": { + "en": "Template Name", + "ar": "اسم القالب" + }, + "item-creation-status": { + "en": "Item Creation Status", + "ar": "حالة انشاء العنصر" + }, + "standardization-approval-status": { + "en": "Standardization Approval Status", + "ar": "حالةالموافقة على المعايرة" + }, + "standardization-approval-rejection-reason": { + "en": "Standardization Approval Rejection Reason", + "ar": "سبب رفض الموافقة على المعايرة" + }, + "category": { + "en": "Category", + "ar": "فئة" + }, + "requester": { + "en": "Requester", + "ar": "مقدم الطلب" + }, + "analyzed-by": { + "en": "Analyzed By", + "ar": "تحليل بواسطة" + }, + "approved-date": { + "en": "Approved Date", + "ar": "تاريخ الموافقة" + }, + "item-type": { + "en": "Item Type", + "ar": "نوع الصنف" + }, + "related-to": { + "en": "Related To", + "ar": "" + }, + "request-date": { + "en": "Request Date", + "ar": "متعلق بـ" + }, + "analyzed-date": { + "en": "Analyzed Date", + "ar": "تاريخ التحليل" + }, + "urgent": { + "en": "Urgent", + "ar": "عاجل" } }, "worklistMain": { @@ -2059,6 +2458,10 @@ "en": "Request info", "ar": "طلب معلومات" }, + "delegate": { + "en": "Delegate", + "ar": "مندوب" + }, "title": { "en": "Details", "ar": "التفاصيل" @@ -2080,8 +2483,8 @@ "ar": "معلومات الموظف" }, "employee-on-leave": { - "en": "Employee will also on leave", - "ar": "الموظف سوف يكون في اجازة ايضا" + "en": "Employee will also be on leave", + "ar": "موظفون سيكونون ايضا في اجازة" }, "info": { "en": "Info", @@ -2160,23 +2563,23 @@ "ar": "رمز" }, "itemReq": { - "en": "Items Requsted", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "approveMsg": { - "en": "

Are you sure to Approve this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "rejectMsg": { - "en": "

Are you sure to Reject this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "delMsg": { - "en": "

Are you sure to Delete this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "closeMsg": { - "en": "

Are you sure to Close this request ?

", + "en": "Requsted Items", "ar": "العناصر المطلوبة" }, "Supplier": { @@ -2451,25 +2854,25 @@ "en": "AMU (Last 3 months)", "ar": "AMU (Last 3 months)" }, - "Tran_Succ":{ + "Tran_Succ": { "en": "Transaction Successful", - "ar":"عملية ناجحة" + "ar": "عملية ناجحة" }, - "req_detail":{ + "req_detail": { "en": "ٌRequest Details", - "ar":"تفاصيل الطلب" + "ar": "تفاصيل الطلب" }, - "job_cate":{ + "job_cate": { "en": "Job category", - "ar":"الفئة الوظيفية" + "ar": "الفئة الوظيفية" }, - "category":{ + "category": { "en": "Category", - "ar":"نوع العقد" + "ar": "نوع العقد" }, - "job-name":{ + "job-name": { "en": "Job Title", - "ar":"المسمى الوظيفي" + "ar": "المسمى الوظيفي" }, "emp-email": { "en": "Employee Email Address", @@ -2494,7 +2897,7 @@ "details-emp": { "en": "Details", "ar": "تفاصيل الموظف" - } + } }, "payslip": { "title": { @@ -2567,7 +2970,7 @@ }, "earnings": { "en": "Earnings", - "ar":"مستحقات " + "ar": "مستحقات " }, "deductions": { "en": "Deductions", @@ -2602,6 +3005,52 @@ "ar": "المجموع " } }, + "itemforsale": { + "title": { + "en": "Item for sale", + "ar": "سلعه للبيع" + }, + "related-offers": { + "en": "Related offers", + "ar": "العروض ذات الصلة" + }, + "my-posted-ad": { + "en": "My Posted Ads", + "ar": "إعلاناتي المنشورة" + }, + "browse-categories": { + "en": "Browse Categories", + "ar": "تصفح الفئات" + }, + "create-new-ad": { + "en": "Create new ad", + "ar": "إنشاء إعلان جديد" + }, + "select-category": { + "en": "Select Category", + "ar": "اختر الفئة" + }, + "completed": { + "en": "Completed", + "ar": "مكتمل" + }, + "add-details": { + "en": "Add Details", + "ar": "أضف التفاصيل" + }, + "review-sell": { + "en": "Review & Sell", + "ar": "مراجعة وبيع" + }, + "search-items": { + "en": "Search Items", + "ar": "عناصر البحث" + }, + "offersdiscount": { + "en": "Offers & Discount", + "ar": "العروض والخصومات" + } + }, "attendance-tracking": { "title": { "en": "Mark Attendance", @@ -2615,23 +3064,23 @@ "en": "Check Out", "ar": "وقت الخروج" }, - "actual-check-in":{ + "actual-check-in": { "en": "Actual Check In", - "ar":"وقت الدخول" + "ar": "وقت الدخول" }, - "actual-check-out":{ + "actual-check-out": { "en": "Actual Check Out", - "ar":"وقت الخروج" + "ar": "وقت الخروج" }, - "approved-check-in":{ + "approved-check-in": { "en": "Approved Check In", - "ar":"اعتماد وقت الدخول" + "ar": "اعتماد وقت الدخول" }, - "approved-check-out":{ + "approved-check-out": { "en": "Approved Check Out", - "ar":"اعتماد وقت الخروج" + "ar": "اعتماد وقت الخروج" }, - "regular":{ + "regular": { "en": "Regular", "ar": "المنتظم" }, @@ -2660,7 +3109,7 @@ "ar": "ساعات التقصير" }, "schedule": { - "en": "Schedule", + "en": "Scheduled Days", "ar": "ايام العمل" }, "off-days": { @@ -2671,6 +3120,14 @@ "en": "Non Analyzed", "ar": "لايوجد تحليل" }, + "view-days": { + "en": "View Days", + "ar": "عرض الأيام" + }, + "view-stats": { + "en": "View Stats", + "ar": "عرض الأحصائيات" + }, "attendance-statistics": { "en": "Attendance Statistics", "ar": "احصائيات الحضور" @@ -2689,14 +3146,13 @@ }, "shift-time": { "en": "Shift Time", - "ar": "وقت التناوب" + "ar": "وقت المناوبة " }, - "shift-type":{ - "en":"Shift Type", - "ar":"نوع المناوبة" + "shift-type": { + "en": "Shift Type", + "ar": "نوع المناوبة" } }, - "sms": { "title": { "en": "SMS", @@ -2714,5 +3170,23 @@ "en": "Whatsapp", "ar": "واتس اب" } + }, + "erm-channel": { + "fedback-about-ux": { + "en": "This is to get feedback about the user experience", + "ar": "هذا للحصول على تعليقات حول تجربة المستخدم" + }, + "how-would-you-like": { + "en": "How would you like to rate", + "ar": "كيف تريد أن تقيم" + }, + "how-would-you-satisfied": { + "en": "How do you satisfied with this application", + "ar": "ما مدى رضائك عن هذا التطبيق" + }, + "give-comments": { + "en": "Please give us a comments", + "ar": "من فضلك اعطنا تعليقات" + } } } \ No newline at end of file diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index ff3befe8..ee38eac2 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1313,6 +1313,14 @@ border:0px --width: 100% !important; --border-radius: 0.4cm; +} +.replaceRoll-modal2 { + + padding: 5% 1% !important; + --height: 100% !important; + --width: 100% !important; + --border-radius: 0.4cm; + } .header-md:after { height: 0px !important; @@ -1552,4 +1560,57 @@ table.monthview-datetable th small { top: 3%; position: absolute; display: block; - } \ No newline at end of file + } + .fav-employee-details{ + font-size: 20px; + position: absolute; + bottom: 85px; + font-weight: bold; + color: black !important; + padding: 5px; + } + .fav-profileImageDiv{ + width: 100%; + text-align: start; +} +ion-segment-button { + --indicator-color: transparent !important; + --indicator-color-checked: transparent !important; + } + #surveyRatingNew ion-button{ + background: #fff !important; + } + #surveyRatingNew ion-buttons{ + border-radius: 12px; + background: #fff; + width: 75%; + margin: auto; + } + .filter-modal .modal-wrapper{ + border-radius: 0px !important; + } + .offers-discount-card ion-card-content div{ + font-size: 11px !important; + } + + .searchbar-input-container.sc-ion-searchbar-ios{ + height: 48px; + background: #FFFFFF 0% 0% no-repeat padding-box; + border: 10px solid white; + border-radius: 50px; + width: 345px; + left: 3px; + } + + .searchbar-input.sc-ion-searchbar-md { + border-radius: 25px; + } + + .top svg { + height: 30px !important; + } + + +.top-filter svg { + margin-top: 15px !important; +} diff --git a/Mohem/src/theme/variables.scss b/Mohem/src/theme/variables.scss index 963c1e72..9bca9b5c 100644 --- a/Mohem/src/theme/variables.scss +++ b/Mohem/src/theme/variables.scss @@ -34,21 +34,41 @@ font-family: WorkSans-Bold; src: url('../assets/font/WorkSans-Bold.otf'); } +@font-face { + font-family: Poppins-SemiBold; + src: url('../assets/font/Poppins-SemiBold.ttf'); +} +@font-face { + font-family: Poppins-Medium; + src: url('../assets/font/Poppins-Medium.ttf'); +} +@font-face { + font-family: Poppins-Bold; + src: url('../assets/font/Poppins/Poppins-Bold.ttf'); +} +@font-face { + font-family: Poppins-Medium; + src: url('../assets/font/Poppins/Poppins-Medium.ttf'); +} +@font-face { + font-family: Poppins; + src: url('../assets/font/Poppins/Poppins-Regular.ttf'); +} :root { ---ion-font-family: 'WorkSans-Light'; +--ion-font-family: 'Poppins'; --break-small: 450px; --break-big:565px; //$break-large: 1200px; ---fontFamilyLightEN:'WorkSans-Light'; +--fontFamilyLightEN:'Poppins'; --ontFamilyLightAR:'GE_SS_Two_Light'; ---fontFamilyRegularEN:'WorkSans-Regular'; +--fontFamilyRegularEN:'Poppins'; --fontFamilyRegularAR:'GE_SS_TWO_MEDIUM'; ---fontFamilyMediumEN:'WorkSans-Regular'; +--fontFamilyMediumEN:'Poppins-Regular'; --fontFamilyMediumAR:'GE_SS_TWO_MEDIUM'; ---fontFamilyBoldEN:'WorkSans-Bold'; +--fontFamilyBoldEN:'Poppins-Bold'; --fontFamilyBoldAR:'GE_SS_Two_Bold'; ---fontFamilySemiBoldEN:'WorkSans-SemiBold'; +--fontFamilySemiBoldEN:'Poppins-Bold'; --fontFamilySemiBoldAR:'GE_SS_Two_Bold'; --fontFamilyIOSAR:-apple-system, "Helvetica Neue", "Roboto", sans-serif; --fontFamilyAndroidAR:"Roboto", "Helvetica Neue", sans-serif; @@ -73,6 +93,8 @@ --darkblue:#269DB8; --lightblue:#3cb9d5; --newred:#cb3232; + --fontFamilyPoppins-SemiBold: 'Poppins-SemiBold'; + --fontFamilyPoppins-Medium: 'Poppins-Medium'; // $font-family-base: $fontFamilyMediumEN !default; // $font-family-ios-base: $fontFamilyMediumEN !default; // $font-family-md-base:$fontFamilyMediumEN !default; diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index 6d003cfc..e872fddf 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -475,7 +475,7 @@ left: 66px; } .dateActionHistory{ - text-align: end; + text-align: start; // margin-top: -25px; }