updated home page
parent
578d20ea2c
commit
cad200261e
@ -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 { }
|
||||
|
||||
@ -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 {}
|
||||
@ -0,0 +1,69 @@
|
||||
<!-- <ion-header no-shadow no-border>
|
||||
<ion-toolbar>
|
||||
<nav-buttons [enableMenu]="true" [enableBack]="false" [navigate]="false"></nav-buttons>
|
||||
<ion-title>home </ion-title>
|
||||
<ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge>
|
||||
</ion-toolbar>
|
||||
</ion-header> -->
|
||||
<ion-content >
|
||||
<div class="header-div">
|
||||
<button ion-button icon-only menuToggle class="menubutton">
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
<ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge>
|
||||
</button>
|
||||
<div class="centerDiv" (click)="openPersonalInfo()">
|
||||
<p class="TxtPlace">{{"home.hello" | translate}}, {{User_name_Emp}}</p>
|
||||
<div class="profileDiv"><ion-img class="profileImg" src="{{user_image}}"></ion-img></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<p class="dash-header text-caps">{{"home.dashboard" | translate}}</p>
|
||||
</div>
|
||||
<div>
|
||||
<ion-grid class="cus-grid">
|
||||
<ion-row>
|
||||
<ion-col size="6" class="col-grid" *ngFor="let item of menuList; let i=index">
|
||||
<button ion-button block class="serviceItem" (click)="getMeunDetails(i)">
|
||||
<img class="serviceItemImg" src="../assets/imgs/{{item.MENU_TYPE}}.png"/>
|
||||
<p> {{ item.MENU_NAME }} {{item.SUB_MENU_NAME}}</p>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col size="6" class="col-grid">
|
||||
<button ion-button block class="serviceItem" (click)="attendance()">
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/attend.png"></ion-img>
|
||||
<p>{{"attendance.attendance" | translate}}</p>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col size="6" class="col-grid">
|
||||
<button ion-button block class="serviceItem" (click)="Vaction_Rule()">
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/vacationrule.png"></ion-img>
|
||||
<p>{{"vacationRule.vacationRule" | translate}}</p>
|
||||
</button>
|
||||
</ion-col>
|
||||
<ion-col size="6" class="col-grid">
|
||||
<button ion-button block class="serviceItem" (click)="accrualBalance()">
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/accu.png"></ion-img>
|
||||
<p>{{"absenceList.accrualBalances" | translate}}</p>
|
||||
</button>
|
||||
</ion-col>
|
||||
|
||||
<ion-col size="6" class="col-grid">
|
||||
<button ion-button block class="serviceItem" (click)="Change_password()">
|
||||
<ion-img class="serviceItemImg" src="../assets/imgs/changepass.png"></ion-img>
|
||||
<p>{{"changePassword.changePassword" | translate}}</p>
|
||||
</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<!-- <button class="menu-item" ion-item menuClose ion-item *ngFor="let item of menuList; let i=index" (click)="getMeunDetails(i)" >
|
||||
<img width="30" src="../assets/imgs/arrownew.png" item-left class="flipImg">
|
||||
{{ item.MENU_NAME }} {{item.SUB_MENU_NAME}}
|
||||
</button> -->
|
||||
|
||||
</ion-grid>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@ -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;
|
||||
}
|
||||
@ -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<HomePage>;
|
||||
|
||||
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();
|
||||
});
|
||||
});
|
||||
@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue