Commit 92f3f93b by Adarsh K

Merge branch 'arjunlatest' into 'master'

Arjunlatest See merge request !95
parents b7d2998c 5f3047a3
......@@ -115,12 +115,14 @@ export class ChangeaddressPage implements OnInit {
if (this.latitude !== this.lat && this.longitude !== this.lng) {
this.lat = this.latitude;
this.lng = this.longitude;
this.myorder.getNearBy(this.latitude, this.longitude, this.order.orderId).then(resp => {
console.log(resp);
if (resp) {
this.addressValid = resp;
}
});
this.myorder
.getNearBy(this.latitude, this.longitude, this.order.orderId)
.then(resp => {
console.log(resp);
if (resp) {
this.addressValid = resp;
}
});
}
}
return this.addressValid;
......@@ -161,11 +163,18 @@ export class ChangeaddressPage implements OnInit {
this.service.get('order').then(val => {
console.log(val);
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(() => {
// 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);
if (distanceKM < This.service.distance) {
const orderId = val.orderId;
......@@ -176,7 +185,10 @@ export class ChangeaddressPage implements OnInit {
landmark: data.landmark,
defaultVal: 0,
uid: This.uid,
latLng: new firebase.firestore.GeoPoint(This.newCenterLat, This.newCenterLng),
latLng: new firebase.firestore.GeoPoint(
This.newCenterLat,
This.newCenterLng
),
status: true
};
console.log(postData, orderId);
......@@ -192,10 +204,14 @@ export class ChangeaddressPage implements OnInit {
}, 3000);
} else {
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);
});
}
}
......
<ion-header>
<div class="nav_header" *ngIf="!isShow">
<ion-grid class="no-gutter">
<ion-row class="no-gutter">
<ion-col class="no-gutter" size="2">
<ion-menu-toggle>
<button class="nav_btn nav_menu floatLeft"></button>
</ion-menu-toggle>
</ion-col>
<ion-col class="no-gutter" size="8">
<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)="goToPage('searchmodal')" />
</div>
</ion-col>
<ion-col class="no-gutter" size="2">
<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>
</ion-col>
</ion-row>
</ion-grid>
<div class="custom-header">
<div class="menu-sctn">
<ion-menu-toggle>
<button class="nav_btn nav_menu floatLeft"></button>
</ion-menu-toggle>
</div>
<div class="mid-sctn">
<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)="goToPage('searchmodal')" />
</div>
</div>
<div class="search-sctn">
<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>
</div>
</div>
</div>
</ion-header>
......
......@@ -336,4 +336,18 @@
li {
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 @@
<ul>
<li (click)="goToPage('productlist')">
<div class="nearby_image">
<img [src]="data.product[0].image"
onerror="this.src='../assets/[email protected]'" />
<img [src]="data.product[0].image" onerror="this.src='../assets/[email protected]'" />
</div>
<div class="nearby_detail">
<h5>
......@@ -92,8 +91,7 @@
</h6>
<h5>Quantity : <span>{{product.qty}}</span></h5>
<h5>
Amount : <strong>A$ {{service.formatNumber(product.price)}}</strong><span
class="afterpay">{{data.paymentMode}}</span>
Amount : <strong>A$ {{service.formatNumber(product.price)}}</strong><span class="afterpay">{{data.paymentMode}}</span>
</h5>
<h5 *ngIf="data.orderStatus >= 3 || data.orderStatus < 7">
Delivery time : <span>{{deliveryTime}}</span>
......@@ -105,8 +103,7 @@
<div class="delivery-wrap">
<h4 class="floatLeft">DELIVERY</h4>
<span class="floatRight"
*ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8"><img
<span class="floatRight" *ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8"><img
class="ng-tns-c3-0" src="../../assets/edit.png" (click)="changeAddress(data.orderId)" /></span>
<div class="clear"></div>
......@@ -116,10 +113,6 @@
{{data.deliveryAddress.addressType}},<br />{{data.deliveryAddress.address}},
<br /> {{data.deliveryAddress.building}}, <br /> {{data.deliveryAddress.landmark}}
</h5>
<button class="cancel_btn" (click)="cancelOrder(data.orderId)"
*ngIf="cancelDelivery > 0 && data.orderStatus != 0 && data.orderStatus != 8">
CANCEL THIS ORDER
</button>
<!-- <hr /> -->
</div>
......@@ -179,4 +172,12 @@
</ul>
</div> -->
</div>
</ion-content>
\ No newline at end of file
</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 @@
padding-top: 20px;
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 {
img {
width: 20px;
......@@ -281,4 +268,25 @@
width: 200px;
overflow: hidden;
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">
<ion-grid class="no-gutter">
<ion-row class="no-gutter">
<ion-col class="no-gutter" size="2">
<button class="nav_btn nav_back floatLeft" (click)="closeModal()"></button>
</ion-col>
<ion-col class="no-gutter" size="8">
<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 />
</div>
</ion-col>
<ion-col class="no-gutter" size="2">
<button class="nav_btn nav_close floatRight" (click)="closeModal()"></button>
</ion-col>
</ion-row>
</ion-grid>
<div class="back-sctn">
<button class="nav_btn nav_back floatLeft" (click)="closeModal()"></button>
</div>
<div class="search-sctn">
<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 />
</div>
</div>
<div class="close-sctn">
<button class="nav_btn nav_close floatRight" (click)="closeModal()"></button>
</div>
</div>
<div class="search_item_list">
......
......@@ -8,4 +8,15 @@
-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);
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 {
top: 50px;
bottom: 0px;
z-index: 99;
overflow: scroll;
ul {
margin: 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