Commit 96ae6741 authored by prumde's avatar prumde

Changes as per new layout


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174384 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 45b94635
/*
.recentView-section {
margin-top: 50px;
margin-top: 70px;
height: 600px;
background-color: #F2F2F2;
}
......@@ -27,4 +28,61 @@
padding-top: 15px;
padding-bottom: 50px;
}
*/
.ecm-recent-view {
width: 300px;
position: absolute;
left: calc(100% - 345px);
margin: 30px 15px 30px 15px;
}
.product-image {
width: 110px;
height: 110px;
}
hr {
margin: 0px 0px 50px 0px;
}
.recent-view-title {
margin-left: 50px;
margin-right: 50px;
text-align: center;
display: block;
height: 40px;
width: 160px;
line-height: 40px;
border-bottom: thin solid mediumvioletred;
}
.ecm-recent-view-card {
padding-bottom: 30px;
}
.item-descr {
display: block;
color: #444;
font-size: 15px;
}
.item-cost {
display: block;
padding-top: 10px;
font-size: 15px;
font-weight: bold;
}
.view-all-section {
text-align: center;
padding-top: 30px;
}
.view-all-button {
color: mediumvioletred;
font-size: 14px;
font-weight: bold;
cursor: pointer;
}
<div *ngIf="recentViewItems">
<section class="recentView-section">
<div class="row row-category">
<div class="ecm-section-info">
<span class="ecm-section-info-title">Recently Viewed</span>
<md-card *ngIf="recentViewItems && recentViewItems.length " class="media-object stack-for-small ecm-recent-view" id='recentViewCard'>
<div>
<span class="recent-view-title"> Recently Viewed </span>
</div>
<ecm-carousel [cardItems]="recentViewItems" ></ecm-carousel>
<hr>
<div *ngFor="let item of recentViewItems | slice:0:show; let i=index" class="ecm-recent-view-card">
<div class="media-object-section product-image">
<ecm-image [refId]='item.itemCode' [refSer]="'M-ITEM'" [object]="'ITEM'" ></ecm-image>
</div>
</section>
</div>
\ No newline at end of file
<div class="media-object-section">
<span class="item-descr">{{item.descr}}</span>
<span class="item-cost"> ₹ {{item.costRate}}</span>
</div>
</div>
<div class="view-all-section" *ngIf="recentViewItems.length > 3 && show == 3" (click)="show = recentViewItems.length">
<span class="view-all-button">View All {{recentViewItems.length}} Items </span>
</div>
</md-card>
\ No newline at end of file
......@@ -2,9 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { EcmRecentViewService } from './ecm-recent-view.service';
import { Item } from '../../ecm-model/product-model';
declare var reinitFlickity: any;
import { ItemDetail } from '../../ecm-model/product-detail-model';
@Component( {
selector: 'ecm-recent-view',
......@@ -16,6 +14,8 @@ export class EcmRecentViewComponent implements OnInit {
recentViewItems: Item[];
errorMessage: string;
show = 3;
constructor( public recentviewService: EcmRecentViewService ) { }
ngOnInit() {
......@@ -24,10 +24,10 @@ export class EcmRecentViewComponent implements OnInit {
getRecentViewItems() {
this.recentviewService.getRecentViewItems().subscribe(
reviewItems => {
this.recentViewItems = reviewItems;
reinitFlickity();
console.log( 'comp trendingItems[' + JSON.stringify( reviewItems ) + '] \n this.trendingItems[' + JSON.stringify( this.recentViewItems ) + ']' );
recentViewItems => {
console.log('recentViewItems.length >> ' + recentViewItems.length);
this.recentViewItems = recentViewItems;
console.log( 'comp recentItems[' + JSON.stringify( recentViewItems ) + '] \n this.trendingItems[' + JSON.stringify( this.recentViewItems ) + ']' );
},
error => {
this.errorMessage = <any>error;
......@@ -35,7 +35,7 @@ export class EcmRecentViewComponent implements OnInit {
});
}
public doDestroy(itemCode: string) {
this.recentviewService.storeRecentViewItem(itemCode);
public doDestroy( itemCode: string ) {
this.recentviewService.storeRecentViewItem( itemCode );
}
}
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