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 aa478363..c3a631e3 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1106,6 +1106,10 @@ public getMonthNameAr(value: number): string { public openMyTeamPage() { this.nav.navigateForward(['/my-team/home']); } + + public openPage(link: string) { + this.nav.navigateForward([link]); + } public static myTeamDetailUrl =['/my-team/details','/my-team/details-2'] public openMyTeamDetails() { this.alternateNavigate(CommonService.myTeamDetailUrl,'teamDetail-open',true); diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index ab687c35..17f22142 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -16,7 +16,8 @@ + [icon]="button.icon" + (click)="openStatsButton(button.link)"> diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss index 8143cf6e..c803673d 100644 --- a/Mohem/src/app/home/home.page.scss +++ b/Mohem/src/app/home/home.page.scss @@ -39,10 +39,6 @@ ion-label{ position: relative; width: 100%; } -.header-md:after { - height: 0px !important; - display: none !important; -} .contentBg:before { position: absolute; content: ""; diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 95e58003..6640f864 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -57,27 +57,32 @@ export class HomePage implements OnInit { { title: 'Work List', statsValue: 0, - icon: 'assets/icon/new-design/work_list.png' + icon: 'assets/icon/new-design/work_list.png', + link: '/notification/homepage' }, { title: 'Pending Request', statsValue: 13, - icon: 'assets/icon/new-design/pending_request.png' + icon: 'assets/icon/new-design/pending_request.png', + link: '' }, { title: 'Missing Swipes', statsValue: 0, - icon: 'assets/icon/new-design/missing_swipe.png' + icon: 'assets/icon/new-design/missing_swipe.png', + link: '' }, { title: 'Leave Balance', statsValue: 0, - icon: 'assets/icon/new-design/leave_balance.png' + icon: 'assets/icon/new-design/leave_balance.png', + link: '' }, { title: 'Ticket Balance', statsValue: 0, - icon: 'assets/icon/new-design/ticket_balance.png' + icon: 'assets/icon/new-design/ticket_balance.png', + link: '' } ]; @@ -596,6 +601,11 @@ export class HomePage implements OnInit { this.common.openProfile(); } + openStatsButton(link: string) { + console.log(link); + this.common.openPage(link); + } + } diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 4ef7e9fe..90fe6d91 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -1,12 +1,27 @@ - + + + + + + + + WORK LIST + + + + + + + Open Request Analysis @@ -70,4 +85,5 @@ + diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index 539a65a7..bf3c4f8d 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -220,6 +220,43 @@ ion-input ,ion-datetime{ ///////////////////////////////////////////NEW DESIGN///////////////////////////////////// + +.header-toolbar-new{ + --background: #22c6b3; +} +.profile-image-container{ + position: relative; + z-index: 999; + img { + width: 32px; + float: right; + border-radius: 20px; + height: 32px; + margin-right: 10px; + } +} +ion-title{ + color: white; + position: absolute; + top: 0; + text-align: center; + left: 15%; + right: 15%; + font-size: 0.42cm; + font-weight: bold; + height: 100%; +} + +.contentBg:before { + position: absolute; + content: ""; + background: #22c6b3; + height: 140px; + width: 100%; + left: 0; + top: 0px; + z-index: 1; +} ion-content { --ion-background-color: whitesmoke; } @@ -240,6 +277,7 @@ ion-content { margin-top: 20px; padding-bottom: 20px; border-radius: 20px; + z-index: 1; } .result-text-container { padding: 0; @@ -269,10 +307,10 @@ ion-content { max-height: 4cm; } -// .swiper-container { -// margin: 0 !important; -// width: 100% !important; -// } + .swiper-container { + margin: 0 !important; + width: 100% !important; + } .filters-row { margin-top: 10px; margin-left: 20px; @@ -282,6 +320,7 @@ ion-content { padding-left: 60px; clear: both; min-height: 200px; + margin-bottom: 80px; } .work-list-container:before{ content: ""; diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 43931002..046c5062 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -9,6 +9,8 @@ import { WorklistService } from '../service/worklist.service'; import { IonInfiniteScroll } from '@ionic/angular'; import { WorklistMainService } from '../service/work-list.main.service'; import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/worklist-advanced-search.component'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; + @Component({ selector: 'app-home', templateUrl: './home.component.html', @@ -46,9 +48,6 @@ export class HomeComponent implements OnInit { public isSearch: boolean = false; public direction = 'ltr'; - - - public options = { cutoutPercentage: 80, tooltips: { enabled: false }, @@ -133,6 +132,10 @@ constructor( this.WorkListObj.P_PAGE_LIMIT = 50; //number } + public userData: any; + public userImage: any = '../assets/imgs/profile.png'; + + activeFilter(index: number) { for (const filter of this.filters) { filter.active = false; @@ -140,6 +143,9 @@ constructor( this.filters[index].active = true; } + openProfilePage() { + this.common.openProfile(); + } async openSearchModal() { console.log('umar786'); @@ -175,6 +181,8 @@ constructor( ngOnInit() { // this.direction = TranslatorService.getCurrentDirection(); + this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false); + this.userImage = this.userData.EMPLOYEE_IMAGE ? 'data:image/png;base64,' + this.userData.EMPLOYEE_IMAGE : this.userImage; } ionViewDidLoad() { // this.navBar.backButtonClick = () => { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 755291de..efa3a30c 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -994,6 +994,10 @@ border:0px } .alert-button-inner.sc-ion-alert-md { - justify-content: center !important; } + +.header-md:after { + height: 0px !important; + display: none !important; +}