update home

MOHEMM-Q3-DEV-LATEST
Sultan Khan 7 years ago
parent fe7e62bbe6
commit b967536b26

@ -12,7 +12,7 @@
</div> </div>
</div> </div>
<ion-list> <!-- <ion-list>
<button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" > <button class="menu-item" ion-item menuClose ion-item (click)="goToWorkListPage()" >
<img width="30" src="../assets/imgs/bell.png" item-left > <img width="30" src="../assets/imgs/bell.png" item-left >
{{"home.worklist" | translate }} {{"home.worklist" | translate }}
@ -29,7 +29,7 @@
{{"home.logout" | translate }} {{"home.logout" | translate }}
</button> </button>
</ion-list> </ion-list> -->
<div class="menuFooter"> <div class="menuFooter">

@ -2,111 +2,174 @@
header header
*/ */
.menu-header { .menu-header {
height: 2.5cm; height: 2.5cm;
} }
.content-ios:not([no-bounce]) > .scroll-content::before { .content-ios:not([no-bounce])>.scroll-content::before {
bottom: 0; bottom: 0;
} }
.menu-header .logo { .menu-header .logo {
position: absolute; position: absolute;
left: 0.6cm; left: 0.6cm;
top: 0.9cm; top: 0.9cm;
width: 1.6cm; width: 1.6cm;
} }
.menu-header .background { .menu-header .background {
height: 1.5cm; height: 1.5cm;
width: 100%; width: 100%;
} }
/* title */ /* title */
.title-v-spacer { .title-v-spacer {
height: 0.7cm; height: 0.7cm;
} }
.suliman-title {
margin-left: 0.3cm;
margin-right: 0.3cm;
font-weight: bold;
font-size: 0.5cm;
}
.group-title {
margin-left: 0.4cm;
margin-right: 0.4cm;
font-size: 0.4cm;
}
.suliman-title { /*
margin-left: 0.3cm;
margin-right: 0.3cm;
font-weight: bold;
font-size: 0.5cm;
}
.group-title {
margin-left: 0.4cm;
margin-right: 0.4cm;
font-size: 0.4cm;
}
/*
items items
*/ */
.items-buttons-spacer { .items-buttons-spacer {
height: 10%; height: 10%;
} }
/*
/*
user information user information
*/ */
.user-v-spacer { .user-v-spacer {
height: 0.5cm; height: 0.5cm;
} }
.user-name-title { .user-name-title {
margin-left: 0.3cm; margin-left: 0.3cm;
margin-right: 0.3cm; margin-right: 0.3cm;
font-weight: bold; font-weight: bold;
} }
.file-id-title { .file-id-title {
margin-left: 0.4cm; margin-left: 0.4cm;
margin-right: 0.4cm; margin-right: 0.4cm;
} }
.social-media-container {
position: absolute !important;
width: 100%;
bottom: 0.2cm;
background-color: white;
}
.icon-spacer {
margin-right: 0.3cm;
margin-left: 0.3cm;
}
/*mobile Landscape */
@media only screen and (min-device-height: 0px) and (max-device-height: 515px) and (orientation: landscape) {
.social-media-container { .social-media-container {
position: absolute !important; display: none;
width: 100%;
bottom: 0.2cm;
background-color: white;
} }
}
.icon-spacer { .info-container {
margin-right: 0.3cm; overflow-y: scroll;
margin-left: 0.3cm; width: 100%;
} position: absolute;
top: 2.6cm;
bottom: 0.2cm;
padding-bottom: 4.5cm;
}
/*mobile Landscape */ @media only screen and (orientation: landscape) {
@media only screen and (min-device-height: 0px) and (max-device-height: 515px) and (orientation: landscape) {
.social-media-container {
display: none;
}
}
.info-container { .info-container {
overflow-y: scroll; padding-bottom: 0.2cm;
width: 100%; }
position: absolute; }
top: 2.6cm;
bottom: 0.2cm; .member {
padding-bottom: 4.5cm; border-bottom-color: var(--ion-color-medium) !important;
} border-bottom-width: 0.02cm;
border-bottom-style: solid;
@media only screen and (orientation: landscape) { /* margin-left: 0.4cm; */
.info-container { }
padding-bottom: 0.2cm;
} .selected-member {
} border-bottom-color: var(--ion-color-secondary) !important;
border-bottom-width: 0.02cm;
.member { border-bottom-style: solid;
border-bottom-color: var(--ion-color-medium) !important; margin-left: 0.2cm;
border-bottom-width: 0.02cm; }
border-bottom-style: solid;
/* margin-left: 0.4cm; */ .sidebar-menu .header-div {
} background: var(--primary);
background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
.selected-member { background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
border-bottom-color: var(--ion-color-secondary) !important; background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%, var(--secondary) 59%, var(--customnavy) 100%);
border-bottom-width: 0.02cm; color: var(--light);
border-bottom-style: solid; text-transform: capitalize;
margin-left: 0.2cm; height: 120px;
} position: relative;
display: block;
margin-bottom: 40px;
}
.list-md .item-block .item-inner,
.list-ios .item-block .item-inner {
border-color: var(--primary);
border-bottom: 0px;
}
.list-md>.item-block:last-child .item-inner,
.list-ios>.item-block:last-child .item-inner {
border-bottom: 0px;
}
button.menu-item.item.item-block.item-md,
button.menu-item.item.item-block.item-ios {
border-bottom: 1px solid var(--cusgray);
color: var(--customnavy);
}
.TxtPlace {
margin: 0;
padding: 40px 0 10px 0;
text-align: center;
}
.menuFooter {
position: fixed;
bottom: 0px;
text-align: center;
margin: auto;
width: 100%;
}
.menuFooter div {
width: 80px;
// height: 80px;
margin: auto;
}
.menuFooter .CompanyImg {
width: 100%;
height: 100%;
}
.companyTxt {
font-size: 12px;
color: var(--customnavy);
text-align: center;
}

@ -20,7 +20,7 @@ export class AppComponent implements OnInit, AfterViewInit {
start: any = false; start: any = false;
menuList: any = []; menuList: any = [];
User_name_Emp: string = ""; User_name_Emp: string = "";
user_image: string = ""; user_image: string = "../assets/imgs/profile.png"
menuSide: string = "left"; menuSide: string = "left";
notBadge: number; notBadge: number;
companyUrl: string = "../assets/imgs/CS.png"; companyUrl: string = "../assets/imgs/CS.png";

@ -94,7 +94,7 @@ export class ForgotComponent implements OnInit,OnDestroy {
private checkActivationCode(readedCode?) { private checkActivationCode(readedCode?) {
const request = new CheckActivationCodeRequest(); const request = new CheckActivationCodeRequest();
request.LogInTokenID = this.checkUserResult.LogInTokenID; request.LogInTokenID = this.checkUserResult.LogInTokenID;
request.PatientOutSA = this.checkUserResult.PatientOutSA ? 1 : 0; //request.PatientOutSA = this.checkUserResult.PatientOutSA ? 1 : 0;
request.PatientMobileNumber = this.countryCode.number; request.PatientMobileNumber = this.countryCode.number;
request.ZipCode = CountryCode.localCode(this.countryCode.code); request.ZipCode = CountryCode.localCode(this.countryCode.code);
request.activationCode = readedCode; request.activationCode = readedCode;

@ -30,11 +30,10 @@ export class LoginComponent implements OnInit, OnDestroy {
isSupportAr:boolean=false; isSupportAr:boolean=false;
isAppleStore:boolean=false; isAppleStore:boolean=false;
memberLogin: any = {}; memberLogin: any = {};
private password: string; private password: string;
private language: string; private language: string;
private username : string; private username : string;
private currentLang : any = 2; private currentLang : any =1;
private patientOutSA: boolean; private patientOutSA: boolean;
private loginTokenID: string; private loginTokenID: string;
private isMobileFingerPrint: boolean; private isMobileFingerPrint: boolean;
@ -56,12 +55,6 @@ export class LoginComponent implements OnInit, OnDestroy {
} }
ngOnInit() { ngOnInit() {
console.log(this.currentLang);
//this.setIdPattern();
// setTimeout(() => {
// this.checkIfLoggedInBefore();
// // this.splash.hide();
// }, 100);
} }

@ -90,6 +90,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { RateService } from './services/rate/rate.service'; import { RateService } from './services/rate/rate.service';
import { PaymentComponent } from './ui/payment/payment.component'; import { PaymentComponent } from './ui/payment/payment.component';
import { PaymentService } from './ui/payment/service/payment.service'; import { PaymentService } from './ui/payment/service/payment.service';
import { MenuService } from './services/menu/menuservice.service';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
@ -237,8 +238,8 @@ import { PaymentService } from './ui/payment/service/payment.service';
RatingService, RatingService,
InAppBrowser, InAppBrowser,
RateService, RateService,
PaymentService PaymentService,
MenuService
] ]
}) })
export class HmgCommonModule { } export class HmgCommonModule { }

