From cad200261ea00fd2a2fc6990924a3cda2d2ef506 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Tue, 25 Jun 2019 16:42:52 +0300 Subject: [PATCH] updated home page --- Mohem/src/app/app-routing.module.ts | 35 ++++++----- Mohem/src/app/app.component.html | 40 +----------- Mohem/src/app/app.component.ts | 11 +--- Mohem/src/app/home/home.module.ts | 31 ++++++++++ Mohem/src/app/home/home.page.html | 69 +++++++++++++++++++++ Mohem/src/app/home/home.page.scss | 93 ++++++++++++++++++++++++++++ Mohem/src/app/home/home.page.spec.ts | 27 ++++++++ Mohem/src/app/home/home.page.ts | 16 +++++ 8 files changed, 259 insertions(+), 63 deletions(-) create mode 100644 Mohem/src/app/home/home.module.ts create mode 100644 Mohem/src/app/home/home.page.html create mode 100644 Mohem/src/app/home/home.page.scss create mode 100644 Mohem/src/app/home/home.page.spec.ts create mode 100644 Mohem/src/app/home/home.page.ts diff --git a/Mohem/src/app/app-routing.module.ts b/Mohem/src/app/app-routing.module.ts index 42c149de..7ea9259e 100644 --- a/Mohem/src/app/app-routing.module.ts +++ b/Mohem/src/app/app-routing.module.ts @@ -1,18 +1,19 @@ -import { NgModule } from '@angular/core'; -import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; +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', + data: { preload: true, delay: 1000 } + }, { path: 'home', loadChildren: './home/home.module#HomePageModule' } -const routes: Routes = [ - { path: '', redirectTo: 'authentication/login', pathMatch: 'full' }, - { - path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule', - data: { preload: true, delay: 1000 } - } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) - ], - exports: [RouterModule] -}) -export class AppRoutingModule { } +]; + +@NgModule({ + imports: [ + RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) + ], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index ed86517c..97f8ceb3 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -2,8 +2,8 @@ - diff --git a/Mohem/src/app/app.component.ts b/Mohem/src/app/app.component.ts index 84068821..966e42c2 100644 --- a/Mohem/src/app/app.component.ts +++ b/Mohem/src/app/app.component.ts @@ -40,14 +40,13 @@ export class AppComponent implements OnInit, AfterViewInit { } ngAfterViewInit() {} initializeApp() { - this.start = false; this.lazyLoadingService.monitorLazyLoading(15, true); this.platform.ready().then(() => { this.translatorService.loadResources(() => { this.initializeDirection(); - // this.statusBar.styleDefault(); - this.start = true; + // this.statusBar.styleDefault(); + this.start = true; this.watchLanguageChangeEvents(); // this.checkIfUserLoggedInBefore(); this.keyboardService.watchKeyboard(); @@ -61,11 +60,7 @@ export class AppComponent implements OnInit, AfterViewInit { this.events.subscribe( AuthenticationService.LOGIN_EVENT, (user: AuthenticatedUser, time: Date) => { - // if (user) { - // this.loggedInMainUser = user; - // this.loggedInUser = user; - // this.loadFamilyMembers(); - // } + } ); } diff --git a/Mohem/src/app/home/home.module.ts b/Mohem/src/app/home/home.module.ts new file mode 100644 index 00000000..552dcba8 --- /dev/null +++ b/Mohem/src/app/home/home.module.ts @@ -0,0 +1,31 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { Routes, RouterModule } from '@angular/router'; +import { HmgCommonModule } from '../hmg-common/hmg-common.module'; +import { IonicModule } from '@ionic/angular'; +import { HomePage } from './home.page'; + +const routes: Routes = [ + { + path: '', + component: HomePage + } +]; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + HmgCommonModule, + RouterModule.forChild([ + { + path: '', + component: HomePage + } + ]) + ], + declarations: [HomePage] +}) +export class HomePageModule {} diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html new file mode 100644 index 00000000..5ebdfa09 --- /dev/null +++ b/Mohem/src/app/home/home.page.html @@ -0,0 +1,69 @@ + + +
+ +
+

{{"home.hello" | translate}}, {{User_name_Emp}}

+
+
+
+ +
+
+

{{"home.dashboard" | translate}}

+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
diff --git a/Mohem/src/app/home/home.page.scss b/Mohem/src/app/home/home.page.scss new file mode 100644 index 00000000..709bf833 --- /dev/null +++ b/Mohem/src/app/home/home.page.scss @@ -0,0 +1,93 @@ +.button-menutoggle.button-menutoggle-md,button-menutoggle.button-menutoggle-ios, +.bar-buttons.bar-buttons-ios.button.button-ios.button-default.button-default-ios.button-menutoggle.button-menutoggle-ios{ + box-shadow: none; + -webkit-box-shadow:none; + -moz-box-shadow: none; + background: transparent !important; + } + .menubutton{ + white-space: normal; + color: var(--light); + text-transform: capitalize; + min-height: 47px; + background: transparent; + font-size: 2rem; + } + #homeBadgeBtn{ + position: absolute; + top: 2px; + width: 20px; + font-size: 10px; + height: 20px; + padding: 0px; + line-height: 2; + min-width: auto; + min-height: auto; + } + .header-div{ + background:var(--primary); + background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + background: -webkit-linear-gradient(45deg, (--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); + color:var(--light); + text-transform: capitalize; + + display: block; + position: relative; + height: 120px; + margin-bottom:60px; + } + + .dash-header{ + text-align: center; + margin: 16px 0 0 0; + + } + + .TxtPlace { + margin: 0; + padding: 0 0 10px 0; + text-align: center; + } + + .serviceItem { + min-height: 160px !important; + padding: 0; + width:100%; + border: 2px solid #e4e5e7; + background: transparent !important; + color: var(--dark); + p{ + margin-top: 0px; margin-bottom:0px; + font-weight: normal; + font-size: 14px; + min-height: 20px; + // white-space: normal; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + } + span { + display: block; + + } + .serviceItemImg { + min-width: 60px !important; + min-height: 70px !important; + width: 80px; + height: 80px; + margin: 10px auto; + background: transparent !important; + } + + } + .serviceItem.button,.serviceItem.button-md, .serviceItem.button-ios{ + background: transparent !important; + color:var(--dark); + box-shadow: none; + -webkit-box-shadow:none; + -moz-box-shadow: none; + border: 2px solid var(--gray); + min-width: auto; + } \ No newline at end of file diff --git a/Mohem/src/app/home/home.page.spec.ts b/Mohem/src/app/home/home.page.spec.ts new file mode 100644 index 00000000..cfa74c8f --- /dev/null +++ b/Mohem/src/app/home/home.page.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomePage } from './home.page'; + +describe('HomePage', () => { + let component: HomePage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HomePage ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HomePage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts new file mode 100644 index 00000000..b19357af --- /dev/null +++ b/Mohem/src/app/home/home.page.ts @@ -0,0 +1,16 @@ +import { Component, OnInit } from '@angular/core'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +@Component({ + selector: 'app-home', + templateUrl: './home.page.html', + styleUrls: ['./home.page.scss'], +}) +export class HomePage implements OnInit { + home: any ={}; + user_image : any = "../assets/imgs/profile.png"; + constructor(public ts:TranslatorService ) { } + + ngOnInit() { + } + +}