Skip to content

Fixed Error: Missing Object Types for snapshot #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@
"call-number": {}
}
}
}
}
67 changes: 67 additions & 0 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"Home": "Principal",
"Category": "Categorias",
"Offers": "Ofertas",
"MyCart": "Carrito de Compras",
"Your Orders": "Tus Ordenes",
"Favourite": "Favoritos",
"Settings": "Ajustes",
"News": "Noticias",
"Contact": "Contactos",
"Login": "Acceder",
"Logout": "Salir",
"Featured Product": "Productos Destacados",
"Categories": "Categorias",
"Beverages": "Bebidas",
"Appetizers": "Snacks",
"Salads": "Ensaladas",
"Sides":"Lados",
"Desserts":"Postres",
"Main Course":"Plato principal",
"Starters":"Entradas",
"Slice":"Rebanada",
"ADD TO CART": "AÑADIR AL CARRITO",
"Size and prices": "Tamaño y Precios",
"CHECKOUT": "REVISA TU COMPRA",
"KEEP SHOPPING": "SEGUIR COMPRANDO",
"Cart": "Carrito",
"Continue": "Continuar",
"Other Taxes (3%)": "Otros Impustos (3%)",
"Total VAT (5%)": "Total IVA (5%)",
"Coupons": "Copones",
"Apply Coupon": "Applicar Cupon",
"Price Subtotal": "Subtotal",
"Order Total": "Total",
"Payment Options": "Opciones de Pago",
"Address": "Direccion",
"ENTER ADDRESS": "AGREGAR DIRECCION",
"Payment": "Pago",
"COD": "COD",
"CARD": "TARJETA",
"Check Out": "Pagar",
"Send": "Enviar",
"Message:": "Mensage:",
"Email:": "Correo:",
"Name:": "Nombre:",
"Contact Us": "Contacta con nosotros",
"Contact": "Contacto",
"Thank You": "Gracias",
"Thank you !": "Gracias !",
"We love our customers and we value your business. we want to thank you for giving us the opportunity to serve you. Our customer service always open to hear feedback from you.thanks you!": "Amamos a nuestros clientes y valoramos su negocio. Queremos agradecerle por darnos la oportunidad de servirle. Nuestro servicio al cliente siempre está abierto para escuchar sus comentarios. Gracias!",
"Settings": "Ajustes",
"Your Name": "Tu Nombre",
"Languages": "Idioma",
"Notifications": "Notificaciones",
"Card Number:": "Numero de Tarjeta:",
"Name on card:": "Nombre en Tarjeta:",
"CVV:": "CVV:",
"Date of expiry:": "Fecha de Expiración:",
"Save": "Guardar",
"Offers": "Ofertas",
"Original Price :": "Precio Original :",
"Offer Price :": "Precio Oferta :",
"Product Description :": "Descripción de Producto:",
"Buy Now": "Compra Ahora",
"News": "Noticias",
"News-details": "Nuevos-detalles"
}
6 changes: 3 additions & 3 deletions src/pages/address-list/address-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class AddressListPage {
cart: Array<any>;
orderDetails: any = {};
pincodes: Array<any>;
addresses: AngularFireList<any>;
public pincodeMatched: boolean = false;
public loyaltyPercentage: number = 0;
public loyaltyPoints: number = 0;
Expand Down Expand Up @@ -58,9 +59,8 @@ export class AddressListPage {
this.navCtrl.push("CartPage");
}
if (this.af.auth.currentUser) {
this.db
.list("/users/" + this.af.auth.currentUser.uid + "/address")
.snapshotChanges()
this.addresses=this.db.list("/users/" + this.af.auth.currentUser.uid + "/address");
this.addresses.snapshotChanges()
.pipe(
map(changes =>
changes.map(c => ({ $key: c.payload.key, ...c.payload.val() }))
Expand Down
9 changes: 4 additions & 5 deletions src/pages/favourite/favourite.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from "@angular/core";
import { IonicPage, NavController, ToastController } from "ionic-angular";
import { AngularFireAuth } from "@angular/fire/auth";
import { AngularFireDatabase } from "@angular/fire/database";
import { AngularFireDatabase, AngularFireList } from "@angular/fire/database";
import { map } from "rxjs/operators";

@IonicPage()
Expand All @@ -13,7 +13,7 @@ export class FavouritePage {
favouriteItems: any[] = [];
Cart: any[];
noOfItems: number;

favourites: AngularFireList<any>;
constructor(
public af: AngularFireAuth,
public db: AngularFireDatabase,
Expand All @@ -23,9 +23,8 @@ export class FavouritePage {
this.Cart = JSON.parse(localStorage.getItem("Cart"));
this.noOfItems = this.Cart != null ? this.Cart.length : null;
if (this.af.auth.currentUser) {
this.db
.list("/users/" + this.af.auth.currentUser.uid + "/favourite/")
.snapshotChanges()
this.favourites=this.db.list("/users/" + this.af.auth.currentUser.uid + "/favourite/");
this.favourites.snapshotChanges()
.pipe(
map(changes =>
changes.map(c => ({ $key: c.payload.key, ...c.payload.val() }))
Expand Down
7 changes: 4 additions & 3 deletions src/pages/offer/offer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, ViewChild } from "@angular/core";
import { IonicPage, NavController, Slides } from "ionic-angular";
import { AngularFireDatabase } from "@angular/fire/database";
import { AngularFireDatabase, AngularFireList } from "@angular/fire/database";
import { map } from "rxjs/operators";

@IonicPage()
Expand All @@ -11,12 +11,13 @@ import { map } from "rxjs/operators";
export class OfferPage {
@ViewChild(Slides) slides: Slides;
offerData: Array<any>;
offers:AngularFireList<any>;
public currency: {};

constructor(public af: AngularFireDatabase, public navCtrl: NavController) {
this.currency = JSON.parse(localStorage.getItem('currency'));
this.af.list("/menuItems", ref => ref.orderByChild("offer").equalTo(true))
.snapshotChanges()
this.offers=this.af.list("/menuItems", ref => ref.orderByChild("offer").equalTo(true));
this.offers.snapshotChanges()
.pipe(
map(changes =>
changes.map(c => ({ key: c.payload.key, ...c.payload.val() }))
Expand Down
8 changes: 4 additions & 4 deletions src/pages/order-list/order-list.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, LoadingController } from "ionic-angular";
import { AngularFireAuth } from "@angular/fire/auth";
import { AngularFireDatabase } from "@angular/fire/database";
import { AngularFireDatabase, AngularFireList } from "@angular/fire/database";
import { map } from "rxjs/operators";

@IonicPage()
Expand All @@ -12,6 +12,7 @@ import { map } from "rxjs/operators";
export class OrderListPage {

ordersDetails: any[] = [];
orders_list:AngularFireList<any>;
public noOfItems: number;
public currency: {};

Expand All @@ -28,9 +29,8 @@ export class OrderListPage {
});
loader.present().then(() => {
let userID = this.af.auth.currentUser.uid;
this.db
.list("/orders", ref => ref.orderByChild("userId").equalTo(userID))
.snapshotChanges()
this.orders_list=this.db.list("/orders", ref => ref.orderByChild("userId").equalTo(userID));
this.orders_list.snapshotChanges()
.pipe(
map(changes =>
changes.map(c => ({ $key: c.payload.key, ...c.payload.val() }))
Expand Down
11 changes: 9 additions & 2 deletions src/pages/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export class Settings {
url: any = "assets/img/profile.jpg";
value: any;
options = [
{
language: "ESPAÑOL",
value: "es"
},
{
language: "ENGLISH",
value: "en"
Expand Down Expand Up @@ -73,7 +77,7 @@ export class Settings {
contentType: "image/*"
};
let loader = this.loadingCtrl.create({
content: "please wait.."
content: "Espere porfavor.."
});
loader.present();
this.storageRef
Expand Down Expand Up @@ -101,6 +105,9 @@ export class Settings {
} else if (this.value == "ar") {
this.platform.setDir("rtl", true);
this.translate.use("ar");
} else if (this.value == "es") {
this.platform.setDir("ltr", true);
this.translate.use("es");
} else {
this.platform.setDir("ltr", true);
this.translate.use("en");
Expand All @@ -118,7 +125,7 @@ export class Settings {
mobileNo: this.user.mobileNo
})
.then(() => {
this.createToaster("user information updated successfully", 3000);
this.createToaster("Informacion Actualizada", 3000);
this.events.publish("imageUrl", this.user);
});
}
Expand Down