@ -2,73 +2,77 @@ import { PatientUserModel } from './PatientUserModel';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
export class AuthenticatedUser extends PatientUserModel { export class AuthenticatedUser extends PatientUserModel {
ACTUAL_TERMINATION_DATE: string TokenID:string;
ASSIGNMENT_END_DATE: string ACTUAL_TERMINATION_DATE: string;
ASSIGNMENT_ID: number ASSIGNMENT_END_DATE: string;
ASSIGNMENT_NUMBER: string ASSIGNMENT_ID: number;
ASSIGNMENT_START_DATE: string ASSIGNMENT_NUMBER: string;
ASSIGNMENT_STATUS_TYPE_ID: number ASSIGNMENT_START_DATE: string;
ASSIGNMENT_TYPE: string ASSIGNMENT_STATUS_TYPE_ID: number;
BUSINESS_GROUP_ID: number ASSIGNMENT_TYPE: string;
BUSINESS_GROUP_NAME: string BUSINESS_GROUP_ID: number;
CURRENT_EMPLOYEE_FLAG: string BUSINESS_GROUP_NAME: string;
EMPLOYEE_DISPLAY_NAME: string CURRENT_EMPLOYEE_FLAG: string;
EMPLOYEE_EMAIL_ADDRESS:string EMPLOYEE_DISPLAY_NAME: string;
EMPLOYEE_IMAGE:string EMPLOYEE_EMAIL_ADDRESS:string;
EMPLOYEE_MOBILE_NUMBER: string EMPLOYEE_IMAGE:string;
EMPLOYEE_NAME:string EMPLOYEE_MOBILE_NUMBER: string;
EMPLOYEE_NUMBER: string EMPLOYEE_NAME:string;
EMPLOYEE_WORK_NUMBER:string EMPLOYEE_NUMBER: string;
EMPLOYMENT_CATEGORY: string EMPLOYEE_WORK_NUMBER:string;
EMPLOYMENT_CATEGORY_MEANING: string EMPLOYMENT_CATEGORY: string;
FREQUENCY: string EMPLOYMENT_CATEGORY_MEANING: string;
FREQUENCY_MEANING: string FREQUENCY: string;
FROM_ROW_NUM: number FREQUENCY_MEANING: string;
GRADE_ID: number FROM_ROW_NUM: number;
GRADE_NAME: string GRADE_ID: number;
HIRE_DATE: string GRADE_NAME: string;
JOB_ID: number HIRE_DATE: string;
JOB_NAME: string JOB_ID: number;
LEDGER_ID: number JOB_NAME: string;
LOCATION_ID: number LEDGER_ID: number;
LOCATION_NAME: string LOCATION_ID: number;
MANUAL_TIMECARD_FLAG: string LOCATION_NAME: string;
MANUAL_TIMECARD_MEANING: string MANUAL_TIMECARD_FLAG: string;
NATIONALITY_CODE: string MANUAL_TIMECARD_MEANING: string;
NATIONALITY_MEANING: string NATIONALITY_CODE: string;
NATIONAL_IDENTIFIER:string NATIONALITY_MEANING: string;
NORMAL_HOURS: string NATIONAL_IDENTIFIER:string;
NO_OF_ROWS: number NORMAL_HOURS: string;
ORGANIZATION_ID: number NO_OF_ROWS: number;
ORGANIZATION_NAME: string ORGANIZATION_ID: number;
PAYROLL_CODE: string ORGANIZATION_NAME: string;
PAYROLL_ID: number PAYROLL_CODE: string;
PAYROLL_NAME: string PAYROLL_ID: number;
PERSON_ID: number PAYROLL_NAME: string;
PERSON_TYPE:string PERSON_ID: number;
PERSON_TYPE_ID: number PERSON_TYPE:string;
PER_INFORMATION_CATEGORY: string PERSON_TYPE_ID: number;
POSITION_ID: number PER_INFORMATION_CATEGORY: string;
POSITION_NAME: string POSITION_ID: number;
PRIMARY_FLAG: string POSITION_NAME: string;
ROW_NUM:number PRIMARY_FLAG: string;
SUPERVISOR_ASSIGNMENT_ID: string ROW_NUM:number;
SUPERVISOR_DISPLAY_NAME: string SUPERVISOR_ASSIGNMENT_ID: string;
SUPERVISOR_EMAIL_ADDRESS: string SUPERVISOR_DISPLAY_NAME: string;
SUPERVISOR_ID: number SUPERVISOR_EMAIL_ADDRESS: string;
SUPERVISOR_MOBILE_NUMBER: string SUPERVISOR_ID: number;
SUPERVISOR_NAME: string SUPERVISOR_MOBILE_NUMBER: string;
SUPERVISOR_NUMBER: string SUPERVISOR_NAME: string;
SUPERVISOR_WORK_NUMBER: string SUPERVISOR_NUMBER: string;
SWIPES_EXEMPTED_FLAG: string SUPERVISOR_WORK_NUMBER: string;
SWIPES_EXEMPTED_MEANING: string SWIPES_EXEMPTED_FLAG: string;
SYSTEM_PERSON_TYPE: string SWIPES_EXEMPTED_MEANING: string;
TK_EMAIL_ADDRESS: string SYSTEM_PERSON_TYPE: string;
TK_EMPLOYEE_DISPLAY_NAME: string TK_EMAIL_ADDRESS: string;
TK_EMPLOYEE_NAME: string TK_EMPLOYEE_DISPLAY_NAME: string;
TK_EMPLOYEE_NUMBER: string TK_EMPLOYEE_NAME: string;
TK_PERSON_ID: number TK_EMPLOYEE_NUMBER: string;
TO_ROW_NUM: number TK_PERSON_ID: number;
UNIT_NUMBER: string TO_ROW_NUM: number;
USER_STATUS: string UNIT_NUMBER: string;
USER_STATUS: string;
P_SESSION_ID:number;
MobileNumber:string;
LogInTokenID:string;
} }

