Commit 84a85c07 authored by prumde's avatar prumde

Updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174218 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4c347cca
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; import { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
import { LocationStrategy, HashLocationStrategy } from '@angular/common'; import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { FormsModule,ReactiveFormsModule } from '@angular/forms'; import { FormsModule,ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http'; import { HttpModule } from '@angular/http';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import {BBKeyInputModule} from 'base-blocks';
//import { JwtHelper } from 'angular2-jwt'; //For Future //import { JwtHelper } from 'angular2-jwt'; //For Future
import {StoreModule} from '@ngrx/store'; import {StoreModule} from '@ngrx/store';
import {EffectsModule} from '@ngrx/effects'; import {EffectsModule} from '@ngrx/effects';
import { MaterialModule } from '@angular/material';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
...@@ -45,6 +46,11 @@ import { EcmTemplateComponent, EcmTemplateDirective } from './ecm-product-detail ...@@ -45,6 +46,11 @@ import { EcmTemplateComponent, EcmTemplateDirective } from './ecm-product-detail
import { EcmCartComponent, ECMConfirmDialog, CounterComponent } from './ecm-view/ecm-cart/ecm-cart.component'; import { EcmCartComponent, ECMConfirmDialog, CounterComponent } from './ecm-view/ecm-cart/ecm-cart.component';
import { EcmCartService } from './ecm-view/ecm-cart/ecm-cart.service'; import { EcmCartService } from './ecm-view/ecm-cart/ecm-cart.service';
import { ProfileInfoService } from './user-profile/profile-info.service';
import { UserAddressService } from './user-address/ecm-user-address.service';
import { UserReviewService } from './user-review/ecm-user-review.service';
import { UserCardService } from './user-card/ecm-user-card.service';
import { EcmCheckoutService } from './ecm-view/ecm-checkout/ecm-checkout.service';
import { EcmProductReviewService } from './ecm-product-details/ecm-product-review.service'; import { EcmProductReviewService } from './ecm-product-details/ecm-product-review.service';
import { EcmRecentViewComponent } from './ecm-view/ecm-recent-view/ecm-recent-view.component'; import { EcmRecentViewComponent } from './ecm-view/ecm-recent-view/ecm-recent-view.component';
import { EcmReadmoreComponent } from './ecm-view/ecm-readmore/ecm-readmore.component'; import { EcmReadmoreComponent } from './ecm-view/ecm-readmore/ecm-readmore.component';
...@@ -60,10 +66,19 @@ import { EcmProductDetailService } from './ecm-product-details/ecm-product-detai ...@@ -60,10 +66,19 @@ import { EcmProductDetailService } from './ecm-product-details/ecm-product-detai
import { EcmLocationService } from './ecm-search/ecm-location.service'; import { EcmLocationService } from './ecm-search/ecm-location.service';
import reducer from './ecm-store/reducers'; import reducer from './ecm-store/reducers';
import {CartActions, CategoryActions, SubCategoryActions, ItemActions, LocationActions, WishListActions, MenuActions} from './ecm-store/actions'; import {CartActions, CategoryActions, SubCategoryActions, ItemActions, LocationActions, WishListActions, MenuActions,ProfileActions, AdressAction, ReviewAction, SavedCardAction} from './ecm-store/actions';
import {CartEffects, CategoryEffects, SubCategoryEffects, ItemEffects, WishlistEffects, MenuEffects} from './ecm-store/effects'; import {CartEffects, CategoryEffects, SubCategoryEffects, ItemEffects, WishlistEffects, MenuEffects,ProfileEffects, AddressEffects, ReviewsEffects, SavedCardEffects} from './ecm-store/effects';
import { EcmPanelComponent, ECMDialog } from './ecm-view/ecm-panel/ecm-panel.component'; import { EcmPanelComponent, ECMDialog } from './ecm-view/ecm-panel/ecm-panel.component';
import { UserProfileComponent, ProfileEditor, ProfileScreenComponent } from './user-profile';
import { UserAddressComponent, AddressEditor, AddressScreenComponent } from './user-address';
import { UserCardComponent, CardEditor, CardScreenComponent } from './user-card';
import { UserReviewComponent, ReviewEditor, ReviewScreenComponent } from './user-review';
import { MyProfileComponent } from './my-profile/my-profile.component';
import { ChangePasswordComponent } from './change-password/change-password.component';
import { MaterialModule } from './module';
//Changes by Prajyot //Changes by Prajyot
const appRoutes: Routes = [ const appRoutes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' }, { path: '', redirectTo: 'home', pathMatch: 'full' },
...@@ -76,8 +91,16 @@ const appRoutes: Routes = [ ...@@ -76,8 +91,16 @@ const appRoutes: Routes = [
{ path: 'search/:value', component: EcmSearchResultComponent}, { path: 'search/:value', component: EcmSearchResultComponent},
{ path: 'cart', component: EcmCartComponent}, { path: 'cart', component: EcmCartComponent},
{ path: 'checkout', component: EcmCheckoutComponent}, { path: 'checkout', component: EcmCheckoutComponent},
{ path: 'wishlist', component: EcmWishListComponent} { path: 'wishlist', component: EcmWishListComponent},
{ path: 'myprofile', component: MyProfileComponent, children: [
{ path: 'userprofile', component: UserProfileComponent, outlet: 'profile' },
{ path: 'useraddress', component: UserAddressComponent, outlet: 'profile' },
{ path: 'chgpassword', component: ChangePasswordComponent, outlet: 'profile' },
{ path: 'usercard', component: UserCardComponent, outlet: 'profile' },
{ path: 'userreview', component: UserReviewComponent, outlet: 'profile' }]
}
]; ];
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
...@@ -118,7 +141,21 @@ const appRoutes: Routes = [ ...@@ -118,7 +141,21 @@ const appRoutes: Routes = [
RatingComponent, RatingComponent,
EcmWishListComponent, EcmWishListComponent,
EcmPanelComponent, EcmPanelComponent,
ECMDialog ECMDialog,
UserProfileComponent,
UserAddressComponent,
UserCardComponent,
UserReviewComponent,
MyProfileComponent,
ChangePasswordComponent,
AddressEditor,
AddressScreenComponent,
ProfileEditor,
ProfileScreenComponent,
CardEditor,
CardScreenComponent,
ReviewEditor,
ReviewScreenComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
...@@ -134,7 +171,14 @@ const appRoutes: Routes = [ ...@@ -134,7 +171,14 @@ const appRoutes: Routes = [
EffectsModule.run(SubCategoryEffects), EffectsModule.run(SubCategoryEffects),
EffectsModule.run(ItemEffects), EffectsModule.run(ItemEffects),
EffectsModule.run(WishlistEffects), EffectsModule.run(WishlistEffects),
EffectsModule.run(MenuEffects) EffectsModule.run(ProfileEffects),
EffectsModule.run(MenuEffects),
EffectsModule.run(AddressEffects),
EffectsModule.run(ReviewsEffects),
EffectsModule.run(SavedCardEffects),
FormsModule,
BrowserAnimationsModule,
BBKeyInputModule
], ],
providers: [ providers: [
{provide: LocationStrategy, useClass: HashLocationStrategy}, {provide: LocationStrategy, useClass: HashLocationStrategy},
...@@ -148,13 +192,19 @@ const appRoutes: Routes = [ ...@@ -148,13 +192,19 @@ const appRoutes: Routes = [
CategoryActions, CategoryActions,
EcmSubCategoryService, EcmSubCategoryService,
SubCategoryActions, SubCategoryActions,
ProfileInfoService,
UserAddressService,
UserReviewService,
UserCardService,
ItemActions, ItemActions,
EcmProductService, EcmProductService,
EcmProductDetailService, EcmProductDetailService,
LocationActions, LocationActions,
EcmLocationService, EcmLocationService,
WishListActions, WishListActions,
MenuActions MenuActions,
ProfileActions,
AdressAction, ReviewAction, SavedCardAction
], ],
entryComponents: [ entryComponents: [
EcmOutingComponent, EcmOutingComponent,
...@@ -165,7 +215,8 @@ const appRoutes: Routes = [ ...@@ -165,7 +215,8 @@ const appRoutes: Routes = [
ECMWriteReviewDialog, ECMWriteReviewDialog,
ECMDialog ECMDialog
], ],
bootstrap: [AppComponent], schemas:[CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
schemas: [NO_ERRORS_SCHEMA] bootstrap: [AppComponent]
}) })
export class AppModule { } export class AppModule { }
...@@ -146,6 +146,20 @@ export class EcmBreadcrumbsComponent implements OnInit { ...@@ -146,6 +146,20 @@ export class EcmBreadcrumbsComponent implements OnInit {
}); });
} }
if ( this.pageName == 'USERPROFILE' ) {
this.breadcrumbs = [];
this.breadcrumbs.push( {
label: 'Home',
url: '/home'
});
this.breadcrumbs.push( {
label: 'My Profile',
url: 'javascript:void(0)'
});
}
} }
backClicked() { backClicked() {
......
...@@ -31,8 +31,10 @@ Overlay End --> ...@@ -31,8 +31,10 @@ Overlay End -->
<section class="header-section visible"> <section class="header-section visible">
<div class="input-container-bg" [@fadeState]="headerFadeState"></div> <div class="input-container-bg" [@fadeState]="headerFadeState"></div>
<div class="input-container"> <div class="input-container">
<img *ngIf="userData" mdTooltip="Click here to Manage Account" [mdTooltipPosition]="'below'" (click)="userAction();" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/w_user_128_128.png'; " class="user-adj user-image-128" title= "{{userData.name}}" [@userState]="headerFadeState" /> <span>
<img *ngIf="!userData" mdTooltip="Click here for Login" [mdTooltipPosition]="'below'" (click)="userAction();" class="img-user user-adj" [@userState]="headerFadeState" src="w_user_128_128.png"/> <img *ngIf="userData" (click)="userAction();" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/w_user_128_128.png'; " class="user-adj user-image-128" title= "{{userData.name}}" [@userState]="headerFadeState" />
<img *ngIf="!userData" (click)="userAction();" class="img-user user-adj" [@userState]="headerFadeState" src="w_user_128_128.png"/>
</span>
<div class="row"> <div class="row">
<div class="small-12 medium-10 large-10 medium-centered column"> <div class="small-12 medium-10 large-10 medium-centered column">
<img class="img-logo logo-adj" [@l2dLogoTrans]="headerFadeState" src="logo.png" /> <img class="img-logo logo-adj" [@l2dLogoTrans]="headerFadeState" src="logo.png" />
...@@ -47,7 +49,7 @@ Overlay End --> ...@@ -47,7 +49,7 @@ Overlay End -->
</ng-template> </ng-template>
<ng-template #fixedHeader> <ng-template #fixedHeader>
<div *ngIf="clientWidth > 640" > <div *ngIf="clientWidth >= 640" >
<ng-container *ngTemplateOutlet="fixedHeaderLarge"></ng-container> <ng-container *ngTemplateOutlet="fixedHeaderLarge"></ng-container>
</div> </div>
<div *ngIf="clientWidth < 639" > <div *ngIf="clientWidth < 639" >
...@@ -65,18 +67,18 @@ Overlay End --> ...@@ -65,18 +67,18 @@ Overlay End -->
<img class="fixed-header-logo img-logo-32" src="logo_32_32.svg" /> <img class="fixed-header-logo img-logo-32" src="logo_32_32.svg" />
<span class="siteHeading">{{siteHeading}}</span> <span class="siteHeading">{{siteHeading}}</span>
<ecm-search [compFadeState]="headerFadeState" [headerState]="'fixed'"></ecm-search> <ecm-search [compFadeState]="headerFadeState" [headerState]="'fixed'"></ecm-search>
<span (click)="cartAction();" > <span (click)="cartAction();" mdTooltip="Show Cart" [mdTooltipPosition]="'below'" >
<button md-button class="square-button"> <button md-button class="square-button">
<span *ngIf="(cartItems | async)?.length!=0" class="fixed-header-badge">{{(cartItems | async)?.length}}</span> <span *ngIf="(cartItems | async)?.length!=0" class="fixed-header-badge">{{(cartItems | async)?.length}}</span>
<img mdTooltip="Show Cart" [mdTooltipPosition]="'below'" class="fixed-header-cart img-cart-32" src="cart_32_32.svg"/> <img class="fixed-header-cart img-cart-32" src="cart_32_32.svg"/>
<!-- <img *ngIf="cartItems == 0" class="fixed-header-cart img-cart-32 no-badge" /> --> <!-- <img *ngIf="cartItems == 0" class="fixed-header-cart img-cart-32 no-badge" /> -->
<!--<md-icon class="example-icon">shopping_cart</md-icon>--> <!--<md-icon class="example-icon">shopping_cart</md-icon>-->
</button> </button>
</span> </span>
<span (click)="userAction();" > <span (click)="userAction();" [mdTooltip]="userToolTipText" [mdTooltipPosition]="'below'">
<button md-button class="square-button"> <button md-button class="square-button">
<img *ngIf="userData" mdTooltip="Click here to Manage Account" [mdTooltipPosition]="'below'" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/> <img *ngIf="userData" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/>
<img *ngIf="!userData" mdTooltip="Click here for Login" [mdTooltipPosition]="'below'" class="fixed-header-no-user img-user-32" src="user_32_32.svg"/> <img *ngIf="!userData" class="fixed-header-no-user img-user-32" src="user_32_32.svg"/>
<!--<md-icon class="example-icon">account_circle</md-icon>--> <!--<md-icon class="example-icon">account_circle</md-icon>-->
</button> </button>
</span> </span>
...@@ -98,18 +100,18 @@ Overlay End --> ...@@ -98,18 +100,18 @@ Overlay End -->
<i class="material-icons mobile-search">search</i> <i class="material-icons mobile-search">search</i>
</button> </button>
</span> </span>
<span (click)="cartAction();" > <span (click)="cartAction();" mdTooltip="Show Cart" [mdTooltipPosition]="'below'" >
<button md-button class="square-button"> <button md-button class="square-button">
<span *ngIf="cartCounter > 0" class="fixed-header-badge">{{ cartCounter }}</span> <span *ngIf="cartCounter > 0" class="fixed-header-badge">{{ cartCounter }}</span>
<img mdTooltip="Show Cart" [mdTooltipPosition]="'below'" class="fixed-header-cart img-cart-32" src="cart_32_32.svg"/> <img class="fixed-header-cart img-cart-32" src="cart_32_32.svg"/>
<!-- <img *ngIf="cartItems == 0" class="fixed-header-cart img-cart-32 no-badge" /> --> <!-- <img *ngIf="cartItems == 0" class="fixed-header-cart img-cart-32 no-badge" /> -->
<!--<md-icon class="example-icon">shopping_cart</md-icon>--> <!--<md-icon class="example-icon">shopping_cart</md-icon>-->
</button> </button>
</span> </span>
<span (click)="userAction();" > <span (click)="userAction();" [mdTooltip]="userToolTipText" [mdTooltipPosition]="'below'" >
<button md-button class="square-button"> <button md-button class="square-button">
<img *ngIf="userData" mdTooltip="Click here to Manage Account" [mdTooltipPosition]="'below'" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/> <img *ngIf="userData" [src]="profileImageLink" onerror="this.src = '/ecm/assets/images/svg/user_32_32.svg'; this.className = 'fixed-header-no-user'" title="{{userData.name}}" [ngClass]="( userImage.src.indexOf('/ibase/') > 0 ) ? 'fixed-header-user' : 'fixed-header-no-user' " #userImage/>
<img *ngIf="!userData" mdTooltip="Click here for Login" [mdTooltipPosition]="'below'" class="fixed-header-no-user img-user-32" src="user_32_32.svg"/> <img *ngIf="!userData" class="fixed-header-no-user img-user-32" src="user_32_32.svg"/>
<!--<md-icon class="example-icon">account_circle</md-icon>--> <!--<md-icon class="example-icon">account_circle</md-icon>-->
</button> </button>
</span> </span>
......
...@@ -85,6 +85,8 @@ export class ECMHeaderComponent implements OnInit, OnDestroy { ...@@ -85,6 +85,8 @@ export class ECMHeaderComponent implements OnInit, OnDestroy {
@ViewChild( 'userImage' ) userImage: ElementRef; @ViewChild( 'userImage' ) userImage: ElementRef;
@ViewChild( 'ecmPanel' ) ecmPanel: EcmPanelComponent; @ViewChild( 'ecmPanel' ) ecmPanel: EcmPanelComponent;
userToolTipText : string;
selectedOption: string; selectedOption: string;
userData: any; userData: any;
sideOption: any; sideOption: any;
...@@ -115,11 +117,13 @@ export class ECMHeaderComponent implements OnInit, OnDestroy { ...@@ -115,11 +117,13 @@ export class ECMHeaderComponent implements OnInit, OnDestroy {
{ {
this.userData = JSON.parse( userInfo ); this.userData = JSON.parse( userInfo );
this.profileImageLink = this.userData.profileImageLink; this.profileImageLink = this.userData.profileImageLink;
this.userToolTipText = "Click here to Manage Account";
} }
else else
{ {
this.userData = null; this.userData = null;
this.profileImageLink = ""; this.profileImageLink = "";
this.userToolTipText = "Click here for Login";
} }
console.log( 'ECMHeaderComponent getUserInfo ::' + userInfo + ' \n this.userData :: ' + this.userData ); console.log( 'ECMHeaderComponent getUserInfo ::' + userInfo + ' \n this.userData :: ' + this.userData );
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div class="my-menu-list"> <div class="my-menu-list">
<div class="nav-my-profile"> <div class="nav-my-profile">
<img class="ecm-user-icon" src="/ecm/assets/images/svg/user.svg" /> <img class="ecm-user-icon" src="/ecm/assets/images/svg/user.svg" />
<span class="menu-title">My Profile</span> <span class="menu-title" [routerLink]="['/myprofile']">My Profile</span>
</div> </div>
<div class="nav-orders"> <div class="nav-orders">
<img class="ecm-order-icon" src="/ecm/assets/images/svg/order.svg" /> <img class="ecm-order-icon" src="/ecm/assets/images/svg/order.svg" />
......
...@@ -32,7 +32,8 @@ export class EcmLocationService { ...@@ -32,7 +32,8 @@ export class EcmLocationService {
response => { response => {
if(response.status == 200){ if(response.status == 200){
let data = response.json(); let data = response.json();
console.log('geolocate -- data.......'+ JSON.stringify(data) ); console.log('geolocate -- data.......'+ JSON.stringify(data) );
console.log("the respective location data id"+data);
this.displayLocation(data); this.displayLocation(data);
} }
}, },
...@@ -84,9 +85,16 @@ export class EcmLocationService { ...@@ -84,9 +85,16 @@ export class EcmLocationService {
{ {
var resultObject = this.find("locality", data.results[0].address_components); var resultObject = this.find("locality", data.results[0].address_components);
//this.city = resultObject.long_name; //this.city = resultObject.long_name;
ecmLocation.city = resultObject.long_name; ecmLocation.city = resultObject.long_name;
//this.add = data.results[0].formatted_address; //this.add = data.results[0].formatted_address;
ecmLocation.address = data.results[0].formatted_address; ecmLocation.address = data.results[0].formatted_address;
ecmLocation.state = data.results[0].address_components[7].long_name;
ecmLocation.country = data.results[0].address_components[8].long_name;
ecmLocation.pincode = data.results[0].address_components[9].long_name;
console.log("----------");
console.log("start of a resultObject"+JSON.stringify(resultObject))
console.log("----------");
} }
//this.store.dispatch(this.locationAction.resetBlankLocation()); //this.store.dispatch(this.locationAction.resetBlankLocation());
......
...@@ -2,10 +2,12 @@ export class EcmLocation { ...@@ -2,10 +2,12 @@ export class EcmLocation {
public latitude : string; public latitude : string;
public longitude : string; public longitude : string;
public address: string; public address: string;
public pincode: number; public pincode: string;
public city: string; public city: string;
public country: string;
public state: string;
public toString(){ public toString(){
return "[" + this.latitude + "][" + this.longitude + "][" + this.address + "][" + this.pincode + "][" + this.city + "]"; return "[" + this.latitude + "][" + this.longitude + "][" + this.address + "][" + this.pincode + "][" + this.city + "][" + this.country + "][" + this.state + "]";
} }
} }
<form *ngIf="headerState === 'relative'" id="search-form" [@searchInputTrans]="compFadeState"> <form *ngIf="headerState === 'relative'" id="search-form" [@searchInputTrans]="compFadeState">
<span class="search-page-border"> <span class="search-page-border">
<input #myInput type="text" placeholder="Search Food, Tour, Events and More..." class="search-terms" name="search-terms" [formControl]="stateCtrl" [mdAutocomplete]="auto" /> <input #myInput type="text" placeholder="Search Food, Tour, Events and More..." class="search-terms" name="search-terms" [formControl]="stateCtrl" [mdAutocomplete]="auto" />
<md-autocomplete #auto="mdAutocomplete"> <md-autocomplete #auto>
<md-option *ngFor="let option of filteredOptions" [innerHTML]="option.term" [value]="option.term" (click)="search(option.term)" (onSelect)="search(option.term)"> <md-option *ngFor="let option of filteredOptions" [innerHTML]="option.term" [value]="option.term" (click)="search(option.term)" (onSelect)="search(option.term)">
</md-option> </md-option>
</md-autocomplete> </md-autocomplete>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<form> <form>
<input #myInput type="text" placeholder="Search Food, Tour, Events and More..." class="search-terms-fixed" value="" name="search" id="search" [formControl]="stateCtrl" [mdAutocomplete]="auto" /> <input #myInput type="text" placeholder="Search Food, Tour, Events and More..." class="search-terms-fixed" value="" name="search" id="search" [formControl]="stateCtrl" [mdAutocomplete]="auto" />
<md-autocomplete #auto="mdAutocomplete"> <md-autocomplete #auto>
<md-option *ngFor="let option of filteredOptions" [innerHTML]="option.term" [value]="option.term" (click)="search(option.term)" (onSelect)="search(option.term)"> <md-option *ngFor="let option of filteredOptions" [innerHTML]="option.term" [value]="option.term" (click)="search(option.term)" (onSelect)="search(option.term)">
</md-option> </md-option>
</md-autocomplete> </md-autocomplete>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<i mdSuffix class="material-icons mobile-search" (click)="search(myInput.value)">search</i> <i mdSuffix class="material-icons mobile-search" (click)="search(myInput.value)">search</i>
</md-input-container> </md-input-container>
<md-autocomplete #auto="mdAutocomplete"> <md-autocomplete #auto>
<md-option *ngFor="let option of filteredOptions" [innerHTML]="option.term" [value]="option.term" (click)="search(option.term)" (onSelect)="search(option.term)"> <md-option *ngFor="let option of filteredOptions" [innerHTML]="option.term" [value]="option.term" (click)="search(option.term)" (onSelect)="search(option.term)">
</md-option> </md-option>
</md-autocomplete> </md-autocomplete>
......
...@@ -201,6 +201,7 @@ export class EcmSigninComponent implements OnInit { ...@@ -201,6 +201,7 @@ export class EcmSigninComponent implements OnInit {
{ {
this.userData = JSON.parse( result.Response.results ); this.userData = JSON.parse( result.Response.results );
this.userData.jti = this._username; this.userData.jti = this._username;
this.userData.profileImageLink = "/ibase/resource/images/users/" + this._username + ".png?temp=" + Math.random();
//Fetch User Data and Store in cache //Fetch User Data and Store in cache
this.signinService.fetchUserData().subscribe( this.signinService.fetchUserData().subscribe(
......
...@@ -438,6 +438,16 @@ h6 ...@@ -438,6 +438,16 @@ h6
padding: 0px 20px; padding: 0px 20px;
padding-top: 40px; padding-top: 40px;
} }
.changePass-userProfile{
padding: 0px;
padding-top: 0px;
}
.successFormscreen{
top: 40%;
color: mediumvioletred;
}
/* Change Password End */ /* Change Password End */
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
<div *ngIf="activeScreen == 'changePwdScreen'" > <div *ngIf="activeScreen == 'changePwdScreen'" >
<ng-container *ngTemplateOutlet="changePwdScreen"></ng-container> <ng-container *ngTemplateOutlet="changePwdScreen"></ng-container>
</div> </div>
<div class="successFormscreen" *ngIf="activeScreen == 'successForm' && fullProfile">
<span>Password change successfully</span>
</div>
<ng-template #userInfoScreen> <ng-template #userInfoScreen>
<div class="user-option"> <div class="user-option">
...@@ -34,12 +37,12 @@ ...@@ -34,12 +37,12 @@
<div class="user-info-section"> <div class="user-info-section">
<div> <div>
<div class="user-profile-image" titile="Profile"> <div class="user-profile-image" titile="Profile">
<img [src]="userData.profileImageLink" onerror="this.src = '/ecm/assets/images/w_user_128_128.png'; " class="profile-image profile-image-128" title="{{userData.name}}" /> <img [src]="userData.profileImageLink" onerror="this.src = '/ecm/assets/images/w_user_128_128.png'; " class="profile-image profile-image-128" title="{{userData.NAME}}" />
</div> </div>
<i class="image-edit-icon" (click)="openDialog();"></i> <i class="image-edit-icon" (click)="openDialog();"></i>
</div> </div>
<span class="user-prof-name"> {{userData.EMP_NAME}}</span> <span class="user-prof-name"> {{userData.NAME}}</span>
<span class="user-prof-email"> {{userData.EMAIL_ID_OFF}} </span> <span class="user-prof-email"> {{userData.EMAIL_ID}} </span>
</div> </div>
<div class="user-profile-location-section"> <div class="user-profile-location-section">
<div class="user-profile-location" *ngIf="userLocation.address">{{userLocation.address}}</div> <div class="user-profile-location" *ngIf="userLocation.address">{{userLocation.address}}</div>
...@@ -58,8 +61,10 @@ ...@@ -58,8 +61,10 @@
<ng-template #changePwdScreen> <ng-template #changePwdScreen>
<div class="changePass-form"> <!-- <div [ngClass]="!fullProfile ? 'changePass-userProfile' : 'changePass-form'">
<span class="chg-password-header">Change Password</span> <h4 *ngIf="!fullProfile">Change Password</h4> -->
<div class="changePass-form">
<h4 *ngIf="!fullProfile">Change Password</h4>
<form #changePass="ngForm" (ngSubmit)="changePassword(changePass);" novalidate autocomplete="off"> <form #changePass="ngForm" (ngSubmit)="changePassword(changePass);" novalidate autocomplete="off">
<md-input-container class="password-input-container" [hideRequiredMarker] = "true"> <md-input-container class="password-input-container" [hideRequiredMarker] = "true">
<input mdInput class="username-input" placeholder="Current Password" required name="cpassword" [(ngModel)]="_current_password" #current_password="ngModel" (keydown)="clearTimer();" type = 'password' <input mdInput class="username-input" placeholder="Current Password" required name="cpassword" [(ngModel)]="_current_password" #current_password="ngModel" (keydown)="clearTimer();" type = 'password'
......
...@@ -30,7 +30,9 @@ export class EcmUserOptionComponent implements OnInit { ...@@ -30,7 +30,9 @@ export class EcmUserOptionComponent implements OnInit {
selectedOption: string; selectedOption: string;
contentPluginViewUI: any; contentPluginViewUI: any;
userData: any; userData: any;
activeScreen : string = 'userInfoScreen'; @Input('activeScreen') activeScreen : string = 'userInfoScreen';
@Input('fullProfile') fullProfile : boolean = false;
_current_password: string; _current_password: string;
_new_password: string; _new_password: string;
_confirm_password: string; _confirm_password: string;
...@@ -137,6 +139,7 @@ export class EcmUserOptionComponent implements OnInit { ...@@ -137,6 +139,7 @@ export class EcmUserOptionComponent implements OnInit {
if ( result.Response.status == 'success' ) { if ( result.Response.status == 'success' ) {
console.log( 'Logging Out' ); console.log( 'Logging Out' );
alert(result.Response.results); alert(result.Response.results);
this.activeScreen = 'successForm';
this.userData = null; this.userData = null;
//TODO Load Login Screen //TODO Load Login Screen
this.closePanel.emit(); this.closePanel.emit();
......
...@@ -496,8 +496,9 @@ md-card { ...@@ -496,8 +496,9 @@ md-card {
float: inherit !important; float: inherit !important;
display: block !important; display: block !important;
position: relative !important; position: relative !important;
padding: 20px; /* padding: 20px; */
padding-left: calc(25% + 15px); /* padding-left: calc(25% + 15px); */
padding-left: calc(25% + 9px);
} }
.items-cost-rate { .items-cost-rate {
text-align: left !important; text-align: left !important;
......
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule} from '@angular/core';
import {OverlayModule} from '@angular/cdk/overlay';
import {A11yModule} from '@angular/cdk/a11y';
import {BidiModule} from '@angular/cdk/bidi';
import {ObserversModule} from '@angular/cdk/observers';
import {PortalModule} from '@angular/cdk/portal';
import {MdCommonModule, MdRippleModule, PlatformModule, StyleModule, MdNativeDateModule } from '@angular/material/core';
import {MdButtonToggleModule} from '@angular/material/button-toggle';
import {MdButtonModule} from '@angular/material/button';
import {MdCheckboxModule} from '@angular/material/checkbox';
import {MdRadioModule} from '@angular/material/radio';
import {MdSelectModule} from '@angular/material/select';
import {MdSlideToggleModule} from '@angular/material/slide-toggle';
import {MdSliderModule} from '@angular/material/slider';
import {MdSidenavModule} from '@angular/material/sidenav';
import {MdListModule} from '@angular/material/list';
import {MdGridListModule} from '@angular/material/grid-list';
import {MdCardModule} from '@angular/material/card';
import {MdChipsModule} from '@angular/material/chips';
import {MdIconModule} from '@angular/material/icon';
import {MdProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MdProgressBarModule} from '@angular/material/progress-bar';
import {MdInputModule} from '@angular/material/input';
import {MdSnackBarModule} from '@angular/material/snack-bar';
import {MdTabsModule} from '@angular/material/tabs';
import {MdToolbarModule} from '@angular/material/toolbar';
import {MdTooltipModule} from '@angular/material/tooltip';
import {MdMenuModule} from '@angular/material/menu';
import {MdDialogModule} from '@angular/material/dialog';
import {MdAutocompleteModule} from '@angular/material/autocomplete';
import {MdDatepickerModule} from '@angular/material/datepicker';
import {MdExpansionModule} from '@angular/material/expansion';
import {MdTableModule} from '@angular/material/table';
import {MdSortModule} from '@angular/material/sort';
import {MdPaginatorModule} from '@angular/material/paginator';
import {MdFormFieldModule} from '@angular/material/form-field';
const MATERIAL_MODULES = [
MdAutocompleteModule,
MdButtonModule,
MdButtonToggleModule,
MdCardModule,
MdChipsModule,
MdCheckboxModule,
MdDatepickerModule,
MdTableModule,
MdDialogModule,
MdExpansionModule,
MdFormFieldModule,
MdGridListModule,
MdIconModule,
MdInputModule,
MdListModule,
MdMenuModule,
MdPaginatorModule,
MdProgressBarModule,
MdProgressSpinnerModule,
MdRadioModule,
MdRippleModule,
MdSelectModule,
MdSidenavModule,
MdSliderModule,
MdSlideToggleModule,
MdSnackBarModule,
MdSortModule,
MdTabsModule,
MdToolbarModule,
MdTooltipModule,
OverlayModule,
PortalModule,
BidiModule,
StyleModule,
A11yModule,
PlatformModule,
MdCommonModule,
ObserversModule,
MdNativeDateModule
];
/** @deprecated */
@NgModule({
imports: MATERIAL_MODULES,
exports: MATERIAL_MODULES,
})
export class MaterialModule {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment