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
...@@ -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">
<h4>FORGOT PASSWORD</h4> <h4>FORGOT PASSWORD</h4>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
<div class="verification_div"> <div class="verification_div">
<div class="form_div"> <div class="form_div">
<div class="row"> <div class="row">
<input class="" type="email" placeholder="Type your email Id" #emailId required /> <input class="" type="email" placeholder="Type your email Id" #emailId required />
</div> </div>
<div class="row"> <div class="row">
<button class="login_btn" (click)="authService.resetPassword(emailId.value);"> <button class="login_btn" (click)="authService.resetPassword(emailId.value);">
RESET PASSWORD RESET PASSWORD
</button> </button>
</div> </div>
</div>
</div> </div>
</div>
</ion-content> </ion-content>
<div class="loader" *ngIf="authService.loader"> <div class="loader" *ngIf="authService.loader">
<div class="lds-ripple"> <div class="lds-ripple">
<div></div> <div></div>
<div></div> <div></div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -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,15 +119,27 @@ export class HomePage implements OnInit { ...@@ -119,15 +119,27 @@ 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
this.address = address.address; .setDefaultAddress(address.addressId, this.custId)
console.log(address.latLng); .then(() => {
this.centerService.getNearBy(address.latLng._lat, address.latLng._long, this.service.distance); this.address = address.address;
this.loader = false; console.log(address.latLng);
}).catch(err => { this.centerService.getNearBy(
this.loader = false; address.latLng._lat,
this.service.showToast('Something went wrong please try again!', 'top', 'my-error', 1000); 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() { clickSearch() {
...@@ -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;
......
<div class="nav_header"> <div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()" *ngIf="authService.regState"> <button class="nav_btn nav_back floatLeft" (click)="goBack()" *ngIf="authService.regState">
<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> {
</agm-map> url: './assets/pin.svg',
<form (ngSubmit)="onSubmit(addressForm.value); addressForm.reset()" #addressForm="ngForm" method="post" scaledSize: {
class="form-horizontal"> width: 28,
<div class="add_address_wrapper"> height: 40
<h5>DELIVERY</h5> }}"></agm-marker>
<p>{{address}}</p> </agm-map>
<input [(ngModel)]="addressForm.building" name="building" #building="ngModel" name="building" required <form (ngSubmit)="onSubmit(addressForm.value); addressForm.reset()" #addressForm="ngForm" method="post" class="form-horizontal">
placeholder="House No./ Building No" /> <div class="add_address_wrapper">
<div class="md-errors-spacer" [hidden]="building.valid || landmark.pristine" class="ion-padding-start"> <h5>DELIVERY</h5>
Building Name is required <p>{{address}}</p>
</div> <input [(ngModel)]="addressForm.building" name="building" #building="ngModel" name="building" required placeholder="House No./ Building No" />
<input [(ngModel)]="addressForm.landmark" name="landmark" #landmark="ngModel" name="landmark" required <div class="md-errors-spacer" [hidden]="building.valid || landmark.pristine" class="ion-padding-start">
placeholder="Landmark" /> Building Name is required
<div class="md-errors-spacer" [hidden]="landmark.valid || landmark.pristine" class="ion-padding-start"> </div>
Landmark is required <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> </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>
</div>
</ion-content> </ion-content>
\ No newline at end of file
.nearby_map { .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 {
width: 100%; width: 100%;
height: 100vh; height: 100%;
.overlay { .overlay {
position: absolute; position: absolute;
top: 0px; top: 0px;
...@@ -22,112 +11,144 @@ ...@@ -22,112 +11,144 @@
} }
agm-map { agm-map {
width: 100%; width: 100%;
height: 100%; height: calc(100% - 330px);
position: relative; .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 { .add_address_wrapper {
min-width: 200px; position: fixed;
padding: 10px; 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 { h5 {
color: rgba(41, 40, 91, 1);
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
font-weight: 800;
} }
p { input {
margin: 0px; width: 100%;
padding: 0px; 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;
} }
} }
} .styled-checkbox {
.add_address_wrapper { position: absolute; // take it out of document flow
position: fixed; opacity: 0; // hide it
bottom: 0px; &+label {
left: 0px; position: relative;
right: 0px; cursor: pointer;
padding: 20px; padding: 0;
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);
} }
&:focus { // Box.
border: 1px solid #f3d09f; &+label:before {
box-shadow: 3px 3px 6px 0px rgba(202, 154, 83, 0.11); 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 @media only screen and (max-width: 350px) {
opacity: 0; // hide it .nearby_map {
&+label { .add_address_wrapper {
position: relative; padding: 10px 20px !important;
cursor: pointer; p {
padding: 0; margin: 2px 0;
} }
// Box. input {
&+label:before { margin-bottom: 5px;
content: ''; }
margin-right: 10px; h6 {
display: inline-block; margin: 0;
vertical-align: text-top; }
width: 20px; }
height: 20px; agm-map {
border-radius: 10px; width: 100%;
background: white; height: calc(100% - 235px);
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);
} }
} }
} \ No newline at end of file
\ 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);
......
...@@ -288,4 +288,12 @@ ...@@ -288,4 +288,12 @@
text-transform: uppercase; text-transform: uppercase;
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,50 +40,56 @@ ...@@ -40,50 +40,56 @@
</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"
</ion-col> >Not Verified yet</span
</ion-row> >
</div> </ion-col>
<div class="row"> </ion-row>
<ion-row> </div>
<ion-col class="textLeft p0"> <div class="row">
<p> <ion-row>
Email <ion-col class="textLeft p0">
</p> <p>
</ion-col> Email
<ion-col class="textRight p0"> </p>
<h6>{{loggedUser.emailId}}</h6> </ion-col>
<span class="ar-span" *ngIf="loggedUser.emailVerified == true">Verified</span> <ion-col class="textRight p0">
<span class="ar-span" *ngIf="loggedUser.emailVerified == false">Not Verified yet</span> <h6>{{loggedUser.emailId}}</h6>
</ion-col> <span class="ar-span" *ngIf="loggedUser.emailVerified == true"
</ion-row> >Verified</span
</div> >
<hr /> <span class="ar-span" *ngIf="loggedUser.emailVerified == false"
<ion-row (click)="goToPage('wishlist')"> >Not Verified yet</span
<ion-col class="textLeft p0"> >
<p>Wishlist</p> </ion-col>
</ion-col> </ion-row>
<ion-col class="textRight p0"> </div>
<h6 *ngIf="wishService.whishItem"> <hr />
({{wishService.whishItem.length}}) <ion-row (click)="goToPage('wishlist')">
</h6> <ion-col class="textLeft p0">
</ion-col> <p>Wishlist</p>
</ion-row> </ion-col>
<hr /> <ion-col class="textRight p0">
<ion-row (click)="goToPage('address')"> <h6 *ngIf="wishService.whishItem">
<ion-col class="textLeft p0"> ({{wishService.whishItem.length}})
<p>Address</p> </h6>
</ion-col> </ion-col>
<ion-col class="textRight p0"> </ion-row>
<h6 *ngIf="addressService.addList"> <hr />
({{addressService.addressList.length}}) <ion-row (click)="goToPage('address')">
</h6> <ion-col class="textLeft p0">
</ion-col> <p>Address</p>
</ion-row> </ion-col>
<hr /> <ion-col class="textRight p0">
<!-- <ion-row> <h6 *ngIf="addressService.addList">
({{addressService.addressList.length}})
</h6>
</ion-col>
</ion-row>
<hr />
<!-- <ion-row>
<ion-col class="textLeft p0"> <ion-col class="textLeft p0">
<p>My Cards</p> <p>My Cards</p>
</ion-col> </ion-col>
...@@ -94,56 +100,56 @@ ...@@ -94,56 +100,56 @@
</ion-col> </ion-col>
</ion-row> </ion-row>
<hr /> --> <hr /> -->
<ion-row (click)="goToPage('myorder')"> <ion-row (click)="goToPage('myorder')">
<ion-col class="textLeft p0"> <ion-col class="textLeft p0">
<p>My Order</p> <p>My Order</p>
</ion-col> </ion-col>
<ion-col class="textRight p0"> <ion-col class="textRight p0">
<h6> <h6>
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
</h6> </h6>
</ion-col> </ion-col>
</ion-row> </ion-row>
<hr /> <hr />
<ion-row (click)="goToPage('preference')"> <ion-row (click)="goToPage('preference')">
<ion-col class="textLeft p0"> <ion-col class="textLeft p0">
<p>Preferences</p> <p>Preferences</p>
</ion-col> </ion-col>
<ion-col class="textRight p0"> <ion-col class="textRight p0">
<h6> <h6>
<ion-icon name="arrow-forward"></ion-icon> <ion-icon name="arrow-forward"></ion-icon>
</h6> </h6>
</ion-col> </ion-col>
</ion-row> </ion-row>
<hr /> <hr />
<ion-row> <ion-row>
<ion-col class="textLeft p0"> <ion-col class="textLeft p0">
<p>Currency</p> <p>Currency</p>
</ion-col> </ion-col>
<ion-col class="textRight p0"> <ion-col class="textRight p0">
<h6> <h6>
<span>AUD</span> <span>AUD</span>
</h6> </h6>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
<div class="logout-pop-wrapper" *ngIf="isShow" [@slideInOut]> <div class="logout-pop-wrapper" *ngIf="isShow" [@slideInOut]>
<div class="logout_inner"> <div class="logout_inner">
<h4>Logout</h4> <h4>Logout</h4>
<p>Are you sure to Logout ?</p> <p>Are you sure to Logout ?</p>
<div class="logout_footer"> <div class="logout_footer">
<button class="btn-cancel floatLeft" (click)="istoggle();"> <button class="btn-cancel floatLeft" (click)="istoggle();">
Cancel Cancel
</button> </button>
<button class="btn-logout floatRight" (click)="authService.SignOut(); istoggle()"> <button class="btn-logout floatRight" (click)="authService.SignOut(); istoggle()">
Logout Logout
</button> </button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div>
</div> </div>
</div> </div>
</div>
</ion-content> </ion-content>
<div class="loader" *ngIf="loader"> <div class="loader" *ngIf="loader">
<div class="lds-ripple"> <div class="lds-ripple">
......
...@@ -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