Commit 518de18b authored by kpandey's avatar kpandey

updated

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174820 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cdd80f34
......@@ -29,6 +29,8 @@ import { MdDialog, MdDialogRef, MdDialogConfig, MD_DIALOG_DATA } from '@angular/
import { EcmPanelComponent } from '../ecm-view/ecm-panel/ecm-panel.component';
import { Breadcrumbs } from '../ecm-breadcrumbs/ecm-breadcrumbs.component';
import { EcmCheckoutService } from '../ecm-view/ecm-checkout/ecm-checkout.service';
export const ECM_TEMPLATES: any = {
'ecm-outing' : new EcmTemplateItem(EcmOutingComponent),
'ecm-food' : new EcmTemplateItem(EcmFoodComponent),
......@@ -59,7 +61,7 @@ export class EcmProductDetailsComponent implements OnInit {
attribVal;
attribCode;
constructor(private route: ActivatedRoute, private router:Router, public productDetailService: EcmProductDetailService, public snackBar: MdSnackBar, private store: Store<AppState>, private productreviewService: EcmProductReviewService, public dialog: MdDialog, private cartActions: CartActions, private itemAction:ItemActions, private wishListAction:WishListActions, public breadcrumbSerivce: Breadcrumbs) { }
constructor(private route: ActivatedRoute, private router:Router, public productDetailService: EcmProductDetailService, public snackBar: MdSnackBar, private store: Store<AppState>, private productreviewService: EcmProductReviewService, public dialog: MdDialog, private cartActions: CartActions, private itemAction:ItemActions, private wishListAction:WishListActions, public breadcrumbSerivce: Breadcrumbs, public checkOutService: EcmCheckoutService) { }
ngOnInit() {
this.clientWidth = document.documentElement.clientWidth;
......@@ -162,10 +164,11 @@ export class EcmProductDetailsComponent implements OnInit {
this.showSnackbar('Book Now - Redirect to Checkout');
}
else if( activity == 'BUY_NOW' ) {
if( !data.isAddToCart ) { //ADD TO CART
this.addToCart(data.item);
this.showSnackbar('Item Added to your Cart');
}
// if( !data.isAddToCart ) { //ADD TO CART
// this.addToCart(data.item);
// this.showSnackbar('Item Added to your Cart');
// }
this.checkOutService.setItem(data.item);
this.router.navigate(['/checkout']);
}
else if(activity == 'SHOW_SIGNIN_PANEL'){
......
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