@ -4,5 +4,10 @@ import { AuthenticatedUser } from './authenticated-user';
export class CheckActivationCodeResponse extends Response { export class CheckActivationCodeResponse extends Response {
AuthenticationTokenID: string; AuthenticationTokenID: string;
P_SESSION_ID:number;
MobileNumber:string;
LogInTokenID:string;
EMPLOYEE_MOBILE_NUMBER:string;
TokenID:string;
MemberInformationList:AuthenticatedUser[]; MemberInformationList:AuthenticatedUser[];
} }

@ -1,6 +1,6 @@
import { Request } from '../../models/request'; import { Request } from '../../models/request';
export class SMSCheckRequest extends Request { export class SMSCheckRequest extends Request {
LogInTokenID?: string ; LogInTokenID: string ;
activationCode?: string; activationCode?: string;
} }

@ -3,5 +3,12 @@ import { AuthenticatedUser } from './authenticated-user';
export class SMSCheckResponse extends Response { export class SMSCheckResponse extends Response {
AuthenticationTokenID: string; AuthenticationTokenID: string;
MemberInformationList:AuthenticatedUser[]; MemberInformationList:AuthenticatedUser[];
public TokenID: string;
public SessionID: string;
public MobileType: string;
public BookedBy?: number;
public P_SESSION_ID: number;
public MobileNumber : string;
public LogInTokenID : string;
public EMPLOYEE_MOBILE_NUMBER:string;
} }

