fix design
Showing
src/app/addaddresss/addaddresss.page.css
0 → 100644
src/app/addaddresss/addaddresss.page.css.map
0 → 100644
src/app/addcard/addcard.page.css
0 → 100644
src/app/addcard/addcard.page.css.map
0 → 100644
src/app/app.component.css
0 → 100644
src/app/app.component.css.map
0 → 100644
<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 *ngIf="userData"> | ||
<div class="top_banner"> | <div class="top_banner"> | ||
<div class="top_image"> | <div class="top_image"> | ||
<img src="../assets/asset_avatar.png"> | <img [src]="userData.profilePhoto" /> | ||
</div> | </div> | ||
<div class="top_detail"> | <div class="top_detail"> | ||
<h4>John Doe</h4> | <h4>{{ userData.name }}</h4> | ||
<p>[email protected]</p> | <p>{{ userData.emailId }}</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" *ngIf="!isSearchOpen"> | ||
<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> |
src/app/cart/cart.page.css
0 → 100644
This diff is collapsed.
Click to expand it.
src/app/cart/cart.page.css.map
0 → 100644
This diff is collapsed.
Click to expand it.
src/app/changedetails/changedetails.page.css
0 → 100644
... | @@ -15,12 +15,13 @@ | ... | @@ -15,12 +15,13 @@ |
</div> | </div> | ||
<div class="row"> | <div class="row"> | ||
<input | <input | ||
[(value)]="userData && userData.name" | |||
name="name" | name="name" | ||
required | required | ||
class="" | class="" | ||
type="text" | type="text" | ||
[(ngModel)]="updateData.name" | [(ngModel)]="userData && userData.name" | ||
placeholder="John Doe" | [(placeholder)]="userData && userData.name" | ||
#name="ngModel" | #name="ngModel" | ||
/> | /> | ||
<div | <div | ||
... | @@ -33,38 +34,26 @@ | ... | @@ -33,38 +34,26 @@ |
</div> | </div> | ||
<div class="row"> | <div class="row"> | ||
<input | <input | ||
required | [(value)]="userData && userData.emailId" | ||
readonly | |||
class="" | class="" | ||
name="emailId" | name="emailId" | ||
type="mail" | type="mail" | ||
[(ngModel)]="updateData.emailId" | [(placeholder)]="userData && userData.emailId" | ||
placeholder="[email protected]" | |||
pattern="[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}" | |||
#emailId="ngModel" | |||
/> | /> | ||
<div | |||
class="md-errors-spacer" | |||
[hidden]="emailId.valid || submitted == false" | |||
> | |||
<div *ngIf="emailId.errors && emailId.errors.required"> | |||
Email is required | |||
</div> | |||
<div *ngIf="emailId.errors && emailId.errors.pattern"> | |||
Email is invalid | |||
</div> | |||
</div> | |||
</div> | </div> | ||
<div class="row"> | <div class="row"> | ||
<input | <input | ||
[(value)]="userData && userData.phone" | |||
required | required | ||
class="" | class="" | ||
name="phone" | name="phone" | ||
type="number" | type="number" | ||
pattern="(\(+61\)|\+61|\(0[1-9]\)|0[1-9])?( ?-?[0-9]){6,9}" | pattern="(\(+61\)|\+61|\(0[1-9]\)|0[1-9])?( ?-?[0-9]){6,9}" | ||
maxlength="10" | maxlength="10" | ||
[(ngModel)]="updateData.phone" | [(ngModel)]="userData && userData.phone" | ||
placeholder="+00 9851 5871 6985" | [(placeholder)]="userData && userData.phone" | ||
#phone="ngModel" | #phone="ngModel" | ||
/> | /> | ||
<div | <div | ||
... | @@ -79,18 +68,42 @@ | ... | @@ -79,18 +68,42 @@ |
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
<div class="row"> | <div *ngIf="userData && userData.loginType == 0"> | ||
<h6>Change Password</h6> | <div class="row"> | ||
</div> | <h6>Change Password</h6> | ||
<div class="row"> | </div> | ||
<!-- <div class="row"> | |||
<input class="" type="password" placeholder="Current Password" /> | <input class="" type="password" placeholder="Current Password" /> | ||
</div> --> | |||
<div class="row"> | |||
<input | |||
class="" | |||
[(ngModel)]="updatePassword.password" | |||
name="password" | |||
type="password" | |||
placeholder="New Password" | |||
minlength="6" | |||
#password="ngModel" | |||
/> | |||
<div *ngIf="password.errors && password.errors.minlength"> | |||
Password must be at least 6 characters | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<input | |||
class="" | |||
#confirmPassword="ngModel" | |||
[(ngModel)]="updatePassword.confirmPassword" | |||
name="confirmPassword" | |||
type="password" | |||
placeholder="Confirm Password" | |||
/> | |||
<div *ngIf=""> | |||
Password should match | |||
</div> | |||
</div> | |||
</div> | </div> | ||
<div class="row"> | |||
<input class="" type="password" placeholder="New Password" /> | |||
</div> | |||
<div class="row"> | |||
<input class="" type="password" placeholder="Confirm Password" /> | |||
</div> | |||
<div class="row"> | <div class="row"> | ||
<button class="login_btn" (click)="onFormSubmit(updateForm)"> | <button class="login_btn" (click)="onFormSubmit(updateForm)"> | ||
UPDATE | UPDATE | ||
... | ... |
src/app/changepass/changepass.page.css
0 → 100644
src/app/changepass/changepass.page.css.map
0 → 100644
src/app/forgot/forgot.page.css
0 → 100644
src/app/forgot/forgot.page.css.map
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/app/landing/landing.page.css
0 → 100644
src/app/landing/landing.page.css.map
0 → 100644
src/app/login/login.page.css
0 → 100644
src/app/login/login.page.css.map
0 → 100644
src/app/myorder/myorder.page.css
0 → 100644
src/app/myorder/myorder.page.css.map
0 → 100644
src/app/nearby/nearby.page.css
0 → 100644
src/app/nearby/nearby.page.css.map
0 → 100644
src/app/productdetail/productdetail.page.css
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/app/productlist/productlist.page.css
0 → 100644
src/app/productlist/productlist.page.css.map
0 → 100644
<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)="goBack()"> | ||
<img src="../assets/Group17_2.png"> | <img src="../assets/Group17_2.png" /> | ||
</button> | </button> | ||
<div class="nav_title floatLeft"> | <div class="nav_title floatLeft"> | ||
<input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()"> | <input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()" /> | ||
</div> | </div> | ||
<button class="nav_btn nav_search floatRight" *ngIf="!searchShow"> | <button class="nav_btn nav_search floatRight" *ngIf="!searchShow" (click)="clickSearch()"></button> | ||
</button> | <button class="nav_btn nav_close floatRight" *ngIf="searchShow" (click)="searchClose()"></button> | ||
<button class="nav_btn nav_close floatRight" *ngIf="searchShow" (click)="searchClose()"> | |||
</button> | |||
<div class="clear"></div> | <div class="clear"></div> | ||
</div> | </div> | ||
<ion-content> | <ion-content> | ||
... | @@ -43,39 +41,69 @@ | ... | @@ -43,39 +41,69 @@ |
</li> | </li> | ||
</ul> | </ul> | ||
</div> | </div> | ||
<div class="sort_wrappper" *ngIf="isShow" [@slideInOut]> | <ul [class.grid_view]="onGrid" *ngIf="prodService.product && prodService.product.length > 0"> | ||
<div class="sort_inner"> | <li *ngFor="let product of prodService.product; let i = index"> | ||
<h4>Sort By</h4> | <div class="product_image"> | ||
<ul> | <img [src]="product.image" onerror="this.src='../assets/[email protected]'" (click)="prodDetails(i)" /> | ||
<!-- <li> | <div [ngClass]="checkFavStatus(product.prodId)" (click)="changeFav(product.prodId)"></div> | ||
<div class="featured_badge" *ngIf="product.featured">Featured</div> | |||
</div> | |||
<h5 class="ellipse" (click)="prodDetails(i)">{{product.prodName}}</h5> | |||
<p (click)="prodDetails(i)"> | |||
A$ {{product.price}}<span class="offer" *ngIf="product.discount > 0">-{{product.discount}}%</span | |||
> | |||
</p> | |||
</li> | |||
</ul> | |||
</div> | |||
<div class="sort_wrappper" *ngIf="isShow" [@slideInOut]> | |||
<div class="sort_inner"> | |||
<h4>Sort By</h4> | |||
<ul> | |||
<!-- <li> | |||
<input class="styled-checkbox" id="styled-checkbox-1" type="radio" value="popular" name="sort" (click)="setValue($event.target.value)"> | <input class="styled-checkbox" id="styled-checkbox-1" type="radio" value="popular" name="sort" (click)="setValue($event.target.value)"> | ||
<label for="styled-checkbox-1">Popularity</label> | <label for="styled-checkbox-1">Popularity</label> | ||
</li> --> | </li> --> | ||
<!-- <li> | <!-- <li> | ||
<input class="styled-checkbox" id="styled-checkbox-2" type="radio" value="relevance" name="sort" (click)="setValue($event.target.value)"> | <input class="styled-checkbox" id="styled-checkbox-2" type="radio" value="relevance" name="sort" (click)="setValue($event.target.value)"> | ||
<label for="styled-checkbox-2">Relevence</label> | <label for="styled-checkbox-2">Relevence</label> | ||
</li> --> | </li> --> | ||
<li> | <li> | ||
<input class="styled-checkbox" id="styled-checkbox-3" type="radio" value="low" name="sort" (click)="setValue($event.target.value)"> | <input | ||
<label for="styled-checkbox-3">Price Low - High</label> | class="styled-checkbox" | ||
</li> | id="styled-checkbox-3" | ||
<li> | type="radio" | ||
<input class="styled-checkbox" id="styled-checkbox-4" type="radio" value="high" name="sort" (click)="setValue($event.target.value)"> | value="low" | ||
<label for="styled-checkbox-4">Price High - Low</label> | name="sort" | ||
</li> | (click)="setValue($event.target.value)" | ||
<!-- <li> | /> | ||
<label for="styled-checkbox-3">Price Low - High</label> | |||
</li> | |||
<li> | |||
<input | |||
class="styled-checkbox" | |||
id="styled-checkbox-4" | |||
type="radio" | |||
value="high" | |||
name="sort" | |||
(click)="setValue($event.target.value)" | |||
/> | |||
<label for="styled-checkbox-4">Price High - Low</label> | |||
</li> | |||
<!-- <li> | |||
<input class="styled-checkbox" id="styled-checkbox-5" type="radio" value="rate" name="sort" (click)="setValue($event.target.value)"> | <input class="styled-checkbox" id="styled-checkbox-5" type="radio" value="rate" name="sort" (click)="setValue($event.target.value)"> | ||
<label for="styled-checkbox-5">Rating</label> | <label for="styled-checkbox-5">Rating</label> | ||
</li> --> | </li> --> | ||
</ul> | </ul> | ||
<div class="sort_footer"> | <div class="sort_footer"> | ||
<button class="cancel floatLeft" (click)="istoggle()">CANCEL</button> | <button class="cancel floatLeft" (click)="istoggle()">CANCEL</button> | ||
<button class="submit floatRight" (click)="istoggle(); submit()">SUBMIT</button> | <button class="submit floatRight" (click)="istoggle(); submit()"> | ||
<div class="clear"></div> | SUBMIT | ||
</div> | </button> | ||
</div> | <div class="clear"></div> | ||
</div> | |||
</div> | </div> | ||
</div> | |||
</ion-content> | </ion-content> | ||
<div class="search_item_list" *ngIf="searchShow" [@slideInOut]> | <div class="search_item_list" *ngIf="searchShow" [@slideInOut]> | ||
<ul *ngIf="searchService.searchList"> | <ul *ngIf="searchService.searchList"> | ||
... | ... |
src/app/profile/profile.page.css
0 → 100644
src/app/profile/profile.page.css.map
0 → 100644
src/app/searchmodal/searchmodal.page.css
0 → 100644
src/app/searchmodal/searchmodal.page.css.map
0 → 100644
src/app/signup/signup.page.css
0 → 100644
src/app/signup/signup.page.css.map
0 → 100644
src/app/sortby/sortby.page.css
0 → 100644
src/app/sortby/sortby.page.css.map
0 → 100644
src/app/tab1/tab1.page.css
0 → 100644
src/app/tab1/tab1.page.css.map
0 → 100644
src/app/tab2/tab2.page.css
0 → 100644
src/app/tab2/tab2.page.css.map
0 → 100644
src/app/tab3/tab3.page.css
0 → 100644
src/app/tab3/tab3.page.css.map
0 → 100644
src/app/tabs/tabs.page.css
0 → 100644
src/app/tabs/tabs.page.css.map
0 → 100644
src/app/trackorder/trackorder.page.css
0 → 100644
src/app/trackorder/trackorder.page.css.map
0 → 100644
src/app/verification/verification.page.css
0 → 100644
src/app/wishlist/wishlist.page.css
0 → 100644
src/app/wishlist/wishlist.page.css.map
0 → 100644
... | @@ -150,6 +150,7 @@ export class AuthService { | ... | @@ -150,6 +150,7 @@ export class AuthService { |
}; | }; | ||
this.loggedUser = userData; | this.loggedUser = userData; | ||
this.service.set("userData", JSON.stringify(this.loggedUser)); | this.service.set("userData", JSON.stringify(this.loggedUser)); | ||
this.subjectService.sendUserData(JSON.stringify(this.loggedUser)); | |||
console.log(this.loggedUser); | console.log(this.loggedUser); | ||
}); | }); | ||
} | } | ||
... | @@ -281,10 +282,3 @@ export class AuthService { | ... | @@ -281,10 +282,3 @@ export class AuthService { |
return false; | return false; | ||
} | } | ||
} | } | ||
/*displayName: "Adarsh Techware" | |||
email: "[email protected]" | |||
emailVerified: true | |||
: "https://lh4.googleusercontent.com/-h0rs2pE-Azw/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rcjNtapRhKoG09NKifQsv_lQPC_2A/photo.jpg" | |||
: "vT498Fz6X0Z6l5l5iNn5hxfwz692" | |||
providerData: [Gl]*/ |
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(); | ||
} | } | ||
... | ... |
This diff is collapsed.
Click to expand it.
src/theme/variables.css
0 → 100644
src/theme/variables.css.map
0 → 100644
Please
register
or
sign in
to comment