address
Showing
| <ion-app> | <ion-app> | ||
| <ion-split-pane> | <ion-split-pane> | ||
| <ion-menu> | <ion-menu> | ||
| <ion-content> | <ion-content> | ||
| <div class="side_menu_wrapper"> | <div class="side_menu_wrapper"> | ||
| <ion-menu-toggle> | <ion-menu-toggle> | ||
| <div class="top_banner"> | <div class="top_banner"> | ||
| <div class="top_image"> | <div class="top_image"> | ||
| <img src="../assets/asset_avatar.png"> | <img src="../assets/asset_avatar.png" /> | ||
| </div> | </div> | ||
| <div class="top_detail"> | <div class="top_detail"> | ||
| <h4>John Doe</h4> | <h4>John Doe</h4> | ||
| <p>[email protected]</p> | <p>[email protected]</p> | ||
| </div> | </div> | ||
| <div class="clear"></div> | <div class="clear"></div> | ||
| </div> | </div> | ||
| </ion-menu-toggle> | </ion-menu-toggle> | ||
| <div class="sidemenu_list"> | <div class="sidemenu_list"> | ||
| <ul> | <ul> | ||
| <ion-menu-toggle> | <ion-menu-toggle> | ||
| <li (click)="vieworder('home')">Shop</li> | <li (click)="vieworder('home')">Shop</li> | ||
| </ion-menu-toggle> | </ion-menu-toggle> | ||
| <li>About us</li> | <!-- <li>About us</li> --> | ||
| <ion-menu-toggle> | <ion-menu-toggle> | ||
| <li (click)="vieworder('myorder')">View Order</li> | <li (click)="vieworder('myorder')">View Order</li> | ||
| </ion-menu-toggle> | </ion-menu-toggle> | ||
| <div class="sub_menu"> | <div class="sub_menu"> | ||
| <ul *ngIf="categoryService.activecategories"> | <ul *ngIf="categoryService.activecategories"> | ||
| <ion-menu-toggle> | <ion-menu-toggle> | ||
| <li *ngFor="let category of categoryService.activecategories" (click)="goToPage('catstorelist', category)"> | <li | ||
| {{ category.catName }} | *ngFor="let category of categoryService.activecategories" | ||
| </li> | (click)="goToPage('catstorelist', category)" | ||
| </ion-menu-toggle> | > | ||
| <!-- <li>Women's Fashion</li> | {{ category.catName }} | ||
| </li> | |||
| </ion-menu-toggle> | |||
| <!-- <li>Women's Fashion</li> | |||
| <li>Features</li> | <li>Features</li> | ||
| <li>Bags</li> | <li>Bags</li> | ||
| <li>Shoes</li> | <li>Shoes</li> | ||
| <li>Electronics</li> --> | <li>Electronics</li> --> | ||
| </ul> | </ul> | ||
| </div> | </div> | ||
| <li>Complaints & Feedback</li> | <ion-menu-toggle> | ||
| <li> | <li (click)="vieworder('feedback')">Complaints & Feedback</li> | ||
| <span class="floatLeft" (click)="authService.SignOut()">Logout</span> | </ion-menu-toggle> | ||
| <span class="floatRight version">Version 0.1.0.2</span> | <li> | ||
| <div class="clear"></div> | <span class="floatLeft" (click)="authService.SignOut()" | ||
| </li> | >Logout</span | ||
| </ul> | > | ||
| </div> | <span class="floatRight version">Version 0.1.0.2</span> | ||
| </div> | <div class="clear"></div> | ||
| </ion-content> | </li> | ||
| </ion-menu> | </ul> | ||
| <ion-router-outlet main></ion-router-outlet> | </div> | ||
| </ion-split-pane> | </div> | ||
| </ion-content> | |||
| </ion-menu> | |||
| <ion-router-outlet main></ion-router-outlet> | |||
| </ion-split-pane> | |||
| </ion-app> | </ion-app> | ||
| <div class="common_tab" [hidden]="fetchCase() === true"> | <div class="common_tab" [hidden]="fetchCase() === true"> | ||
| <ul> | <ul> | ||
| <li (click)="goToPage('home')"> | <li (click)="goToPage('home')"> | ||
| <div class="icon_sec m1_icon" [class.m1_icon_act]="sec_active1" (click)="setActive1()"></div> | <div | ||
| </li> | class="icon_sec m1_icon" | ||
| <li (click)="goToPage('catagory')"> | [class.m1_icon_act]="sec_active1" | ||
| <div class="icon_sec m2_icon" [class.m2_icon_act]="sec_active2" (click)="setActive2()"></div> | (click)="setActive1()" | ||
| </li> | ></div> | ||
| <li (click)="searchModal()"> | </li> | ||
| <div class="icon_sec m3_icon" [class.m3_icon_act]="sec_active3" (click)="setActive3()"></div> | <li (click)="goToPage('catagory')"> | ||
| </li> | <div | ||
| <!-- <li (click)="goToPage('cart')"> | class="icon_sec m2_icon" | ||
| [class.m2_icon_act]="sec_active2" | |||
| (click)="setActive2()" | |||
| ></div> | |||
| </li> | |||
| <li (click)="searchModal()"> | |||
| <div | |||
| class="icon_sec m3_icon" | |||
| [class.m3_icon_act]="sec_active3" | |||
| (click)="setActive3()" | |||
| ></div> | |||
| </li> | |||
| <!-- <li (click)="goToPage('cart')"> | |||
| <div class="icon_sec m4_icon" [class.m4_icon_act]="sec_active4" (click)="setActive4()"></div> | <div class="icon_sec m4_icon" [class.m4_icon_act]="sec_active4" (click)="setActive4()"></div> | ||
| </li> --> | </li> --> | ||
| <li (click)="goToPage('myorder')"> | <li (click)="goToPage('myorder')"> | ||
| <div class="icon_sec m5_icon" [class.m5_icon_act]="sec_active5" (click)="setActive5()"></div> | <div | ||
| </li> | class="icon_sec m5_icon" | ||
| <li (click)="goToPage('profile')"> | [class.m5_icon_act]="sec_active5" | ||
| <div class="icon_sec m6_icon" [class.m6_icon_act]="sec_active6" (click)="setActive6()" menuClose></div> | (click)="setActive5()" | ||
| </li> | ></div> | ||
| </ul> | </li> | ||
| </div> | <li (click)="goToPage('profile')"> | ||
| \ No newline at end of file | <div | ||
| class="icon_sec m6_icon" | |||
| [class.m6_icon_act]="sec_active6" | |||
| (click)="setActive6()" | |||
| menuClose | |||
| ></div> | |||
| </li> | |||
| </ul> | |||
| </div> |
| <div class="nav_header"> | <div class="nav_header"> | ||
| <ion-menu-toggle> | <ion-menu-toggle> | ||
| <button class="nav_btn nav_menu floatLeft"></button> | <button class="nav_btn nav_menu floatLeft"></button> | ||
| </ion-menu-toggle> | </ion-menu-toggle> | ||
| <div class="nav_title floatLeft"> | <div class="nav_title floatLeft"> | ||
| <img src="../../assets/Group [email protected]" /> | <img src="../../assets/Group [email protected]" /> | ||
| </div> | </div> | ||
| <div class="clear"></div> | <div class="clear"></div> | ||
| </div> | </div> | ||
| <ion-content> | <ion-content> | ||
| <div class="profile_wrapper" *ngIf="loggedUser"> | <div class="profile_wrapper" *ngIf="loggedUser"> | ||
| <div class="profile_banner"> | <div class="profile_banner"> | ||
| <!-- <div class="profile_circle"> | <!-- <div class="profile_circle"> | ||
| <div class="edit"></div> | <div class="edit"></div> | ||
| </div> --> | </div> --> | ||
| <div class="profile_circle"> | <div class="profile_circle"> | ||
| <img [src]="loggedUser.profilePhoto" onerror="this.src='./../../assets/profile_banner.png'" /> | <img | ||
| <div class="edit"></div> | [src]="loggedUser.profilePhoto" | ||
| <input type="file" accept="image/*" (change)="fileChange($event)" /> | onerror="this.src='./../../assets/profile_banner.png'" | ||
| </div> | /> | ||
| <div class="edit"></div> | |||
| <input type="file" accept="image/*" (change)="fileChange($event)" /> | |||
| </div> | |||
| <h5>{{loggedUser.name}}</h5> | <h5>{{loggedUser.name}}</h5> | ||
| <p (click)="istoggle()">LOGOUT</p> | <p (click)="istoggle()">LOGOUT</p> | ||
| </div> | |||
| <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> | |||
| <div class="clear"></div> | |||
| </div> | |||
| <div class="row"> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p> | |||
| Phone | |||
| <span *ngIf="loggedUser.phoneVerified == true">Verified</span> | |||
| <span *ngIf="loggedUser.phoneVerified == false">Not Verified yet</span> | |||
| </p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0"> | |||
| <h6>{{loggedUser.phone}}</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| </div> | |||
| <div class="row"> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p> | |||
| Email<span *ngIf="userData && userData.emailVerified == true">Verified</span> | |||
| <span *ngIf="loggedUser.emailVerified == false">Not Verified yet</span> | |||
| </p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0"> | |||
| <h6>{{loggedUser.emailId}}</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| </div> | |||
| <hr /> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p>Wishlist</p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0"> | |||
| <h6>(3)</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| <hr /> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p>Address</p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0"> | |||
| <h6>(1)</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| <hr /> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p>My Cards</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>My Order</p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0" (click)="goToPage('myorder')"> | |||
| <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> | </div> | ||
| <div class="logout-pop-wrapper" *ngIf="isShow" [@slideInOut]> | <div class="account_wrapper"> | ||
| <div class="logout_inner"> | <div class="account_header"> | ||
| <h4>Logout</h4> | <h5 class="floatLeft">ACCOUNT INFORMATION</h5> | ||
| <p>Are you sure to Logout ?</p> | <span | ||
| <div class="logout_footer"> | class="floatRight" | ||
| (click)="goToPage('changedetails', user && user)" | |||
| <button class="btn-cancel floatLeft" (click)="istoggle();">Cancel</button> | ><img src="../../assets/edit.png" | ||
| <button class="btn-logout floatRight" (click)="authService.SignOut(); istoggle()">Logout</button> | /></span> | ||
| <div class="clear"></div> | |||
| </div> | |||
| <div class="row"> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p> | |||
| Phone | |||
| <span *ngIf="loggedUser.phoneVerified == true">Verified</span> | |||
| <span *ngIf="loggedUser.phoneVerified == false" | |||
| >Not Verified yet</span | |||
| > | |||
| </p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0"> | |||
| <h6>{{loggedUser.phone}}</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| </div> | |||
| <div class="row"> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p> | |||
| Email<span *ngIf="userData && userData.emailVerified == true" | |||
| >Verified</span | |||
| > | |||
| <span *ngIf="loggedUser.emailVerified == false" | |||
| >Not Verified yet</span | |||
| > | |||
| </p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0"> | |||
| <h6>{{loggedUser.emailId}}</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| </div> | |||
| <hr /> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p>Wishlist</p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0" (click)="goToPage('wishlist')"> | |||
| <h6>(3)</h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| <hr /> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p>Address</p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0" (click)="goToPage('address')"> | |||
| <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> | |||
| <ion-col class="textRight p0" (click)="goToPage('addcard')"> | |||
| <h6> | |||
| <ion-icon name="arrow-forward"></ion-icon> | |||
| </h6> | |||
| </ion-col> | |||
| </ion-row> | |||
| <hr /> --> | |||
| <ion-row> | |||
| <ion-col class="textLeft p0"> | |||
| <p>My Order</p> | |||
| </ion-col> | |||
| <ion-col class="textRight p0" (click)="goToPage('myorder')"> | |||
| <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> | |||
| <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 class="clear"></div> | <div class="clear"></div> | ||
| </div> | </div> | ||
| </div> | |||
| </div> | </div> | ||
| </ion-content> | </div> | ||
| \ No newline at end of file | </ion-content> |
| import { Injectable } from "@angular/core"; | import { Injectable } from '@angular/core'; | ||
| import { | import { | ||
| AngularFirestore, | AngularFirestore, | ||
| AngularFirestoreDocument, | AngularFirestoreDocument, | ||
| AngularFirestoreCollection | AngularFirestoreCollection | ||
| } from "@angular/fire/firestore"; | } from '@angular/fire/firestore'; | ||
| import { Router, ActivatedRoute } from "@angular/router"; | import { Router, ActivatedRoute } from '@angular/router'; | ||
| import { Products } from "./services/product"; | import { Products } from './services/product'; | ||
| import { Cart, CartItem } from "./services/cart"; | import { Cart, CartItem } from './services/cart'; | ||
| import { ServiceService } from "./service.service"; | import { ServiceService } from './service.service'; | ||
| import * as firebase from "firebase"; | import * as firebase from 'firebase'; | ||
| import { take } from "rxjs/operators"; | import { take } from 'rxjs/operators'; | ||
| import { User } from "./services/user"; | import { User } from './services/user'; | ||
| import { from } from "rxjs"; | import { from } from 'rxjs'; | ||
| @Injectable({ | @Injectable({ | ||
| providedIn: "root" | providedIn: 'root' | ||
| }) | }) | ||
| export class CartsService { | export class CartsService { | ||
| size: string; | size: string; | ||
| ... | @@ -31,9 +31,9 @@ export class CartsService { | ... | @@ -31,9 +31,9 @@ export class CartsService { |
| public router: Router, | public router: Router, | ||
| public service: ServiceService | public service: ServiceService | ||
| ) { | ) { | ||
| this.custId = ""; | this.custId = ''; | ||
| this.carts = []; | this.carts = []; | ||
| 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; | this.custId = data.uid; | ||
| ... | @@ -46,20 +46,20 @@ export class CartsService { | ... | @@ -46,20 +46,20 @@ export class CartsService { |
| this.prodId = product.prodId; | this.prodId = product.prodId; | ||
| const prodRef = firebase | const prodRef = firebase | ||
| .firestore() | .firestore() | ||
| .collection("products") | .collection('products') | ||
| .doc(this.prodId); | .doc(this.prodId); | ||
| this.size = this.size === undefined ? product.size[0] : this.size; | this.size = this.size === undefined ? product.size[0] : this.size; | ||
| this.color = this.color === undefined ? product.color[0] : this.color; | this.color = this.color === undefined ? product.color[0] : this.color; | ||
| const cartRef: AngularFirestoreCollection<any> = this.afs.collection( | const cartRef: AngularFirestoreCollection<any> = this.afs.collection( | ||
| "carts", | 'carts', | ||
| ref => | ref => | ||
| ref | ref | ||
| .where("size", "==", this.size) | .where('size', '==', this.size) | ||
| .where("color", "==", this.color) | .where('color', '==', this.color) | ||
| .where("custId", "==", this.custId) | .where('custId', '==', this.custId) | ||
| .where("product", "==", prodRef) | .where('product', '==', prodRef) | ||
| ); | ); | ||
| cartRef | cartRef | ||
| .valueChanges() | .valueChanges() | ||
| ... | @@ -69,7 +69,7 @@ export class CartsService { | ... | @@ -69,7 +69,7 @@ export class CartsService { |
| if (value.length === 0) { | if (value.length === 0) { | ||
| product.image = | product.image = | ||
| product.image === undefined | product.image === undefined | ||
| ? "../assets/[email protected]" | ? '../assets/[email protected]' | ||
| : product.image; | : product.image; | ||
| const cart: Cart = { | const cart: Cart = { | ||
| color: this.color, | color: this.color, | ||
| ... | @@ -86,12 +86,12 @@ export class CartsService { | ... | @@ -86,12 +86,12 @@ export class CartsService { |
| }; | }; | ||
| // console.log(cart); | // console.log(cart); | ||
| this.afs | this.afs | ||
| .collection("carts") | .collection('carts') | ||
| .add(cart) | .add(cart) | ||
| .then(docRef => { | .then(docRef => { | ||
| const neworderId = docRef.id; | const neworderId = docRef.id; | ||
| this.afs | this.afs | ||
| .collection("carts") | .collection('carts') | ||
| .doc(neworderId) | .doc(neworderId) | ||
| .update({ cartId: docRef.id }) | .update({ cartId: docRef.id }) | ||
| .then(() => { | .then(() => { | ||
| ... | @@ -100,7 +100,7 @@ export class CartsService { | ... | @@ -100,7 +100,7 @@ export class CartsService { |
| }); | }); | ||
| }) | }) | ||
| .catch(error => { | .catch(error => { | ||
| console.error("Error adding document: ", error); | console.error('Error adding document: ', error); | ||
| }); | }); | ||
| } else { | } else { | ||
| // console.log(value); | // console.log(value); | ||
| ... | @@ -109,7 +109,7 @@ export class CartsService { | ... | @@ -109,7 +109,7 @@ export class CartsService { |
| // tslint:disable-next-line:radix | // tslint:disable-next-line:radix | ||
| const qty = parseInt(value[0].qty) + 1; | const qty = parseInt(value[0].qty) + 1; | ||
| this.afs | this.afs | ||
| .collection("carts") | .collection('carts') | ||
| .doc(cartId) | .doc(cartId) | ||
| .update({ qty: `${qty}` }) | .update({ qty: `${qty}` }) | ||
| .then(() => { | .then(() => { | ||
| ... | @@ -122,8 +122,8 @@ export class CartsService { | ... | @@ -122,8 +122,8 @@ export class CartsService { |
| public async cartList() { | public async cartList() { | ||
| const cartRef: AngularFirestoreCollection<any> = this.afs.collection( | const cartRef: AngularFirestoreCollection<any> = this.afs.collection( | ||
| "carts", | 'carts', | ||
| ref => ref.where("custId", "==", this.custId) | ref => ref.where('custId', '==', this.custId) | ||
| ); | ); | ||
| cartRef.valueChanges().subscribe(value => { | cartRef.valueChanges().subscribe(value => { | ||
| this.carts = []; | this.carts = []; | ||
| ... | @@ -181,7 +181,7 @@ export class CartsService { | ... | @@ -181,7 +181,7 @@ export class CartsService { |
| this.carts[index].qty = qty; | this.carts[index].qty = qty; | ||
| // console.log(this.carts[index].qty); | // console.log(this.carts[index].qty); | ||
| this.afs | this.afs | ||
| .collection("carts") | .collection('carts') | ||
| .doc(this.carts[index].cartId) | .doc(this.carts[index].cartId) | ||
| .update({ | .update({ | ||
| qty: this.carts[index].qty | qty: this.carts[index].qty | ||
| ... | @@ -193,7 +193,7 @@ export class CartsService { | ... | @@ -193,7 +193,7 @@ export class CartsService { |
| this.cartTotal = 0; | this.cartTotal = 0; | ||
| this.carts[index].qty = qty; | this.carts[index].qty = qty; | ||
| this.afs | this.afs | ||
| .collection("carts") | .collection('carts') | ||
| .doc(this.carts[index].cartId) | .doc(this.carts[index].cartId) | ||
| .update({ | .update({ | ||
| qty: this.carts[index].qty | qty: this.carts[index].qty | ||
| ... | @@ -202,7 +202,7 @@ export class CartsService { | ... | @@ -202,7 +202,7 @@ export class CartsService { |
| removeItem(index) { | removeItem(index) { | ||
| this.afs | this.afs | ||
| .collection("carts") | .collection('carts') | ||
| .doc(this.carts[index].cartId) | .doc(this.carts[index].cartId) | ||
| .delete(); | .delete(); | ||
| } | } | ||
| ... | @@ -211,9 +211,9 @@ export class CartsService { | ... | @@ -211,9 +211,9 @@ export class CartsService { |
| // console.log(promoCode); | // console.log(promoCode); | ||
| const state = true; | const state = true; | ||
| const promoRef: AngularFirestoreCollection<any> = this.afs.collection( | const promoRef: AngularFirestoreCollection<any> = this.afs.collection( | ||
| "promocode", | 'promocode', | ||
| ref => | ref => | ||
| ref.where("promoCode", "==", promoCode).where("status", "==", state) | ref.where('promoCode', '==', promoCode).where('status', '==', state) | ||
| ); | ); | ||
| return promoRef.valueChanges(); | return promoRef.valueChanges(); | ||
| } | } | ||
| ... | ... |
Please
register
or
sign in
to comment