Commit b981c88f by Adarsh K

sprint 2

parent 68241888
......@@ -15,7 +15,7 @@
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="orientation" value="portrait" />
<preference name="ShowSplashScreenSpinner" value="false"/>
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
......
......@@ -85,4 +85,4 @@
"android"
]
}
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ import { HomePage } from './home.page';
IonicModule,
AgmDirectionModule,
AgmCoreModule.forRoot({
apiKey: 'AIzaSyAK3Av2e2dunqInYEaAVJPmzK5HTi0gubw'
apiKey: 'AIzaSyBn6hOlr6YHcZAmbptlsmbhvH5iQllWflE'
}),
RouterModule.forChild([
{
......
......@@ -55,30 +55,22 @@
<div class="clear"></div>
</div>
<hr>
<!-- <div class="items_div">
<ion-row>
<ion-col class="textLeft">
<input class="styled-checkbox" id="styled-checkbox-1" type="checkbox" value="value1">
<label for="styled-checkbox-1">Men's Shirt</label>
</ion-col>
<ion-col class="textRight">
<p>AU$ 88</p>
</ion-col>
</ion-row>
<ion-row>
<div class="items_div">
<ion-row *ngFor="let product of order.product">
<ion-col class="textLeft">
<input class="styled-checkbox" id="styled-checkbox-2" type="checkbox" value="value2">
<label for="styled-checkbox-2">Men's Jeans</label>
<input class="styled-checkbox" id="styled-checkbox-1" type="checkbox" value="value1" checked disabled>
<label for="styled-checkbox-1">{{product.prodName}}</label>
</ion-col>
<ion-col class="textRight">
<p>AU$ 72</p>
<p>A$ {{product.price}}</p>
</ion-col>
</ion-row>
</div> -->
</div>
<div class="time">
<strong>05</strong>Mnt
</div>
<div class="reach_btn" (click)="next(5)">PRODUCT COLLECTED</div>
<div class="reach_btn" (click)="next(5)" *ngIf="shopperState==3">PRODUCT COLLECTED</div>
<div *ngIf="shopperState < 3" class="awaiting_response">Awaiting Product Packed</div>
<div class="clear"></div>
</div>
</div>
......@@ -119,23 +111,23 @@
<div class="clear"></div>
</div>
<hr>
<!-- <div class="items_div">
<div class="items_div">
<ion-row>
<ion-col class="textLeft">
<h4>Products</h4>
</ion-col>
</ion-row>
<ion-row>
<ion-row *ngFor="let product of order.product">
<ion-col class="textLeft">
<label for="styled-checkbox-1">Men's Shirt</label>
<label for="styled-checkbox-1">{{product.prodName}}</label>
</ion-col>
</ion-row>
<ion-row>
<!-- <ion-row>
<ion-col class="textLeft">
<label for="styled-checkbox-2">Men's Jeans</label>
</ion-col>
</ion-row>
</div> -->
</ion-row> -->
</div>
<div class="time">
<strong>05</strong>Mnt
</div>
......@@ -158,7 +150,12 @@
<div class="clear"></div>
</div>
<hr>
Awaiting Customer Approval
<div *ngIf="!retry" class="awaiting_response">Awaiting Customer Approval</div>
<div *ngIf="retry">
<div class="customer_reject">Customer Rejected</div>
<button class="reject_btn" (click)="next(7)">Re-Request</button>
</div>
<div class="clear"></div>
</div>
</div>
......
......@@ -307,6 +307,23 @@
border-bottom-left-radius: 15px;
}
}
.awaiting_response{
color: #a8a8a8;
padding: 15px;
}
.customer_reject{
color:rgba(255, 71, 87, 1);
padding: 15px;
}
.reject_btn{
width: 100%;
color:rgba(255, 71, 87, 1);
border:1px solid rgba(255, 71, 87, 1);
font-size: 20px;
padding: 15px;
background: transparent;
}
}
}
}
\ No newline at end of file
......@@ -24,6 +24,8 @@ export class RiderloungePage implements OnInit {
public destination: any;
public renderOptions: any;
public markerOptions: any;
retry = false;
shopperState: number;
deliveryStatus: any;
......@@ -32,7 +34,10 @@ export class RiderloungePage implements OnInit {
private route: ActivatedRoute,
private location: Location,
public myorder: MyordersService
) { }
) {
this.retry = false;
this.shopperState = 0;
}
......@@ -83,14 +88,18 @@ export class RiderloungePage implements OnInit {
next(status: number) {
this.retry = false;
this.myorder.rideStatus(status).then((data) => {
if (status === 7) {
if (status === 7 || status === 4) {
this.myorder.getStatus(this.myorder.selItem.orderId).subscribe((res) => {
console.log(res);
this.shopperState = res[0].shopperState;
if (res[0].orderStatus === 9) {
this.myorder.rideChange(this.myorder.selItem.orderId, 0);
this.goToPage('complete');
}
} else if (res[0].orderStatus === 10) {
this.retry = true;
} else {}
});
}
this.slides.slideNext();
......@@ -108,7 +117,7 @@ export class RiderloungePage implements OnInit {
console.log(this.currentIndex);
});
}
}
}
......@@ -25,9 +25,11 @@ export class AuthService {
if (user) {
this.userData = user;
this.service.set('user', JSON.stringify(this.userData));
this.router.navigateByUrl('home');
} else {
this.service.set('user', null);
JSON.parse(localStorage.getItem('user'));
this.router.navigateByUrl('login');
}
});
}
......@@ -35,7 +37,6 @@ export class AuthService {
public async SignIn(email: string, password: string) {
return this.afAuth.auth.signInWithEmailAndPassword(email, password).then((result) => {
console.log('success');
this.router.navigateByUrl('home');
this.SetUserData(result.user);
}).catch((error) => {
window.alert(error.message);
......
......@@ -47,11 +47,7 @@ export class MyordersService {
res.forEach((item) => {
console.log(item);
const order: Myorder = {
prodName: item.prodName,
color: item.color,
image: item.image,
amount: item.amount,
qty: item.qty,
status: item.status,
orderStatus: item.orderStatus,
bookDate: item.bookDate,
......@@ -62,7 +58,7 @@ export class MyordersService {
riderName: 'John',
orderId: item.orderId,
orderCode: item.orderCode,
size: item.size,
product: this.service.key2Array(item.product),
time: '60'
};
this.orders.push(order);
......
export interface Myorder {
amount: string;
prodName: any;
image: string;
size: string;
color: string;
qty: number;
bookDate: any;
pickupAddress: string;
pickupLocation: any;
......@@ -16,5 +11,6 @@ export interface Myorder {
orderStatus: number;
riderName: string;
time: string;
product: any;
}
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