Commit 54c96591 authored by prumde's avatar prumde

Updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174407 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 71082cc6
<md-card class="product-detail-card">
<div class="row">
<div class="row">
<!-- ------------------------HANDICRAFT-IMAGE START HERE-------------------------------- -->
<div class="small-12 medium-6 large-6 columns image">
<div class="md-card-image">
......@@ -9,10 +9,8 @@
</div>
</div>
<!-- ------------------------HANDICRAFT-IMAGE ENDS HERE-------------------------------- -->
<!-- ----------------------HANDICRAFT-DETAILS START HERE-------------------------------- -->
<div class="small-12 medium-6 large-6 columns head">
<!-- <md-card> -->
<md-card-content>
<div>
<div _ngcontent-c30="" class="ecm-share">
......@@ -23,12 +21,8 @@
<span class="item-descr"> {{itemDetail.itemHeader.itemDescr}} </span>
<span class="sold-by-title">
Sold by
</span>
<span class="seller-name">
{{itemDetail.itemDetail1.sellerInfo.name}}
</span><br>
<span class="sold-by-title">Sold by</span>
<span class="seller-name">{{itemDetail.itemDetail1.sellerInfo.name}}</span><br>
<a (click)="scrollToReviews.emit();" class="link-reviews">
<span *ngIf="itemDetail.itemRatings.AVG_RATING == 0 && itemDetail.itemRatings.NO_OF_REVIEWS == 0 " style="color: #444; font-size: 18px;">
......@@ -63,9 +57,7 @@
</div>
<div class="row">
<div class="small-6 medium-12 large-6 columns short-detail">
<div class="details-title">
Details
</div>
<div class="details-title">Details</div>
<div class="item-detail-1">
<ul>
<li>Material: {{itemDetail.itemDetail1.shortDetails.material}}</li>
......@@ -79,16 +71,12 @@
<div class="small-6 medium-12 large-6 columns">
<div>
<div class="Available">
Delivery
</div>
<div class="Available">Delivery</div>
<div class="Available" style="font-size: 15px;">
<div>
<span>
<span class="available-title">
Available
</span>
<span> at {{itemDetail.itemDetail1.location}} </span>
<span class="available-title">Available</span>
<span> at {{itemDetail.itemDetail1.location}}</span>
</span>
<button type="button" onclick="()" class="md-button link_button" >Change
<i class="material-icons arrow ">&#xE313;</i>
......@@ -99,21 +87,17 @@
</div>
<br>
<div>
<div class="service-title">
Service
</div>
<div class="service-title">Service</div>
<div class="service-detail">
<div><span class="symbol">30 days exchange policy</span> <i class="material-icons help-icon">&#xE8FD;</i></div>
<div><span class="symbol">Cash on delivery available</span> <i class="material-icons help-icon">&#xE8FD;</i></div>
</div>
</div>
<br>
</div>
</div>
<div *ngFor="let itemVariant of itemDetail.itemVariants">
<div *ngIf="itemVariant.variant">
<div *ngIf="itemVariant.attribCode == 'SIZE' ">
<span class = "size-title">Select Size </span>
......@@ -128,7 +112,6 @@
</div>
</div>
</div>
</div>
</div>
</md-card-content>
......@@ -140,26 +123,19 @@
(click)="doActivity.emit({activity:'BUY_NOW', data: itemDetail.itemCode });">Buy Now</button>
</div>
</md-card-actions>
<div _ngcontent-c30="" class="medium-12 columns ecm-payments">
<i class="material-icons"> &#xE8E8;</i>
<span _ngcontent-c30="" class="ecm-Info">Safe and Secure Payments. 100% Authentic products</span>
</div>
<!-- </md-card> -->
</div>
<!-- ----------------------HANDICRAFT-DETAILS ENDS HERE-------------------------------- -->
</div>
</div>
</md-card>
<!-- ----------------------HANDICRAFT-DETAILS ENDS HERE-------------------------------- -->
<div class="row ecm-card">
<!-- <div class="medium-12 col-sm-9 ecm-itemsDetailsInfo" > -->
<div class="medium-8 large-8 columns ecm-product-details">
<md-card>
<div>
<span class="ecm-itemDeatils">Items Details</span>
</div>
<div> <span class="ecm-itemDeatils">Items Details</span> </div>
<hr>
<div class="ecm-Overview">
<span class="ecm-other-title">Overview</span>
......@@ -215,10 +191,10 @@
<span class="ecm-other-detail">{{itemDetail.itemDetail2.returnPolicy}}</span>
</div>
<div class="ecm-termsCondition">
<div class="ecm-termsCondition">
<span class="ecm-other-title">Terms and Conditions</span>
<span class="ecm-other-detail">{{itemDetail.itemDetail2.termsAndCondition}}</span>
</div>
</div>
</md-card>
</div>
......@@ -231,5 +207,3 @@
\ No newline at end of file
\ No newline at end of file
......@@ -41,12 +41,7 @@ export class EcmOutingComponent implements OnInit, EcmTemplateInterface {
this.route.params.subscribe( params => {
this.itemCode = params['key'];
});
console.log("The items for outing " + this.itemDetail.itemDetailData.itemDetail2.actionPerformed);
this.actionPerformed = this.itemDetail.itemDetailData.itemDetail2.actionPerformed;
this.activityPerformed = this.itemDetail.itemDetailData.itemDetail2.activityPerformed;
this.transPortFacility = this.itemDetail.itemDetailData.itemDetail2.transportFacility;
this.thingsToCarry = this.itemDetail.itemDetailData.itemDetail2.thingsToCarry;
this.itemDetailpath =this.itemDetail.itemDetailData.itemDetail2
this.myCity = localStorage.getItem('mycity')
}
......
......@@ -36,11 +36,11 @@ export class EcmSigninComponent implements OnInit {
}
register() {
alert( "register" );
window.open("/ibase/E12Registration/jsp/Registration.jsp");
}
forgot() {
alert( "forgot" );
console.log( "Not Implemented Yet" );
}
login() {
......
......@@ -30,7 +30,7 @@
<!-- <span class="ecm-View" style="cursor: pointer;position: absolute;">ViewAll ( {{cartItemsDetail.length}} )</span> -->
</div>
<!-- <button md-raised-button class="button medium-btn-checkout" style="background: mediumvioletred; color:#fff;" >Checkout</button> -->
<button md-button class="checkout-button" [routerLink]="['/check-out']">Checkout</button>
<button md-button class="checkout-button" [routerLink]="['/checkout']">Checkout</button>
</div>
</ng-template>
......
......@@ -4,7 +4,7 @@
<div class="row checkout-page">
<form #userForm="ngForm" (ngSubmit)="onSubmit()">
<form #userForm="ngForm" (ngSubmit)="onSubmit(userForm.value)">
<div class="medium-7 columns">
<md-card>
......@@ -14,14 +14,14 @@
<span class="form-group">
<md-input-container class="userEmail">
<input type="email" mdInput placeholder="Email" class="form-control" required name="email" #emailRef="ngModel" [(ngModel)]="email">
<md-error *ngIf="emailRef.errors && emailRef.dirty" class="">Email required</md-error>
<md-error *ngIf="emailRef.errors && emailRef.dirty">Email required</md-error>
</md-input-container></span>
<span class="form-group">
<md-input-container class="userInfo">
<input type="number" mdInput placeholder="Phone Number" id="phone" class="form-control" required minlength="10" maxlength="10" name="phone" #phoneRef="ngModel" [(ngModel)]="phone">
<md-error *ngIf="phoneRef.errors && phoneRef.dirty" class="">Phone Number required</md-error>
<md-error *ngIf="phoneRef.errors && phoneRef.dirty">Phone Number required</md-error>
</md-input-container>
</span> </span></table>
......@@ -37,7 +37,7 @@
<span>
<md-input-container class="userAdress">
<input required minlength="10" maxlength="100" mdInput placeholder="Address" [(ngModel)]="billAddress" #addressRef="ngModel" name="billAddress">
<md-error *ngIf="addressRef.errors && addressRef.dirty" class="">Address required</md-error>
<md-error *ngIf="addressRef.dirty && addressRef.errors">Address required</md-error>
</md-input-container></span>
<span>
......@@ -154,7 +154,7 @@
<span class="cvv">
<md-input-container class="cvv-input">
<input required type="number" mdInput placeholder="cvv" #cvvRef="ngModel" [(ngModel)]="cvv" name="cvv">
<md-error *ngIf="cvvRef.errors && cvvRef.dirty" class="">Zip/Postalcode required</md-error>
<md-error *ngIf="cvvRef.errors && cvvRef.dirty" class="">cvv required</md-error>
</md-input-container>
</span>
</div>
......@@ -162,29 +162,20 @@
</div>
<div class="medium-5 columns">
<div *ngIf="cartItemsDetail" class="medium-5 columns">
<md-card>
<div class="orderSummary">
<table>
<tr>
<th class="order-summary-title">Order Summary</th>
</tr>
<tr>
<td class="item-name">Indigenous Handicrafts Incredible Applique Work Red Cotton Bed Cover</td>
<td class="item-cost">₹ 500</td>
</tr>
<tr>
<td class="item-name">Indigenous Handicrafts Incredible Applique Work Red Cotton Bed Cover</td>
<td class="item-cost">₹ 500</td>
<tr *ngFor="let item of cartItemsDetail">
<td class="item-name">{{item.shDescr}}</td>
<td class="item-cost">₹ {{item.costRate}}</td>
</tr>
<tr>
<td class="item-name">Tie & Dye Black Cotton Reversible Double AC Quilt or Quilted Bed Cover</td>
<td class="item-cost">₹ 500</td>
</tr>
<tr>
<td class="total">Total</td>
<td class="total-price">1500</td>
<td class="total-price">{{totalPrice}}</td>
</tr>
</table>
......
import { Component, OnInit, ViewChild, ElementRef, Input, Output, EventEmitter } from '@angular/core';
import { FormBuilder, Validators,NgForm } from '@angular/forms';
import { EcmCartService } from '../ecm-cart/ecm-cart.service';
import { Item } from '../../ecm-model/product-model';
@Component( {
selector: 'ecm-checkout',
......@@ -11,33 +13,14 @@ export class EcmCheckoutComponent implements OnInit {
@ViewChild('userForm') currentForm: NgForm;
userForm: NgForm;
shippingCountry;
shippingAddress;
shippingCity;
shippingState;
shippingZipCode;
billingCountry;
billAddress;
billingCity;
billingState;
billingZipCode;
checked = false;
selectedMonth;
selectedYear;
phone;
email;
cardHolder;
cardNumber;
cvv;
cartItemsDetail: Item[];
totalPrice:number = 0;
countries;
months;
years;
constructor(private formBuilder: FormBuilder) {
constructor(private formBuilder: FormBuilder, public cartService: EcmCartService) {
this.countries = [
{ viewValue: 'India' },
{ viewValue: 'UAE' },
......@@ -69,10 +52,35 @@ export class EcmCheckoutComponent implements OnInit {
}
ngOnInit() {
this.getCartItems();
}
onSubmit() {
onSubmit(data) {
alert("Form Submitted");
console.log("User Email:[" +data.email +"]");
}
getCartItems() {
this.cartService.getCartItems().subscribe(
cartItemsDetail => {
this.cartItemsDetail = cartItemsDetail;
console.log( 'comp cartItemsDetail[' + JSON.stringify( cartItemsDetail ) + '] \n this.cartItemsDetail[' + this.cartItemsDetail.length + ']' );
if ( this.cartItemsDetail ) {
this.getTotalPrice();
console.log( "the total Price is" + this.totalPrice );
}
},
error => {
let errorMessage = <any>error;
console.log( 'comp errorMessage[' + errorMessage + ']' );
});
}
getTotalPrice() {
this.cartItemsDetail.forEach(( item, i ) => {
this.totalPrice = this.totalPrice + parseFloat( item.costRate );
console.log('Total Price Is'+item.costRate);
});
}
}
......
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