@ -54,8 +54,8 @@ export class GeofencingService {
const req = new InsertLocationRequest(); const req = new InsertLocationRequest();
req.PointsID = id; req.PointsID = id;
req.GeoType = type; req.GeoType = type;
req.PatientID = userData.PatientID; //req.PatientID = userData.PatientID;
req.PatientOutSA = userData.PatientOutSA; //req.PatientOutSA = userData.PatientOutSA;
this.auth.setPublicFields(req); this.auth.setPublicFields(req);
this.con.postNoLoad(GeofencingService.loggingUrl, req, () => { this.con.postNoLoad(GeofencingService.loggingUrl, req, () => {
zone.pendingRequest = type; // failed to log, setup pending request zone.pendingRequest = type; // failed to log, setup pending request

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { MenuserviceService } from './menuservice.service';
describe('MenuserviceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: MenuserviceService = TestBed.get(MenuserviceService);
expect(service).toBeTruthy();
});
});

@ -0,0 +1,50 @@
import {Injectable} from '@angular/core';
import {Http, Response, Headers, } from "@angular/http";
import {AuthenticationService} from "../authentication/authentication.service";
import { Observable } from 'rxjs';
import {MenuEntries} from './models/menu-entries.request';
import {Request} from '../models/request';
import {MenuResponse} from './models/menu-response'
import { ConnectorService } from '../connector/connector.service';
@Injectable()
export class MenuService {
public static getMenu ='Services/ERP.svc/REST/GET_MENU';
public static getMenuEntries = 'Services/ERP.svc/REST/GET_MENU_ENTRIES';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
public static getNotCount='Services/ERP.svc/REST/GET_OPEN_NOTIFICATIONS_NUM';
public static disableSession="Services/ERP.svc/REST/DisableSession";
public static detectLanguage='Services/ERP.svc/REST/Get_LanguageAvailable';
constructor(
public authService: AuthenticationService,
public con:ConnectorService
) { }
public getMenu(onError?: any, errorLabel?: string): Observable<MenuResponse> {
const request = new Request();
this.authService.authenticateRequest(request);
return this.con.post(MenuService.getMenu, request, onError, errorLabel);
}
public getMenuEntires(menuEntries:any, onError?: any, errorLabel?: string): Observable<MenuResponse> {
const request = menuEntries;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.getMenuEntries, request, onError, errorLabel);
}
public getNotificationCount(req:any, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.getNotCount, request, onError, errorLabel);
}
public disableSession(req:any, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.disableSession, request, onError, errorLabel);
}
public getAppLanguages(req:any, onError?: any, errorLabel?: string): Observable<any> {
const request = req;
this.authService.authenticateRequest(request);
return this.con.post(MenuService.detectLanguage, request, onError, errorLabel);
}
}

@ -0,0 +1,7 @@
export class ListMenu {
public MENU_ID:number;
public MENU_NAME:string;
public MENU_TYPE:string;
public RESP_ID:number;
public SUB_MENU_NAME:string;
}

@ -0,0 +1,6 @@
import { Request } from '../models/request';
export class MenuEntries extends Request {
public P_MENU_TYPE:string;
public P_SELECTED_EMPLOYEE_NUMBER:string;
public P_SELECTED_RESP_ID:number
}

@ -0,0 +1,9 @@
import { ListMenu } from './list.menu';
import { MenuEntry } from './menu.entry';
export class MenuResponse {
public static SHARED_DATA = 'menu_response';
public static SHARED_SEL_EMP= 'sel_empolyee';
public static SHARED_SEL_RESP_ID= 'sel_resp_id';
public List_Menu:ListMenu;
public GetMenuEntriesList:MenuEntry;
}

@ -0,0 +1,13 @@
export class MenuEntry {
public MENU_NAME:string;
public ADD_BUTTON:string;
public DELETE_BUTTON:string;
public UPDATE_BUTTON:string;
public ENTRY_SEQUENCE:number;
public FUNCTION_NAME:string;
public LVL:number;
public MENU_ENTRY_TYPE:string;
public PARENT_MENU_NAME:string;
public PROMPT:string;
public REQUEST_TYPE:string;
}

@ -0,0 +1,18 @@
export class Request {
public P_USER_NAME: string;
public LanguageID: number;
//public IPAdress: string;
public P_SESSION_ID: number;
public VersionID: number;
public Channel: number;
public P_PASSWORD: string;
public P_MOBILE_NUMBER: string;
public P_EMAIL_ADDRESS: string;
public TokenID:string;
public P_NOTIFICATION_ID:number;
public MobileNumber: string;
public UserName:string;
public LogInTokenID:string;
public MobileType:string;
}

@ -1,19 +1,16 @@
export class Request { export class Request {
public ClinicID: number;
public PatientOutSA: number;
public PatientID: number;
public ProjectID: number;
public LanguageID: number; public LanguageID: number;
public IPAdress: string; public IPAdress: string;
public VersionID: number; public VersionID: number;
public Channel: number; public Channel: number;
public PatientTypeID: number;
public isDentalAllowedBackend: boolean; public isDentalAllowedBackend: boolean;
public IsIrisPrescription: boolean; public IsIrisPrescription: boolean;
public TokenID: string; public TokenID: string;
public SessionID: string;
public MobileType: string; public MobileType: string;
public PatientIdentificationID: string;
public PatientMobileNumber: string;
public BookedBy?: number; public BookedBy?: number;
public P_SESSION_ID: number;
public MobileNumber : string;
public LogInTokenID : string;
public P_USER_NAME:string;
public UserName:string;
} }

