Commit 706d46bb by Adarsh K

new changes

parent 3cba48ae
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
<p class="textLeft">Total Price:</p> <p class="textLeft">Total Price:</p>
</ion-col> </ion-col>
<ion-col> <ion-col>
<p class="textRight">A$ {{service.formatNumber(cartService.cartTotal.toFixed(2))}} <p class="textRight">A$
{{service.formatNumber(cartService.cartTotal.toFixed(2))}}
</p> </p>
</ion-col> </ion-col>
</ion-row> </ion-row>
...@@ -113,7 +114,8 @@ ...@@ -113,7 +114,8 @@
<ion-row> <ion-row>
<ion-col class="p0"> <ion-col class="p0">
<h6> <h6>
{{addressService.custAddress.building}},<br /> {{addressService.custAddress.landmark}}, {{addressService.custAddress.building}},<br />
{{addressService.custAddress.landmark}},
<br /> {{addressService.custAddress.address}} <br /> {{addressService.custAddress.address}}
</h6> </h6>
</ion-col> </ion-col>
...@@ -133,7 +135,8 @@ ...@@ -133,7 +135,8 @@
</label> </label>
</div> --> </div> -->
<div class="payment_method"> <div class="payment_method">
<input type="radio" name="payments" id="paypal" name="radio-group" (click)="getwaypaypal()" checked="true" /> <input type="radio" name="payments" id="paypal" name="radio-group"
(click)="getwaypaypal()" checked="true" />
<label for="paypal"> <label for="paypal">
<p>PayPal</p> <p>PayPal</p>
</label> </label>
...@@ -142,7 +145,8 @@ ...@@ -142,7 +145,8 @@
<input class="card_no borderNone widthFull" placeholder="PayPal ID" /> <input class="card_no borderNone widthFull" placeholder="PayPal ID" />
</div> --> </div> -->
<div class="payment_method"> <div class="payment_method">
<input type="radio" name="payments" id="afterpay" name="radio-group" (click)="getwayafterpay()" /> <input type="radio" name="payments" id="afterpay" name="radio-group"
(click)="getwayafterpay()" />
<label for="afterpay"> <label for="afterpay">
<p>AfterPay</p> <p>AfterPay</p>
</label> </label>
...@@ -152,7 +156,8 @@ ...@@ -152,7 +156,8 @@
<input class="cv_number" placeholder="CVV" /> <input class="cv_number" placeholder="CVV" />
</div> --> </div> -->
<div class="payment_method"> <div class="payment_method">
<input type="radio" name="payments" id="payk" name="radio-group" (click)="getwaypayk()" /> <input type="radio" name="payments" id="payk" name="radio-group"
(click)="getwaypayk()" />
<label for="payk"> <label for="payk">
<p>PayK</p> <p>PayK</p>
</label> </label>
...@@ -178,7 +183,8 @@ ...@@ -178,7 +183,8 @@
<hr /> <hr />
<div class="coupon_code"> <div class="coupon_code">
<div class="promo-row"> <div class="promo-row">
<input class="" placeholder="COUPON CODE: GET50" #promo /><button class="add_btn apply_btn" (click)="promoApply(promo.value)"> <input class="" placeholder="COUPON CODE: GET50" #promo /><button
class="add_btn apply_btn" (click)="promoApply(promo.value)">
APPLY APPLY
</button> </button>
</div> </div>
...@@ -252,7 +258,8 @@ ...@@ -252,7 +258,8 @@
</div> </div>
<div class="checkout" (click)="next(1)">CHECKOUT</div> <div class="checkout" (click)="next(1)">CHECKOUT</div>
</div> </div>
<div class="footer_btn" *ngIf="cartService.carts && cartService.carts.length > 0" [hidden]="currentIndex != 1" (click)="next(2);"> <div class="footer_btn" *ngIf="cartService.carts && cartService.carts.length > 0" [hidden]="currentIndex != 1"
(click)="next(2);">
PAY PAY
</div> </div>
...@@ -283,7 +290,8 @@ ...@@ -283,7 +290,8 @@
</ion-grid> </ion-grid>
</div> </div>
<ion-content class="sort_wrappper"> <ion-content class="sort_wrappper">
<agm-map [zoom]="20" [latitude]="lat" [longitude]="lng" [disableDefaultUI]="false" [zoomControl]="false" [backgroundColor]="'rgba(29, 27, 130,0.2)'"> <agm-map [zoom]="20" [latitude]="lat" [longitude]="lng" [disableDefaultUI]="false" [zoomControl]="false"
[backgroundColor]="'rgba(29, 27, 130,0.2)'">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker> <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map> </agm-map>
<div class="add_address_wrapper"> <div class="add_address_wrapper">
...@@ -292,12 +300,16 @@ ...@@ -292,12 +300,16 @@
<span class="floatRight" (click)="istoggle(); goToPage('nearby')">ADD NEW</span> <span class="floatRight" (click)="istoggle(); goToPage('nearby')">ADD NEW</span>
<div class="clear"></div> <div class="clear"></div>
</h5> </h5>
<ul *ngIf="addressService.nearestList && addressService.nearestList.length > 0"> <ul *ngIf="addressService.addressList && addressService.addressList.length > 0">
<li *ngFor="let address of addressService.nearestList; let i = index" class="no-devlivery"> <li *ngFor="let address of addressService.addressList; let i = index"
<h4>DELIVERS TO</h4> [ngClass]="{'no-devlivery': !address.nearest}">
<h4 *ngIf="address.nearest === true">DELIVERS TO</h4>
<h4 *ngIf="address.nearest === false">NO DELIVERS TO</h4>
<div class="floatLeft"> <div class="floatLeft">
{{address.default}} {{address.default}}
<input class="styled-checkbox" name="addressId" id="styled-checkbox-{{i}}" type="radio" (click)="setDefault(address.addressId, i)" [value]="address.addressId" #addressType [checked]="address.defaultVal == 1" /> <input class="styled-checkbox" name="addressId" id="styled-checkbox-{{i}}" type="radio"
(click)="setDefault(address.addressId, i)" [value]="address.addressId" #addressType
[checked]="address.defaultVal == 1" />
<label for="styled-checkbox-{{i}}"> {{address.addressType}} </label> <label for="styled-checkbox-{{i}}"> {{address.addressType}} </label>
</div> </div>
<div class="floatLeft"> <div class="floatLeft">
...@@ -308,7 +320,8 @@ ...@@ -308,7 +320,8 @@
<div class="clear"></div> <div class="clear"></div>
</li> </li>
</ul> </ul>
<div class="textCenter" *ngIf="addressService.nearestList && addressService.nearestList.length === 0">No Address Found in the nearest center</div> <div class="textCenter" *ngIf="addressService.addressList && addressService.addressList.length === 0">No
Address Found</div>
</div> </div>
<!-- <div class="loader" *ngIf="loader"> <!-- <div class="loader" *ngIf="loader">
......
...@@ -183,7 +183,7 @@ export class CartPage implements OnInit { ...@@ -183,7 +183,7 @@ export class CartPage implements OnInit {
setDefault(addressId: any, index: number) { setDefault(addressId: any, index: number) {
console.log('loading....'); console.log('loading....');
this.loader = true; this.loader = true;
this.addressService.custAddress = this.addressService.nearestList[index]; this.addressService.custAddress = this.addressService.addressList[index];
console.log(this.custAddress); console.log(this.custAddress);
this.istoggle(); this.istoggle();
setTimeout(() => { setTimeout(() => {
...@@ -200,32 +200,36 @@ export class CartPage implements OnInit { ...@@ -200,32 +200,36 @@ export class CartPage implements OnInit {
console.log(index); console.log(index);
if (index === 2) { if (index === 2) {
if (this.addressService.custAddress !== undefined) { if (this.addressService.custAddress !== undefined) {
const otherCharges = { if (this.addressService.custAddress.nearest === true) {
deliveryCharge: this.deliveryCharge, const otherCharges = {
taxAmount: this.taxAmount, deliveryCharge: this.deliveryCharge,
discount: this.discount, taxAmount: this.taxAmount,
discountApplied: this.discountApplied === 1 ? true : false, discount: this.discount,
totalAmt: this.totalAmt, discountApplied: this.discountApplied === 1 ? true : false,
custAddress: this.addressService.custAddress, totalAmt: this.totalAmt,
paymentMethod: this.paymentMethod custAddress: this.addressService.custAddress,
}; paymentMethod: this.paymentMethod
const state = this.orderService };
.checkOut( const state = this.orderService
this.cartService.carts, .checkOut(
otherCharges, this.cartService.carts,
this.addressService.centerLoc otherCharges,
) this.addressService.centerLoc
.then(data => { )
this.cartService.cartCenter = ''; .then(data => {
const cartCount = this.orderService.cartCount; this.cartService.cartCenter = '';
const timer = (cartCount - 1) * 20 + 60; const cartCount = this.orderService.cartCount;
const totalTime = this.add_minutes(timer); const timer = (cartCount - 1) * 20 + 60;
console.log('ready for slide'); const totalTime = this.add_minutes(timer);
this.timeinterval = setInterval(() => { console.log('ready for slide');
This.getDeliveryTime(totalTime.getTime()); this.timeinterval = setInterval(() => {
}, 1000); This.getDeliveryTime(totalTime.getTime());
this.slides.slideNext(); }, 1000);
}); this.slides.slideNext();
});
} else {
this.service.showToast('Not delivered to the selected location', 'top', 'my-error', 1000);
}
} else { } else {
this.istoggle(); this.istoggle();
} }
...@@ -321,7 +325,8 @@ export class CartPage implements OnInit { ...@@ -321,7 +325,8 @@ export class CartPage implements OnInit {
} }
this.discount.toFixed(2); this.discount.toFixed(2);
} else { } else {
this.discountApplied = 2; this.discountApplied = 0;
this.discount = 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