Commit 2b6b7cdd by Adarsh K

changes

parents a6945f34 523b5916
......@@ -106,5 +106,5 @@
</plugin>
<plugin name="cordova-plugin-nativegeocoder" spec="3.2.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<engine name="android" spec="8.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="2.2.0" />
</widget>
......@@ -27,6 +27,7 @@
"@ionic-native/core": "^5.19.1",
"@ionic-native/geolocation": "^5.19.1",
"@ionic-native/google-plus": "^5.19.1",
"@ionic-native/keyboard": "^5.21.6",
"@ionic-native/native-geocoder": "^5.19.1",
"@ionic-native/navigation-bar": "^5.21.6",
"@ionic-native/social-sharing": "^5.20.0",
......@@ -37,7 +38,7 @@
"@types/googlemaps": "^3.39.2",
"agm-direction": "^0.7.9",
"call-number": "^1.0.1",
"cordova-android": "8.0.0",
"cordova-android": "^8.1.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-googleplus": "^8.4.0",
......@@ -51,9 +52,11 @@
"cordova-plugin-x-socialsharing": "^5.6.4",
"cordova-sqlite-storage": "^3.4.1",
"core-js": "^2.6.11",
"elementtree": "^0.1.7",
"es6-promise-plugin": "^4.2.2",
"firebase": "^6.6.2",
"firebase": "^7.6.1",
"mx.ferreyra.callnumber": "0.0.2",
"properties-parser": "^0.3.1",
"rxjs": "^6.5.4",
"rxjs-compat": "^6.5.4",
"tslib": "^1.9.0",
......
......@@ -32,6 +32,7 @@ import { SearchmodalPageModule } from './searchmodal/searchmodal.module';
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { CallNumber } from '@ionic-native/call-number/ngx';
import { sanitizeHtmlPipe } from './../config/safehtml';
import { Keyboard } from '@ionic-native/keyboard/ngx';
@NgModule({
declarations: [AppComponent],
......@@ -62,7 +63,8 @@ import { sanitizeHtmlPipe } from './../config/safehtml';
GooglePlus,
SocialSharing,
sanitizeHtmlPipe,
NavigationBar
NavigationBar,
Keyboard
],
bootstrap: [AppComponent]
})
......
......@@ -55,4 +55,10 @@
</div>
</div>
</div>
<div class="loader" *ngIf="loader">
<div class="lds-ripple">
<div></div>
<div></div>
</div>
</div>
</ion-content>
\ No newline at end of file
......@@ -31,6 +31,7 @@ export class CatStorelistPage implements OnInit {
slidesPerView: 1.5
};
data: any;
loader: boolean;
constructor(
public router: Router,
......@@ -41,15 +42,19 @@ export class CatStorelistPage implements OnInit {
private modalController: ModalController,
private subjectService: SubjectService
) {
this.loader = true;
this.service.get('catParams').then(val => {
this.data = val;
if (this.data.catId === '0') {
this.shopperService.shopperList(true, 'status');
} else {
console.log('error');
this.shopperService.shopperList(this.data.catId, 'catId');
this.shopperService.categoryShopperList(this.data.catId);
}
});
const This = this;
setTimeout(() => {
This.loader = false;
}, 2000);
}
async clickSearch() {
......
......@@ -47,7 +47,7 @@ export class ChangedetailsPage implements OnInit {
// });
}
ngOnInit() {}
ngOnInit() { }
goToPage(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data });
......@@ -68,7 +68,7 @@ export class ChangedetailsPage implements OnInit {
form.value.password &&
form.value.password === form.value.confirmPassword
) {
this.register.updateData(form.value, this.userData.uid);
this.register.updateData(form.value, this.userData);
this.register.updatePassword(
form.value.currentPassword,
form.value.password
......
<div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()">
<button class="nav_btn nav_back floatLeft" (click)="goToPage('login')">
<img src="../assets/Group17_2.png" />
</button>
<div class="nav_title floatLeft">
<h4>FORGOT PASSWORD</h4>
</div>
<div class="clear"></div>
<div class="nav_title floatLeft">
<h4>FORGOT PASSWORD</h4>
</div>
<div class="clear"></div>
</div>
<ion-content>
<div class="verification_div">
<div class="form_div">
<div class="row">
<input class="" type="email" placeholder="Type your email Id" #emailId required />
</div>
<div class="row">
<button class="login_btn" (click)="authService.resetPassword(emailId.value);">
<div class="verification_div">
<div class="form_div">
<div class="row">
<input class="" type="email" placeholder="Type your email Id" #emailId required />
</div>
<div class="row">
<button class="login_btn" (click)="authService.resetPassword(emailId.value);">
RESET PASSWORD
</button>
</div>
</div>
</div>
</div>
</div>
</ion-content>
<div class="loader" *ngIf="authService.loader">
<div class="lds-ripple">
<div></div>
<div></div>
</div>
<div class="lds-ripple">
<div></div>
<div></div>
</div>
</div>
\ No newline at end of file
......@@ -66,9 +66,9 @@
</div>
<div class="home_sub_header">
<span class="floatLeft">Nearby Shopping Centers</span>
<span class="floatRight">
<!-- <span class="floatRight">
<div class="nearby_icon" (click)="goToPage('nearby')"></div>
</span>
</span> -->
<div class="clear"></div>
</div>
<div class="nearby_shop_list">
......@@ -93,7 +93,7 @@
</ul>
</div>
<div class="home_sub_header">
Featured Catagories
Featured Categories
</div>
<div class="featured_catagory_list">
<ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0">
......@@ -122,10 +122,16 @@
<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-marker [latitude]="lat" [longitude]="lng"></agm-marker>
<agm-marker [latitude]="lat" [longitude]="lng" [iconUrl]="
{
url: './assets/pin.svg',
scaledSize: {
width: 28,
height: 40
}}"></agm-marker>
</agm-map>
<div class="add_address_wrapper">
<h5 class="floatLeft">NEW ADDRESS</h5>
<h5 class="floatLeft">ADDRESS LIST</h5>
<h5 class="floatRight" (click)="istoggle(); goToPage('nearby')">
ADD NEW
</h5>
......
......@@ -104,7 +104,7 @@ export class HomePage implements OnInit {
console.log(status);
if (status === 'OK') {
if (results[0]) {
const addressData = results[0].formatted_address.split(', ');
const addressData = results[1].formatted_address.split(', ');
this.address = addressData[0] + ', ' + addressData[1];
console.log(this.address);
} else {
......@@ -119,15 +119,27 @@ export class HomePage implements OnInit {
setDefault(address: any) {
this.loader = true;
this.addressService.setDefaultAddress(address.addressId, this.custId).then(() => {
this.address = address.address;
console.log(address.latLng);
this.centerService.getNearBy(address.latLng._lat, address.latLng._long, this.service.distance);
this.loader = false;
}).catch(err => {
this.loader = false;
this.service.showToast('Something went wrong please try again!', 'top', 'my-error', 1000);
});
this.addressService
.setDefaultAddress(address.addressId, this.custId)
.then(() => {
this.address = address.address;
console.log(address.latLng);
this.centerService.getNearBy(
address.latLng._lat,
address.latLng._long,
this.service.distance
);
this.loader = false;
})
.catch(err => {
this.loader = false;
this.service.showToast(
'Something went wrong please try again!',
'top',
'my-error',
1000
);
});
}
clickSearch() {
......@@ -153,7 +165,6 @@ export class HomePage implements OnInit {
} else if (path === 'catstorelist') {
this.service.set('catParams', data);
} else {
}
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
......
<div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()" *ngIf="authService.regState">
<img src="../assets/Group17_2.png" />
</button>
<div class="nav_title floatLeft">
<h4>NEAR BY STORES</h4>
</div>
<div class="clear"></div>
<button class="nav_btn nav_back floatLeft" (click)="goBack()" *ngIf="authService.regState">
<img src="../assets/Group17_2.png" />
</button>
<div class="nav_title floatLeft">
<h4>NEW ADDRESS</h4>
</div>
<div class="clear"></div>
</div>
<ion-content>
<div class="nearby_map">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="8" [backgroundColor]="'rgba(29, 27, 130,0.2)'">
<agm-marker [latitude]="latitude" [longitude]="longitude" [markerDraggable]="true"
(dragEnd)="markerDragEnd($event)"></agm-marker>
</agm-map>
<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" />
<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" />
<div class="md-errors-spacer" [hidden]="landmark.valid || landmark.pristine" class="ion-padding-start">
Landmark is required
<div class="nearby_map">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="8" [backgroundColor]="'rgba(29, 27, 130,0.2)'">
<agm-marker [latitude]="latitude" [longitude]="longitude" [markerDraggable]="true" (dragEnd)="markerDragEnd($event)" [iconUrl]="
{
url: './assets/pin.svg',
scaledSize: {
width: 28,
height: 40
}}"></agm-marker>
</agm-map>
<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" />
<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" />
<div class="md-errors-spacer" [hidden]="landmark.valid || landmark.pristine" class="ion-padding-start">
Landmark is required
</div>
<ion-grid>
<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 />
<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 />
<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 />
<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">
Address Type is required
</div>
</ion-grid>
<button class="add_btn" type="submit" [disabled]="!addressForm.form.valid">
ADD
</button>
</div>
</form>
</div>
<div class="loader" *ngIf="loader">
<div class="lds-ripple">
<div></div>
<div></div>
</div>
<ion-grid>
<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 />
<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 />
<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 />
<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">
Address Type is required
</div>
</ion-grid>
<button class="add_btn" type="submit" [disabled]="!addressForm.form.valid">
ADD
</button>
</div>
</form>
</div>
<div class="loader" *ngIf="loader">
<div class="lds-ripple">
<div></div>
<div></div>
</div>
</div>
</ion-content>
\ No newline at end of file
.nearby_map {
width: 100%;
height: 100%;
.overlay {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
background: rgba(29, 27, 130, 0.2);
}
agm-map {
.nearby_map {
width: 100%;
height: 100vh;
height: 100%;
.overlay {
position: absolute;
top: 0px;
......@@ -22,112 +11,144 @@
}
agm-map {
width: 100%;
height: 100%;
position: relative;
height: calc(100% - 330px);
.overlay {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
background: rgba(29, 27, 130, 0.2);
}
agm-map {
width: 100%;
height: 100%;
position: relative;
}
.click_marker {
min-width: 200px;
padding: 10px;
h5 {
margin: 0px;
padding: 0px;
}
p {
margin: 0px;
padding: 0px;
}
}
}
.click_marker {
min-width: 200px;
padding: 10px;
.add_address_wrapper {
position: fixed;
bottom: 0px;
left: 0px;
right: 0px;
padding: 20px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
background: #fff;
-webkit-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.2);
h5 {
color: rgba(41, 40, 91, 1);
margin: 0px;
padding: 0px;
font-weight: 800;
}
p {
margin: 0px;
padding: 0px;
input {
width: 100%;
height: 45px;
border: 1px solid #e1e0eb;
border-radius: 4px;
padding-left: 10px;
padding-right: 10px;
margin-bottom: 20px;
outline: none;
transition: all 0.4s ease-in-out;
&::placeholder {
color: rgba(215, 213, 228, 1);
}
&:focus {
border: 1px solid #f3d09f;
box-shadow: 3px 3px 6px 0px rgba(202, 154, 83, 0.11);
}
}
.add_btn {
width: 100%;
height: 45px;
background-color: #29285b;
color: #fff;
border-radius: 4px;
}
}
}
.add_address_wrapper {
position: fixed;
bottom: 0px;
left: 0px;
right: 0px;
padding: 20px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
background: #fff;
-webkit-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.2);
h5 {
color: rgba(41, 40, 91, 1);
margin: 0px;
padding: 0px;
font-weight: 800;
}
input {
width: 100%;
height: 45px;
border: 1px solid #e1e0eb;
border-radius: 4px;
padding-left: 10px;
padding-right: 10px;
margin-bottom: 20px;
outline: none;
transition: all 0.4s ease-in-out;
&::placeholder {
color: rgba(215, 213, 228, 1);
.styled-checkbox {
position: absolute; // take it out of document flow
opacity: 0; // hide it
&+label {
position: relative;
cursor: pointer;
padding: 0;
}
&:focus {
border: 1px solid #f3d09f;
box-shadow: 3px 3px 6px 0px rgba(202, 154, 83, 0.11);
// Box.
&+label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
border-radius: 10px;
background: white;
border: 1px solid rgba(215, 213, 228, 1);
}
// Box hover
// Box checked
&:checked+label:before {
background: #29285b;
}
// Disabled state label.
&:disabled+label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled+label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked+label:after {
content: '';
position: absolute;
left: 6px;
top: 11px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
}
}
.add_btn {
width: 100%;
height: 45px;
background-color: #29285b;
color: #fff;
border-radius: 4px;
}
}
.styled-checkbox {
position: absolute; // take it out of document flow
opacity: 0; // hide it
&+label {
position: relative;
cursor: pointer;
padding: 0;
}
// Box.
&+label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
border-radius: 10px;
background: white;
border: 1px solid rgba(215, 213, 228, 1);
}
// Box hover
// Box checked
&:checked+label:before {
background: #29285b;
}
// Disabled state label.
&:disabled+label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled+label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked+label:after {
content: '';
position: absolute;
left: 6px;
top: 11px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
@media only screen and (max-width: 350px) {
.nearby_map {
.add_address_wrapper {
padding: 10px 20px !important;
p {
margin: 2px 0;
}
input {
margin-bottom: 5px;
}
h6 {
margin: 0;
}
}
agm-map {
width: 100%;
height: calc(100% - 235px);
}
}
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ export class ProductdetailPage implements OnInit {
data: any;
slideData: any[];
loader: boolean;
custId: any;
bannerOptions = {
slidesPerView: 1,
......@@ -70,6 +71,7 @@ export class ProductdetailPage implements OnInit {
const users = this.service.get('user').then(data => {
if (data) {
data = JSON.parse(data);
this.custId = data.uid;
const This = this;
this.cartService.cartList(data.uid);
}
......@@ -171,16 +173,16 @@ export class ProductdetailPage implements OnInit {
}
changeFav(index) {
this.prodService.changeFav(index, 'yes');
this.prodService.changeFav(index, 'yes', this.custId);
const state = this.prodService.fav.findIndex(x => x === index);
// console.log(state);
// console.log(this.prodService.fav);
if (state > -1) {
this.prodService.fav.splice(state, 1);
this.prodService.changeFav(index, 'yes');
this.prodService.changeFav(index, 'yes', this.custId);
} else {
this.prodService.fav.push(index);
this.prodService.changeFav(index, 'no');
this.prodService.changeFav(index, 'no', this.custId);
}
return;
// console.log(this.prodService.fav);
......
......@@ -288,4 +288,12 @@
text-transform: uppercase;
margin-top: 10px;
}
}
@media only screen and (max-width: 350px) {
.product_list {
.ellipse {
width: 135px !important;
}
}
}
\ No newline at end of file
......@@ -46,7 +46,7 @@ export class ProductlistPage implements OnInit {
private subjectService: SubjectService
) {
this.loader = true;
const users = this.service.get('user').then(data => {
const users = this.service.get('userData').then(data => {
if (data) {
data = JSON.parse(data);
this.custId = data.uid;
......@@ -72,8 +72,10 @@ export class ProductlistPage implements OnInit {
}
});
const users = this.service.get('user').then(data => {
console.log(data);
if (data) {
data = JSON.parse(data);
this.custId = data.uid;
this.prodService.getFavlist(data.uid);
}
});
......@@ -129,10 +131,10 @@ export class ProductlistPage implements OnInit {
console.log(this.prodService.fav);
if (state > -1) {
this.prodService.fav.splice(state, 1);
this.prodService.changeFav(index, 'yes');
this.prodService.changeFav(index, 'yes', this.custId);
} else {
this.prodService.fav.push(index);
this.prodService.changeFav(index, 'no');
this.prodService.changeFav(index, 'no', this.custId);
}
return;
console.log(this.prodService.fav);
......
......@@ -27,8 +27,8 @@
<div class="account_wrapper">
<div class="account_header">
<h5 class="floatLeft">ACCOUNT INFORMATION</h5>
<span class="floatRight" (click)="goToPage('changedetails', user && user)"><img
src="../../assets/edit.png" /></span>
<span class="floatRight" (click)="goToPage('changedetails', user && user)"><img src="../../assets/edit.png"
/></span>
<div class="clear"></div>
</div>
<div class="row">
......@@ -40,50 +40,56 @@
</ion-col>
<ion-col class="textRight p0">
<h6>{{loggedUser.phone}}</h6>
<span class="ar-span" *ngIf="loggedUser.phoneVerified == true">Verified</span>
<span class="ar-span" *ngIf="loggedUser.phoneVerified == false">Not
Verified yet</span>
</ion-col>
</ion-row>
</div>
<div class="row">
<ion-row>
<ion-col class="textLeft p0">
<p>
Email
</p>
</ion-col>
<ion-col class="textRight p0">
<h6>{{loggedUser.emailId}}</h6>
<span class="ar-span" *ngIf="loggedUser.emailVerified == true">Verified</span>
<span class="ar-span" *ngIf="loggedUser.emailVerified == false">Not Verified yet</span>
</ion-col>
</ion-row>
</div>
<hr />
<ion-row (click)="goToPage('wishlist')">
<ion-col class="textLeft p0">
<p>Wishlist</p>
</ion-col>
<ion-col class="textRight p0">
<h6 *ngIf="wishService.whishItem">
({{wishService.whishItem.length}})
</h6>
</ion-col>
</ion-row>
<hr />
<ion-row (click)="goToPage('address')">
<ion-col class="textLeft p0">
<p>Address</p>
</ion-col>
<ion-col class="textRight p0">
<h6 *ngIf="addressService.addList">
({{addressService.addressList.length}})
</h6>
</ion-col>
</ion-row>
<hr />
<!-- <ion-row>
<span class="ar-span" *ngIf="loggedUser.phoneVerified == true">Verified</span
>
<span class="ar-span" *ngIf="loggedUser.phoneVerified == false"
>Not Verified yet</span
>
</ion-col>
</ion-row>
</div>
<div class="row">
<ion-row>
<ion-col class="textLeft p0">
<p>
Email
</p>
</ion-col>
<ion-col class="textRight p0">
<h6>{{loggedUser.emailId}}</h6>
<span class="ar-span" *ngIf="loggedUser.emailVerified == true"
>Verified</span
>
<span class="ar-span" *ngIf="loggedUser.emailVerified == false"
>Not Verified yet</span
>
</ion-col>
</ion-row>
</div>
<hr />
<ion-row (click)="goToPage('wishlist')">
<ion-col class="textLeft p0">
<p>Wishlist</p>
</ion-col>
<ion-col class="textRight p0">
<h6 *ngIf="wishService.whishItem">
({{wishService.whishItem.length}})
</h6>
</ion-col>
</ion-row>
<hr />
<ion-row (click)="goToPage('address')">
<ion-col class="textLeft p0">
<p>Address</p>
</ion-col>
<ion-col class="textRight p0">
<h6 *ngIf="addressService.addList">
({{addressService.addressList.length}})
</h6>
</ion-col>
</ion-row>
<hr />
<!-- <ion-row>
<ion-col class="textLeft p0">
<p>My Cards</p>
</ion-col>
......@@ -94,56 +100,56 @@
</ion-col>
</ion-row>
<hr /> -->
<ion-row (click)="goToPage('myorder')">
<ion-col class="textLeft p0">
<p>My Order</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<ion-icon name="arrow-forward"></ion-icon>
</h6>
</ion-col>
</ion-row>
<hr />
<ion-row (click)="goToPage('preference')">
<ion-col class="textLeft p0">
<p>Preferences</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<ion-icon name="arrow-forward"></ion-icon>
</h6>
</ion-col>
</ion-row>
<hr />
<ion-row>
<ion-col class="textLeft p0">
<p>Currency</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<span>AUD</span>
</h6>
</ion-col>
</ion-row>
</div>
<div class="logout-pop-wrapper" *ngIf="isShow" [@slideInOut]>
<div class="logout_inner">
<h4>Logout</h4>
<p>Are you sure to Logout ?</p>
<div class="logout_footer">
<button class="btn-cancel floatLeft" (click)="istoggle();">
Cancel
</button>
<button class="btn-logout floatRight" (click)="authService.SignOut(); istoggle()">
Logout
</button>
</div>
<ion-row (click)="goToPage('myorder')">
<ion-col class="textLeft p0">
<p>My Order</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<ion-icon name="arrow-forward"></ion-icon>
</h6>
</ion-col>
</ion-row>
<hr />
<ion-row (click)="goToPage('preference')">
<ion-col class="textLeft p0">
<p>Preferences</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<ion-icon name="arrow-forward"></ion-icon>
</h6>
</ion-col>
</ion-row>
<hr />
<ion-row>
<ion-col class="textLeft p0">
<p>Currency</p>
</ion-col>
<ion-col class="textRight p0">
<h6>
<span>AUD</span>
</h6>
</ion-col>
</ion-row>
</div>
<div class="logout-pop-wrapper" *ngIf="isShow" [@slideInOut]>
<div class="logout_inner">
<h4>Logout</h4>
<p>Are you sure to Logout ?</p>
<div class="logout_footer">
<button class="btn-cancel floatLeft" (click)="istoggle();">
Cancel
</button>
<button class="btn-logout floatRight" (click)="authService.SignOut(); istoggle()">
Logout
</button>
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</ion-content>
<div class="loader" *ngIf="loader">
<div class="lds-ripple">
......
......@@ -59,8 +59,6 @@ export class ProfilePage implements OnInit {
this.service.get('user').then(data => {
if (data) {
this.userData = JSON.parse(data);
this.wishService.wishList(this.userData.uid);
console.log(this.userData);
}
});
......@@ -69,7 +67,9 @@ export class ProfilePage implements OnInit {
// Get user Data
this.service.get('userData').then(data => {
if (data) {
console.log(data);
this.loggedUser = JSON.parse(data);
this.wishService.wishList(this.loggedUser.uid);
}
});
});
......
<div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()">
<button class="nav_btn nav_back floatLeft" (click)="goToPage('login')">
<img src="../assets/Group17_2.png" />
</button>
<div class="nav_title floatLeft">
......
src/assets/asset_avatar.png

26.5 KB | W: | H:

src/assets/asset_avatar.png

21.3 KB | W: | H:

src/assets/asset_avatar.png
src/assets/asset_avatar.png
src/assets/asset_avatar.png
src/assets/asset_avatar.png
  • 2-up
  • Swipe
  • Onion skin
<svg xmlns="http://www.w3.org/2000/svg" width="65.533" height="99" viewBox="0 0 65.533 99">
<g id="Group_6" data-name="Group 6" transform="translate(-20 0)">
<g id="Group_5" data-name="Group 5" transform="translate(-2.935 1.022)">
<ellipse id="Ellipse_4" data-name="Ellipse 4" cx="17" cy="6" rx="17" ry="6" transform="translate(38.935 85.978)" fill="#b5b5cd"/>
<ellipse id="Ellipse_6" data-name="Ellipse 6" cx="17" cy="6" rx="17" ry="6" transform="translate(38.935 85.978)" fill="#b5b5cd"/>
</g>
<g id="Group_2" data-name="Group 2" transform="translate(3 -3)">
<circle id="Ellipse_1" data-name="Ellipse 1" cx="24.5" cy="24.5" r="24.5" transform="translate(25 11)" fill="#fff"/>
<g id="pin" transform="translate(-0.222 -0.104)">
<path id="Path_1" data-name="Path 1" d="M49.8,96.9c-3.7-4.7-7.4-9.2-10.9-13.9A147.669,147.669,0,0,1,22.5,56.1a55.361,55.361,0,0,1-4.9-15.4,31.919,31.919,0,0,1,7.4-26A31.406,31.406,0,0,1,44.9,3.5,32.726,32.726,0,0,1,82,28.8c1.6,7.1.5,13.9-1.8,20.7A111.792,111.792,0,0,1,67.3,74.2,205.419,205.419,0,0,1,50.7,96,3.74,3.74,0,0,1,49.8,96.9Zm.3-84.6A23.6,23.6,0,1,0,73.6,35.9,23.475,23.475,0,0,0,50.1,12.3Z" fill="#242052"/>
<g id="Group_1" data-name="Group 1">
<path id="Path_2" data-name="Path 2" d="M33.3,45.1V25.6L50,16.1l4.7,2.2L37.6,28l-.1,14.6,12.6,7,12.4-6.9-.2-9.4-7.9,4.5v6.1L50.7,46l-9.4-5.1V29.7l16.2-9.2,4.7,2.2L45.5,32.2v6.1L50.1,41l.1-5.7,16.5-9.4V45.1L50.1,54.5Z" fill="#c9974d"/>
</g>
</g>
</g>
</g>
</svg>
......@@ -350,13 +350,19 @@ export class AuthService {
resetPassword(email: string) {
this.loader = true;
this.afAuth.auth.sendPasswordResetEmail(email)
this.afAuth.auth
.sendPasswordResetEmail(email)
.then(() => {
this.service.showToast('Password reset mail has been sent your mail Id', 'top', 'my-toast', 2000);
this.service.showToast(
'Password reset mail has been sent your mail Id',
'top',
'my-toast',
2000
);
this.loader = false;
this.router.navigateByUrl('login', { replaceUrl: true });
})
.catch((error) => {
.catch(error => {
this.service.showToast(error, 'top', 'my-error', 1000);
this.loader = false;
});
......
......@@ -22,7 +22,8 @@ export class ProductsService {
this.product = [];
this.fav = [];
this.prodSlideImg = [];
this.service.get('user').then(data => {
this.service.get('userData').then(data => {
console.log(data);
this.user = JSON.parse(data);
this.getFavlist(this.user.uid);
});
......@@ -263,12 +264,12 @@ export class ProductsService {
});
}
public async changeFav(index, type) {
// console.log(index, type, this.user.uid);
public async changeFav(index, type, custId) {
console.log(index, type, custId);
if (type === 'no') {
this.afs
.collection('favourite')
.doc(this.user.uid)
.doc(custId)
.valueChanges()
.pipe(
take(1) // Here you can limit to only emit once, using the take operator
......@@ -277,7 +278,7 @@ export class ProductsService {
if (value === undefined) {
this.afs
.collection('favourite')
.doc(this.user.uid)
.doc(custId)
.set({
[index]: true
});
......@@ -287,14 +288,14 @@ export class ProductsService {
// console.log(value);
this.afs
.collection('favourite')
.doc(this.user.uid)
.doc(custId)
.set(value);
}
});
} else {
this.afs
.collection('favourite')
.doc(this.user.uid)
.doc(custId)
.valueChanges()
.pipe(
take(1) // Here you can limit to only emit once, using the take operator
......@@ -309,7 +310,7 @@ export class ProductsService {
// console.log(value);
this.afs
.collection('favourite')
.doc(this.user.uid)
.doc(custId)
.set(value);
} else {
// console.log(value);
......
......@@ -16,7 +16,11 @@ export class ShoppersService {
shoppers: Shopper[] = [];
activeshoppers: Shopper[] = [];
nearshoppers: Shopper[] = [];
constructor(public afs: AngularFirestore, public afAuth: AngularFireAuth, public service: ServiceService) {
constructor(
public afs: AngularFirestore,
public afAuth: AngularFireAuth,
public service: ServiceService
) {
this.featuredshopperList();
this.getNearBy(-33.87276, 151.20534, this.service.distance);
}
......@@ -62,6 +66,121 @@ export class ShoppersService {
});
}
public async categoryShopperList(catId = null) {
const This = this;
const state = true;
this.shoppers = [];
const catRef = this.afs.collection('shopcategories').doc(catId).get().subscribe((data) => {
console.log(data.data());
let shoppeerList = [];
const shoppers = data.data();
if (shoppers && Object.keys(shoppers).length > 0) {
Object.keys(shoppers)
.forEach(function eachKey(key) {
shoppeerList.push(key);
});
console.log(shoppeerList);
const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
'shoppers',
ref => ref.where('uid', 'in', shoppeerList).where('status', '==', state).orderBy('name', 'asc')
);
/* this.documentosCol = this.afs.collection('shoppers', ref => ref.where('pagada', 'in', [true, false]));*/
orderRef.valueChanges().subscribe(value => {
this.shoppers = [];
const res = value;
if (res.length > 0) {
res.forEach(item => {
// console.log(item);
const shopper: Shopper = {
name: item.name,
emailId: item.emailId,
phone: item.phone,
uid: item.uid,
profilePhoto: item.profilePic,
status: item.status,
address: item.address,
featured: item.featured,
featuredImage: item.featuredImage,
shopName: item.shopName,
shopStatus: item.shopStatus,
workingHours: item.workingHours,
caption: item.caption,
centre: item.centre,
location: item.location,
rate: item.rate,
centerId: item.centerId
};
this.shoppers.push(shopper);
});
// console.log(this.shoppers);
} else {
// alert('No Orders Found');
}
});
} else {
console.log(this.shoppers);
this.shoppers = [];
this.shoppers.length = 0;
}
});
/* .then(doc => {
if (!doc.exists) {
console.log('No such document!');
} else {
console.log('Document data:', doc.data());
}
})
.catch(err => {
console.log('Error getting document', err);
}); */
/*const orderRef: AngularFirestoreCollection<any> = this.afs.collection(
'shoppers',
ref => ref.where(type, '==', centerId).where('status', '==', state).orderBy('name', 'asc')
);
orderRef.valueChanges().subscribe(value => {
this.shoppers = [];
const res = value;
if (res.length > 0) {
res.forEach(item => {
// console.log(item);
const shopper: Shopper = {
name: item.name,
emailId: item.emailId,
phone: item.phone,
uid: item.uid,
profilePhoto: item.profilePic,
status: item.status,
address: item.address,
featured: item.featured,
featuredImage: item.featuredImage,
shopName: item.shopName,
shopStatus: item.shopStatus,
workingHours: item.workingHours,
caption: item.caption,
centre: item.centre,
location: item.location,
rate: item.rate,
centerId: item.centerId
};
this.shoppers.push(shopper);
});
// console.log(this.shoppers);
} else {
// alert('No Orders Found');
}
});*/
}
public async featuredshopperList() {
const This = this;
const state = true;
......
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