@ -174,7 +174,7 @@ export class TranslatorService {
} }
private setCurrentLanguageToDefault() { private setCurrentLanguageToDefault() {
TranslatorService.CURRENT_LANGUAGE = TranslatorService.AR; TranslatorService.CURRENT_LANGUAGE = TranslatorService.EN;
} }
public setCurrentLanguage(language: string) { public setCurrentLanguage(language: string) {
TranslatorService.CURRENT_LANGUAGE = language; TranslatorService.CURRENT_LANGUAGE = language;

@ -12,14 +12,14 @@
<ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge> <ion-badge id="homeBadgeBtn" item-end>{{notBadge}}</ion-badge>
</button> </button>
<div class="centerDiv" (click)="openPersonalInfo()"> <div class="centerDiv" (click)="openPersonalInfo()">
<p class="TxtPlace">{{"home.hello" | translate}}, {{User_name_Emp}}</p> <p class="TxtPlace">{{"userData.hello" | translate}}, {{User_name_Emp}}</p>
<div class="profileDiv"><ion-img class="profileImg" src="{{user_image}}"></ion-img></div> <div class="profileDiv"><ion-img class="profileImg" src="{{user_image}}"></ion-img></div>
</div> </div>
</div> </div>
<div> <div>
<div> <div>
<p class="dash-header text-caps">{{"home.dashboard" | translate}}</p> <p class="dash-header text-caps">{{"userData.dashboard" | translate}}</p>
</div> </div>
<div> <div>
<ion-grid class="cus-grid"> <ion-grid class="cus-grid">

@ -1,46 +1,59 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { MenuController } from '@ionic/angular'; import { MenuController } from "@ionic/angular";
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/models/smscheck.response"; import { SMSCheckResponse } from "src/app/hmg-common/services/authentication/models/smscheck.response";
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user";
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
@Component({ @Component({
selector: 'app-home', selector: "app-home",
templateUrl: './home.page.html', templateUrl: "./home.page.html",
styleUrls: ['./home.page.scss'], styleUrls: ["./home.page.scss"]
}) })
export class HomePage implements OnInit { export class HomePage implements OnInit {
userData: any ={}; userData: any = {};
user_image : any = "../assets/imgs/profile.png"; user_image: any = "../assets/imgs/profile.png";
constructor(public ts: TranslatorService, public menu: MenuController, public authService: AuthenticationService ) { } menuList: any = [];
constructor(
public ts: TranslatorService,
public menu: MenuController,
public authService: AuthenticationService,
public menuService: MenuService,
public common: CommonService
) {}
ngOnInit() { ngOnInit() {
this.getUserDetails(); this.getUserDetails();
this.getMenu();
} }
private openMenu(){
private openMenu() {
this.menu.toggle(); this.menu.toggle();
} }
private getUserDetails(){ private getUserDetails() {
const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { const user = this.authService
.loadAuthenticatedUser()
.subscribe((user: AuthenticatedUser) => {
if (user) { if (user) {
this.userData=user; this.userData = user;
console.log(user); console.log(user);
}else{ } else {
console.log(user); console.log(user);
} }
}) });
}
private getMenu() {
this.menuService.getMenu().subscribe((result: MenuResponse) => {
this.handleMenuResult(result);
});
}
private handleMenuResult(result) {
if (this.common.validResponse(result)) {
if (this.common.hasData(result.List_Menu)) {
this.menuList = result.List_Menu;
}
}
} }
// private getMenu(){
// this.menuService.getMenu().
// subscribe((result: MenuResponse) => {
// this.handleMenuResult(result);
// });
// }
// private handleMenuResult(result){
// if (this.common.validResponse(result)) {
// if (this.common.hasData(result.List_Menu)) {
// this.menuList = result.List_Menu;
// }
// }
} }

@ -139,10 +139,10 @@ ion-header ion-icon.icon.icon-ios.ion-ios-add{
color: (--darkgray); color: (--darkgray);
} }
.toolbar-background { .toolbar-background {
background: (--primary); background: var(--primary);
background: -moz-linear-gradient(45deg, (--primary) 0%, (--secondary) 36%,(--secondary) 59%, (--customnavy) 100%); background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: -webkit-linear-gradient(45deg, (--primary) 0%, (--secondary) 36%,(--secondary) 59%, (--customnavy) 100%); background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
background: linear-gradient(45deg, (--primary) 0%, (--secondary) 36%,(--secondary) 59%, (--customnavy) 100%); background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='var(--primary)', endColorstr='--var(customnavy)',GradientType=1 ); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='var(--primary)', endColorstr='--var(customnavy)',GradientType=1 );
} }
/***************button bckground***************/ /***************button bckground***************/

Loading…
Cancel
Save