diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html index 69b119b1..a98b51e3 100644 --- a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html @@ -1,3 +1,26 @@ -

- cei-homepage works! -

+ +
+ + +
+ +
+ + + + {{user.CONTACT_NAME}} + + + + +
+ + +
+ + +
+ + {{'vacation-rule, next-label' | translate}} +
+
\ No newline at end of file diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts index 3a70a668..04d8a965 100644 --- a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts @@ -1,4 +1,7 @@ import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { EitService } from '../services/eit.service'; @Component({ selector: 'app-cei-homepage', @@ -7,8 +10,31 @@ import { Component, OnInit } from '@angular/core'; }) export class CeiHomepageComponent implements OnInit { - constructor() { } + public familyMemberData; + SelectedServiceType; + constructor( + private eitService: EitService, + public ts: TranslatorService, + public cs: CommonService + ) { + this.eitService.getContactInfo({ + P_MENU_TYPE: 'E', + P_SELECTED_RESP_ID: -999 + }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { + if (this.cs.validResponse(response)) { + this.familyMemberData = response['GetEmployeeContactsList']; + this.SelectedServiceType = this.familyMemberData[0]; + console.log(this.familyMemberData); + } + }); + } - ngOnInit() {} + + ngOnInit() { + } + + selectedUser(){ + console.log(this.SelectedServiceType); + } } diff --git a/Mohem/src/app/eit/eit.module.ts b/Mohem/src/app/eit/eit.module.ts index 98d5bde0..97bcd70f 100644 --- a/Mohem/src/app/eit/eit.module.ts +++ b/Mohem/src/app/eit/eit.module.ts @@ -14,6 +14,7 @@ import { DatePicker } from '@ionic-native/date-picker/ngx'; import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component'; import { EitUpdateListComponent } from './eit-update-list/eit-update-list.component'; import { SubmitEitModalComponent } from './submit-eit-modal/submit-eit-modal.component'; +import { CeiHomepageComponent } from './cei-homepage/cei-homepage.component'; const routes: Routes = [ @@ -48,6 +49,10 @@ const routes: Routes = [ { path: 'eit-submit-modal', component: SubmitEitModalComponent + }, + { + path: 'eit-cei', + component: CeiHomepageComponent } ] } @@ -69,7 +74,8 @@ const routes: Routes = [ ConfirmAddEitComponent, AddAttachComponent, EitUpdateListComponent, - SubmitEitModalComponent + SubmitEitModalComponent, + CeiHomepageComponent ], entryComponents: [ WorkListAttachViewComponent diff --git a/Mohem/src/app/eit/home/home.component.ts b/Mohem/src/app/eit/home/home.component.ts index 05bd9d7d..7058202e 100644 --- a/Mohem/src/app/eit/home/home.component.ts +++ b/Mohem/src/app/eit/home/home.component.ts @@ -74,6 +74,9 @@ export class HomeComponent implements OnInit { if (menuEntry.REQUEST_TYPE === 'TIME_CARD') { this.cs.openTimeCardPage(); } + if (menuEntry.REQUEST_TYPE === 'CEI') { + this.cs.openCEIPage(); + } } } diff --git a/Mohem/src/app/eit/services/eit.service.ts b/Mohem/src/app/eit/services/eit.service.ts index 9063a6ff..31e9d3f9 100644 --- a/Mohem/src/app/eit/services/eit.service.ts +++ b/Mohem/src/app/eit/services/eit.service.ts @@ -29,6 +29,7 @@ export class EitService { 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 getContactInfo = 'Services/ERP.svc/REST/GET_EMPLOYEE_CONTACTS'; constructor(public authService: AuthenticationService, public con: ConnectorService) { } @@ -131,4 +132,9 @@ export class EitService { return this.con.post(EitService.resubmitEit, request, onError, errorLabel); } + public getContactInfo(request: any, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(request); + request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME; + return this.con.post(EitService.getContactInfo, request, onError, errorLabel); + } } diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 899f60e9..cf33443f 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -819,6 +819,11 @@ export class CommonService { return '/Date(' + date.getTime() + ')/'; } + public convertDateToJsonDateUpdated(date: Date): string { + const newDate = new Date(date); + return '/Date(' + newDate.getTime() + ')/'; + } + /* date iso format and time is 24 format hh:mm:ss @@ -888,6 +893,11 @@ export class CommonService { return this.getDateTimeISO(date) + ' ' + this.getTimeISO(date); } + public getDateTimeISOFromStringUpdated(dateStr: string): string { + const date = this.evaluteDateAsObject(dateStr); + return this.getDateTimeISO(date); + } + public getCurrentTimeISO(): string { return this.getTimeISO(new Date()); } @@ -1172,6 +1182,9 @@ export class CommonService { public openMyTeamDetailPage() { this.nav.navigateForward(['/my-team/details']); } + public openSubordinateLeavePage() { + this.nav.navigateForward(['/my-team/subordinate-leave']); + } public openMyRequestPage() { this.nav.navigateForward(['/mowadhafi/my-request']); } @@ -1312,6 +1325,9 @@ export class CommonService { public eitUpdate() { this.nav.navigateForward(['/eit/eit-update-list']); } + public openCEIPage() { + this.nav.navigateForward(['/eit/eit-cei']); + } public openAnnouncement() { this.nav.navigateForward(['/backend-integrations/announcement']); } diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index 70a9d157..62631565 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; - // public static host = 'https://uat.hmgwebservices.com/'; - public static host = 'https://hmgwebservices.com/'; + public static host = 'https://uat.hmgwebservices.com/'; + // public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, diff --git a/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.html b/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.html index ddc592b6..e470558f 100644 --- a/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.html +++ b/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.html @@ -36,6 +36,16 @@ + +
+ +
+
+ +
+ +
+
\ No newline at end of file diff --git a/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.ts b/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.ts index 04758300..404710f4 100644 --- a/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.ts +++ b/Mohem/src/app/hmg-common/ui/generic-header/generic-header.component.ts @@ -2,6 +2,10 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { ModalController } from '@ionic/angular'; import { WorklistSettingComponent } from 'src/app/notification/worklist-setting/worklist-setting.component'; import { CommonService } from '../../services/common/common.service'; +import { DashboredService } from '../../services/dashbored/dashbored.service'; +import { PerformanceAppraisalResponse } from '../../services/dashbored/performance-appraisal.response'; +import { SharedDataService } from '../../services/shared-data-service/shared-data.service'; +import { TranslatorService } from '../../services/translator/translator.service'; @Component({ selector: 'app-generic-header', @@ -19,11 +23,19 @@ export class GenericHeaderComponent implements OnInit { @Input() headerText = ''; @Input() backLink: string; @Input() worklistSetting = false; + @Input() performanceEvaluation = false; + @Input() subordinateLeave = false; @Output() trigger = new EventEmitter(); + public appraisalArr: any = []; + public performanceData: any = []; + public close = 'assets/imgs/cancel.png'; constructor( public common: CommonService, + public DS: DashboredService, + public sharedData: SharedDataService, + public ts: TranslatorService, public modalController: ModalController) { } ngOnInit() { @@ -49,4 +61,38 @@ export class GenericHeaderComponent implements OnInit { this.common.openWorklistSettingsPage(); } + + public openPerormance() { + this.showPerformanceAppraisal(); + } + + public showPerformanceAppraisal() { + this.DS.getPerformanceAppraisal(() => { + this.showPerformanceAppraisal(); + }).subscribe((result: PerformanceAppraisalResponse) => { + this.handlePerformanceAppraisalResult(result); + }); + } + + private handlePerformanceAppraisalResult(result) { + if (this.common.validResponse(result)) { + if (this.common.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.common.openPerformanceevaluation(); + } else { + let msg: string = this.ts.trPK("userProfile", "no-appraisal"); + this.common.presentAlert(msg); + } + } + } + + public openSubordinateLeavePage() { + this.common.openSubordinateLeavePage(); + } } diff --git a/Mohem/src/app/my-team/home/home.component.html b/Mohem/src/app/my-team/home/home.component.html index 2280064d..0cbb0cef 100644 --- a/Mohem/src/app/my-team/home/home.component.html +++ b/Mohem/src/app/my-team/home/home.component.html @@ -1,5 +1,6 @@ diff --git a/Mohem/src/app/my-team/my-team.module.ts b/Mohem/src/app/my-team/my-team.module.ts index 49925b71..17fa5ede 100644 --- a/Mohem/src/app/my-team/my-team.module.ts +++ b/Mohem/src/app/my-team/my-team.module.ts @@ -10,6 +10,7 @@ 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'; +import { SubordinateLeaveComponent } from './subordinate-leave/subordinate-leave.component'; const routes: Routes = [ @@ -28,7 +29,10 @@ const routes: Routes = [ path: 'details-2', component: DetailsComponent }, - + { + path: 'subordinate-leave', + component: SubordinateLeaveComponent + } ] } @@ -44,7 +48,11 @@ const routes: Routes = [ ], providers: [WorklistService], - declarations: [MyTeamPage, HomeComponent, DetailsComponent, + declarations: [ + MyTeamPage, + HomeComponent, + DetailsComponent, + SubordinateLeaveComponent ] }) 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 87507d70..81149b41 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,7 @@ 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 getSubordintesLeaves = 'Services/ERP.svc/REST/GET_SUBORDINATES_LEAVES_TOTAL_VACATIONS'; // public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS'; @@ -20,6 +21,13 @@ export class MyTeamService { return this.con.post(MyTeamService.getMyTeam, request, onError, errorLabel); } + public getEmployeeSubordinatesLeave(absence: any, onError?: any, errorLabel?: string){ + const request = absence; + this.authService.authenticateRequest(request); + request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; + return this.con.post(MyTeamService.getSubordintesLeaves, request, onError, errorLabel); + } + // public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){ // const request = absence; // this.authService.authenticateRequest(request); diff --git a/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.html b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.html new file mode 100644 index 00000000..8adf1dde --- /dev/null +++ b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.html @@ -0,0 +1,89 @@ + + + + + +
+ + +

{{ts.trPK('myTeam','select-duration')}}

+
+
+ + + + {{ts.trPK('general','from')}} + + + +   + + + + + {{ts.trPK('general','to')}} + + +   + + + + + +
+ +
+ +
+
+
+

+ {{ts.trPK('general','empty')}} +

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

{{user.EMPLOYEE_NAME}}

+ {{ts.trPK('general','from')}}: {{getDate(user.DATE_START)}}     + {{ts.trPK('general','to')}}: {{getDate(user.DATE_END)}} +
+ {{ts.trPK('myTeam','no-of-days')}}: {{diffDays(user)}} +
+
+
+
+
+
+
+ +
+ + +
+ {{ts.trPK('general','submit')}} +
+
+ + + + + \ No newline at end of file diff --git a/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.scss b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.scss new file mode 100644 index 00000000..6a147428 --- /dev/null +++ b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.scss @@ -0,0 +1,199 @@ +.confirmEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + --background: #269DB8; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } + + .team-member-container{ + // background: white; + // border-radius: 100px 20px 20px 100px; + // margin-top: 15px; + // font-family: WorkSans-Regular; + // border: 1px solid #ccc; + // border-radius: 15px; + // padding-bottom: 8px; + background: white; + /* margin-top: 2px; */ + font-family: WorkSans-Regular; + border: 1px solid #ccc; + border-radius: 15px; + padding-bottom: 8px; + padding-top: 9px; + margin-bottom: 7px; +} + +// .user-image-container{ +// position: relative; +// width: 70px; +// height: 70px; +// 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; +// } +// } +.user-image{ + // overflow: hidden; + // position: relative; + // display: block; + // width: 100%; + // height: 100%; + // border-radius: 80px; + // border: 1px solid #ccc; + // margin: 0px auto 6px; + + img { + // width: 100%; + // max-height: 100%; + width: 74%; + max-height: 74%; + margin-top: 7px; + margin-left: 6px; + } +} + +.employee-name{ + display: inline-block; + width: 80%; + .name{ + // font-size: 16px; + // color: black; + // // margin: 0; + // width: 100%; + // text-overflow: ellipsis; + // white-space: nowrap; + // overflow: hidden; + // margin-left: -10px; + // margin-top: -5px; + // font-family: 'WorkSans-Bold'; + font-size: 16px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-left: -10px; + margin-top: -5px; + text-align: left; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 25px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + } + + .title{ + // font-size: 13px; + // color: #888; + // width: 100%; + // text-overflow: ellipsis; + // white-space: nowrap; + // overflow: hidden; + // display: block; + // margin-left: -10px; + // margin-top: -6px; + // color: black; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 12px; + letter-spacing: -0.56px; + color: #575757; + opacity: 1; + font-size: 14px; + width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + margin-left: -10px; + margin-top: -10px; + } +} + +.employee-name-ar{ + display: inline-block; + width: 80%; + .name{ + // font-size: 16px; + // color: black; + // // margin: 0; + // width: 100%; + // text-overflow: ellipsis; + // white-space: nowrap; + // overflow: hidden; + // margin-left: -10px; + // margin-top: -5px; + // font-family: 'WorkSans-Bold'; + font-size: 16px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + margin-left: -10px; + margin-top: -5px; + text-align: right; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 25px; + letter-spacing: -0.64px; + color: #2B353E; + opacity: 1; + } + + .title{ + // font-size: 13px; + // color: #888; + // width: 100%; + // text-overflow: ellipsis; + // white-space: nowrap; + // overflow: hidden; + // display: block; + // margin-left: -10px; + // margin-top: -6px; + // color: black; + font-family: var(--fontFamilyPoppins-SemiBold, inherit); + line-height: 12px; + letter-spacing: -0.56px; + color: #575757; + opacity: 1; + font-size: 14px; + width: 100%; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + margin-left: -10px; + margin-top: -10px; + } +} +.image-container{ + width: 20%; + display: inline-block; + text-align: center; + vertical-align: top; + margin-top: 5px; +} +.swipe-information{ + color: #888; + font-size: 12px; + border-top: 1px solid #ccc; + padding-top: 6px; + margin-top: 6px; + .check-in { + font-size: 12px; + margin-right: 15px; + } +} \ No newline at end of file diff --git a/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.spec.ts b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.spec.ts new file mode 100644 index 00000000..8b69962b --- /dev/null +++ b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SubordinateLeaveComponent } from './subordinate-leave.component'; + +describe('SubordinateLeaveComponent', () => { + let component: SubordinateLeaveComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SubordinateLeaveComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SubordinateLeaveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.ts b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.ts new file mode 100644 index 00000000..cdcbd788 --- /dev/null +++ b/Mohem/src/app/my-team/subordinate-leave/subordinate-leave.component.ts @@ -0,0 +1,57 @@ +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { MyTeamService } from '../service/my-team.service'; +import * as moment from 'moment'; + +@Component({ + selector: 'app-subordinate-leave', + templateUrl: './subordinate-leave.component.html', + styleUrls: ['./subordinate-leave.component.scss'], +}) +export class SubordinateLeaveComponent implements OnInit { + public startDate: any; + public endDate: any; + public list = []; + public noData = true; + + constructor( + public ts: TranslatorService, + public common: CommonService, + public myTeamService: MyTeamService, + ) { } + + ngOnInit() {} + + subordinateLeaveList() { + const Sdata = this.common.convertDateToJsonDateUpdated(this.startDate); + const Edata = this.common.convertDateToJsonDateUpdated(this.endDate); + this.myTeamService.getEmployeeSubordinatesLeave({ + P_DATE_FROM: Sdata, + P_DATE_TO: Edata + }, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => { + if (this.common.validResponse(result)) { + this.list = result.GetSubordinatesLeavesTotalVacationsList; + this.noData = false; + } + }); + } + + getDate(date) { + const newDate = this.common.localizeDate(new Date(this.common.getDateTimeISOFromStringUpdated(date).split(' ')[0])); + return newDate; + } + diffDays(date) { + const date1 = new Date(this.common.getDateTimeISOFromStringUpdated(date.DATE_START).split(' ')[0]); + const date2 = new Date(this.common.getDateTimeISOFromStringUpdated(date.DATE_END).split(' ')[0]); + const diff = Math.abs(date1.getTime() - date2.getTime()); + const diffDays = Math.ceil(diff / (1000 * 3600 * 24)); + return diffDays; + } + + checkDate() { + if (this.startDate && this.endDate) { + return false; + } else { return true; } + } +} 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 480ed036..1da215da 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 @@ -360,7 +360,7 @@ export class WorkListReplacementRollComponent implements OnInit { // } // }, 5000); - this.cs.openNotificationPage(); + // this.cs.openNotificationPage(); // this.messageSuccess = true; // setTimeout(() => { 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 f0dcf22c..eecd523e 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 @@ -1171,66 +1171,43 @@ export class WorklistMainPoComponent implements OnInit { } 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) { + if (data.data.data === 'cancel' || data.data.data === undefined) { return; - } else if (data.data.data == "Success") { - // this.openNotificationsDashboard(); - // this.messageSuccess = true; + } else if (data.data.data === 'Success') { this.common.greenToastPK('worklist', 'save-successfully'); setTimeout(() => { - // this.messageSuccess = false; - this.common.redToastPK('worklist', 'save-error'); this.nextNotfification(); }, 2000); - // this.nextNotfification(); - + } else { + this.common.redToastPK('worklist', 'save-error'); } }); 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 { - - - } + } else {} }); return await modal.present(); diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index f47eb954..39030123 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -1,4 +1,4 @@ - + diff --git a/Mohem/src/assets/icon/bar-chart-outline.svg b/Mohem/src/assets/icon/bar-chart-outline.svg new file mode 100644 index 00000000..d17a6598 --- /dev/null +++ b/Mohem/src/assets/icon/bar-chart-outline.svg @@ -0,0 +1 @@ +Bar Chart \ No newline at end of file diff --git a/Mohem/src/assets/icon/bar-chart.svg b/Mohem/src/assets/icon/bar-chart.svg new file mode 100644 index 00000000..7a070f16 --- /dev/null +++ b/Mohem/src/assets/icon/bar-chart.svg @@ -0,0 +1 @@ +Bar Chart \ No newline at end of file diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 6d68cc24..76791853 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -1966,6 +1966,18 @@ "team-stats": { "en": "Team Statistics", "ar": "إحصائيات الفريق" + }, + "subordinate-leave":{ + "en":"Subordinate Leave", + "ar":"إجازة التابعيين" + }, + "select-duration":{ + "en":"Select Duration", + "ar":"اختر الفترة" + }, + "no-of-days":{ + "en":"No. of days", + "ar":"عدد الايام" } }, "searchForReplacment": { @@ -2070,6 +2082,10 @@ "submit": { "en": "Are you sure you want to submit?", "ar": "هل انت متاكد من ارسال الطلب؟" + }, + "cei":{ + "en":"child Education", + "ar":"تعليم الطفل" } }, "submitAbsence": {