Commit 2b6b7cdd by Adarsh K

changes

parents a6945f34 523b5916
...@@ -106,5 +106,5 @@ ...@@ -106,5 +106,5 @@
</plugin> </plugin>
<plugin name="cordova-plugin-nativegeocoder" spec="3.2.2" /> <plugin name="cordova-plugin-nativegeocoder" spec="3.2.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.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> </widget>
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"@ionic-native/core": "^5.19.1", "@ionic-native/core": "^5.19.1",
"@ionic-native/geolocation": "^5.19.1", "@ionic-native/geolocation": "^5.19.1",
"@ionic-native/google-plus": "^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/native-geocoder": "^5.19.1",
"@ionic-native/navigation-bar": "^5.21.6", "@ionic-native/navigation-bar": "^5.21.6",
"@ionic-native/social-sharing": "^5.20.0", "@ionic-native/social-sharing": "^5.20.0",
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
"@types/googlemaps": "^3.39.2", "@types/googlemaps": "^3.39.2",
"agm-direction": "^0.7.9", "agm-direction": "^0.7.9",
"call-number": "^1.0.1", "call-number": "^1.0.1",
"cordova-android": "8.0.0", "cordova-android": "^8.1.0",
"cordova-plugin-device": "^2.0.3", "cordova-plugin-device": "^2.0.3",
"cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-googleplus": "^8.4.0", "cordova-plugin-googleplus": "^8.4.0",
...@@ -51,9 +52,11 @@ ...@@ -51,9 +52,11 @@
"cordova-plugin-x-socialsharing": "^5.6.4", "cordova-plugin-x-socialsharing": "^5.6.4",
"cordova-sqlite-storage": "^3.4.1", "cordova-sqlite-storage": "^3.4.1",
"core-js": "^2.6.11", "core-js": "^2.6.11",
"elementtree": "^0.1.7",
"es6-promise-plugin": "^4.2.2", "es6-promise-plugin": "^4.2.2",
"firebase": "^6.6.2", "firebase": "^7.6.1",
"mx.ferreyra.callnumber": "0.0.2", "mx.ferreyra.callnumber": "0.0.2",
"properties-parser": "^0.3.1",
"rxjs": "^6.5.4", "rxjs": "^6.5.4",
"rxjs-compat": "^6.5.4", "rxjs-compat": "^6.5.4",
"tslib": "^1.9.0", "tslib": "^1.9.0",
......
...@@ -32,6 +32,7 @@ import { SearchmodalPageModule } from './searchmodal/searchmodal.module'; ...@@ -32,6 +32,7 @@ import { SearchmodalPageModule } from './searchmodal/searchmodal.module';
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { CallNumber } from '@ionic-native/call-number/ngx'; import { CallNumber } from '@ionic-native/call-number/ngx';
import { sanitizeHtmlPipe } from './../config/safehtml'; import { sanitizeHtmlPipe } from './../config/safehtml';
import { Keyboard } from '@ionic-native/keyboard/ngx';
@NgModule({ @NgModule({
declarations: [AppComponent], declarations: [AppComponent],
...@@ -62,7 +63,8 @@ import { sanitizeHtmlPipe } from './../config/safehtml'; ...@@ -62,7 +63,8 @@ import { sanitizeHtmlPipe } from './../config/safehtml';
GooglePlus, GooglePlus,
SocialSharing, SocialSharing,
sanitizeHtmlPipe, sanitizeHtmlPipe,
NavigationBar NavigationBar,
Keyboard
], ],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
......
...@@ -55,4 +55,10 @@ ...@@ -55,4 +55,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="loader" *ngIf="loader">
<div class="lds-ripple">
<div></div>
<div></div>
</div>
</div>
</ion-content> </ion-content>
\ No newline at end of file
.home_wrapper { .home_wrapper {
width: 100%; width: 100%;
padding-bottom: 50px;
.home_banner { .home_banner {
width: 100%; width: 100%;
height: 300px; height: 300px;
...@@ -150,12 +151,11 @@ ...@@ -150,12 +151,11 @@
width: 120px; width: 120px;
height: 125px; height: 125px;
float: left; float: left;
background-color: #a8a8a8;
border-radius: 8px; border-radius: 8px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: contain;
object-position: center; object-position: center;
} }
} }
...@@ -296,14 +296,14 @@ ...@@ -296,14 +296,14 @@
.styled-checkbox { .styled-checkbox {
position: absolute; // take it out of document flow position: absolute; // take it out of document flow
opacity: 0; // hide it opacity: 0; // hide it
& + label { &+label {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
padding: 0; padding: 0;
width: 100%; width: 100%;
} }
// Box. // Box.
& + label:before { &+label:before {
content: ''; content: '';
margin-right: 10px; margin-right: 10px;
display: inline-block; display: inline-block;
...@@ -314,21 +314,21 @@ ...@@ -314,21 +314,21 @@
background: white; background: white;
border: 1px solid rgba(215, 213, 228, 1); border: 1px solid rgba(215, 213, 228, 1);
} }
&:checked + label:before { &:checked+label:before {
background: #29285b; background: #29285b;
} }
// Disabled state label. // Disabled state label.
&:disabled + label { &:disabled+label {
color: #b8b8b8; color: #b8b8b8;
cursor: auto; cursor: auto;
} }
// Disabled box. // Disabled box.
&:disabled + label:before { &:disabled+label:before {
box-shadow: none; box-shadow: none;
background: #ddd; background: #ddd;
} }
// Checkmark. Could be replaced with an image // Checkmark. Could be replaced with an image
&:checked + label:after { &:checked+label:after {
content: ''; content: '';
position: absolute; position: absolute;
left: 6px; left: 6px;
...@@ -336,8 +336,7 @@ ...@@ -336,8 +336,7 @@
background: white; background: white;
width: 2px; width: 2px;
height: 2px; height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 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;
4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg); transform: rotate(45deg);
} }
} }
......
...@@ -31,6 +31,7 @@ export class CatStorelistPage implements OnInit { ...@@ -31,6 +31,7 @@ export class CatStorelistPage implements OnInit {
slidesPerView: 1.5 slidesPerView: 1.5
}; };
data: any; data: any;
loader: boolean;
constructor( constructor(
public router: Router, public router: Router,
...@@ -41,15 +42,19 @@ export class CatStorelistPage implements OnInit { ...@@ -41,15 +42,19 @@ export class CatStorelistPage implements OnInit {
private modalController: ModalController, private modalController: ModalController,
private subjectService: SubjectService private subjectService: SubjectService
) { ) {
this.loader = true;
this.service.get('catParams').then(val => { this.service.get('catParams').then(val => {
this.data = val; this.data = val;
if (this.data.catId === '0') { if (this.data.catId === '0') {
this.shopperService.shopperList(true, 'status'); this.shopperService.shopperList(true, 'status');
} else { } else {
console.log('error'); this.shopperService.categoryShopperList(this.data.catId);
this.shopperService.shopperList(this.data.catId, 'catId');
} }
}); });
const This = this;
setTimeout(() => {
This.loader = false;
}, 2000);
} }
async clickSearch() { async clickSearch() {
......
...@@ -47,7 +47,7 @@ export class ChangedetailsPage implements OnInit { ...@@ -47,7 +47,7 @@ export class ChangedetailsPage implements OnInit {
// }); // });
} }
ngOnInit() {} ngOnInit() { }
goToPage(path, data = null) { goToPage(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data }); this.router.navigateByUrl(path, { queryParams: data });
...@@ -68,7 +68,7 @@ export class ChangedetailsPage implements OnInit { ...@@ -68,7 +68,7 @@ export class ChangedetailsPage implements OnInit {
form.value.password && form.value.password &&
form.value.password === form.value.confirmPassword form.value.password === form.value.confirmPassword
) { ) {
this.register.updateData(form.value, this.userData.uid); this.register.updateData(form.value, this.userData);
this.register.updatePassword( this.register.updatePassword(
form.value.currentPassword, form.value.currentPassword,
form.value.password form.value.password
......
<div class="nav_header"> <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" /> <img src="../assets/Group17_2.png" />
</button> </button>
<div class="nav_title floatLeft"> <div class="nav_title floatLeft">
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
</div> </div>
<div class="home_sub_header"> <div class="home_sub_header">
<span class="floatLeft">Nearby Shopping Centers</span> <span class="floatLeft">Nearby Shopping Centers</span>
<span class="floatRight"> <!-- <span class="floatRight">
<div class="nearby_icon" (click)="goToPage('nearby')"></div> <div class="nearby_icon" (click)="goToPage('nearby')"></div>
</span> </span> -->
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="nearby_shop_list"> <div class="nearby_shop_list">
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</ul> </ul>
</div> </div>
<div class="home_sub_header"> <div class="home_sub_header">
Featured Catagories Featured Categories
</div> </div>
<div class="featured_catagory_list"> <div class="featured_catagory_list">
<ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0"> <ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0">
...@@ -122,10 +122,16 @@ ...@@ -122,10 +122,16 @@
<ion-content class="sort_wrappper"> <ion-content class="sort_wrappper">
<agm-map [zoom]="20" [latitude]="lat" [longitude]="lng" [disableDefaultUI]="false" [zoomControl]="false" <agm-map [zoom]="20" [latitude]="lat" [longitude]="lng" [disableDefaultUI]="false" [zoomControl]="false"
[backgroundColor]="'rgba(29, 27, 130,0.2)'"> [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> </agm-map>
<div class="add_address_wrapper"> <div class="add_address_wrapper">
<h5 class="floatLeft">NEW ADDRESS</h5> <h5 class="floatLeft">ADDRESS LIST</h5>
<h5 class="floatRight" (click)="istoggle(); goToPage('nearby')"> <h5 class="floatRight" (click)="istoggle(); goToPage('nearby')">
ADD NEW ADD NEW
</h5> </h5>
......
...@@ -104,7 +104,7 @@ export class HomePage implements OnInit { ...@@ -104,7 +104,7 @@ export class HomePage implements OnInit {
console.log(status); console.log(status);
if (status === 'OK') { if (status === 'OK') {
if (results[0]) { if (results[0]) {
const addressData = results[0].formatted_address.split(', '); const addressData = results[1].formatted_address.split(', ');
this.address = addressData[0] + ', ' + addressData[1]; this.address = addressData[0] + ', ' + addressData[1];
console.log(this.address); console.log(this.address);
} else { } else {
...@@ -119,14 +119,26 @@ export class HomePage implements OnInit { ...@@ -119,14 +119,26 @@ export class HomePage implements OnInit {
setDefault(address: any) { setDefault(address: any) {
this.loader = true; this.loader = true;
this.addressService.setDefaultAddress(address.addressId, this.custId).then(() => { this.addressService
.setDefaultAddress(address.addressId, this.custId)
.then(() => {
this.address = address.address; this.address = address.address;
console.log(address.latLng); console.log(address.latLng);
this.centerService.getNearBy(address.latLng._lat, address.latLng._long, this.service.distance); this.centerService.getNearBy(
address.latLng._lat,
address.latLng._long,
this.service.distance
);
this.loader = false; this.loader = false;
}).catch(err => { })
.catch(err => {
this.loader = false; this.loader = false;
this.service.showToast('Something went wrong please try again!', 'top', 'my-error', 1000); this.service.showToast(
'Something went wrong please try again!',
'top',
'my-error',
1000
);
}); });
} }
...@@ -153,7 +165,6 @@ export class HomePage implements OnInit { ...@@ -153,7 +165,6 @@ export class HomePage implements OnInit {
} else if (path === 'catstorelist') { } else if (path === 'catstorelist') {
this.service.set('catParams', data); this.service.set('catParams', data);
} else { } else {
} }
this.router.navigateByUrl(path, { queryParams: data }); this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0; document.body.scrollTop = document.documentElement.scrollTop = 0;
......
...@@ -3,28 +3,30 @@ ...@@ -3,28 +3,30 @@
<img src="../assets/Group17_2.png" /> <img src="../assets/Group17_2.png" />
</button> </button>
<div class="nav_title floatLeft"> <div class="nav_title floatLeft">
<h4>NEAR BY STORES</h4> <h4>NEW ADDRESS</h4>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
<div class="nearby_map"> <div class="nearby_map">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="8" [backgroundColor]="'rgba(29, 27, 130,0.2)'"> <agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="8" [backgroundColor]="'rgba(29, 27, 130,0.2)'">
<agm-marker [latitude]="latitude" [longitude]="longitude" [markerDraggable]="true" <agm-marker [latitude]="latitude" [longitude]="longitude" [markerDraggable]="true" (dragEnd)="markerDragEnd($event)" [iconUrl]="
(dragEnd)="markerDragEnd($event)"></agm-marker> {
url: './assets/pin.svg',
scaledSize: {
width: 28,
height: 40
}}"></agm-marker>
</agm-map> </agm-map>
<form (ngSubmit)="onSubmit(addressForm.value); addressForm.reset()" #addressForm="ngForm" method="post" <form (ngSubmit)="onSubmit(addressForm.value); addressForm.reset()" #addressForm="ngForm" method="post" class="form-horizontal">
class="form-horizontal">
<div class="add_address_wrapper"> <div class="add_address_wrapper">
<h5>DELIVERY</h5> <h5>DELIVERY</h5>
<p>{{address}}</p> <p>{{address}}</p>
<input [(ngModel)]="addressForm.building" name="building" #building="ngModel" name="building" required <input [(ngModel)]="addressForm.building" name="building" #building="ngModel" name="building" required placeholder="House No./ Building No" />
placeholder="House No./ Building No" />
<div class="md-errors-spacer" [hidden]="building.valid || landmark.pristine" class="ion-padding-start"> <div class="md-errors-spacer" [hidden]="building.valid || landmark.pristine" class="ion-padding-start">
Building Name is required Building Name is required
</div> </div>
<input [(ngModel)]="addressForm.landmark" name="landmark" #landmark="ngModel" name="landmark" required <input [(ngModel)]="addressForm.landmark" name="landmark" #landmark="ngModel" name="landmark" required placeholder="Landmark" />
placeholder="Landmark" />
<div class="md-errors-spacer" [hidden]="landmark.valid || landmark.pristine" class="ion-padding-start"> <div class="md-errors-spacer" [hidden]="landmark.valid || landmark.pristine" class="ion-padding-start">
Landmark is required Landmark is required
</div> </div>
...@@ -32,22 +34,19 @@ ...@@ -32,22 +34,19 @@
<ion-row> <ion-row>
<ion-col> <ion-col>
<h6> <h6>
<input class="styled-checkbox" id="styled-check-1" type="radio" value="Home" <input class="styled-checkbox" id="styled-check-1" type="radio" value="Home" [(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
[(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
<label for="styled-check-1"><span>Home</span></label> <label for="styled-check-1"><span>Home</span></label>
</h6> </h6>
</ion-col> </ion-col>
<ion-col> <ion-col>
<h6> <h6>
<input class="styled-checkbox" id="styled-check-2" type="radio" value="Work" <input class="styled-checkbox" id="styled-check-2" type="radio" value="Work" [(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
[(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
<label for="styled-check-2"><span>Office</span></label> <label for="styled-check-2"><span>Office</span></label>
</h6> </h6>
</ion-col> </ion-col>
<ion-col> <ion-col>
<h6> <h6>
<input class="styled-checkbox" id="styled-check-3" type="radio" value="Other" <input class="styled-checkbox" id="styled-check-3" type="radio" value="Other" [(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
[(ngModel)]="addressForm.addressType" name="addressType" #addressType="ngModel" required />
<label for="styled-check-3"><span>Others</span></label> <label for="styled-check-3"><span>Others</span></label>
</h6> </h6>
</ion-col> </ion-col>
......
.nearby_map { .nearby_map {
width: 100%; width: 100%;
height: 100%; height: 100%;
.overlay { .overlay {
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
} }
agm-map { agm-map {
width: 100%; width: 100%;
height: 100vh; height: calc(100% - 330px);
.overlay { .overlay {
position: absolute; position: absolute;
top: 0px; top: 0px;
...@@ -130,4 +130,25 @@ ...@@ -130,4 +130,25 @@
transform: rotate(45deg); transform: rotate(45deg);
} }
} }
} }
\ No newline at end of file
@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
...@@ -25,6 +25,7 @@ export class ProductdetailPage implements OnInit { ...@@ -25,6 +25,7 @@ export class ProductdetailPage implements OnInit {
data: any; data: any;
slideData: any[]; slideData: any[];
loader: boolean; loader: boolean;
custId: any;
bannerOptions = { bannerOptions = {
slidesPerView: 1, slidesPerView: 1,
...@@ -70,6 +71,7 @@ export class ProductdetailPage implements OnInit { ...@@ -70,6 +71,7 @@ export class ProductdetailPage implements OnInit {
const users = this.service.get('user').then(data => { const users = this.service.get('user').then(data => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.custId = data.uid;
const This = this; const This = this;
this.cartService.cartList(data.uid); this.cartService.cartList(data.uid);
} }
...@@ -171,16 +173,16 @@ export class ProductdetailPage implements OnInit { ...@@ -171,16 +173,16 @@ export class ProductdetailPage implements OnInit {
} }
changeFav(index) { changeFav(index) {
this.prodService.changeFav(index, 'yes'); this.prodService.changeFav(index, 'yes', this.custId);
const state = this.prodService.fav.findIndex(x => x === index); const state = this.prodService.fav.findIndex(x => x === index);
// console.log(state); // console.log(state);
// console.log(this.prodService.fav); // console.log(this.prodService.fav);
if (state > -1) { if (state > -1) {
this.prodService.fav.splice(state, 1); this.prodService.fav.splice(state, 1);
this.prodService.changeFav(index, 'yes'); this.prodService.changeFav(index, 'yes', this.custId);
} else { } else {
this.prodService.fav.push(index); this.prodService.fav.push(index);
this.prodService.changeFav(index, 'no'); this.prodService.changeFav(index, 'no', this.custId);
} }
return; return;
// console.log(this.prodService.fav); // console.log(this.prodService.fav);
......
...@@ -289,3 +289,11 @@ ...@@ -289,3 +289,11 @@
margin-top: 10px; 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 { ...@@ -46,7 +46,7 @@ export class ProductlistPage implements OnInit {
private subjectService: SubjectService private subjectService: SubjectService
) { ) {
this.loader = true; this.loader = true;
const users = this.service.get('user').then(data => { const users = this.service.get('userData').then(data => {
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.custId = data.uid; this.custId = data.uid;
...@@ -72,8 +72,10 @@ export class ProductlistPage implements OnInit { ...@@ -72,8 +72,10 @@ export class ProductlistPage implements OnInit {
} }
}); });
const users = this.service.get('user').then(data => { const users = this.service.get('user').then(data => {
console.log(data);
if (data) { if (data) {
data = JSON.parse(data); data = JSON.parse(data);
this.custId = data.uid;
this.prodService.getFavlist(data.uid); this.prodService.getFavlist(data.uid);
} }
}); });
...@@ -129,10 +131,10 @@ export class ProductlistPage implements OnInit { ...@@ -129,10 +131,10 @@ export class ProductlistPage implements OnInit {
console.log(this.prodService.fav); console.log(this.prodService.fav);
if (state > -1) { if (state > -1) {
this.prodService.fav.splice(state, 1); this.prodService.fav.splice(state, 1);
this.prodService.changeFav(index, 'yes'); this.prodService.changeFav(index, 'yes', this.custId);
} else { } else {
this.prodService.fav.push(index); this.prodService.fav.push(index);
this.prodService.changeFav(index, 'no'); this.prodService.changeFav(index, 'no', this.custId);
} }
return; return;
console.log(this.prodService.fav); console.log(this.prodService.fav);
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<div class="account_wrapper"> <div class="account_wrapper">
<div class="account_header"> <div class="account_header">
<h5 class="floatLeft">ACCOUNT INFORMATION</h5> <h5 class="floatLeft">ACCOUNT INFORMATION</h5>
<span class="floatRight" (click)="goToPage('changedetails', user && user)"><img <span class="floatRight" (click)="goToPage('changedetails', user && user)"><img src="../../assets/edit.png"
src="../../assets/edit.png" /></span> /></span>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="row"> <div class="row">
...@@ -40,9 +40,11 @@ ...@@ -40,9 +40,11 @@
</ion-col> </ion-col>
<ion-col class="textRight p0"> <ion-col class="textRight p0">
<h6>{{loggedUser.phone}}</h6> <h6>{{loggedUser.phone}}</h6>
<span class="ar-span" *ngIf="loggedUser.phoneVerified == true">Verified</span> <span class="ar-span" *ngIf="loggedUser.phoneVerified == true">Verified</span
<span class="ar-span" *ngIf="loggedUser.phoneVerified == false">Not >
Verified yet</span> <span class="ar-span" *ngIf="loggedUser.phoneVerified == false"
>Not Verified yet</span
>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
...@@ -55,8 +57,12 @@ ...@@ -55,8 +57,12 @@
</ion-col> </ion-col>
<ion-col class="textRight p0"> <ion-col class="textRight p0">
<h6>{{loggedUser.emailId}}</h6> <h6>{{loggedUser.emailId}}</h6>
<span class="ar-span" *ngIf="loggedUser.emailVerified == true">Verified</span> <span class="ar-span" *ngIf="loggedUser.emailVerified == true"
<span class="ar-span" *ngIf="loggedUser.emailVerified == false">Not Verified yet</span> >Verified</span
>
<span class="ar-span" *ngIf="loggedUser.emailVerified == false"
>Not Verified yet</span
>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
......
...@@ -59,8 +59,6 @@ export class ProfilePage implements OnInit { ...@@ -59,8 +59,6 @@ export class ProfilePage implements OnInit {
this.service.get('user').then(data => { this.service.get('user').then(data => {
if (data) { if (data) {
this.userData = JSON.parse(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 { ...@@ -69,7 +67,9 @@ export class ProfilePage implements OnInit {
// Get user Data // Get user Data
this.service.get('userData').then(data => { this.service.get('userData').then(data => {
if (data) { if (data) {
console.log(data);
this.loggedUser = JSON.parse(data); this.loggedUser = JSON.parse(data);
this.wishService.wishList(this.loggedUser.uid);
} }
}); });
}); });
......
<div class="nav_header"> <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" /> <img src="../assets/Group17_2.png" />
</button> </button>
<div class="nav_title floatLeft"> <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 { ...@@ -350,13 +350,19 @@ export class AuthService {
resetPassword(email: string) { resetPassword(email: string) {
this.loader = true; this.loader = true;
this.afAuth.auth.sendPasswordResetEmail(email) this.afAuth.auth
.sendPasswordResetEmail(email)
.then(() => { .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.loader = false;
this.router.navigateByUrl('login', { replaceUrl: true }); this.router.navigateByUrl('login', { replaceUrl: true });
}) })
.catch((error) => { .catch(error => {
this.service.showToast(error, 'top', 'my-error', 1000); this.service.showToast(error, 'top', 'my-error', 1000);
this.loader = false; this.loader = false;
}); });
......
...@@ -22,7 +22,8 @@ export class ProductsService { ...@@ -22,7 +22,8 @@ export class ProductsService {
this.product = []; this.product = [];
this.fav = []; this.fav = [];
this.prodSlideImg = []; this.prodSlideImg = [];
this.service.get('user').then(data => { this.service.get('userData').then(data => {
console.log(data);
this.user = JSON.parse(data); this.user = JSON.parse(data);
this.getFavlist(this.user.uid); this.getFavlist(this.user.uid);
}); });
...@@ -263,12 +264,12 @@ export class ProductsService { ...@@ -263,12 +264,12 @@ export class ProductsService {
}); });
} }
public async changeFav(index, type) { public async changeFav(index, type, custId) {
// console.log(index, type, this.user.uid); console.log(index, type, custId);
if (type === 'no') { if (type === 'no') {
this.afs this.afs
.collection('favourite') .collection('favourite')
.doc(this.user.uid) .doc(custId)
.valueChanges() .valueChanges()
.pipe( .pipe(
take(1) // Here you can limit to only emit once, using the take operator take(1) // Here you can limit to only emit once, using the take operator
...@@ -277,7 +278,7 @@ export class ProductsService { ...@@ -277,7 +278,7 @@ export class ProductsService {
if (value === undefined) { if (value === undefined) {
this.afs this.afs
.collection('favourite') .collection('favourite')
.doc(this.user.uid) .doc(custId)
.set({ .set({
[index]: true [index]: true
}); });
...@@ -287,14 +288,14 @@ export class ProductsService { ...@@ -287,14 +288,14 @@ export class ProductsService {
// console.log(value); // console.log(value);
this.afs this.afs
.collection('favourite') .collection('favourite')
.doc(this.user.uid) .doc(custId)
.set(value); .set(value);
} }
}); });
} else { } else {
this.afs this.afs
.collection('favourite') .collection('favourite')
.doc(this.user.uid) .doc(custId)
.valueChanges() .valueChanges()
.pipe( .pipe(
take(1) // Here you can limit to only emit once, using the take operator take(1) // Here you can limit to only emit once, using the take operator
...@@ -309,7 +310,7 @@ export class ProductsService { ...@@ -309,7 +310,7 @@ export class ProductsService {
// console.log(value); // console.log(value);
this.afs this.afs
.collection('favourite') .collection('favourite')
.doc(this.user.uid) .doc(custId)
.set(value); .set(value);
} else { } else {
// console.log(value); // console.log(value);
......
...@@ -16,7 +16,11 @@ export class ShoppersService { ...@@ -16,7 +16,11 @@ export class ShoppersService {
shoppers: Shopper[] = []; shoppers: Shopper[] = [];
activeshoppers: Shopper[] = []; activeshoppers: Shopper[] = [];
nearshoppers: 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.featuredshopperList();
this.getNearBy(-33.87276, 151.20534, this.service.distance); this.getNearBy(-33.87276, 151.20534, this.service.distance);
} }
...@@ -62,6 +66,121 @@ export class ShoppersService { ...@@ -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() { public async featuredshopperList() {
const This = this; const This = this;
const state = true; 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