new changes
Showing
This diff is collapsed.
Click to expand it.
| ... | ... | @@ -31,6 +31,7 @@ |
| "@ionic-native/status-bar": "^5.12.0", | ||
| "@ionic/angular": "^4.7.1", | ||
| "@ionic/storage": "^2.2.0", | ||
| "@types/googlemaps": "^3.38.0", | ||
| "agm-direction": "^0.7.8", | ||
| "cordova-android": "^8.0.0", | ||
| "cordova-plugin-device": "^2.0.2", | ||
| ... | ... |
| ... | ... | @@ -5,14 +5,14 @@ |
| <div class="nav_title floatLeft"> | ||
| </div> | ||
| <button class="nav_btn nav_cart floatRight" (click)="goToPage('cart')"> | ||
| <div class="not">1</div> | ||
| <div class="not" *ngIf="cartService.carts">{{cartService.carts.length}}</div> | ||
| </button> | ||
| <div class="clear"></div> | ||
| </div> | ||
| <ion-content> | ||
| <div class="product_detail_wrapper" *ngIf="product"> | ||
| <div class="product_banner"> | ||
| <div class="fav_icon"></div> | ||
| <div [ngClass]="checkFavStatus(product.prodId)" (click)="changeFav(product.prodId)"></div> | ||
| <div class="featured_badge" *ngIf="product.featured">Featured</div> | ||
| <img [src]="product.image" onerror="this.src='../assets/[email protected]'"> | ||
| </div> | ||
| ... | ... | @@ -22,7 +22,7 @@ |
| <h3>{{product.prodName}}</h3> | ||
| <p><strong><span><img src="../assets/Path61_2.png"></span>0</strong> {{product.category}}, {{product.subCate}} | ||
| <br/> | ||
| <span *ngFor="let tag of product.tag">#{{tag}}</span> | ||
| <span *ngFor="let tag of product.tag">#{{tag}} </span> | ||
| </p> | ||
| </ion-col> | ||
| <ion-col size="4"> | ||
| ... | ... | @@ -31,7 +31,25 @@ |
| </ion-col> | ||
| </ion-row> | ||
| </div> | ||
| <div class="product_div_content"> | ||
| <h5>Color</h5> | ||
| <div class="size_div"> | ||
| <ul *ngIf="product.size"> | ||
| <ion-slides pager="false" [options]="slideOpts"> | ||
| <ion-slide *ngFor="let color of product.color; let i = index"> | ||
| <li> | ||
| <button id="custom_check_button"> | ||
| <label> | ||
| <input id="{{color}}" type="radio" name="color" value="{{color}}" (click)="cartService.choose_color(color)" [checked]="i==0"> | ||
| <p>{{color}}</p> | ||
| </label> | ||
| </button> | ||
| </li> | ||
| </ion-slide> | ||
| </ion-slides> | ||
| </ul> | ||
| </div> | ||
| <h5>Size</h5> | ||
| <div class="size_div"> | ||
| <ul *ngIf="product.size"> | ||
| ... | ... | @@ -127,8 +145,7 @@ |
| <li (click)="viewProd(similar)"> | ||
| <div class="product_image"> | ||
| <img [src]="similar.image" onerror="this.src='../assets/[email protected]'"> | ||
| <div class="fav_icon"> | ||
| </div> | ||
| <div [ngClass]="checkFavStatus(similar.prodId)" (click)="changeFav(similar.prodId)"></div> | ||
| </div> | ||
| <h5>{{similar.prodName}}</h5> | ||
| <p>{{similar.price}}</p> | ||
| ... | ... |
| ... | ... | @@ -30,7 +30,7 @@ |
| <li *ngFor="let product of prodService.product; let i = index"> | ||
| <div class="product_image"> | ||
| <img [src]="product.image" onerror="this.src='../assets/[email protected]'" (click)="prodDetails(i)"> | ||
| <div class="fav_fill" (click)="changeFav(product.prodId)" *ngIf="checkFavStatus(product.prodId)"> | ||
| <div [ngClass]="checkFavStatus(product.prodId)" (click)="changeFav(product.prodId)"> | ||
| </div> | ||
| <div class="featured_badge" *ngIf="product.featured">Featured</div> | ||
| </div> | ||
| ... | ... | @@ -43,30 +43,30 @@ |
| <div class="sort_inner"> | ||
| <h4>Sort By</h4> | ||
| <ul> | ||
| <li> | ||
| <input class="styled-checkbox" id="styled-checkbox-1" type="radio" value="value1"> | ||
| <!-- <li> | ||
| <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> | ||
| </li> | ||
| <li> | ||
| <input class="styled-checkbox" id="styled-checkbox-2" type="radio" value="value2"> | ||
| </li> --> | ||
| <!-- <li> | ||
| <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> | ||
| </li> | ||
| </li> --> | ||
| <li> | ||
| <input class="styled-checkbox" id="styled-checkbox-3" type="radio" value="value3"> | ||
| <input class="styled-checkbox" id="styled-checkbox-3" type="radio" value="low" name="sort" (click)="setValue($event.target.value)"> | ||
| <label for="styled-checkbox-3">Price Low - High</label> | ||
| </li> | ||
| <li> | ||
| <input class="styled-checkbox" id="styled-checkbox-4" type="radio" value="value4"> | ||
| <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="value5"> | ||
| <!-- <li> | ||
| <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> | ||
| </li> | ||
| </li> --> | ||
| </ul> | ||
| <div class="sort_footer"> | ||
| <button class="cancel floatLeft" (click)="istoggle()">CANCEL</button> | ||
| <button class="submit floatRight" (click)="istoggle()">SUBMIT</button> | ||
| <button class="submit floatRight" (click)="istoggle(); submit()">SUBMIT</button> | ||
| <div class="clear"></div> | ||
| </div> | ||
| </div> | ||
| ... | ... |
src/config/address.service.ts
0 → 100644
| ... | ... | @@ -8,6 +8,7 @@ import * as firebase from 'firebase'; |
| import { take } from 'rxjs/operators'; | ||
| import { User } from './services/user'; | ||
| import { from } from 'rxjs'; | ||
| import undefined = require('firebase/empty-import'); | ||
| @Injectable({ | ||
| providedIn: 'root' | ||
| ... | ... | @@ -27,8 +28,8 @@ export class CartsService { |
| public router: Router, | ||
| public service: ServiceService | ||
| ) { | ||
| this.size = 'Small'; | ||
| this.custId = ''; | ||
| this.carts = []; | ||
| const users = this.service.get('user').then((data) => { | ||
| if (data) { | ||
| data = JSON.parse(data); | ||
| ... | ... | @@ -44,18 +45,20 @@ export class CartsService { |
| this.prodId = product.prodId; | ||
| const prodRef = firebase.firestore().collection('products').doc(this.prodId); | ||
| this.size = this.size === undefined ? product.size[0] : this.size; | ||
| this.color = this.color === undefined ? product.color[0] : this.color; | ||
| const cartRef: AngularFirestoreCollection<any> = this.afs.collection('carts', ref => ref.where('size', '==', this.size) | ||
| .where('color', '==', Object.keys(product.color)[0]) | ||
| .where('color', '==', this.color) | ||
| .where('custId', '==', this.custId) | ||
| .where('product', '==', prodRef) | ||
| ); | ||
| ; | ||
| cartRef.valueChanges().pipe(take(1)).subscribe((value) => { | ||
| console.log(value); | ||
| if (value.length === 0) { | ||
| product.image = product.image === undefined ? '../assets/[email protected]' : product.image; | ||
| const cart: Cart = { | ||
| color: Object.keys(product.color)[0], | ||
| color: this.color, | ||
| custId: this.custId, | ||
| shopperId: product.shopperId, | ||
| product: firebase.firestore().doc(`products/${this.prodId}`), | ||
| ... | ... | @@ -87,7 +90,6 @@ export class CartsService { |
| console.log('Booking Successfully'); | ||
| document.body.scrollTop = document.documentElement.scrollTop = 0; | ||
| }); | ||
| } | ||
| }); | ||
| } | ||
| ... | ... | @@ -137,6 +139,10 @@ export class CartsService { |
| this.size = size; | ||
| } | ||
| choose_color(color: string) { | ||
| this.color = color; | ||
| } | ||
| removeCount(index) { | ||
| // tslint:disable-next-line:radix | ||
| const qty = this.carts[index].qty > 1 ? this.carts[index].qty - 1 : this.carts[index].qty; | ||
| ... | ... |
src/config/search.service.ts
0 → 100644
src/config/services/address.ts
0 → 100644
src/config/services/search.ts
0 → 100644
Please
register
or
sign in
to comment