Commit 4ba5e826 by Adarsh K

Merge branch 'arjunlatest' into 'master'

Arjunlatest See merge request !90
parents ccfca2f5 3c6383a9
......@@ -116,13 +116,21 @@
<div *ngIf="isShow" [@slideInOut]>
<ion-header>
<div class="nav_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)="istoggle()">
<img src="../assets/Group17_2.png" />
</button>
</ion-col>
<ion-col class="no-gutter" size="8">
<div class="nav_title floatLeft">
<h4>CHANGE LOCATION</h4>
</div>
<div class="clear"></div>
</ion-col>
<ion-col class="no-gutter" size="2"></ion-col>
</ion-row>
</ion-grid>
</div>
</ion-header>
<ion-content class="sort_wrappper">
......
<ion-header>
<div class="header-cc">
<ion-grid class="no-gutter">
<ion-row class="no-gutter">
<ion-col class="no-gutter" size="2">
......@@ -14,13 +15,13 @@
<ion-col class="no-gutter" size="2"></ion-col>
</ion-row>
</ion-grid>
</div>
</ion-header>
<ion-content>
<div class="nearby_map">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="8" [backgroundColor]="'rgba(29, 27, 130,0.2)'"
(mapReady)="mapReady($event)" (centerChange)="centerChange($event)">
<agm-marker [latitude]="latitude" [longitude]="longitude" [markerDraggable]="true"
(dragEnd)="markerDragEnd($event)" [iconUrl]="
<div class="map-inner">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="8" [backgroundColor]="'rgba(29, 27, 130,0.2)'" (mapReady)="mapReady($event)" (centerChange)="centerChange($event)">
<agm-marker [markerDraggable]="true" (dragEnd)="markerDragEnd($event)" [iconUrl]="
{
url: './assets/pin.svg',
scaledSize: {
......@@ -28,18 +29,17 @@
height: 40
}}"></agm-marker>
</agm-map>
<form (ngSubmit)="onSubmit(addressForm.value); addressForm.reset()" #addressForm="ngForm" method="post"
class="form-horizontal">
<span class="map-pin"><img src="../../assets/pin.svg" alt=""></span>
</div>
<form (ngSubmit)="onSubmit(addressForm.value); addressForm.reset()" #addressForm="ngForm" method="post" class="form-horizontal">
<div class="add_address_wrapper">
<h5>DELIVERY</h5>
<p>{{address}}</p>
<input [(ngModel)]="addressForm.building" name="building" #building="ngModel" name="building" required
placeholder="House No./ Building No" />
<input [(ngModel)]="addressForm.building" name="building" #building="ngModel" name="building" required placeholder="House No./ Building No" />
<div class="md-errors-spacer" [hidden]="building.valid || landmark.pristine" class="ion-padding-start">
Building Name is required
</div>
<input [(ngModel)]="addressForm.landmark" name="landmark" #landmark="ngModel" name="landmark" required
placeholder="Landmark" />
<input [(ngModel)]="addressForm.landmark" name="landmark" #landmark="ngModel" name="landmark" required placeholder="Landmark" />
<div class="md-errors-spacer" [hidden]="landmark.valid || landmark.pristine" class="ion-padding-start">
Landmark is required
</div>
......@@ -47,31 +47,24 @@
<ion-row>
<ion-col>
<h6>
<input class="styled-checkbox" id="styled-check-1" type="radio" value="Home"
[(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel"
required />
<input class="styled-checkbox" id="styled-check-1" type="radio" value="Home" [(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
<label for="styled-check-1"><span>Home</span></label>
</h6>
</ion-col>
<ion-col>
<h6>
<input class="styled-checkbox" id="styled-check-2" type="radio" value="Work"
[(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel"
required />
<input class="styled-checkbox" id="styled-check-2" type="radio" value="Work" [(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
<label for="styled-check-2"><span>Office</span></label>
</h6>
</ion-col>
<ion-col>
<h6>
<input class="styled-checkbox" id="styled-check-3" type="radio" value="Other"
[(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel"
required />
<input class="styled-checkbox" id="styled-check-3" type="radio" value="Other" [(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
<label for="styled-check-3"><span>Others</span></label>
</h6>
</ion-col>
</ion-row>
<div class="md-errors-spacer" [hidden]="addressType.valid || addressType.pristine"
class="ion-padding-start">
<div class="md-errors-spacer" [hidden]="addressType.valid || addressType.pristine" class="ion-padding-start">
Address Type is required
</div>
</ion-grid>
......
.header-cc {
background-color: #fff;
}
.nearby_map {
width: 100%;
height: 100%;
.map-inner {
height: calc(100% - 348px);
position: relative;
.map-pin {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 25px;
}
}
.overlay {
position: absolute;
top: 0px;
......@@ -11,7 +27,7 @@
}
agm-map {
width: 100%;
height: calc(100% - 330px);
height: 100% !important;
.overlay {
position: absolute;
top: 0px;
......@@ -146,8 +162,7 @@
margin: 0;
}
}
agm-map {
width: 100%;
.map-inner {
height: calc(100% - 235px);
}
}
......
......@@ -36,32 +36,32 @@ export class AuthService {
this.type = 1;
this.regState = true;
// this.afAuth.authState.subscribe(user => {
// console.log('here');
// console.log(user);
// if (user) {
// this.subjectService.sendLoginData(false);
// this.userData = user;
// console.log(this.userData);
// this.service.set('user', JSON.stringify(this.userData));
// this.SetUserData(user);
// this.loader = false;
// if (this.type === 1) {
// this.regState = true;
// this.router.navigateByUrl('home', { replaceUrl: true });
// } else {
// this.regState = false;
// this.router.navigateByUrl('verification', { replaceUrl: true });
// }
// } else {
// console.log('here too');
// this.loader = false;
// this.subjectService.sendLoginData(true);
// this.service.set('user', null);
// JSON.parse(localStorage.getItem('user'));
// this.router.navigateByUrl('login', { replaceUrl: true });
// }
// });
this.afAuth.authState.subscribe(user => {
console.log('here');
console.log(user);
if (user) {
this.subjectService.sendLoginData(false);
this.userData = user;
console.log(this.userData);
this.service.set('user', JSON.stringify(this.userData));
this.SetUserData(user);
this.loader = false;
if (this.type === 1) {
this.regState = true;
this.router.navigateByUrl('home', { replaceUrl: true });
} else {
this.regState = false;
this.router.navigateByUrl('verification', { replaceUrl: true });
}
} else {
console.log('here too');
this.loader = false;
this.subjectService.sendLoginData(true);
this.service.set('user', null);
JSON.parse(localStorage.getItem('user'));
this.router.navigateByUrl('login', { replaceUrl: true });
}
});
}
checkLogin() {
......
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