Commit 92f3f93b by Adarsh K

Merge branch 'arjunlatest' into 'master'

Arjunlatest See merge request !95
parents b7d2998c 5f3047a3
...@@ -115,7 +115,9 @@ export class ChangeaddressPage implements OnInit { ...@@ -115,7 +115,9 @@ export class ChangeaddressPage implements OnInit {
if (this.latitude !== this.lat && this.longitude !== this.lng) { if (this.latitude !== this.lat && this.longitude !== this.lng) {
this.lat = this.latitude; this.lat = this.latitude;
this.lng = this.longitude; this.lng = this.longitude;
this.myorder.getNearBy(this.latitude, this.longitude, this.order.orderId).then(resp => { this.myorder
.getNearBy(this.latitude, this.longitude, this.order.orderId)
.then(resp => {
console.log(resp); console.log(resp);
if (resp) { if (resp) {
this.addressValid = resp; this.addressValid = resp;
...@@ -161,11 +163,18 @@ export class ChangeaddressPage implements OnInit { ...@@ -161,11 +163,18 @@ export class ChangeaddressPage implements OnInit {
this.service.get('order').then(val => { this.service.get('order').then(val => {
console.log(val); console.log(val);
const This = this; const This = this;
console.log(This.latitude, This.longitude, val.pickupLocation.O, val.pickupLocation.F); console.log(
This.latitude,
This.longitude,
val.pickupLocation.O,
val.pickupLocation.F
);
setTimeout(() => { setTimeout(() => {
// tslint:disable-next-line:max-line-length // tslint:disable-next-line:max-line-length
const distanceNew = google.maps.geometry.spherical.computeDistanceBetween(new google.maps.LatLng(This.newCenterLat, This.newCenterLng), new google.maps.LatLng(val.pickupLocation.O, val.pickupLocation.F)); const distanceNew = google.maps.geometry.spherical.computeDistanceBetween(
new google.maps.LatLng(This.newCenterLat, This.newCenterLng),
new google.maps.LatLng(val.pickupLocation.O, val.pickupLocation.F)
);
const distanceKM = (distanceNew / 1000).toFixed(2); const distanceKM = (distanceNew / 1000).toFixed(2);
if (distanceKM < This.service.distance) { if (distanceKM < This.service.distance) {
const orderId = val.orderId; const orderId = val.orderId;
...@@ -176,7 +185,10 @@ export class ChangeaddressPage implements OnInit { ...@@ -176,7 +185,10 @@ export class ChangeaddressPage implements OnInit {
landmark: data.landmark, landmark: data.landmark,
defaultVal: 0, defaultVal: 0,
uid: This.uid, uid: This.uid,
latLng: new firebase.firestore.GeoPoint(This.newCenterLat, This.newCenterLng), latLng: new firebase.firestore.GeoPoint(
This.newCenterLat,
This.newCenterLng
),
status: true status: true
}; };
console.log(postData, orderId); console.log(postData, orderId);
...@@ -192,10 +204,14 @@ export class ChangeaddressPage implements OnInit { ...@@ -192,10 +204,14 @@ export class ChangeaddressPage implements OnInit {
}, 3000); }, 3000);
} else { } else {
This.loader = false; This.loader = false;
This.service.showToast('Does not delivered to choosed location', 'top', 'my-error', 2000); This.service.showToast(
'Does not delivered to choosed location',
'top',
'my-error',
2000
);
} }
}, 1000); }, 1000);
}); });
} }
} }
......
<ion-header> <ion-header>
<div class="nav_header" *ngIf="!isShow"> <div class="nav_header" *ngIf="!isShow">
<ion-grid class="no-gutter">
<ion-row class="no-gutter"> <div class="custom-header">
<ion-col class="no-gutter" size="2"> <div class="menu-sctn">
<ion-menu-toggle> <ion-menu-toggle>
<button class="nav_btn nav_menu floatLeft"></button> <button class="nav_btn nav_menu floatLeft"></button>
</ion-menu-toggle> </ion-menu-toggle>
</ion-col> </div>
<ion-col class="no-gutter" size="8"> <div class="mid-sctn">
<div class="nav_title floatLeft relative"> <div class="nav_title floatLeft relative">
<!-- <input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()" (input)="searchFun($event.target.value)" #searchText> --> <!-- <input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()" (input)="searchFun($event.target.value)" #searchText> -->
<input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="goToPage('searchmodal')" /> <input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="goToPage('searchmodal')" />
</div> </div>
</ion-col> </div>
<ion-col class="no-gutter" size="2"> <div class="search-sctn">
<button class="nav_btn nav_search floatRight" *ngIf="!searchShow" (click)="goToPage('searchmodal')"></button> <button class="nav_btn nav_search floatRight" *ngIf="!searchShow" (click)="goToPage('searchmodal')"></button>
<button class="nav_btn nav_close floatRight" *ngIf="searchShow" (click)="searchClose()"></button> <button class="nav_btn nav_close floatRight" *ngIf="searchShow" (click)="searchClose()"></button>
</ion-col> </div>
</ion-row> </div>
</ion-grid>
</div> </div>
</ion-header> </ion-header>
......
...@@ -337,3 +337,17 @@ ...@@ -337,3 +337,17 @@
list-style: none; list-style: none;
} }
} }
.custom-header {
display: flex;
justify-content: space-between;
.menu-sctn {
width: 15%;
}
.mid-sctn {
width: 70%;
}
.search-sctn {
width: 15%;
}
}
\ No newline at end of file
...@@ -68,8 +68,7 @@ ...@@ -68,8 +68,7 @@
<ul> <ul>
<li (click)="goToPage('productlist')"> <li (click)="goToPage('productlist')">
<div class="nearby_image"> <div class="nearby_image">
<img [src]="data.product[0].image" <img [src]="data.product[0].image" onerror="this.src='../assets/[email protected]'" />
onerror="this.src='../assets/[email protected]'" />
</div> </div>
<div class="nearby_detail"> <div class="nearby_detail">
<h5> <h5>
...@@ -92,8 +91,7 @@ ...@@ -92,8 +91,7 @@
</h6> </h6>
<h5>Quantity : <span>{{product.qty}}</span></h5> <h5>Quantity : <span>{{product.qty}}</span></h5>
<h5> <h5>
Amount : <strong>A$ {{service.formatNumber(product.price)}}</strong><span Amount : <strong>A$ {{service.formatNumber(product.price)}}</strong><span class="afterpay">{{data.paymentMode}}</span>
class="afterpay">{{data.paymentMode}}</span>
</h5> </h5>
<h5 *ngIf="data.orderStatus >= 3 || data.orderStatus < 7"> <h5 *ngIf="data.orderStatus >= 3 || data.orderStatus < 7">
Delivery time : <span>{{deliveryTime}}</span> Delivery time : <span>{{deliveryTime}}</span>
...@@ -105,8 +103,7 @@ ...@@ -105,8 +103,7 @@
<div class="delivery-wrap"> <div class="delivery-wrap">
<h4 class="floatLeft">DELIVERY</h4> <h4 class="floatLeft">DELIVERY</h4>
<span class="floatRight" <span class="floatRight" *ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8"><img
*ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8"><img
class="ng-tns-c3-0" src="../../assets/edit.png" (click)="changeAddress(data.orderId)" /></span> class="ng-tns-c3-0" src="../../assets/edit.png" (click)="changeAddress(data.orderId)" /></span>
<div class="clear"></div> <div class="clear"></div>
...@@ -116,10 +113,6 @@ ...@@ -116,10 +113,6 @@
{{data.deliveryAddress.addressType}},<br />{{data.deliveryAddress.address}}, {{data.deliveryAddress.addressType}},<br />{{data.deliveryAddress.address}},
<br /> {{data.deliveryAddress.building}}, <br /> {{data.deliveryAddress.landmark}} <br /> {{data.deliveryAddress.building}}, <br /> {{data.deliveryAddress.landmark}}
</h5> </h5>
<button class="cancel_btn" (click)="cancelOrder(data.orderId)"
*ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8">
CANCEL THIS ORDER
</button>
<!-- <hr /> --> <!-- <hr /> -->
</div> </div>
...@@ -180,3 +173,11 @@ ...@@ -180,3 +173,11 @@
</div> --> </div> -->
</div> </div>
</ion-content> </ion-content>
<ion-footer>
<div class="footer-btn">
<button class="cancel_btn" (click)="cancelOrder(data.orderId)" *ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8">
CANCEL THIS ORDER
</button>
</div>
</ion-footer>
\ No newline at end of file
...@@ -159,19 +159,6 @@ ...@@ -159,19 +159,6 @@
padding-top: 20px; padding-top: 20px;
padding-bottom: 10px; padding-bottom: 10px;
} }
.cancel_btn {
border-radius: 8px;
height: 45px;
width: 100%;
background-color: #29285b;
color: #fff;
font-size: 18px;
font-weight: lighter;
padding-left: 20px;
padding-right: 20px;
margin-bottom: 20px;
margin-top: 20px;
}
.delivery-wrap { .delivery-wrap {
img { img {
width: 20px; width: 20px;
...@@ -282,3 +269,24 @@ ...@@ -282,3 +269,24 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.footer-btn {
padding: 0 20px;
.cancel_btn {
border-radius: 8px;
height: 45px;
width: 100%;
background-color: #29285b;
color: #fff;
font-size: 18px;
font-weight: lighter;
padding-left: 20px;
padding-right: 20px;
margin-bottom: 15px;
margin-top: 10px;
}
}
.footer-md:before {
background: none;
}
\ No newline at end of file
<div class="custom-header"> <div class="custom-header">
<ion-grid class="no-gutter"> <div class="back-sctn">
<ion-row class="no-gutter">
<ion-col class="no-gutter" size="2">
<button class="nav_btn nav_back floatLeft" (click)="closeModal()"></button> <button class="nav_btn nav_back floatLeft" (click)="closeModal()"></button>
</ion-col> </div>
<ion-col class="no-gutter" size="8"> <div class="search-sctn">
<div class="nav_title floatLeft relative"> <div class="nav_title floatLeft relative">
<input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()" (input)="searchFun($event.target.value)" #searchText /> <input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()" (input)="searchFun($event.target.value)" #searchText />
</div> </div>
</ion-col> </div>
<ion-col class="no-gutter" size="2"> <div class="close-sctn">
<button class="nav_btn nav_close floatRight" (click)="closeModal()"></button> <button class="nav_btn nav_close floatRight" (click)="closeModal()"></button>
</ion-col> </div>
</ion-row>
</ion-grid>
</div> </div>
<div class="search_item_list"> <div class="search_item_list">
......
...@@ -8,4 +8,15 @@ ...@@ -8,4 +8,15 @@
-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
display: flex;
justify-content: space-between;
.back-sctn {
width: 15%;
}
.search-sctn {
width: 70%;
}
.close-sctn {
width: 15%;
}
} }
\ No newline at end of file
...@@ -625,6 +625,7 @@ ion-header { ...@@ -625,6 +625,7 @@ ion-header {
top: 50px; top: 50px;
bottom: 0px; bottom: 0px;
z-index: 99; z-index: 99;
overflow: scroll;
ul { ul {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
......
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