Commit a64c43c9 authored by prumde's avatar prumde

Updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174183 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4f2945c8
......@@ -88,5 +88,19 @@ export class EcmProductDetailService {
console.log( error.json() );
});
}
removeFromWishlist(itemCode) {
console.log( "removeFromWishlist Called" );
let headers = new Headers( { 'Content-Type': 'application/json' });
let options = new RequestOptions( { headers: headers });
this.http.delete('/ecm/service/feeds/wishlist/'+itemCode, options)
.subscribe( data => {
console.log( "removed from wishList" );
}, error => {
console.log( error.json() );
});
}
}
......@@ -192,17 +192,16 @@ export class EcmProductDetailsComponent implements OnInit {
);
}
addToWishlist(itemCode) {
// this.store.dispatch({ type: INCREMENT, payload: cartData });
this.productDetailService.addToWishlist(itemCode);
addToWishlist( itemCode ) {
this.productDetailService.addToWishlist( itemCode );
}
removeFromWishlist(itemCode){
removeFromWishlist( itemCode ) {
this.productDetailService.removeFromWishlist( itemCode );
}
showSnackbar(message) {
this.snackBar.open(message, '', {duration: 2000});
showSnackbar( message ) {
this.snackBar.open( message, '', { duration: 2000 });
}
storeCatSubcat()
......
......@@ -3,11 +3,11 @@
<span class="recent-view-title"> Recently Viewed </span>
</div>
<div class="recent-view-items">
<div *ngFor="let item of recentViewItems | slice:0:show; let i=index" class="ecm-recent-view-card" (click)="viewItem(item.itemCode)">
<div class="media-object-section product-image">
<div *ngFor="let item of recentViewItems | slice:0:show; let i=index" class="ecm-recent-view-card row" (click)="viewItem(item.itemCode)">
<div class="product-image medium-6 large-4 columns">
<ecm-image [refId]='item.itemCode' [refSer]="'M-ITEM'" [object]="'ITEM'" [isSingleImage] = "true" [isThumbnail]="true"></ecm-image>
</div>
<div class="media-object-section">
<div class="product-data medium-6 large-8 columns">
<span class="item-descr">{{item.descr}}</span>
<span class="item-cost">Rs. {{item.costRate}}</span>
</div>
......
......@@ -81,8 +81,14 @@
width: 40px;
}
.small-star-rating {
font-size: 18px;
color: rgb(500, 150, 50);
}
.small-empty-star-rating {
font-size: 18px;
}
......
<span *ngIf="rate >= 0">
<span *ngIf="rate >= 0 && !isSmallRatings">
<span [ngClass]="isResponsive ? 'resp-rating' : 'fixed-rating'">
<span *ngFor="let a of range; let i = index" class="star-ratings">
<i *ngIf="isResponsive" class="material-icons resp-star" (click)="update(a)" [ngClass]="a <= rate ? 'star-rating' : 'empty-star-rating'"> &#xE885; </i>
......@@ -25,4 +25,10 @@
</table>
</div>
<span *ngIf="isSmallRatings">
<span class="fixed-rating">
<span *ngFor="let a of range; let i = index" class="star-ratings">
<i class="material-icons" [ngClass]="i < rate ? 'small-star-rating' : 'small-empty-star-rating'"> &#xE885; </i>
</span>
</span>
</span>
......@@ -12,6 +12,7 @@ export class RatingComponent implements OnInit {
@Input() rate:number;
@Input() isResponsive = false;
@Input() ratingDetail;
@Input() isSmallRatings;
@Output() updateRate= new EventEmitter();
@Output() filterBy= new EventEmitter();
totalRatings = 0;
......
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