Skip to content
Snippets Groups Projects
Commit 231135d8 authored by paborte's avatar paborte
Browse files

Cambios menores

parent bcdec3fe
No related branches found
No related tags found
No related merge requests found
...@@ -17,9 +17,9 @@ export class ContactoComponent implements OnInit { ...@@ -17,9 +17,9 @@ export class ContactoComponent implements OnInit {
contacto(form: NgForm) { contacto(form: NgForm) {
this.envioCorrecto = true; this.envioCorrecto = true;
form.reset(); form.reset();
let interval = setTimeout(() => { /* let interval = setTimeout(() => {
this.envioCorrecto = !this.envioCorrecto; this.envioCorrecto = !this.envioCorrecto;
}, 2500); }, 2500); */
this.databaseService this.databaseService
.createConsultaInDatabase( .createConsultaInDatabase(
form.value.nombre, form.value.nombre,
...@@ -30,7 +30,10 @@ export class ContactoComponent implements OnInit { ...@@ -30,7 +30,10 @@ export class ContactoComponent implements OnInit {
form.value.motivoConsulta form.value.motivoConsulta
) )
.then( .then(
(resolve) => {}, (resolve) => {
this.envioCorrecto = true;
console.log(resolve);
},
(reject) => {} (reject) => {}
); );
} }
......
...@@ -76,8 +76,7 @@ export class DatabaseService { ...@@ -76,8 +76,7 @@ export class DatabaseService {
numeroDePedido: string, numeroDePedido: string,
motivoConsulta: string motivoConsulta: string
) { ) {
return new Promise<any>((resolve, reject) => { return this.angularFirestore.collection('consultas').doc().set({
this.angularFirestore.collection('consultas').doc().set({
nombre: nombre, nombre: nombre,
apellidos: apellidos, apellidos: apellidos,
email: email, email: email,
...@@ -85,7 +84,6 @@ export class DatabaseService { ...@@ -85,7 +84,6 @@ export class DatabaseService {
numeroDePedido: numeroDePedido, numeroDePedido: numeroDePedido,
motivoConsulta: motivoConsulta, motivoConsulta: motivoConsulta,
}); });
});
} }
getProductoFromDatabase(productoID: string): Observable<any> { getProductoFromDatabase(productoID: string): Observable<any> {
return this.angularFirestore return this.angularFirestore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment